mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
msdkdec: don't set unknown picture struct to progressive for vc1
MFXVideoDECODE_DecodeHeader only parses the sequence layer for VC1, so the structure is unknown for a stream with interlace flag set in the sequence layer. If forcing the struct to progressive in this plugin, MediaSDK will fail to decode such streams.
This commit is contained in:
parent
5b0247db33
commit
01051e7dfd
4 changed files with 13 additions and 5 deletions
|
@ -319,9 +319,6 @@ gst_msdkdec_init_decoder (GstMsdkDec * thiz)
|
|||
thiz->param.mfx.FrameInfo.AspectRatioH = info->par_d;
|
||||
}
|
||||
|
||||
thiz->param.mfx.FrameInfo.PicStruct =
|
||||
thiz->param.mfx.FrameInfo.PicStruct ? thiz->param.mfx.
|
||||
FrameInfo.PicStruct : MFX_PICSTRUCT_PROGRESSIVE;
|
||||
thiz->param.mfx.FrameInfo.FourCC =
|
||||
thiz->param.mfx.FrameInfo.FourCC ? thiz->param.mfx.
|
||||
FrameInfo.FourCC : MFX_FOURCC_NV12;
|
||||
|
@ -1468,6 +1465,10 @@ gst_msdkdec_preinit_decoder (GstMsdkDec * decoder)
|
|||
decoder->param.mfx.FrameInfo.Height =
|
||||
GST_ROUND_UP_32 (decoder->param.mfx.FrameInfo.Height);
|
||||
|
||||
decoder->param.mfx.FrameInfo.PicStruct =
|
||||
decoder->param.mfx.FrameInfo.PicStruct ? decoder->param.mfx.
|
||||
FrameInfo.PicStruct : MFX_PICSTRUCT_PROGRESSIVE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,8 +108,7 @@ struct _GstMsdkDecClass
|
|||
|
||||
gboolean (*configure) (GstMsdkDec * decoder);
|
||||
|
||||
/* reset mfx parameters per codec, currently it is only used for
|
||||
* the alignment exception for frame width and height */
|
||||
/* reset mfx parameters per codec */
|
||||
gboolean (*preinit_decoder) (GstMsdkDec * decoder);
|
||||
};
|
||||
|
||||
|
|
|
@ -140,6 +140,10 @@ gst_msdkvp8dec_preinit_decoder (GstMsdkDec * decoder)
|
|||
decoder->param.mfx.FrameInfo.Height =
|
||||
GST_ROUND_UP_16 (decoder->param.mfx.FrameInfo.Height);
|
||||
|
||||
decoder->param.mfx.FrameInfo.PicStruct =
|
||||
decoder->param.mfx.FrameInfo.PicStruct ? decoder->param.mfx.
|
||||
FrameInfo.PicStruct : MFX_PICSTRUCT_PROGRESSIVE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -156,6 +156,10 @@ gst_msdkvp9dec_preinit_decoder (GstMsdkDec * decoder)
|
|||
decoder->param.mfx.FrameInfo.Height =
|
||||
GST_ROUND_UP_16 (decoder->param.mfx.FrameInfo.Height);
|
||||
|
||||
decoder->param.mfx.FrameInfo.PicStruct =
|
||||
decoder->param.mfx.FrameInfo.PicStruct ? decoder->param.mfx.
|
||||
FrameInfo.PicStruct : MFX_PICSTRUCT_PROGRESSIVE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue