h264: Add progressive and constrained high profiles

Message ID f46c5eb0-dd21-ca08-4ea8-77d4977cfd19@jkqxz.net
State New
Headers show

Commit Message

Mark Thompson Oct. 10, 2016, 8:22 p.m.
---
On 10/10/16 21:00, Luca Barbato wrote:
> On 10/10/2016 21:43, Mark Thompson wrote:
>> No, constrained high is high|set4|set5.  Maybe it needs some new FF_PROFILE_H264 flags - *_PROGRESSIVE and *_NO_B_SLICES, or something?
> 
> I guess, do you have time to get the right combination in?

Something like this?


 libavcodec/avcodec.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Luca Barbato Oct. 10, 2016, 8:39 p.m. | #1
On 10/10/2016 22:22, Mark Thompson wrote:
> ---
> On 10/10/16 21:00, Luca Barbato wrote:
>> On 10/10/2016 21:43, Mark Thompson wrote:
>>> No, constrained high is high|set4|set5.  Maybe it needs some new FF_PROFILE_H264 flags - *_PROGRESSIVE and *_NO_B_SLICES, or something?
>>
>> I guess, do you have time to get the right combination in?
> 
> Something like this?
> 

Sounds good.

Patch

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 167525d..5cffa0a 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2913,12 +2913,17 @@  typedef struct AVCodecContext {

 #define FF_PROFILE_H264_CONSTRAINED  (1<<9)  // 8+1; constraint_set1_flag
 #define FF_PROFILE_H264_INTRA        (1<<11) // 8+3; constraint_set3_flag
+#define FF_PROFILE_H264_PROGRESSIVE  (1<<12) // 8+4; constraint_set4_flag
+#define FF_PROFILE_H264_NO_B_SLICES  (1<<13) // 8+5; constraint_set5_flag

 #define FF_PROFILE_H264_BASELINE             66
 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
 #define FF_PROFILE_H264_MAIN                 77
 #define FF_PROFILE_H264_EXTENDED             88
 #define FF_PROFILE_H264_HIGH                 100
+#define FF_PROFILE_H264_PROGRESSIVE_HIGH     (100|FF_PROFILE_H264_PROGRESSIVE)
+#define FF_PROFILE_H264_CONSTRAINED_HIGH     (100|FF_PROFILE_H264_PROGRESSIVE|\
+                                                  FF_PROFILE_H264_NO_B_SLICES)
 #define FF_PROFILE_H264_HIGH_10              110
 #define FF_PROFILE_H264_HIGH_10_INTRA        (110|FF_PROFILE_H264_INTRA)
 #define FF_PROFILE_H264_MULTIVIEW_HIGH       118