[FFmpeg-cvslog] avcodec/ffv1enc: set bits_per_raw_sample for 8bit based formats

Michael Niedermayer git at videolan.org
Sun Apr 26 21:48:24 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 26 21:18:42 2015 +0200| [4b8a8194964415022667099b502e60989f4d3134] | committer: Michael Niedermayer

avcodec/ffv1enc: set bits_per_raw_sample for 8bit based formats

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

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

 libavcodec/ffv1enc.c              |    6 ++++++
 tests/ref/vsynth/vsynth1-ffv1     |    2 +-
 tests/ref/vsynth/vsynth2-ffv1     |    2 +-
 tests/ref/vsynth/vsynth3-ffv1     |    2 +-
 tests/ref/vsynth/vsynth_lena-ffv1 |    2 +-
 5 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 805158e..af727a5 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -753,15 +753,21 @@ static av_cold int encode_init(AVCodecContext *avctx)
         s->chroma_planes = desc->nb_components < 3 ? 0 : 1;
         s->colorspace = 0;
         s->transparency = desc->nb_components == 4;
+        if (!avctx->bits_per_raw_sample)
+            s->bits_per_raw_sample = 8;
         break;
     case AV_PIX_FMT_RGB32:
         s->colorspace = 1;
         s->transparency = 1;
         s->chroma_planes = 1;
+        if (!avctx->bits_per_raw_sample)
+            s->bits_per_raw_sample = 8;
         break;
     case AV_PIX_FMT_0RGB32:
         s->colorspace = 1;
         s->chroma_planes = 1;
+        if (!avctx->bits_per_raw_sample)
+            s->bits_per_raw_sample = 8;
         break;
     case AV_PIX_FMT_GBRP9:
         if (!avctx->bits_per_raw_sample)
diff --git a/tests/ref/vsynth/vsynth1-ffv1 b/tests/ref/vsynth/vsynth1-ffv1
index 71fb045..001f10a 100644
--- a/tests/ref/vsynth/vsynth1-ffv1
+++ b/tests/ref/vsynth/vsynth1-ffv1
@@ -1,4 +1,4 @@
-85c421168aab0ca8e24f71da504701af *tests/data/fate/vsynth1-ffv1.avi
+26b1296a0ef80a3b5c8b63cc57c52bc2 *tests/data/fate/vsynth1-ffv1.avi
 2691268 tests/data/fate/vsynth1-ffv1.avi
 c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-ffv1.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-ffv1 b/tests/ref/vsynth/vsynth2-ffv1
index 297388c..b38bb38 100644
--- a/tests/ref/vsynth/vsynth2-ffv1
+++ b/tests/ref/vsynth/vsynth2-ffv1
@@ -1,4 +1,4 @@
-d69458b07bcbce4e7e9388d8fe6c748d *tests/data/fate/vsynth2-ffv1.avi
+6d7b6352f49e21153bb891df411e60ec *tests/data/fate/vsynth2-ffv1.avi
 3718026 tests/data/fate/vsynth2-ffv1.avi
 36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-ffv1.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth3-ffv1 b/tests/ref/vsynth/vsynth3-ffv1
index aff0149..8ffdd3f 100644
--- a/tests/ref/vsynth/vsynth3-ffv1
+++ b/tests/ref/vsynth/vsynth3-ffv1
@@ -1,4 +1,4 @@
-63c2cdbbdb577dfb5e43ca813f1db68b *tests/data/fate/vsynth3-ffv1.avi
+f969ca8542c8384c27233f362b661f8a *tests/data/fate/vsynth3-ffv1.avi
 62194 tests/data/fate/vsynth3-ffv1.avi
 a038ad7c3c09f776304ef7accdea9c74 *tests/data/fate/vsynth3-ffv1.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:    86700/    86700
diff --git a/tests/ref/vsynth/vsynth_lena-ffv1 b/tests/ref/vsynth/vsynth_lena-ffv1
index 5d63381..4060d8e 100644
--- a/tests/ref/vsynth/vsynth_lena-ffv1
+++ b/tests/ref/vsynth/vsynth_lena-ffv1
@@ -1,4 +1,4 @@
-e756081d98f11f303a06897ff6b563b5 *tests/data/fate/vsynth_lena-ffv1.avi
+ed72c22374718589ffacd7ea15424687 *tests/data/fate/vsynth_lena-ffv1.avi
 3547792 tests/data/fate/vsynth_lena-ffv1.avi
 dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth_lena-ffv1.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200



More information about the ffmpeg-cvslog mailing list