[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:50:07 CEST 2019
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun 3 11:52:34 2019 +0200| [ef87aa71f278f41b2938b5917cc271303766ac97] | 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=ef87aa71f278f41b2938b5917cc271303766ac97
---
src/video_output/vout_subpictures.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 41fe8d5159..6cd7f2ebd4 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -679,6 +679,16 @@ 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;
+ if (region->fmt.color_range == COLOR_RANGE_UNDEF)
+ region->fmt.color_range = COLOR_RANGE_FULL;
+
SpuRenderText(spu, &restore_text, region,
chroma_list,
render_date - subpic->i_start);
More information about the vlc-commits
mailing list