Revision 58bba31e

View differences:

ffmpeg.c
111 111
static int video_mb_lmin = 2*FF_QP2LAMBDA;
112 112
static int video_mb_lmax = 31*FF_QP2LAMBDA;
113 113
static int video_qdiff = 3;
114
static float video_qsquish = 0.0;
115 114
static uint16_t *intra_matrix = NULL;
116 115
static uint16_t *inter_matrix = NULL;
117 116
#if 0 //experimental, (can be removed)
......
2343 2342
    }
2344 2343
}
2345 2344

  
2346
static void opt_qsquish(const char *arg)
2347
{
2348
    video_qsquish = atof(arg);
2349
    if (video_qsquish < 0.0 ||
2350
        video_qsquish > 99.0) {
2351
        fprintf(stderr, "qsquish must be >= 0.0 and <= 99.0\n");
2352
        exit(1);
2353
    }
2354
}
2355

  
2356 2345
static void opt_lmax(const char *arg)
2357 2346
{
2358 2347
    video_lmax = atof(arg)*FF_QP2LAMBDA;
......
2935 2924

  
2936 2925
        video_enc->lmin = video_lmin;
2937 2926
        video_enc->lmax = video_lmax;
2938
        video_enc->rc_qsquish = video_qsquish;
2939 2927
        video_enc->mb_lmin = video_mb_lmin;
2940 2928
        video_enc->mb_lmax = video_mb_lmax;
2941 2929
        video_enc->max_qdiff = video_qdiff;
......
3873 3861
    { "mblmin", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_mb_lmin}, "min macroblock quantiser scale (VBR)", "q" },
3874 3862
    { "mblmax", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_mb_lmax}, "max macroblock quantiser scale (VBR)", "q" },
3875 3863
    { "qdiff", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qdiff}, "max difference between the quantiser scale (VBR)", "q" },
3876
    { "qsquish", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qsquish}, "how to keep quantiser between qmin and qmax (0 = clip, 1 = use differentiable function)", "squish" },
3877 3864
    { "rc_eq", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_eq}, "set rate control equation", "equation" },
3878 3865
    { "rc_override", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_override_string}, "rate control override for specific intervals", "override" },
3879 3866
    { "vcodec", HAS_ARG | OPT_VIDEO, {(void*)opt_video_codec}, "force video codec ('copy' to copy stream)", "codec" },
libavcodec/utils.c
560 560
{"mpeg_quant", NULL, OFFSET(mpeg_quant), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
561 561
{"stats_out", NULL, OFFSET(stats_out), FF_OPT_TYPE_STRING, DEFAULT, CHAR_MIN, CHAR_MAX},
562 562
{"stats_in", NULL, OFFSET(stats_in), FF_OPT_TYPE_STRING, DEFAULT, CHAR_MIN, CHAR_MAX},
563
{"qsquish", "how to keep quantiser between qmin and qmax (0 = clip, 1 = use differentiable function)", OFFSET(rc_qsquish), FF_OPT_TYPE_FLOAT, DEFAULT, -FLT_MAX, FLT_MAX, V|E},
563
{"qsquish", "how to keep quantiser between qmin and qmax (0 = clip, 1 = use differentiable function)", OFFSET(rc_qsquish), FF_OPT_TYPE_FLOAT, DEFAULT, 0, 99, V|E},
564 564
{"rc_qmod_amp", NULL, OFFSET(rc_qmod_amp), FF_OPT_TYPE_FLOAT, DEFAULT, -FLT_MAX, FLT_MAX, V|E},
565 565
{"rc_qmod_freq", NULL, OFFSET(rc_qmod_freq), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
566 566
{"rc_override_count", NULL, OFFSET(rc_override_count), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},

Also available in: Unified diff