utils: add new H.264 profiles.

Add "Constrained Baseline Profile" and "High 10 Profile" definitions
and helper functiions.
This commit is contained in:
Gwenole Beauchesne 2013-12-06 17:34:52 +01:00
parent 47dee4db96
commit 7f1f879e28
3 changed files with 16 additions and 0 deletions

View file

@ -80,6 +80,12 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
{ GST_VAAPI_PROFILE_H264_BASELINE, VAProfileH264Baseline,
"video/x-h264", "baseline"
},
#if VA_CHECK_VERSION(0,31,1)
{ GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE,
VAProfileH264ConstrainedBaseline,
"video/x-h264", "constrained-baseline"
},
#endif
{ GST_VAAPI_PROFILE_H264_MAIN, VAProfileH264Main,
"video/x-h264", "main"
},

View file

@ -112,8 +112,11 @@ typedef enum {
GST_VAAPI_PROFILE_MPEG4_MAIN = GST_VAAPI_MAKE_PROFILE(MPEG4,3),
GST_VAAPI_PROFILE_H263_BASELINE = GST_VAAPI_MAKE_PROFILE(H263,1),
GST_VAAPI_PROFILE_H264_BASELINE = GST_VAAPI_MAKE_PROFILE(H264,1),
GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE =
GST_VAAPI_MAKE_PROFILE(H264,9),
GST_VAAPI_PROFILE_H264_MAIN = GST_VAAPI_MAKE_PROFILE(H264,2),
GST_VAAPI_PROFILE_H264_HIGH = GST_VAAPI_MAKE_PROFILE(H264,3),
GST_VAAPI_PROFILE_H264_HIGH10 = GST_VAAPI_MAKE_PROFILE(H264,7),
GST_VAAPI_PROFILE_VC1_SIMPLE = GST_VAAPI_MAKE_PROFILE(VC1,1),
GST_VAAPI_PROFILE_VC1_MAIN = GST_VAAPI_MAKE_PROFILE(VC1,2),
GST_VAAPI_PROFILE_VC1_ADVANCED = GST_VAAPI_MAKE_PROFILE(VC1,3),

View file

@ -40,6 +40,9 @@ gst_vaapi_utils_h264_get_profile (guint8 profile_idc)
case GST_H264_PROFILE_HIGH:
profile = GST_VAAPI_PROFILE_H264_HIGH;
break;
case GST_H264_PROFILE_HIGH10:
profile = GST_VAAPI_PROFILE_H264_HIGH10;
break;
default:
g_assert (0 && "unsupported profile_idc value");
profile = GST_VAAPI_PROFILE_UNKNOWN;
@ -56,6 +59,7 @@ gst_vaapi_utils_h264_get_profile_idc (GstVaapiProfile profile)
switch (profile) {
case GST_VAAPI_PROFILE_H264_BASELINE:
case GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE:
profile_idc = GST_H264_PROFILE_BASELINE;
break;
case GST_VAAPI_PROFILE_H264_MAIN:
@ -64,6 +68,9 @@ gst_vaapi_utils_h264_get_profile_idc (GstVaapiProfile profile)
case GST_VAAPI_PROFILE_H264_HIGH:
profile_idc = GST_H264_PROFILE_HIGH;
break;
case GST_VAAPI_PROFILE_H264_HIGH10:
profile_idc = GST_H264_PROFILE_HIGH10;
break;
default:
g_assert (0 && "unsupported GstVaapiProfile value");
profile_idc = 0;