diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-12-22 22:48:09 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-12-22 22:48:09 +0000 |
commit | 82b019cefd98be3cd778728ee718d40044b9e15d (patch) | |
tree | 77c6f5431fa9c5439c005e6e2eaae13b289452b7 /libavcodec/ratecontrol.c | |
parent | 50c6f6cd4c1754d52bd093f3a7bd7585b17547a0 (diff) | |
download | ffmpeg-streaming-82b019cefd98be3cd778728ee718d40044b9e15d.zip ffmpeg-streaming-82b019cefd98be3cd778728ee718d40044b9e15d.tar.gz |
better f_code guessing in 2nd pass
Originally committed as revision 4766 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 8dd9d2b..07e8423 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -607,6 +607,17 @@ static void adaptive_quantization(MpegEncContext *s, double q){ s->lambda_table[mb_xy]= intq; } } + +void ff_get_2pass_fcode(MpegEncContext *s){ + RateControlContext *rcc= &s->rc_context; + int picture_number= s->picture_number; + RateControlEntry *rce; + + rce= &rcc->entry[picture_number]; + s->f_code= rce->f_code; + s->b_code= rce->b_code; +} + //FIXME rd or at least approx for dquant float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) |