diff options
author | Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> | 2010-03-05 08:26:23 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2010-03-05 08:26:23 +0000 |
commit | 2b7cf1678ee459814c858dd5f477f26d6f4fa2e8 (patch) | |
tree | e644b3d153a3a7cc6cb7b7ff5b158fba3b3cb882 /libavutil | |
parent | 886f3f2f36e9fd140cfeb694bf37a46ab16d3221 (diff) | |
download | ffmpeg-2b7cf1678ee459814c858dd5f477f26d6f4fa2e8.tar.gz |
Add initial support for 12-bit color mode.
Patch by Janusz Krzysztofik jkrzyszt tis icnet pl
Original thread:
Subject: [FFmpeg-devel] [PATCH v2] Add initial support for 12-bit color mode.
Date: Mon, 1 Mar 2010 02:05:07 +0100
Originally committed as revision 22220 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/pixdesc.c | 46 | ||||
-rw-r--r-- | libavutil/pixfmt.h | 7 |
2 files changed, 53 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index 4d86165da7..6612b9e89d 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -594,6 +594,29 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,0,4}, /* B */ }, }, + [PIX_FMT_RGB444BE] = { + .name = "rgb444be", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,0,0,3}, /* R */ + {0,1,1,4,3}, /* G */ + {0,1,1,0,3}, /* B */ + }, + .flags = PIX_FMT_BE, + }, + [PIX_FMT_RGB444LE] = { + .name = "rgb444le", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,2,0,3}, /* R */ + {0,1,1,4,3}, /* G */ + {0,1,1,0,3}, /* B */ + }, + }, [PIX_FMT_BGR565BE] = { .name = "bgr565be", .nb_components= 3, @@ -640,6 +663,29 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,0,4}, /* R */ }, }, + [PIX_FMT_BGR444BE] = { + .name = "bgr444be", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,0,0,3}, /* B */ + {0,1,1,4,3}, /* G */ + {0,1,1,0,3}, /* R */ + }, + .flags = PIX_FMT_BE, + }, + [PIX_FMT_BGR444LE] = { + .name = "bgr444le", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,2,0,3}, /* B */ + {0,1,1,4,3}, /* G */ + {0,1,1,0,3}, /* R */ + }, + }, [PIX_FMT_VAAPI_MOCO] = { .name = "vaapi_moco", .log2_chroma_w = 1, diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 6eddde02bb..9118d3d30f 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -127,6 +127,11 @@ enum PixelFormat { PIX_FMT_YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian PIX_FMT_VDPAU_MPEG4, ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers PIX_FMT_DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer + + PIX_FMT_RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0 + PIX_FMT_RGB444LE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), little-endian, most significant bits to 0 + PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1 + PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1 PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions }; @@ -145,8 +150,10 @@ enum PixelFormat { #define PIX_FMT_RGB48 PIX_FMT_NE(RGB48BE, RGB48LE) #define PIX_FMT_RGB565 PIX_FMT_NE(RGB565BE, RGB565LE) #define PIX_FMT_RGB555 PIX_FMT_NE(RGB555BE, RGB555LE) +#define PIX_FMT_RGB444 PIX_FMT_NE(RGB444BE, RGB444LE) #define PIX_FMT_BGR565 PIX_FMT_NE(BGR565BE, BGR565LE) #define PIX_FMT_BGR555 PIX_FMT_NE(BGR555BE, BGR555LE) +#define PIX_FMT_BGR444 PIX_FMT_NE(BGR444BE, BGR444LE) #define PIX_FMT_YUV420P16 PIX_FMT_NE(YUV420P16BE, YUV420P16LE) #define PIX_FMT_YUV422P16 PIX_FMT_NE(YUV422P16BE, YUV422P16LE) |