[vlc-commits] vpx: Read color space information
Vittorio Giovara
git at videolan.org
Mon Sep 26 18:48:30 CEST 2016
vlc | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Sep 26 11:42:58 2016 -0400| [e60190e80f7c85ed591ddf028a4ccfbde9a66dc5] | committer: Jean-Baptiste Kempf
vpx: Read color space information
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e60190e80f7c85ed591ddf028a4ccfbde9a66dc5
---
modules/codec/vpx.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index 5e2fcb2..3149943 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;
+ }
+
if (decoder_UpdateVideoFormat(dec))
return NULL;
picture_t *pic = decoder_NewPicture(dec);
More information about the vlc-commits
mailing list