mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 17:05:52 +00:00
qsvh265dec: Add support for HEVC RExt profiles
Adding 4:2:0 high bitdepth and 4:2:2/4:4:4 decoding support Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5706>
This commit is contained in:
parent
0178cc188b
commit
e4729e5784
1 changed files with 51 additions and 2 deletions
|
@ -514,8 +514,7 @@ gst_qsv_h265_dec_register (GstPlugin * plugin, guint rank, guint impl_index,
|
|||
supported_profiles.push_back ("main");
|
||||
supported_formats.push_back ("NV12");
|
||||
|
||||
/* Check other profile/formats */
|
||||
/* TODO: check other profiles too */
|
||||
/* main-10 */
|
||||
gst_qsv_frame_info_set_format (&mfx->FrameInfo, GST_VIDEO_FORMAT_P010_10LE);
|
||||
mfx->CodecProfile = MFX_PROFILE_HEVC_MAIN10;
|
||||
mfx->FrameInfo.Width = GST_ROUND_UP_16 (gst_qsv_resolutions[0].width);
|
||||
|
@ -527,6 +526,56 @@ gst_qsv_h265_dec_register (GstPlugin * plugin, guint rank, guint impl_index,
|
|||
supported_formats.push_back ("P010_10LE");
|
||||
}
|
||||
|
||||
/* main-12 */
|
||||
gst_qsv_frame_info_set_format (&mfx->FrameInfo, GST_VIDEO_FORMAT_P012_LE);
|
||||
mfx->CodecProfile = MFX_PROFILE_HEVC_REXT;
|
||||
if (MFXVideoDECODE_Query (session, ¶m, ¶m) == MFX_ERR_NONE) {
|
||||
supported_profiles.push_back ("main-12");
|
||||
supported_formats.push_back ("P012_LE");
|
||||
}
|
||||
|
||||
/* main-422-{10,12} */
|
||||
gst_qsv_frame_info_set_format (&mfx->FrameInfo, GST_VIDEO_FORMAT_YUY2);
|
||||
mfx->CodecProfile = MFX_PROFILE_HEVC_REXT;
|
||||
if (MFXVideoDECODE_Query (session, ¶m, ¶m) == MFX_ERR_NONE) {
|
||||
gst_qsv_frame_info_set_format (&mfx->FrameInfo, GST_VIDEO_FORMAT_Y210);
|
||||
if (MFXVideoDECODE_Query (session, ¶m, ¶m) == MFX_ERR_NONE) {
|
||||
supported_profiles.push_back ("main-422-10");
|
||||
supported_formats.push_back ("YUY2");
|
||||
supported_formats.push_back ("Y210");
|
||||
|
||||
gst_qsv_frame_info_set_format (&mfx->FrameInfo, GST_VIDEO_FORMAT_Y212_LE);
|
||||
if (MFXVideoDECODE_Query (session, ¶m, ¶m) == MFX_ERR_NONE) {
|
||||
supported_profiles.push_back ("main-422-12");
|
||||
supported_formats.push_back ("Y212_LE");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* main-444 */
|
||||
gst_qsv_frame_info_set_format (&mfx->FrameInfo, GST_VIDEO_FORMAT_VUYA);
|
||||
mfx->CodecProfile = MFX_PROFILE_HEVC_REXT;
|
||||
if (MFXVideoDECODE_Query (session, ¶m, ¶m) == MFX_ERR_NONE) {
|
||||
supported_profiles.push_back ("main-444");
|
||||
supported_formats.push_back ("VUYA");
|
||||
}
|
||||
|
||||
/* main-444-10 */
|
||||
gst_qsv_frame_info_set_format (&mfx->FrameInfo, GST_VIDEO_FORMAT_Y410);
|
||||
mfx->CodecProfile = MFX_PROFILE_HEVC_REXT;
|
||||
if (MFXVideoDECODE_Query (session, ¶m, ¶m) == MFX_ERR_NONE) {
|
||||
supported_profiles.push_back ("main-444-10");
|
||||
supported_formats.push_back ("Y410");
|
||||
}
|
||||
|
||||
/* main-444-12 */
|
||||
gst_qsv_frame_info_set_format (&mfx->FrameInfo, GST_VIDEO_FORMAT_Y412_LE);
|
||||
mfx->CodecProfile = MFX_PROFILE_HEVC_REXT;
|
||||
if (MFXVideoDECODE_Query (session, ¶m, ¶m) == MFX_ERR_NONE) {
|
||||
supported_profiles.push_back ("main-444-12");
|
||||
supported_formats.push_back ("Y412_LE");
|
||||
}
|
||||
|
||||
/* To cover both landscape and portrait,
|
||||
* select max value (width in this case) */
|
||||
guint resolution = MAX (max_resolution.width, max_resolution.height);
|
||||
|
|
Loading…
Reference in a new issue