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.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/text_decoder.h') diff --git a/src/lib/text_decoder.h b/src/lib/text_decoder.h index 1a7632fd8..47c1be399 100644 --- a/src/lib/text_decoder.h +++ b/src/lib/text_decoder.h @@ -51,7 +51,7 @@ public: } void emit_bitmap_start (ContentBitmapText const& bitmap); - void emit_bitmap (dcpomatic::ContentTimePeriod period, std::shared_ptr image, dcpomatic::Rect rect); + void emit_bitmap(dcpomatic::ContentTimePeriod period, dcp::Size parent_size, std::shared_ptr image, dcpomatic::Rect rect); void emit_plain_start(dcpomatic::ContentTime from, std::vector s, dcp::SubtitleStandard valign_standard); void emit_plain_start (dcpomatic::ContentTime from, sub::Subtitle const & subtitle); void emit_plain(dcpomatic::ContentTimePeriod period, std::vector s, dcp::SubtitleStandard valign_standard); -- cgit v1.2.3