summaryrefslogtreecommitdiff
path: root/lib/jxl/luminance.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jxl/luminance.cc')
-rw-r--r--lib/jxl/luminance.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/jxl/luminance.cc b/lib/jxl/luminance.cc
index d5ce75a..7af4b2f 100644
--- a/lib/jxl/luminance.cc
+++ b/lib/jxl/luminance.cc
@@ -5,17 +5,15 @@
#include "lib/jxl/luminance.h"
-#include "lib/jxl/codec_in_out.h"
+#include "lib/jxl/image_metadata.h"
namespace jxl {
-void SetIntensityTarget(CodecInOut* io) { SetIntensityTarget(&io->metadata.m); }
-
void SetIntensityTarget(ImageMetadata* m) {
- if (m->color_encoding.tf.IsPQ()) {
+ if (m->color_encoding.Tf().IsPQ()) {
// Peak luminance of PQ as defined by SMPTE ST 2084:2014.
m->SetIntensityTarget(10000);
- } else if (m->color_encoding.tf.IsHLG()) {
+ } else if (m->color_encoding.Tf().IsHLG()) {
// Nominal display peak luminance used as a reference by
// Rec. ITU-R BT.2100-2.
m->SetIntensityTarget(1000);