diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2006-09-18 19:27:12 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2006-09-18 19:27:12 +0000 |
commit | 81d0618fa4ae616d991fe745a9c87997b532fc6a (patch) | |
tree | d3266ccd49c0441f4ab3fd671e2c82c380099c44 | |
parent | 97c73545a5d6b28e2ea16773e9f3ba87e3a1c9cb (diff) | |
download | ffmpeg-streaming-81d0618fa4ae616d991fe745a9c87997b532fc6a.zip ffmpeg-streaming-81d0618fa4ae616d991fe745a9c87997b532fc6a.tar.gz |
Remove the "bufsize" OptionDef option from ffmpeg.c. The equally named "bufsize"
AVOption takes over its function with a change in unit from kilobytes to bits.
Postfix "KiB" is available to ease the discomfort.
Originally committed as revision 6288 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | doc/ffmpeg-doc.texi | 2 | ||||
-rw-r--r-- | ffmpeg.c | 17 |
2 files changed, 5 insertions, 14 deletions
diff --git a/doc/ffmpeg-doc.texi b/doc/ffmpeg-doc.texi index 04f85ad..d764b12 100644 --- a/doc/ffmpeg-doc.texi +++ b/doc/ffmpeg-doc.texi @@ -275,7 +275,7 @@ Set max video bitrate tolerance (in bit/s). @item -minrate bitrate Set min video bitrate tolerance (in bit/s). @item -bufsize size -Set rate control buffer size (in kbit). +Set rate control buffer size (in bits). @item -vcodec codec Force video codec to @var{codec}. Use the @code{copy} special value to tell that the raw codec data must be copied as is. @@ -123,7 +123,6 @@ static int video_rc_qmod_freq=0; #endif static char *video_rc_override_string=NULL; static char *video_rc_eq="tex^qComp"; -static int video_rc_buffer_size=0; static float video_rc_buffer_aggressivity=1.0; static int me_method = ME_EPZS; static int video_disable = 0; @@ -2100,11 +2099,6 @@ static void opt_format(const char *arg) } } -static void opt_video_buffer_size(const char *arg) -{ - video_rc_buffer_size = atoi(arg) * 8*1024; -} - static void opt_video_rc_eq(char *arg) { video_rc_eq = arg; @@ -3013,9 +3007,7 @@ static void new_video_stream(AVFormatContext *oc) if(p) p++; } video_enc->rc_override_count=i; - - video_enc->rc_buffer_size = video_rc_buffer_size; - video_enc->rc_initial_buffer_occupancy = video_rc_buffer_size*3/4; + video_enc->rc_initial_buffer_occupancy = video_enc->rc_buffer_size*3/4; video_enc->rc_buffer_aggressivity= video_rc_buffer_aggressivity; video_enc->me_threshold= me_threshold; video_enc->mb_threshold= mb_threshold; @@ -3711,7 +3703,7 @@ static void opt_target(const char *arg) opt_default("b", "1150000"); opt_default("maxrate", "1150000"); opt_default("minrate", "1150000"); - video_rc_buffer_size = 40*1024*8; + opt_default("bufsize", "327680"); // 40*1024*8; audio_bit_rate = 224000; audio_sample_rate = 44100; @@ -3738,7 +3730,7 @@ static void opt_target(const char *arg) opt_default("b", "2040000"); opt_default("maxrate", "2516000"); opt_default("minrate", "0"); //1145000; - video_rc_buffer_size = 224*1024*8; + opt_default("bufsize", "1835008"); //224*1024*8; opt_default("flags", "+SCAN_OFFSET"); @@ -3760,7 +3752,7 @@ static void opt_target(const char *arg) opt_default("b", "6000000"); opt_default("maxrate", "9000000"); opt_default("minrate", "0"); //1500000; - video_rc_buffer_size = 224*1024*8; + opt_default("bufsize", "1835008"); //224*1024*8; mux_packet_size= 2048; // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack. mux_rate = 10080000; // from mplex project: data_rate = 1260000. mux_rate = data_rate * 8 @@ -3928,7 +3920,6 @@ const OptionDef options[] = { { "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" }, { "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" }, - { "bufsize", HAS_ARG | OPT_VIDEO, {(void*)opt_video_buffer_size}, "set ratecontrol buffer size (in kByte)", "size" }, { "vcodec", HAS_ARG | OPT_VIDEO, {(void*)opt_video_codec}, "force video codec ('copy' to copy stream)", "codec" }, { "me", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_motion_estimation}, "set motion estimation method", "method" }, |