summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-02-03 22:13:13 +0100
committerCarl Hetherington <cth@carlh.net>2024-02-03 22:13:13 +0100
commit52dc2f13d5cd03403da20e1764ba474c829a1a26 (patch)
tree28ff84ffc648c499ef3c647c0c85ae15a84d9739 /test
parent0226862cd32e8b2a10d0cdc0c9c5e7682d364075 (diff)
parentc9e807a398ffa4c6ba38a26e2721250bdbef10d7 (diff)
Merge branch 'main' into v2.17.x
Diffstat (limited to 'test')
-rw-r--r--test/burnt_subtitle_test.cc22
m---------test/data0
-rw-r--r--test/image_test.cc12
3 files changed, 30 insertions, 4 deletions
diff --git a/test/burnt_subtitle_test.cc b/test/burnt_subtitle_test.cc
index 9c6863a1d..8d7dcd143 100644
--- a/test/burnt_subtitle_test.cc
+++ b/test/burnt_subtitle_test.cc
@@ -30,6 +30,7 @@
#include "lib/dcp_content.h"
#include "lib/dcp_content_type.h"
#include "lib/film.h"
+#include "lib/ffmpeg_encoder.h"
#include "lib/log_entry.h"
#include "lib/ratio.h"
#include "lib/text_content.h"
@@ -184,3 +185,24 @@ BOOST_AUTO_TEST_CASE(burnt_subtitle_test_position)
/* Should have a baseline 864 pixels from the top ((1 - 0.2) * 1080) */
check("bottom");
}
+
+
+/* Bug #2743 */
+BOOST_AUTO_TEST_CASE(burn_empty_subtitle_test)
+{
+ Cleanup cl;
+
+ auto content = content_factory("test/data/empty_sub.xml")[0];
+ auto film = new_test_film2("burnt_empty_subtitle_test", { content });
+ content->text[0]->set_use(true);
+
+ auto job = make_shared<TranscodeJob>(film, TranscodeJob::ChangedBehaviour::IGNORE);
+ auto file = boost::filesystem::path("build") / "test" / "burnt_empty_subtitle_test.mov";
+ cl.add(file);
+ FFmpegEncoder encoder(film, job, file, ExportFormat::PRORES_4444, false, false, false, 23);
+ encoder.go();
+
+ cl.run();
+}
+
+
diff --git a/test/data b/test/data
-Subproject 515c71604fe16cc95a5f240b0333f78f47b9ea9
+Subproject a5b12872bf034712039414fad58e7e68c068b77
diff --git a/test/image_test.cc b/test/image_test.cc
index fae65af1c..4df4f9125 100644
--- a/test/image_test.cc
+++ b/test/image_test.cc
@@ -203,7 +203,7 @@ alpha_blend_test_rgba64be_onto(AVPixelFormat format, string suffix)
for (int y = 0; y < 128; ++y) {
auto p = reinterpret_cast<uint16_t*>(overlay->data()[0] + y * overlay->stride()[0]);
for (int x = 0; x < 128; ++x) {
- p[x * 4 + 2] = 65535;
+ p[x * 4 + 0] = 65535;
p[x * 4 + 3] = 65535;
}
}
@@ -219,7 +219,7 @@ alpha_blend_test_rgba64be_onto(AVPixelFormat format, string suffix)
for (int y = 256; y < 384; ++y) {
auto p = reinterpret_cast<uint16_t*>(overlay->data()[0] + y * overlay->stride()[0]);
for (int x = 0; x < 128; ++x) {
- p[x * 4] = 65535;
+ p[x * 4 + 2] = 65535;
p[x * 4 + 3] = 65535;
}
}
@@ -242,8 +242,10 @@ BOOST_AUTO_TEST_CASE (alpha_blend_test)
alpha_blend_test_bgra_onto(AV_PIX_FMT_RGB48LE, "rgb48le");
alpha_blend_test_bgra_onto(AV_PIX_FMT_YUV420P, "yuv420p");
alpha_blend_test_bgra_onto(AV_PIX_FMT_YUV420P10, "yuv420p10");
- alpha_blend_test_bgra_onto(AV_PIX_FMT_YUV422P10LE, "yuv422p9le");
+ alpha_blend_test_bgra_onto(AV_PIX_FMT_YUV422P9LE, "yuv422p9le");
alpha_blend_test_bgra_onto(AV_PIX_FMT_YUV422P10LE, "yuv422p10le");
+ alpha_blend_test_bgra_onto(AV_PIX_FMT_YUV444P9LE, "yuv444p9le");
+ alpha_blend_test_bgra_onto(AV_PIX_FMT_YUV444P10LE, "yuv444p10le");
alpha_blend_test_rgba64be_onto(AV_PIX_FMT_RGB24, "rgb24");
alpha_blend_test_rgba64be_onto(AV_PIX_FMT_BGRA, "bgra");
@@ -251,8 +253,10 @@ BOOST_AUTO_TEST_CASE (alpha_blend_test)
alpha_blend_test_rgba64be_onto(AV_PIX_FMT_RGB48LE, "rgb48le");
alpha_blend_test_rgba64be_onto(AV_PIX_FMT_YUV420P, "yuv420p");
alpha_blend_test_rgba64be_onto(AV_PIX_FMT_YUV420P10, "yuv420p10");
- alpha_blend_test_rgba64be_onto(AV_PIX_FMT_YUV422P10LE, "yuv422p9le");
+ alpha_blend_test_rgba64be_onto(AV_PIX_FMT_YUV422P9LE, "yuv422p9le");
alpha_blend_test_rgba64be_onto(AV_PIX_FMT_YUV422P10LE, "yuv422p10le");
+ alpha_blend_test_rgba64be_onto(AV_PIX_FMT_YUV444P9LE, "yuv444p9le");
+ alpha_blend_test_rgba64be_onto(AV_PIX_FMT_YUV444P10LE, "yuv444p10le");
}