summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/jxl/opsin_inverse_test.cc
diff options
context:
space:
mode:
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.cc12
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, _));