From 0adba3d88b0b343a41660f186e0259640cff5980 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 18 Mar 2006 02:46:39 +0000 Subject: [PATCH] fixing bquant_offset Originally committed as revision 5179 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/xvid_rc.c | 2 +- libavcodec/xvidff.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/xvid_rc.c b/libavcodec/xvid_rc.c index 7f6a6e9d80..c19c481a05 100644 --- a/libavcodec/xvid_rc.c +++ b/libavcodec/xvid_rc.c @@ -94,7 +94,7 @@ float ff_xvid_rate_estimate_qscale(MpegEncContext *s, int dry_run){ xvid_plg_data.max_quant[0]= s->avctx->qmax; xvid_plg_data.max_quant[1]= s->avctx->qmax; xvid_plg_data.max_quant[2]= s->avctx->qmax; //FIXME i/b factor & offset - xvid_plg_data.bquant_offset = s->avctx->b_quant_offset; + xvid_plg_data.bquant_offset = 100 * s->avctx->b_quant_offset; xvid_plg_data.bquant_ratio = 100 * s->avctx->b_quant_factor; #if 0 diff --git a/libavcodec/xvidff.c b/libavcodec/xvidff.c index 8abdac8da0..d44fedb2c8 100644 --- a/libavcodec/xvidff.c +++ b/libavcodec/xvidff.c @@ -372,7 +372,7 @@ int ff_xvid_encode_init(AVCodecContext *avctx) { /* Bframes */ xvid_enc_create.max_bframes = avctx->max_b_frames; - xvid_enc_create.bquant_offset = avctx->b_quant_offset; + xvid_enc_create.bquant_offset = 100 * avctx->b_quant_offset; xvid_enc_create.bquant_ratio = 100 * avctx->b_quant_factor; if( avctx->max_b_frames > 0 && !x->quicktime_format ) xvid_enc_create.global |= XVID_GLOBAL_PACKED;