From 0c19a8ff277f577091e79b02fd3b9f864e372221 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 7 Nov 2017 14:02:12 +0100 Subject: [PATCH] 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. (cherry picked from commit 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 56dbf2fcbb..9042a48a9b 100644 --- a/include/vlc_fourcc.h +++ b/include/vlc_fourcc.h @@ -330,6 +330,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 b807c22a41..a0886de904 100644 --- a/src/misc/fourcc.c +++ b/src/misc/fourcc.c @@ -743,7 +743,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_VUYA, 0 }, PACKED_FMT(4, 32) }, diff --git a/src/misc/fourcc_list.h b/src/misc/fourcc_list.h index 1c27e6bbd9..ba7f9a8f01 100644 --- a/src/misc/fourcc_list.h +++ b/src/misc/fourcc_list.h @@ -800,6 +800,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"),