mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
msdkdec: Update frame info from video parameters
A 10bit stream may have different depth values for Luma and Chroma, and MSDK requires the frame info must match the corresponding video parameters
This commit is contained in:
parent
68057cee98
commit
ef81c9d6c4
3 changed files with 15 additions and 0 deletions
|
@ -205,6 +205,8 @@ get_surface (GstMsdkDec * thiz, GstBuffer * buffer)
|
|||
goto failed_unref_buffer2;
|
||||
}
|
||||
|
||||
gst_msdk_update_mfx_frame_info_from_mfx_video_param (&i->surface->Info,
|
||||
&thiz->param);
|
||||
thiz->decoded_msdk_surfaces = g_list_append (thiz->decoded_msdk_surfaces, i);
|
||||
return i;
|
||||
|
||||
|
|
|
@ -377,3 +377,12 @@ gst_msdk_get_video_format_from_mfx_fourcc (mfxU32 fourcc)
|
|||
|
||||
return GST_VIDEO_FORMAT_UNKNOWN;
|
||||
}
|
||||
|
||||
void
|
||||
gst_msdk_update_mfx_frame_info_from_mfx_video_param (mfxFrameInfo * mfx_info,
|
||||
mfxVideoParam * param)
|
||||
{
|
||||
mfx_info->BitDepthLuma = param->mfx.FrameInfo.BitDepthLuma;
|
||||
mfx_info->BitDepthChroma = param->mfx.FrameInfo.BitDepthChroma;
|
||||
mfx_info->Shift = param->mfx.FrameInfo.Shift;
|
||||
}
|
||||
|
|
|
@ -74,6 +74,10 @@ gst_msdk_get_surface_from_buffer (GstBuffer * buf);
|
|||
GstVideoFormat
|
||||
gst_msdk_get_video_format_from_mfx_fourcc (mfxU32 fourcc);
|
||||
|
||||
void
|
||||
gst_msdk_update_mfx_frame_info_from_mfx_video_param (mfxFrameInfo * mfx_info,
|
||||
mfxVideoParam * param);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __MSDK_H__ */
|
||||
|
|
Loading…
Reference in a new issue