aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-11-15 15:12:14 -0300
committerJames Almer <jamrial@gmail.com>2020-01-06 11:51:23 -0300
commit8ad03481f3c7b7108548a9f568cae21e9fd1bddf (patch)
tree07377adecf1662f01de4a95b0c917e3c70ddb138
parent9a992aadf0edf128a5773436f4cc7bdefa01595a (diff)
downloadffmpeg-8ad03481f3c7b7108548a9f568cae21e9fd1bddf.tar.gz
avcodec/cbs_av1: fix reading reference order hint in skip_mode_params()
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 2703068110dce2c145a2d3a0f380f8e0de79b632)
-rw-r--r--libavcodec/cbs_av1_syntax_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
index 2dfdc81d95..12b6564a26 100644
--- a/libavcodec/cbs_av1_syntax_template.c
+++ b/libavcodec/cbs_av1_syntax_template.c
@@ -882,7 +882,7 @@ static int FUNC(skip_mode_params)(CodedBitstreamContext *ctx, RWContext *rw,
forward_idx = -1;
backward_idx = -1;
for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
- ref_hint = priv->ref[i].order_hint;
+ ref_hint = priv->ref[current->ref_frame_idx[i]].order_hint;
dist = cbs_av1_get_relative_dist(seq, ref_hint,
current->order_hint);
if (dist < 0) {
@@ -913,7 +913,7 @@ static int FUNC(skip_mode_params)(CodedBitstreamContext *ctx, RWContext *rw,
second_forward_idx = -1;
for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
- ref_hint = priv->ref[i].order_hint;
+ ref_hint = priv->ref[current->ref_frame_idx[i]].order_hint;
if (cbs_av1_get_relative_dist(seq, ref_hint,
forward_hint) < 0) {
if (second_forward_idx < 0 ||