[x264-devel] commit: Don't allow baseline profile streams with fake-interlaced ( Anton Mitrofanov )

git at videolan.org git at videolan.org
Tue Jun 15 10:48:25 CEST 2010


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Sun Jun 13 23:14:15 2010 +0400| [be94782b89292c6a5a274a9e874723e10497ba1c] | committer: Jason Garrett-Glaser 

Don't allow baseline profile streams with fake-interlaced
Indicate use of --fake-interlaced in encoding options SEI.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=be94782b89292c6a5a274a9e874723e10497ba1c
---

 common/common.c |    7 +++++--
 encoder/set.c   |    4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/common/common.c b/common/common.c
index 97daf52..4fa5e4b 100644
--- a/common/common.c
+++ b/common/common.c
@@ -428,7 +428,10 @@ int x264_param_apply_profile( x264_param_t *param, const char *profile )
             return -1;
         }
         if( param->b_fake_interlaced )
-            x264_log( NULL, X264_LOG_WARNING, "baseline profile doesn't support fake interlacing\n" );
+        {
+            x264_log( NULL, X264_LOG_ERROR, "baseline profile doesn't support fake interlacing\n" );
+            return -1;
+        }
     }
     else if( !strcasecmp( profile, "main" ) )
     {
@@ -1176,7 +1179,7 @@ char *x264_param2string( x264_param_t *p, int b_res )
         s += sprintf( s, " slice_max_mbs=%d", p->i_slice_max_mbs );
     s += sprintf( s, " nr=%d", p->analyse.i_noise_reduction );
     s += sprintf( s, " decimate=%d", p->analyse.b_dct_decimate );
-    s += sprintf( s, " interlaced=%s", p->b_interlaced ? p->b_tff ? "tff" : "bff" : "0" );
+    s += sprintf( s, " interlaced=%s", p->b_interlaced ? p->b_tff ? "tff" : "bff" : p->b_fake_interlaced ? "fake" : "0" );
 
     s += sprintf( s, " constrained_intra=%d", p->b_constrained_intra );
 
diff --git a/encoder/set.c b/encoder/set.c
index 28de4b5..86b4a30 100644
--- a/encoder/set.c
+++ b/encoder/set.c
@@ -105,7 +105,7 @@ void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
         sps->i_profile_idc  = PROFILE_HIGH444_PREDICTIVE;
     else if( param->analyse.b_transform_8x8 || param->i_cqm_preset != X264_CQM_FLAT )
         sps->i_profile_idc  = PROFILE_HIGH;
-    else if( param->b_cabac || param->i_bframe > 0 || param->b_interlaced || param->analyse.i_weighted_pred > 0 )
+    else if( param->b_cabac || param->i_bframe > 0 || param->b_interlaced || param->b_fake_interlaced || param->analyse.i_weighted_pred > 0 )
         sps->i_profile_idc  = PROFILE_MAIN;
     else
         sps->i_profile_idc  = PROFILE_BASELINE;
@@ -149,7 +149,7 @@ void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
     sps->b_gaps_in_frame_num_value_allowed = 0;
     sps->i_mb_width = ( param->i_width + 15 ) / 16;
     sps->i_mb_height= ( param->i_height + 15 ) / 16;
-    sps->b_frame_mbs_only = param->b_interlaced ? 0 : !param->b_fake_interlaced;
+    sps->b_frame_mbs_only = !(param->b_interlaced || param->b_fake_interlaced);
     if( !sps->b_frame_mbs_only )
         sps->i_mb_height = ( sps->i_mb_height + 1 ) & ~1;
     sps->b_mb_adaptive_frame_field = param->b_interlaced;



More information about the x264-devel mailing list