1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-03 05:10:03 +02:00

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>
(cherry picked from commit 66425add27)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2018-10-31 10:19:43 +01:00
parent fd05e20650
commit 2f04b78b95

View File

@ -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;