sps->i_profile_idc = PROFILE_MAIN;
else
sps->i_profile_idc = PROFILE_BASELINE;
+ sps->i_level_idc = param->i_level_idc;
- /* FIXME: level 4.0 is sufficient for 720x576 with 16 reference frames,
- * but this should be adjustable */
- sps->i_level_idc = 40;
sps->b_constraint_set0 = 0;
sps->b_constraint_set1 = 0;
sps->b_constraint_set2 = 0;
}
else
{
- bs_write( s, 8, 255); /* aspect_ration_idc (extented) */
+ bs_write( s, 8, 255); /* aspect_ratio_idc (extented) */
bs_write( s, 16, sps->vui.i_sar_width );
bs_write( s, 16, sps->vui.i_sar_height );
}
" - none, spatial, temporal\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"
#define OPT_FRAMES 273
#define OPT_FPS 274
#define OPT_DIRECT 275
+#define OPT_LEVEL 276
static struct option long_options[] =
{
{ "analyse", required_argument, NULL, 'A' },
{ "direct", required_argument, NULL, OPT_DIRECT },
{ "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 },
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;