mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
lavu: add NV15 and NV20 bitstream formats support
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
parent
44bfe0da61
commit
14ff2b5ecf
3 changed files with 39 additions and 3 deletions
|
|
@ -3267,6 +3267,30 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
|
|||
.name = "ohcodec",
|
||||
.flags = AV_PIX_FMT_FLAG_HWACCEL,
|
||||
},
|
||||
[AV_PIX_FMT_NV15] = {
|
||||
.name = "nv15",
|
||||
.nb_components = 3,
|
||||
.log2_chroma_w = 1,
|
||||
.log2_chroma_h = 1,
|
||||
.comp = {
|
||||
{ 0, 10, 0, 0, 10 }, /* Y */
|
||||
{ 1, 20, 0, 0, 10 }, /* U */
|
||||
{ 1, 20, 10, 0, 10 }, /* V */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BITSTREAM,
|
||||
},
|
||||
[AV_PIX_FMT_NV20] = {
|
||||
.name = "nv20",
|
||||
.nb_components = 3,
|
||||
.log2_chroma_w = 1,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 0, 10, 0, 0, 10 }, /* Y */
|
||||
{ 1, 20, 0, 0, 10 }, /* U */
|
||||
{ 1, 20, 10, 0, 10 }, /* V */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BITSTREAM,
|
||||
},
|
||||
};
|
||||
|
||||
static const char * const color_range_names[] = {
|
||||
|
|
|
|||
|
|
@ -196,8 +196,8 @@ 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
|
||||
AV_PIX_FMT_NV20LE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian, deprecated in favor of AV_PIX_FMT_NV20
|
||||
AV_PIX_FMT_NV20BE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian, deprecated in favor of AV_PIX_FMT_NV20
|
||||
|
||||
AV_PIX_FMT_RGBA64BE, ///< 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
|
||||
AV_PIX_FMT_RGBA64LE, ///< 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 little-endian
|
||||
|
|
@ -499,6 +499,9 @@ enum AVPixelFormat {
|
|||
|
||||
AV_PIX_FMT_OHCODEC, /// hardware decoding through openharmony
|
||||
|
||||
AV_PIX_FMT_NV15, ///< like P010, but has no zero padding bits, 15bpp, bitstream
|
||||
AV_PIX_FMT_NV20, ///< like P210, but has no zero padding bits, 20bpp, bitstream
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
|
|
@ -597,7 +600,6 @@ 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)
|
||||
#define AV_PIX_FMT_AYUV64 AV_PIX_FMT_NE(AYUV64BE, AYUV64LE)
|
||||
#define AV_PIX_FMT_P010 AV_PIX_FMT_NE(P010BE, P010LE)
|
||||
#define AV_PIX_FMT_P012 AV_PIX_FMT_NE(P012BE, P012LE)
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ isNBPS:
|
|||
gray14le
|
||||
gray9be
|
||||
gray9le
|
||||
nv15
|
||||
nv20
|
||||
nv20be
|
||||
nv20le
|
||||
p010be
|
||||
|
|
@ -263,7 +265,9 @@ isYUV:
|
|||
ayuv64be
|
||||
ayuv64le
|
||||
nv12
|
||||
nv15
|
||||
nv16
|
||||
nv20
|
||||
nv20be
|
||||
nv20le
|
||||
nv21
|
||||
|
|
@ -395,7 +399,9 @@ isYUV:
|
|||
|
||||
isPlanarYUV:
|
||||
nv12
|
||||
nv15
|
||||
nv16
|
||||
nv20
|
||||
nv20be
|
||||
nv20le
|
||||
nv21
|
||||
|
|
@ -496,7 +502,9 @@ isPlanarYUV:
|
|||
|
||||
isSemiPlanarYUV:
|
||||
nv12
|
||||
nv15
|
||||
nv16
|
||||
nv20
|
||||
nv20be
|
||||
nv20le
|
||||
nv21
|
||||
|
|
@ -1011,7 +1019,9 @@ Planar:
|
|||
gbrpf32be
|
||||
gbrpf32le
|
||||
nv12
|
||||
nv15
|
||||
nv16
|
||||
nv20
|
||||
nv20be
|
||||
nv20le
|
||||
nv21
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue