if( h->param.rc.f_complexity_blur < 0 )
h->param.rc.f_complexity_blur = 0;
+ h->param.i_sps_id &= 31;
+
/* ensure the booleans are 0 or 1 so they can be used in math */
#define BOOLIFY(x) h->param.x = !!h->param.x
BOOLIFY( b_cabac );
h->i_idr_pic_id = 0;
h->sps = &h->sps_array[0];
- x264_sps_init( h->sps, 0, &h->param );
+ x264_sps_init( h->sps, h->param.i_sps_id, &h->param );
h->pps = &h->pps_array[0];
- x264_pps_init( h->pps, 0, &h->param, h->sps);
+ x264_pps_init( h->pps, h->param.i_sps_id, &h->param, h->sps);
x264_validate_levels( h );
" -v, --verbose Print stats for each frame\n"
" --progress Show a progress indicator while encoding\n"
" --visualize Show MB types overlayed on the encoded video\n"
+ " --sps-id <integer> Set SPS and PPS id numbers [%d]\n"
" --aud Use access unit delimiters\n"
"\n",
X264_BUILD, X264_VERSION,
strtable_lookup( colorprim_str, defaults->vui.i_colorprim ),
strtable_lookup( transfer_str, defaults->vui.i_transfer ),
strtable_lookup( colmatrix_str, defaults->vui.i_colmatrix ),
- defaults->vui.i_chroma_loc
+ defaults->vui.i_chroma_loc,
+ defaults->i_sps_id
);
}
#define OPT_NR 319
#define OPT_THREAD_INPUT 320
#define OPT_NO_DCT_DECIMATE 321
+#define OPT_SPS_ID 322
static struct option long_options[] =
{
{ "verbose", no_argument, NULL, 'v' },
{ "progress",no_argument, NULL, OPT_PROGRESS },
{ "visualize",no_argument, NULL, OPT_VISUALIZE },
+ { "sps-id", required_argument, NULL, OPT_SPS_ID },
{ "aud", no_argument, NULL, OPT_AUD },
{ "nr", required_argument, NULL, OPT_NR },
{ "cqm", required_argument, NULL, OPT_CQM },
case 'v':
param->i_log_level = X264_LOG_DEBUG;
break;
+ case OPT_SPS_ID:
+ param->i_sps_id = atoi(optarg);
+ break;
case OPT_AUD:
param->b_aud = 1;
break;