[FFmpeg-cvslog] av1dec: Fix RefFrameSignBias calculation

Mark Thompson git at videolan.org
Mon Apr 22 23:44:27 EEST 2024


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Mon Apr 22 21:24:20 2024 +0100| [ba6b08c75b6e8394c5c53bde22623a393a2d1c47] | committer: Mark Thompson

av1dec: Fix RefFrameSignBias calculation

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

 libavcodec/av1dec.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 69da08b686..79a30a114d 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -373,8 +373,13 @@ static void order_hint_info(AV1DecContext *s)
         int ref_order_hint = s->ref[ref_slot].order_hint;
 
         frame->order_hints[ref_name] = ref_order_hint;
-        frame->ref_frame_sign_bias[ref_name] =
-            get_relative_dist(seq, ref_order_hint, frame->order_hint);
+        if (!seq->enable_order_hint) {
+            frame->ref_frame_sign_bias[ref_name] = 0;
+        } else {
+            frame->ref_frame_sign_bias[ref_name] =
+                get_relative_dist(seq, ref_order_hint,
+                                  frame->order_hint) > 0;
+        }
     }
 }
 



More information about the ffmpeg-cvslog mailing list