summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-07-26 15:22:54 +0200
committerCarl Hetherington <cth@carlh.net>2022-08-01 19:57:16 +0200
commit15e910e383b199631df35e0014cf072be190d36b (patch)
treee9c761b7cd498e8ebad673d4c6000682cc987b5d /test
parentbb92dba6baceae7ffebe4594d73730b705f6924e (diff)
Fix lines down the right-hand-side of exports in some cases.export-rhs-glitch
Diffstat (limited to 'test')
m---------test/data0
-rw-r--r--test/image_test.cc17
2 files changed, 17 insertions, 0 deletions
diff --git a/test/data b/test/data
-Subproject 6d4d01a10bc14f3a4a0db5c3e0a4be72176543b
+Subproject a92011d3c4ebe0e443b6ea37c749f27c9102c15
diff --git a/test/image_test.cc b/test/image_test.cc
index 94b7ba017..c638523a8 100644
--- a/test/image_test.cc
+++ b/test/image_test.cc
@@ -409,6 +409,23 @@ BOOST_AUTO_TEST_CASE (crop_scale_window_test7)
}
+BOOST_AUTO_TEST_CASE (crop_scale_window_test8)
+{
+ using namespace boost::filesystem;
+
+ auto image = make_shared<Image>(AV_PIX_FMT_YUV420P, dcp::Size(800, 600), Image::Alignment::PADDED);
+ memset(image->data()[0], 41, image->stride()[0] * 600);
+ memset(image->data()[1], 240, image->stride()[1] * 300);
+ memset(image->data()[2], 41, image->stride()[2] * 300);
+ auto scaled = image->crop_scale_window(
+ Crop(), dcp::Size(1435, 1080), dcp::Size(1998, 1080), dcp::YUVToRGB::REC709, VideoRange::FULL, AV_PIX_FMT_YUV420P, VideoRange::FULL, Image::Alignment::PADDED, false
+ );
+ auto file = "crop_scale_window_test8.png";
+ write_image(scaled->convert_pixel_format(dcp::YUVToRGB::REC709, AV_PIX_FMT_RGB24, Image::Alignment::COMPACT, false), path("build") / "test" / file);
+ check_image(path("test") / "data" / file, path("build") / "test" / file, 10);
+}
+
+
BOOST_AUTO_TEST_CASE (as_png_test)
{
auto proxy = make_shared<FFmpegImageProxy>("test/data/3d_test/000001.png");