summaryrefslogtreecommitdiff
path: root/libavcodec/ratecontrol.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-03-17 11:02:33 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-03-17 11:02:33 +0000
commitc5a9ab69c26c6c3c567195c748671677d36a908f (patch)
tree745f82f4c0066d5eb1da1ea4b7b2a29ccb726d59 /libavcodec/ratecontrol.c
parent6c949d129b8dbfc1c7cb0410cf1c80724a805fdb (diff)
downloadffmpeg-c5a9ab69c26c6c3c567195c748671677d36a908f.tar.gz
qmin/qmax cleanup
Originally committed as revision 1689 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r--libavcodec/ratecontrol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 80213dc008..8a39623882 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -356,8 +356,8 @@ static double get_diff_limited_q(MpegEncContext *s, RateControlEntry *rce, doubl
* gets the qmin & qmax for pict_type
*/
static void get_qminmax(int *qmin_ret, int *qmax_ret, MpegEncContext *s, int pict_type){
- int qmin= s->qmin;
- int qmax= s->qmax;
+ int qmin= s->avctx->qmin;
+ int qmax= s->avctx->qmax;
if(pict_type==B_TYPE){
qmin= (int)(qmin*ABS(s->avctx->b_quant_factor)+s->avctx->b_quant_offset + 0.5);
@@ -368,7 +368,7 @@ static void get_qminmax(int *qmin_ret, int *qmax_ret, MpegEncContext *s, int pic
}
if(qmin<1) qmin=1;
- if(qmin==1 && s->qmin>1) qmin=2; //avoid qmin=1 unless the user wants qmin=1
+ if(qmin==1 && s->avctx->qmin>1) qmin=2; //avoid qmin=1 unless the user wants qmin=1
if(qmin<3 && s->max_qcoeff<=128 && pict_type==I_TYPE) qmin=3; //reduce cliping problems