Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
Add interleaved 4:2:2 8/10-bit formats
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
Kieran Kunhya authored and michaelni committed Sep 22, 2013
1 parent e07ac72 commit 90ca5a9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
36 changes: 36 additions & 0 deletions libavutil/pixdesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,42 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.name = "bayer_grbg16be",
BAYER16_DESC_COMMON
},
[AV_PIX_FMT_NV16] = {
.name = "nv16",
.nb_components = 3,
.log2_chroma_w = 1,
.log2_chroma_h = 0,
.comp = {
{ 0, 0, 1, 0, 7 }, /* Y */
{ 1, 1, 1, 0, 7 }, /* U */
{ 1, 1, 2, 0, 7 }, /* V */
},
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_NV20LE] = {
.name = "nv20le",
.nb_components = 3,
.log2_chroma_w = 1,
.log2_chroma_h = 0,
.comp = {
{ 0, 0, 1, 0, 9 }, /* Y */
{ 1, 1, 1, 0, 9 }, /* U */
{ 1, 1, 3, 0, 9 }, /* V */
},
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_NV20BE] = {
.name = "nv20be",
.nb_components = 3,
.log2_chroma_w = 1,
.log2_chroma_h = 0,
.comp = {
{ 0, 0, 1, 0, 9 }, /* Y */
{ 1, 1, 1, 0, 9 }, /* U */
{ 1, 1, 3, 0, 9 }, /* V */
},
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE,
},
};

FF_DISABLE_DEPRECATION_WARNINGS
Expand Down
4 changes: 4 additions & 0 deletions libavutil/pixfmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ enum AVPixelFormat {

AV_PIX_FMT_XYZ12LE, ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as little-endian, the 4 lower bits are set to 0
AV_PIX_FMT_XYZ12BE, ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big-endian, the 4 lower bits are set to 0
AV_PIX_FMT_NV16, ///< interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
AV_PIX_FMT_NV20LE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
AV_PIX_FMT_NV20BE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian

#ifndef AV_PIX_FMT_ABI_GIT_MASTER
AV_PIX_FMT_RGBA64BE=0x123, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
Expand Down Expand Up @@ -339,6 +342,7 @@ enum AVPixelFormat {
#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE)

#define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE)
#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE)

#if FF_API_PIX_FMT
#define PixelFormat AVPixelFormat
Expand Down

0 comments on commit 90ca5a9

Please sign in to comment.