diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/jpeg-xl/lib/jxl/opsin_inverse_test.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/opsin_inverse_test.cc')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/opsin_inverse_test.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/opsin_inverse_test.cc b/third_party/jpeg-xl/lib/jxl/opsin_inverse_test.cc index b8c151fbea..b8f9aa13df 100644 --- a/third_party/jpeg-xl/lib/jxl/opsin_inverse_test.cc +++ b/third_party/jpeg-xl/lib/jxl/opsin_inverse_test.cc @@ -21,17 +21,17 @@ namespace jxl { namespace { TEST(OpsinInverseTest, LinearInverseInverts) { - Image3F linear(128, 128); + JXL_ASSIGN_OR_DIE(Image3F linear, Image3F::Create(128, 128)); RandomFillImage(&linear, 0.0f, 1.0f); CodecInOut io; io.metadata.m.SetFloat32Samples(); io.metadata.m.color_encoding = ColorEncoding::LinearSRGB(); - Image3F linear2(128, 128); + JXL_ASSIGN_OR_DIE(Image3F linear2, Image3F::Create(128, 128)); CopyImageTo(linear, &linear2); io.SetFromImage(std::move(linear2), io.metadata.m.color_encoding); ThreadPool* null_pool = nullptr; - Image3F opsin(io.xsize(), io.ysize()); + JXL_ASSIGN_OR_DIE(Image3F opsin, Image3F::Create(io.xsize(), io.ysize())); (void)ToXYB(io.Main(), null_pool, &opsin, *JxlGetDefaultCms()); OpsinParams opsin_params; @@ -42,16 +42,16 @@ TEST(OpsinInverseTest, LinearInverseInverts) { } TEST(OpsinInverseTest, YcbCrInverts) { - Image3F rgb(128, 128); + JXL_ASSIGN_OR_DIE(Image3F rgb, Image3F::Create(128, 128)); RandomFillImage(&rgb, 0.0f, 1.0f); ThreadPool* null_pool = nullptr; - Image3F ycbcr(rgb.xsize(), rgb.ysize()); + JXL_ASSIGN_OR_DIE(Image3F ycbcr, Image3F::Create(rgb.xsize(), rgb.ysize())); EXPECT_TRUE(RgbToYcbcr(rgb.Plane(0), rgb.Plane(1), rgb.Plane(2), &ycbcr.Plane(1), &ycbcr.Plane(0), &ycbcr.Plane(2), null_pool)); - Image3F rgb2(rgb.xsize(), rgb.ysize()); + JXL_ASSIGN_OR_DIE(Image3F rgb2, Image3F::Create(rgb.xsize(), rgb.ysize())); YcbcrToRgb(ycbcr, &rgb2, Rect(rgb)); JXL_ASSERT_OK(VerifyRelativeError(rgb, rgb2, 4E-5, 4E-7, _)); |