Commit 4e253ede authored by michaelni's avatar michaelni

fixing i_quant_factor, this should finally fix the bitrate bug with ffserver hopefully


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@959 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7882419c
...@@ -104,7 +104,7 @@ static int video_rc_min_rate=0; ...@@ -104,7 +104,7 @@ static int video_rc_min_rate=0;
static float video_rc_initial_cplx=0; static float video_rc_initial_cplx=0;
static float video_b_qfactor = 1.25; static float video_b_qfactor = 1.25;
static float video_b_qoffset = 1.25; static float video_b_qoffset = 1.25;
static float video_i_qfactor = -0.5; static float video_i_qfactor = -0.8;
static float video_i_qoffset = 0.0; static float video_i_qoffset = 0.0;
static int me_method = 0; static int me_method = 0;
static int video_disable = 0; static int video_disable = 0;
......
...@@ -3296,7 +3296,7 @@ void add_codec(FFStream *stream, AVCodecContext *av) ...@@ -3296,7 +3296,7 @@ void add_codec(FFStream *stream, AVCodecContext *av)
if (!av->rc_eq) if (!av->rc_eq)
av->rc_eq = "tex^qComp"; av->rc_eq = "tex^qComp";
if (!av->i_quant_factor) if (!av->i_quant_factor)
av->i_quant_factor = 0.8; av->i_quant_factor = -0.8;
if (!av->b_quant_factor) if (!av->b_quant_factor)
av->b_quant_factor = 1.25; av->b_quant_factor = 1.25;
if (!av->b_quant_offset) if (!av->b_quant_offset)
......
...@@ -430,6 +430,8 @@ typedef struct AVCodecContext { ...@@ -430,6 +430,8 @@ typedef struct AVCodecContext {
/** /**
* qscale offset between ip and b frames * qscale offset between ip and b frames
* if > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset)
* if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset)
* encoding: set by user. * encoding: set by user.
* decoding: unused * decoding: unused
*/ */
...@@ -589,6 +591,8 @@ typedef struct AVCodecContext { ...@@ -589,6 +591,8 @@ typedef struct AVCodecContext {
/** /**
* qscale offset between p and i frames * qscale offset between p and i frames
* if > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset)
* if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset)
* encoding: set by user. * encoding: set by user.
* decoding: unused * decoding: unused
*/ */
......
...@@ -59,7 +59,7 @@ void avcodec_get_context_defaults(AVCodecContext *s){ ...@@ -59,7 +59,7 @@ void avcodec_get_context_defaults(AVCodecContext *s){
s->max_qdiff= 3; s->max_qdiff= 3;
s->b_quant_factor=1.25; s->b_quant_factor=1.25;
s->b_quant_offset=1.25; s->b_quant_offset=1.25;
s->i_quant_factor=0.8; s->i_quant_factor=-0.8;
s->i_quant_offset=0.0; s->i_quant_offset=0.0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment