From 17f8f22b07bd32d57edada0acde6fd9fffe3baf3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 4 Mar 2024 00:41:01 +0100 Subject: More correctly calculate bitmap subtitle scaling (#2670). This was partially fixed before in 6ac468554c7fea0dfaefde85fb6cdd0fceaf5cad The last try accounted for cropping, but not for cases where the source video (after crop) does not precisely fit the DCP container. In those cases the x scale for the subtitles could be different to the y scale, squashing or stretching them. --- src/lib/text_decoder.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/text_decoder.cc') diff --git a/src/lib/text_decoder.cc b/src/lib/text_decoder.cc index 75fa33605..894145c35 100644 --- a/src/lib/text_decoder.cc +++ b/src/lib/text_decoder.cc @@ -352,9 +352,9 @@ TextDecoder::emit_plain (ContentTimePeriod period, sub::Subtitle const& subtitle * of the video frame) */ void -TextDecoder::emit_bitmap (ContentTimePeriod period, shared_ptr image, dcpomatic::Rect rect) +TextDecoder::emit_bitmap(ContentTimePeriod period, dcp::Size parent_size, shared_ptr image, dcpomatic::Rect rect) { - emit_bitmap_start ({ period.from, image, rect }); + emit_bitmap_start ({ period.from, parent_size, image, rect }); emit_stop (period.to); } -- cgit v1.2.3