Commit 43792a1b authored by Anton Mitrofanov's avatar Anton Mitrofanov Committed by Fiona Glaser

Don't allow baseline profile streams with fake-interlaced

Indicate use of --fake-interlaced in encoding options SEI.
parent 317001c6
......@@ -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 );
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment