Mercurial > libavcodec.hg
changeset 1141:6d6003cf89c2 libavcodec
qmin/qmax cleanup
author | michaelni |
---|---|
date | Mon, 17 Mar 2003 11:02:33 +0000 |
parents | e3c231c7eb04 |
children | 592fb56e562f |
files | mpegvideo.c mpegvideo.h ratecontrol.c |
diffstat | 3 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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, ...)
--- 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