summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/extras/tone_mapping_gbench.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/jpeg-xl/lib/extras/tone_mapping_gbench.cc')
-rw-r--r--third_party/jpeg-xl/lib/extras/tone_mapping_gbench.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/jpeg-xl/lib/extras/tone_mapping_gbench.cc b/third_party/jpeg-xl/lib/extras/tone_mapping_gbench.cc
index 34cbdde781..8fc928a4fd 100644
--- a/third_party/jpeg-xl/lib/extras/tone_mapping_gbench.cc
+++ b/third_party/jpeg-xl/lib/extras/tone_mapping_gbench.cc
@@ -6,11 +6,12 @@
#include "benchmark/benchmark.h"
#include "lib/extras/codec.h"
#include "lib/extras/tone_mapping.h"
+#include "lib/jxl/image.h"
namespace jxl {
static void BM_ToneMapping(benchmark::State& state) {
- Image3F color(2268, 1512);
+ JXL_ASSIGN_OR_DIE(Image3F color, Image3F::Create(2268, 1512));
FillImage(0.5f, &color);
// Use linear Rec. 2020 so that `ToneMapTo` doesn't have to convert to it and
@@ -25,7 +26,8 @@ static void BM_ToneMapping(benchmark::State& state) {
for (auto _ : state) {
state.PauseTiming();
CodecInOut tone_mapping_input;
- Image3F color2(color.xsize(), color.ysize());
+ JXL_ASSIGN_OR_DIE(Image3F color2,
+ Image3F::Create(color.xsize(), color.ysize()));
CopyImageTo(color, &color2);
tone_mapping_input.SetFromImage(std::move(color2), linear_rec2020);
tone_mapping_input.metadata.m.SetIntensityTarget(255);