X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fvideo_content_scale_test.cc;h=8c3bd431acd20536c3fc3fa3b94789ca3a8923cd;hb=76a0076274d5084bef496a71cd2aee3e89e9d6d8;hp=383d87ec54d083422d78c10f32d8282d8629e54c;hpb=1355b2068548aa14a054d7dac31cb6589ab5430f;p=dcpomatic.git diff --git a/test/video_content_scale_test.cc b/test/video_content_scale_test.cc index 383d87ec5..8c3bd431a 100644 --- a/test/video_content_scale_test.cc +++ b/test/video_content_scale_test.cc @@ -49,6 +49,7 @@ test (dcp::Size content_size, dcp::Size display_size, dcp::Size film_size, Crop "23.97602462768555" "0" "1" + "12" "" << crop.left << "" "" << crop.right << "" "" << crop.top << "" @@ -97,7 +98,7 @@ test (dcp::Size content_size, dcp::Size display_size, dcp::Size film_size, Crop sc = VideoContentScale (scale); } - dcp::Size answer = sc.get().size (vc, display_size, film_size, 1); + dcp::Size answer = sc.get().size (vc, display_size, film_size); if (answer != correct) { cerr << "Testing " << vc->video_size().width << "x" << vc->video_size().height << "\n"; cerr << "Testing " << display_size.width << "x" << display_size.height << "\n"; @@ -105,7 +106,7 @@ test (dcp::Size content_size, dcp::Size display_size, dcp::Size film_size, Crop } BOOST_CHECK (answer == correct); } - + /* Test scale and stretch to specified ratio */ BOOST_AUTO_TEST_CASE (video_content_scale_test_to_ratio) { @@ -132,7 +133,7 @@ BOOST_AUTO_TEST_CASE (video_content_scale_test_to_ratio) true, dcp::Size (1998, 837) ); - + // Flat in scope container test ( dcp::Size (400, 200), @@ -144,7 +145,7 @@ BOOST_AUTO_TEST_CASE (video_content_scale_test_to_ratio) dcp::Size (1587, 858) ); - + /* To player */ // Flat in flat container @@ -168,7 +169,7 @@ BOOST_AUTO_TEST_CASE (video_content_scale_test_to_ratio) true, dcp::Size (185, 78) ); - + // Flat in scope container test ( dcp::Size (400, 200), @@ -180,3 +181,18 @@ BOOST_AUTO_TEST_CASE (video_content_scale_test_to_ratio) dcp::Size (185, 100) ); } + +/* Test no scale */ +BOOST_AUTO_TEST_CASE (video_content_scale_no_scale) +{ + /* No scale where the content is bigger than even the film container */ + test ( + dcp::Size (1920, 1080), + dcp::Size (887, 371), + dcp::Size (2048, 858), + Crop (), + 0, + false, + dcp::Size (659, 371) + ); +}