Revision 6bacd250 ffmpeg.c

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" },

Also available in: Unified diff