[FFmpeg-cvslog] av1dec: Fix RefFrameSignBias calculation
Mark Thompson
git at videolan.org
Wed Apr 24 18:36:10 EEST 2024
ffmpeg | branch: release/7.0 | Mark Thompson <sw at jkqxz.net> | Mon Apr 22 21:24:20 2024 +0100| [9963b9e3c9e51ae6fb5ff4df5a26a459922dc51c] | committer: Lynne
av1dec: Fix RefFrameSignBias calculation
(cherry picked from commit ba6b08c75b6e8394c5c53bde22623a393a2d1c47)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9963b9e3c9e51ae6fb5ff4df5a26a459922dc51c
---
libavcodec/av1dec.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 2850dc96ff..1d3c5dfc9d 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -372,8 +372,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