# HG changeset patch # User michaelni # Date 1047898953 0 # Node ID 6d6003cf89c2c3986952623c3297fa00761821fc # Parent e3c231c7eb047db62bf48c394ee8bc580fccf294 qmin/qmax cleanup diff -r e3c231c7eb04 -r 6d6003cf89c2 mpegvideo.c --- a/mpegvideo.c Mon Mar 17 09:53:39 2003 +0000 +++ b/mpegvideo.c Mon Mar 17 11:02:33 2003 +0000 @@ -515,8 +515,6 @@ s->rtp_payload_size = avctx->rtp_payload_size; if (avctx->rtp_callback) s->rtp_callback = avctx->rtp_callback; - s->qmin= avctx->qmin; - s->qmax= avctx->qmax; s->max_qdiff= avctx->max_qdiff; s->qcompress= avctx->qcompress; s->qblur= avctx->qblur; diff -r e3c231c7eb04 -r 6d6003cf89c2 mpegvideo.h --- a/mpegvideo.h Mon Mar 17 09:53:39 2003 +0000 +++ b/mpegvideo.h Mon Mar 17 11:02:33 2003 +0000 @@ -208,8 +208,6 @@ int fixed_qscale; ///< fixed qscale if non zero float qcompress; ///< amount of qscale change between easy & hard scenes (0.0-1.0) float qblur; ///< amount of qscale smoothing over time (0.0-1.0) - int qmin; ///< min qscale - int qmax; ///< max qscale int max_qdiff; ///< max qscale difference between frames int encoding; ///< true if we are encoding (vs decoding) int flags; ///< AVCodecContext.flags (HQ, MV4, ...) diff -r e3c231c7eb04 -r 6d6003cf89c2 ratecontrol.c --- a/ratecontrol.c Mon Mar 17 09:53:39 2003 +0000 +++ b/ratecontrol.c Mon Mar 17 11:02:33 2003 +0000 @@ -356,8 +356,8 @@ * 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 @@ } 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