[FFmpeg-cvslog] avcodec/imgconvert/get_color_type: fix type for PAL8

Michael Niedermayer git at videolan.org
Thu Oct 3 00:56:19 CEST 2013


ffmpeg | branch: release/2.0 | Michael Niedermayer <michaelni at gmx.at> | Wed Oct  2 18:11:28 2013 +0200| [f089e67d515b726ac14103025edc04f6df346a3f] | committer: Carl Eugen Hoyos

avcodec/imgconvert/get_color_type: fix type for PAL8

Fixes Ticket3008

Fate changes as PAL8 gets used instead of BGR8

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 95666b22989b9b9f91a27da01b2bdbf4ee8022d3)

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

 libavcodec/imgconvert.c |    3 +++
 tests/ref/lavf/gif      |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 1835e00..3abd6e6 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -71,6 +71,9 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int
 }
 
 static int get_color_type(const AVPixFmtDescriptor *desc) {
+    if (desc->flags & AV_PIX_FMT_FLAG_PAL)
+        return FF_COLOR_RGB;
+
     if(desc->nb_components == 1 || desc->nb_components == 2)
         return FF_COLOR_GRAY;
 
diff --git a/tests/ref/lavf/gif b/tests/ref/lavf/gif
index 531cd1e..4d90abe 100644
--- a/tests/ref/lavf/gif
+++ b/tests/ref/lavf/gif
@@ -1,3 +1,3 @@
-e35f5ea283bbcb249818e0078ec72664 *./tests/data/lavf/lavf.gif
-2011766 ./tests/data/lavf/lavf.gif
+8aef8081e8afa445f63f320f4a1c5edb *./tests/data/lavf/lavf.gif
+2030198 ./tests/data/lavf/lavf.gif
 ./tests/data/lavf/lavf.gif CRC=0x0dc5477c



More information about the ffmpeg-cvslog mailing list