mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-04 23:46:43 +00:00
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>
This commit is contained in:
parent
27427c00c0
commit
08b4aaa7fa
1 changed files with 2 additions and 5 deletions
|
@ -303,11 +303,7 @@ vaapi_fill_ref_frames (GstVaapiDecoderVp9 * decoder, GstVaapiPicture * picture,
|
||||||
GstVaapiDecoderVp9Private *const priv = &decoder->priv;
|
GstVaapiDecoderVp9Private *const priv = &decoder->priv;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
if (frame_hdr->frame_type == GST_VP9_KEY_FRAME) {
|
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 {
|
|
||||||
pic_param->pic_fields.bits.last_ref_frame =
|
pic_param->pic_fields.bits.last_ref_frame =
|
||||||
frame_hdr->ref_frame_indices[GST_VP9_REF_FRAME_LAST - 1];
|
frame_hdr->ref_frame_indices[GST_VP9_REF_FRAME_LAST - 1];
|
||||||
pic_param->pic_fields.bits.last_ref_frame_sign_bias =
|
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 =
|
pic_param->pic_fields.bits.alt_ref_frame_sign_bias =
|
||||||
frame_hdr->ref_frame_sign_bias[GST_VP9_REF_FRAME_ALTREF - 1];
|
frame_hdr->ref_frame_sign_bias[GST_VP9_REF_FRAME_ALTREF - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (priv->ref_frames); i++) {
|
for (i = 0; i < G_N_ELEMENTS (priv->ref_frames); i++) {
|
||||||
pic_param->reference_frames[i] = priv->ref_frames[i] ?
|
pic_param->reference_frames[i] = priv->ref_frames[i] ?
|
||||||
priv->ref_frames[i]->surface_id : VA_INVALID_SURFACE;
|
priv->ref_frames[i]->surface_id : VA_INVALID_SURFACE;
|
||||||
|
|
Loading…
Reference in a new issue