summaryrefslogtreecommitdiff
path: root/libavcodec/mjpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-10-07 11:32:40 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-10-07 11:32:40 +0000
commit158c7f059c3906b0116ae73a7669a3bb7bc570bb (patch)
tree1dbb85c2164bec440148a818aeafd6c6197b80c6 /libavcodec/mjpeg.c
parent72385798357e53f64ba5ac405fb1b227ddcffc6c (diff)
use lagrange multipler instead of qp for ratecontrol, this may break some things, tell me ASAP if u notice anything broken
quality which was 1..31 float is now a 1..FF_LAMBDA_MAX int, and FF_QP2LAMBDA * qp can be used to convert to the new range Originally committed as revision 2348 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.c')
-rw-r--r--libavcodec/mjpeg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index 647e71d966..fbcfc4d2c9 100644
--- a/libavcodec/mjpeg.c
+++ b/libavcodec/mjpeg.c
@@ -1877,7 +1877,8 @@ eoi_parser:
picture->qscale_table= s->qscale_table;
memset(picture->qscale_table, picture->quality, (s->width+15)/16);
if(avctx->debug & FF_DEBUG_QP)
- printf("QP: %d\n", (int)picture->quality);
+ printf("QP: %d\n", picture->quality);
+ picture->quality*= FF_QP2LAMBDA;
}
goto the_end;
@@ -2052,7 +2053,8 @@ read_header:
picture->qscale_table= s->qscale_table;
memset(picture->qscale_table, picture->quality, (s->width+15)/16);
if(avctx->debug & FF_DEBUG_QP)
- printf("QP: %f\n", picture->quality);
+ printf("QP: %d\n", picture->quality);
+ picture->quality*= FF_QP2LAMBDA;
}
return buf_ptr - buf;