[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:49:27 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun 3 11:52:34 2019 +0200| [16bd6f1c87c7882318be6da4b9346d41f73259ab] | committer: Steve Lhomme
video_output: assume rendered text is in sRGB if no colorimetry is set
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=16bd6f1c87c7882318be6da4b9346d41f73259ab
---
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 38785e4bfa..0cb80fc1ed 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -752,6 +752,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 - entry->start);
More information about the vlc-commits
mailing list