[FFmpeg-cvslog] avienc: Fix rawvideo 32bit

Michael Niedermayer git at videolan.org
Sat Dec 17 03:36:33 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec 17 03:25:46 2011 +0100| [53b6503184a9403e9ac7eb77a35059be64a308b0] | committer: Michael Niedermayer

avienc: Fix rawvideo 32bit
Bug found by: Rik Maes <rik.maes54 at gmail.com>
Change based on suggestion by Rik Maes

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=53b6503184a9403e9ac7eb77a35059be64a308b0
---

 libavformat/riff.c        |    2 +-
 tests/ref/vsynth1/huffyuv |    2 +-
 tests/ref/vsynth1/yuv     |    2 +-
 tests/ref/vsynth2/huffyuv |    2 +-
 tests/ref/vsynth2/yuv     |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index ea598d2..4f475ba 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -519,7 +519,7 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc, const AVCodecTag *t
     avio_wl16(pb, enc->bits_per_coded_sample ? enc->bits_per_coded_sample : 24); /* depth */
     /* compression type */
     avio_wl32(pb, enc->codec_tag);
-    avio_wl32(pb, enc->width * enc->height * 3);
+    avio_wl32(pb, (enc->width * enc->height * (enc->bits_per_coded_sample ? enc->bits_per_coded_sample : 24)+7) / 8);
     avio_wl32(pb, 0);
     avio_wl32(pb, 0);
     avio_wl32(pb, 0);
diff --git a/tests/ref/vsynth1/huffyuv b/tests/ref/vsynth1/huffyuv
index fefc84a..9ec091e 100644
--- a/tests/ref/vsynth1/huffyuv
+++ b/tests/ref/vsynth1/huffyuv
@@ -1,4 +1,4 @@
-ace2536fa169d835d0fb332abde28d51 *./tests/data/vsynth1/huffyuv.avi
+f5f2e109af0612694ff3cd6464063e82 *./tests/data/vsynth1/huffyuv.avi
 7933800 ./tests/data/vsynth1/huffyuv.avi
 c5ccac874dbf808e9088bc3107860042 *./tests/data/huffyuv.vsynth1.out.yuv
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth1/yuv b/tests/ref/vsynth1/yuv
index b98dda5..6d8b143 100644
--- a/tests/ref/vsynth1/yuv
+++ b/tests/ref/vsynth1/yuv
@@ -1,4 +1,4 @@
-aa6b9e862aebcf8902a6d770e7729d59 *./tests/data/vsynth1/yuv.avi
+eaa66c3b27a2602e882befe154a8b119 *./tests/data/vsynth1/yuv.avi
 7610060 ./tests/data/vsynth1/yuv.avi
 c5ccac874dbf808e9088bc3107860042 *./tests/data/yuv.vsynth1.out.yuv
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth2/huffyuv b/tests/ref/vsynth2/huffyuv
index 740862a..e59b53c 100644
--- a/tests/ref/vsynth2/huffyuv
+++ b/tests/ref/vsynth2/huffyuv
@@ -1,4 +1,4 @@
-56cd44907a48990e06bd065e189ff461 *./tests/data/vsynth2/huffyuv.avi
+ed66182be0d515e8b6cb970ad63162da *./tests/data/vsynth2/huffyuv.avi
 6455232 ./tests/data/vsynth2/huffyuv.avi
 dde5895817ad9d219f79a52d0bdfb001 *./tests/data/huffyuv.vsynth2.out.yuv
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth2/yuv b/tests/ref/vsynth2/yuv
index 6593ce9..699ebc9 100644
--- a/tests/ref/vsynth2/yuv
+++ b/tests/ref/vsynth2/yuv
@@ -1,4 +1,4 @@
-30a400773ab26f2c83e469198b156f1d *./tests/data/vsynth2/yuv.avi
+3d5ee6d2023bc15bba898819e4977e46 *./tests/data/vsynth2/yuv.avi
 7610060 ./tests/data/vsynth2/yuv.avi
 dde5895817ad9d219f79a52d0bdfb001 *./tests/data/yuv.vsynth2.out.yuv
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200



More information about the ffmpeg-cvslog mailing list