0011-hanle-some-extra-profile-for-avc.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- a/omx/gstomxh264utils.c
  2. +++ b/omx/gstomxh264utils.c
  3. @@ -54,6 +54,19 @@
  4. #endif
  5. };
  6. +#ifdef USE_OMX_TARGET_STARFIVE
  7. +static const H264ProfileMapping h264_ext_profiles[] = {
  8. + {"progressive-high",
  9. + (OMX_VIDEO_AVCPROFILETYPE) OMX_VIDEO_AVCProfileHigh},
  10. + {"constrained-high",
  11. + (OMX_VIDEO_AVCPROFILETYPE) OMX_VIDEO_AVCProfileHigh},
  12. + {"high-10-intra",
  13. + (OMX_VIDEO_AVCPROFILETYPE) OMX_VIDEO_AVCProfileHigh10},
  14. + {"high-4:2:2-intra",
  15. + (OMX_VIDEO_AVCPROFILETYPE) OMX_VIDEO_AVCProfileHigh422},
  16. +};
  17. +#endif
  18. +
  19. OMX_VIDEO_AVCPROFILETYPE
  20. gst_omx_h264_utils_get_profile_from_str (const gchar * profile)
  21. {
  22. @@ -63,6 +76,15 @@
  23. if (g_str_equal (profile, h264_profiles[i].profile))
  24. return h264_profiles[i].e;
  25. }
  26. +
  27. +#ifdef USE_OMX_TARGET_STARFIVE
  28. + for (i = 0; i < G_N_ELEMENTS (h264_ext_profiles); i++) {
  29. + if (g_str_equal (profile, h264_ext_profiles[i].profile)) {
  30. + GST_INFO("extra profile: %s ==> avc profie type: %d", profile, h264_ext_profiles[i].e);
  31. + return h264_ext_profiles[i].e;
  32. + }
  33. + }
  34. +#endif
  35. return OMX_VIDEO_AVCProfileMax;
  36. }