summaryrefslogtreecommitdiff
path: root/libavcodec/prosumer.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-10-31 10:19:43 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-11-02 23:46:31 +0100
commit66425add270cd262a22c0fdaf6aad09a0db6f8c0 (patch)
treec1b3c8c5b176ce215abc794470c1cbf13afcc875 /libavcodec/prosumer.c
parent1dfa0b6f36d29293f2d0219c4095dc8bb7a4b0dc (diff)
downloadffmpeg-66425add270cd262a22c0fdaf6aad09a0db6f8c0.tar.gz
avcodec/prosumer: Simplify bit juggling of the c variable in decompress()
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/prosumer.c')
-rw-r--r--libavcodec/prosumer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c
index 3125636cf1..505de71980 100644
--- a/libavcodec/prosumer.c
+++ b/libavcodec/prosumer.c
@@ -69,15 +69,13 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui
}
c = b >> 16;
if (c & 0xFF00u) {
- c = (((c >> 8) & 0xFFu) | (c & 0xFF00)) & 0xF00F;
fill = lut[2 * idx + 1];
- if ((c & 0xFF00u) == 0x1000) {
+ if ((c & 0xF000u) == 0x1000) {
bytestream2_put_le16(pb, fill);
- c &= 0xFFFF00FFu;
} else {
bytestream2_put_le32(pb, fill);
- c &= 0xFFFF00FFu;
}
+ c = (c >> 8) & 0x0Fu;
}
while (c) {
a <<= 4;