diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-03-17 11:02:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-03-17 11:02:33 +0000 |
commit | c5a9ab69c26c6c3c567195c748671677d36a908f (patch) | |
tree | 745f82f4c0066d5eb1da1ea4b7b2a29ccb726d59 | |
parent | 6c949d129b8dbfc1c7cb0410cf1c80724a805fdb (diff) | |
download | ffmpeg-c5a9ab69c26c6c3c567195c748671677d36a908f.tar.gz |
qmin/qmax cleanup
Originally committed as revision 1689 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpegvideo.c | 2 | ||||
-rw-r--r-- | libavcodec/mpegvideo.h | 2 | ||||
-rw-r--r-- | libavcodec/ratecontrol.c | 6 |
3 files changed, 3 insertions, 7 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 602063e49f..da99327dcd 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -515,8 +515,6 @@ int MPV_encode_init(AVCodecContext *avctx) 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 --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 846d1ab3c0..bd1c257b7a 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -208,8 +208,6 @@ typedef struct MpegEncContext { 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 --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 |