mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
mpeg4: fix VOP coding type of backward reference pictures.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
60b5c2da97
commit
bf9f77b1af
1 changed files with 7 additions and 1 deletions
|
@ -587,6 +587,12 @@ decode_picture(GstVaapiDecoderMpeg4 *decoder, const guint8 *buf, guint buf_size)
|
|||
return status;
|
||||
}
|
||||
|
||||
static inline guint
|
||||
get_vop_coding_type(GstVaapiPicture *picture)
|
||||
{
|
||||
return picture->type - GST_VAAPI_PICTURE_TYPE_I;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fill_picture(GstVaapiDecoderMpeg4 *decoder, GstVaapiPicture *picture)
|
||||
{
|
||||
|
@ -666,7 +672,7 @@ fill_picture(GstVaapiDecoderMpeg4 *decoder, GstVaapiPicture *picture)
|
|||
case GST_MPEG4_B_VOP:
|
||||
pic_param->TRB = priv->trb;
|
||||
pic_param->backward_reference_picture = priv->next_picture->surface_id;
|
||||
pic_param->vop_fields.bits.backward_reference_vop_coding_type = priv->prev_picture->type;
|
||||
pic_param->vop_fields.bits.backward_reference_vop_coding_type = get_vop_coding_type(priv->prev_picture);
|
||||
// fall-through
|
||||
case GST_MPEG4_P_VOP:
|
||||
pic_param->TRD = priv->trd;
|
||||
|
|
Loading…
Reference in a new issue