diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-12-18 10:09:43 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-12-18 10:09:43 +0000 |
commit | 17a70fdeeff1260ac9b2651ea9f36dbd23d0ced8 (patch) | |
tree | 86edc0afa4880c8ed87d5c76192dde4f120f8dda /libavcodec | |
parent | 8fc698950b5fdbb947ae8718e10adca6bd1560fa (diff) | |
download | ffmpeg-17a70fdeeff1260ac9b2651ea9f36dbd23d0ced8.tar.gz |
mb qp limits
Originally committed as revision 1340 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 19 | ||||
-rw-r--r-- | libavcodec/ratecontrol.c | 4 | ||||
-rw-r--r-- | libavcodec/utils.c | 2 |
3 files changed, 21 insertions, 4 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 1cad8c2eae..606cfd814b 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -5,8 +5,8 @@ #define LIBAVCODEC_VERSION_INT 0x000406 #define LIBAVCODEC_VERSION "0.4.6" -#define LIBAVCODEC_BUILD 4645 -#define LIBAVCODEC_BUILD_STR "4645" +#define LIBAVCODEC_BUILD 4646 +#define LIBAVCODEC_BUILD_STR "4646" enum CodecID { CODEC_ID_NONE, @@ -828,6 +828,7 @@ typedef struct AVCodecContext { #define FF_DEBUG_QP 16 #define FF_DEBUG_MV 32 #define FF_DEBUG_VIS_MV 64 +#define FF_DEBUG_SKIP 128 /** * error @@ -835,6 +836,20 @@ typedef struct AVCodecContext { * decoding: unused */ uint64_t error[4]; + + /** + * minimum MB quantizer + * encoding: set by user. + * decoding: unused + */ + int mb_qmin; + + /** + * maximum MB quantizer + * encoding: set by user. + * decoding: unused + */ + int mb_qmax; } AVCodecContext; typedef struct AVCodec { diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 1fcb60a3db..6be99cc4d0 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -474,8 +474,8 @@ static void adaptive_quantization(MpegEncContext *s, double q){ float cplx_sum= 0.0; float cplx_tab[s->mb_num]; float bits_tab[s->mb_num]; - const int qmin= 2; //s->avctx->mb_qmin; - const int qmax= 31; //s->avctx->mb_qmax; + const int qmin= s->avctx->mb_qmin; + const int qmax= s->avctx->mb_qmax; Picture * const pic= &s->current_picture; for(i=0; i<s->mb_num; i++){ diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 907eb5804f..7ebc7d29e5 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -217,6 +217,8 @@ void avcodec_get_context_defaults(AVCodecContext *s){ s->bit_rate_tolerance= s->bit_rate*10; s->qmin= 2; s->qmax= 31; + s->mb_qmin= 2; + s->mb_qmax= 31; s->rc_eq= "tex^qComp"; s->qcompress= 0.5; s->max_qdiff= 3; |