]> granicus.if.org Git - libx264/commitdiff
Revert r2959: Signal Progressive and Constrained profiles
authorAnton Mitrofanov <BugMaster@narod.ru>
Mon, 8 Jul 2019 12:46:56 +0000 (15:46 +0300)
committerAnton Mitrofanov <BugMaster@narod.ru>
Wed, 17 Jul 2019 17:15:34 +0000 (20:15 +0300)
Some hardware decoders reject to decode streams with non-zero
constraint_set4_flag/constraint_set5_flag.

common/set.h
encoder/encoder.c
encoder/set.c

index c78aecc57fbb0ee6b54fd339eb2c31827b073a5a..a8da8e875e7cbd8bbf4ccdaaadde18cc9998becf 100644 (file)
@@ -53,8 +53,6 @@ typedef struct
     int b_constraint_set1;
     int b_constraint_set2;
     int b_constraint_set3;
-    int b_constraint_set4;
-    int b_constraint_set5;
 
     int i_log2_max_frame_num;
 
index 467ceb141f87aed50a95fd7b570ab21861d92a04..2dff81d9ae16659f6ae4f81ed25a848c5cc35c60 100644 (file)
@@ -1757,10 +1757,9 @@ x264_t *x264_encoder_open( x264_param_t *param )
 
     const char *profile = h->sps->i_profile_idc == PROFILE_BASELINE ? "Constrained Baseline" :
                           h->sps->i_profile_idc == PROFILE_MAIN ? "Main" :
-                          h->sps->i_profile_idc == PROFILE_HIGH ?
-                              (h->sps->b_constraint_set4 ? (h->sps->b_constraint_set5 ? "Constrained High" : "Progressive High") : "High") :
+                          h->sps->i_profile_idc == PROFILE_HIGH ? "High" :
                           h->sps->i_profile_idc == PROFILE_HIGH10 ?
-                              (h->sps->b_constraint_set3 ? "High 10 Intra" : (h->sps->b_constraint_set4 ? "Progressive High 10" : "High 10")) :
+                              (h->sps->b_constraint_set3 ? "High 10 Intra" : "High 10") :
                           h->sps->i_profile_idc == PROFILE_HIGH422 ?
                               (h->sps->b_constraint_set3 ? "High 4:2:2 Intra" : "High 4:2:2") :
                           h->sps->b_constraint_set3 ? "High 4:4:4 Intra" : "High 4:4:4 Predictive";
index ef35be559bc5bb0c1b529e6823d10e356a89cf69..b8e35b2381e3122ecda511b7f61ef32d28f89b67 100644 (file)
@@ -133,8 +133,6 @@ void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
     /* Never set constraint_set2, it is not necessary and not used in real world. */
     sps->b_constraint_set2  = 0;
     sps->b_constraint_set3  = 0;
-    sps->b_constraint_set4  = sps->i_profile_idc >= PROFILE_MAIN && sps->i_profile_idc <= PROFILE_HIGH10 && sps->b_frame_mbs_only;
-    sps->b_constraint_set5  = (sps->i_profile_idc == PROFILE_MAIN || sps->i_profile_idc == PROFILE_HIGH) && param->i_bframe == 0;
 
     sps->i_level_idc = param->i_level_idc;
     if( param->i_level_idc == 9 && ( sps->i_profile_idc == PROFILE_BASELINE || sps->i_profile_idc == PROFILE_MAIN ) )
@@ -311,10 +309,8 @@ void x264_sps_write( bs_t *s, x264_sps_t *sps )
     bs_write1( s, sps->b_constraint_set1 );
     bs_write1( s, sps->b_constraint_set2 );
     bs_write1( s, sps->b_constraint_set3 );
-    bs_write1( s, sps->b_constraint_set4 );
-    bs_write1( s, sps->b_constraint_set5 );
 
-    bs_write( s, 2, 0 );    /* reserved */
+    bs_write( s, 4, 0 );    /* reserved */
 
     bs_write( s, 8, sps->i_level_idc );