use qscale_table in adaptive quant
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Dec 2006 15:45:53 +0000 (15:45 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Dec 2006 15:45:53 +0000 (15:45 +0000)
 some PSNR/bitrate improvement for adaptive quant

Originally committed as revision 7346 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/mpegvideo.c
tests/ffmpeg.regression.ref
tests/rotozoom.regression.ref

index 654e96f..839c251 100644 (file)
@@ -4340,6 +4340,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x,
         update_qscale(s);
 
         if(!(s->flags&CODEC_FLAG_QP_RD)){
+            s->qscale= s->current_picture_ptr->qscale_table[mb_xy];
             s->dquant= s->qscale - last_qp;
 
             if(s->out_format==FMT_H263){
index 14b5d01..a09920f 100644 (file)
@@ -79,10 +79,10 @@ stddev: 10.25 PSNR:27.91 bytes:7602176
 657582 ./data/a-mpeg4-qprd.avi
 5b620f592a795b1caad323ab3fab0859 *./data/out.yuv
 stddev: 12.12 PSNR:26.45 bytes:7602176
-94c5a5e14f51e04b173d72eb0648b206 *./data/a-mpeg4-adap.avi
-400190 ./data/a-mpeg4-adap.avi
-8e5842fc2b92afa362bfcf17f339d47f *./data/out.yuv
-stddev: 14.67 PSNR:24.79 bytes:7602176
+7573ec318b965cfb83da45daa23a9fc2 *./data/a-mpeg4-adap.avi
+400752 ./data/a-mpeg4-adap.avi
+820c4231d4fd192a93102f17f163d621 *./data/out.yuv
+stddev: 14.65 PSNR:24.80 bytes:7602176
 5fff534f0b958547dfdb811d4f289931 *./data/a-mpeg4-thread.avi
 761170 ./data/a-mpeg4-thread.avi
 fe1d119938f8a26174b38eeaa18dff85 *./data/out.yuv
index 2322303..3086e8d 100644 (file)
@@ -79,10 +79,10 @@ edd969be2816c13ae078b7a0416a5715 *./data/a-mpeg4-qprd.avi
 234852 ./data/a-mpeg4-qprd.avi
 51fa46add28e145c1a5ce6b27a4c57b8 *./data/out.yuv
 stddev:  4.24 PSNR:35.57 bytes:7602176
-7ecfbb848740d316e2fcf573b32cb848 *./data/a-mpeg4-adap.avi
-205454 ./data/a-mpeg4-adap.avi
-c9225addf2e620e0094d26e805693af1 *./data/out.yuv
-stddev:  4.05 PSNR:35.96 bytes:7602176
+0784800b9914cf69a6a3dc950747d376 *./data/a-mpeg4-adap.avi
+204726 ./data/a-mpeg4-adap.avi
+3172924d9449b83586e30ae73c86be2a *./data/out.yuv
+stddev:  4.04 PSNR:35.98 bytes:7602176
 8cd8940d7451925784536fe9b2f2a5e3 *./data/a-mpeg4-thread.avi
 254260 ./data/a-mpeg4-thread.avi
 d160a4224ea1af66c85178912f8d3a7c *./data/out.yuv