From: Philip Langdale <philipl@overt.org> To: ffmpeg-devel@ffmpeg.org Cc: Mark Thompson <sw@jkqxz.net>, Philip Langdale <philipl@overt.org> Subject: [FFmpeg-devel] [PATCH 1/3] lavu/pixfmt: Add packed 4:4:4 format Date: Sat, 23 Jul 2022 11:53:13 -0700 Message-ID: <20220723185315.207081-2-philipl@overt.org> (raw) In-Reply-To: <20220723185315.207081-1-philipl@overt.org> The "AYUV" format is defined by Microsoft as their preferred format for 4:4:4 content, and so it is the format used by Intel VAAPI and QSV. As Microsoft like to define their byte ordering in little-endian fashion, the memory order is reversed, and so our pix_fmt, which follows memory order, has a reversed name (VUYA). --- doc/APIchanges | 3 +++ libavutil/pixdesc.c | 13 +++++++++++++ libavutil/pixfmt.h | 2 ++ libavutil/version.h | 2 +- tests/ref/fate/imgutils | 1 + tests/ref/fate/sws-pixdesc-query | 4 ++++ 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index b3563cd528..35e6fda6bc 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,9 @@ libavutil: 2021-04-27 API changes, most recent first: +2021-11-22 - xxxxxxxxxx - lavu 57.31.100 - pixfmt.h + Add AV_PIX_FMT_VUYA. + 2022-07-xx - xxxxxxxxxx - lavu 57.30.100 - frame.h Add AVFrame.duration, deprecate AVFrame.pkt_duration. diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index 6e57a82cb6..e078fd5320 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -2491,6 +2491,19 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, + [AV_PIX_FMT_VUYA] = { + .name = "vuya", + .nb_components = 4, + .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 */ + { 0, 4, 3, 0, 8 }, /* A */ + }, + .flags = AV_PIX_FMT_FLAG_ALPHA, + }, }; static const char * const color_range_names[] = { diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 2d3927cc3f..9d1fdaf82d 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -367,6 +367,8 @@ enum AVPixelFormat { AV_PIX_FMT_P416BE, ///< interleaved chroma YUV 4:4:4, 48bpp, big-endian AV_PIX_FMT_P416LE, ///< interleaved chroma YUV 4:4:4, 48bpp, little-endian + AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4, 32bpp, VUYAVUYA... + 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 }; diff --git a/libavutil/version.h b/libavutil/version.h index ee4c531b80..e9eefcdb2c 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 57 -#define LIBAVUTIL_VERSION_MINOR 30 +#define LIBAVUTIL_VERSION_MINOR 31 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ diff --git a/tests/ref/fate/imgutils b/tests/ref/fate/imgutils index b23d1b4c39..4ec66febb8 100644 --- a/tests/ref/fate/imgutils +++ b/tests/ref/fate/imgutils @@ -246,3 +246,4 @@ p216be planes: 2, linesizes: 128 128 0 0, plane_sizes: 6144 6144 p216le planes: 2, linesizes: 128 128 0 0, plane_sizes: 6144 6144 0 0, plane_offsets: 6144 0 0, total_size: 12288 p416be planes: 2, linesizes: 128 256 0 0, plane_sizes: 6144 12288 0 0, plane_offsets: 6144 0 0, total_size: 18432 p416le planes: 2, linesizes: 128 256 0 0, plane_sizes: 6144 12288 0 0, plane_offsets: 6144 0 0, total_size: 18432 +vuya planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288 diff --git a/tests/ref/fate/sws-pixdesc-query b/tests/ref/fate/sws-pixdesc-query index 76104bc5a6..bd0f1fcb82 100644 --- a/tests/ref/fate/sws-pixdesc-query +++ b/tests/ref/fate/sws-pixdesc-query @@ -215,6 +215,7 @@ isYUV: p416le uyvy422 uyyvyy411 + vuya xyz12be xyz12le y210be @@ -654,6 +655,7 @@ ALPHA: rgb32_1 rgba64be rgba64le + vuya ya16be ya16le ya8 @@ -739,6 +741,7 @@ Packed: rgba64le uyvy422 uyyvyy411 + vuya x2bgr10be x2bgr10le x2rgb10be @@ -967,5 +970,6 @@ DataInHighBits: SwappedChroma: nv21 nv42 + vuya yvyu422 -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-07-23 18:54 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-23 18:53 [FFmpeg-devel] [PATCH 0/3] vaapi: Add support for decoding 8bit 4:4:4 content Philip Langdale 2022-07-23 18:53 ` Philip Langdale [this message] 2022-07-23 18:53 ` [FFmpeg-devel] [PATCH 2/3] lavu/hwcontext_vaapi: Map the AYUV format Philip Langdale 2022-07-23 18:53 ` [FFmpeg-devel] [PATCH 3/3] lavc/vaapi: Declare support for decoding 8bit 4:4:4 content Philip Langdale 2022-07-29 17:33 ` [FFmpeg-devel] [PATCH 0/3] vaapi: Add " Philip Langdale 2022-08-03 22:51 ` Philip Langdale
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220723185315.207081-2-philipl@overt.org \ --to=philipl@overt.org \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=sw@jkqxz.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git