summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-10-19 13:42:53 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-10-19 13:42:53 +0200
commit08b4aaa7fa821d163d5f35aead668be8053686b9 (patch)
treed7b8a904eb15f7233b23886d76a7f3dc759ac4f0 /gst-libs
parent27427c00c0c4f240ff0cce877eb52759292cd89c (diff)
libs: decoder: vp9: avoid reference rewriting
The removed code set all the reference frames to the current frame it is a key one, but later, all the reference frames were rewritten with the decoded picture buffers or VA_INVALID_SURFACE if they were not available. Basically, all this time the first reference frame assignment has been ignored, and it's not described by the spec, and this patch removes that code. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/400>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_vp9.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c
index 0f6a300f..134a0317 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c
@@ -303,11 +303,7 @@ vaapi_fill_ref_frames (GstVaapiDecoderVp9 * decoder, GstVaapiPicture * picture,
GstVaapiDecoderVp9Private *const priv = &decoder->priv;
guint i;
- if (frame_hdr->frame_type == GST_VP9_KEY_FRAME) {
- for (i = 0; i < G_N_ELEMENTS (priv->ref_frames); i++)
- pic_param->reference_frames[i] = picture->surface_id;
-
- } else {
+ if (frame_hdr->frame_type != GST_VP9_KEY_FRAME) {
pic_param->pic_fields.bits.last_ref_frame =
frame_hdr->ref_frame_indices[GST_VP9_REF_FRAME_LAST - 1];
pic_param->pic_fields.bits.last_ref_frame_sign_bias =
@@ -321,6 +317,7 @@ vaapi_fill_ref_frames (GstVaapiDecoderVp9 * decoder, GstVaapiPicture * picture,
pic_param->pic_fields.bits.alt_ref_frame_sign_bias =
frame_hdr->ref_frame_sign_bias[GST_VP9_REF_FRAME_ALTREF - 1];
}
+
for (i = 0; i < G_N_ELEMENTS (priv->ref_frames); i++) {
pic_param->reference_frames[i] = priv->ref_frames[i] ?
priv->ref_frames[i]->surface_id : VA_INVALID_SURFACE;