mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavu/pixfmt: Introduce VUYX format
This is the alphaless version of VUYA that I introduced recently. After further discussion and noting that the Intel vaapi driver explicitly lists XYUV as a support format for encoding and decoding 8bit 444 content, we decided to switch our usage and avoid the overhead of having a declared alpha channel around. Note that I am not removing VUYA, as this turned out to have another use, which was to replace the need for v408enc/dec when dealing with the format. The vaapi switching will happen in the next change
This commit is contained in:
parent
61fa1e14e4
commit
cc5a5c9860
@ -14,6 +14,9 @@ libavutil: 2021-04-27
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2022-08-03 - xxxxxxxxxx - lavu 57.34.100 - pixfmt.h
|
||||
Add AV_PIX_FMT_VUYX.
|
||||
|
||||
2022-08-xx - xxxxxxxxxx - lavf 59 - avformat.h
|
||||
Deprecate av_stream_get_end_pts() without replacement.
|
||||
|
||||
|
@ -2504,6 +2504,17 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_ALPHA,
|
||||
},
|
||||
[AV_PIX_FMT_VUYX] = {
|
||||
.name = "vuyx",
|
||||
.nb_components = 3,
|
||||
.log2_chroma_w = 0,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 0, 4, 2, 0, 8 }, /* Y */
|
||||
{ 0, 4, 1, 0, 8 }, /* U */
|
||||
{ 0, 4, 0, 0, 8 }, /* V */
|
||||
},
|
||||
},
|
||||
[AV_PIX_FMT_RGBAF16BE] = {
|
||||
.name = "rgbaf16be",
|
||||
.nb_components = 4,
|
||||
|
@ -372,6 +372,8 @@ enum AVPixelFormat {
|
||||
AV_PIX_FMT_RGBAF16BE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian
|
||||
AV_PIX_FMT_RGBAF16LE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian
|
||||
|
||||
AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left 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
|
||||
};
|
||||
|
||||
|
@ -84,6 +84,7 @@ int main(void)
|
||||
TEST(AV_PIX_FMT_GBRP, AV_PIX_FMT_RGB24);
|
||||
TEST(AV_PIX_FMT_0RGB, AV_PIX_FMT_RGB24);
|
||||
TEST(AV_PIX_FMT_GBRP16, AV_PIX_FMT_RGB48);
|
||||
TEST(AV_PIX_FMT_VUYX, AV_PIX_FMT_YUV444P);
|
||||
|
||||
// Formats additionally containing alpha (here ignored).
|
||||
TEST(AV_PIX_FMT_YA8, AV_PIX_FMT_GRAY8);
|
||||
|
@ -79,8 +79,8 @@
|
||||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 57
|
||||
#define LIBAVUTIL_VERSION_MINOR 33
|
||||
#define LIBAVUTIL_VERSION_MICRO 101
|
||||
#define LIBAVUTIL_VERSION_MINOR 34
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
LIBAVUTIL_VERSION_MINOR, \
|
||||
|
@ -249,3 +249,4 @@ p416le planes: 2, linesizes: 128 256 0 0, plane_sizes: 6144 12288
|
||||
vuya planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
|
||||
rgbaf16be planes: 1, linesizes: 512 0 0 0, plane_sizes: 24576 0 0 0, plane_offsets: 0 0 0, total_size: 24576
|
||||
rgbaf16le planes: 1, linesizes: 512 0 0 0, plane_sizes: 24576 0 0 0, plane_offsets: 0 0 0, total_size: 24576
|
||||
vuyx planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
|
||||
|
@ -1 +1 @@
|
||||
74 tests passed, 0 tests failed.
|
||||
75 tests passed, 0 tests failed.
|
||||
|
@ -219,6 +219,7 @@ isYUV:
|
||||
uyvy422
|
||||
uyyvyy411
|
||||
vuya
|
||||
vuyx
|
||||
xyz12be
|
||||
xyz12le
|
||||
y210be
|
||||
@ -753,6 +754,7 @@ Packed:
|
||||
uyvy422
|
||||
uyyvyy411
|
||||
vuya
|
||||
vuyx
|
||||
x2bgr10be
|
||||
x2bgr10le
|
||||
x2rgb10be
|
||||
@ -984,5 +986,6 @@ SwappedChroma:
|
||||
nv21
|
||||
nv42
|
||||
vuya
|
||||
vuyx
|
||||
yvyu422
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user