[vlc-commits] video_output: assume rendered text is in sRGB if no colorimetry is set
Steve Lhomme
git at videolan.org
Tue Jun 4 08:53:00 CEST 2019
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun 3 11:52:34 2019 +0200| [fe1eb71e84c712f69d0f47c036c114c290aab925] | committer: Steve Lhomme
video_output: assume rendered text is in sRGB if no colorimetry is set
(cherry picked from commit 16bd6f1c87c7882318be6da4b9346d41f73259ab)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=fe1eb71e84c712f69d0f47c036c114c290aab925
---
src/video_output/vout_subpictures.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 41fe8d5159..7dbeee3a2a 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -679,6 +679,14 @@ static void SpuRenderRegion(spu_t *spu,
/* Render text region */
if (region->fmt.i_chroma == VLC_CODEC_TEXT) {
+ // assume rendered text is in sRGB if nothing is set
+ if (region->fmt.transfer == TRANSFER_FUNC_UNDEF)
+ region->fmt.transfer = TRANSFER_FUNC_SRGB;
+ if (region->fmt.primaries == COLOR_PRIMARIES_UNDEF)
+ region->fmt.primaries = COLOR_PRIMARIES_SRGB;
+ if (region->fmt.space == COLOR_SPACE_UNDEF)
+ region->fmt.space = COLOR_SPACE_SRGB;
+
SpuRenderText(spu, &restore_text, region,
chroma_list,
render_date - subpic->i_start);
More information about the vlc-commits
mailing list