zynqultrascaleplus: add support for extra AVC levels

The Zynqultrascaleplus has support for extra AVC levels not defined in
the OMX spec as a customer extension.

https://bugzilla.gnome.org/show_bug.cgi?id=790758
This commit is contained in:
Guillaume Desmottes 2017-11-23 15:03:48 +01:00 committed by Olivier Crête
parent 4f91b6f873
commit a4c18ff243
2 changed files with 24 additions and 0 deletions

View file

@ -696,6 +696,20 @@ gst_omx_h264_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
case OMX_VIDEO_AVCLevel51:
level = "5.1";
break;
#ifdef USE_OMX_TARGET_ZYNQ_USCALE_PLUS
case OMX_ALG_VIDEO_AVCLevel52:
level = "5.2";
break;
case OMX_ALG_VIDEO_AVCLevel60:
level = "6.0";
break;
case OMX_ALG_VIDEO_AVCLevel61:
level = "6.1";
break;
case OMX_ALG_VIDEO_AVCLevel62:
level = "6.2";
break;
#endif
default:
g_assert_not_reached ();
gst_caps_unref (caps);

View file

@ -81,6 +81,16 @@ gst_omx_h264_utils_get_level_from_str (const gchar * level)
return OMX_VIDEO_AVCLevel5;
} else if (g_str_equal (level, "5.1")) {
return OMX_VIDEO_AVCLevel51;
#ifdef USE_OMX_TARGET_ZYNQ_USCALE_PLUS
} else if (g_str_equal (level, "5.2")) {
return (OMX_VIDEO_AVCLEVELTYPE) OMX_ALG_VIDEO_AVCLevel52;
} else if (g_str_equal (level, "6.0")) {
return (OMX_VIDEO_AVCLEVELTYPE) OMX_ALG_VIDEO_AVCLevel60;
} else if (g_str_equal (level, "6.1")) {
return (OMX_VIDEO_AVCLEVELTYPE) OMX_ALG_VIDEO_AVCLevel61;
} else if (g_str_equal (level, "6.2")) {
return (OMX_VIDEO_AVCLEVELTYPE) OMX_ALG_VIDEO_AVCLevel62;
#endif
}
return OMX_VIDEO_AVCLevelMax;