[vlc-devel] [PATCH 1/2] video_output: assume rendered text is in sRGB if no colorimetry is set
Steve Lhomme
robux4 at ycbcr.xyz
Mon Jun 3 12:03:11 CEST 2019
---
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 214c84c8d6..0fe3e729fb 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -753,6 +753,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);
--
2.17.1
More information about the vlc-devel
mailing list