[Ffmpeg-cvslog] r6296 - in trunk: ffmpeg.c libavcodec/utils.c
takis
subversion
Wed Sep 20 10:34:13 CEST 2006
Author: takis
Date: Wed Sep 20 10:34:13 2006
New Revision: 6296
Modified:
trunk/ffmpeg.c
trunk/libavcodec/utils.c
Log:
Remove the "bf" OptionDef parameter so the equally named AVOption will take
over. Move over ffmpeg.c constraint checking, but allow value of zero to disable
B-frame.
Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c (original)
+++ trunk/ffmpeg.c Wed Sep 20 10:34:13 2006
@@ -130,7 +130,6 @@
static int video_codec_id = CODEC_ID_NONE;
static int video_codec_tag = 0;
static int same_quality = 0;
-static int b_frames = 0;
static int do_deinterlace = 0;
static int workaround_bugs = FF_BUG_AUTODETECT;
static int packet_size = 0;
@@ -2336,18 +2335,6 @@
frame_aspect_ratio = ar;
}
-static void opt_b_frames(const char *arg)
-{
- b_frames = atoi(arg);
- if (b_frames > FF_MAX_B_FRAMES) {
- fprintf(stderr, "\nCannot have more than %d B frames, increase FF_MAX_B_FRAMES.\n", FF_MAX_B_FRAMES);
- exit(1);
- } else if (b_frames < 1) {
- fprintf(stderr, "\nNumber of B frames must be higher than 0\n");
- exit(1);
- }
-}
-
static void opt_qscale(const char *arg)
{
video_qscale = atof(arg);
@@ -2968,7 +2955,6 @@
if(inter_matrix)
video_enc->inter_matrix = inter_matrix;
- video_enc->max_b_frames = b_frames;
video_enc->qmin = video_qmin;
video_enc->qmax = video_qmax;
video_enc->lmin = video_lmin;
@@ -3921,7 +3907,6 @@
"method" },
{ "me_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_me_threshold}, "motion estimaton threshold", "" },
{ "mb_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_mb_threshold}, "macroblock threshold", "" },
- { "bf", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_b_frames}, "use 'frames' B frames", "frames" },
{ "bug", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_workaround_bugs}, "workaround not auto detected encoder bugs", "param" },
{ "ps", HAS_ARG | OPT_EXPERT, {(void*)opt_packet_size}, "set packet size in bits", "size" },
{ "error", HAS_ARG | OPT_EXPERT, {(void*)opt_error_rate}, "error rate", "rate" },
Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c (original)
+++ trunk/libavcodec/utils.c Wed Sep 20 10:34:13 2006
@@ -507,7 +507,7 @@
{"qmin", "min video quantiser scale (VBR)", OFFSET(qmin), FF_OPT_TYPE_INT, 2, 0, INT_MAX, V|E},
{"qmax", "max video quantiser scale (VBR)", OFFSET(qmax), FF_OPT_TYPE_INT, 31, 0, INT_MAX, V|E},
{"qdiff", "max difference between the quantiser scale (VBR)", OFFSET(max_qdiff), FF_OPT_TYPE_INT, 3, INT_MIN, INT_MAX, V|E},
-{"bf", "use 'frames' B frames", OFFSET(max_b_frames), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
+{"bf", "use 'frames' B frames", OFFSET(max_b_frames), FF_OPT_TYPE_INT, DEFAULT, 0, FF_MAX_B_FRAMES, V|E},
{"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},
{"rc_strategy", NULL, OFFSET(rc_strategy), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
{"b_strategy", NULL, OFFSET(b_frame_strategy), FF_OPT_TYPE_INT, 0, INT_MIN, INT_MAX, V|E},
More information about the ffmpeg-cvslog
mailing list