"\n"
" -h, --help Print this help\n"
"\n"
- " -I, --idrframe <integer> Each 'number' I frames are IDR frames [%d]\n"
- " -i, --iframe <integer> Max interval between I frames [%d]\n"
+ " -I, --keyint <integer > Maximum GOP size [%d]\n"
+ " -i, --min-keyint <integer> Minimum GOP size [%d]\n"
" --scenecut <integer> How aggresively to insert extra I frames [%d]\n"
" -b, --bframe <integer> Number of B-frames between I and P [%d]\n"
+ " --no-b-adapt Disable adaptive B-frame decision\n"
+ " --b-bias <integer> Influences how often B-frames are used [%d]\n"
"\n"
" -c, --cabac Enable CABAC\n"
" -r, --ref <integer> Number of reference frames [%d]\n"
" - none, all\n"
" --direct <string> Direct MV prediction mode [\"temporal\"]\n"
" - none, spatial, temporal\n"
+ " -w, --weightb Weighted prediction for B-frames\n"
" -m, --subme <integer> Subpixel motion estimation quality: 1=fast, 5=best. [%d]\n"
"\n"
+ " --level <integer> Specify IDC level\n"
" -s, --sar width:height Specify Sample Aspect Ratio\n"
" --fps <float|rational> Specify framerate\n"
" --frames <integer> Maximum number of frames to encode\n"
" -v, --verbose Print stats for each frame\n"
"\n",
X264_BUILD,
- defaults->i_idrframe,
- defaults->i_iframe,
+ defaults->i_keyint_max,
+ defaults->i_keyint_min,
defaults->i_scenecut_threshold,
defaults->i_bframe,
+ defaults->i_bframe_bias,
defaults->i_frame_reference,
defaults->i_deblocking_filter_alphac0,
defaults->rc.i_qp_constant,
#define OPT_FRAMES 273
#define OPT_FPS 274
#define OPT_DIRECT 275
+#define OPT_LEVEL 276
+#define OPT_NOBADAPT 277
+#define OPT_BBIAS 278
static struct option long_options[] =
{
{ "help", no_argument, NULL, 'h' },
{ "bitrate", required_argument, NULL, 'B' },
{ "bframe", required_argument, NULL, 'b' },
- { "iframe", required_argument, NULL, 'i' },
- { "idrframe",required_argument, NULL, 'I' },
+ { "no-b-adapt", no_argument, NULL, OPT_NOBADAPT },
+ { "b-bias", required_argument, NULL, OPT_BBIAS },
+ { "min-keyint",required_argument,NULL,'i' },
+ { "keyint", required_argument, NULL, 'I' },
{ "scenecut",required_argument, NULL, OPT_SCENECUT },
{ "nf", no_argument, NULL, 'n' },
{ "filter", required_argument, NULL, 'f' },
{ "output", required_argument, NULL, 'o' },
{ "analyse", required_argument, NULL, 'A' },
{ "direct", required_argument, NULL, OPT_DIRECT },
+ { "weightb", no_argument, NULL, 'w' },
{ "subme", required_argument, NULL, 'm' },
+ { "level", required_argument, NULL, OPT_LEVEL },
{ "rcsens", required_argument, NULL, OPT_RCSENS },
{ "rcbuf", required_argument, NULL, OPT_RCBUF },
{ "rcinitbuf",required_argument,NULL, OPT_RCIBUF },
int c;
- c = getopt_long( argc, argv, "hi:I:b:r:cxB:q:nf:o:s:A:m:p:v",
+ c = getopt_long( argc, argv, "hi:I:b:r:cxB:q:nf:o:s:A:m:p:vw",
long_options, &long_options_index);
if( c == -1 )
case 'b':
param->i_bframe = atol( optarg );
break;
+ case OPT_NOBADAPT:
+ param->b_bframe_adaptive = 0;
+ break;
+ case OPT_BBIAS:
+ param->i_bframe_bias = atol( optarg );
+ break;
case 'i':
- param->i_iframe = atol( optarg );
+ param->i_keyint_min = atol( optarg );
break;
case 'I':
- param->i_idrframe = atol( optarg );
+ param->i_keyint_max = atol( optarg );
break;
case OPT_SCENECUT:
param->i_scenecut_threshold = atol( optarg );
case 'A':
param->analyse.inter = 0;
if( strstr( optarg, "none" ) ) param->analyse.inter = 0x000000;
- if( strstr( optarg, "all" ) ) param->analyse.inter = X264_ANALYSE_I4x4|X264_ANALYSE_PSUB16x16|X264_ANALYSE_PSUB8x8;
+ if( strstr( optarg, "all" ) ) param->analyse.inter = X264_ANALYSE_I4x4|X264_ANALYSE_PSUB16x16|X264_ANALYSE_PSUB8x8|X264_ANALYSE_BSUB16x16;
if( strstr( optarg, "i4x4" ) ) param->analyse.inter |= X264_ANALYSE_I4x4;
if( strstr( optarg, "psub16x16" ) ) param->analyse.inter |= X264_ANALYSE_PSUB16x16;
else
param->analyse.i_direct_mv_pred = atoi( optarg );
break;
+ case 'w':
+ param->analyse.b_weighted_bipred = 1;
+ break;
case 'm':
param->analyse.i_subpel_refine = atoi(optarg);
break;
+ case OPT_LEVEL:
+ param->i_level_idc = atoi(optarg);
+ break;
case OPT_RCBUF:
param->rc.i_rc_buffer_size = atoi(optarg);
break;
param->rc.b_stat_write = 1;
else if( i_pass == 2 )
param->rc.b_stat_read = 1;
- else if( i_pass > 2 ) /* XXX untested */
+ else if( i_pass > 2 )
param->rc.b_stat_read =
param->rc.b_stat_write = 1;
break;
/* Do not force any parameters */
pic.i_type = X264_TYPE_AUTO;
- if( x264_encoder_encode( h, &nal, &i_nal, &pic ) < 0 )
+ if( x264_encoder_encode( h, &nal, &i_nal, &pic, &pic ) < 0 )
{
fprintf( stderr, "x264_encoder_encode failed\n" );
}