diff -Nru zimg-3.0.2+ds1/ChangeLog zimg-3.0.4+ds1/ChangeLog --- zimg-3.0.2+ds1/ChangeLog 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/ChangeLog 2022-03-17 02:03:55.000000000 +0000 @@ -1,3 +1,13 @@ +3.0.4 +colorspace: fix ARIB STD-B67 constant-luminance EOTF (introduced in 2.6) +colorspace: filter negative values from sRGB-like transfer functions +common: compilation fixes on esoteric architectures +graph: fix active region with chroma subsampling + +3.0.3 +depth: fix out-of-bounds read in SSE2/AVX2 error diffusion (introduced in 2.5) +colorspace: revert SMPTE 240M behavior change (introduced in 3.0.2) + 3.0.2 api: default to ZIMG_CPU_AUTO when graph params are null colorspace: fix incorrect SMPTE 240M transfer function diff -Nru zimg-3.0.2+ds1/configure.ac zimg-3.0.4+ds1/configure.ac --- zimg-3.0.2+ds1/configure.ac 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/configure.ac 2022-03-17 02:03:55.000000000 +0000 @@ -1,4 +1,4 @@ -AC_INIT([zimg], [3.0.2], [https://github.com/sekrit-twc/zimg/pulls], [zimg], [https://github.com/sekrit-twc/zimg]) +AC_INIT([zimg], [3.0.4], [https://github.com/sekrit-twc/zimg/pulls], [zimg], [https://github.com/sekrit-twc/zimg]) AC_CONFIG_MACRO_DIR([m4]) : ${CFLAGS=""} diff -Nru zimg-3.0.2+ds1/debian/changelog zimg-3.0.4+ds1/debian/changelog --- zimg-3.0.2+ds1/debian/changelog 2021-07-10 10:23:10.000000000 +0000 +++ zimg-3.0.4+ds1/debian/changelog 2022-04-23 13:27:21.000000000 +0000 @@ -1,3 +1,20 @@ +zimg (3.0.4+ds1-1) unstable; urgency=medium + + [ Debian Janitor ] + * Set upstream metadata fields: Bug-Database, Bug-Submit. + + [ Sebastian Ramacher ] + * New upstream version 3.0.4+ds1 + + -- Sebastian Ramacher Sat, 23 Apr 2022 15:27:21 +0200 + +zimg (3.0.3+ds1-1) unstable; urgency=medium + + * New upstream release + * debian/control: Bump Standards-Version + + -- Sebastian Ramacher Thu, 09 Sep 2021 22:06:58 +0200 + zimg (3.0.2+ds1-1) unstable; urgency=medium * New upstream release diff -Nru zimg-3.0.2+ds1/debian/control zimg-3.0.4+ds1/debian/control --- zimg-3.0.2+ds1/debian/control 2021-02-13 15:36:42.000000000 +0000 +++ zimg-3.0.4+ds1/debian/control 2021-09-09 20:06:06.000000000 +0000 @@ -4,7 +4,7 @@ Maintainer: Debian Multimedia Maintainers Uploaders: Sebastian Ramacher Build-Depends: debhelper-compat (= 13) -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Homepage: https://github.com/sekrit-twc/zimg Vcs-Git: https://salsa.debian.org/multimedia-team/zimg.git Vcs-Browser: https://salsa.debian.org/multimedia-team/zimg diff -Nru zimg-3.0.2+ds1/debian/upstream/metadata zimg-3.0.4+ds1/debian/upstream/metadata --- zimg-3.0.2+ds1/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ zimg-3.0.4+ds1/debian/upstream/metadata 2022-04-23 13:25:35.000000000 +0000 @@ -0,0 +1,3 @@ +--- +Bug-Database: https://github.com/sekrit-twc/zimg/issues +Bug-Submit: https://github.com/sekrit-twc/zimg/issues/new diff -Nru zimg-3.0.2+ds1/Makefile.am zimg-3.0.4+ds1/Makefile.am --- zimg-3.0.2+ds1/Makefile.am 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/Makefile.am 2022-03-17 02:03:55.000000000 +0000 @@ -3,9 +3,10 @@ SUBDIRS = $(CONFIG_SUBDIRS) warningflags = -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -commonflags = -O2 $(warningflags) $(DEBUGCFLAGS) +commonflags = -O2 $(warningflags) $(DEBUGCFLAGS) $(PTHREAD_CFLAGS) AM_CXXFLAGS = -std=$(CXXSTD) $(commonflags) AM_CFLAGS = -std=c89 $(commonflags) +LDADD = $(PTHREAD_LIBS) pkgconfigdir = $(libdir)/pkgconfig @@ -286,8 +287,7 @@ doc_example_tile_example_CPPFLAGS = $(EXAMPLE_CPPFLAGS) doc_example_tile_example_SOURCES = doc/example/tile_example.cpp -doc_example_tile_example_CXXFLAGS = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS) -doc_example_tile_example_LDADD = $(PTHREAD_LIBS) $(EXAMPLE_LDADD) +doc_example_tile_example_LDADD = $(EXAMPLE_LDADD) endif # EXAMPLES @@ -314,8 +314,7 @@ src/testapp/utils.cpp \ src/testapp/utils.h -testapp_CXXFLAGS = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS) -testapp_LDADD = $(PTHREAD_LIBS) libtestcommon.la libzimg_internal.la +testapp_LDADD = libtestcommon.la libzimg_internal.la endif # TESTAPP diff -Nru zimg-3.0.2+ds1/src/zimg/api/zimg.cpp zimg-3.0.4+ds1/src/zimg/api/zimg.cpp --- zimg-3.0.2+ds1/src/zimg/api/zimg.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/src/zimg/api/zimg.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -37,7 +37,7 @@ thread_local zimg_error_code_e g_last_error = ZIMG_ERROR_SUCCESS; thread_local std::string g_last_error_msg; -constexpr unsigned VERSION_INFO[] = { 3, 0, 2 }; +constexpr unsigned VERSION_INFO[] = { 3, 0, 4 }; template diff -Nru zimg-3.0.2+ds1/src/zimg/colorspace/gamma.cpp zimg-3.0.4+ds1/src/zimg/colorspace/gamma.cpp --- zimg-3.0.2+ds1/src/zimg/colorspace/gamma.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/src/zimg/colorspace/gamma.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -63,6 +63,8 @@ float rec_709_oetf(float x) noexcept { + x = std::max(x, 0.0f); + if (x < REC709_BETA) x = x * 4.5f; else @@ -73,6 +75,8 @@ float rec_709_inverse_oetf(float x) noexcept { + x = std::max(x, 0.0f); + if (x < 4.5f * REC709_BETA) x = x / 4.5f; else @@ -123,6 +127,8 @@ float smpte_240m_oetf(float x) noexcept { + x = std::max(x, 0.0f); + if (x < 4.0f * SMPTE_240M_BETA) x = x / 4.0f; else @@ -133,6 +139,8 @@ float smpte_240m_inverse_oetf(float x) noexcept { + x = std::max(x, 0.0f); + if (x < SMPTE_240M_BETA) x = x * 4.0f; else @@ -190,6 +198,8 @@ float srgb_eotf(float x) noexcept { + x = std::max(x, 0.0f); + if (x < 12.92f * SRGB_BETA) x = x / 12.92f; else @@ -200,6 +210,8 @@ float srgb_inverse_eotf(float x) noexcept { + x = std::max(x, 0.0f); + if (x < SRGB_BETA) x = x * 12.92f; else @@ -316,8 +328,8 @@ func.to_gamma = rec_470bg_inverse_oetf; break; case TransferCharacteristics::SMPTE_240M: - func.to_linear = smpte_240m_inverse_oetf; - func.to_gamma = smpte_240m_oetf; + func.to_linear = scene_referred ? smpte_240m_inverse_oetf : rec_1886_eotf; + func.to_gamma = scene_referred ? smpte_240m_oetf : rec_1886_inverse_eotf; break; case TransferCharacteristics::XVYCC: func.to_linear = scene_referred ? xvycc_inverse_oetf : xvycc_eotf; diff -Nru zimg-3.0.2+ds1/src/zimg/colorspace/operation_impl.cpp zimg-3.0.4+ds1/src/zimg/colorspace/operation_impl.cpp --- zimg-3.0.2+ds1/src/zimg/colorspace/operation_impl.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/src/zimg/colorspace/operation_impl.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -132,13 +132,18 @@ float r = src[0][i]; float g = src[1][i]; float b = src[2][i]; + float ys; - float ys = std::max(m_kr * r + m_kg * g + m_kb * b, FLT_MIN); + r = arib_b67_inverse_oetf(r); + g = arib_b67_inverse_oetf(g); + b = arib_b67_inverse_oetf(b); + + ys = std::max(m_kr * r + m_kg * g + m_kb * b, FLT_MIN); ys = zimg_x_powf(ys, gamma - 1.0f); - r = arib_b67_inverse_oetf(r * ys); - g = arib_b67_inverse_oetf(g * ys); - b = arib_b67_inverse_oetf(b * ys); + r = r * ys; + g = g * ys; + b = b * ys; dst[0][i] = r * m_scale; dst[1][i] = g * m_scale; diff -Nru zimg-3.0.2+ds1/src/zimg/common/align.h zimg-3.0.4+ds1/src/zimg/common/align.h --- zimg-3.0.2+ds1/src/zimg/common/align.h 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/src/zimg/common/align.h 2022-03-17 02:03:55.000000000 +0000 @@ -15,8 +15,8 @@ constexpr int ALIGNMENT = 16; constexpr int ALIGNMENT_RELAXED = 16; #else -constexpr int ALIGNMENT = sizeof(long double); -constexpr int ALIGNMENT_RELAXED = sizeof(long double); +constexpr int ALIGNMENT = alignof(long double); +constexpr int ALIGNMENT_RELAXED = alignof(long double); #endif /** @@ -40,7 +40,7 @@ */ template struct AlignmentOf { - static constexpr unsigned value = ALIGNMENT / sizeof(T); + static constexpr unsigned value = ALIGNMENT >= sizeof(T) ? ALIGNMENT / sizeof(T) : 1; }; } // namespace zimg diff -Nru zimg-3.0.2+ds1/src/zimg/depth/x86/error_diffusion_avx2.cpp zimg-3.0.4+ds1/src/zimg/depth/x86/error_diffusion_avx2.cpp --- zimg-3.0.2+ds1/src/zimg/depth/x86/error_diffusion_avx2.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/src/zimg/depth/x86/error_diffusion_avx2.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -127,13 +127,14 @@ typename dst_traits::type *dst_p = static_cast(dst); float err_left = error_cur[0]; - float err_top_right = error_top[1 + 1]; + float err_top_right; float err_top = error_top[0 + 1]; float err_top_left = error_top[0]; for (unsigned j = 0; j < width; ++j) { // Error array is padded by one on each side. unsigned j_err = j + 1; + err_top_right = error_top[j_err + 1]; float x = fma(src_traits::load1(src_p + j), scale, offset); float err, err0, err1; @@ -156,7 +157,6 @@ err_left = err; err_top_left = err_top; err_top = err_top_right; - err_top_right = error_top[j_err + 2]; } } diff -Nru zimg-3.0.2+ds1/src/zimg/depth/x86/error_diffusion_sse2.cpp zimg-3.0.4+ds1/src/zimg/depth/x86/error_diffusion_sse2.cpp --- zimg-3.0.2+ds1/src/zimg/depth/x86/error_diffusion_sse2.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/src/zimg/depth/x86/error_diffusion_sse2.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -99,13 +99,14 @@ U *dst_p = static_cast(dst); float err_left = error_cur[0]; - float err_top_right = error_top[1 + 1]; + float err_top_right; float err_top = error_top[0 + 1]; float err_top_left = error_top[0]; for (unsigned j = 0; j < width; ++j) { // Error array is padded by one on each side. unsigned j_err = j + 1; + err_top_right = error_top[j_err + 1]; float x = static_cast(src_p[j]) * scale + offset; float err; @@ -125,7 +126,6 @@ err_left = err; err_top_left = err_top; err_top = err_top_right; - err_top_right = error_top[j_err + 2]; } } diff -Nru zimg-3.0.2+ds1/src/zimg/graph/graphbuilder.cpp zimg-3.0.4+ds1/src/zimg/graph/graphbuilder.cpp --- zimg-3.0.2+ds1/src/zimg/graph/graphbuilder.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/src/zimg/graph/graphbuilder.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -702,14 +702,14 @@ if (params.unresize) { if (src_plane.width != src_plane.active_width || src_plane.height != src_plane.active_height || - dst_plane.width != dst_plane.active_height || dst_plane.height != dst_plane.active_height) + dst_plane.width != dst_plane.active_width || dst_plane.height != dst_plane.active_height) { error::throw_("unresize not supported for for given subregion"); } } - double scale_w = static_cast(dst_plane.width) / src_plane.width; - double scale_h = static_cast(dst_plane.height) / src_plane.height; + double scale_w = static_cast(dst_plane.active_width) / src_plane.active_width; + double scale_h = static_cast(dst_plane.active_height) / src_plane.active_height; // Map active region in output image to the corresponding rectangle in input image. double shift_w = src_plane.active_left - dst_plane.active_left / scale_w; diff -Nru zimg-3.0.2+ds1/test/colorspace/colorspace_test.cpp zimg-3.0.4+ds1/test/colorspace/colorspace_test.cpp --- zimg-3.0.2+ds1/test/colorspace/colorspace_test.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/test/colorspace/colorspace_test.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -33,8 +33,8 @@ const char *expected_sha1[3] = { "483b6bdf608afbf1fba6bbca9657a8ca3822eef1", - "4b4d64db9e73e41d7c1f612dea4dd08c7e8c07f7", - "1e49fae79df6a5497ef8c58b28c1ccb300e8f523" + "1e19619fce5dcd019ec875432cdb57f86c702942", + "feb5009d97bcf5013976835a8c392cc5b2ca4287" }; test_case({ MatrixCoefficients::RGB, TransferCharacteristics::UNSPECIFIED, ColorPrimaries::UNSPECIFIED }, @@ -48,29 +48,29 @@ const char *expected_sha1[][3] = { { - "0495adab9c82d98e73841e229a9b2041838fc0f2", - "ece7edb1118d4b3063ad80f5d8febb6db7e9633a", - "73a9ee951c7bde9ae0ada9b90afd1f7ce8b604df" + "1d559e4b2812a5940839b064f5bd74bc4fe0a2f9", + "b32a33c4bbbf3901f89458f914e6d03cc81f2c1d", + "4aadd644fae30cfd2098bb8d2b9f98483c8821fd" }, { - "7a4acfb71b940364d841d02db7625e2a4cfdd4f1", - "50caf91cb19a7cb5a42dfa1df53ffb3210a03385", - "99303773321c293b06ec49626c4753c6931f93b0" + "86fa6f86eeeea51ece937dbd8ad8be881636c5ec", + "a596bf669ab6d6f8e8ce5e862e00dd0babe51c48", + "cf8fbed8b60ae7328d43d06523ab25eab1095316" }, { - "e73f69c76f158fb4d461d2d5ecd946096116f2b5", - "46aa18f98fa9ffed9bea83817a76cacaf28ed062", - "510cff5b3f97e26874cec2b8a986d0a205742b2a" + "b189703d18508db5e1fa374e7403415728dfaf51", + "b81c2d5cf5251aad96797ec0025fe56b2c676853", + "03d20fd3a89fa681a461491a2558734636bd7e9b" }, { - "83e39222105eab15a79601f196d491e993da2cd6", - "a5d1b53d1833d59f2a63193005a55bffdebc449c", - "96521fc8c82677ab0a74a9fb47e1259ef93fe758" + "3732b8f5fb4b5282ab1912a689f3d25cf5651bcb", + "da2c32ffe713f33b0bf16632e21e41048d3dfa9c", + "2961ec857c9308ee9398356f86fb3ab6e4e874b1" }, { - "5d452fb5eeb54741e5dcf206295e43aa4f26b44a", - "64e60f652a18a8bbbc99ade0f3105ba00a2d2f25", - "7eeba07cef9d99bb1876454c0b812dc7df56bdec" + "fe2953868a65076d0b33dc681ebda4d07d01b819", + "9762a35ca80d564f6594686463c65b0ffaedcfa4", + "4331ca28abf6c18dc69e2a719564dfe4f149a359" }, }; @@ -115,23 +115,23 @@ const char *expected_sha1[][3] = { { "de9ee500de2e6b83642248d48b9bfef0785b6a79", - "95409014b8206d6d513dbadc22320afd8cc28c86", - "b1044c1f9e8986c419dc6e239f93c5cff994e1f2" + "b04e69753e756e365d74f92d2fc625c8d286fc0f", + "8d4a41d7d010327e542a6b7f66f3c44f85ea1392" }, { "887e4db52b882cdb3e37333bb5c3dfce731724e0", - "ed3267eaaced310988a8e1b7f07bde2891a395e1", - "5ccd19037d075ba5bba2b1046955aac4fe8e2b04" + "c3bf38e1f5e8f27b7cb562a8668df068e4d29d5c", + "7543357d80e15f6258ea1de7101affffd0434c5a" }, { "7c0ff6a1eb9f88d6fb434d859f355a3068a9d039", - "16ae1b7f522b4e5529832307476a3ab59125a70d", - "458037dddaddabffcb6d451ebe27e86673935e0a" + "4a04bc65d5fbbb76e49767c5c29a818a33ee929a", + "80f10329386f198eca239b987f0af46cac4de42a" }, { "d031d2e4e94201ffa613aa160270e2e58e420c5d", - "2e0f732a848310d9c6fed7473e1056410d5a6e48", - "180eabe55ef2c086ce0d744a8fb92326b3caa682" + "e2cfee25339fd938cb90d9fa4d667677ce1e90ce", + "9ae597e16b49fa7956ec9fd6b7d439a570bda631" }, }; @@ -161,23 +161,23 @@ const char *expected_sha1[][3] = { { "6cd027d113acb5ea5574ae4314e079b384db3c79", - "76f47b9bd1d9199799c36fff9a3ced6c629f8340", - "8f4fe7c710068ad87a42347b8faa57005d04840f" + "9f65866d8bfaf552318457c4c90361a0fd58cba8", + "92029f0bfd0435d455ca0943fe45a51460e5d7c3" }, { - "9ad37fc486f3fdfe61188cf6881f93509b61dc49", - "89d2f442cb448cee9702e79f7437fda794296847", - "ccbb8677792588ef3ee9d17dc1db158dc8e12b78" + "5f27412b2c502c753a7169c05ef0fb72c6f4eb3f", + "6081cdca417c06cb902085dd5ee2a3569cb34b6b", + "aa0b149fb14637713bc2f9ebd043ae95eed98b80" }, { "f99f91c4d63699b0e716dad5d97b9a907260d82d", - "55a1bc59a5f913b4bc304940290ccd0283a2296a", - "3d73118ba8ba2451d6a5ba625e9ae70a79200070" + "81a6e91352da1397e36c778d531672a6ffcd88a0", + "ff75325792f4066b790acd15f6d9dbe4aca6da86" }, { - "d3403c044d17191d5dadb387fcf2f1e0d633d5e6", - "3b1694b5e2bea4c0cd3151bfe2d5a3d55f00b013", - "31e0320e73da998c2fbf5bfb5f676b6b94b8a770" + "f56f644759e84a7dee94cdee52ff3294cac3fd28", + "eca0081b690e17d9c2ea90d84b6df45daefc3d4c", + "2e0d25b27ecf4f847e1849a1ae75a5172d6f1c52" }, }; @@ -199,9 +199,9 @@ using namespace zimg::colorspace; const char *expected_sha1[3] = { - "8ae350623a239cf75ab0eccdfde6d34b83b9d4e9", - "ed627b2534efcb986434df8def1b11d78501d022", - "b3c76e1eb49193987511a6c81765a1c416e19807" + "c5d494e4c8fefcb2a7978887514782aca1d150df", + "fb54712faf91d6f94d71cbbdc744d4a1f1d5eee5", + "267c0f231918f23cacf3acb8b2ac92b301510cc8" }; test_case({ MatrixCoefficients::REC_709, TransferCharacteristics::LINEAR, ColorPrimaries::UNSPECIFIED }, @@ -215,24 +215,24 @@ const char *expected_sha1[][3] = { { - "634e7c12ca6f2b35098575031679dc9d4f6dc4d6", - "dfff56afa7a10a50c61be104dcbe9e1388db25ec", - "43dcab4ad5af0f002b38b76fad020f1bc89f7e27" + "785701962fcdadbd03be31c2376af08ae2353c45", + "443268fb0971cdff694265263efc8d8d821b2fd1", + "ac689fc4cb452178d061fbcb66c04366ec80f0d7" }, { - "fd97f472f1b5fe4b8c286dc9c7aa7486bf4d57f3", - "fbaa5b42057fecd15c32cc9f4f6aba75644f84b3", - "1fe474ac70aa08480fc1aefd2ee34028b41be316" + "1cc7bc8ecd85b29c68d5c07a7ea3eef293027ce5", + "1343bb8e12fd879c74c7277339cdc7045dcc843f", + "280588a9c4482be507a7c06340cff993509b24ed" }, { - "276e70ed99be30f0d28a182ac5168b5aff1924f7", - "9d8f38681e2e530a5a6c8f57b643f6bebaeb5767", - "bcaba405eb4022ad0beb9ce4efe47fe3964f6519" + "4aef7e59f2f81391ad47a7db1a2ad63d99cb082e", + "8674cadfe701667f35517cf57f8f6b785f51ec1c", + "1933b6721e782b7517fe4f06f3ee80d5402dfbbb" }, { - "daa76f7089d1021ddf5ebb6491140b90dd28a000", - "2e8161dcf02a79c054f26b2c4982811e0bec6e43", - "b64198f1f920d5b53b8d0fdd4692c9dad437991d" + "4971289327f7bc4272d517135bca80e84e9f0d5c", + "24bf2884101730eab35134cd5d2b05daf578a3b5", + "b05ed2186e3c810477bd12db5851b14a2a8205b8" }, }; @@ -265,34 +265,34 @@ const char *expected_sha1[][3] = { { - "bc16780aa8113623f84d94923147829076c2940d", - "bce4c7158a86657a745fdbae54369cd29b2d9673", - "a90c32990e9067c214da18ea59c8f4f8ee4d5044" + "7470a448b91c0f239f4d48e3064767bc91d5f537", + "68867bddd3d5fd26234d48cd2fc27f7ad72ed2a6", + "922731ac779576582285ec37220a9f18be0a9bc3" }, { - "6d6ee771397e6c1a37222d3770fbe91cf413e298", - "573a964fc1a05f5e8b89e6ef8baa72de36ee1be5", - "8a81ef90c2f6fe1c2aa0014971e94f33b50b7933" + "5267c511acc7a8e27e0032c66399c0124d5b4583", + "656c0b051cedb2669fb9d7b79ecd619db952770d", + "fb421c54d78240d73add26ed8e61b5739fdbb7df" }, { - "604dede63242b76005f49504e2b551d0400d12e4", - "04ef8fd6cb80b7e27ef0a40ffac238652c9a32c9", - "6f2f4bd611f5874387e6d420544ed4114f333703" + "24bf088f24c11ae113f48ef1e101116973e38b5b", + "b611cc18391b5b2621541a68ab9e6a786f32073f", + "24fb9d4a8d8fcd7543878846b2b19a306fbd520d" }, { - "d0ad093619b6ab139374b65a176d7bbaf6671c6b", - "b93460065a3287de0f8d3f1dcc4819ada661e258", - "16c45e2d234cf0aee1fb180928e2f757d3ccb245" + "a5e14c950bb6fd2e28ec709fa73f4b1b930ec3dd", + "6dcaa2414dd4b786b5d997002b8b212a1e5ac0d6", + "7084215715115154c799486443d2283676232d22" }, { - "f3168488c8de035f93cc1c80d02a8bd656f8131a", - "52094ce2ef745d1a5adee337ce11e4329c8668c7", - "5e3a0a16dfbe0587df7f07675e5899ce8be9f75d" + "2ef93e9b37320ba08929f3639de647301fd9c423", + "75168e69370b2ac628f87afdc2c34c627ae19135", + "a948d3f33a796b133b50701e280a241bcc3d0051" }, { - "44dbd0902500de97d8fc6023ec7679cc88f9a708", - "d117394f9eacaa2775d04f619cd59c348e7bac85", - "971601695569eefec58f218ec78e9b94c640afe4" + "3cd60ee07738ca3969ef0c07a9da003a5c3ced61", + "df16146e6e7794529bb738d3b02b12f6627a660e", + "271147942457d4f48837461070617d486e99f13f" }, }; @@ -331,24 +331,24 @@ const char *expected_sha1[][3] = { { - "6034b9f906877163406be7647013d9d62e86c18e", - "8b77ba1058bc9b561af346a31e0c82c8f9a68e4a", - "e4db705d18d07f8ca1f4f1c557b0ae6858af86d3" + "aa110d2d0de2b2c462c2317ff204d7735cf4b4f8", + "2a53f8c677e4f83c9318333991b5700798e5da2b", + "e855768b63061b1ac3ab87298c4e344721450ccb" }, { - "e63f1eaca56682952511c1c1e028c2f3e1aaecd9", - "aa6c76a7bdb801d1f75dbbf8412bd18f9782877f", - "139711f578d484b26f99136169aa40419180b64a" + "8b45d71051b82a337242c56e0ce462e06603effa", + "c2d8a905f037da5a97b0eef1778349e2ac4cd453", + "1c5a5a64f5230d332799f725f7addf2ee713145f" }, { - "f85035f377c130b174adeb339ef0bb1b2e661e52", - "1332c6bcf8fa47dc2216e1a6162d4401f92f8f02", - "409008e215b9533e633a6127186f46d6180cfbe8" + "e0394f90fd58f793e669b97c460caac5f2645169", + "8c77d241c4b88c267dd3167eb9235f1576a2acb9", + "7b63e093003bfbc1951804c6acbcbfd99c3d05f6" }, { - "1d0203b13dc49c65c934abaab8781272aa235fc0", - "5507a6c8867a228982b010fb908755e64b5cfd3c", - "b7d755a294f32da38cc761d0eafebf3fe281bdc0" + "bbafa5f4660daa3e644865a648af6bd7a69a16a0", + "8e04e05bfad949cf801af86ea97c093c59c83c19", + "b82946433d407a5ceee0a06f0ef8d6c951509bbb" }, }; diff -Nru zimg-3.0.2+ds1/test/colorspace/x86/colorspace_avx2_test.cpp zimg-3.0.4+ds1/test/colorspace/x86/colorspace_avx2_test.cpp --- zimg-3.0.2+ds1/test/colorspace/x86/colorspace_avx2_test.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/test/colorspace/x86/colorspace_avx2_test.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -49,23 +49,23 @@ const char *expected_sha1[][3] = { { "23d012fcb280f601e2e3c349229d0108e3cd632a", - "21f5071b0a817c28295d51ead5137cabc6e0d5c4", - "158c4ff0c91c08f82e9fc35a500a1c8166f5ae6b" + "7ae186215d5fa45065f7aeac74ab2dc74b556696", + "bad84d4e0de8572c81df6d9f91fef05b1576f9e5" }, { "011ee645ad30bb6ad6d93d8980d89a3e3e073c19", - "d64814ca78cbf4e07606f92f1644f59762271ca5", - "f871247697737f9f8b6a59a58306e22cce472ea6" + "5ae0e075b3856d9f491954b477568b17daf7f147", + "84b20f8fa27c23a668540566b9df26c4b42c9afa" }, { "8206be2ae5e8a0fc003daeec4178189eecf82a13", - "6bc5833cbd22f04c1965d230aad2ef8969da24b7", - "6538399afe0b9fd55a95608b25c8036e16d658b8" + "24843f17600dd7bf9870f5c778549bd96c333427", + "26a6b00801b41da17d849e02217bf69add6324a6" }, { "16f2274ffac90927de0438114f0ea22e650981a0", - "2e01c95f89ea26b5a55bed895223381ac3f17e70", - "c61d9c5369a00af5bb40b70fbb21956c00a4a1e9" + "b1c8b15b6159ab43e7bfc4e715fe3b621628d26e", + "632ae07d6919533c87d2ed28560a60cf070498e2" }, }; const double expected_tolinear_snr = 80.0; diff -Nru zimg-3.0.2+ds1/test/colorspace/x86/colorspace_avx512_test.cpp zimg-3.0.4+ds1/test/colorspace/x86/colorspace_avx512_test.cpp --- zimg-3.0.2+ds1/test/colorspace/x86/colorspace_avx512_test.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/test/colorspace/x86/colorspace_avx512_test.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -47,9 +47,9 @@ using namespace zimg::colorspace; const char *expected_sha1[3] = { - "7b2a05426e2ef61dc6adc16573fca46ea3480256", - "9c69bc8fa775a8e877e66e79812e9f4c39cec647", - "6010983126eb3f5ca2dd5c01f4753c0e9f36d0bb" + "749f74428406c019b1b727fa30352fcd1f0141ed", + "334cfa73375f8afef8423a163f3cff8f8a196762", + "aa3aab12d52e67b4d6765b4e8c03205a5375d8d9" }; const double expected_snr = 120.0; @@ -65,13 +65,13 @@ const char *expected_sha1[][3] = { { "08d5b0c5299a03d6ca7a477dcf2853ece6f31a96", - "569c05244a3bbe88602ddc6df2cf5848426d7954", - "53df70976518ef6e8bb453358d92ac3aeb1607c2" + "1f1421c4a1c923f286314bcca9cb3b5d9a6ba4cc", + "1f64edd1c042f14261b4b6a4d1f6a7eb3aeb32b6" }, { "739bebe894129fad33141416ddfda4e3a1574b68", - "2b3d375fb00359230b1be106b5fa6771fdad4a33", - "6dd4ed07c0cee8be2fa939a06f794088234b91c9" + "bcff693b60e8285850bc3e534387509e00798666", + "8e748683546247b1b715d9bff57f1e490d5a778a" }, }; const double expected_tolinear_snr = 120.0; @@ -94,13 +94,13 @@ const char *expected_sha1[][3] = { { "43c2d947ab229997b225ac5ba9d96010048fa895", - "ba37606303f4f31c93f0c23dffaa72ad44d6b437", - "8b0338c0175ec424a35c1324f59d1e9c0a309051" + "06c3c947a9b14727ea8f4344550e4a39f1407cc7", + "37ff78604039771f13bc986031aa1e94bf87828f" }, { "c77c34e6bef590d4998160c4d37a466eed692f06", - "6fd7d47c84a6467e179530b0290315967bddd36c", - "ef8e4d1e24ad8c9765fead779c7e2b4aa9df33f7" + "ed265e31b5efbb006cb4abbbbef35fb435800963", + "b3ff9ddc265623a259c5bef3d365a4cea207484c" }, }; const double expected_tolinear_snr = 120.0; @@ -123,16 +123,16 @@ const char *expected_sha1[][3] = { { "a0d7b4c6dc3381e8831aa84ab7ba05eb86cafd2b", - "de66d5dba367ceaede45ebe67c69bfe37d9d93ca", - "d05cd2436d1fd07d7f86c0652a590cbe1486d610" + "f40fd965e3938548da9a631099df7338bc3f2722", + "d8e4067b1d3b0d14a751f3f5dc33412d99f2506a" }, { "e64ec0811294da6869b6220ff00c6f7d3dda7399", - "8337219bbe647c04db8b78f6eefc83198d00c989", - "008a31ae15dc49d78c4920a755c436b55fb6ba66" + "dd169dbbbe31f2f7041bdf9d2a93b925ad4a9c72", + "5162af5c0e10a2e46407d2c78e7839dd265974aa" }, }; - const double expected_tolinear_snr = 90.0; + const double expected_tolinear_snr = 79.0; // :( const double expected_togamma_snr = 100.0; SCOPED_TRACE("tolinear"); diff -Nru zimg-3.0.2+ds1/test/colorspace/x86/colorspace_avx_test.cpp zimg-3.0.4+ds1/test/colorspace/x86/colorspace_avx_test.cpp --- zimg-3.0.2+ds1/test/colorspace/x86/colorspace_avx_test.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/test/colorspace/x86/colorspace_avx_test.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -46,9 +46,9 @@ using namespace zimg::colorspace; const char *expected_sha1[3] = { - "0495adab9c82d98e73841e229a9b2041838fc0f2", - "ece7edb1118d4b3063ad80f5d8febb6db7e9633a", - "73a9ee951c7bde9ae0ada9b90afd1f7ce8b604df" + "1d559e4b2812a5940839b064f5bd74bc4fe0a2f9", + "b32a33c4bbbf3901f89458f914e6d03cc81f2c1d", + "4aadd644fae30cfd2098bb8d2b9f98483c8821fd" }; const double expected_snr = INFINITY; diff -Nru zimg-3.0.2+ds1/test/colorspace/x86/colorspace_sse2_test.cpp zimg-3.0.4+ds1/test/colorspace/x86/colorspace_sse2_test.cpp --- zimg-3.0.2+ds1/test/colorspace/x86/colorspace_sse2_test.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/test/colorspace/x86/colorspace_sse2_test.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -49,23 +49,23 @@ const char *expected_sha1[][3] = { { "23d012fcb280f601e2e3c349229d0108e3cd632a", - "21f5071b0a817c28295d51ead5137cabc6e0d5c4", - "158c4ff0c91c08f82e9fc35a500a1c8166f5ae6b" + "7ae186215d5fa45065f7aeac74ab2dc74b556696", + "bad84d4e0de8572c81df6d9f91fef05b1576f9e5" }, { "74e3ebaea6ed216e6792a186592f70149616d2ca", - "a9f8a97a9f51c6be9aab3f48fb9cd51d6c33a605", - "b5b101c985b5e6ce6cac6f89c9b8d21085e134a3" + "af7e809a82f9075d68696d155022a2b12c7260e5", + "d2796151e5d9d01e6aea73d64ac11134424900e8" }, { "8206be2ae5e8a0fc003daeec4178189eecf82a13", - "6bc5833cbd22f04c1965d230aad2ef8969da24b7", - "6538399afe0b9fd55a95608b25c8036e16d658b8" + "24843f17600dd7bf9870f5c778549bd96c333427", + "26a6b00801b41da17d849e02217bf69add6324a6" }, { "a33cd49cc2cf605ef8e80d61133d35660ab0ca5a", - "9525b3bad68eb52b6675de13bba15fae35bc9816", - "e783d9b01fd6d7ae5c5b65349b3d4739c0e5bc5f" + "e411937485a414de43f0f67d2e0105efde153f96", + "cd211d2b32dbbcb57c70f095f3e5f9170e468073" }, }; const double expected_tolinear_snr = 80.0; diff -Nru zimg-3.0.2+ds1/test/colorspace/x86/colorspace_sse_test.cpp zimg-3.0.4+ds1/test/colorspace/x86/colorspace_sse_test.cpp --- zimg-3.0.2+ds1/test/colorspace/x86/colorspace_sse_test.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/test/colorspace/x86/colorspace_sse_test.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -46,9 +46,9 @@ using namespace zimg::colorspace; const char *expected_sha1[3] = { - "0495adab9c82d98e73841e229a9b2041838fc0f2", - "ece7edb1118d4b3063ad80f5d8febb6db7e9633a", - "73a9ee951c7bde9ae0ada9b90afd1f7ce8b604df" + "1d559e4b2812a5940839b064f5bd74bc4fe0a2f9", + "b32a33c4bbbf3901f89458f914e6d03cc81f2c1d", + "4aadd644fae30cfd2098bb8d2b9f98483c8821fd" }; const double expected_snr = INFINITY; diff -Nru zimg-3.0.2+ds1/test/graph/audit_buffer.cpp zimg-3.0.4+ds1/test/graph/audit_buffer.cpp --- zimg-3.0.2+ds1/test/graph/audit_buffer.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/test/graph/audit_buffer.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -222,7 +222,7 @@ unsigned last_col_plane = last_col << (p ? m_subsample_w : 0); bool chroma = (m_buffer_type == AuditBufferType::PLANE && m_format.chroma) || - (m_buffer_type == AuditBufferType::COLOR_RGB && p > 0); + (m_buffer_type == AuditBufferType::COLOR_YUV && p > 0); for (unsigned i = first_row_plane; i < last_row_plane; ++i) { Mt19937Generator engine{ p, i, first_col_plane, m_format, chroma }; diff -Nru zimg-3.0.2+ds1/test/graph/graphbuilder_test.cpp zimg-3.0.4+ds1/test/graph/graphbuilder_test.cpp --- zimg-3.0.2+ds1/test/graph/graphbuilder_test.cpp 2021-07-06 23:02:52.000000000 +0000 +++ zimg-3.0.4+ds1/test/graph/graphbuilder_test.cpp 2022-03-17 02:03:55.000000000 +0000 @@ -689,3 +689,24 @@ "depth[3]: [3/32 l:l] => [1/16 f:l]", }); } + +TEST(GraphBuilderTest, test_subsample_noop_tile) +{ + auto source = make_basic_yuv_state(); + set_resolution(source, 64, 48); + source.subsample_w = 1; + source.subsample_h = 1; + source.chroma_location_w = GraphBuilder::ChromaLocationW::LEFT; + source.active_width = 32; + source.active_height = 24; + source.active_left = 32; + source.active_top = 24; + + auto target = source; + set_resolution(target, 32, 24); + + test_case(source, target, { + "resize[0]: [64, 48] => [32, 24] (32.000000, 24.000000, 32.000000, 24.000000)", + "resize[1]: [32, 24] => [16, 12] (16.000000, 12.000000, 16.000000, 12.000000)", + }); +}