From: Lynne <dev@lynne.ee>
To: ffmpeg-devel@ffmpeg.org
Cc: Lynne <dev@lynne.ee>
Subject: [FFmpeg-devel] [PATCH 1/2] pixfmt: add AV_PIX_FMT_GRAY32
Date: Wed, 22 Jan 2025 00:17:11 +0900
Message-ID: <20250121151722.1463105-1-dev@lynne.ee> (raw)
This is a useful format for high-precision intermediates.
---
libavutil/pixdesc.c | 21 +++++++++++++++++++++
libavutil/pixfmt.h | 4 ++++
2 files changed, 25 insertions(+)
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index e595c76232..857cc013ca 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -797,6 +797,27 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.alias = "y16le",
},
+ [AV_PIX_FMT_GRAY32BE] = {
+ .name = "gray32be",
+ .nb_components = 1,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 4, 0, 0, 32 }, /* Y */
+ },
+ .flags = AV_PIX_FMT_FLAG_BE,
+ .alias = "y32be",
+ },
+ [AV_PIX_FMT_GRAY32LE] = {
+ .name = "gray32le",
+ .nb_components = 1,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 4, 0, 0, 32 }, /* Y */
+ },
+ .alias = "y32le",
+ },
[AV_PIX_FMT_YUV440P] = {
.name = "yuv440p",
.nb_components = 3,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 3215266091..1cd2134712 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -463,6 +463,9 @@ enum AVPixelFormat {
AV_PIX_FMT_XV48BE, ///< packed XVYU 4:4:4, 64bpp, big-endian, variant of Y416 where alpha channel is left undefined
AV_PIX_FMT_XV48LE, ///< packed XVYU 4:4:4, 64bpp, little-endian, variant of Y416 where alpha channel is left undefined
+ AV_PIX_FMT_GRAY32BE, ///< Y , 32bpp, big-endian
+ AV_PIX_FMT_GRAY32LE, ///< Y , 32bpp, little-endian
+
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
};
@@ -484,6 +487,7 @@ enum AVPixelFormat {
#define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE)
#define AV_PIX_FMT_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE)
#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
+#define AV_PIX_FMT_GRAY32 AV_PIX_FMT_NE(GRAY32BE, GRAY32LE)
#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE)
#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)
#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)
--
2.47.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 reply other threads:[~2025-01-21 15:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-21 15:17 Lynne [this message]
2025-01-21 15:17 ` [FFmpeg-devel] [PATCH 2/2] vulkan: add support for AV_PIX_FMT_GRAY32 Lynne
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=20250121151722.1463105-1-dev@lynne.ee \
--to=dev@lynne.ee \
--cc=ffmpeg-devel@ffmpeg.org \
/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