[FFmpeg-cvslog] lavu/pixfmt: add AV_PIX_FMT_RGB96

Lynne git at videolan.org
Tue Oct 15 18:47:55 EEST 2024


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Thu Oct 10 07:17:21 2024 +0200| [4f387a1c4ef66aa550c5009b125f038751b27499] | committer: Lynne

lavu/pixfmt: add AV_PIX_FMT_RGB96

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4f387a1c4ef66aa550c5009b125f038751b27499
---

 libavutil/pixdesc.c              | 24 ++++++++++++++++++++++++
 libavutil/pixfmt.h               |  4 ++++
 tests/ref/fate/imgutils          |  4 ++++
 tests/ref/fate/sws-pixdesc-query |  9 +++++++++
 4 files changed, 41 insertions(+)

diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 7b63d1d7b0..d73c3f0d58 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -2800,6 +2800,30 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
         },
         .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT,
     },
+    [AV_PIX_FMT_RGB96BE] = {
+        .name = "rgb96be",
+        .nb_components = 3,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 0, 12, 0, 0, 32 },       /* R */
+            { 0, 12, 4, 0, 32 },       /* G */
+            { 0, 12, 8, 0, 32 },       /* B */
+        },
+        .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
+    },
+    [AV_PIX_FMT_RGB96LE] = {
+        .name = "rgb96le",
+        .nb_components = 3,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 0, 12, 0, 0, 32 },       /* R */
+            { 0, 12, 4, 0, 32 },       /* G */
+            { 0, 12, 8, 0, 32 },       /* B */
+        },
+        .flags = AV_PIX_FMT_FLAG_RGB,
+    },
     [AV_PIX_FMT_RGBAF32BE] = {
         .name = "rgbaf32be",
         .nb_components = 4,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 901afbaed3..0dc4abc972 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -454,6 +454,9 @@ enum AVPixelFormat {
     AV_PIX_FMT_RGBA128BE,   ///< packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian
     AV_PIX_FMT_RGBA128LE,   ///< packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian
 
+    AV_PIX_FMT_RGB96BE,     ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., big-endian
+    AV_PIX_FMT_RGB96LE,     ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., 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
 };
 
@@ -565,6 +568,7 @@ enum AVPixelFormat {
 #define AV_PIX_FMT_RGBF32     AV_PIX_FMT_NE(RGBF32BE, RGBF32LE)
 #define AV_PIX_FMT_RGBAF32    AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE)
 
+#define AV_PIX_FMT_RGB96      AV_PIX_FMT_NE(RGB96BE, RGB96LE)
 #define AV_PIX_FMT_RGBA128    AV_PIX_FMT_NE(RGBA128BE, RGBA128LE)
 
 /**
diff --git a/tests/ref/fate/imgutils b/tests/ref/fate/imgutils
index 248704beb7..8639baa550 100644
--- a/tests/ref/fate/imgutils
+++ b/tests/ref/fate/imgutils
@@ -278,6 +278,8 @@ rgbf16be        planes: 1, linesizes: 384   0   0   0, plane_sizes: 18432     0
 rgbf16le        planes: 1, linesizes: 384   0   0   0, plane_sizes: 18432     0     0     0, plane_offsets:     0     0     0, total_size: 18432
 rgba128be       planes: 1, linesizes: 1024   0   0   0, plane_sizes: 49152     0     0     0, plane_offsets:     0     0     0, total_size: 49152
 rgba128le       planes: 1, linesizes: 1024   0   0   0, plane_sizes: 49152     0     0     0, plane_offsets:     0     0     0, total_size: 49152
+rgb96be         planes: 1, linesizes: 768   0   0   0, plane_sizes: 36864     0     0     0, plane_offsets:     0     0     0, total_size: 36864
+rgb96le         planes: 1, linesizes: 768   0   0   0, plane_sizes: 36864     0     0     0, plane_offsets:     0     0     0, total_size: 36864
 
 image_fill_black tests
 yuv420p         total_size:   4608,  black_unknown_crc: 0xd00f6cc6,  black_tv_crc: 0xd00f6cc6,  black_pc_crc: 0x234969af
@@ -503,3 +505,5 @@ rgbf16be        total_size:  18432,  black_unknown_crc: 0x00000000,  black_tv_cr
 rgbf16le        total_size:  18432,  black_unknown_crc: 0x00000000,  black_tv_crc: 0x00000000,  black_pc_crc: 0x00000000
 rgba128be       total_size:  49152,  black_unknown_crc: 0x59ef499b,  black_tv_crc: 0x59ef499b,  black_pc_crc: 0x59ef499b
 rgba128le       total_size:  49152,  black_unknown_crc: 0x59ef499b,  black_tv_crc: 0x59ef499b,  black_pc_crc: 0x59ef499b
+rgb96be         total_size:  36864,  black_unknown_crc: 0x00000000,  black_tv_crc: 0x00000000,  black_pc_crc: 0x00000000
+rgb96le         total_size:  36864,  black_unknown_crc: 0x00000000,  black_tv_crc: 0x00000000,  black_pc_crc: 0x00000000
diff --git a/tests/ref/fate/sws-pixdesc-query b/tests/ref/fate/sws-pixdesc-query
index 83bf3d31a1..aa2edcfcb0 100644
--- a/tests/ref/fate/sws-pixdesc-query
+++ b/tests/ref/fate/sws-pixdesc-query
@@ -180,6 +180,7 @@ isBE:
   rgb48be
   rgb555be
   rgb565be
+  rgb96be
   rgba128be
   rgba64be
   rgbaf16be
@@ -542,6 +543,8 @@ isRGB:
   rgb565be
   rgb565le
   rgb8
+  rgb96be
+  rgb96le
   rgba128be
   rgba128le
   rgba64be
@@ -704,6 +707,8 @@ AnyRGB:
   rgb565be
   rgb565le
   rgb8
+  rgb96be
+  rgb96le
   rgba128be
   rgba128le
   rgba64be
@@ -835,6 +840,8 @@ Packed:
   rgb565be
   rgb565le
   rgb8
+  rgb96be
+  rgb96le
   rgba128be
   rgba128le
   rgba64be
@@ -1043,6 +1050,8 @@ PackedRGB:
   rgb565be
   rgb565le
   rgb8
+  rgb96be
+  rgb96le
   rgba128be
   rgba128le
   rgba64be



More information about the ffmpeg-cvslog mailing list