Revision 6bacd250

View differences:

ffmpeg.c
106 106
static int frame_rate = 25;
107 107
static int frame_rate_base = 1;
108 108
static float video_qscale = 0;
109
static int video_qmax = 31;
110 109
static int video_lmin = 2*FF_QP2LAMBDA;
111 110
static int video_lmax = 31*FF_QP2LAMBDA;
112 111
static int video_mb_lmin = 2*FF_QP2LAMBDA;
......
2364 2363
    video_lmin = atof(arg)*FF_QP2LAMBDA;
2365 2364
}
2366 2365

  
2367
static void opt_qmax(const char *arg)
2368
{
2369
    video_qmax = atoi(arg);
2370
    if (video_qmax < 1 ||
2371
        video_qmax > 51) {
2372
        fprintf(stderr, "qmax must be >= 1 and <= 51\n");
2373
        exit(1);
2374
    }
2375
}
2376

  
2377 2366
static void opt_mb_lmin(const char *arg)
2378 2367
{
2379 2368
    video_mb_lmin = atof(arg)*FF_QP2LAMBDA;
......
2944 2933
        if(inter_matrix)
2945 2934
            video_enc->inter_matrix = inter_matrix;
2946 2935

  
2947
        video_enc->qmax = video_qmax;
2948 2936
        video_enc->lmin = video_lmin;
2949 2937
        video_enc->lmax = video_lmax;
2950 2938
        video_enc->rc_qsquish = video_qsquish;
......
3880 3868
    { "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" },
3881 3869
    { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" },
3882 3870
    { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixed video quantiser scale (VBR)", "q" },
3883
    { "qmax", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qmax}, "max video quantiser scale (VBR)", "q" },
3884 3871
    { "lmin", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_lmin}, "min video lagrange factor (VBR)", "lambda" },
3885 3872
    { "lmax", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_lmax}, "max video lagrange factor (VBR)", "lambda" },
3886 3873
    { "mblmin", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_mb_lmin}, "min macroblock quantiser scale (VBR)", "q" },
libavcodec/utils.c
505 505
{"qcomp", "video quantiser scale compression (VBR)", OFFSET(qcompress), FF_OPT_TYPE_FLOAT, 0.5, FLT_MIN, FLT_MAX, V|E},
506 506
{"qblur", "video quantiser scale blur (VBR)", OFFSET(qblur), FF_OPT_TYPE_FLOAT, 0.5, FLT_MIN, FLT_MAX, V|E},
507 507
{"qmin", "min video quantiser scale (VBR)", OFFSET(qmin), FF_OPT_TYPE_INT, 2, 1, 51, V|E},
508
{"qmax", "max video quantiser scale (VBR)", OFFSET(qmax), FF_OPT_TYPE_INT, 31, 0, INT_MAX, V|E},
508
{"qmax", "max video quantiser scale (VBR)", OFFSET(qmax), FF_OPT_TYPE_INT, 31, 1, 51, V|E},
509 509
{"qdiff", "max difference between the quantiser scale (VBR)", OFFSET(max_qdiff), FF_OPT_TYPE_INT, 3, INT_MIN, INT_MAX, V|E},
510 510
{"bf", "use 'frames' B frames", OFFSET(max_b_frames), FF_OPT_TYPE_INT, DEFAULT, 0, FF_MAX_B_FRAMES, V|E},
511 511
{"b_qfactor", "qp factor between p and b frames", OFFSET(b_quant_factor), FF_OPT_TYPE_FLOAT, 1.25, FLT_MIN, FLT_MAX, V|E},

Also available in: Unified diff