1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

lavu/pix_fmt: add new pixel format x2rgb10

The format is packed RGB with each channel 10 bits available and
include 2 bits unused.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
This commit is contained in:
Fei Wang 2020-04-22 13:23:01 +08:00 committed by Lynne
parent 38737b3d4e
commit b09fb030c1
5 changed files with 40 additions and 1 deletions

View File

@ -252,6 +252,30 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_X2RGB10LE] = {
.name = "x2rgb10le",
.nb_components= 3,
.log2_chroma_w= 0,
.log2_chroma_h= 0,
.comp = {
{ 0, 4, 2, 4, 10, 3, 9, 2 }, /* R */
{ 0, 4, 1, 2, 10, 3, 9, 3 }, /* G */
{ 0, 4, 0, 0, 10, 3, 9, 4 }, /* B */
},
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_X2RGB10BE] = {
.name = "x2rgb10be",
.nb_components= 3,
.log2_chroma_w= 0,
.log2_chroma_h= 0,
.comp = {
{ 0, 4, 0, 4, 10, 3, 9, 2 }, /* R */
{ 0, 4, 1, 2, 10, 3, 9, 3 }, /* G */
{ 0, 4, 2, 0, 10, 3, 9, 4 }, /* B */
},
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE,
},
[AV_PIX_FMT_YUV422P] = {
.name = "yuv422p",
.nb_components = 3,

View File

@ -358,6 +358,8 @@ enum AVPixelFormat {
AV_PIX_FMT_Y210BE, ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian
AV_PIX_FMT_Y210LE, ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian
AV_PIX_FMT_X2RGB10LE, ///< packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), little-endian, X=unused/undefined
AV_PIX_FMT_X2RGB10BE, ///< packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), big-endian, X=unused/undefined
AV_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
};
@ -447,6 +449,7 @@ enum AVPixelFormat {
#define AV_PIX_FMT_P016 AV_PIX_FMT_NE(P016BE, P016LE)
#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
/**
* Chromaticity coordinates of the source primaries.

View File

@ -79,7 +79,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 56
#define LIBAVUTIL_VERSION_MINOR 54
#define LIBAVUTIL_VERSION_MINOR 55
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

View File

@ -0,0 +1 @@
pixdesc-x2rgb10le 98d697ed4668daf535163d5e08c903bb

View File

@ -57,6 +57,8 @@ isNBPS:
nv20le
p010be
p010le
x2rgb10be
x2rgb10le
xyz12be
xyz12le
y210be
@ -141,6 +143,7 @@ isBE:
rgb555be
rgb565be
rgba64be
x2rgb10be
xyz12be
y210be
ya16be
@ -436,6 +439,8 @@ isRGB:
rgb8
rgba64be
rgba64le
x2rgb10be
x2rgb10le
Gray:
gray
@ -582,6 +587,8 @@ AnyRGB:
rgb8
rgba64be
rgba64le
x2rgb10be
x2rgb10le
ALPHA:
ayuv64be
@ -689,6 +696,8 @@ Packed:
rgba64le
uyvy422
uyyvyy411
x2rgb10be
x2rgb10le
xyz12be
xyz12le
y210be
@ -853,6 +862,8 @@ PackedRGB:
rgb8
rgba64be
rgba64le
x2rgb10be
x2rgb10le
PlanarRGB:
gbrap