[vlc-devel] commit: ffmpeg chroma: This follows up on [ 0034fbab5587b1197b0458ab3af20ea2644e12bc] by providing defaults in case no mask values were set. (Derk-Jan Hartman )
git version control
git at videolan.org
Wed Aug 20 14:00:26 CEST 2008
vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Wed Aug 20 14:01:51 2008 +0200| [079fdd3f33560bfc2b36181ac367649fc0c12f9f] | committer: Derk-Jan Hartman
ffmpeg chroma: This follows up on [0034fbab5587b1197b0458ab3af20ea2644e12bc] by providing defaults in case no mask values were set.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=079fdd3f33560bfc2b36181ac367649fc0c12f9f
---
modules/codec/avcodec/chroma.h | 37 +++++++++++++++++++++----------------
1 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/modules/codec/avcodec/chroma.h b/modules/codec/avcodec/chroma.h
index 0c03637..d952f0d 100644
--- a/modules/codec/avcodec/chroma.h
+++ b/modules/codec/avcodec/chroma.h
@@ -25,6 +25,19 @@
/*****************************************************************************
* Chroma fourcc -> ffmpeg_id mapping
*****************************************************************************/
+#if defined(WORDS_BIGENDIAN)
+# define VLC_RGB_ES( fcc, leid, beid ) \
+ { fcc, beid, 0, 0, 0 },
+#else
+# define VLC_RGB_ES( fcc, leid, beid ) \
+ { fcc, beid, 0, 0, 0 },
+#endif
+
+#define VLC_RGB( fcc, leid, beid, rmask, gmask, bmask ) \
+ { fcc, leid, rmask, gmask, bmask }, \
+ { fcc, beid, bmask, gmask, rmask }, \
+ VLC_RGB_ES( fcc, leid, beid )
+
static const struct
{
@@ -66,22 +79,14 @@ static const struct
{VLC_FOURCC('Y','4','1','1'), PIX_FMT_UYYVYY411, 0, 0, 0 },
/* Packed RGB formats */
- {VLC_FOURCC('R','G','B','4'), PIX_FMT_RGB4, 0x10, 0x06, 0x01 }, /* FIXME verify */
- {VLC_FOURCC('R','G','B','4'), PIX_FMT_BGR4, 0x01, 0x06, 0x10 },
- {VLC_FOURCC('R','G','B','8'), PIX_FMT_RGB8, 0xC0, 0x38, 0x07 }, /* FIXME verify */
- {VLC_FOURCC('R','G','B','8'), PIX_FMT_BGR8, 0x07, 0x38, 0xC0 },
- {VLC_FOURCC('R','V','1','5'), PIX_FMT_RGB555, 0x7c00, 0x03e0, 0x001f },
- {VLC_FOURCC('R','V','1','5'), PIX_FMT_RGB555, 0x7c00, 0x03e0, 0x001f },
- {VLC_FOURCC('R','V','1','5'), PIX_FMT_BGR555, 0x001f, 0x03e0, 0x7c00 },
- {VLC_FOURCC('R','V','1','6'), PIX_FMT_RGB565, 0xf800, 0x07e0, 0x001f },
- {VLC_FOURCC('R','V','1','6'), PIX_FMT_BGR565, 0x001f, 0x07e0, 0x001f },
- {VLC_FOURCC('R','V','2','4'), PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff },
- {VLC_FOURCC('R','V','2','4'), PIX_FMT_BGR24, 0x0000ff, 0x00ff00, 0xff0000 },
-
- {VLC_FOURCC('R','V','3','2'), PIX_FMT_RGB32, 0x00ff0000, 0x0000ff00, 0x000000ff },
- {VLC_FOURCC('R','V','3','2'), PIX_FMT_BGR32, 0x000000ff, 0x0000ff00, 0x00ff0000 },
- {VLC_FOURCC('R','V','3','2'), PIX_FMT_RGB32_1, 0xff000000, 0x00ff0000, 0x0000ff00 },
- {VLC_FOURCC('R','V','3','2'), PIX_FMT_BGR32_1, 0x0000ff00, 0x00ff0000, 0xff000000 },
+ VLC_RGB( VLC_FOURCC('R','G','B','4'), PIX_FMT_RGB4, PIX_FMT_BGR4, 0x10, 0x06, 0x01 )
+ VLC_RGB( VLC_FOURCC('R','G','B','8'), PIX_FMT_RGB8, PIX_FMT_BGR8, 0xC0, 0x38, 0x07 )
+ VLC_RGB( VLC_FOURCC('R','V','1','5'), PIX_FMT_RGB555, PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f )
+ VLC_RGB( VLC_FOURCC('R','V','1','6'), PIX_FMT_RGB565, PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f )
+ VLC_RGB( VLC_FOURCC('R','V','2','4'), PIX_FMT_RGB24, PIX_FMT_BGR24, 0xff0000, 0x00ff00, 0x0000ff )
+
+ VLC_RGB( VLC_FOURCC('R','V','3','2'), PIX_FMT_RGB32, PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff )
+ VLC_RGB( VLC_FOURCC('R','V','3','2'), PIX_FMT_RGB32_1, PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 )
#if defined(PIX_FMT_RGBA)
{VLC_FOURCC('R','G','B','A'), PIX_FMT_RGBA, 0xff000000, 0x00ff0000, 0x0000ff00},
More information about the vlc-devel
mailing list