Mercurial > libavcodec.hg
changeset 2494:36d70fbb31c5 libavcodec
mb_lmin/max to limit the per mb quality for the ratecontrol independant from the frame limits
author | michael |
---|---|
date | Wed, 02 Feb 2005 19:33:48 +0000 |
parents | 258120c61eea |
children | 7a79cb42eddb |
files | avcodec.h ratecontrol.c utils.c |
diffstat | 3 files changed, 21 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/avcodec.h Wed Feb 02 18:49:04 2005 +0000 +++ b/avcodec.h Wed Feb 02 19:33:48 2005 +0000 @@ -17,7 +17,7 @@ #define FFMPEG_VERSION_INT 0x000409 #define FFMPEG_VERSION "0.4.9-pre1" -#define LIBAVCODEC_BUILD 4741 +#define LIBAVCODEC_BUILD 4742 #define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT #define LIBAVCODEC_VERSION FFMPEG_VERSION @@ -1276,14 +1276,14 @@ /** * minimum MB quantizer. - * - encoding: set by user. + * - encoding: unused * - decoding: unused */ int mb_qmin; /** * maximum MB quantizer. - * - encoding: set by user. + * - encoding: unused * - decoding: unused */ int mb_qmax; @@ -1758,6 +1758,20 @@ * - decoding: unused */ float border_masking; + + /** + * minimum MB lagrange multipler. + * - encoding: set by user. + * - decoding: unused + */ + int mb_lmin; + + /** + * maximum MB lagrange multipler. + * - encoding: set by user. + * - decoding: unused + */ + int mb_lmax; } AVCodecContext;
--- a/ratecontrol.c Wed Feb 02 18:49:04 2005 +0000 +++ b/ratecontrol.c Wed Feb 02 19:33:48 2005 +0000 @@ -506,8 +506,8 @@ float cplx_sum= 0.0; float cplx_tab[s->mb_num]; float bits_tab[s->mb_num]; - const int qmin= s->avctx->lmin; - const int qmax= s->avctx->lmax; + const int qmin= s->avctx->mb_lmin; + const int qmax= s->avctx->mb_lmax; Picture * const pic= &s->current_picture; const int mb_width = s->mb_width; const int mb_height = s->mb_height;
--- a/utils.c Wed Feb 02 18:49:04 2005 +0000 +++ b/utils.c Wed Feb 02 19:33:48 2005 +0000 @@ -430,8 +430,8 @@ s->bit_rate_tolerance= s->bit_rate*10; s->qmin= 2; s->qmax= 31; - s->mb_qmin= 2; - s->mb_qmax= 31; + s->mb_lmin= FF_QP2LAMBDA * 2; + s->mb_lmax= FF_QP2LAMBDA * 31; s->rc_eq= "tex^qComp"; s->qcompress= 0.5; s->max_qdiff= 3;