summaryrefslogtreecommitdiff
path: root/tools/xyb_range.cc
diff options
context:
space:
mode:
authorJiyong <jiyong.min@samsung.com>2023-12-26 17:33:03 +0900
committerJiyong <jiyong.min@samsung.com>2023-12-27 08:25:11 +0900
commita6d06c38e46e552195648836052eb909925fe5ff (patch)
tree5b34f3947c8331dc618a5166974e4d9757f8e782 /tools/xyb_range.cc
parentf3e519be675ef7922a6c1c3a682232302b55496d (diff)
parent3b773d382e34fcfc7c8995d8bd681a6ef0529b02 (diff)
downloadlibjxl-accepted/tizen_unified_riscv.tar.gz
libjxl-accepted/tizen_unified_riscv.tar.bz2
libjxl-accepted/tizen_unified_riscv.zip
Change-Id: I13b4d2c94ada4853484630800e2a8a5ae90d34c1
Diffstat (limited to 'tools/xyb_range.cc')
-rw-r--r--tools/xyb_range.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/tools/xyb_range.cc b/tools/xyb_range.cc
index 1ce4882..e2afd56 100644
--- a/tools/xyb_range.cc
+++ b/tools/xyb_range.cc
@@ -3,6 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+#include <jxl/cms.h>
#include <stdio.h>
#include <utility>
@@ -12,15 +13,20 @@
#include "lib/jxl/base/printf_macros.h"
#include "lib/jxl/codec_in_out.h"
#include "lib/jxl/color_encoding_internal.h"
-#include "lib/jxl/color_management.h"
-#include "lib/jxl/enc_color_management.h"
#include "lib/jxl/enc_xyb.h"
#include "lib/jxl/image.h"
#include "lib/jxl/image_bundle.h"
-namespace jxl {
+namespace jpegxl {
+namespace tools {
namespace {
+using ::jxl::CodecInOut;
+using ::jxl::ColorEncoding;
+using ::jxl::Image3F;
+using ::jxl::ImageBundle;
+using ::jxl::ThreadPool;
+
void PrintXybRange() {
Image3F linear(1u << 16, 257);
for (int b = 0; b < 256; ++b) {
@@ -43,7 +49,7 @@ void PrintXybRange() {
const ImageBundle& ib = io.Main();
ThreadPool* null_pool = nullptr;
Image3F opsin(ib.xsize(), ib.ysize());
- (void)ToXYB(ib, null_pool, &opsin, GetJxlCms());
+ (void)jxl::ToXYB(ib, null_pool, &opsin, *JxlGetDefaultCms());
for (size_t c = 0; c < 3; ++c) {
float minval = 1e10f;
float maxval = -1e10f;
@@ -75,6 +81,7 @@ void PrintXybRange() {
}
} // namespace
-} // namespace jxl
+} // namespace tools
+} // namespace jpegxl
-int main() { jxl::PrintXybRange(); }
+int main() { jpegxl::tools::PrintXybRange(); }