h264parse: add constrained and progressive profiles

Those profiles have been added in the version 2012-01
and 2011-06 of the AVC spec.

https://bugzilla.gnome.org/show_bug.cgi?id=794127
This commit is contained in:
Guillaume Desmottes 2018-03-06 15:18:46 +01:00
parent cb1b143b5b
commit 5a5bf4b3e3
2 changed files with 14 additions and 3 deletions

View file

@ -78,9 +78,12 @@ G_BEGIN_DECLS
* @GST_H264_PROFILE_BASELINE: Baseline profile (A.2.1)
* @GST_H264_PROFILE_MAIN: Main profile (A.2.2)
* @GST_H264_PROFILE_EXTENDED: Extended profile (A.2.3)
* @GST_H264_PROFILE_HIGH: High profile (A.2.4)
* @GST_H264_PROFILE_HIGH: High profile (A.2.4),
* or Progressive High profile (A.2.4.1), or Constrained High profile (A.2.4.2)
* depending on constraint_set4_flag and constraint_set5_flag
* @GST_H264_PROFILE_HIGH10: High 10 profile (A.2.5) or High 10 Intra
* profile (A.2.8), depending on constraint_set3_flag
* profile (A.2.8), or Progressive High 10 profile (A.2.5.1) depending on
* constraint_set3_flag and constraint_set4_flag
* @GST_H264_PROFILE_HIGH_422: High 4:2:2 profile (A.2.6) or High
* 4:2:2 Intra profile (A.2.9), depending on constraint_set3_flag
* @GST_H264_PROFILE_HIGH_444: High 4:4:4 Predictive profile (A.2.7)

View file

@ -1629,11 +1629,19 @@ get_profile_string (GstH264SPS * sps)
profile = "extended";
break;
case 100:
profile = "high";
if (sps->constraint_set4_flag) {
if (sps->constraint_set5_flag)
profile = "constrained-high";
else
profile = "progressive-high";
} else
profile = "high";
break;
case 110:
if (sps->constraint_set3_flag)
profile = "high-10-intra";
else if (sps->constraint_set4_flag)
profile = "progressive-high-10";
else
profile = "high-10";
break;