From caef968117eb2d6d7224e8d29ec67ff79b0025f8 Mon Sep 17 00:00:00 2001
From: Gianni Rosato <gianni@twoorioles.com>
Date: Fri, 28 Feb 2025 09:28:46 -0500
Subject: [PATCH] refactor: simplify deltaq bitstream parsing logic

---
 src/decode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/decode.c b/src/decode.c
index a3b1b9c2..3ee306a2 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -958,9 +958,7 @@ static int decode_b(Dav1dTaskContext *const t,
     }
 
     // delta-q/lf
-    if (!(t->bx & (31 >> !f->seq_hdr->sb128)) &&
-        !(t->by & (31 >> !f->seq_hdr->sb128)))
-    {
+    if (!((t->bx | t->by) & (31 >> !f->seq_hdr->sb128))) {
         const int prev_qidx = ts->last_qidx;
         const int have_delta_q = f->frame_hdr->delta.q.present &&
             (bs != (f->seq_hdr->sb128 ? BS_128x128 : BS_64x64) || !b->skip);
-- 
GitLab