From 29700fa656853a084d896a9b4f9e8c769ed2498e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 16 Sep 2002 08:45:57 +0000 Subject: [PATCH] fixing rc of non-intra-only streams which only contain i frames Originally committed as revision 950 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index b64655cbbd..40369b8374 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -104,7 +104,7 @@ static int video_rc_min_rate=0; static float video_rc_initial_cplx=0; static float video_b_qfactor = 1.25; static float video_b_qoffset = 1.25; -static float video_i_qfactor = 0.8; +static float video_i_qfactor = -0.5; static float video_i_qoffset = 0.0; static int me_method = 0; static int video_disable = 0; @@ -1548,6 +1548,23 @@ void opt_qcomp(const char *arg) video_qcomp = atof(arg); } +void opt_b_qfactor(const char *arg) +{ + video_b_qfactor = atof(arg); +} +void opt_i_qfactor(const char *arg) +{ + video_i_qfactor = atof(arg); +} +void opt_b_qoffset(const char *arg) +{ + video_b_qoffset = atof(arg); +} +void opt_i_qoffset(const char *arg) +{ + video_i_qoffset = atof(arg); +} + void opt_audio_bitrate(const char *arg) { audio_bit_rate = atoi(arg) * 1000; @@ -2235,6 +2252,10 @@ const OptionDef options[] = { { "qdiff", HAS_ARG | OPT_EXPERT, {(void*)opt_qdiff}, "max difference between the quantiser scale (VBR)", "q" }, { "qblur", HAS_ARG | OPT_EXPERT, {(void*)opt_qblur}, "video quantiser scale blur (VBR)", "blur" }, { "qcomp", HAS_ARG | OPT_EXPERT, {(void*)opt_qcomp}, "video quantiser scale compression (VBR)", "compression" }, + { "b_qfactor", HAS_ARG | OPT_EXPERT, {(void*)opt_b_qfactor}, "qp factor between p and b frames", "factor" }, + { "i_qfactor", HAS_ARG | OPT_EXPERT, {(void*)opt_i_qfactor}, "qp factor between p and i frames", "factor" }, + { "b_qoffset", HAS_ARG | OPT_EXPERT, {(void*)opt_b_qoffset}, "qp offset between p and b frames", "offset" }, + { "i_qoffset", HAS_ARG | OPT_EXPERT, {(void*)opt_i_qoffset}, "qp offset between p and i frames", "offset" }, { "rc_eq", HAS_ARG | OPT_EXPERT, {(void*)opt_video_rc_eq}, "", "equation" }, { "bt", HAS_ARG, {(void*)opt_video_bitrate_tolerance}, "set video bitrate tolerance (in kbit/s)", "tolerance" }, { "maxrate", HAS_ARG, {(void*)opt_video_bitrate_max}, "set max video bitrate tolerance (in kbit/s)", "bitrate" },