[SCM] libav/experimental: Remove the "mblmax" OptionDef. The equally named AVOption takes over its function. A unit change is involved, but as AVOption parameters are now parsed with ff_eval2(), you can use the QP2LAMBDA constant to ease the change.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:51:10 UTC 2013


The following commit has been merged in the experimental branch:
commit 720442981b5cb735b015b89093ceb21b59af07a2
Author: Panagiotis Issaris <takis.issaris at uhasselt.be>
Date:   Thu Sep 28 17:46:25 2006 +0000

    Remove the "mblmax" OptionDef. The equally named AVOption takes over its
    function. A unit change is involved, but as AVOption parameters are now parsed
    with ff_eval2(), you can use the QP2LAMBDA constant to ease the change.
    
    Originally committed as revision 6370 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/ffmpeg.c b/ffmpeg.c
index ca7b162..4454986 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -107,7 +107,6 @@ static int max_frames[4] = {INT_MAX, INT_MAX, INT_MAX, INT_MAX};
 static int frame_rate = 25;
 static int frame_rate_base = 1;
 static float video_qscale = 0;
-static int video_mb_lmax = 31*FF_QP2LAMBDA;
 static int video_qdiff = 3;
 static uint16_t *intra_matrix = NULL;
 static uint16_t *inter_matrix = NULL;
@@ -2321,16 +2320,6 @@ static void opt_qscale(const char *arg)
     }
 }
 
-static void opt_mb_lmax(const char *arg)
-{
-    video_mb_lmax = atof(arg)*FF_QP2LAMBDA;
-    if (video_mb_lmax < 1 ||
-        video_mb_lmax > FF_LAMBDA_MAX) {
-        fprintf(stderr, "mblmax must be >= 1 and <= %d\n", FF_LAMBDA_MAX / FF_QP2LAMBDA);
-        exit(1);
-    }
-}
-
 static void opt_qdiff(const char *arg)
 {
     video_qdiff = atoi(arg);
@@ -2870,7 +2859,6 @@ static void new_video_stream(AVFormatContext *oc)
         if(inter_matrix)
             video_enc->inter_matrix = inter_matrix;
 
-        video_enc->mb_lmax = video_mb_lmax;
         video_enc->max_qdiff = video_qdiff;
         video_enc->rc_eq = video_rc_eq;
         video_enc->thread_count = thread_count;
@@ -3792,7 +3780,6 @@ const OptionDef options[] = {
     { "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" },
     { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" },
     { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixed video quantiser scale (VBR)", "q" },
-    { "mblmax", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_mb_lmax}, "max macroblock quantiser scale (VBR)", "q" },
     { "qdiff", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qdiff}, "max difference between the quantiser scale (VBR)", "q" },
     { "rc_eq", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_eq}, "set rate control equation", "equation" },
     { "rc_override", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_override_string}, "rate control override for specific intervals", "override" },
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8fa729f..05e4218 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -678,7 +678,7 @@ static const AVOption options[]={
 {"skipcmp", "frame skip compare function", OFFSET(frame_skip_cmp), FF_OPT_TYPE_INT, FF_CMP_DCTMAX, INT_MIN, INT_MAX, V|E, "cmp_func"},
 {"border_mask", NULL, OFFSET(border_masking), FF_OPT_TYPE_FLOAT, DEFAULT, -FLT_MAX, FLT_MAX, V|E},
 {"mblmin", "min macroblock quantiser scale (VBR)", OFFSET(mb_lmin), FF_OPT_TYPE_INT, FF_QP2LAMBDA * 2, 1, FF_LAMBDA_MAX, V|E},
-{"mblmax", "max macroblock quantiser scale (VBR)", OFFSET(mb_lmax), FF_OPT_TYPE_INT, FF_QP2LAMBDA * 31, INT_MIN, INT_MAX, V|E},
+{"mblmax", "max macroblock quantiser scale (VBR)", OFFSET(mb_lmax), FF_OPT_TYPE_INT, FF_QP2LAMBDA * 31, 1, FF_LAMBDA_MAX, V|E},
 {"mepc", "motion estimation bitrate penalty compensation (1.0 = 256)", OFFSET(me_penalty_compensation), FF_OPT_TYPE_INT, 256, INT_MIN, INT_MAX, V|E},
 {"bidir_refine", NULL, OFFSET(bidir_refine), FF_OPT_TYPE_INT, DEFAULT, 0, 4, V|E},
 {"brd_scale", NULL, OFFSET(brd_scale), FF_OPT_TYPE_INT, DEFAULT, 0, 10, V|E},

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list