Commit 01051e7d authored by Haihao Xiang's avatar Haihao Xiang

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.
parent 5b0247db
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment