[FFmpeg-devel] [PATCH 08/13] Add missing nut-specific codec tags for rawvideo pixel formats.

Stefano Sabatini stefano.sabatini-lala
Sun May 9 15:29:01 CEST 2010


Add codec tags for the formats:
RGB[15] Packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), little-endian [NOT in AVI]
BGR[15] Packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), little-endian [NOT in AVI]
RGB[16] Packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), little-endian [NOT in AVI]
BGR[16] Packed BGR 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), little-endian [NOT in AVI]
[15]BGR Packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian [NOT in AVI]
[15]RGB Packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), big-endian [NOT in AVI]
[16]BGR Packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), big-endian [NOT in AVI]
[16]RGB Packed BGR 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), big-endian [NOT in AVI]
RGBA    Packed RGBA 8:8:8:8, 32bpp, RGBA [NOT in AVI]
BGRA    Packed RGBA 8:8:8:8, 32bpp, BGRA [NOT in AVI]
ABGR    Packed RGBA 8:8:8:8, 32bpp, ABGR [NOT in AVI]
ARGB    Packed RGBA 8:8:8:8, 32bpp, ARGB [NOT in AVI]
RGB[24] Packed RGB 8:8:8, 24bpp RGB [NOT in AVI]
BGR[24] Packed RGB 8:8:8, 24bpp BGR [NOT in AVI]

which are listed in the nut4cc.txt spec.
---
 libavcodec/raw.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/libavcodec/raw.c b/libavcodec/raw.c
index ef38d14..0ed32ee 100644
--- a/libavcodec/raw.c
+++ b/libavcodec/raw.c
@@ -69,6 +69,16 @@ const PixelFormatTag ff_raw_pixelFormatTags[] = {
     { PIX_FMT_RGB565LE, MKTAG('R', 'G', 'B', 16) },
     { PIX_FMT_BGR565LE, MKTAG('B', 'G', 'R', 16) },
     { PIX_FMT_RGB565LE, MKTAG( 3 ,  0 ,  0 ,  0) },
+    { PIX_FMT_RGB555BE, MKTAG(15 , 'B', 'G', 'R') },
+    { PIX_FMT_BGR555BE, MKTAG(15 , 'R', 'G', 'B') },
+    { PIX_FMT_RGB565BE, MKTAG(16 , 'B', 'G', 'R') },
+    { PIX_FMT_BGR565BE, MKTAG(16 , 'R', 'G', 'B') },
+    { PIX_FMT_RGBA,     MKTAG('R', 'G', 'B', 'A') },
+    { PIX_FMT_BGRA,     MKTAG('B', 'G', 'R', 'A') },
+    { PIX_FMT_ABGR,     MKTAG('A', 'B', 'G', 'R') },
+    { PIX_FMT_ARGB,     MKTAG('A', 'R', 'G', 'B') },
+    { PIX_FMT_RGB24,    MKTAG('R', 'G', 'B', 24 ) },
+    { PIX_FMT_BGR24,    MKTAG('B', 'G', 'R', 24 ) },
 
     /* quicktime */
     { PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') },
-- 
1.7.0




More information about the ffmpeg-devel mailing list