Commit d447c2d3 authored by Loren Merritt's avatar Loren Merritt
Browse files

allow --level to understand names in addition to idc



git-svn-id: svn://svn.videolan.org/x264/trunk@363 df754926-b1dd-0310-bc7b-ec298dee348c
parent 87e59947
......@@ -477,7 +477,7 @@ void x264_sei_version_write( bs_t *s )
const x264_level_t x264_levels[] =
{
{ 10, 1485, 99, 152064, 64, 175, 64, 64, 0, 0, 0, 1 },
{ 9, 1485, 99, 152064, 128, 350, 64, 64, 0, 0, 0, 1 },
// {"1b", 1485, 99, 152064, 128, 350, 64, 64, 0, 0, 0, 1 },
{ 11, 3000, 396, 345600, 192, 500, 128, 64, 0, 0, 0, 1 },
{ 12, 6000, 396, 912384, 384, 1000, 128, 64, 0, 0, 0, 1 },
{ 13, 11880, 396, 912384, 768, 2000, 128, 64, 0, 0, 0, 1 },
......
......@@ -298,7 +298,7 @@ static void Help( x264_param_t *defaults )
"\n"
"Input/Output:\n"
"\n"
" --level <integer> Specify level (as defined by Annex A)\n"
" --level <string> Specify level (as defined by Annex A)\n"
" --fps <float|rational> Specify framerate\n"
" --seek <integer> First frame to encode\n"
" --frames <integer> Maximum number of frames to encode\n"
......@@ -743,7 +743,10 @@ static int Parse( int argc, char **argv,
param->analyse.i_trellis = atoi(optarg);
break;
case OPT_LEVEL:
param->i_level_idc = atoi(optarg);
if( atof(optarg) < 6 )
param->i_level_idc = (int)(10*atof(optarg)+.5);
else
param->i_level_idc = atoi(optarg);
break;
case OPT_RATETOL:
param->rc.f_rate_tolerance = !strncmp("inf", optarg, 3) ? 1e9 : atof(optarg);
......
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