From 5e7ec41119961114a9b4df90d1c9ced580667f54 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 12 Dec 2022 00:51:56 +0100 Subject: Support the 2014 version of SMPTE 428-7 in render_text.cc and use it when placing subtitles (e.g. SRT). Also default to outputting 2014-era alignment. --- src/lib/render_text.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib/render_text.cc') diff --git a/src/lib/render_text.cc b/src/lib/render_text.cc index 702f848ac..99c4c06a8 100644 --- a/src/lib/render_text.cc +++ b/src/lib/render_text.cc @@ -253,7 +253,8 @@ y_position (StringText const& first, int target_height, int baseline_to_bottom, { int y = 0; switch (first.valign_standard) { - case dcp::Standard::INTEROP: + case dcp::SubtitleStandard::INTEROP: + case dcp::SubtitleStandard::SMPTE_2014: switch (first.v_align()) { case dcp::VAlign::TOP: /* v_position is distance from top of frame to subtitle baseline */ @@ -269,7 +270,8 @@ y_position (StringText const& first, int target_height, int baseline_to_bottom, break; } break; - case dcp::Standard::SMPTE: + case dcp::SubtitleStandard::SMPTE_2007: + case dcp::SubtitleStandard::SMPTE_2010: switch (first.v_align()) { case dcp::VAlign::TOP: /* v_position is distance from top of frame to top of subtitle */ -- cgit v1.2.3