Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/2] pixfmt: add AV_PIX_FMT_GRAY32
@ 2025-01-21 15:17 Lynne
  2025-01-21 15:17 ` [FFmpeg-devel] [PATCH 2/2] vulkan: add support for AV_PIX_FMT_GRAY32 Lynne
  0 siblings, 1 reply; 2+ messages in thread
From: Lynne @ 2025-01-21 15:17 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Lynne

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".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-21 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-21 15:17 [FFmpeg-devel] [PATCH 1/2] pixfmt: add AV_PIX_FMT_GRAY32 Lynne
2025-01-21 15:17 ` [FFmpeg-devel] [PATCH 2/2] vulkan: add support for AV_PIX_FMT_GRAY32 Lynne

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