decoder: vp9: Fix last/golden/altref frame index setting

Always fill VADecPictureParameterBufferVP9 last/golden/altref indices
based on what ever reference frame indices encoded in frame header.
This commit is contained in:
Sreerenj Balachandran 2015-11-17 19:37:07 +02:00
parent e267e167db
commit a24918037d

View file

@ -226,17 +226,14 @@ vaapi_fill_ref_frames (GstVaapiDecoderVp9 * decoder, GstVaapiPicture * picture,
frame_hdr->ref_frame_indices[GST_VP9_REF_FRAME_LAST - 1];
pic_param->pic_fields.bits.last_ref_frame_sign_bias =
frame_hdr->ref_frame_sign_bias[GST_VP9_REF_FRAME_LAST - 1];
if (frame_hdr->ref_frame_indices[1]) {
pic_param->pic_fields.bits.golden_ref_frame =
frame_hdr->ref_frame_indices[GST_VP9_REF_FRAME_GOLDEN - 1];
pic_param->pic_fields.bits.golden_ref_frame_sign_bias =
frame_hdr->ref_frame_sign_bias[GST_VP9_REF_FRAME_GOLDEN - 1];
pic_param->pic_fields.bits.alt_ref_frame =
frame_hdr->ref_frame_indices[GST_VP9_REF_FRAME_ALTREF - 1];
pic_param->pic_fields.bits.alt_ref_frame_sign_bias =
frame_hdr->ref_frame_sign_bias[GST_VP9_REF_FRAME_ALTREF - 1];
}
pic_param->pic_fields.bits.golden_ref_frame =
frame_hdr->ref_frame_indices[GST_VP9_REF_FRAME_GOLDEN - 1];
pic_param->pic_fields.bits.golden_ref_frame_sign_bias =
frame_hdr->ref_frame_sign_bias[GST_VP9_REF_FRAME_GOLDEN - 1];
pic_param->pic_fields.bits.alt_ref_frame =
frame_hdr->ref_frame_indices[GST_VP9_REF_FRAME_ALTREF - 1];
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] =