[vlc-commits] image: use the colorimetry parameters from the source when converting
Steve Lhomme
git at videolan.org
Tue Jun 4 08:32:43 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun 3 13:23:54 2019 +0200| [282ae08400653615bbb90c0e5f75915991869fd7] | committer: Steve Lhomme
image: use the colorimetry parameters from the source when converting
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=282ae08400653615bbb90c0e5f75915991869fd7
---
src/misc/image.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/misc/image.c b/src/misc/image.c
index 9d7e5adea0..7d48c8ae09 100644
--- a/src/misc/image.c
+++ b/src/misc/image.c
@@ -225,6 +225,12 @@ static picture_t *ImageRead( image_handler_t *p_image, block_t *p_block,
p_fmt_out->i_visible_width = p_fmt_out->i_width;
if( !p_fmt_out->i_visible_height )
p_fmt_out->i_visible_height = p_fmt_out->i_height;
+ if( p_fmt_out->transfer == TRANSFER_FUNC_UNDEF )
+ p_fmt_out->transfer = p_image->p_dec->fmt_out.video.transfer;
+ if( p_fmt_out->primaries == COLOR_PRIMARIES_UNDEF )
+ p_fmt_out->primaries = p_image->p_dec->fmt_out.video.primaries;
+ if( p_fmt_out->space == COLOR_SPACE_UNDEF )
+ p_fmt_out->space = p_image->p_dec->fmt_out.video.space;
/* Check if we need chroma conversion or resizing */
if( p_image->p_dec->fmt_out.video.i_chroma != p_fmt_out->i_chroma ||
More information about the vlc-commits
mailing list