Make sure the last bits of huffyuv frames are zeroed.
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Apr 2009 13:02:47 +0000 (13:02 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Apr 2009 13:02:47 +0000 (13:02 +0000)
Fixes issue946

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

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

index 51acf05..237b05f 100644 (file)
@@ -1376,6 +1376,8 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
     emms_c();
 
     size+= (put_bits_count(&s->pb)+31)/8;
     emms_c();
 
     size+= (put_bits_count(&s->pb)+31)/8;
+    put_bits(&s->pb, 16, 0);
+    put_bits(&s->pb, 15, 0);
     size/= 4;
 
     if((s->flags&CODEC_FLAG_PASS1) && (s->picture_number&31)==0){
     size/= 4;
 
     if((s->flags&CODEC_FLAG_PASS1) && (s->picture_number&31)==0){
index 259d8ca..6c1d462 100644 (file)
@@ -66,7 +66,7 @@ df90a4c50f47577d8fc83a0184499266 *./tests/data/a-odivx.mp4
 550787 ./tests/data/a-odivx.mp4
 a1c691f3be526ecbf3be3152d5bab88c *./tests/data/mpeg4.vsynth.out.yuv
 stddev:    7.99 PSNR: 30.06 bytes:  7603200/  7603200
 550787 ./tests/data/a-odivx.mp4
 a1c691f3be526ecbf3be3152d5bab88c *./tests/data/mpeg4.vsynth.out.yuv
 stddev:    7.99 PSNR: 30.06 bytes:  7603200/  7603200
-6c58e5707afe056b072d2ce21b3b8e4f *./tests/data/a-huffyuv.avi
+190774e155fb7fabfdfb71dfc29c4f87 *./tests/data/a-huffyuv.avi
 7933744 ./tests/data/a-huffyuv.avi
 799d3db687f6cdd7a837ec156efc171f *./tests/data/huffyuv.vsynth.out.yuv
 stddev:    0.00 PSNR:999.99 bytes:  7603200/  7603200
 7933744 ./tests/data/a-huffyuv.avi
 799d3db687f6cdd7a837ec156efc171f *./tests/data/huffyuv.vsynth.out.yuv
 stddev:    0.00 PSNR:999.99 bytes:  7603200/  7603200
index 2e64893..2bd52c6 100644 (file)
@@ -66,7 +66,7 @@ stddev:    1.91 PSNR: 42.49 bytes:  7603200/  7603200
 119797 ./tests/data/a-odivx.mp4
 90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.rotozoom.out.yuv
 stddev:    5.34 PSNR: 33.56 bytes:  7603200/  7603200
 119797 ./tests/data/a-odivx.mp4
 90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.rotozoom.out.yuv
 stddev:    5.34 PSNR: 33.56 bytes:  7603200/  7603200
-a1323da0c8b437cd6961f8c90451880b *./tests/data/a-huffyuv.avi
+56cd44907a48990e06bd065e189ff461 *./tests/data/a-huffyuv.avi
 6455232 ./tests/data/a-huffyuv.avi
 dde5895817ad9d219f79a52d0bdfb001 *./tests/data/huffyuv.rotozoom.out.yuv
 stddev:    0.00 PSNR:999.99 bytes:  7603200/  7603200
 6455232 ./tests/data/a-huffyuv.avi
 dde5895817ad9d219f79a52d0bdfb001 *./tests/data/huffyuv.rotozoom.out.yuv
 stddev:    0.00 PSNR:999.99 bytes:  7603200/  7603200