[vlc-devel] [PATCH 3/4] core: add RGBA 32 bits with 10 bits per RGB channel
Steve Lhomme
robux4 at videolabs.io
Tue Oct 31 13:51:41 CET 2017
Equivalent to DXGI_FORMAT_R10G10B10A2_UNORM. One of the main format on Windows
to display 10 bits.
---
include/vlc_fourcc.h | 2 ++
src/misc/fourcc.c | 1 +
src/misc/fourcc_list.h | 2 ++
3 files changed, 5 insertions(+)
diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 17496d3030..3fbeae842a 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 7e4c54e59f..5fbeeb2b7b 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -689,6 +689,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, 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 b43e35d302..048bb94549 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"),
--
2.14.2
More information about the vlc-devel
mailing list