ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Thu Mar 13 22:23:50 2025 +0100| [2f4f96f1ac03cd157f6269935cc591a721a29c1a] | 
committer: Andreas Rheinhardt

avcodec/hqx: Combine checks

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f4f96f1ac03cd157f6269935cc591a721a29c1a
---

 libavcodec/hqx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c
index c28c274b24..54a9870e11 100644
--- a/libavcodec/hqx.c
+++ b/libavcodec/hqx.c
@@ -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,

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to