1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/hqx: Combine checks

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-03-13 22:23:50 +01:00
parent 02b5aee879
commit 2f4f96f1ac

View File

@ -282,7 +282,7 @@ static int hqx_decode_444(HQXContext *ctx, int slice_no, int x, int y)
quants = hqx_quants[get_bits(gb, 4)];
for (i = 0; i < 12; i++) {
if (i == 0 || i == 4 || i == 8)
if (!(i & 3))
last_dc = 0;
ret = decode_block(gb, ctx->dc_vlc, quants,
ctx->dcb, slice->block[i], &last_dc);
@ -324,7 +324,7 @@ static int hqx_decode_444a(HQXContext *ctx, int slice_no, int x, int y)
cbp |= cbp << 4; // alpha CBP
cbp |= cbp << 8; // chroma CBP
for (i = 0; i < 16; i++) {
if (i == 0 || i == 4 || i == 8 || i == 12)
if (!(i & 3))
last_dc = 0;
if (cbp & (1 << i)) {
ret = decode_block(gb, ctx->dc_vlc, quants,