[vlc-devel] commit: Do not check rgb masks for YUV in GetFfmpegChroma. (Laurent Aimar )

git version control git at videolan.org
Thu Sep 3 21:16:58 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Sep  3 21:04:54 2009 +0200| [e67115c0220e558527b6f64a133d03ba7bd96ae0] | committer: Laurent Aimar 

Do not check rgb masks for YUV in GetFfmpegChroma.

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

 modules/codec/avcodec/chroma.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c
index 6e13170..2a248b4 100644
--- a/modules/codec/avcodec/chroma.c
+++ b/modules/codec/avcodec/chroma.c
@@ -134,9 +134,12 @@ int GetFfmpegChroma( int *i_ffmpeg_chroma, const video_format_t fmt )
     {
         if( chroma_table[i].i_chroma == fmt.i_chroma )
         {
-            if( chroma_table[i].i_rmask == fmt.i_rmask &&
-                chroma_table[i].i_gmask == fmt.i_gmask &&
-                chroma_table[i].i_bmask == fmt.i_bmask )
+            if( ( chroma_table[i].i_rmask == 0 &&
+                  chroma_table[i].i_gmask == 0 &&
+                  chroma_table[i].i_bmask == 0 ) ||
+                ( chroma_table[i].i_rmask == fmt.i_rmask &&
+                  chroma_table[i].i_gmask == fmt.i_gmask &&
+                  chroma_table[i].i_bmask == fmt.i_bmask ) )
             {
                 *i_ffmpeg_chroma = chroma_table[i].i_chroma_id;
                 return VLC_SUCCESS;




More information about the vlc-devel mailing list