[vlc-commits] core: add RGBA 32 bits with 10 bits per RGB channel

Steve Lhomme git at videolan.org
Tue Feb 20 16:07:19 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov  7 14:02:12 2017 +0100| [bf2f64958b262a0429d5714aa42e367d9c1f10b4] | committer: Steve Lhomme

core: add RGBA 32 bits with 10 bits per RGB channel

Equivalent to DXGI_FORMAT_R10G10B10A2_UNORM. One of the main format on Windows
to display 10 bits.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bf2f64958b262a0429d5714aa42e367d9c1f10b4
---

 include/vlc_fourcc.h   | 2 ++
 src/misc/fourcc.c      | 2 +-
 src/misc/fourcc_list.h | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 3be6a90af5..1639a78330 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -328,6 +328,8 @@
 #define VLC_CODEC_ARGB            VLC_FOURCC('A','R','G','B')
 /* 32 bits BGRA */
 #define VLC_CODEC_BGRA            VLC_FOURCC('B','G','R','A')
+/* 32 bits BGRA 10:10:10:2 */
+#define VLC_CODEC_RGBA10          VLC_FOURCC('R','G','A','0')
 /* 64 bits RGBA */
 #define VLC_CODEC_RGBA64          VLC_FOURCC('R','G','A','4')
 
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index d46b7dd9b0..5ccbbaa0c9 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -726,7 +726,7 @@ static const struct
     { { VLC_CODEC_RGB24, 0 },                  PACKED_FMT(3, 24) },
     { { VLC_CODEC_RGB32, 0 },                  PACKED_FMT(4, 24) },
     { { VLC_CODEC_RGBA, VLC_CODEC_ARGB,
-        VLC_CODEC_BGRA, },                     PACKED_FMT(4, 32) },
+        VLC_CODEC_BGRA, VLC_CODEC_RGBA10 },    PACKED_FMT(4, 32) },
     { { VLC_CODEC_RGBA64, 0 },                 PACKED_FMT(8, 64) },
 
     { { VLC_CODEC_Y211, 0 },                   { 1, { {{1,4}, {1,1}} }, 4, 32 } },
diff --git a/src/misc/fourcc_list.h b/src/misc/fourcc_list.h
index 6c7248b9dc..ed28b1f30b 100644
--- a/src/misc/fourcc_list.h
+++ b/src/misc/fourcc_list.h
@@ -799,6 +799,8 @@ static const staticentry_t p_list_video[] = {
         A("AV32"),
     B(VLC_CODEC_BGRA, "32 bits BGRA"),
         A("BGRA"),
+    B(VLC_CODEC_RGBA10, "32 bits RGB 10bits A 2bits"),
+        A("RGA0"),
     B(VLC_CODEC_RGBA64, "64 bits RGBA"),
         A("RGA4"),
 



More information about the vlc-commits mailing list