[vlc-commits] jpeg: set the colorspace and primaries to sRGB as well

Steve Lhomme git at videolan.org
Tue Jun 4 08:38:23 CEST 2019


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun  3 14:12:54 2019 +0200| [fecfba72d39f055a5f1b0c75bea43bc441927208] | committer: Steve Lhomme

jpeg: set the colorspace and primaries to sRGB as well

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.

(cherry picked from commit bb405fd42020c877fe9ce301004da499dfc7e050)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=fecfba72d39f055a5f1b0c75bea43bc441927208
---

 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 7b631acf47..9b7ec82313 100644
--- a/modules/codec/jpeg.c
+++ b/modules/codec/jpeg.c
@@ -178,7 +178,9 @@ static int OpenDecoder(vlc_object_t *p_this)
     p_dec->pf_decode = DecodeBlock;
 
     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.b_color_range_full = true;
 
     return VLC_SUCCESS;



More information about the vlc-commits mailing list