Fix subtitle vertical position (#2367).
authorCarl Hetherington <cth@carlh.net>
Fri, 18 Nov 2022 09:56:42 +0000 (10:56 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 21 Nov 2022 19:09:28 +0000 (20:09 +0100)
commit323b8cbb0b95297fbd027ffdc4ea5003b59ef25f
tree9d558917b9a6ad488fc127293fba2b903c329d2b
parentb9f949d688b6e9563f6350286bbbc3f169b1b9fe
Fix subtitle vertical position (#2367).

Previously we would not account for the differences in what vertical
position means between Interop and SMPTE.  For interop, vertical
position is the distance from the reference point to the text
baseline, whereas for SMPTE it is the distance from the reference
point to the top/middle/bottom of the subtitle (depending on the
reference).

This caused differences between the preview and the DCP for some
cases (notably, using SRT/SSA and making Interop DCPs, or converting
Interop DCP subs to SMPTE, or vice versa).
src/lib/reel_writer.cc
src/lib/reel_writer.h
src/lib/render_text.cc
src/lib/render_text.h
test/data
test/subtitle_position_test.cc [new file with mode: 0644]
test/wscript