[vlc-devel] [PATCH 2/2] vpx: Read color space information
Vittorio Giovara
vittorio.giovara at gmail.com
Mon Sep 26 17:42:58 CEST 2016
---
No chance except simpler to rebase on.
Vittorio
modules/codec/vpx.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index 4bc3925..7afad6f 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -234,6 +234,24 @@ static picture_t *Decode(decoder_t *dec, block_t **pp_block)
v->b_color_range_full = img->range == VPX_CR_FULL_RANGE;
+ switch( img->cs )
+ {
+ case VPX_CS_SRGB:
+ case VPX_CS_BT_709:
+ v->space = COLOR_SPACE_BT709;
+ break;
+ case VPX_CS_BT_601:
+ case VPX_CS_SMPTE_170:
+ case VPX_CS_SMPTE_240:
+ v->space = COLOR_SPACE_BT601;
+ break;
+ case VPX_CS_BT_2020:
+ v->space = COLOR_SPACE_BT2020;
+ break;
+ default:
+ break;
+ }
+
picture_t *pic = decoder_NewPicture(dec);
if (!pic)
return NULL;
--
2.10.0
More information about the vlc-devel
mailing list