[vlc-devel] [PATCH 3/4] jpeg: set the colorspace and primaries to sRGB as well

Steve Lhomme robux4 at ycbcr.xyz
Mon Jun 3 14:22:39 CEST 2019


The transfer was already set.

If we don't do that it may be assumed to be 709 or 601 depending on
the picture dimensions.
---
 modules/codec/jpeg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/codec/jpeg.c b/modules/codec/jpeg.c
index 788a6d78c6..486502b211 100644
--- a/modules/codec/jpeg.c
+++ b/modules/codec/jpeg.c
@@ -180,7 +180,9 @@ static int OpenDecoder(vlc_object_t *p_this)
 
     p_dec->fmt_out.video.i_chroma =
     p_dec->fmt_out.i_codec = VLC_CODEC_RGB24;
-    p_dec->fmt_out.video.transfer = TRANSFER_FUNC_SRGB;
+    p_dec->fmt_out.video.transfer  = TRANSFER_FUNC_SRGB;
+    p_dec->fmt_out.video.space     = COLOR_SPACE_SRGB;
+    p_dec->fmt_out.video.primaries = COLOR_PRIMARIES_SRGB;
     p_dec->fmt_out.video.color_range = COLOR_RANGE_FULL;
     video_format_FixRgb(&p_dec->fmt_out.video);
 
-- 
2.17.1



More information about the vlc-devel mailing list