Commit 88c21a6f authored by Peter Ross's avatar Peter Ross

Add PIX_FMT_RGB48BE and PIX_FMT_RGB48LE.

Originally committed as revision 17510 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0d8f0abf
...@@ -199,6 +199,22 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { ...@@ -199,6 +199,22 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
.depth = 8, .depth = 8,
.x_chroma_shift = 0, .y_chroma_shift = 0, .x_chroma_shift = 0, .y_chroma_shift = 0,
}, },
[PIX_FMT_RGB48BE] = {
.name = "rgb48be",
.nb_channels = 3,
.color_type = FF_COLOR_RGB,
.pixel_type = FF_PIXEL_PACKED,
.depth = 16,
.x_chroma_shift = 0, .y_chroma_shift = 0,
},
[PIX_FMT_RGB48LE] = {
.name = "rgb48le",
.nb_channels = 3,
.color_type = FF_COLOR_RGB,
.pixel_type = FF_PIXEL_PACKED,
.depth = 16,
.x_chroma_shift = 0, .y_chroma_shift = 0,
},
[PIX_FMT_RGB565] = { [PIX_FMT_RGB565] = {
.name = "rgb565", .name = "rgb565",
.nb_channels = 3, .nb_channels = 3,
...@@ -529,6 +545,10 @@ int ff_fill_linesize(AVPicture *picture, int pix_fmt, int width) ...@@ -529,6 +545,10 @@ int ff_fill_linesize(AVPicture *picture, int pix_fmt, int width)
case PIX_FMT_BGR32_1: case PIX_FMT_BGR32_1:
picture->linesize[0] = width * 4; picture->linesize[0] = width * 4;
break; break;
case PIX_FMT_RGB48BE:
case PIX_FMT_RGB48LE:
picture->linesize[0] = width * 6;
break;
case PIX_FMT_GRAY16BE: case PIX_FMT_GRAY16BE:
case PIX_FMT_GRAY16LE: case PIX_FMT_GRAY16LE:
case PIX_FMT_BGR555: case PIX_FMT_BGR555:
...@@ -616,6 +636,8 @@ int ff_fill_pointer(AVPicture *picture, uint8_t *ptr, int pix_fmt, ...@@ -616,6 +636,8 @@ int ff_fill_pointer(AVPicture *picture, uint8_t *ptr, int pix_fmt,
case PIX_FMT_BGR32: case PIX_FMT_BGR32:
case PIX_FMT_RGB32_1: case PIX_FMT_RGB32_1:
case PIX_FMT_BGR32_1: case PIX_FMT_BGR32_1:
case PIX_FMT_RGB48BE:
case PIX_FMT_RGB48LE:
case PIX_FMT_GRAY16BE: case PIX_FMT_GRAY16BE:
case PIX_FMT_GRAY16LE: case PIX_FMT_GRAY16LE:
case PIX_FMT_BGR555: case PIX_FMT_BGR555:
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 49 #define LIBAVUTIL_VERSION_MAJOR 49
#define LIBAVUTIL_VERSION_MINOR 14 #define LIBAVUTIL_VERSION_MINOR 15
#define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...@@ -130,6 +130,8 @@ enum PixelFormat { ...@@ -130,6 +130,8 @@ enum PixelFormat {
PIX_FMT_VDPAU_MPEG2,///< MPEG-2 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_VDPAU_MPEG2,///< MPEG-2 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_VDPAU_WMV3,///< WMV3 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_VDPAU_WMV3,///< WMV3 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_VDPAU_VC1, ///< VC-1 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_VDPAU_VC1, ///< VC-1 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_RGB48BE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, big-endian
PIX_FMT_RGB48LE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, little-endian
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 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
}; };
...@@ -139,12 +141,14 @@ enum PixelFormat { ...@@ -139,12 +141,14 @@ enum PixelFormat {
#define PIX_FMT_ARGB PIX_FMT_RGB32 #define PIX_FMT_ARGB PIX_FMT_RGB32
#define PIX_FMT_ABGR PIX_FMT_BGR32 #define PIX_FMT_ABGR PIX_FMT_BGR32
#define PIX_FMT_GRAY16 PIX_FMT_GRAY16BE #define PIX_FMT_GRAY16 PIX_FMT_GRAY16BE
#define PIX_FMT_RGB48 PIX_FMT_RGB48BE
#else #else
#define PIX_FMT_RGBA PIX_FMT_BGR32 #define PIX_FMT_RGBA PIX_FMT_BGR32
#define PIX_FMT_BGRA PIX_FMT_RGB32 #define PIX_FMT_BGRA PIX_FMT_RGB32
#define PIX_FMT_ARGB PIX_FMT_BGR32_1 #define PIX_FMT_ARGB PIX_FMT_BGR32_1
#define PIX_FMT_ABGR PIX_FMT_RGB32_1 #define PIX_FMT_ABGR PIX_FMT_RGB32_1
#define PIX_FMT_GRAY16 PIX_FMT_GRAY16LE #define PIX_FMT_GRAY16 PIX_FMT_GRAY16LE
#define PIX_FMT_RGB48 PIX_FMT_RGB48LE
#endif #endif
#if LIBAVUTIL_VERSION_INT < (50<<16) #if LIBAVUTIL_VERSION_INT < (50<<16)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment