[FFmpeg-devel] [PATCH] av1dec: Fix RefFrameSignBias calculation
Mark Thompson
sw at jkqxz.net
Mon Apr 22 23:31:41 EEST 2024
---
Actually match the specification. (Though I'm guessing this field isn't actually used if things pass anyway?)
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;
+ }
}
}
--
2.43.0
More information about the ffmpeg-devel
mailing list