summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2016-09-21 09:52:21 +0300
committerSreerenj Balachandran <sreerenj.balachandran@intel.com>2016-09-21 09:52:21 +0300
commit44a90c196ddce97519d99311983ac04631e43d58 (patch)
tree9770a9f189ab5f102ed0592fc56f5c4a65dd2519
parent9afa0ce47169cc91aa212dcf7db375a64244c0ba (diff)
encoder: vp9: Fix refresh frame flag setting
While doing the mode-1 referece picture selection, the circular buffer logic was not correctly setting the refresh frame flags as per VP9 spec. Make sure refresh_flag[0] get updated correclty after each cycle of GST_VP9_REF_FRAMES. https://bugzilla.gnome.org/show_bug.cgi?id=771507
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_vp9.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_vp9.c b/gst-libs/gst/vaapi/gstvaapiencoder_vp9.c
index 6006f682..0069648c 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_vp9.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_vp9.c
@@ -228,7 +228,7 @@ get_ref_indices (guint ref_pic_mode, guint ref_list_idx, guint * last_idx,
*gf_idx = (last_filled_idx - 1) & (GST_VP9_REF_FRAMES - 1);
*arf_idx = (last_filled_idx - 2) & (GST_VP9_REF_FRAMES - 1);
- *refresh_frame_flags = 1 << (*last_idx + 1);
+ *refresh_frame_flags = 1 << ((*last_idx + 1) % GST_VP9_REF_FRAMES);
}
GST_LOG