[FFmpeg-cvslog] pixfmt: Add yuv444p12 pixel format

Luca Barbato git at videolan.org
Tue Mar 21 13:51:09 EET 2017


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sat Sep 24 23:09:43 2016 +0200| [9bd6ea5695660529b2887292874a7b9e61fc301e] | committer: Luca Barbato

pixfmt: Add yuv444p12 pixel format

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

 libavutil/pixdesc.c                       | 25 +++++++++++++++++++++++++
 libavutil/pixfmt.h                        |  4 ++++
 libswscale/swscale_unscaled.c             |  4 +++-
 libswscale/utils.c                        |  2 ++
 tests/ref/fate/filter-pixdesc-yuv444p12be |  1 +
 tests/ref/fate/filter-pixdesc-yuv444p12le |  1 +
 tests/ref/fate/filter-pixfmts-copy        |  2 ++
 tests/ref/fate/filter-pixfmts-null        |  2 ++
 tests/ref/fate/filter-pixfmts-scale       |  2 ++
 tests/ref/fate/filter-pixfmts-vflip       |  2 ++
 10 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index e0c7851..78fbdbc 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -1342,6 +1342,30 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
         },
         .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
     },
+    [AV_PIX_FMT_YUV444P12LE] = {
+        .name = "yuv444p12le",
+        .nb_components = 3,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 0, 2, 0, 0, 12, 1, 11, 1 },        /* Y */
+            { 1, 2, 0, 0, 12, 1, 11, 1 },        /* U */
+            { 2, 2, 0, 0, 12, 1, 11, 1 },        /* V */
+        },
+        .flags = AV_PIX_FMT_FLAG_PLANAR,
+    },
+    [AV_PIX_FMT_YUV444P12BE] = {
+        .name = "yuv444p12be",
+        .nb_components = 3,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 0, 2, 0, 0, 12, 1, 11, 1 },        /* Y */
+            { 1, 2, 0, 0, 12, 1, 11, 1 },        /* U */
+            { 2, 2, 0, 0, 12, 1, 11, 1 },        /* V */
+        },
+        .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
+    },
     [AV_PIX_FMT_YUV444P10LE] = {
         .name = "yuv444p10le",
         .nb_components = 3,
@@ -1892,6 +1916,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
     PIX_FMT_SWAP_ENDIANNESS(YUV444P10);
     PIX_FMT_SWAP_ENDIANNESS(YUV420P12);
     PIX_FMT_SWAP_ENDIANNESS(YUV422P12);
+    PIX_FMT_SWAP_ENDIANNESS(YUV444P12);
     PIX_FMT_SWAP_ENDIANNESS(YUV420P16);
     PIX_FMT_SWAP_ENDIANNESS(YUV422P16);
     PIX_FMT_SWAP_ENDIANNESS(YUV444P16);
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 3e356af..908b0fe 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -236,6 +236,9 @@ enum AVPixelFormat {
     AV_PIX_FMT_YUV422P12BE, ///< planar YUV 4:2:2, 24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
     AV_PIX_FMT_YUV422P12LE, ///< planar YUV 4:2:2, 24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
 
+    AV_PIX_FMT_YUV444P12BE, ///< planar YUV 4:4:4, 36bpp, (1 Cr & Cb sample per 1x1 Y), big-endian
+    AV_PIX_FMT_YUV444P12LE, ///< planar YUV 4:4:4, 36bpp, (1 Cr & Cb sample per 1x1 Y), 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
 };
 
@@ -271,6 +274,7 @@ enum AVPixelFormat {
 #define AV_PIX_FMT_YUV444P10 AV_PIX_FMT_NE(YUV444P10BE, YUV444P10LE)
 #define AV_PIX_FMT_YUV420P12 AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE)
 #define AV_PIX_FMT_YUV422P12 AV_PIX_FMT_NE(YUV422P12BE, YUV422P12LE)
+#define AV_PIX_FMT_YUV444P12 AV_PIX_FMT_NE(YUV444P12BE, YUV444P12LE)
 #define AV_PIX_FMT_YUV420P16 AV_PIX_FMT_NE(YUV420P16BE, YUV420P16LE)
 #define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
 #define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index 31706ca..ad87bbc 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -1159,10 +1159,12 @@ void ff_get_unscaled_swscale(SwsContext *c)
          dstFormat != AV_PIX_FMT_P010LE && dstFormat != AV_PIX_FMT_P010BE &&
          dstFormat != AV_PIX_FMT_YUV420P12LE && dstFormat != AV_PIX_FMT_YUV420P12BE &&
          dstFormat != AV_PIX_FMT_YUV422P12LE && dstFormat != AV_PIX_FMT_YUV422P12BE &&
+         dstFormat != AV_PIX_FMT_YUV444P12LE && dstFormat != AV_PIX_FMT_YUV444P12BE &&
          srcFormat != AV_PIX_FMT_NV12 && srcFormat != AV_PIX_FMT_NV21 &&
          srcFormat != AV_PIX_FMT_P010LE && srcFormat != AV_PIX_FMT_P010BE &&
          srcFormat != AV_PIX_FMT_YUV420P12LE && srcFormat != AV_PIX_FMT_YUV420P12BE &&
-         srcFormat != AV_PIX_FMT_YUV422P12LE && srcFormat != AV_PIX_FMT_YUV422P12BE))
+         srcFormat != AV_PIX_FMT_YUV422P12LE && srcFormat != AV_PIX_FMT_YUV422P12BE &&
+         srcFormat != AV_PIX_FMT_YUV444P12LE && srcFormat != AV_PIX_FMT_YUV444P12BE))
     {
         if (isPacked(c->srcFormat))
             c->swscale = packedCopyWrapper;
diff --git a/libswscale/utils.c b/libswscale/utils.c
index dc44292..b7b534d 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -177,6 +177,8 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
     [AV_PIX_FMT_YUV444P9LE]  = { 1, 1 },
     [AV_PIX_FMT_YUV444P10BE] = { 1, 1 },
     [AV_PIX_FMT_YUV444P10LE] = { 1, 1 },
+    [AV_PIX_FMT_YUV444P12BE] = { 1, 1 },
+    [AV_PIX_FMT_YUV444P12LE] = { 1, 1 },
     [AV_PIX_FMT_GBRP]        = { 1, 1 },
     [AV_PIX_FMT_GBRP9LE]     = { 1, 1 },
     [AV_PIX_FMT_GBRP9BE]     = { 1, 1 },
diff --git a/tests/ref/fate/filter-pixdesc-yuv444p12be b/tests/ref/fate/filter-pixdesc-yuv444p12be
new file mode 100644
index 0000000..e8c1201
--- /dev/null
+++ b/tests/ref/fate/filter-pixdesc-yuv444p12be
@@ -0,0 +1 @@
+pixdesc-yuv444p12be f20564006d137df0fc6bb7466fd0fc64
diff --git a/tests/ref/fate/filter-pixdesc-yuv444p12le b/tests/ref/fate/filter-pixdesc-yuv444p12le
new file mode 100644
index 0000000..9807ff0
--- /dev/null
+++ b/tests/ref/fate/filter-pixdesc-yuv444p12le
@@ -0,0 +1 @@
+pixdesc-yuv444p12le 9d5db1a9354b62181e09aa93c1ffa19a
diff --git a/tests/ref/fate/filter-pixfmts-copy b/tests/ref/fate/filter-pixfmts-copy
index 6ffeed0..c712f78 100644
--- a/tests/ref/fate/filter-pixfmts-copy
+++ b/tests/ref/fate/filter-pixfmts-copy
@@ -62,6 +62,8 @@ yuv440p             12000ce709b38aac3f7b7f59b07847ef
 yuv444p             628c9d1e10c22e0e512b27c0e03b46e6
 yuv444p10be         b60d77db54a592ed088ebf7964e2dd5e
 yuv444p10le         1752a238eb27fb7c746e349536f60686
+yuv444p12be         be54f88f9b9034b5b9bc466132bfba10
+yuv444p12le         714c3c5789897b56cb9ae6a45688e395
 yuv444p16be         8e1e2f04cb2e97f80fdfecbb2c5679a0
 yuv444p16le         5677b2caa63e0c075eac6937b03cf2a6
 yuv444p9be          5ab55576b180b2966e9ed5a1ea55508a
diff --git a/tests/ref/fate/filter-pixfmts-null b/tests/ref/fate/filter-pixfmts-null
index 6ffeed0..c712f78 100644
--- a/tests/ref/fate/filter-pixfmts-null
+++ b/tests/ref/fate/filter-pixfmts-null
@@ -62,6 +62,8 @@ yuv440p             12000ce709b38aac3f7b7f59b07847ef
 yuv444p             628c9d1e10c22e0e512b27c0e03b46e6
 yuv444p10be         b60d77db54a592ed088ebf7964e2dd5e
 yuv444p10le         1752a238eb27fb7c746e349536f60686
+yuv444p12be         be54f88f9b9034b5b9bc466132bfba10
+yuv444p12le         714c3c5789897b56cb9ae6a45688e395
 yuv444p16be         8e1e2f04cb2e97f80fdfecbb2c5679a0
 yuv444p16le         5677b2caa63e0c075eac6937b03cf2a6
 yuv444p9be          5ab55576b180b2966e9ed5a1ea55508a
diff --git a/tests/ref/fate/filter-pixfmts-scale b/tests/ref/fate/filter-pixfmts-scale
index a56d5c7..0a3f3f1 100644
--- a/tests/ref/fate/filter-pixfmts-scale
+++ b/tests/ref/fate/filter-pixfmts-scale
@@ -62,6 +62,8 @@ yuv440p             4713a7b7ce80dd06923626d13589c098
 yuv444p             fd733672651ad5bbffb046fd67151fee
 yuv444p10be         34b38d54167df70044bdc08518d91009
 yuv444p10le         0812e3371c9589c6621408812f9e7a27
+yuv444p12be         936147950ba1b511570da85a0922abf3
+yuv444p12le         4a9ec677190371ef5e342ffac1ace735
 yuv444p16be         e89fe5a4624ed06603580b4a74af9170
 yuv444p16le         6944d11048ff4013c5e60359faf1bd2d
 yuv444p9be          04a950e843d099eb9ade2ddcea494fb3
diff --git a/tests/ref/fate/filter-pixfmts-vflip b/tests/ref/fate/filter-pixfmts-vflip
index 9e7a916..b8718c7 100644
--- a/tests/ref/fate/filter-pixfmts-vflip
+++ b/tests/ref/fate/filter-pixfmts-vflip
@@ -62,6 +62,8 @@ yuv440p             fade395d957e1e3b117ac11c09404964
 yuv444p             a3c2a074c3609226bf1a0bc4de5c0e51
 yuv444p10be         b02fac8bc5a564a755567a86dc3ceae0
 yuv444p10le         88860297f729c90526b157b6bf1e2fcf
+yuv444p12be         d8af56e4b09130e14a9449c84a03cab0
+yuv444p12le         0ccfbd671b8000c0f950b9dfae8ea879
 yuv444p16be         26fbffad3c28aa1a6c47f2be6d146173
 yuv444p16le         3d13dcea82caec9eb563a1d7a2e4b339
 yuv444p9be          df39c0778e5b13f306e9928c5b0ddbb2



More information about the ffmpeg-cvslog mailing list