From 951fcfe90a52f34edad69f1bcfca6e59dba24370 Mon Sep 17 00:00:00 2001 From: "sw.multimedia" Date: Fri, 6 May 2022 18:35:00 +0800 Subject: [PATCH] gst-omx: hanle some extra profile about avc. Signed-off-by: sw.multimedia (cherry picked from http://192.168.110.45/jh7100/buildroot/-/commit/39f08c81f5a05ad0b06a95c4a3599602641c07af) --- ...011-hanle-some-extra-profile-for-avc.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 package/starfive/sf-gst-omx/0011-hanle-some-extra-profile-for-avc.patch diff --git a/package/starfive/sf-gst-omx/0011-hanle-some-extra-profile-for-avc.patch b/package/starfive/sf-gst-omx/0011-hanle-some-extra-profile-for-avc.patch new file mode 100644 index 00000000..c9916ed4 --- /dev/null +++ b/package/starfive/sf-gst-omx/0011-hanle-some-extra-profile-for-avc.patch @@ -0,0 +1,38 @@ +--- a/omx/gstomxh264utils.c ++++ b/omx/gstomxh264utils.c +@@ -54,6 +54,19 @@ + #endif + }; + ++#ifdef USE_OMX_TARGET_STARFIVE ++static const H264ProfileMapping h264_ext_profiles[] = { ++ {"progressive-high", ++ (OMX_VIDEO_AVCPROFILETYPE) OMX_VIDEO_AVCProfileHigh}, ++ {"constrained-high", ++ (OMX_VIDEO_AVCPROFILETYPE) OMX_VIDEO_AVCProfileHigh}, ++ {"high-10-intra", ++ (OMX_VIDEO_AVCPROFILETYPE) OMX_VIDEO_AVCProfileHigh10}, ++ {"high-4:2:2-intra", ++ (OMX_VIDEO_AVCPROFILETYPE) OMX_VIDEO_AVCProfileHigh422}, ++}; ++#endif ++ + OMX_VIDEO_AVCPROFILETYPE + gst_omx_h264_utils_get_profile_from_str (const gchar * profile) + { +@@ -63,6 +76,15 @@ + if (g_str_equal (profile, h264_profiles[i].profile)) + return h264_profiles[i].e; + } ++ ++#ifdef USE_OMX_TARGET_STARFIVE ++ for (i = 0; i < G_N_ELEMENTS (h264_ext_profiles); i++) { ++ if (g_str_equal (profile, h264_ext_profiles[i].profile)) { ++ GST_INFO("extra profile: %s ==> avc profie type: %d", profile, h264_ext_profiles[i].e); ++ return h264_ext_profiles[i].e; ++ } ++ } ++#endif + + return OMX_VIDEO_AVCProfileMax; + }