ffmpeg | branch: master | Mark Thompson <s...@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;
+        }
     }
 }
 

_______________________________________________
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