Mercurial > libavcodec.hg
diff mjpeg.c @ 1505:010f76d07a27 libavcodec
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
author | michaelni |
---|---|
date | Tue, 07 Oct 2003 11:32:40 +0000 |
parents | c4539ef4d8cb |
children | 67069cb78a39 |
line wrap: on
line diff
--- a/mjpeg.c Sun Oct 05 21:48:16 2003 +0000 +++ b/mjpeg.c Tue Oct 07 11:32:40 2003 +0000 @@ -1877,7 +1877,8 @@ 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 @@ 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;