Coverage Report

Created: 2026-02-14 07:42

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libjxl/lib/jxl/cms/jxl_cms_internal.h
Line
Count
Source
1
// Copyright (c) the JPEG XL Project Authors. All rights reserved.
2
//
3
// Use of this source code is governed by a BSD-style
4
// license that can be found in the LICENSE file.
5
6
#ifndef LIB_JXL_CMS_JXL_CMS_INTERNAL_H_
7
#define LIB_JXL_CMS_JXL_CMS_INTERNAL_H_
8
9
// ICC profiles and color space conversions.
10
11
#include <jxl/color_encoding.h>
12
13
#include <algorithm>
14
#include <cmath>
15
#include <cstddef>
16
#include <cstdint>
17
#include <cstring>
18
#include <string>
19
#include <vector>
20
21
#include "lib/jxl/base/common.h"
22
#include "lib/jxl/base/compiler_specific.h"
23
#include "lib/jxl/base/matrix_ops.h"
24
#include "lib/jxl/base/span.h"  // Bytes
25
#include "lib/jxl/base/status.h"
26
#include "lib/jxl/cms/opsin_params.h"
27
#include "lib/jxl/cms/tone_mapping.h"
28
#include "lib/jxl/cms/transfer_functions.h"
29
30
#ifndef JXL_ENABLE_3D_ICC_TONEMAPPING
31
#define JXL_ENABLE_3D_ICC_TONEMAPPING 1
32
#endif
33
34
namespace jxl {
35
36
enum class ExtraTF {
37
  kNone,
38
  kPQ,
39
  kHLG,
40
  kSRGB,
41
};
42
43
static Status PrimariesToXYZ(float rx, float ry, float gx, float gy, float bx,
44
27.5M
                             float by, float wx, float wy, Matrix3x3& matrix) {
45
27.5M
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
46
27.5M
  if (!ok) {
47
0
    return JXL_FAILURE("Invalid white point");
48
0
  }
49
  // TODO(lode): also require rx, ry, gx, gy, bx, to be in range 0-1? ICC
50
  // profiles in theory forbid negative XYZ values, but in practice the ACES P0
51
  // color space uses a negative y for the blue primary.
52
27.5M
  Matrix3x3 primaries{{{rx, gx, bx},
53
27.5M
                       {ry, gy, by},
54
27.5M
                       {1.0f - rx - ry, 1.0f - gx - gy, 1.0f - bx - by}}};
55
27.5M
  Matrix3x3 primaries_inv;
56
27.5M
  primaries_inv = primaries;
57
27.5M
  JXL_RETURN_IF_ERROR(Inv3x3Matrix(primaries_inv));
58
59
27.5M
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
60
  // 1 / tiny float can still overflow
61
27.5M
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
62
27.5M
  Vector3 xyz;
63
27.5M
  Mul3x3Vector(primaries_inv, w, xyz);
64
65
27.5M
  Matrix3x3 a{{{xyz[0], 0, 0}, {0, xyz[1], 0}, {0, 0, xyz[2]}}};
66
67
27.5M
  Mul3x3Matrix(primaries, a, matrix);
68
27.5M
  return true;
69
27.5M
}
Unexecuted instantiation: enc_ans.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_fields.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_lz77.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
decode.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
44
18.2M
                             float by, float wx, float wy, Matrix3x3& matrix) {
45
18.2M
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
46
18.2M
  if (!ok) {
47
0
    return JXL_FAILURE("Invalid white point");
48
0
  }
49
  // TODO(lode): also require rx, ry, gx, gy, bx, to be in range 0-1? ICC
50
  // profiles in theory forbid negative XYZ values, but in practice the ACES P0
51
  // color space uses a negative y for the blue primary.
52
18.2M
  Matrix3x3 primaries{{{rx, gx, bx},
53
18.2M
                       {ry, gy, by},
54
18.2M
                       {1.0f - rx - ry, 1.0f - gx - gy, 1.0f - bx - by}}};
55
18.2M
  Matrix3x3 primaries_inv;
56
18.2M
  primaries_inv = primaries;
57
18.2M
  JXL_RETURN_IF_ERROR(Inv3x3Matrix(primaries_inv));
58
59
18.2M
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
60
  // 1 / tiny float can still overflow
61
18.2M
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
62
18.2M
  Vector3 xyz;
63
18.2M
  Mul3x3Vector(primaries_inv, w, xyz);
64
65
18.2M
  Matrix3x3 a{{{xyz[0], 0, 0}, {0, xyz[1], 0}, {0, 0, xyz[2]}}};
66
67
18.2M
  Mul3x3Matrix(primaries, a, matrix);
68
18.2M
  return true;
69
18.2M
}
Unexecuted instantiation: frame_header.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: image_metadata.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: quant_weights.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
color_encoding_internal.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
44
9.05k
                             float by, float wx, float wy, Matrix3x3& matrix) {
45
9.05k
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
46
9.05k
  if (!ok) {
47
0
    return JXL_FAILURE("Invalid white point");
48
0
  }
49
  // TODO(lode): also require rx, ry, gx, gy, bx, to be in range 0-1? ICC
50
  // profiles in theory forbid negative XYZ values, but in practice the ACES P0
51
  // color space uses a negative y for the blue primary.
52
9.05k
  Matrix3x3 primaries{{{rx, gx, bx},
53
9.05k
                       {ry, gy, by},
54
9.05k
                       {1.0f - rx - ry, 1.0f - gx - gy, 1.0f - bx - by}}};
55
9.05k
  Matrix3x3 primaries_inv;
56
9.05k
  primaries_inv = primaries;
57
9.05k
  JXL_RETURN_IF_ERROR(Inv3x3Matrix(primaries_inv));
58
59
9.05k
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
60
  // 1 / tiny float can still overflow
61
9.05k
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
62
9.05k
  Vector3 xyz;
63
9.05k
  Mul3x3Vector(primaries_inv, w, xyz);
64
65
9.05k
  Matrix3x3 a{{{xyz[0], 0, 0}, {0, xyz[1], 0}, {0, 0, xyz[2]}}};
66
67
9.05k
  Mul3x3Matrix(primaries, a, matrix);
68
9.05k
  return true;
69
9.05k
}
Unexecuted instantiation: dec_frame.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_group.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_modular.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_noise.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
dec_xyb.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
44
5.10k
                             float by, float wx, float wy, Matrix3x3& matrix) {
45
5.10k
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
46
5.10k
  if (!ok) {
47
0
    return JXL_FAILURE("Invalid white point");
48
0
  }
49
  // TODO(lode): also require rx, ry, gx, gy, bx, to be in range 0-1? ICC
50
  // profiles in theory forbid negative XYZ values, but in practice the ACES P0
51
  // color space uses a negative y for the blue primary.
52
5.10k
  Matrix3x3 primaries{{{rx, gx, bx},
53
5.10k
                       {ry, gy, by},
54
5.10k
                       {1.0f - rx - ry, 1.0f - gx - gy, 1.0f - bx - by}}};
55
5.10k
  Matrix3x3 primaries_inv;
56
5.10k
  primaries_inv = primaries;
57
5.10k
  JXL_RETURN_IF_ERROR(Inv3x3Matrix(primaries_inv));
58
59
5.10k
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
60
  // 1 / tiny float can still overflow
61
5.10k
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
62
5.10k
  Vector3 xyz;
63
5.10k
  Mul3x3Vector(primaries_inv, w, xyz);
64
65
5.10k
  Matrix3x3 a{{{xyz[0], 0, 0}, {0, xyz[1], 0}, {0, 0, xyz[2]}}};
66
67
5.10k
  Mul3x3Matrix(primaries, a, matrix);
68
5.10k
  return true;
69
5.10k
}
Unexecuted instantiation: epf.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: passes_state.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: render_pipeline.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_upsampling.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: blending.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: compressed_dc.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_cache.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_blending.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_cms.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_epf.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_from_linear.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_gaborish.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_noise.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_patches.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_splines.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_spot.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_to_linear.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_write.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_xyb.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_ycbcr.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: image_bundle.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
test_image.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
44
13.6k
                             float by, float wx, float wy, Matrix3x3& matrix) {
45
13.6k
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
46
13.6k
  if (!ok) {
47
0
    return JXL_FAILURE("Invalid white point");
48
0
  }
49
  // TODO(lode): also require rx, ry, gx, gy, bx, to be in range 0-1? ICC
50
  // profiles in theory forbid negative XYZ values, but in practice the ACES P0
51
  // color space uses a negative y for the blue primary.
52
13.6k
  Matrix3x3 primaries{{{rx, gx, bx},
53
13.6k
                       {ry, gy, by},
54
13.6k
                       {1.0f - rx - ry, 1.0f - gx - gy, 1.0f - bx - by}}};
55
13.6k
  Matrix3x3 primaries_inv;
56
13.6k
  primaries_inv = primaries;
57
13.6k
  JXL_RETURN_IF_ERROR(Inv3x3Matrix(primaries_inv));
58
59
13.6k
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
60
  // 1 / tiny float can still overflow
61
13.6k
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
62
13.6k
  Vector3 xyz;
63
13.6k
  Mul3x3Vector(primaries_inv, w, xyz);
64
65
13.6k
  Matrix3x3 a{{{xyz[0], 0, 0}, {0, xyz[1], 0}, {0, 0, xyz[2]}}};
66
67
13.6k
  Mul3x3Matrix(primaries, a, matrix);
68
13.6k
  return true;
69
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: metrics.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
packed_image_convert.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
44
9.29M
                             float by, float wx, float wy, Matrix3x3& matrix) {
45
9.29M
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
46
9.29M
  if (!ok) {
47
0
    return JXL_FAILURE("Invalid white point");
48
0
  }
49
  // TODO(lode): also require rx, ry, gx, gy, bx, to be in range 0-1? ICC
50
  // profiles in theory forbid negative XYZ values, but in practice the ACES P0
51
  // color space uses a negative y for the blue primary.
52
9.29M
  Matrix3x3 primaries{{{rx, gx, bx},
53
9.29M
                       {ry, gy, by},
54
9.29M
                       {1.0f - rx - ry, 1.0f - gx - gy, 1.0f - bx - by}}};
55
9.29M
  Matrix3x3 primaries_inv;
56
9.29M
  primaries_inv = primaries;
57
9.29M
  JXL_RETURN_IF_ERROR(Inv3x3Matrix(primaries_inv));
58
59
9.29M
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
60
  // 1 / tiny float can still overflow
61
9.29M
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
62
9.29M
  Vector3 xyz;
63
9.29M
  Mul3x3Vector(primaries_inv, w, xyz);
64
65
9.29M
  Matrix3x3 a{{{xyz[0], 0, 0}, {0, xyz[1], 0}, {0, 0, xyz[2]}}};
66
67
9.29M
  Mul3x3Matrix(primaries, a, matrix);
68
9.29M
  return true;
69
9.29M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_comparator.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_external_image.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_frame.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_group.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_heuristics.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_image_bundle.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_modular.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_progressive_split.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_quant_weights.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_xyb.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
encode.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
44
46.3k
                             float by, float wx, float wy, Matrix3x3& matrix) {
45
46.3k
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
46
46.3k
  if (!ok) {
47
0
    return JXL_FAILURE("Invalid white point");
48
0
  }
49
  // TODO(lode): also require rx, ry, gx, gy, bx, to be in range 0-1? ICC
50
  // profiles in theory forbid negative XYZ values, but in practice the ACES P0
51
  // color space uses a negative y for the blue primary.
52
46.3k
  Matrix3x3 primaries{{{rx, gx, bx},
53
46.3k
                       {ry, gy, by},
54
46.3k
                       {1.0f - rx - ry, 1.0f - gx - gy, 1.0f - bx - by}}};
55
46.3k
  Matrix3x3 primaries_inv;
56
46.3k
  primaries_inv = primaries;
57
46.3k
  JXL_RETURN_IF_ERROR(Inv3x3Matrix(primaries_inv));
58
59
46.3k
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
60
  // 1 / tiny float can still overflow
61
46.3k
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
62
46.3k
  Vector3 xyz;
63
46.3k
  Mul3x3Vector(primaries_inv, w, xyz);
64
65
46.3k
  Matrix3x3 a{{{xyz[0], 0, 0}, {0, xyz[1], 0}, {0, 0, xyz[2]}}};
66
67
46.3k
  Mul3x3Matrix(primaries, a, matrix);
68
46.3k
  return true;
69
46.3k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_encoding.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_external_image.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: luminance.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_cache.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_debug_image.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_detect_dots.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
jxl_cms.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
44
847
                             float by, float wx, float wy, Matrix3x3& matrix) {
45
847
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
46
847
  if (!ok) {
47
0
    return JXL_FAILURE("Invalid white point");
48
0
  }
49
  // TODO(lode): also require rx, ry, gx, gy, bx, to be in range 0-1? ICC
50
  // profiles in theory forbid negative XYZ values, but in practice the ACES P0
51
  // color space uses a negative y for the blue primary.
52
847
  Matrix3x3 primaries{{{rx, gx, bx},
53
847
                       {ry, gy, by},
54
847
                       {1.0f - rx - ry, 1.0f - gx - gy, 1.0f - bx - by}}};
55
847
  Matrix3x3 primaries_inv;
56
847
  primaries_inv = primaries;
57
847
  JXL_RETURN_IF_ERROR(Inv3x3Matrix(primaries_inv));
58
59
762
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
60
  // 1 / tiny float can still overflow
61
762
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
62
762
  Vector3 xyz;
63
762
  Mul3x3Vector(primaries_inv, w, xyz);
64
65
762
  Matrix3x3 a{{{xyz[0], 0, 0}, {0, xyz[1], 0}, {0, 0, xyz[2]}}};
66
67
762
  Mul3x3Matrix(primaries, a, matrix);
68
762
  return true;
69
762
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: codec.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: fields_fuzzer.cc:jxl::PrimariesToXYZ(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
70
71
/* Chromatic adaptation matrices*/
72
constexpr Matrix3x3 kBradford{{{0.8951f, 0.2664f, -0.1614f},
73
                               {-0.7502f, 1.7135f, 0.0367f},
74
                               {0.0389f, -0.0685f, 1.0296f}}};
75
constexpr Matrix3x3 kBradfordInv{{{0.9869929f, -0.1470543f, 0.1599627f},
76
                                  {0.4323053f, 0.5183603f, 0.0492912f},
77
                                  {-0.0085287f, 0.0400428f, 0.9684867f}}};
78
79
// Adapts white point x, y to D50
80
28.4M
static Status AdaptToXYZD50(float wx, float wy, Matrix3x3& matrix) {
81
28.4M
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
82
28.4M
  if (!ok) {
83
    // Out of range values can cause division through zero
84
    // further down with the bradford adaptation too.
85
214
    return JXL_FAILURE("Invalid white point");
86
214
  }
87
28.4M
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
88
  // 1 / tiny float can still overflow
89
28.4M
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
90
28.4M
  Vector3 w50{0.96422f, 1.0f, 0.82521f};
91
92
28.4M
  Vector3 lms;
93
28.4M
  Vector3 lms50;
94
95
28.4M
  Mul3x3Vector(kBradford, w, lms);
96
28.4M
  Mul3x3Vector(kBradford, w50, lms50);
97
98
28.4M
  if (lms[0] == 0 || lms[1] == 0 || lms[2] == 0) {
99
0
    return JXL_FAILURE("Invalid white point");
100
0
  }
101
28.4M
  Matrix3x3 a{{{lms50[0] / lms[0], 0, 0},
102
28.4M
               {0, lms50[1] / lms[1], 0},
103
28.4M
               {0, 0, lms50[2] / lms[2]}}};
104
28.4M
  if (!std::isfinite(a[0][0]) || !std::isfinite(a[1][1]) ||
105
28.4M
      !std::isfinite(a[2][2])) {
106
0
    return JXL_FAILURE("Invalid white point");
107
0
  }
108
109
28.4M
  Matrix3x3 b;
110
28.4M
  Mul3x3Matrix(a, kBradford, b);
111
28.4M
  Mul3x3Matrix(kBradfordInv, b, matrix);
112
113
28.4M
  return true;
114
28.4M
}
Unexecuted instantiation: enc_ans.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_fields.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_lz77.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
decode.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
80
18.6M
static Status AdaptToXYZD50(float wx, float wy, Matrix3x3& matrix) {
81
18.6M
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
82
18.6M
  if (!ok) {
83
    // Out of range values can cause division through zero
84
    // further down with the bradford adaptation too.
85
18
    return JXL_FAILURE("Invalid white point");
86
18
  }
87
18.6M
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
88
  // 1 / tiny float can still overflow
89
18.6M
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
90
18.6M
  Vector3 w50{0.96422f, 1.0f, 0.82521f};
91
92
18.6M
  Vector3 lms;
93
18.6M
  Vector3 lms50;
94
95
18.6M
  Mul3x3Vector(kBradford, w, lms);
96
18.6M
  Mul3x3Vector(kBradford, w50, lms50);
97
98
18.6M
  if (lms[0] == 0 || lms[1] == 0 || lms[2] == 0) {
99
0
    return JXL_FAILURE("Invalid white point");
100
0
  }
101
18.6M
  Matrix3x3 a{{{lms50[0] / lms[0], 0, 0},
102
18.6M
               {0, lms50[1] / lms[1], 0},
103
18.6M
               {0, 0, lms50[2] / lms[2]}}};
104
18.6M
  if (!std::isfinite(a[0][0]) || !std::isfinite(a[1][1]) ||
105
18.6M
      !std::isfinite(a[2][2])) {
106
0
    return JXL_FAILURE("Invalid white point");
107
0
  }
108
109
18.6M
  Matrix3x3 b;
110
18.6M
  Mul3x3Matrix(a, kBradford, b);
111
18.6M
  Mul3x3Matrix(kBradfordInv, b, matrix);
112
113
18.6M
  return true;
114
18.6M
}
Unexecuted instantiation: frame_header.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: image_metadata.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: quant_weights.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
color_encoding_internal.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
80
12.3k
static Status AdaptToXYZD50(float wx, float wy, Matrix3x3& matrix) {
81
12.3k
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
82
12.3k
  if (!ok) {
83
    // Out of range values can cause division through zero
84
    // further down with the bradford adaptation too.
85
10
    return JXL_FAILURE("Invalid white point");
86
10
  }
87
12.2k
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
88
  // 1 / tiny float can still overflow
89
12.2k
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
90
12.2k
  Vector3 w50{0.96422f, 1.0f, 0.82521f};
91
92
12.2k
  Vector3 lms;
93
12.2k
  Vector3 lms50;
94
95
12.2k
  Mul3x3Vector(kBradford, w, lms);
96
12.2k
  Mul3x3Vector(kBradford, w50, lms50);
97
98
12.2k
  if (lms[0] == 0 || lms[1] == 0 || lms[2] == 0) {
99
0
    return JXL_FAILURE("Invalid white point");
100
0
  }
101
12.2k
  Matrix3x3 a{{{lms50[0] / lms[0], 0, 0},
102
12.2k
               {0, lms50[1] / lms[1], 0},
103
12.2k
               {0, 0, lms50[2] / lms[2]}}};
104
12.2k
  if (!std::isfinite(a[0][0]) || !std::isfinite(a[1][1]) ||
105
12.2k
      !std::isfinite(a[2][2])) {
106
0
    return JXL_FAILURE("Invalid white point");
107
0
  }
108
109
12.2k
  Matrix3x3 b;
110
12.2k
  Mul3x3Matrix(a, kBradford, b);
111
12.2k
  Mul3x3Matrix(kBradfordInv, b, matrix);
112
113
12.2k
  return true;
114
12.2k
}
Unexecuted instantiation: dec_frame.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_group.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_modular.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_noise.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
dec_xyb.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
80
4.56k
static Status AdaptToXYZD50(float wx, float wy, Matrix3x3& matrix) {
81
4.56k
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
82
4.56k
  if (!ok) {
83
    // Out of range values can cause division through zero
84
    // further down with the bradford adaptation too.
85
0
    return JXL_FAILURE("Invalid white point");
86
0
  }
87
4.56k
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
88
  // 1 / tiny float can still overflow
89
4.56k
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
90
4.56k
  Vector3 w50{0.96422f, 1.0f, 0.82521f};
91
92
4.56k
  Vector3 lms;
93
4.56k
  Vector3 lms50;
94
95
4.56k
  Mul3x3Vector(kBradford, w, lms);
96
4.56k
  Mul3x3Vector(kBradford, w50, lms50);
97
98
4.56k
  if (lms[0] == 0 || lms[1] == 0 || lms[2] == 0) {
99
0
    return JXL_FAILURE("Invalid white point");
100
0
  }
101
4.56k
  Matrix3x3 a{{{lms50[0] / lms[0], 0, 0},
102
4.56k
               {0, lms50[1] / lms[1], 0},
103
4.56k
               {0, 0, lms50[2] / lms[2]}}};
104
4.56k
  if (!std::isfinite(a[0][0]) || !std::isfinite(a[1][1]) ||
105
4.56k
      !std::isfinite(a[2][2])) {
106
0
    return JXL_FAILURE("Invalid white point");
107
0
  }
108
109
4.56k
  Matrix3x3 b;
110
4.56k
  Mul3x3Matrix(a, kBradford, b);
111
4.56k
  Mul3x3Matrix(kBradfordInv, b, matrix);
112
113
4.56k
  return true;
114
4.56k
}
Unexecuted instantiation: epf.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: passes_state.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: render_pipeline.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_upsampling.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: blending.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: compressed_dc.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_cache.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_blending.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_cms.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_epf.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_from_linear.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_gaborish.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_noise.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_patches.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_splines.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_spot.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_to_linear.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_write.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_xyb.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_ycbcr.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: image_bundle.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
test_image.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
80
27.2k
static Status AdaptToXYZD50(float wx, float wy, Matrix3x3& matrix) {
81
27.2k
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
82
27.2k
  if (!ok) {
83
    // Out of range values can cause division through zero
84
    // further down with the bradford adaptation too.
85
0
    return JXL_FAILURE("Invalid white point");
86
0
  }
87
27.2k
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
88
  // 1 / tiny float can still overflow
89
27.2k
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
90
27.2k
  Vector3 w50{0.96422f, 1.0f, 0.82521f};
91
92
27.2k
  Vector3 lms;
93
27.2k
  Vector3 lms50;
94
95
27.2k
  Mul3x3Vector(kBradford, w, lms);
96
27.2k
  Mul3x3Vector(kBradford, w50, lms50);
97
98
27.2k
  if (lms[0] == 0 || lms[1] == 0 || lms[2] == 0) {
99
0
    return JXL_FAILURE("Invalid white point");
100
0
  }
101
27.2k
  Matrix3x3 a{{{lms50[0] / lms[0], 0, 0},
102
27.2k
               {0, lms50[1] / lms[1], 0},
103
27.2k
               {0, 0, lms50[2] / lms[2]}}};
104
27.2k
  if (!std::isfinite(a[0][0]) || !std::isfinite(a[1][1]) ||
105
27.2k
      !std::isfinite(a[2][2])) {
106
0
    return JXL_FAILURE("Invalid white point");
107
0
  }
108
109
27.2k
  Matrix3x3 b;
110
27.2k
  Mul3x3Matrix(a, kBradford, b);
111
27.2k
  Mul3x3Matrix(kBradfordInv, b, matrix);
112
113
27.2k
  return true;
114
27.2k
}
Unexecuted instantiation: test_utils.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: metrics.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
packed_image_convert.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
80
9.63M
static Status AdaptToXYZD50(float wx, float wy, Matrix3x3& matrix) {
81
9.63M
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
82
9.63M
  if (!ok) {
83
    // Out of range values can cause division through zero
84
    // further down with the bradford adaptation too.
85
12
    return JXL_FAILURE("Invalid white point");
86
12
  }
87
9.63M
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
88
  // 1 / tiny float can still overflow
89
9.63M
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
90
9.63M
  Vector3 w50{0.96422f, 1.0f, 0.82521f};
91
92
9.63M
  Vector3 lms;
93
9.63M
  Vector3 lms50;
94
95
9.63M
  Mul3x3Vector(kBradford, w, lms);
96
9.63M
  Mul3x3Vector(kBradford, w50, lms50);
97
98
9.63M
  if (lms[0] == 0 || lms[1] == 0 || lms[2] == 0) {
99
0
    return JXL_FAILURE("Invalid white point");
100
0
  }
101
9.63M
  Matrix3x3 a{{{lms50[0] / lms[0], 0, 0},
102
9.63M
               {0, lms50[1] / lms[1], 0},
103
9.63M
               {0, 0, lms50[2] / lms[2]}}};
104
9.63M
  if (!std::isfinite(a[0][0]) || !std::isfinite(a[1][1]) ||
105
9.63M
      !std::isfinite(a[2][2])) {
106
0
    return JXL_FAILURE("Invalid white point");
107
0
  }
108
109
9.63M
  Matrix3x3 b;
110
9.63M
  Mul3x3Matrix(a, kBradford, b);
111
9.63M
  Mul3x3Matrix(kBradfordInv, b, matrix);
112
113
9.63M
  return true;
114
9.63M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_comparator.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_external_image.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_frame.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_group.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_heuristics.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_image_bundle.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_modular.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_progressive_split.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_quant_weights.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_xyb.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
encode.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
80
92.7k
static Status AdaptToXYZD50(float wx, float wy, Matrix3x3& matrix) {
81
92.7k
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
82
92.7k
  if (!ok) {
83
    // Out of range values can cause division through zero
84
    // further down with the bradford adaptation too.
85
0
    return JXL_FAILURE("Invalid white point");
86
0
  }
87
92.7k
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
88
  // 1 / tiny float can still overflow
89
92.7k
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
90
92.7k
  Vector3 w50{0.96422f, 1.0f, 0.82521f};
91
92
92.7k
  Vector3 lms;
93
92.7k
  Vector3 lms50;
94
95
92.7k
  Mul3x3Vector(kBradford, w, lms);
96
92.7k
  Mul3x3Vector(kBradford, w50, lms50);
97
98
92.7k
  if (lms[0] == 0 || lms[1] == 0 || lms[2] == 0) {
99
0
    return JXL_FAILURE("Invalid white point");
100
0
  }
101
92.7k
  Matrix3x3 a{{{lms50[0] / lms[0], 0, 0},
102
92.7k
               {0, lms50[1] / lms[1], 0},
103
92.7k
               {0, 0, lms50[2] / lms[2]}}};
104
92.7k
  if (!std::isfinite(a[0][0]) || !std::isfinite(a[1][1]) ||
105
92.7k
      !std::isfinite(a[2][2])) {
106
0
    return JXL_FAILURE("Invalid white point");
107
0
  }
108
109
92.7k
  Matrix3x3 b;
110
92.7k
  Mul3x3Matrix(a, kBradford, b);
111
92.7k
  Mul3x3Matrix(kBradfordInv, b, matrix);
112
113
92.7k
  return true;
114
92.7k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_encoding.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_external_image.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: luminance.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_cache.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_debug_image.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_detect_dots.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
jxl_cms.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
80
1.79k
static Status AdaptToXYZD50(float wx, float wy, Matrix3x3& matrix) {
81
1.79k
  bool ok = (wx >= 0) && (wx <= 1) && (wy > 0) && (wy <= 1);
82
1.79k
  if (!ok) {
83
    // Out of range values can cause division through zero
84
    // further down with the bradford adaptation too.
85
174
    return JXL_FAILURE("Invalid white point");
86
174
  }
87
1.61k
  Vector3 w{wx / wy, 1.0f, (1.0f - wx - wy) / wy};
88
  // 1 / tiny float can still overflow
89
1.61k
  JXL_RETURN_IF_ERROR(std::isfinite(w[0]) && std::isfinite(w[2]));
90
1.61k
  Vector3 w50{0.96422f, 1.0f, 0.82521f};
91
92
1.61k
  Vector3 lms;
93
1.61k
  Vector3 lms50;
94
95
1.61k
  Mul3x3Vector(kBradford, w, lms);
96
1.61k
  Mul3x3Vector(kBradford, w50, lms50);
97
98
1.61k
  if (lms[0] == 0 || lms[1] == 0 || lms[2] == 0) {
99
0
    return JXL_FAILURE("Invalid white point");
100
0
  }
101
1.61k
  Matrix3x3 a{{{lms50[0] / lms[0], 0, 0},
102
1.61k
               {0, lms50[1] / lms[1], 0},
103
1.61k
               {0, 0, lms50[2] / lms[2]}}};
104
1.61k
  if (!std::isfinite(a[0][0]) || !std::isfinite(a[1][1]) ||
105
1.61k
      !std::isfinite(a[2][2])) {
106
0
    return JXL_FAILURE("Invalid white point");
107
0
  }
108
109
1.61k
  Matrix3x3 b;
110
1.61k
  Mul3x3Matrix(a, kBradford, b);
111
1.61k
  Mul3x3Matrix(kBradfordInv, b, matrix);
112
113
1.61k
  return true;
114
1.61k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: codec.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: fields_fuzzer.cc:jxl::AdaptToXYZD50(float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
115
116
static Status PrimariesToXYZD50(float rx, float ry, float gx, float gy,
117
                                float bx, float by, float wx, float wy,
118
825k
                                Matrix3x3& matrix) {
119
825k
  Matrix3x3 toXYZ;
120
825k
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(rx, ry, gx, gy, bx, by, wx, wy, toXYZ));
121
825k
  Matrix3x3 d50;
122
825k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, d50));
123
124
825k
  Mul3x3Matrix(d50, toXYZ, matrix);
125
825k
  return true;
126
825k
}
Unexecuted instantiation: enc_ans.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_fields.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_lz77.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
decode.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
118
417k
                                Matrix3x3& matrix) {
119
417k
  Matrix3x3 toXYZ;
120
417k
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(rx, ry, gx, gy, bx, by, wx, wy, toXYZ));
121
417k
  Matrix3x3 d50;
122
417k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, d50));
123
124
417k
  Mul3x3Matrix(d50, toXYZ, matrix);
125
417k
  return true;
126
417k
}
Unexecuted instantiation: frame_header.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: image_metadata.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: quant_weights.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
color_encoding_internal.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
118
3.22k
                                Matrix3x3& matrix) {
119
3.22k
  Matrix3x3 toXYZ;
120
3.22k
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(rx, ry, gx, gy, bx, by, wx, wy, toXYZ));
121
3.22k
  Matrix3x3 d50;
122
3.22k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, d50));
123
124
3.22k
  Mul3x3Matrix(d50, toXYZ, matrix);
125
3.22k
  return true;
126
3.22k
}
Unexecuted instantiation: dec_frame.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_group.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_modular.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_noise.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
dec_xyb.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
118
2.55k
                                Matrix3x3& matrix) {
119
2.55k
  Matrix3x3 toXYZ;
120
2.55k
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(rx, ry, gx, gy, bx, by, wx, wy, toXYZ));
121
2.55k
  Matrix3x3 d50;
122
2.55k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, d50));
123
124
2.55k
  Mul3x3Matrix(d50, toXYZ, matrix);
125
2.55k
  return true;
126
2.55k
}
Unexecuted instantiation: epf.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: passes_state.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: render_pipeline.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_upsampling.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: blending.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: compressed_dc.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_cache.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_blending.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_cms.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_epf.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_from_linear.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_gaborish.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_noise.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_patches.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_splines.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_spot.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_to_linear.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_write.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_xyb.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_ycbcr.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: image_bundle.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
test_image.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
118
13.6k
                                Matrix3x3& matrix) {
119
13.6k
  Matrix3x3 toXYZ;
120
13.6k
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(rx, ry, gx, gy, bx, by, wx, wy, toXYZ));
121
13.6k
  Matrix3x3 d50;
122
13.6k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, d50));
123
124
13.6k
  Mul3x3Matrix(d50, toXYZ, matrix);
125
13.6k
  return true;
126
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: metrics.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
packed_image_convert.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
118
341k
                                Matrix3x3& matrix) {
119
341k
  Matrix3x3 toXYZ;
120
341k
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(rx, ry, gx, gy, bx, by, wx, wy, toXYZ));
121
341k
  Matrix3x3 d50;
122
341k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, d50));
123
124
341k
  Mul3x3Matrix(d50, toXYZ, matrix);
125
341k
  return true;
126
341k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_comparator.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_external_image.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_frame.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_group.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_heuristics.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_image_bundle.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_modular.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_progressive_split.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_quant_weights.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_xyb.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
encode.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
118
46.3k
                                Matrix3x3& matrix) {
119
46.3k
  Matrix3x3 toXYZ;
120
46.3k
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(rx, ry, gx, gy, bx, by, wx, wy, toXYZ));
121
46.3k
  Matrix3x3 d50;
122
46.3k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, d50));
123
124
46.3k
  Mul3x3Matrix(d50, toXYZ, matrix);
125
46.3k
  return true;
126
46.3k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_encoding.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_external_image.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: luminance.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_cache.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_debug_image.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_detect_dots.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
jxl_cms.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
118
847
                                Matrix3x3& matrix) {
119
847
  Matrix3x3 toXYZ;
120
847
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(rx, ry, gx, gy, bx, by, wx, wy, toXYZ));
121
762
  Matrix3x3 d50;
122
762
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, d50));
123
124
762
  Mul3x3Matrix(d50, toXYZ, matrix);
125
762
  return true;
126
762
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: codec.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: fields_fuzzer.cc:jxl::PrimariesToXYZD50(float, float, float, float, float, float, float, float, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
127
128
static Status ToneMapPixel(const JxlColorEncoding& c, const float in[3],
129
26.7M
                           uint8_t pcslab_out[3]) {
130
26.7M
  Matrix3x3 primaries_XYZ;
131
26.7M
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(
132
26.7M
      c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
133
26.7M
      c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
134
26.7M
      c.white_point_xy[0], c.white_point_xy[1], primaries_XYZ));
135
26.7M
  const Vector3 luminances = primaries_XYZ[1];
136
26.7M
  Color linear;
137
26.7M
  JxlTransferFunction tf = c.transfer_function;
138
26.7M
  if (tf == JXL_TRANSFER_FUNCTION_PQ) {
139
78.5M
    for (size_t i = 0; i < 3; ++i) {
140
58.9M
      linear[i] = TF_PQ_Base::DisplayFromEncoded(
141
58.9M
          /*display_intensity_target=*/10000.0, in[i]);
142
58.9M
    }
143
19.6M
  } else {
144
28.4M
    for (size_t i = 0; i < 3; ++i) {
145
21.3M
      linear[i] = TF_HLG_Base::DisplayFromEncoded(in[i]);
146
21.3M
    }
147
7.10M
  }
148
26.7M
  if (tf == JXL_TRANSFER_FUNCTION_PQ) {
149
19.6M
    Rec2408ToneMapperBase tone_mapper({0.0f, 10000.0f}, {0.0f, 250.0f},
150
19.6M
                                      luminances);
151
19.6M
    tone_mapper.ToneMap(linear);
152
19.6M
  } else {
153
7.10M
    HlgOOTF_Base ootf(/*source_luminance=*/300, /*target_luminance=*/80,
154
7.10M
                      luminances);
155
7.10M
    ootf.Apply(linear);
156
7.10M
  }
157
26.7M
  GamutMapScalar(linear, luminances,
158
26.7M
                 /*preserve_saturation=*/0.3f);
159
160
26.7M
  Matrix3x3 chad;
161
26.7M
  JXL_RETURN_IF_ERROR(
162
26.7M
      AdaptToXYZD50(c.white_point_xy[0], c.white_point_xy[1], chad));
163
26.7M
  Matrix3x3 to_xyzd50;
164
26.7M
  Mul3x3Matrix(chad, primaries_XYZ, to_xyzd50);
165
166
26.7M
  Vector3 xyz{0, 0, 0};
167
107M
  for (size_t xyz_c = 0; xyz_c < 3; ++xyz_c) {
168
321M
    for (size_t rgb_c = 0; rgb_c < 3; ++rgb_c) {
169
240M
      xyz[xyz_c] += linear[rgb_c] * to_xyzd50[xyz_c][rgb_c];
170
240M
    }
171
80.2M
  }
172
173
80.2M
  const auto lab_f = [](const float x) {
174
80.2M
    static constexpr float kDelta = 6. / 29;
175
80.2M
    return x <= kDelta * kDelta * kDelta
176
80.2M
               ? x * (1 / (3 * kDelta * kDelta)) + 4.f / 29
177
80.2M
               : std::cbrt(x);
178
80.2M
  };
decode.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)::$_0::operator()(float) const
Line
Count
Source
173
53.3M
  const auto lab_f = [](const float x) {
174
53.3M
    static constexpr float kDelta = 6. / 29;
175
53.3M
    return x <= kDelta * kDelta * kDelta
176
53.3M
               ? x * (1 / (3 * kDelta * kDelta)) + 4.f / 29
177
53.3M
               : std::cbrt(x);
178
53.3M
  };
color_encoding_internal.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)::$_0::operator()(float) const
Line
Count
Source
173
17.4k
  const auto lab_f = [](const float x) {
174
17.4k
    static constexpr float kDelta = 6. / 29;
175
17.4k
    return x <= kDelta * kDelta * kDelta
176
17.4k
               ? x * (1 / (3 * kDelta * kDelta)) + 4.f / 29
177
17.4k
               : std::cbrt(x);
178
17.4k
  };
Unexecuted instantiation: dec_cache.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)::$_0::operator()(float) const
Unexecuted instantiation: test_image.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)::$_0::operator()(float) const
Unexecuted instantiation: test_utils.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)::$_0::operator()(float) const
packed_image_convert.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)::$_0::operator()(float) const
Line
Count
Source
173
26.8M
  const auto lab_f = [](const float x) {
174
26.8M
    static constexpr float kDelta = 6. / 29;
175
26.8M
    return x <= kDelta * kDelta * kDelta
176
26.8M
               ? x * (1 / (3 * kDelta * kDelta)) + 4.f / 29
177
26.8M
               : std::cbrt(x);
178
26.8M
  };
Unexecuted instantiation: encode.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)::$_0::operator()(float) const
Unexecuted instantiation: jxl_cms.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)::$_0::operator()(float) const
179
26.7M
  static constexpr float kXn = 0.964212;
180
26.7M
  static constexpr float kYn = 1;
181
26.7M
  static constexpr float kZn = 0.825188;
182
183
26.7M
  const float f_x = lab_f(xyz[0] / kXn);
184
26.7M
  const float f_y = lab_f(xyz[1] / kYn);
185
26.7M
  const float f_z = lab_f(xyz[2] / kZn);
186
187
26.7M
  pcslab_out[0] = static_cast<uint8_t>(
188
26.7M
      std::lroundf(255.f * Clamp1(1.16f * f_y - .16f, 0.f, 1.f)));
189
26.7M
  pcslab_out[1] = static_cast<uint8_t>(
190
26.7M
      std::lroundf(128.f + Clamp1(500 * (f_x - f_y), -128.f, 127.f)));
191
26.7M
  pcslab_out[2] = static_cast<uint8_t>(
192
26.7M
      std::lroundf(128.f + Clamp1(200 * (f_y - f_z), -128.f, 127.f)));
193
194
26.7M
  return true;
195
26.7M
}
Unexecuted instantiation: enc_ans.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_fields.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_lz77.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
decode.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Line
Count
Source
129
17.7M
                           uint8_t pcslab_out[3]) {
130
17.7M
  Matrix3x3 primaries_XYZ;
131
17.7M
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(
132
17.7M
      c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
133
17.7M
      c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
134
17.7M
      c.white_point_xy[0], c.white_point_xy[1], primaries_XYZ));
135
17.7M
  const Vector3 luminances = primaries_XYZ[1];
136
17.7M
  Color linear;
137
17.7M
  JxlTransferFunction tf = c.transfer_function;
138
17.7M
  if (tf == JXL_TRANSFER_FUNCTION_PQ) {
139
49.4M
    for (size_t i = 0; i < 3; ++i) {
140
37.0M
      linear[i] = TF_PQ_Base::DisplayFromEncoded(
141
37.0M
          /*display_intensity_target=*/10000.0, in[i]);
142
37.0M
    }
143
12.3M
  } else {
144
21.7M
    for (size_t i = 0; i < 3; ++i) {
145
16.3M
      linear[i] = TF_HLG_Base::DisplayFromEncoded(in[i]);
146
16.3M
    }
147
5.43M
  }
148
17.7M
  if (tf == JXL_TRANSFER_FUNCTION_PQ) {
149
12.3M
    Rec2408ToneMapperBase tone_mapper({0.0f, 10000.0f}, {0.0f, 250.0f},
150
12.3M
                                      luminances);
151
12.3M
    tone_mapper.ToneMap(linear);
152
12.3M
  } else {
153
5.43M
    HlgOOTF_Base ootf(/*source_luminance=*/300, /*target_luminance=*/80,
154
5.43M
                      luminances);
155
5.43M
    ootf.Apply(linear);
156
5.43M
  }
157
17.7M
  GamutMapScalar(linear, luminances,
158
17.7M
                 /*preserve_saturation=*/0.3f);
159
160
17.7M
  Matrix3x3 chad;
161
17.7M
  JXL_RETURN_IF_ERROR(
162
17.7M
      AdaptToXYZD50(c.white_point_xy[0], c.white_point_xy[1], chad));
163
17.7M
  Matrix3x3 to_xyzd50;
164
17.7M
  Mul3x3Matrix(chad, primaries_XYZ, to_xyzd50);
165
166
17.7M
  Vector3 xyz{0, 0, 0};
167
71.1M
  for (size_t xyz_c = 0; xyz_c < 3; ++xyz_c) {
168
213M
    for (size_t rgb_c = 0; rgb_c < 3; ++rgb_c) {
169
160M
      xyz[xyz_c] += linear[rgb_c] * to_xyzd50[xyz_c][rgb_c];
170
160M
    }
171
53.3M
  }
172
173
17.7M
  const auto lab_f = [](const float x) {
174
17.7M
    static constexpr float kDelta = 6. / 29;
175
17.7M
    return x <= kDelta * kDelta * kDelta
176
17.7M
               ? x * (1 / (3 * kDelta * kDelta)) + 4.f / 29
177
17.7M
               : std::cbrt(x);
178
17.7M
  };
179
17.7M
  static constexpr float kXn = 0.964212;
180
17.7M
  static constexpr float kYn = 1;
181
17.7M
  static constexpr float kZn = 0.825188;
182
183
17.7M
  const float f_x = lab_f(xyz[0] / kXn);
184
17.7M
  const float f_y = lab_f(xyz[1] / kYn);
185
17.7M
  const float f_z = lab_f(xyz[2] / kZn);
186
187
17.7M
  pcslab_out[0] = static_cast<uint8_t>(
188
17.7M
      std::lroundf(255.f * Clamp1(1.16f * f_y - .16f, 0.f, 1.f)));
189
17.7M
  pcslab_out[1] = static_cast<uint8_t>(
190
17.7M
      std::lroundf(128.f + Clamp1(500 * (f_x - f_y), -128.f, 127.f)));
191
17.7M
  pcslab_out[2] = static_cast<uint8_t>(
192
17.7M
      std::lroundf(128.f + Clamp1(200 * (f_y - f_z), -128.f, 127.f)));
193
194
17.7M
  return true;
195
17.7M
}
Unexecuted instantiation: frame_header.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: image_metadata.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: quant_weights.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
color_encoding_internal.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Line
Count
Source
129
5.83k
                           uint8_t pcslab_out[3]) {
130
5.83k
  Matrix3x3 primaries_XYZ;
131
5.83k
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(
132
5.83k
      c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
133
5.83k
      c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
134
5.83k
      c.white_point_xy[0], c.white_point_xy[1], primaries_XYZ));
135
5.83k
  const Vector3 luminances = primaries_XYZ[1];
136
5.83k
  Color linear;
137
5.83k
  JxlTransferFunction tf = c.transfer_function;
138
5.83k
  if (tf == JXL_TRANSFER_FUNCTION_PQ) {
139
17.4k
    for (size_t i = 0; i < 3; ++i) {
140
13.1k
      linear[i] = TF_PQ_Base::DisplayFromEncoded(
141
13.1k
          /*display_intensity_target=*/10000.0, in[i]);
142
13.1k
    }
143
4.37k
  } else {
144
5.83k
    for (size_t i = 0; i < 3; ++i) {
145
4.37k
      linear[i] = TF_HLG_Base::DisplayFromEncoded(in[i]);
146
4.37k
    }
147
1.45k
  }
148
5.83k
  if (tf == JXL_TRANSFER_FUNCTION_PQ) {
149
4.37k
    Rec2408ToneMapperBase tone_mapper({0.0f, 10000.0f}, {0.0f, 250.0f},
150
4.37k
                                      luminances);
151
4.37k
    tone_mapper.ToneMap(linear);
152
4.37k
  } else {
153
1.45k
    HlgOOTF_Base ootf(/*source_luminance=*/300, /*target_luminance=*/80,
154
1.45k
                      luminances);
155
1.45k
    ootf.Apply(linear);
156
1.45k
  }
157
5.83k
  GamutMapScalar(linear, luminances,
158
5.83k
                 /*preserve_saturation=*/0.3f);
159
160
5.83k
  Matrix3x3 chad;
161
5.83k
  JXL_RETURN_IF_ERROR(
162
5.83k
      AdaptToXYZD50(c.white_point_xy[0], c.white_point_xy[1], chad));
163
5.83k
  Matrix3x3 to_xyzd50;
164
5.83k
  Mul3x3Matrix(chad, primaries_XYZ, to_xyzd50);
165
166
5.83k
  Vector3 xyz{0, 0, 0};
167
23.3k
  for (size_t xyz_c = 0; xyz_c < 3; ++xyz_c) {
168
69.9k
    for (size_t rgb_c = 0; rgb_c < 3; ++rgb_c) {
169
52.4k
      xyz[xyz_c] += linear[rgb_c] * to_xyzd50[xyz_c][rgb_c];
170
52.4k
    }
171
17.4k
  }
172
173
5.83k
  const auto lab_f = [](const float x) {
174
5.83k
    static constexpr float kDelta = 6. / 29;
175
5.83k
    return x <= kDelta * kDelta * kDelta
176
5.83k
               ? x * (1 / (3 * kDelta * kDelta)) + 4.f / 29
177
5.83k
               : std::cbrt(x);
178
5.83k
  };
179
5.83k
  static constexpr float kXn = 0.964212;
180
5.83k
  static constexpr float kYn = 1;
181
5.83k
  static constexpr float kZn = 0.825188;
182
183
5.83k
  const float f_x = lab_f(xyz[0] / kXn);
184
5.83k
  const float f_y = lab_f(xyz[1] / kYn);
185
5.83k
  const float f_z = lab_f(xyz[2] / kZn);
186
187
5.83k
  pcslab_out[0] = static_cast<uint8_t>(
188
5.83k
      std::lroundf(255.f * Clamp1(1.16f * f_y - .16f, 0.f, 1.f)));
189
5.83k
  pcslab_out[1] = static_cast<uint8_t>(
190
5.83k
      std::lroundf(128.f + Clamp1(500 * (f_x - f_y), -128.f, 127.f)));
191
5.83k
  pcslab_out[2] = static_cast<uint8_t>(
192
5.83k
      std::lroundf(128.f + Clamp1(200 * (f_y - f_z), -128.f, 127.f)));
193
194
5.83k
  return true;
195
5.83k
}
Unexecuted instantiation: dec_frame.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: dec_group.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: dec_modular.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: dec_noise.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: dec_xyb.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: epf.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: passes_state.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: render_pipeline.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_upsampling.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: blending.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: compressed_dc.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: dec_cache.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_blending.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_cms.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_epf.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_from_linear.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_gaborish.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_noise.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_patches.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_splines.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_spot.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_to_linear.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_write.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_xyb.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: image_bundle.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: test_image.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: test_utils.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: metrics.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
packed_image_convert.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Line
Count
Source
129
8.95M
                           uint8_t pcslab_out[3]) {
130
8.95M
  Matrix3x3 primaries_XYZ;
131
8.95M
  JXL_RETURN_IF_ERROR(PrimariesToXYZ(
132
8.95M
      c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
133
8.95M
      c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
134
8.95M
      c.white_point_xy[0], c.white_point_xy[1], primaries_XYZ));
135
8.95M
  const Vector3 luminances = primaries_XYZ[1];
136
8.95M
  Color linear;
137
8.95M
  JxlTransferFunction tf = c.transfer_function;
138
8.95M
  if (tf == JXL_TRANSFER_FUNCTION_PQ) {
139
29.1M
    for (size_t i = 0; i < 3; ++i) {
140
21.8M
      linear[i] = TF_PQ_Base::DisplayFromEncoded(
141
21.8M
          /*display_intensity_target=*/10000.0, in[i]);
142
21.8M
    }
143
7.28M
  } else {
144
6.68M
    for (size_t i = 0; i < 3; ++i) {
145
5.01M
      linear[i] = TF_HLG_Base::DisplayFromEncoded(in[i]);
146
5.01M
    }
147
1.67M
  }
148
8.95M
  if (tf == JXL_TRANSFER_FUNCTION_PQ) {
149
7.28M
    Rec2408ToneMapperBase tone_mapper({0.0f, 10000.0f}, {0.0f, 250.0f},
150
7.28M
                                      luminances);
151
7.28M
    tone_mapper.ToneMap(linear);
152
7.28M
  } else {
153
1.67M
    HlgOOTF_Base ootf(/*source_luminance=*/300, /*target_luminance=*/80,
154
1.67M
                      luminances);
155
1.67M
    ootf.Apply(linear);
156
1.67M
  }
157
8.95M
  GamutMapScalar(linear, luminances,
158
8.95M
                 /*preserve_saturation=*/0.3f);
159
160
8.95M
  Matrix3x3 chad;
161
8.95M
  JXL_RETURN_IF_ERROR(
162
8.95M
      AdaptToXYZD50(c.white_point_xy[0], c.white_point_xy[1], chad));
163
8.95M
  Matrix3x3 to_xyzd50;
164
8.95M
  Mul3x3Matrix(chad, primaries_XYZ, to_xyzd50);
165
166
8.95M
  Vector3 xyz{0, 0, 0};
167
35.8M
  for (size_t xyz_c = 0; xyz_c < 3; ++xyz_c) {
168
107M
    for (size_t rgb_c = 0; rgb_c < 3; ++rgb_c) {
169
80.5M
      xyz[xyz_c] += linear[rgb_c] * to_xyzd50[xyz_c][rgb_c];
170
80.5M
    }
171
26.8M
  }
172
173
8.95M
  const auto lab_f = [](const float x) {
174
8.95M
    static constexpr float kDelta = 6. / 29;
175
8.95M
    return x <= kDelta * kDelta * kDelta
176
8.95M
               ? x * (1 / (3 * kDelta * kDelta)) + 4.f / 29
177
8.95M
               : std::cbrt(x);
178
8.95M
  };
179
8.95M
  static constexpr float kXn = 0.964212;
180
8.95M
  static constexpr float kYn = 1;
181
8.95M
  static constexpr float kZn = 0.825188;
182
183
8.95M
  const float f_x = lab_f(xyz[0] / kXn);
184
8.95M
  const float f_y = lab_f(xyz[1] / kYn);
185
8.95M
  const float f_z = lab_f(xyz[2] / kZn);
186
187
8.95M
  pcslab_out[0] = static_cast<uint8_t>(
188
8.95M
      std::lroundf(255.f * Clamp1(1.16f * f_y - .16f, 0.f, 1.f)));
189
8.95M
  pcslab_out[1] = static_cast<uint8_t>(
190
8.95M
      std::lroundf(128.f + Clamp1(500 * (f_x - f_y), -128.f, 127.f)));
191
8.95M
  pcslab_out[2] = static_cast<uint8_t>(
192
8.95M
      std::lroundf(128.f + Clamp1(200 * (f_y - f_z), -128.f, 127.f)));
193
194
8.95M
  return true;
195
8.95M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_comparator.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_external_image.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_frame.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_group.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_heuristics.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_modular.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_xyb.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: encode.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_jpeg_data.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_encoding.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: dec_external_image.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: luminance.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_cache.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_debug_image.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: jxl_cms.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: codec.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::ToneMapPixel(JxlColorEncoding const&, float const*, unsigned char*)
196
197
template <size_t N, ExtraTF tf>
198
11.4k
static std::vector<uint16_t> CreateTableCurve(bool tone_map) {
199
  // The generated PQ curve will make room for highlights up to this luminance.
200
  // TODO(sboukortt): make this variable?
201
11.4k
  static constexpr float kPQIntensityTarget = 10000;
202
203
11.4k
  static_assert(N <= 4096, "ICC MFT2 only allows 4K entries");
204
11.4k
  static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG,
205
11.4k
                "Only PQ/HLG is supported");
206
207
11.4k
  static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
208
11.4k
  Rec2408ToneMapperBase tone_mapper(
209
11.4k
      {0.0f, kPQIntensityTarget}, {0.0f, kDefaultIntensityTarget}, kLuminances);
210
  // No point using float - LCMS converts to 16-bit for A2B/MFT.
211
11.4k
  std::vector<uint16_t> table(N);
212
747k
  for (uint32_t i = 0; i < N; ++i) {
213
735k
    const float x = static_cast<float>(i) / (N - 1);  // 1.0 at index N - 1.
214
735k
    const double dx = static_cast<double>(x);
215
    // LCMS requires EOTF (e.g. 2.4 exponent).
216
735k
    double y = (tf == ExtraTF::kHLG)
217
735k
                   ? TF_HLG_Base::DisplayFromEncoded(dx)
218
735k
                   : TF_PQ_Base::DisplayFromEncoded(kPQIntensityTarget, dx);
219
735k
    if (tone_map && tf == ExtraTF::kPQ &&
220
0
        kPQIntensityTarget > kDefaultIntensityTarget) {
221
0
      float l = y * 10000 / kPQIntensityTarget;
222
0
      Color gray{l, l, l};
223
0
      tone_mapper.ToneMap(gray);
224
0
      y = gray[0];
225
0
    }
226
735k
    JXL_DASSERT(y >= 0.0);
227
    // Clamp to table range - necessary for HLG.
228
735k
    y = Clamp1(y, 0.0, 1.0);
229
    // 1.0 corresponds to table value 0xFFFF.
230
735k
    table[i] = static_cast<uint16_t>(roundf(y * 65535.0));
231
735k
  }
232
11.4k
  return table;
233
11.4k
}
Unexecuted instantiation: enc_ans.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_ans.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_fields.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_fields.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_lz77.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_lz77.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
decode.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Line
Count
Source
198
3.44k
static std::vector<uint16_t> CreateTableCurve(bool tone_map) {
199
  // The generated PQ curve will make room for highlights up to this luminance.
200
  // TODO(sboukortt): make this variable?
201
3.44k
  static constexpr float kPQIntensityTarget = 10000;
202
203
3.44k
  static_assert(N <= 4096, "ICC MFT2 only allows 4K entries");
204
3.44k
  static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG,
205
3.44k
                "Only PQ/HLG is supported");
206
207
3.44k
  static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
208
3.44k
  Rec2408ToneMapperBase tone_mapper(
209
3.44k
      {0.0f, kPQIntensityTarget}, {0.0f, kDefaultIntensityTarget}, kLuminances);
210
  // No point using float - LCMS converts to 16-bit for A2B/MFT.
211
3.44k
  std::vector<uint16_t> table(N);
212
224k
  for (uint32_t i = 0; i < N; ++i) {
213
220k
    const float x = static_cast<float>(i) / (N - 1);  // 1.0 at index N - 1.
214
220k
    const double dx = static_cast<double>(x);
215
    // LCMS requires EOTF (e.g. 2.4 exponent).
216
220k
    double y = (tf == ExtraTF::kHLG)
217
220k
                   ? TF_HLG_Base::DisplayFromEncoded(dx)
218
220k
                   : TF_PQ_Base::DisplayFromEncoded(kPQIntensityTarget, dx);
219
220k
    if (tone_map && tf == ExtraTF::kPQ &&
220
0
        kPQIntensityTarget > kDefaultIntensityTarget) {
221
0
      float l = y * 10000 / kPQIntensityTarget;
222
0
      Color gray{l, l, l};
223
0
      tone_mapper.ToneMap(gray);
224
0
      y = gray[0];
225
0
    }
226
220k
    JXL_DASSERT(y >= 0.0);
227
    // Clamp to table range - necessary for HLG.
228
220k
    y = Clamp1(y, 0.0, 1.0);
229
    // 1.0 corresponds to table value 0xFFFF.
230
220k
    table[i] = static_cast<uint16_t>(roundf(y * 65535.0));
231
220k
  }
232
3.44k
  return table;
233
3.44k
}
decode.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Line
Count
Source
198
5.66k
static std::vector<uint16_t> CreateTableCurve(bool tone_map) {
199
  // The generated PQ curve will make room for highlights up to this luminance.
200
  // TODO(sboukortt): make this variable?
201
5.66k
  static constexpr float kPQIntensityTarget = 10000;
202
203
5.66k
  static_assert(N <= 4096, "ICC MFT2 only allows 4K entries");
204
5.66k
  static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG,
205
5.66k
                "Only PQ/HLG is supported");
206
207
5.66k
  static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
208
5.66k
  Rec2408ToneMapperBase tone_mapper(
209
5.66k
      {0.0f, kPQIntensityTarget}, {0.0f, kDefaultIntensityTarget}, kLuminances);
210
  // No point using float - LCMS converts to 16-bit for A2B/MFT.
211
5.66k
  std::vector<uint16_t> table(N);
212
368k
  for (uint32_t i = 0; i < N; ++i) {
213
362k
    const float x = static_cast<float>(i) / (N - 1);  // 1.0 at index N - 1.
214
362k
    const double dx = static_cast<double>(x);
215
    // LCMS requires EOTF (e.g. 2.4 exponent).
216
362k
    double y = (tf == ExtraTF::kHLG)
217
362k
                   ? TF_HLG_Base::DisplayFromEncoded(dx)
218
362k
                   : TF_PQ_Base::DisplayFromEncoded(kPQIntensityTarget, dx);
219
362k
    if (tone_map && tf == ExtraTF::kPQ &&
220
0
        kPQIntensityTarget > kDefaultIntensityTarget) {
221
0
      float l = y * 10000 / kPQIntensityTarget;
222
0
      Color gray{l, l, l};
223
0
      tone_mapper.ToneMap(gray);
224
0
      y = gray[0];
225
0
    }
226
362k
    JXL_DASSERT(y >= 0.0);
227
    // Clamp to table range - necessary for HLG.
228
362k
    y = Clamp1(y, 0.0, 1.0);
229
    // 1.0 corresponds to table value 0xFFFF.
230
362k
    table[i] = static_cast<uint16_t>(roundf(y * 65535.0));
231
362k
  }
232
5.66k
  return table;
233
5.66k
}
Unexecuted instantiation: frame_header.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: frame_header.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: image_metadata.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: image_metadata.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: quant_weights.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: quant_weights.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: decode_to_jpeg.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: decode_to_jpeg.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
color_encoding_internal.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Line
Count
Source
198
13
static std::vector<uint16_t> CreateTableCurve(bool tone_map) {
199
  // The generated PQ curve will make room for highlights up to this luminance.
200
  // TODO(sboukortt): make this variable?
201
13
  static constexpr float kPQIntensityTarget = 10000;
202
203
13
  static_assert(N <= 4096, "ICC MFT2 only allows 4K entries");
204
13
  static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG,
205
13
                "Only PQ/HLG is supported");
206
207
13
  static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
208
13
  Rec2408ToneMapperBase tone_mapper(
209
13
      {0.0f, kPQIntensityTarget}, {0.0f, kDefaultIntensityTarget}, kLuminances);
210
  // No point using float - LCMS converts to 16-bit for A2B/MFT.
211
13
  std::vector<uint16_t> table(N);
212
845
  for (uint32_t i = 0; i < N; ++i) {
213
832
    const float x = static_cast<float>(i) / (N - 1);  // 1.0 at index N - 1.
214
832
    const double dx = static_cast<double>(x);
215
    // LCMS requires EOTF (e.g. 2.4 exponent).
216
832
    double y = (tf == ExtraTF::kHLG)
217
832
                   ? TF_HLG_Base::DisplayFromEncoded(dx)
218
832
                   : TF_PQ_Base::DisplayFromEncoded(kPQIntensityTarget, dx);
219
832
    if (tone_map && tf == ExtraTF::kPQ &&
220
0
        kPQIntensityTarget > kDefaultIntensityTarget) {
221
0
      float l = y * 10000 / kPQIntensityTarget;
222
0
      Color gray{l, l, l};
223
0
      tone_mapper.ToneMap(gray);
224
0
      y = gray[0];
225
0
    }
226
832
    JXL_DASSERT(y >= 0.0);
227
    // Clamp to table range - necessary for HLG.
228
832
    y = Clamp1(y, 0.0, 1.0);
229
    // 1.0 corresponds to table value 0xFFFF.
230
832
    table[i] = static_cast<uint16_t>(roundf(y * 65535.0));
231
832
  }
232
13
  return table;
233
13
}
color_encoding_internal.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Line
Count
Source
198
8
static std::vector<uint16_t> CreateTableCurve(bool tone_map) {
199
  // The generated PQ curve will make room for highlights up to this luminance.
200
  // TODO(sboukortt): make this variable?
201
8
  static constexpr float kPQIntensityTarget = 10000;
202
203
8
  static_assert(N <= 4096, "ICC MFT2 only allows 4K entries");
204
8
  static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG,
205
8
                "Only PQ/HLG is supported");
206
207
8
  static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
208
8
  Rec2408ToneMapperBase tone_mapper(
209
8
      {0.0f, kPQIntensityTarget}, {0.0f, kDefaultIntensityTarget}, kLuminances);
210
  // No point using float - LCMS converts to 16-bit for A2B/MFT.
211
8
  std::vector<uint16_t> table(N);
212
520
  for (uint32_t i = 0; i < N; ++i) {
213
512
    const float x = static_cast<float>(i) / (N - 1);  // 1.0 at index N - 1.
214
512
    const double dx = static_cast<double>(x);
215
    // LCMS requires EOTF (e.g. 2.4 exponent).
216
512
    double y = (tf == ExtraTF::kHLG)
217
512
                   ? TF_HLG_Base::DisplayFromEncoded(dx)
218
512
                   : TF_PQ_Base::DisplayFromEncoded(kPQIntensityTarget, dx);
219
512
    if (tone_map && tf == ExtraTF::kPQ &&
220
0
        kPQIntensityTarget > kDefaultIntensityTarget) {
221
0
      float l = y * 10000 / kPQIntensityTarget;
222
0
      Color gray{l, l, l};
223
0
      tone_mapper.ToneMap(gray);
224
0
      y = gray[0];
225
0
    }
226
512
    JXL_DASSERT(y >= 0.0);
227
    // Clamp to table range - necessary for HLG.
228
512
    y = Clamp1(y, 0.0, 1.0);
229
    // 1.0 corresponds to table value 0xFFFF.
230
512
    table[i] = static_cast<uint16_t>(roundf(y * 65535.0));
231
512
  }
232
8
  return table;
233
8
}
Unexecuted instantiation: dec_frame.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: dec_frame.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: dec_group.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: dec_group.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: dec_modular.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: dec_modular.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: dec_noise.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: dec_noise.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: dec_patch_dictionary.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: dec_patch_dictionary.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: dec_xyb.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: dec_xyb.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: epf.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: epf.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: passes_state.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: passes_state.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: render_pipeline.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: render_pipeline.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: simple_render_pipeline.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: simple_render_pipeline.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_upsampling.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_upsampling.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: blending.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: blending.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: compressed_dc.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: compressed_dc.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: dec_cache.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: dec_cache.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: low_memory_render_pipeline.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: low_memory_render_pipeline.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: render_pipeline_stage.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: render_pipeline_stage.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_blending.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_blending.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_chroma_upsampling.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_chroma_upsampling.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_cms.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_cms.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_epf.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_epf.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_from_linear.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_from_linear.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_gaborish.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_gaborish.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_noise.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_noise.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_patches.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_patches.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_splines.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_splines.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_spot.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_spot.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_to_linear.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_to_linear.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_tone_mapping.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_tone_mapping.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_write.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_write.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_xyb.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_xyb.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: stage_ycbcr.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: stage_ycbcr.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: image_bundle.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: image_bundle.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: test_image.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: test_image.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: test_utils.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: test_utils.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: metrics.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: metrics.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
packed_image_convert.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Line
Count
Source
198
1.44k
static std::vector<uint16_t> CreateTableCurve(bool tone_map) {
199
  // The generated PQ curve will make room for highlights up to this luminance.
200
  // TODO(sboukortt): make this variable?
201
1.44k
  static constexpr float kPQIntensityTarget = 10000;
202
203
1.44k
  static_assert(N <= 4096, "ICC MFT2 only allows 4K entries");
204
1.44k
  static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG,
205
1.44k
                "Only PQ/HLG is supported");
206
207
1.44k
  static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
208
1.44k
  Rec2408ToneMapperBase tone_mapper(
209
1.44k
      {0.0f, kPQIntensityTarget}, {0.0f, kDefaultIntensityTarget}, kLuminances);
210
  // No point using float - LCMS converts to 16-bit for A2B/MFT.
211
1.44k
  std::vector<uint16_t> table(N);
212
93.9k
  for (uint32_t i = 0; i < N; ++i) {
213
92.4k
    const float x = static_cast<float>(i) / (N - 1);  // 1.0 at index N - 1.
214
92.4k
    const double dx = static_cast<double>(x);
215
    // LCMS requires EOTF (e.g. 2.4 exponent).
216
92.4k
    double y = (tf == ExtraTF::kHLG)
217
92.4k
                   ? TF_HLG_Base::DisplayFromEncoded(dx)
218
92.4k
                   : TF_PQ_Base::DisplayFromEncoded(kPQIntensityTarget, dx);
219
92.4k
    if (tone_map && tf == ExtraTF::kPQ &&
220
0
        kPQIntensityTarget > kDefaultIntensityTarget) {
221
0
      float l = y * 10000 / kPQIntensityTarget;
222
0
      Color gray{l, l, l};
223
0
      tone_mapper.ToneMap(gray);
224
0
      y = gray[0];
225
0
    }
226
92.4k
    JXL_DASSERT(y >= 0.0);
227
    // Clamp to table range - necessary for HLG.
228
92.4k
    y = Clamp1(y, 0.0, 1.0);
229
    // 1.0 corresponds to table value 0xFFFF.
230
92.4k
    table[i] = static_cast<uint16_t>(roundf(y * 65535.0));
231
92.4k
  }
232
1.44k
  return table;
233
1.44k
}
packed_image_convert.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Line
Count
Source
198
735
static std::vector<uint16_t> CreateTableCurve(bool tone_map) {
199
  // The generated PQ curve will make room for highlights up to this luminance.
200
  // TODO(sboukortt): make this variable?
201
735
  static constexpr float kPQIntensityTarget = 10000;
202
203
735
  static_assert(N <= 4096, "ICC MFT2 only allows 4K entries");
204
735
  static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG,
205
735
                "Only PQ/HLG is supported");
206
207
735
  static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
208
735
  Rec2408ToneMapperBase tone_mapper(
209
735
      {0.0f, kPQIntensityTarget}, {0.0f, kDefaultIntensityTarget}, kLuminances);
210
  // No point using float - LCMS converts to 16-bit for A2B/MFT.
211
735
  std::vector<uint16_t> table(N);
212
47.7k
  for (uint32_t i = 0; i < N; ++i) {
213
47.0k
    const float x = static_cast<float>(i) / (N - 1);  // 1.0 at index N - 1.
214
47.0k
    const double dx = static_cast<double>(x);
215
    // LCMS requires EOTF (e.g. 2.4 exponent).
216
47.0k
    double y = (tf == ExtraTF::kHLG)
217
47.0k
                   ? TF_HLG_Base::DisplayFromEncoded(dx)
218
47.0k
                   : TF_PQ_Base::DisplayFromEncoded(kPQIntensityTarget, dx);
219
47.0k
    if (tone_map && tf == ExtraTF::kPQ &&
220
0
        kPQIntensityTarget > kDefaultIntensityTarget) {
221
0
      float l = y * 10000 / kPQIntensityTarget;
222
0
      Color gray{l, l, l};
223
0
      tone_mapper.ToneMap(gray);
224
0
      y = gray[0];
225
0
    }
226
47.0k
    JXL_DASSERT(y >= 0.0);
227
    // Clamp to table range - necessary for HLG.
228
47.0k
    y = Clamp1(y, 0.0, 1.0);
229
    // 1.0 corresponds to table value 0xFFFF.
230
47.0k
    table[i] = static_cast<uint16_t>(roundf(y * 65535.0));
231
47.0k
  }
232
735
  return table;
233
735
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_butteraugli_comparator.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_comparator.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_comparator.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_external_image.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_external_image.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_frame.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_frame.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_group.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_group.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_heuristics.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_heuristics.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_image_bundle.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_image_bundle.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_modular.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_modular.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_patch_dictionary.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_patch_dictionary.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_progressive_split.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_progressive_split.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_quant_weights.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_quant_weights.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_xyb.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_xyb.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: encode.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: encode.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_jpeg_data.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_jpeg_data.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_encoding.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_encoding.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: dec_external_image.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: dec_external_image.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: luminance.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: luminance.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_ac_strategy.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_ac_strategy.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_adaptive_quantization.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_adaptive_quantization.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_cache.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_cache.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_chroma_from_luma.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_chroma_from_luma.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_debug_image.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_debug_image.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_dot_dictionary.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_dot_dictionary.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_entropy_coder.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_entropy_coder.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_fast_lossless.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_fast_lossless.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: enc_detect_dots.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: enc_detect_dots.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
jxl_cms.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Line
Count
Source
198
92
static std::vector<uint16_t> CreateTableCurve(bool tone_map) {
199
  // The generated PQ curve will make room for highlights up to this luminance.
200
  // TODO(sboukortt): make this variable?
201
92
  static constexpr float kPQIntensityTarget = 10000;
202
203
92
  static_assert(N <= 4096, "ICC MFT2 only allows 4K entries");
204
92
  static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG,
205
92
                "Only PQ/HLG is supported");
206
207
92
  static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
208
92
  Rec2408ToneMapperBase tone_mapper(
209
92
      {0.0f, kPQIntensityTarget}, {0.0f, kDefaultIntensityTarget}, kLuminances);
210
  // No point using float - LCMS converts to 16-bit for A2B/MFT.
211
92
  std::vector<uint16_t> table(N);
212
5.98k
  for (uint32_t i = 0; i < N; ++i) {
213
5.88k
    const float x = static_cast<float>(i) / (N - 1);  // 1.0 at index N - 1.
214
5.88k
    const double dx = static_cast<double>(x);
215
    // LCMS requires EOTF (e.g. 2.4 exponent).
216
5.88k
    double y = (tf == ExtraTF::kHLG)
217
5.88k
                   ? TF_HLG_Base::DisplayFromEncoded(dx)
218
5.88k
                   : TF_PQ_Base::DisplayFromEncoded(kPQIntensityTarget, dx);
219
5.88k
    if (tone_map && tf == ExtraTF::kPQ &&
220
0
        kPQIntensityTarget > kDefaultIntensityTarget) {
221
0
      float l = y * 10000 / kPQIntensityTarget;
222
0
      Color gray{l, l, l};
223
0
      tone_mapper.ToneMap(gray);
224
0
      y = gray[0];
225
0
    }
226
5.88k
    JXL_DASSERT(y >= 0.0);
227
    // Clamp to table range - necessary for HLG.
228
5.88k
    y = Clamp1(y, 0.0, 1.0);
229
    // 1.0 corresponds to table value 0xFFFF.
230
5.88k
    table[i] = static_cast<uint16_t>(roundf(y * 65535.0));
231
5.88k
  }
232
92
  return table;
233
92
}
jxl_cms.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Line
Count
Source
198
92
static std::vector<uint16_t> CreateTableCurve(bool tone_map) {
199
  // The generated PQ curve will make room for highlights up to this luminance.
200
  // TODO(sboukortt): make this variable?
201
92
  static constexpr float kPQIntensityTarget = 10000;
202
203
92
  static_assert(N <= 4096, "ICC MFT2 only allows 4K entries");
204
92
  static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG,
205
92
                "Only PQ/HLG is supported");
206
207
92
  static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
208
92
  Rec2408ToneMapperBase tone_mapper(
209
92
      {0.0f, kPQIntensityTarget}, {0.0f, kDefaultIntensityTarget}, kLuminances);
210
  // No point using float - LCMS converts to 16-bit for A2B/MFT.
211
92
  std::vector<uint16_t> table(N);
212
5.98k
  for (uint32_t i = 0; i < N; ++i) {
213
5.88k
    const float x = static_cast<float>(i) / (N - 1);  // 1.0 at index N - 1.
214
5.88k
    const double dx = static_cast<double>(x);
215
    // LCMS requires EOTF (e.g. 2.4 exponent).
216
5.88k
    double y = (tf == ExtraTF::kHLG)
217
5.88k
                   ? TF_HLG_Base::DisplayFromEncoded(dx)
218
5.88k
                   : TF_PQ_Base::DisplayFromEncoded(kPQIntensityTarget, dx);
219
5.88k
    if (tone_map && tf == ExtraTF::kPQ &&
220
0
        kPQIntensityTarget > kDefaultIntensityTarget) {
221
0
      float l = y * 10000 / kPQIntensityTarget;
222
0
      Color gray{l, l, l};
223
0
      tone_mapper.ToneMap(gray);
224
0
      y = gray[0];
225
0
    }
226
5.88k
    JXL_DASSERT(y >= 0.0);
227
    // Clamp to table range - necessary for HLG.
228
5.88k
    y = Clamp1(y, 0.0, 1.0);
229
    // 1.0 corresponds to table value 0xFFFF.
230
5.88k
    table[i] = static_cast<uint16_t>(roundf(y * 65535.0));
231
5.88k
  }
232
92
  return table;
233
92
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: set_from_bytes_fuzzer.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: codec.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: codec.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
Unexecuted instantiation: fields_fuzzer.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)2>(bool)
Unexecuted instantiation: fields_fuzzer.cc:std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > jxl::CreateTableCurve<64ul, (jxl::ExtraTF)1>(bool)
234
235
11.4k
static Status CIEXYZFromWhiteCIExy(double wx, double wy, Color& XYZ) {
236
  // Target Y = 1.
237
11.4k
  if (std::abs(wy) < 1e-12) return JXL_FAILURE("Y value is too small");
238
11.3k
  const float factor = 1 / wy;
239
11.3k
  XYZ[0] = wx * factor;
240
11.3k
  XYZ[1] = 1;
241
11.3k
  XYZ[2] = (1 - wx - wy) * factor;
242
11.3k
  return true;
243
11.4k
}
Unexecuted instantiation: enc_ans.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_fields.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_lz77.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
decode.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Line
Count
Source
235
7.27k
static Status CIEXYZFromWhiteCIExy(double wx, double wy, Color& XYZ) {
236
  // Target Y = 1.
237
7.27k
  if (std::abs(wy) < 1e-12) return JXL_FAILURE("Y value is too small");
238
7.26k
  const float factor = 1 / wy;
239
7.26k
  XYZ[0] = wx * factor;
240
7.26k
  XYZ[1] = 1;
241
7.26k
  XYZ[2] = (1 - wx - wy) * factor;
242
7.26k
  return true;
243
7.27k
}
Unexecuted instantiation: frame_header.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: image_metadata.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: quant_weights.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
color_encoding_internal.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Line
Count
Source
235
30
static Status CIEXYZFromWhiteCIExy(double wx, double wy, Color& XYZ) {
236
  // Target Y = 1.
237
30
  if (std::abs(wy) < 1e-12) return JXL_FAILURE("Y value is too small");
238
29
  const float factor = 1 / wy;
239
29
  XYZ[0] = wx * factor;
240
29
  XYZ[1] = 1;
241
29
  XYZ[2] = (1 - wx - wy) * factor;
242
29
  return true;
243
30
}
Unexecuted instantiation: dec_frame.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: dec_group.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: dec_modular.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: dec_noise.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: dec_xyb.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: epf.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: passes_state.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: render_pipeline.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_upsampling.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: blending.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: compressed_dc.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: dec_cache.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_blending.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_cms.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_epf.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_from_linear.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_gaborish.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_noise.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_patches.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_splines.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_spot.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_to_linear.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_write.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_xyb.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: stage_ycbcr.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: image_bundle.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
test_image.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Line
Count
Source
235
1
static Status CIEXYZFromWhiteCIExy(double wx, double wy, Color& XYZ) {
236
  // Target Y = 1.
237
1
  if (std::abs(wy) < 1e-12) return JXL_FAILURE("Y value is too small");
238
1
  const float factor = 1 / wy;
239
1
  XYZ[0] = wx * factor;
240
1
  XYZ[1] = 1;
241
1
  XYZ[2] = (1 - wx - wy) * factor;
242
1
  return true;
243
1
}
Unexecuted instantiation: test_utils.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: metrics.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
packed_image_convert.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Line
Count
Source
235
1.42k
static Status CIEXYZFromWhiteCIExy(double wx, double wy, Color& XYZ) {
236
  // Target Y = 1.
237
1.42k
  if (std::abs(wy) < 1e-12) return JXL_FAILURE("Y value is too small");
238
1.42k
  const float factor = 1 / wy;
239
1.42k
  XYZ[0] = wx * factor;
240
1.42k
  XYZ[1] = 1;
241
1.42k
  XYZ[2] = (1 - wx - wy) * factor;
242
1.42k
  return true;
243
1.42k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_comparator.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_external_image.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_frame.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_group.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_heuristics.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_image_bundle.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_modular.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_progressive_split.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_quant_weights.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_xyb.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
encode.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Line
Count
Source
235
2.09k
static Status CIEXYZFromWhiteCIExy(double wx, double wy, Color& XYZ) {
236
  // Target Y = 1.
237
2.09k
  if (std::abs(wy) < 1e-12) return JXL_FAILURE("Y value is too small");
238
2.09k
  const float factor = 1 / wy;
239
2.09k
  XYZ[0] = wx * factor;
240
2.09k
  XYZ[1] = 1;
241
2.09k
  XYZ[2] = (1 - wx - wy) * factor;
242
2.09k
  return true;
243
2.09k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_encoding.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: dec_external_image.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: luminance.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_cache.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_debug_image.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: enc_detect_dots.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
jxl_cms.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Line
Count
Source
235
587
static Status CIEXYZFromWhiteCIExy(double wx, double wy, Color& XYZ) {
236
  // Target Y = 1.
237
587
  if (std::abs(wy) < 1e-12) return JXL_FAILURE("Y value is too small");
238
587
  const float factor = 1 / wy;
239
587
  XYZ[0] = wx * factor;
240
587
  XYZ[1] = 1;
241
587
  XYZ[2] = (1 - wx - wy) * factor;
242
587
  return true;
243
587
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: codec.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
Unexecuted instantiation: fields_fuzzer.cc:jxl::CIEXYZFromWhiteCIExy(double, double, std::__1::array<float, 3ul>&)
244
245
namespace detail {
246
247
constexpr bool kEnable3DToneMapping = JXL_ENABLE_3D_ICC_TONEMAPPING;
248
249
1.68M
static bool CanToneMap(const JxlColorEncoding& encoding) {
250
  // If the color space cannot be represented by a CICP tag in the ICC profile
251
  // then the rest of the profile must unambiguously identify it; we have less
252
  // freedom to do use it for tone mapping.
253
1.68M
  JxlTransferFunction tf = encoding.transfer_function;
254
1.68M
  JxlPrimaries p = encoding.primaries;
255
1.68M
  JxlWhitePoint wp = encoding.white_point;
256
1.68M
  return encoding.color_space == JXL_COLOR_SPACE_RGB &&
257
1.65M
         (tf == JXL_TRANSFER_FUNCTION_PQ || tf == JXL_TRANSFER_FUNCTION_HLG) &&
258
99.7k
         ((p == JXL_PRIMARIES_P3 &&
259
18.5k
           (wp == JXL_WHITE_POINT_D65 || wp == JXL_WHITE_POINT_DCI)) ||
260
83.5k
          (p != JXL_PRIMARIES_CUSTOM && wp == JXL_WHITE_POINT_D65));
261
1.68M
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
decode.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Line
Count
Source
249
862k
static bool CanToneMap(const JxlColorEncoding& encoding) {
250
  // If the color space cannot be represented by a CICP tag in the ICC profile
251
  // then the rest of the profile must unambiguously identify it; we have less
252
  // freedom to do use it for tone mapping.
253
862k
  JxlTransferFunction tf = encoding.transfer_function;
254
862k
  JxlPrimaries p = encoding.primaries;
255
862k
  JxlWhitePoint wp = encoding.white_point;
256
862k
  return encoding.color_space == JXL_COLOR_SPACE_RGB &&
257
841k
         (tf == JXL_TRANSFER_FUNCTION_PQ || tf == JXL_TRANSFER_FUNCTION_HLG) &&
258
68.0k
         ((p == JXL_PRIMARIES_P3 &&
259
11.4k
           (wp == JXL_WHITE_POINT_D65 || wp == JXL_WHITE_POINT_DCI)) ||
260
58.3k
          (p != JXL_PRIMARIES_CUSTOM && wp == JXL_WHITE_POINT_D65));
261
862k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
color_encoding_internal.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Line
Count
Source
249
6.53k
static bool CanToneMap(const JxlColorEncoding& encoding) {
250
  // If the color space cannot be represented by a CICP tag in the ICC profile
251
  // then the rest of the profile must unambiguously identify it; we have less
252
  // freedom to do use it for tone mapping.
253
6.53k
  JxlTransferFunction tf = encoding.transfer_function;
254
6.53k
  JxlPrimaries p = encoding.primaries;
255
6.53k
  JxlWhitePoint wp = encoding.white_point;
256
6.53k
  return encoding.color_space == JXL_COLOR_SPACE_RGB &&
257
6.47k
         (tf == JXL_TRANSFER_FUNCTION_PQ || tf == JXL_TRANSFER_FUNCTION_HLG) &&
258
67
         ((p == JXL_PRIMARIES_P3 &&
259
10
           (wp == JXL_WHITE_POINT_D65 || wp == JXL_WHITE_POINT_DCI)) ||
260
63
          (p != JXL_PRIMARIES_CUSTOM && wp == JXL_WHITE_POINT_D65));
261
6.53k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: dec_group.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: epf.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: passes_state.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: blending.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_write.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
test_image.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Line
Count
Source
249
27.2k
static bool CanToneMap(const JxlColorEncoding& encoding) {
250
  // If the color space cannot be represented by a CICP tag in the ICC profile
251
  // then the rest of the profile must unambiguously identify it; we have less
252
  // freedom to do use it for tone mapping.
253
27.2k
  JxlTransferFunction tf = encoding.transfer_function;
254
27.2k
  JxlPrimaries p = encoding.primaries;
255
27.2k
  JxlWhitePoint wp = encoding.white_point;
256
27.2k
  return encoding.color_space == JXL_COLOR_SPACE_RGB &&
257
27.2k
         (tf == JXL_TRANSFER_FUNCTION_PQ || tf == JXL_TRANSFER_FUNCTION_HLG) &&
258
0
         ((p == JXL_PRIMARIES_P3 &&
259
0
           (wp == JXL_WHITE_POINT_D65 || wp == JXL_WHITE_POINT_DCI)) ||
260
0
          (p != JXL_PRIMARIES_CUSTOM && wp == JXL_WHITE_POINT_D65));
261
27.2k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: metrics.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
packed_image_convert.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Line
Count
Source
249
688k
static bool CanToneMap(const JxlColorEncoding& encoding) {
250
  // If the color space cannot be represented by a CICP tag in the ICC profile
251
  // then the rest of the profile must unambiguously identify it; we have less
252
  // freedom to do use it for tone mapping.
253
688k
  JxlTransferFunction tf = encoding.transfer_function;
254
688k
  JxlPrimaries p = encoding.primaries;
255
688k
  JxlWhitePoint wp = encoding.white_point;
256
688k
  return encoding.color_space == JXL_COLOR_SPACE_RGB &&
257
684k
         (tf == JXL_TRANSFER_FUNCTION_PQ || tf == JXL_TRANSFER_FUNCTION_HLG) &&
258
30.8k
         ((p == JXL_PRIMARIES_P3 &&
259
7.04k
           (wp == JXL_WHITE_POINT_D65 || wp == JXL_WHITE_POINT_DCI)) ||
260
24.4k
          (p != JXL_PRIMARIES_CUSTOM && wp == JXL_WHITE_POINT_D65));
261
688k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_group.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
encode.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Line
Count
Source
249
96.9k
static bool CanToneMap(const JxlColorEncoding& encoding) {
250
  // If the color space cannot be represented by a CICP tag in the ICC profile
251
  // then the rest of the profile must unambiguously identify it; we have less
252
  // freedom to do use it for tone mapping.
253
96.9k
  JxlTransferFunction tf = encoding.transfer_function;
254
96.9k
  JxlPrimaries p = encoding.primaries;
255
96.9k
  JxlWhitePoint wp = encoding.white_point;
256
96.9k
  return encoding.color_space == JXL_COLOR_SPACE_RGB &&
257
92.7k
         (tf == JXL_TRANSFER_FUNCTION_PQ || tf == JXL_TRANSFER_FUNCTION_HLG) &&
258
0
         ((p == JXL_PRIMARIES_P3 &&
259
0
           (wp == JXL_WHITE_POINT_D65 || wp == JXL_WHITE_POINT_DCI)) ||
260
0
          (p != JXL_PRIMARIES_CUSTOM && wp == JXL_WHITE_POINT_D65));
261
96.9k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: luminance.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
jxl_cms.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Line
Count
Source
249
2.54k
static bool CanToneMap(const JxlColorEncoding& encoding) {
250
  // If the color space cannot be represented by a CICP tag in the ICC profile
251
  // then the rest of the profile must unambiguously identify it; we have less
252
  // freedom to do use it for tone mapping.
253
2.54k
  JxlTransferFunction tf = encoding.transfer_function;
254
2.54k
  JxlPrimaries p = encoding.primaries;
255
2.54k
  JxlWhitePoint wp = encoding.white_point;
256
2.54k
  return encoding.color_space == JXL_COLOR_SPACE_RGB &&
257
1.82k
         (tf == JXL_TRANSFER_FUNCTION_PQ || tf == JXL_TRANSFER_FUNCTION_HLG) &&
258
712
         ((p == JXL_PRIMARIES_P3 &&
259
0
           (wp == JXL_WHITE_POINT_D65 || wp == JXL_WHITE_POINT_DCI)) ||
260
712
          (p != JXL_PRIMARIES_CUSTOM && wp == JXL_WHITE_POINT_D65));
261
2.54k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: codec.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CanToneMap(JxlColorEncoding const&)
262
263
static void ICCComputeMD5(const std::vector<uint8_t>& data, uint8_t sum[16])
264
838k
    JXL_NO_SANITIZE("unsigned-integer-overflow") {
265
838k
  std::vector<uint8_t> data64 = data;
266
838k
  data64.push_back(128);
267
  // Add bytes such that ((size + 8) & 63) == 0.
268
838k
  size_t extra = ((64 - ((data64.size() + 8) & 63)) & 63);
269
838k
  data64.resize(data64.size() + extra, 0);
270
7.54M
  for (uint64_t i = 0; i < 64; i += 8) {
271
6.71M
    data64.push_back(static_cast<uint64_t>(data.size() << 3u) >> i);
272
6.71M
  }
273
274
838k
  static const uint32_t sineparts[64] = {
275
838k
      0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a,
276
838k
      0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
277
838k
      0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, 0xf61e2562, 0xc040b340,
278
838k
      0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
279
838k
      0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8,
280
838k
      0x676f02d9, 0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c,
281
838k
      0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 0x289b7ec6, 0xeaa127fa,
282
838k
      0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
283
838k
      0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92,
284
838k
      0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
285
838k
      0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391,
286
838k
  };
287
838k
  static const uint32_t shift[64] = {
288
838k
      7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
289
838k
      5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20,
290
838k
      4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
291
838k
      6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
292
838k
  };
293
294
838k
  uint32_t a0 = 0x67452301;
295
838k
  uint32_t b0 = 0xefcdab89;
296
838k
  uint32_t c0 = 0x98badcfe;
297
838k
  uint32_t d0 = 0x10325476;
298
299
10.5M
  for (size_t i = 0; i < data64.size(); i += 64) {
300
9.74M
    uint32_t a = a0;
301
9.74M
    uint32_t b = b0;
302
9.74M
    uint32_t c = c0;
303
9.74M
    uint32_t d = d0;
304
9.74M
    uint32_t f;
305
9.74M
    uint32_t g;
306
633M
    for (size_t j = 0; j < 64; j++) {
307
623M
      if (j < 16) {
308
155M
        f = (b & c) | ((~b) & d);
309
155M
        g = j;
310
467M
      } else if (j < 32) {
311
155M
        f = (d & b) | ((~d) & c);
312
155M
        g = (5 * j + 1) & 0xf;
313
311M
      } else if (j < 48) {
314
155M
        f = b ^ c ^ d;
315
155M
        g = (3 * j + 5) & 0xf;
316
155M
      } else {
317
155M
        f = c ^ (b | (~d));
318
155M
        g = (7 * j) & 0xf;
319
155M
      }
320
623M
      uint32_t dg0 = data64[i + g * 4 + 0];
321
623M
      uint32_t dg1 = data64[i + g * 4 + 1];
322
623M
      uint32_t dg2 = data64[i + g * 4 + 2];
323
623M
      uint32_t dg3 = data64[i + g * 4 + 3];
324
623M
      uint32_t u = dg0 | (dg1 << 8u) | (dg2 << 16u) | (dg3 << 24u);
325
623M
      f += a + sineparts[j] + u;
326
623M
      a = d;
327
623M
      d = c;
328
623M
      c = b;
329
623M
      b += (f << shift[j]) | (f >> (32u - shift[j]));
330
623M
    }
331
9.74M
    a0 += a;
332
9.74M
    b0 += b;
333
9.74M
    c0 += c;
334
9.74M
    d0 += d;
335
9.74M
  }
336
838k
  sum[0] = a0;
337
838k
  sum[1] = a0 >> 8u;
338
838k
  sum[2] = a0 >> 16u;
339
838k
  sum[3] = a0 >> 24u;
340
838k
  sum[4] = b0;
341
838k
  sum[5] = b0 >> 8u;
342
838k
  sum[6] = b0 >> 16u;
343
838k
  sum[7] = b0 >> 24u;
344
838k
  sum[8] = c0;
345
838k
  sum[9] = c0 >> 8u;
346
838k
  sum[10] = c0 >> 16u;
347
838k
  sum[11] = c0 >> 24u;
348
838k
  sum[12] = d0;
349
838k
  sum[13] = d0 >> 8u;
350
838k
  sum[14] = d0 >> 16u;
351
838k
  sum[15] = d0 >> 24u;
352
838k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
decode.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Line
Count
Source
264
428k
    JXL_NO_SANITIZE("unsigned-integer-overflow") {
265
428k
  std::vector<uint8_t> data64 = data;
266
428k
  data64.push_back(128);
267
  // Add bytes such that ((size + 8) & 63) == 0.
268
428k
  size_t extra = ((64 - ((data64.size() + 8) & 63)) & 63);
269
428k
  data64.resize(data64.size() + extra, 0);
270
3.85M
  for (uint64_t i = 0; i < 64; i += 8) {
271
3.43M
    data64.push_back(static_cast<uint64_t>(data.size() << 3u) >> i);
272
3.43M
  }
273
274
428k
  static const uint32_t sineparts[64] = {
275
428k
      0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a,
276
428k
      0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
277
428k
      0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, 0xf61e2562, 0xc040b340,
278
428k
      0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
279
428k
      0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8,
280
428k
      0x676f02d9, 0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c,
281
428k
      0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 0x289b7ec6, 0xeaa127fa,
282
428k
      0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
283
428k
      0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92,
284
428k
      0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
285
428k
      0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391,
286
428k
  };
287
428k
  static const uint32_t shift[64] = {
288
428k
      7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
289
428k
      5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20,
290
428k
      4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
291
428k
      6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
292
428k
  };
293
294
428k
  uint32_t a0 = 0x67452301;
295
428k
  uint32_t b0 = 0xefcdab89;
296
428k
  uint32_t c0 = 0x98badcfe;
297
428k
  uint32_t d0 = 0x10325476;
298
299
5.75M
  for (size_t i = 0; i < data64.size(); i += 64) {
300
5.32M
    uint32_t a = a0;
301
5.32M
    uint32_t b = b0;
302
5.32M
    uint32_t c = c0;
303
5.32M
    uint32_t d = d0;
304
5.32M
    uint32_t f;
305
5.32M
    uint32_t g;
306
345M
    for (size_t j = 0; j < 64; j++) {
307
340M
      if (j < 16) {
308
85.1M
        f = (b & c) | ((~b) & d);
309
85.1M
        g = j;
310
255M
      } else if (j < 32) {
311
85.1M
        f = (d & b) | ((~d) & c);
312
85.1M
        g = (5 * j + 1) & 0xf;
313
170M
      } else if (j < 48) {
314
85.1M
        f = b ^ c ^ d;
315
85.1M
        g = (3 * j + 5) & 0xf;
316
85.1M
      } else {
317
85.1M
        f = c ^ (b | (~d));
318
85.1M
        g = (7 * j) & 0xf;
319
85.1M
      }
320
340M
      uint32_t dg0 = data64[i + g * 4 + 0];
321
340M
      uint32_t dg1 = data64[i + g * 4 + 1];
322
340M
      uint32_t dg2 = data64[i + g * 4 + 2];
323
340M
      uint32_t dg3 = data64[i + g * 4 + 3];
324
340M
      uint32_t u = dg0 | (dg1 << 8u) | (dg2 << 16u) | (dg3 << 24u);
325
340M
      f += a + sineparts[j] + u;
326
340M
      a = d;
327
340M
      d = c;
328
340M
      c = b;
329
340M
      b += (f << shift[j]) | (f >> (32u - shift[j]));
330
340M
    }
331
5.32M
    a0 += a;
332
5.32M
    b0 += b;
333
5.32M
    c0 += c;
334
5.32M
    d0 += d;
335
5.32M
  }
336
428k
  sum[0] = a0;
337
428k
  sum[1] = a0 >> 8u;
338
428k
  sum[2] = a0 >> 16u;
339
428k
  sum[3] = a0 >> 24u;
340
428k
  sum[4] = b0;
341
428k
  sum[5] = b0 >> 8u;
342
428k
  sum[6] = b0 >> 16u;
343
428k
  sum[7] = b0 >> 24u;
344
428k
  sum[8] = c0;
345
428k
  sum[9] = c0 >> 8u;
346
428k
  sum[10] = c0 >> 16u;
347
428k
  sum[11] = c0 >> 24u;
348
428k
  sum[12] = d0;
349
428k
  sum[13] = d0 >> 8u;
350
428k
  sum[14] = d0 >> 16u;
351
428k
  sum[15] = d0 >> 24u;
352
428k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
color_encoding_internal.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Line
Count
Source
264
3.23k
    JXL_NO_SANITIZE("unsigned-integer-overflow") {
265
3.23k
  std::vector<uint8_t> data64 = data;
266
3.23k
  data64.push_back(128);
267
  // Add bytes such that ((size + 8) & 63) == 0.
268
3.23k
  size_t extra = ((64 - ((data64.size() + 8) & 63)) & 63);
269
3.23k
  data64.resize(data64.size() + extra, 0);
270
29.1k
  for (uint64_t i = 0; i < 64; i += 8) {
271
25.9k
    data64.push_back(static_cast<uint64_t>(data.size() << 3u) >> i);
272
25.9k
  }
273
274
3.23k
  static const uint32_t sineparts[64] = {
275
3.23k
      0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a,
276
3.23k
      0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
277
3.23k
      0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, 0xf61e2562, 0xc040b340,
278
3.23k
      0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
279
3.23k
      0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8,
280
3.23k
      0x676f02d9, 0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c,
281
3.23k
      0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 0x289b7ec6, 0xeaa127fa,
282
3.23k
      0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
283
3.23k
      0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92,
284
3.23k
      0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
285
3.23k
      0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391,
286
3.23k
  };
287
3.23k
  static const uint32_t shift[64] = {
288
3.23k
      7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
289
3.23k
      5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20,
290
3.23k
      4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
291
3.23k
      6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
292
3.23k
  };
293
294
3.23k
  uint32_t a0 = 0x67452301;
295
3.23k
  uint32_t b0 = 0xefcdab89;
296
3.23k
  uint32_t c0 = 0x98badcfe;
297
3.23k
  uint32_t d0 = 0x10325476;
298
299
32.8k
  for (size_t i = 0; i < data64.size(); i += 64) {
300
29.6k
    uint32_t a = a0;
301
29.6k
    uint32_t b = b0;
302
29.6k
    uint32_t c = c0;
303
29.6k
    uint32_t d = d0;
304
29.6k
    uint32_t f;
305
29.6k
    uint32_t g;
306
1.92M
    for (size_t j = 0; j < 64; j++) {
307
1.89M
      if (j < 16) {
308
473k
        f = (b & c) | ((~b) & d);
309
473k
        g = j;
310
1.42M
      } else if (j < 32) {
311
473k
        f = (d & b) | ((~d) & c);
312
473k
        g = (5 * j + 1) & 0xf;
313
947k
      } else if (j < 48) {
314
473k
        f = b ^ c ^ d;
315
473k
        g = (3 * j + 5) & 0xf;
316
473k
      } else {
317
473k
        f = c ^ (b | (~d));
318
473k
        g = (7 * j) & 0xf;
319
473k
      }
320
1.89M
      uint32_t dg0 = data64[i + g * 4 + 0];
321
1.89M
      uint32_t dg1 = data64[i + g * 4 + 1];
322
1.89M
      uint32_t dg2 = data64[i + g * 4 + 2];
323
1.89M
      uint32_t dg3 = data64[i + g * 4 + 3];
324
1.89M
      uint32_t u = dg0 | (dg1 << 8u) | (dg2 << 16u) | (dg3 << 24u);
325
1.89M
      f += a + sineparts[j] + u;
326
1.89M
      a = d;
327
1.89M
      d = c;
328
1.89M
      c = b;
329
1.89M
      b += (f << shift[j]) | (f >> (32u - shift[j]));
330
1.89M
    }
331
29.6k
    a0 += a;
332
29.6k
    b0 += b;
333
29.6k
    c0 += c;
334
29.6k
    d0 += d;
335
29.6k
  }
336
3.23k
  sum[0] = a0;
337
3.23k
  sum[1] = a0 >> 8u;
338
3.23k
  sum[2] = a0 >> 16u;
339
3.23k
  sum[3] = a0 >> 24u;
340
3.23k
  sum[4] = b0;
341
3.23k
  sum[5] = b0 >> 8u;
342
3.23k
  sum[6] = b0 >> 16u;
343
3.23k
  sum[7] = b0 >> 24u;
344
3.23k
  sum[8] = c0;
345
3.23k
  sum[9] = c0 >> 8u;
346
3.23k
  sum[10] = c0 >> 16u;
347
3.23k
  sum[11] = c0 >> 24u;
348
3.23k
  sum[12] = d0;
349
3.23k
  sum[13] = d0 >> 8u;
350
3.23k
  sum[14] = d0 >> 16u;
351
3.23k
  sum[15] = d0 >> 24u;
352
3.23k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: dec_group.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: epf.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: passes_state.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: blending.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_write.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
test_image.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Line
Count
Source
264
13.6k
    JXL_NO_SANITIZE("unsigned-integer-overflow") {
265
13.6k
  std::vector<uint8_t> data64 = data;
266
13.6k
  data64.push_back(128);
267
  // Add bytes such that ((size + 8) & 63) == 0.
268
13.6k
  size_t extra = ((64 - ((data64.size() + 8) & 63)) & 63);
269
13.6k
  data64.resize(data64.size() + extra, 0);
270
122k
  for (uint64_t i = 0; i < 64; i += 8) {
271
109k
    data64.push_back(static_cast<uint64_t>(data.size() << 3u) >> i);
272
109k
  }
273
274
13.6k
  static const uint32_t sineparts[64] = {
275
13.6k
      0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a,
276
13.6k
      0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
277
13.6k
      0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, 0xf61e2562, 0xc040b340,
278
13.6k
      0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
279
13.6k
      0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8,
280
13.6k
      0x676f02d9, 0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c,
281
13.6k
      0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 0x289b7ec6, 0xeaa127fa,
282
13.6k
      0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
283
13.6k
      0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92,
284
13.6k
      0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
285
13.6k
      0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391,
286
13.6k
  };
287
13.6k
  static const uint32_t shift[64] = {
288
13.6k
      7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
289
13.6k
      5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20,
290
13.6k
      4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
291
13.6k
      6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
292
13.6k
  };
293
294
13.6k
  uint32_t a0 = 0x67452301;
295
13.6k
  uint32_t b0 = 0xefcdab89;
296
13.6k
  uint32_t c0 = 0x98badcfe;
297
13.6k
  uint32_t d0 = 0x10325476;
298
299
136k
  for (size_t i = 0; i < data64.size(); i += 64) {
300
122k
    uint32_t a = a0;
301
122k
    uint32_t b = b0;
302
122k
    uint32_t c = c0;
303
122k
    uint32_t d = d0;
304
122k
    uint32_t f;
305
122k
    uint32_t g;
306
7.97M
    for (size_t j = 0; j < 64; j++) {
307
7.85M
      if (j < 16) {
308
1.96M
        f = (b & c) | ((~b) & d);
309
1.96M
        g = j;
310
5.88M
      } else if (j < 32) {
311
1.96M
        f = (d & b) | ((~d) & c);
312
1.96M
        g = (5 * j + 1) & 0xf;
313
3.92M
      } else if (j < 48) {
314
1.96M
        f = b ^ c ^ d;
315
1.96M
        g = (3 * j + 5) & 0xf;
316
1.96M
      } else {
317
1.96M
        f = c ^ (b | (~d));
318
1.96M
        g = (7 * j) & 0xf;
319
1.96M
      }
320
7.85M
      uint32_t dg0 = data64[i + g * 4 + 0];
321
7.85M
      uint32_t dg1 = data64[i + g * 4 + 1];
322
7.85M
      uint32_t dg2 = data64[i + g * 4 + 2];
323
7.85M
      uint32_t dg3 = data64[i + g * 4 + 3];
324
7.85M
      uint32_t u = dg0 | (dg1 << 8u) | (dg2 << 16u) | (dg3 << 24u);
325
7.85M
      f += a + sineparts[j] + u;
326
7.85M
      a = d;
327
7.85M
      d = c;
328
7.85M
      c = b;
329
7.85M
      b += (f << shift[j]) | (f >> (32u - shift[j]));
330
7.85M
    }
331
122k
    a0 += a;
332
122k
    b0 += b;
333
122k
    c0 += c;
334
122k
    d0 += d;
335
122k
  }
336
13.6k
  sum[0] = a0;
337
13.6k
  sum[1] = a0 >> 8u;
338
13.6k
  sum[2] = a0 >> 16u;
339
13.6k
  sum[3] = a0 >> 24u;
340
13.6k
  sum[4] = b0;
341
13.6k
  sum[5] = b0 >> 8u;
342
13.6k
  sum[6] = b0 >> 16u;
343
13.6k
  sum[7] = b0 >> 24u;
344
13.6k
  sum[8] = c0;
345
13.6k
  sum[9] = c0 >> 8u;
346
13.6k
  sum[10] = c0 >> 16u;
347
13.6k
  sum[11] = c0 >> 24u;
348
13.6k
  sum[12] = d0;
349
13.6k
  sum[13] = d0 >> 8u;
350
13.6k
  sum[14] = d0 >> 16u;
351
13.6k
  sum[15] = d0 >> 24u;
352
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: metrics.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
packed_image_convert.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Line
Count
Source
264
343k
    JXL_NO_SANITIZE("unsigned-integer-overflow") {
265
343k
  std::vector<uint8_t> data64 = data;
266
343k
  data64.push_back(128);
267
  // Add bytes such that ((size + 8) & 63) == 0.
268
343k
  size_t extra = ((64 - ((data64.size() + 8) & 63)) & 63);
269
343k
  data64.resize(data64.size() + extra, 0);
270
3.09M
  for (uint64_t i = 0; i < 64; i += 8) {
271
2.74M
    data64.push_back(static_cast<uint64_t>(data.size() << 3u) >> i);
272
2.74M
  }
273
274
343k
  static const uint32_t sineparts[64] = {
275
343k
      0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a,
276
343k
      0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
277
343k
      0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, 0xf61e2562, 0xc040b340,
278
343k
      0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
279
343k
      0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8,
280
343k
      0x676f02d9, 0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c,
281
343k
      0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 0x289b7ec6, 0xeaa127fa,
282
343k
      0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
283
343k
      0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92,
284
343k
      0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
285
343k
      0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391,
286
343k
  };
287
343k
  static const uint32_t shift[64] = {
288
343k
      7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
289
343k
      5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20,
290
343k
      4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
291
343k
      6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
292
343k
  };
293
294
343k
  uint32_t a0 = 0x67452301;
295
343k
  uint32_t b0 = 0xefcdab89;
296
343k
  uint32_t c0 = 0x98badcfe;
297
343k
  uint32_t d0 = 0x10325476;
298
299
4.17M
  for (size_t i = 0; i < data64.size(); i += 64) {
300
3.83M
    uint32_t a = a0;
301
3.83M
    uint32_t b = b0;
302
3.83M
    uint32_t c = c0;
303
3.83M
    uint32_t d = d0;
304
3.83M
    uint32_t f;
305
3.83M
    uint32_t g;
306
248M
    for (size_t j = 0; j < 64; j++) {
307
245M
      if (j < 16) {
308
61.2M
        f = (b & c) | ((~b) & d);
309
61.2M
        g = j;
310
183M
      } else if (j < 32) {
311
61.2M
        f = (d & b) | ((~d) & c);
312
61.2M
        g = (5 * j + 1) & 0xf;
313
122M
      } else if (j < 48) {
314
61.2M
        f = b ^ c ^ d;
315
61.2M
        g = (3 * j + 5) & 0xf;
316
61.2M
      } else {
317
61.2M
        f = c ^ (b | (~d));
318
61.2M
        g = (7 * j) & 0xf;
319
61.2M
      }
320
245M
      uint32_t dg0 = data64[i + g * 4 + 0];
321
245M
      uint32_t dg1 = data64[i + g * 4 + 1];
322
245M
      uint32_t dg2 = data64[i + g * 4 + 2];
323
245M
      uint32_t dg3 = data64[i + g * 4 + 3];
324
245M
      uint32_t u = dg0 | (dg1 << 8u) | (dg2 << 16u) | (dg3 << 24u);
325
245M
      f += a + sineparts[j] + u;
326
245M
      a = d;
327
245M
      d = c;
328
245M
      c = b;
329
245M
      b += (f << shift[j]) | (f >> (32u - shift[j]));
330
245M
    }
331
3.83M
    a0 += a;
332
3.83M
    b0 += b;
333
3.83M
    c0 += c;
334
3.83M
    d0 += d;
335
3.83M
  }
336
343k
  sum[0] = a0;
337
343k
  sum[1] = a0 >> 8u;
338
343k
  sum[2] = a0 >> 16u;
339
343k
  sum[3] = a0 >> 24u;
340
343k
  sum[4] = b0;
341
343k
  sum[5] = b0 >> 8u;
342
343k
  sum[6] = b0 >> 16u;
343
343k
  sum[7] = b0 >> 24u;
344
343k
  sum[8] = c0;
345
343k
  sum[9] = c0 >> 8u;
346
343k
  sum[10] = c0 >> 16u;
347
343k
  sum[11] = c0 >> 24u;
348
343k
  sum[12] = d0;
349
343k
  sum[13] = d0 >> 8u;
350
343k
  sum[14] = d0 >> 16u;
351
343k
  sum[15] = d0 >> 24u;
352
343k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_group.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
encode.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Line
Count
Source
264
48.4k
    JXL_NO_SANITIZE("unsigned-integer-overflow") {
265
48.4k
  std::vector<uint8_t> data64 = data;
266
48.4k
  data64.push_back(128);
267
  // Add bytes such that ((size + 8) & 63) == 0.
268
48.4k
  size_t extra = ((64 - ((data64.size() + 8) & 63)) & 63);
269
48.4k
  data64.resize(data64.size() + extra, 0);
270
436k
  for (uint64_t i = 0; i < 64; i += 8) {
271
387k
    data64.push_back(static_cast<uint64_t>(data.size() << 3u) >> i);
272
387k
  }
273
274
48.4k
  static const uint32_t sineparts[64] = {
275
48.4k
      0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a,
276
48.4k
      0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
277
48.4k
      0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, 0xf61e2562, 0xc040b340,
278
48.4k
      0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
279
48.4k
      0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8,
280
48.4k
      0x676f02d9, 0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c,
281
48.4k
      0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 0x289b7ec6, 0xeaa127fa,
282
48.4k
      0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
283
48.4k
      0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92,
284
48.4k
      0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
285
48.4k
      0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391,
286
48.4k
  };
287
48.4k
  static const uint32_t shift[64] = {
288
48.4k
      7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
289
48.4k
      5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20,
290
48.4k
      4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
291
48.4k
      6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
292
48.4k
  };
293
294
48.4k
  uint32_t a0 = 0x67452301;
295
48.4k
  uint32_t b0 = 0xefcdab89;
296
48.4k
  uint32_t c0 = 0x98badcfe;
297
48.4k
  uint32_t d0 = 0x10325476;
298
299
478k
  for (size_t i = 0; i < data64.size(); i += 64) {
300
430k
    uint32_t a = a0;
301
430k
    uint32_t b = b0;
302
430k
    uint32_t c = c0;
303
430k
    uint32_t d = d0;
304
430k
    uint32_t f;
305
430k
    uint32_t g;
306
27.9M
    for (size_t j = 0; j < 64; j++) {
307
27.5M
      if (j < 16) {
308
6.88M
        f = (b & c) | ((~b) & d);
309
6.88M
        g = j;
310
20.6M
      } else if (j < 32) {
311
6.88M
        f = (d & b) | ((~d) & c);
312
6.88M
        g = (5 * j + 1) & 0xf;
313
13.7M
      } else if (j < 48) {
314
6.88M
        f = b ^ c ^ d;
315
6.88M
        g = (3 * j + 5) & 0xf;
316
6.88M
      } else {
317
6.88M
        f = c ^ (b | (~d));
318
6.88M
        g = (7 * j) & 0xf;
319
6.88M
      }
320
27.5M
      uint32_t dg0 = data64[i + g * 4 + 0];
321
27.5M
      uint32_t dg1 = data64[i + g * 4 + 1];
322
27.5M
      uint32_t dg2 = data64[i + g * 4 + 2];
323
27.5M
      uint32_t dg3 = data64[i + g * 4 + 3];
324
27.5M
      uint32_t u = dg0 | (dg1 << 8u) | (dg2 << 16u) | (dg3 << 24u);
325
27.5M
      f += a + sineparts[j] + u;
326
27.5M
      a = d;
327
27.5M
      d = c;
328
27.5M
      c = b;
329
27.5M
      b += (f << shift[j]) | (f >> (32u - shift[j]));
330
27.5M
    }
331
430k
    a0 += a;
332
430k
    b0 += b;
333
430k
    c0 += c;
334
430k
    d0 += d;
335
430k
  }
336
48.4k
  sum[0] = a0;
337
48.4k
  sum[1] = a0 >> 8u;
338
48.4k
  sum[2] = a0 >> 16u;
339
48.4k
  sum[3] = a0 >> 24u;
340
48.4k
  sum[4] = b0;
341
48.4k
  sum[5] = b0 >> 8u;
342
48.4k
  sum[6] = b0 >> 16u;
343
48.4k
  sum[7] = b0 >> 24u;
344
48.4k
  sum[8] = c0;
345
48.4k
  sum[9] = c0 >> 8u;
346
48.4k
  sum[10] = c0 >> 16u;
347
48.4k
  sum[11] = c0 >> 24u;
348
48.4k
  sum[12] = d0;
349
48.4k
  sum[13] = d0 >> 8u;
350
48.4k
  sum[14] = d0 >> 16u;
351
48.4k
  sum[15] = d0 >> 24u;
352
48.4k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: luminance.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
jxl_cms.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Line
Count
Source
264
936
    JXL_NO_SANITIZE("unsigned-integer-overflow") {
265
936
  std::vector<uint8_t> data64 = data;
266
936
  data64.push_back(128);
267
  // Add bytes such that ((size + 8) & 63) == 0.
268
936
  size_t extra = ((64 - ((data64.size() + 8) & 63)) & 63);
269
936
  data64.resize(data64.size() + extra, 0);
270
8.42k
  for (uint64_t i = 0; i < 64; i += 8) {
271
7.48k
    data64.push_back(static_cast<uint64_t>(data.size() << 3u) >> i);
272
7.48k
  }
273
274
936
  static const uint32_t sineparts[64] = {
275
936
      0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a,
276
936
      0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
277
936
      0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, 0xf61e2562, 0xc040b340,
278
936
      0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
279
936
      0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8,
280
936
      0x676f02d9, 0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c,
281
936
      0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 0x289b7ec6, 0xeaa127fa,
282
936
      0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
283
936
      0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92,
284
936
      0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
285
936
      0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391,
286
936
  };
287
936
  static const uint32_t shift[64] = {
288
936
      7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
289
936
      5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20, 5, 9,  14, 20,
290
936
      4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
291
936
      6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
292
936
  };
293
294
936
  uint32_t a0 = 0x67452301;
295
936
  uint32_t b0 = 0xefcdab89;
296
936
  uint32_t c0 = 0x98badcfe;
297
936
  uint32_t d0 = 0x10325476;
298
299
9.53k
  for (size_t i = 0; i < data64.size(); i += 64) {
300
8.60k
    uint32_t a = a0;
301
8.60k
    uint32_t b = b0;
302
8.60k
    uint32_t c = c0;
303
8.60k
    uint32_t d = d0;
304
8.60k
    uint32_t f;
305
8.60k
    uint32_t g;
306
559k
    for (size_t j = 0; j < 64; j++) {
307
550k
      if (j < 16) {
308
137k
        f = (b & c) | ((~b) & d);
309
137k
        g = j;
310
412k
      } else if (j < 32) {
311
137k
        f = (d & b) | ((~d) & c);
312
137k
        g = (5 * j + 1) & 0xf;
313
275k
      } else if (j < 48) {
314
137k
        f = b ^ c ^ d;
315
137k
        g = (3 * j + 5) & 0xf;
316
137k
      } else {
317
137k
        f = c ^ (b | (~d));
318
137k
        g = (7 * j) & 0xf;
319
137k
      }
320
550k
      uint32_t dg0 = data64[i + g * 4 + 0];
321
550k
      uint32_t dg1 = data64[i + g * 4 + 1];
322
550k
      uint32_t dg2 = data64[i + g * 4 + 2];
323
550k
      uint32_t dg3 = data64[i + g * 4 + 3];
324
550k
      uint32_t u = dg0 | (dg1 << 8u) | (dg2 << 16u) | (dg3 << 24u);
325
550k
      f += a + sineparts[j] + u;
326
550k
      a = d;
327
550k
      d = c;
328
550k
      c = b;
329
550k
      b += (f << shift[j]) | (f >> (32u - shift[j]));
330
550k
    }
331
8.60k
    a0 += a;
332
8.60k
    b0 += b;
333
8.60k
    c0 += c;
334
8.60k
    d0 += d;
335
8.60k
  }
336
936
  sum[0] = a0;
337
936
  sum[1] = a0 >> 8u;
338
936
  sum[2] = a0 >> 16u;
339
936
  sum[3] = a0 >> 24u;
340
936
  sum[4] = b0;
341
936
  sum[5] = b0 >> 8u;
342
936
  sum[6] = b0 >> 16u;
343
936
  sum[7] = b0 >> 24u;
344
936
  sum[8] = c0;
345
936
  sum[9] = c0 >> 8u;
346
936
  sum[10] = c0 >> 16u;
347
936
  sum[11] = c0 >> 24u;
348
936
  sum[12] = d0;
349
936
  sum[13] = d0 >> 8u;
350
936
  sum[14] = d0 >> 16u;
351
936
  sum[15] = d0 >> 24u;
352
936
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: codec.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::ICCComputeMD5(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned char*)
353
354
828k
static Status CreateICCChadMatrix(double wx, double wy, Matrix3x3& result) {
355
828k
  Matrix3x3 m;
356
828k
  if (wy == 0) {  // WhitePoint can not be pitch-black.
357
43
    return JXL_FAILURE("Invalid WhitePoint");
358
43
  }
359
828k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, m));
360
828k
  result = m;
361
828k
  return true;
362
828k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
decode.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
354
421k
static Status CreateICCChadMatrix(double wx, double wy, Matrix3x3& result) {
355
421k
  Matrix3x3 m;
356
421k
  if (wy == 0) {  // WhitePoint can not be pitch-black.
357
4
    return JXL_FAILURE("Invalid WhitePoint");
358
4
  }
359
421k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, m));
360
421k
  result = m;
361
421k
  return true;
362
421k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
color_encoding_internal.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
354
3.25k
static Status CreateICCChadMatrix(double wx, double wy, Matrix3x3& result) {
355
3.25k
  Matrix3x3 m;
356
3.25k
  if (wy == 0) {  // WhitePoint can not be pitch-black.
357
1
    return JXL_FAILURE("Invalid WhitePoint");
358
1
  }
359
3.24k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, m));
360
3.23k
  result = m;
361
3.23k
  return true;
362
3.24k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
test_image.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
354
13.6k
static Status CreateICCChadMatrix(double wx, double wy, Matrix3x3& result) {
355
13.6k
  Matrix3x3 m;
356
13.6k
  if (wy == 0) {  // WhitePoint can not be pitch-black.
357
0
    return JXL_FAILURE("Invalid WhitePoint");
358
0
  }
359
13.6k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, m));
360
13.6k
  result = m;
361
13.6k
  return true;
362
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
packed_image_convert.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
354
342k
static Status CreateICCChadMatrix(double wx, double wy, Matrix3x3& result) {
355
342k
  Matrix3x3 m;
356
342k
  if (wy == 0) {  // WhitePoint can not be pitch-black.
357
2
    return JXL_FAILURE("Invalid WhitePoint");
358
2
  }
359
342k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, m));
360
342k
  result = m;
361
342k
  return true;
362
342k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
encode.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
354
46.3k
static Status CreateICCChadMatrix(double wx, double wy, Matrix3x3& result) {
355
46.3k
  Matrix3x3 m;
356
46.3k
  if (wy == 0) {  // WhitePoint can not be pitch-black.
357
0
    return JXL_FAILURE("Invalid WhitePoint");
358
0
  }
359
46.3k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, m));
360
46.3k
  result = m;
361
46.3k
  return true;
362
46.3k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
jxl_cms.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
354
1.06k
static Status CreateICCChadMatrix(double wx, double wy, Matrix3x3& result) {
355
1.06k
  Matrix3x3 m;
356
1.06k
  if (wy == 0) {  // WhitePoint can not be pitch-black.
357
36
    return JXL_FAILURE("Invalid WhitePoint");
358
36
  }
359
1.02k
  JXL_RETURN_IF_ERROR(AdaptToXYZD50(wx, wy, m));
360
854
  result = m;
361
854
  return true;
362
1.02k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCChadMatrix(double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
363
364
// Creates RGB to XYZ matrix given RGB primaries and white point in xy.
365
static Status CreateICCRGBMatrix(double rx, double ry, double gx, double gy,
366
                                 double bx, double by, double wx, double wy,
367
822k
                                 Matrix3x3& result) {
368
822k
  Matrix3x3 m;
369
822k
  JXL_RETURN_IF_ERROR(PrimariesToXYZD50(rx, ry, gx, gy, bx, by, wx, wy, m));
370
822k
  result = m;
371
822k
  return true;
372
822k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
decode.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
367
417k
                                 Matrix3x3& result) {
368
417k
  Matrix3x3 m;
369
417k
  JXL_RETURN_IF_ERROR(PrimariesToXYZD50(rx, ry, gx, gy, bx, by, wx, wy, m));
370
417k
  result = m;
371
417k
  return true;
372
417k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
color_encoding_internal.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
367
3.22k
                                 Matrix3x3& result) {
368
3.22k
  Matrix3x3 m;
369
3.22k
  JXL_RETURN_IF_ERROR(PrimariesToXYZD50(rx, ry, gx, gy, bx, by, wx, wy, m));
370
3.22k
  result = m;
371
3.22k
  return true;
372
3.22k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
test_image.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
367
13.6k
                                 Matrix3x3& result) {
368
13.6k
  Matrix3x3 m;
369
13.6k
  JXL_RETURN_IF_ERROR(PrimariesToXYZD50(rx, ry, gx, gy, bx, by, wx, wy, m));
370
13.6k
  result = m;
371
13.6k
  return true;
372
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
packed_image_convert.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
367
341k
                                 Matrix3x3& result) {
368
341k
  Matrix3x3 m;
369
341k
  JXL_RETURN_IF_ERROR(PrimariesToXYZD50(rx, ry, gx, gy, bx, by, wx, wy, m));
370
341k
  result = m;
371
341k
  return true;
372
341k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
encode.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
367
46.3k
                                 Matrix3x3& result) {
368
46.3k
  Matrix3x3 m;
369
46.3k
  JXL_RETURN_IF_ERROR(PrimariesToXYZD50(rx, ry, gx, gy, bx, by, wx, wy, m));
370
46.3k
  result = m;
371
46.3k
  return true;
372
46.3k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
jxl_cms.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Line
Count
Source
367
847
                                 Matrix3x3& result) {
368
847
  Matrix3x3 m;
369
847
  JXL_RETURN_IF_ERROR(PrimariesToXYZD50(rx, ry, gx, gy, bx, by, wx, wy, m));
370
762
  result = m;
371
762
  return true;
372
847
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCRGBMatrix(double, double, double, double, double, double, double, double, std::__1::array<std::__1::array<float, 3ul>, 3ul>&)
373
374
static void WriteICCUint32(uint32_t value, size_t pos,
375
75.4M
                           std::vector<uint8_t>* icc) {
376
75.4M
  if (icc->size() < pos + 4) icc->resize(pos + 4);
377
75.4M
  (*icc)[pos + 0] = (value >> 24u) & 255;
378
75.4M
  (*icc)[pos + 1] = (value >> 16u) & 255;
379
75.4M
  (*icc)[pos + 2] = (value >> 8u) & 255;
380
75.4M
  (*icc)[pos + 3] = value & 255;
381
75.4M
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
375
38.6M
                           std::vector<uint8_t>* icc) {
376
38.6M
  if (icc->size() < pos + 4) icc->resize(pos + 4);
377
38.6M
  (*icc)[pos + 0] = (value >> 24u) & 255;
378
38.6M
  (*icc)[pos + 1] = (value >> 16u) & 255;
379
38.6M
  (*icc)[pos + 2] = (value >> 8u) & 255;
380
38.6M
  (*icc)[pos + 3] = value & 255;
381
38.6M
}
Unexecuted instantiation: frame_header.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
375
291k
                           std::vector<uint8_t>* icc) {
376
291k
  if (icc->size() < pos + 4) icc->resize(pos + 4);
377
291k
  (*icc)[pos + 0] = (value >> 24u) & 255;
378
291k
  (*icc)[pos + 1] = (value >> 16u) & 255;
379
291k
  (*icc)[pos + 2] = (value >> 8u) & 255;
380
291k
  (*icc)[pos + 3] = value & 255;
381
291k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
375
1.22M
                           std::vector<uint8_t>* icc) {
376
1.22M
  if (icc->size() < pos + 4) icc->resize(pos + 4);
377
1.22M
  (*icc)[pos + 0] = (value >> 24u) & 255;
378
1.22M
  (*icc)[pos + 1] = (value >> 16u) & 255;
379
1.22M
  (*icc)[pos + 2] = (value >> 8u) & 255;
380
1.22M
  (*icc)[pos + 3] = value & 255;
381
1.22M
}
Unexecuted instantiation: test_utils.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
375
31.0M
                           std::vector<uint8_t>* icc) {
376
31.0M
  if (icc->size() < pos + 4) icc->resize(pos + 4);
377
31.0M
  (*icc)[pos + 0] = (value >> 24u) & 255;
378
31.0M
  (*icc)[pos + 1] = (value >> 16u) & 255;
379
31.0M
  (*icc)[pos + 2] = (value >> 8u) & 255;
380
31.0M
  (*icc)[pos + 3] = value & 255;
381
31.0M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
375
4.27M
                           std::vector<uint8_t>* icc) {
376
4.27M
  if (icc->size() < pos + 4) icc->resize(pos + 4);
377
4.27M
  (*icc)[pos + 0] = (value >> 24u) & 255;
378
4.27M
  (*icc)[pos + 1] = (value >> 16u) & 255;
379
4.27M
  (*icc)[pos + 2] = (value >> 8u) & 255;
380
4.27M
  (*icc)[pos + 3] = value & 255;
381
4.27M
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
375
84.8k
                           std::vector<uint8_t>* icc) {
376
84.8k
  if (icc->size() < pos + 4) icc->resize(pos + 4);
377
84.8k
  (*icc)[pos + 0] = (value >> 24u) & 255;
378
84.8k
  (*icc)[pos + 1] = (value >> 16u) & 255;
379
84.8k
  (*icc)[pos + 2] = (value >> 8u) & 255;
380
84.8k
  (*icc)[pos + 3] = value & 255;
381
84.8k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::WriteICCUint32(unsigned int, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
382
383
static void WriteICCUint16(uint16_t value, size_t pos,
384
7.82M
                           std::vector<uint8_t>* icc) {
385
7.82M
  if (icc->size() < pos + 2) icc->resize(pos + 2);
386
7.82M
  (*icc)[pos + 0] = (value >> 8u) & 255;
387
7.82M
  (*icc)[pos + 1] = value & 255;
388
7.82M
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
384
4.30M
                           std::vector<uint8_t>* icc) {
385
4.30M
  if (icc->size() < pos + 2) icc->resize(pos + 2);
386
4.30M
  (*icc)[pos + 0] = (value >> 8u) & 255;
387
4.30M
  (*icc)[pos + 1] = value & 255;
388
4.30M
}
Unexecuted instantiation: frame_header.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
384
27.6k
                           std::vector<uint8_t>* icc) {
385
27.6k
  if (icc->size() < pos + 2) icc->resize(pos + 2);
386
27.6k
  (*icc)[pos + 0] = (value >> 8u) & 255;
387
27.6k
  (*icc)[pos + 1] = value & 255;
388
27.6k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
384
109k
                           std::vector<uint8_t>* icc) {
385
109k
  if (icc->size() < pos + 2) icc->resize(pos + 2);
386
109k
  (*icc)[pos + 0] = (value >> 8u) & 255;
387
109k
  (*icc)[pos + 1] = value & 255;
388
109k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
384
2.97M
                           std::vector<uint8_t>* icc) {
385
2.97M
  if (icc->size() < pos + 2) icc->resize(pos + 2);
386
2.97M
  (*icc)[pos + 0] = (value >> 8u) & 255;
387
2.97M
  (*icc)[pos + 1] = value & 255;
388
2.97M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
384
387k
                           std::vector<uint8_t>* icc) {
385
387k
  if (icc->size() < pos + 2) icc->resize(pos + 2);
386
387k
  (*icc)[pos + 0] = (value >> 8u) & 255;
387
387k
  (*icc)[pos + 1] = value & 255;
388
387k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
384
21.8k
                           std::vector<uint8_t>* icc) {
385
21.8k
  if (icc->size() < pos + 2) icc->resize(pos + 2);
386
21.8k
  (*icc)[pos + 0] = (value >> 8u) & 255;
387
21.8k
  (*icc)[pos + 1] = value & 255;
388
21.8k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::WriteICCUint16(unsigned short, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
389
390
static void WriteICCUint8(uint8_t value, size_t pos,
391
140M
                          std::vector<uint8_t>* icc) {
392
140M
  if (icc->size() < pos + 1) icc->resize(pos + 1);
393
140M
  (*icc)[pos] = value;
394
140M
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
391
92.7M
                          std::vector<uint8_t>* icc) {
392
92.7M
  if (icc->size() < pos + 1) icc->resize(pos + 1);
393
92.7M
  (*icc)[pos] = value;
394
92.7M
}
Unexecuted instantiation: frame_header.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
391
42.5k
                          std::vector<uint8_t>* icc) {
392
42.5k
  if (icc->size() < pos + 1) icc->resize(pos + 1);
393
42.5k
  (*icc)[pos] = value;
394
42.5k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
391
54.5k
                          std::vector<uint8_t>* icc) {
392
54.5k
  if (icc->size() < pos + 1) icc->resize(pos + 1);
393
54.5k
  (*icc)[pos] = value;
394
54.5k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
391
47.1M
                          std::vector<uint8_t>* icc) {
392
47.1M
  if (icc->size() < pos + 1) icc->resize(pos + 1);
393
47.1M
  (*icc)[pos] = value;
394
47.1M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
391
185k
                          std::vector<uint8_t>* icc) {
392
185k
  if (icc->size() < pos + 1) icc->resize(pos + 1);
393
185k
  (*icc)[pos] = value;
394
185k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: jxl_cms.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::WriteICCUint8(unsigned char, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
395
396
// Writes a 4-character tag
397
static void WriteICCTag(const char* value, size_t pos,
398
24.2M
                        std::vector<uint8_t>* icc) {
399
24.2M
  if (icc->size() < pos + 4) icc->resize(pos + 4);
400
24.2M
  memcpy(icc->data() + pos, value, 4);
401
24.2M
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
398
12.4M
                        std::vector<uint8_t>* icc) {
399
12.4M
  if (icc->size() < pos + 4) icc->resize(pos + 4);
400
12.4M
  memcpy(icc->data() + pos, value, 4);
401
12.4M
}
Unexecuted instantiation: frame_header.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
398
94.2k
                        std::vector<uint8_t>* icc) {
399
94.2k
  if (icc->size() < pos + 4) icc->resize(pos + 4);
400
94.2k
  memcpy(icc->data() + pos, value, 4);
401
94.2k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
398
395k
                        std::vector<uint8_t>* icc) {
399
395k
  if (icc->size() < pos + 4) icc->resize(pos + 4);
400
395k
  memcpy(icc->data() + pos, value, 4);
401
395k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
398
9.98M
                        std::vector<uint8_t>* icc) {
399
9.98M
  if (icc->size() < pos + 4) icc->resize(pos + 4);
400
9.98M
  memcpy(icc->data() + pos, value, 4);
401
9.98M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
398
1.38M
                        std::vector<uint8_t>* icc) {
399
1.38M
  if (icc->size() < pos + 4) icc->resize(pos + 4);
400
1.38M
  memcpy(icc->data() + pos, value, 4);
401
1.38M
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
398
29.8k
                        std::vector<uint8_t>* icc) {
399
29.8k
  if (icc->size() < pos + 4) icc->resize(pos + 4);
400
29.8k
  memcpy(icc->data() + pos, value, 4);
401
29.8k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::WriteICCTag(char const*, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
402
403
static Status WriteICCS15Fixed16(float value, size_t pos,
404
21.8M
                                 std::vector<uint8_t>* icc) {
405
  // "nextafterf" for 32768.0f towards zero are:
406
  // 32767.998046875, 32767.99609375, 32767.994140625
407
  // Even the first value works well,...
408
21.8M
  bool ok = (-32767.995f <= value) && (value <= 32767.995f);
409
21.8M
  if (!ok) return JXL_FAILURE("ICC value is out of range / NaN");
410
21.8M
  int32_t i = static_cast<int32_t>(std::lround(value * 65536.0f));
411
  // Use two's complement
412
21.8M
  uint32_t u = static_cast<uint32_t>(i);
413
21.8M
  WriteICCUint32(u, pos, icc);
414
21.8M
  return true;
415
21.8M
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
404
11.2M
                                 std::vector<uint8_t>* icc) {
405
  // "nextafterf" for 32768.0f towards zero are:
406
  // 32767.998046875, 32767.99609375, 32767.994140625
407
  // Even the first value works well,...
408
11.2M
  bool ok = (-32767.995f <= value) && (value <= 32767.995f);
409
11.2M
  if (!ok) return JXL_FAILURE("ICC value is out of range / NaN");
410
11.2M
  int32_t i = static_cast<int32_t>(std::lround(value * 65536.0f));
411
  // Use two's complement
412
11.2M
  uint32_t u = static_cast<uint32_t>(i);
413
11.2M
  WriteICCUint32(u, pos, icc);
414
11.2M
  return true;
415
11.2M
}
Unexecuted instantiation: frame_header.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
404
84.0k
                                 std::vector<uint8_t>* icc) {
405
  // "nextafterf" for 32768.0f towards zero are:
406
  // 32767.998046875, 32767.99609375, 32767.994140625
407
  // Even the first value works well,...
408
84.0k
  bool ok = (-32767.995f <= value) && (value <= 32767.995f);
409
84.0k
  if (!ok) return JXL_FAILURE("ICC value is out of range / NaN");
410
83.9k
  int32_t i = static_cast<int32_t>(std::lround(value * 65536.0f));
411
  // Use two's complement
412
83.9k
  uint32_t u = static_cast<uint32_t>(i);
413
83.9k
  WriteICCUint32(u, pos, icc);
414
83.9k
  return true;
415
84.0k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
404
354k
                                 std::vector<uint8_t>* icc) {
405
  // "nextafterf" for 32768.0f towards zero are:
406
  // 32767.998046875, 32767.99609375, 32767.994140625
407
  // Even the first value works well,...
408
354k
  bool ok = (-32767.995f <= value) && (value <= 32767.995f);
409
354k
  if (!ok) return JXL_FAILURE("ICC value is out of range / NaN");
410
354k
  int32_t i = static_cast<int32_t>(std::lround(value * 65536.0f));
411
  // Use two's complement
412
354k
  uint32_t u = static_cast<uint32_t>(i);
413
354k
  WriteICCUint32(u, pos, icc);
414
354k
  return true;
415
354k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
404
8.99M
                                 std::vector<uint8_t>* icc) {
405
  // "nextafterf" for 32768.0f towards zero are:
406
  // 32767.998046875, 32767.99609375, 32767.994140625
407
  // Even the first value works well,...
408
8.99M
  bool ok = (-32767.995f <= value) && (value <= 32767.995f);
409
8.99M
  if (!ok) return JXL_FAILURE("ICC value is out of range / NaN");
410
8.99M
  int32_t i = static_cast<int32_t>(std::lround(value * 65536.0f));
411
  // Use two's complement
412
8.99M
  uint32_t u = static_cast<uint32_t>(i);
413
8.99M
  WriteICCUint32(u, pos, icc);
414
8.99M
  return true;
415
8.99M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
404
1.22M
                                 std::vector<uint8_t>* icc) {
405
  // "nextafterf" for 32768.0f towards zero are:
406
  // 32767.998046875, 32767.99609375, 32767.994140625
407
  // Even the first value works well,...
408
1.22M
  bool ok = (-32767.995f <= value) && (value <= 32767.995f);
409
1.22M
  if (!ok) return JXL_FAILURE("ICC value is out of range / NaN");
410
1.22M
  int32_t i = static_cast<int32_t>(std::lround(value * 65536.0f));
411
  // Use two's complement
412
1.22M
  uint32_t u = static_cast<uint32_t>(i);
413
1.22M
  WriteICCUint32(u, pos, icc);
414
1.22M
  return true;
415
1.22M
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
404
21.2k
                                 std::vector<uint8_t>* icc) {
405
  // "nextafterf" for 32768.0f towards zero are:
406
  // 32767.998046875, 32767.99609375, 32767.994140625
407
  // Even the first value works well,...
408
21.2k
  bool ok = (-32767.995f <= value) && (value <= 32767.995f);
409
21.2k
  if (!ok) return JXL_FAILURE("ICC value is out of range / NaN");
410
21.0k
  int32_t i = static_cast<int32_t>(std::lround(value * 65536.0f));
411
  // Use two's complement
412
21.0k
  uint32_t u = static_cast<uint32_t>(i);
413
21.0k
  WriteICCUint32(u, pos, icc);
414
21.0k
  return true;
415
21.2k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::WriteICCS15Fixed16(float, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
416
417
static Status CreateICCHeader(const JxlColorEncoding& c,
418
839k
                              std::vector<uint8_t>* header) {
419
  // TODO(lode): choose color management engine name, e.g. "skia" if
420
  // integrated in skia.
421
839k
  static const char* kCmm = "jxl ";
422
423
839k
  header->resize(128, 0);
424
425
839k
  WriteICCUint32(0, 0, header);  // size, correct value filled in at end
426
839k
  WriteICCTag(kCmm, 4, header);
427
839k
  WriteICCUint32(0x04400000u, 8, header);
428
839k
  const char* profile_type =
429
839k
      c.color_space == JXL_COLOR_SPACE_XYB ? "scnr" : "mntr";
430
839k
  WriteICCTag(profile_type, 12, header);
431
839k
  WriteICCTag(c.color_space == JXL_COLOR_SPACE_GRAY ? "GRAY" : "RGB ", 16,
432
839k
              header);
433
839k
  if (kEnable3DToneMapping && CanToneMap(c)) {
434
    // We are going to use a 3D LUT for tone mapping, which will be more compact
435
    // with an 8-bit LUT to CIELAB than with a 16-bit LUT to XYZ. 8-bit XYZ
436
    // would not be viable due to XYZ being linear, whereas it is fine with
437
    // CIELAB's ~cube root.
438
36.7k
    WriteICCTag("Lab ", 20, header);
439
802k
  } else {
440
802k
    WriteICCTag("XYZ ", 20, header);
441
802k
  }
442
443
  // Three uint32_t's date/time encoding.
444
  // TODO(lode): encode actual date and time, this is a placeholder
445
839k
  uint32_t year = 2019;
446
839k
  uint32_t month = 12;
447
839k
  uint32_t day = 1;
448
839k
  uint32_t hour = 0;
449
839k
  uint32_t minute = 0;
450
839k
  uint32_t second = 0;
451
839k
  WriteICCUint16(year, 24, header);
452
839k
  WriteICCUint16(month, 26, header);
453
839k
  WriteICCUint16(day, 28, header);
454
839k
  WriteICCUint16(hour, 30, header);
455
839k
  WriteICCUint16(minute, 32, header);
456
839k
  WriteICCUint16(second, 34, header);
457
458
839k
  WriteICCTag("acsp", 36, header);
459
839k
  WriteICCTag("APPL", 40, header);
460
839k
  WriteICCUint32(0, 44, header);  // flags
461
839k
  WriteICCUint32(0, 48, header);  // device manufacturer
462
839k
  WriteICCUint32(0, 52, header);  // device model
463
839k
  WriteICCUint32(0, 56, header);  // device attributes
464
839k
  WriteICCUint32(0, 60, header);  // device attributes
465
839k
  WriteICCUint32(static_cast<uint32_t>(c.rendering_intent), 64, header);
466
467
  // Mandatory D50 white point of profile connection space
468
839k
  WriteICCUint32(0x0000f6d6, 68, header);
469
839k
  WriteICCUint32(0x00010000, 72, header);
470
839k
  WriteICCUint32(0x0000d32d, 76, header);
471
472
839k
  WriteICCTag(kCmm, 80, header);
473
474
839k
  return true;
475
839k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
418
428k
                              std::vector<uint8_t>* header) {
419
  // TODO(lode): choose color management engine name, e.g. "skia" if
420
  // integrated in skia.
421
428k
  static const char* kCmm = "jxl ";
422
423
428k
  header->resize(128, 0);
424
425
428k
  WriteICCUint32(0, 0, header);  // size, correct value filled in at end
426
428k
  WriteICCTag(kCmm, 4, header);
427
428k
  WriteICCUint32(0x04400000u, 8, header);
428
428k
  const char* profile_type =
429
428k
      c.color_space == JXL_COLOR_SPACE_XYB ? "scnr" : "mntr";
430
428k
  WriteICCTag(profile_type, 12, header);
431
428k
  WriteICCTag(c.color_space == JXL_COLOR_SPACE_GRAY ? "GRAY" : "RGB ", 16,
432
428k
              header);
433
428k
  if (kEnable3DToneMapping && CanToneMap(c)) {
434
    // We are going to use a 3D LUT for tone mapping, which will be more compact
435
    // with an 8-bit LUT to CIELAB than with a 16-bit LUT to XYZ. 8-bit XYZ
436
    // would not be viable due to XYZ being linear, whereas it is fine with
437
    // CIELAB's ~cube root.
438
24.4k
    WriteICCTag("Lab ", 20, header);
439
404k
  } else {
440
404k
    WriteICCTag("XYZ ", 20, header);
441
404k
  }
442
443
  // Three uint32_t's date/time encoding.
444
  // TODO(lode): encode actual date and time, this is a placeholder
445
428k
  uint32_t year = 2019;
446
428k
  uint32_t month = 12;
447
428k
  uint32_t day = 1;
448
428k
  uint32_t hour = 0;
449
428k
  uint32_t minute = 0;
450
428k
  uint32_t second = 0;
451
428k
  WriteICCUint16(year, 24, header);
452
428k
  WriteICCUint16(month, 26, header);
453
428k
  WriteICCUint16(day, 28, header);
454
428k
  WriteICCUint16(hour, 30, header);
455
428k
  WriteICCUint16(minute, 32, header);
456
428k
  WriteICCUint16(second, 34, header);
457
458
428k
  WriteICCTag("acsp", 36, header);
459
428k
  WriteICCTag("APPL", 40, header);
460
428k
  WriteICCUint32(0, 44, header);  // flags
461
428k
  WriteICCUint32(0, 48, header);  // device manufacturer
462
428k
  WriteICCUint32(0, 52, header);  // device model
463
428k
  WriteICCUint32(0, 56, header);  // device attributes
464
428k
  WriteICCUint32(0, 60, header);  // device attributes
465
428k
  WriteICCUint32(static_cast<uint32_t>(c.rendering_intent), 64, header);
466
467
  // Mandatory D50 white point of profile connection space
468
428k
  WriteICCUint32(0x0000f6d6, 68, header);
469
428k
  WriteICCUint32(0x00010000, 72, header);
470
428k
  WriteICCUint32(0x0000d32d, 76, header);
471
472
428k
  WriteICCTag(kCmm, 80, header);
473
474
428k
  return true;
475
428k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
418
3.28k
                              std::vector<uint8_t>* header) {
419
  // TODO(lode): choose color management engine name, e.g. "skia" if
420
  // integrated in skia.
421
3.28k
  static const char* kCmm = "jxl ";
422
423
3.28k
  header->resize(128, 0);
424
425
3.28k
  WriteICCUint32(0, 0, header);  // size, correct value filled in at end
426
3.28k
  WriteICCTag(kCmm, 4, header);
427
3.28k
  WriteICCUint32(0x04400000u, 8, header);
428
3.28k
  const char* profile_type =
429
3.28k
      c.color_space == JXL_COLOR_SPACE_XYB ? "scnr" : "mntr";
430
3.28k
  WriteICCTag(profile_type, 12, header);
431
3.28k
  WriteICCTag(c.color_space == JXL_COLOR_SPACE_GRAY ? "GRAY" : "RGB ", 16,
432
3.28k
              header);
433
3.28k
  if (kEnable3DToneMapping && CanToneMap(c)) {
434
    // We are going to use a 3D LUT for tone mapping, which will be more compact
435
    // with an 8-bit LUT to CIELAB than with a 16-bit LUT to XYZ. 8-bit XYZ
436
    // would not be viable due to XYZ being linear, whereas it is fine with
437
    // CIELAB's ~cube root.
438
8
    WriteICCTag("Lab ", 20, header);
439
3.27k
  } else {
440
3.27k
    WriteICCTag("XYZ ", 20, header);
441
3.27k
  }
442
443
  // Three uint32_t's date/time encoding.
444
  // TODO(lode): encode actual date and time, this is a placeholder
445
3.28k
  uint32_t year = 2019;
446
3.28k
  uint32_t month = 12;
447
3.28k
  uint32_t day = 1;
448
3.28k
  uint32_t hour = 0;
449
3.28k
  uint32_t minute = 0;
450
3.28k
  uint32_t second = 0;
451
3.28k
  WriteICCUint16(year, 24, header);
452
3.28k
  WriteICCUint16(month, 26, header);
453
3.28k
  WriteICCUint16(day, 28, header);
454
3.28k
  WriteICCUint16(hour, 30, header);
455
3.28k
  WriteICCUint16(minute, 32, header);
456
3.28k
  WriteICCUint16(second, 34, header);
457
458
3.28k
  WriteICCTag("acsp", 36, header);
459
3.28k
  WriteICCTag("APPL", 40, header);
460
3.28k
  WriteICCUint32(0, 44, header);  // flags
461
3.28k
  WriteICCUint32(0, 48, header);  // device manufacturer
462
3.28k
  WriteICCUint32(0, 52, header);  // device model
463
3.28k
  WriteICCUint32(0, 56, header);  // device attributes
464
3.28k
  WriteICCUint32(0, 60, header);  // device attributes
465
3.28k
  WriteICCUint32(static_cast<uint32_t>(c.rendering_intent), 64, header);
466
467
  // Mandatory D50 white point of profile connection space
468
3.28k
  WriteICCUint32(0x0000f6d6, 68, header);
469
3.28k
  WriteICCUint32(0x00010000, 72, header);
470
3.28k
  WriteICCUint32(0x0000d32d, 76, header);
471
472
3.28k
  WriteICCTag(kCmm, 80, header);
473
474
3.28k
  return true;
475
3.28k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
418
13.6k
                              std::vector<uint8_t>* header) {
419
  // TODO(lode): choose color management engine name, e.g. "skia" if
420
  // integrated in skia.
421
13.6k
  static const char* kCmm = "jxl ";
422
423
13.6k
  header->resize(128, 0);
424
425
13.6k
  WriteICCUint32(0, 0, header);  // size, correct value filled in at end
426
13.6k
  WriteICCTag(kCmm, 4, header);
427
13.6k
  WriteICCUint32(0x04400000u, 8, header);
428
13.6k
  const char* profile_type =
429
13.6k
      c.color_space == JXL_COLOR_SPACE_XYB ? "scnr" : "mntr";
430
13.6k
  WriteICCTag(profile_type, 12, header);
431
13.6k
  WriteICCTag(c.color_space == JXL_COLOR_SPACE_GRAY ? "GRAY" : "RGB ", 16,
432
13.6k
              header);
433
13.6k
  if (kEnable3DToneMapping && CanToneMap(c)) {
434
    // We are going to use a 3D LUT for tone mapping, which will be more compact
435
    // with an 8-bit LUT to CIELAB than with a 16-bit LUT to XYZ. 8-bit XYZ
436
    // would not be viable due to XYZ being linear, whereas it is fine with
437
    // CIELAB's ~cube root.
438
0
    WriteICCTag("Lab ", 20, header);
439
13.6k
  } else {
440
13.6k
    WriteICCTag("XYZ ", 20, header);
441
13.6k
  }
442
443
  // Three uint32_t's date/time encoding.
444
  // TODO(lode): encode actual date and time, this is a placeholder
445
13.6k
  uint32_t year = 2019;
446
13.6k
  uint32_t month = 12;
447
13.6k
  uint32_t day = 1;
448
13.6k
  uint32_t hour = 0;
449
13.6k
  uint32_t minute = 0;
450
13.6k
  uint32_t second = 0;
451
13.6k
  WriteICCUint16(year, 24, header);
452
13.6k
  WriteICCUint16(month, 26, header);
453
13.6k
  WriteICCUint16(day, 28, header);
454
13.6k
  WriteICCUint16(hour, 30, header);
455
13.6k
  WriteICCUint16(minute, 32, header);
456
13.6k
  WriteICCUint16(second, 34, header);
457
458
13.6k
  WriteICCTag("acsp", 36, header);
459
13.6k
  WriteICCTag("APPL", 40, header);
460
13.6k
  WriteICCUint32(0, 44, header);  // flags
461
13.6k
  WriteICCUint32(0, 48, header);  // device manufacturer
462
13.6k
  WriteICCUint32(0, 52, header);  // device model
463
13.6k
  WriteICCUint32(0, 56, header);  // device attributes
464
13.6k
  WriteICCUint32(0, 60, header);  // device attributes
465
13.6k
  WriteICCUint32(static_cast<uint32_t>(c.rendering_intent), 64, header);
466
467
  // Mandatory D50 white point of profile connection space
468
13.6k
  WriteICCUint32(0x0000f6d6, 68, header);
469
13.6k
  WriteICCUint32(0x00010000, 72, header);
470
13.6k
  WriteICCUint32(0x0000d32d, 76, header);
471
472
13.6k
  WriteICCTag(kCmm, 80, header);
473
474
13.6k
  return true;
475
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
418
343k
                              std::vector<uint8_t>* header) {
419
  // TODO(lode): choose color management engine name, e.g. "skia" if
420
  // integrated in skia.
421
343k
  static const char* kCmm = "jxl ";
422
423
343k
  header->resize(128, 0);
424
425
343k
  WriteICCUint32(0, 0, header);  // size, correct value filled in at end
426
343k
  WriteICCTag(kCmm, 4, header);
427
343k
  WriteICCUint32(0x04400000u, 8, header);
428
343k
  const char* profile_type =
429
343k
      c.color_space == JXL_COLOR_SPACE_XYB ? "scnr" : "mntr";
430
343k
  WriteICCTag(profile_type, 12, header);
431
343k
  WriteICCTag(c.color_space == JXL_COLOR_SPACE_GRAY ? "GRAY" : "RGB ", 16,
432
343k
              header);
433
343k
  if (kEnable3DToneMapping && CanToneMap(c)) {
434
    // We are going to use a 3D LUT for tone mapping, which will be more compact
435
    // with an 8-bit LUT to CIELAB than with a 16-bit LUT to XYZ. 8-bit XYZ
436
    // would not be viable due to XYZ being linear, whereas it is fine with
437
    // CIELAB's ~cube root.
438
12.2k
    WriteICCTag("Lab ", 20, header);
439
331k
  } else {
440
331k
    WriteICCTag("XYZ ", 20, header);
441
331k
  }
442
443
  // Three uint32_t's date/time encoding.
444
  // TODO(lode): encode actual date and time, this is a placeholder
445
343k
  uint32_t year = 2019;
446
343k
  uint32_t month = 12;
447
343k
  uint32_t day = 1;
448
343k
  uint32_t hour = 0;
449
343k
  uint32_t minute = 0;
450
343k
  uint32_t second = 0;
451
343k
  WriteICCUint16(year, 24, header);
452
343k
  WriteICCUint16(month, 26, header);
453
343k
  WriteICCUint16(day, 28, header);
454
343k
  WriteICCUint16(hour, 30, header);
455
343k
  WriteICCUint16(minute, 32, header);
456
343k
  WriteICCUint16(second, 34, header);
457
458
343k
  WriteICCTag("acsp", 36, header);
459
343k
  WriteICCTag("APPL", 40, header);
460
343k
  WriteICCUint32(0, 44, header);  // flags
461
343k
  WriteICCUint32(0, 48, header);  // device manufacturer
462
343k
  WriteICCUint32(0, 52, header);  // device model
463
343k
  WriteICCUint32(0, 56, header);  // device attributes
464
343k
  WriteICCUint32(0, 60, header);  // device attributes
465
343k
  WriteICCUint32(static_cast<uint32_t>(c.rendering_intent), 64, header);
466
467
  // Mandatory D50 white point of profile connection space
468
343k
  WriteICCUint32(0x0000f6d6, 68, header);
469
343k
  WriteICCUint32(0x00010000, 72, header);
470
343k
  WriteICCUint32(0x0000d32d, 76, header);
471
472
343k
  WriteICCTag(kCmm, 80, header);
473
474
343k
  return true;
475
343k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
418
48.4k
                              std::vector<uint8_t>* header) {
419
  // TODO(lode): choose color management engine name, e.g. "skia" if
420
  // integrated in skia.
421
48.4k
  static const char* kCmm = "jxl ";
422
423
48.4k
  header->resize(128, 0);
424
425
48.4k
  WriteICCUint32(0, 0, header);  // size, correct value filled in at end
426
48.4k
  WriteICCTag(kCmm, 4, header);
427
48.4k
  WriteICCUint32(0x04400000u, 8, header);
428
48.4k
  const char* profile_type =
429
48.4k
      c.color_space == JXL_COLOR_SPACE_XYB ? "scnr" : "mntr";
430
48.4k
  WriteICCTag(profile_type, 12, header);
431
48.4k
  WriteICCTag(c.color_space == JXL_COLOR_SPACE_GRAY ? "GRAY" : "RGB ", 16,
432
48.4k
              header);
433
48.4k
  if (kEnable3DToneMapping && CanToneMap(c)) {
434
    // We are going to use a 3D LUT for tone mapping, which will be more compact
435
    // with an 8-bit LUT to CIELAB than with a 16-bit LUT to XYZ. 8-bit XYZ
436
    // would not be viable due to XYZ being linear, whereas it is fine with
437
    // CIELAB's ~cube root.
438
0
    WriteICCTag("Lab ", 20, header);
439
48.4k
  } else {
440
48.4k
    WriteICCTag("XYZ ", 20, header);
441
48.4k
  }
442
443
  // Three uint32_t's date/time encoding.
444
  // TODO(lode): encode actual date and time, this is a placeholder
445
48.4k
  uint32_t year = 2019;
446
48.4k
  uint32_t month = 12;
447
48.4k
  uint32_t day = 1;
448
48.4k
  uint32_t hour = 0;
449
48.4k
  uint32_t minute = 0;
450
48.4k
  uint32_t second = 0;
451
48.4k
  WriteICCUint16(year, 24, header);
452
48.4k
  WriteICCUint16(month, 26, header);
453
48.4k
  WriteICCUint16(day, 28, header);
454
48.4k
  WriteICCUint16(hour, 30, header);
455
48.4k
  WriteICCUint16(minute, 32, header);
456
48.4k
  WriteICCUint16(second, 34, header);
457
458
48.4k
  WriteICCTag("acsp", 36, header);
459
48.4k
  WriteICCTag("APPL", 40, header);
460
48.4k
  WriteICCUint32(0, 44, header);  // flags
461
48.4k
  WriteICCUint32(0, 48, header);  // device manufacturer
462
48.4k
  WriteICCUint32(0, 52, header);  // device model
463
48.4k
  WriteICCUint32(0, 56, header);  // device attributes
464
48.4k
  WriteICCUint32(0, 60, header);  // device attributes
465
48.4k
  WriteICCUint32(static_cast<uint32_t>(c.rendering_intent), 64, header);
466
467
  // Mandatory D50 white point of profile connection space
468
48.4k
  WriteICCUint32(0x0000f6d6, 68, header);
469
48.4k
  WriteICCUint32(0x00010000, 72, header);
470
48.4k
  WriteICCUint32(0x0000d32d, 76, header);
471
472
48.4k
  WriteICCTag(kCmm, 80, header);
473
474
48.4k
  return true;
475
48.4k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
418
1.42k
                              std::vector<uint8_t>* header) {
419
  // TODO(lode): choose color management engine name, e.g. "skia" if
420
  // integrated in skia.
421
1.42k
  static const char* kCmm = "jxl ";
422
423
1.42k
  header->resize(128, 0);
424
425
1.42k
  WriteICCUint32(0, 0, header);  // size, correct value filled in at end
426
1.42k
  WriteICCTag(kCmm, 4, header);
427
1.42k
  WriteICCUint32(0x04400000u, 8, header);
428
1.42k
  const char* profile_type =
429
1.42k
      c.color_space == JXL_COLOR_SPACE_XYB ? "scnr" : "mntr";
430
1.42k
  WriteICCTag(profile_type, 12, header);
431
1.42k
  WriteICCTag(c.color_space == JXL_COLOR_SPACE_GRAY ? "GRAY" : "RGB ", 16,
432
1.42k
              header);
433
1.42k
  if (kEnable3DToneMapping && CanToneMap(c)) {
434
    // We are going to use a 3D LUT for tone mapping, which will be more compact
435
    // with an 8-bit LUT to CIELAB than with a 16-bit LUT to XYZ. 8-bit XYZ
436
    // would not be viable due to XYZ being linear, whereas it is fine with
437
    // CIELAB's ~cube root.
438
0
    WriteICCTag("Lab ", 20, header);
439
1.42k
  } else {
440
1.42k
    WriteICCTag("XYZ ", 20, header);
441
1.42k
  }
442
443
  // Three uint32_t's date/time encoding.
444
  // TODO(lode): encode actual date and time, this is a placeholder
445
1.42k
  uint32_t year = 2019;
446
1.42k
  uint32_t month = 12;
447
1.42k
  uint32_t day = 1;
448
1.42k
  uint32_t hour = 0;
449
1.42k
  uint32_t minute = 0;
450
1.42k
  uint32_t second = 0;
451
1.42k
  WriteICCUint16(year, 24, header);
452
1.42k
  WriteICCUint16(month, 26, header);
453
1.42k
  WriteICCUint16(day, 28, header);
454
1.42k
  WriteICCUint16(hour, 30, header);
455
1.42k
  WriteICCUint16(minute, 32, header);
456
1.42k
  WriteICCUint16(second, 34, header);
457
458
1.42k
  WriteICCTag("acsp", 36, header);
459
1.42k
  WriteICCTag("APPL", 40, header);
460
1.42k
  WriteICCUint32(0, 44, header);  // flags
461
1.42k
  WriteICCUint32(0, 48, header);  // device manufacturer
462
1.42k
  WriteICCUint32(0, 52, header);  // device model
463
1.42k
  WriteICCUint32(0, 56, header);  // device attributes
464
1.42k
  WriteICCUint32(0, 60, header);  // device attributes
465
1.42k
  WriteICCUint32(static_cast<uint32_t>(c.rendering_intent), 64, header);
466
467
  // Mandatory D50 white point of profile connection space
468
1.42k
  WriteICCUint32(0x0000f6d6, 68, header);
469
1.42k
  WriteICCUint32(0x00010000, 72, header);
470
1.42k
  WriteICCUint32(0x0000d32d, 76, header);
471
472
1.42k
  WriteICCTag(kCmm, 80, header);
473
474
1.42k
  return true;
475
1.42k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCHeader(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
476
477
static void AddToICCTagTable(const char* tag, size_t offset, size_t size,
478
                             std::vector<uint8_t>* tagtable,
479
9.07M
                             std::vector<size_t>* offsets) {
480
9.07M
  WriteICCTag(tag, tagtable->size(), tagtable);
481
  // writing true offset deferred to later
482
9.07M
  WriteICCUint32(0, tagtable->size(), tagtable);
483
9.07M
  offsets->push_back(offset);
484
9.07M
  WriteICCUint32(size, tagtable->size(), tagtable);
485
9.07M
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
decode.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
479
4.61M
                             std::vector<size_t>* offsets) {
480
4.61M
  WriteICCTag(tag, tagtable->size(), tagtable);
481
  // writing true offset deferred to later
482
4.61M
  WriteICCUint32(0, tagtable->size(), tagtable);
483
4.61M
  offsets->push_back(offset);
484
4.61M
  WriteICCUint32(size, tagtable->size(), tagtable);
485
4.61M
}
Unexecuted instantiation: frame_header.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
color_encoding_internal.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
479
35.5k
                             std::vector<size_t>* offsets) {
480
35.5k
  WriteICCTag(tag, tagtable->size(), tagtable);
481
  // writing true offset deferred to later
482
35.5k
  WriteICCUint32(0, tagtable->size(), tagtable);
483
35.5k
  offsets->push_back(offset);
484
35.5k
  WriteICCUint32(size, tagtable->size(), tagtable);
485
35.5k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: epf.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: blending.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
test_image.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
479
149k
                             std::vector<size_t>* offsets) {
480
149k
  WriteICCTag(tag, tagtable->size(), tagtable);
481
  // writing true offset deferred to later
482
149k
  WriteICCUint32(0, tagtable->size(), tagtable);
483
149k
  offsets->push_back(offset);
484
149k
  WriteICCUint32(size, tagtable->size(), tagtable);
485
149k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
packed_image_convert.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
479
3.75M
                             std::vector<size_t>* offsets) {
480
3.75M
  WriteICCTag(tag, tagtable->size(), tagtable);
481
  // writing true offset deferred to later
482
3.75M
  WriteICCUint32(0, tagtable->size(), tagtable);
483
3.75M
  offsets->push_back(offset);
484
3.75M
  WriteICCUint32(size, tagtable->size(), tagtable);
485
3.75M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
encode.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
479
518k
                             std::vector<size_t>* offsets) {
480
518k
  WriteICCTag(tag, tagtable->size(), tagtable);
481
  // writing true offset deferred to later
482
518k
  WriteICCUint32(0, tagtable->size(), tagtable);
483
518k
  offsets->push_back(offset);
484
518k
  WriteICCUint32(size, tagtable->size(), tagtable);
485
518k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
jxl_cms.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
479
8.99k
                             std::vector<size_t>* offsets) {
480
8.99k
  WriteICCTag(tag, tagtable->size(), tagtable);
481
  // writing true offset deferred to later
482
8.99k
  WriteICCUint32(0, tagtable->size(), tagtable);
483
8.99k
  offsets->push_back(offset);
484
8.99k
  WriteICCUint32(size, tagtable->size(), tagtable);
485
8.99k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: codec.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::AddToICCTagTable(char const*, unsigned long, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
486
487
static void FinalizeICCTag(std::vector<uint8_t>* tags, size_t* offset,
488
7.50M
                           size_t* size) {
489
10.8M
  while ((tags->size() & 3) != 0) {
490
3.37M
    tags->push_back(0);
491
3.37M
  }
492
7.50M
  *offset += *size;
493
7.50M
  *size = tags->size() - *offset;
494
7.50M
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
decode.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Line
Count
Source
488
3.82M
                           size_t* size) {
489
5.55M
  while ((tags->size() & 3) != 0) {
490
1.73M
    tags->push_back(0);
491
1.73M
  }
492
3.82M
  *offset += *size;
493
3.82M
  *size = tags->size() - *offset;
494
3.82M
}
Unexecuted instantiation: frame_header.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
color_encoding_internal.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Line
Count
Source
488
29.1k
                           size_t* size) {
489
42.1k
  while ((tags->size() & 3) != 0) {
490
13.0k
    tags->push_back(0);
491
13.0k
  }
492
29.1k
  *offset += *size;
493
29.1k
  *size = tags->size() - *offset;
494
29.1k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: dec_group.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: epf.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: passes_state.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: blending.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_write.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
test_image.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Line
Count
Source
488
122k
                           size_t* size) {
489
177k
  while ((tags->size() & 3) != 0) {
490
54.5k
    tags->push_back(0);
491
54.5k
  }
492
122k
  *offset += *size;
493
122k
  *size = tags->size() - *offset;
494
122k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: metrics.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
packed_image_convert.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Line
Count
Source
488
3.09M
                           size_t* size) {
489
4.47M
  while ((tags->size() & 3) != 0) {
490
1.37M
    tags->push_back(0);
491
1.37M
  }
492
3.09M
  *offset += *size;
493
3.09M
  *size = tags->size() - *offset;
494
3.09M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_group.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
encode.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Line
Count
Source
488
425k
                           size_t* size) {
489
619k
  while ((tags->size() & 3) != 0) {
490
193k
    tags->push_back(0);
491
193k
  }
492
425k
  *offset += *size;
493
425k
  *size = tags->size() - *offset;
494
425k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: luminance.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
jxl_cms.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Line
Count
Source
488
7.84k
                           size_t* size) {
489
12.4k
  while ((tags->size() & 3) != 0) {
490
4.60k
    tags->push_back(0);
491
4.60k
  }
492
7.84k
  *offset += *size;
493
7.84k
  *size = tags->size() - *offset;
494
7.84k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: codec.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::FinalizeICCTag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*)
495
496
// The input text must be ASCII, writing other characters to UTF-16 is not
497
// implemented.
498
static void CreateICCMlucTag(const std::string& text,
499
1.67M
                             std::vector<uint8_t>* tags) {
500
1.67M
  WriteICCTag("mluc", tags->size(), tags);
501
1.67M
  WriteICCUint32(0, tags->size(), tags);
502
1.67M
  WriteICCUint32(1, tags->size(), tags);
503
1.67M
  WriteICCUint32(12, tags->size(), tags);
504
1.67M
  WriteICCTag("enUS", tags->size(), tags);
505
1.67M
  WriteICCUint32(text.size() * 2, tags->size(), tags);
506
1.67M
  WriteICCUint32(28, tags->size(), tags);
507
18.5M
  for (char c : text) {
508
18.5M
    tags->push_back(0);  // prepend 0 for UTF-16
509
18.5M
    tags->push_back(c);
510
18.5M
  }
511
1.67M
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
499
857k
                             std::vector<uint8_t>* tags) {
500
857k
  WriteICCTag("mluc", tags->size(), tags);
501
857k
  WriteICCUint32(0, tags->size(), tags);
502
857k
  WriteICCUint32(1, tags->size(), tags);
503
857k
  WriteICCUint32(12, tags->size(), tags);
504
857k
  WriteICCTag("enUS", tags->size(), tags);
505
857k
  WriteICCUint32(text.size() * 2, tags->size(), tags);
506
857k
  WriteICCUint32(28, tags->size(), tags);
507
9.45M
  for (char c : text) {
508
9.45M
    tags->push_back(0);  // prepend 0 for UTF-16
509
9.45M
    tags->push_back(c);
510
9.45M
  }
511
857k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
499
6.56k
                             std::vector<uint8_t>* tags) {
500
6.56k
  WriteICCTag("mluc", tags->size(), tags);
501
6.56k
  WriteICCUint32(0, tags->size(), tags);
502
6.56k
  WriteICCUint32(1, tags->size(), tags);
503
6.56k
  WriteICCUint32(12, tags->size(), tags);
504
6.56k
  WriteICCTag("enUS", tags->size(), tags);
505
6.56k
  WriteICCUint32(text.size() * 2, tags->size(), tags);
506
6.56k
  WriteICCUint32(28, tags->size(), tags);
507
74.3k
  for (char c : text) {
508
74.3k
    tags->push_back(0);  // prepend 0 for UTF-16
509
74.3k
    tags->push_back(c);
510
74.3k
  }
511
6.56k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
499
27.2k
                             std::vector<uint8_t>* tags) {
500
27.2k
  WriteICCTag("mluc", tags->size(), tags);
501
27.2k
  WriteICCUint32(0, tags->size(), tags);
502
27.2k
  WriteICCUint32(1, tags->size(), tags);
503
27.2k
  WriteICCUint32(12, tags->size(), tags);
504
27.2k
  WriteICCTag("enUS", tags->size(), tags);
505
27.2k
  WriteICCUint32(text.size() * 2, tags->size(), tags);
506
27.2k
  WriteICCUint32(28, tags->size(), tags);
507
299k
  for (char c : text) {
508
299k
    tags->push_back(0);  // prepend 0 for UTF-16
509
299k
    tags->push_back(c);
510
299k
  }
511
27.2k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
499
687k
                             std::vector<uint8_t>* tags) {
500
687k
  WriteICCTag("mluc", tags->size(), tags);
501
687k
  WriteICCUint32(0, tags->size(), tags);
502
687k
  WriteICCUint32(1, tags->size(), tags);
503
687k
  WriteICCUint32(12, tags->size(), tags);
504
687k
  WriteICCTag("enUS", tags->size(), tags);
505
687k
  WriteICCUint32(text.size() * 2, tags->size(), tags);
506
687k
  WriteICCUint32(28, tags->size(), tags);
507
7.57M
  for (char c : text) {
508
7.57M
    tags->push_back(0);  // prepend 0 for UTF-16
509
7.57M
    tags->push_back(c);
510
7.57M
  }
511
687k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
499
96.9k
                             std::vector<uint8_t>* tags) {
500
96.9k
  WriteICCTag("mluc", tags->size(), tags);
501
96.9k
  WriteICCUint32(0, tags->size(), tags);
502
96.9k
  WriteICCUint32(1, tags->size(), tags);
503
96.9k
  WriteICCUint32(12, tags->size(), tags);
504
96.9k
  WriteICCTag("enUS", tags->size(), tags);
505
96.9k
  WriteICCUint32(text.size() * 2, tags->size(), tags);
506
96.9k
  WriteICCUint32(28, tags->size(), tags);
507
1.05M
  for (char c : text) {
508
1.05M
    tags->push_back(0);  // prepend 0 for UTF-16
509
1.05M
    tags->push_back(c);
510
1.05M
  }
511
96.9k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
499
2.84k
                             std::vector<uint8_t>* tags) {
500
2.84k
  WriteICCTag("mluc", tags->size(), tags);
501
2.84k
  WriteICCUint32(0, tags->size(), tags);
502
2.84k
  WriteICCUint32(1, tags->size(), tags);
503
2.84k
  WriteICCUint32(12, tags->size(), tags);
504
2.84k
  WriteICCTag("enUS", tags->size(), tags);
505
2.84k
  WriteICCUint32(text.size() * 2, tags->size(), tags);
506
2.84k
  WriteICCUint32(28, tags->size(), tags);
507
95.4k
  for (char c : text) {
508
95.4k
    tags->push_back(0);  // prepend 0 for UTF-16
509
95.4k
    tags->push_back(c);
510
95.4k
  }
511
2.84k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCMlucTag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
512
513
3.30M
static Status CreateICCXYZTag(const Color& xyz, std::vector<uint8_t>* tags) {
514
3.30M
  WriteICCTag("XYZ ", tags->size(), tags);
515
3.30M
  WriteICCUint32(0, tags->size(), tags);
516
13.2M
  for (size_t i = 0; i < 3; ++i) {
517
9.92M
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(xyz[i], tags->size(), tags));
518
9.92M
  }
519
3.30M
  return true;
520
3.30M
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
513
1.68M
static Status CreateICCXYZTag(const Color& xyz, std::vector<uint8_t>* tags) {
514
1.68M
  WriteICCTag("XYZ ", tags->size(), tags);
515
1.68M
  WriteICCUint32(0, tags->size(), tags);
516
6.72M
  for (size_t i = 0; i < 3; ++i) {
517
5.04M
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(xyz[i], tags->size(), tags));
518
5.04M
  }
519
1.68M
  return true;
520
1.68M
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
513
12.9k
static Status CreateICCXYZTag(const Color& xyz, std::vector<uint8_t>* tags) {
514
12.9k
  WriteICCTag("XYZ ", tags->size(), tags);
515
12.9k
  WriteICCUint32(0, tags->size(), tags);
516
51.6k
  for (size_t i = 0; i < 3; ++i) {
517
38.7k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(xyz[i], tags->size(), tags));
518
38.7k
  }
519
12.9k
  return true;
520
12.9k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
513
54.5k
static Status CreateICCXYZTag(const Color& xyz, std::vector<uint8_t>* tags) {
514
54.5k
  WriteICCTag("XYZ ", tags->size(), tags);
515
54.5k
  WriteICCUint32(0, tags->size(), tags);
516
218k
  for (size_t i = 0; i < 3; ++i) {
517
163k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(xyz[i], tags->size(), tags));
518
163k
  }
519
54.5k
  return true;
520
54.5k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
513
1.36M
static Status CreateICCXYZTag(const Color& xyz, std::vector<uint8_t>* tags) {
514
1.36M
  WriteICCTag("XYZ ", tags->size(), tags);
515
1.36M
  WriteICCUint32(0, tags->size(), tags);
516
5.47M
  for (size_t i = 0; i < 3; ++i) {
517
4.10M
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(xyz[i], tags->size(), tags));
518
4.10M
  }
519
1.36M
  return true;
520
1.36M
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
513
187k
static Status CreateICCXYZTag(const Color& xyz, std::vector<uint8_t>* tags) {
514
187k
  WriteICCTag("XYZ ", tags->size(), tags);
515
187k
  WriteICCUint32(0, tags->size(), tags);
516
750k
  for (size_t i = 0; i < 3; ++i) {
517
562k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(xyz[i], tags->size(), tags));
518
562k
  }
519
187k
  return true;
520
187k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
513
3.40k
static Status CreateICCXYZTag(const Color& xyz, std::vector<uint8_t>* tags) {
514
3.40k
  WriteICCTag("XYZ ", tags->size(), tags);
515
3.40k
  WriteICCUint32(0, tags->size(), tags);
516
13.1k
  for (size_t i = 0; i < 3; ++i) {
517
9.96k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(xyz[i], tags->size(), tags));
518
9.96k
  }
519
3.21k
  return true;
520
3.40k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCXYZTag(std::__1::array<float, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
521
522
static Status CreateICCChadTag(const Matrix3x3& chad,
523
828k
                               std::vector<uint8_t>* tags) {
524
828k
  WriteICCTag("sf32", tags->size(), tags);
525
828k
  WriteICCUint32(0, tags->size(), tags);
526
3.31M
  for (size_t j = 0; j < 3; j++) {
527
9.93M
    for (size_t i = 0; i < 3; i++) {
528
7.45M
      JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(chad[j][i], tags->size(), tags));
529
7.45M
    }
530
2.48M
  }
531
827k
  return true;
532
828k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
523
421k
                               std::vector<uint8_t>* tags) {
524
421k
  WriteICCTag("sf32", tags->size(), tags);
525
421k
  WriteICCUint32(0, tags->size(), tags);
526
1.68M
  for (size_t j = 0; j < 3; j++) {
527
5.05M
    for (size_t i = 0; i < 3; i++) {
528
3.79M
      JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(chad[j][i], tags->size(), tags));
529
3.79M
    }
530
1.26M
  }
531
421k
  return true;
532
421k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
523
3.23k
                               std::vector<uint8_t>* tags) {
524
3.23k
  WriteICCTag("sf32", tags->size(), tags);
525
3.23k
  WriteICCUint32(0, tags->size(), tags);
526
12.9k
  for (size_t j = 0; j < 3; j++) {
527
38.7k
    for (size_t i = 0; i < 3; i++) {
528
29.0k
      JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(chad[j][i], tags->size(), tags));
529
29.0k
    }
530
9.69k
  }
531
3.22k
  return true;
532
3.23k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
523
13.6k
                               std::vector<uint8_t>* tags) {
524
13.6k
  WriteICCTag("sf32", tags->size(), tags);
525
13.6k
  WriteICCUint32(0, tags->size(), tags);
526
54.5k
  for (size_t j = 0; j < 3; j++) {
527
163k
    for (size_t i = 0; i < 3; i++) {
528
122k
      JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(chad[j][i], tags->size(), tags));
529
122k
    }
530
40.8k
  }
531
13.6k
  return true;
532
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
523
342k
                               std::vector<uint8_t>* tags) {
524
342k
  WriteICCTag("sf32", tags->size(), tags);
525
342k
  WriteICCUint32(0, tags->size(), tags);
526
1.36M
  for (size_t j = 0; j < 3; j++) {
527
4.10M
    for (size_t i = 0; i < 3; i++) {
528
3.08M
      JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(chad[j][i], tags->size(), tags));
529
3.08M
    }
530
1.02M
  }
531
342k
  return true;
532
342k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
523
46.3k
                               std::vector<uint8_t>* tags) {
524
46.3k
  WriteICCTag("sf32", tags->size(), tags);
525
46.3k
  WriteICCUint32(0, tags->size(), tags);
526
185k
  for (size_t j = 0; j < 3; j++) {
527
556k
    for (size_t i = 0; i < 3; i++) {
528
417k
      JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(chad[j][i], tags->size(), tags));
529
417k
    }
530
139k
  }
531
46.3k
  return true;
532
46.3k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
523
854
                               std::vector<uint8_t>* tags) {
524
854
  WriteICCTag("sf32", tags->size(), tags);
525
854
  WriteICCUint32(0, tags->size(), tags);
526
3.39k
  for (size_t j = 0; j < 3; j++) {
527
10.1k
    for (size_t i = 0; i < 3; i++) {
528
7.64k
      JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(chad[j][i], tags->size(), tags));
529
7.64k
    }
530
2.54k
  }
531
847
  return true;
532
854
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCChadTag(std::__1::array<std::__1::array<float, 3ul>, 3ul> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
533
534
static void MaybeCreateICCCICPTag(const JxlColorEncoding& c,
535
                                  std::vector<uint8_t>* tags, size_t* offset,
536
                                  size_t* size, std::vector<uint8_t>* tagtable,
537
822k
                                  std::vector<size_t>* offsets) {
538
822k
  if (c.color_space != JXL_COLOR_SPACE_RGB) {
539
0
    return;
540
0
  }
541
822k
  uint8_t primaries = 0;
542
822k
  if (c.primaries == JXL_PRIMARIES_P3) {
543
9.87k
    if (c.white_point == JXL_WHITE_POINT_D65) {
544
3.01k
      primaries = 12;
545
6.86k
    } else if (c.white_point == JXL_WHITE_POINT_DCI) {
546
5.60k
      primaries = 11;
547
5.60k
    } else {
548
1.26k
      return;
549
1.26k
    }
550
813k
  } else if (c.primaries != JXL_PRIMARIES_CUSTOM &&
551
809k
             c.white_point == JXL_WHITE_POINT_D65) {
552
803k
    primaries = static_cast<uint8_t>(c.primaries);
553
803k
  } else {
554
9.99k
    return;
555
9.99k
  }
556
811k
  JxlTransferFunction tf = c.transfer_function;
557
811k
  if (tf == JXL_TRANSFER_FUNCTION_UNKNOWN ||
558
811k
      tf == JXL_TRANSFER_FUNCTION_GAMMA) {
559
1.88k
    return;
560
1.88k
  }
561
809k
  WriteICCTag("cicp", tags->size(), tags);
562
809k
  WriteICCUint32(0, tags->size(), tags);
563
809k
  WriteICCUint8(primaries, tags->size(), tags);
564
809k
  WriteICCUint8(static_cast<uint8_t>(tf), tags->size(), tags);
565
  // Matrix
566
809k
  WriteICCUint8(0, tags->size(), tags);
567
  // Full range
568
809k
  WriteICCUint8(1, tags->size(), tags);
569
809k
  FinalizeICCTag(tags, offset, size);
570
809k
  AddToICCTagTable("cicp", *offset, *size, tagtable, offsets);
571
809k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
decode.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
537
417k
                                  std::vector<size_t>* offsets) {
538
417k
  if (c.color_space != JXL_COLOR_SPACE_RGB) {
539
0
    return;
540
0
  }
541
417k
  uint8_t primaries = 0;
542
417k
  if (c.primaries == JXL_PRIMARIES_P3) {
543
5.85k
    if (c.white_point == JXL_WHITE_POINT_D65) {
544
2.82k
      primaries = 12;
545
3.03k
    } else if (c.white_point == JXL_WHITE_POINT_DCI) {
546
2.35k
      primaries = 11;
547
2.35k
    } else {
548
671
      return;
549
671
    }
550
411k
  } else if (c.primaries != JXL_PRIMARIES_CUSTOM &&
551
409k
             c.white_point == JXL_WHITE_POINT_D65) {
552
404k
    primaries = static_cast<uint8_t>(c.primaries);
553
404k
  } else {
554
6.95k
    return;
555
6.95k
  }
556
409k
  JxlTransferFunction tf = c.transfer_function;
557
409k
  if (tf == JXL_TRANSFER_FUNCTION_UNKNOWN ||
558
409k
      tf == JXL_TRANSFER_FUNCTION_GAMMA) {
559
1.36k
    return;
560
1.36k
  }
561
408k
  WriteICCTag("cicp", tags->size(), tags);
562
408k
  WriteICCUint32(0, tags->size(), tags);
563
408k
  WriteICCUint8(primaries, tags->size(), tags);
564
408k
  WriteICCUint8(static_cast<uint8_t>(tf), tags->size(), tags);
565
  // Matrix
566
408k
  WriteICCUint8(0, tags->size(), tags);
567
  // Full range
568
408k
  WriteICCUint8(1, tags->size(), tags);
569
408k
  FinalizeICCTag(tags, offset, size);
570
408k
  AddToICCTagTable("cicp", *offset, *size, tagtable, offsets);
571
408k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
color_encoding_internal.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
537
3.22k
                                  std::vector<size_t>* offsets) {
538
3.22k
  if (c.color_space != JXL_COLOR_SPACE_RGB) {
539
0
    return;
540
0
  }
541
3.22k
  uint8_t primaries = 0;
542
3.22k
  if (c.primaries == JXL_PRIMARIES_P3) {
543
9
    if (c.white_point == JXL_WHITE_POINT_D65) {
544
4
      primaries = 12;
545
5
    } else if (c.white_point == JXL_WHITE_POINT_DCI) {
546
2
      primaries = 11;
547
3
    } else {
548
3
      return;
549
3
    }
550
3.21k
  } else if (c.primaries != JXL_PRIMARIES_CUSTOM &&
551
3.17k
             c.white_point == JXL_WHITE_POINT_D65) {
552
3.16k
    primaries = static_cast<uint8_t>(c.primaries);
553
3.16k
  } else {
554
52
    return;
555
52
  }
556
3.16k
  JxlTransferFunction tf = c.transfer_function;
557
3.16k
  if (tf == JXL_TRANSFER_FUNCTION_UNKNOWN ||
558
3.16k
      tf == JXL_TRANSFER_FUNCTION_GAMMA) {
559
4
    return;
560
4
  }
561
3.16k
  WriteICCTag("cicp", tags->size(), tags);
562
3.16k
  WriteICCUint32(0, tags->size(), tags);
563
3.16k
  WriteICCUint8(primaries, tags->size(), tags);
564
3.16k
  WriteICCUint8(static_cast<uint8_t>(tf), tags->size(), tags);
565
  // Matrix
566
3.16k
  WriteICCUint8(0, tags->size(), tags);
567
  // Full range
568
3.16k
  WriteICCUint8(1, tags->size(), tags);
569
3.16k
  FinalizeICCTag(tags, offset, size);
570
3.16k
  AddToICCTagTable("cicp", *offset, *size, tagtable, offsets);
571
3.16k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: epf.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: blending.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
test_image.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
537
13.6k
                                  std::vector<size_t>* offsets) {
538
13.6k
  if (c.color_space != JXL_COLOR_SPACE_RGB) {
539
0
    return;
540
0
  }
541
13.6k
  uint8_t primaries = 0;
542
13.6k
  if (c.primaries == JXL_PRIMARIES_P3) {
543
0
    if (c.white_point == JXL_WHITE_POINT_D65) {
544
0
      primaries = 12;
545
0
    } else if (c.white_point == JXL_WHITE_POINT_DCI) {
546
0
      primaries = 11;
547
0
    } else {
548
0
      return;
549
0
    }
550
13.6k
  } else if (c.primaries != JXL_PRIMARIES_CUSTOM &&
551
13.6k
             c.white_point == JXL_WHITE_POINT_D65) {
552
13.6k
    primaries = static_cast<uint8_t>(c.primaries);
553
13.6k
  } else {
554
0
    return;
555
0
  }
556
13.6k
  JxlTransferFunction tf = c.transfer_function;
557
13.6k
  if (tf == JXL_TRANSFER_FUNCTION_UNKNOWN ||
558
13.6k
      tf == JXL_TRANSFER_FUNCTION_GAMMA) {
559
0
    return;
560
0
  }
561
13.6k
  WriteICCTag("cicp", tags->size(), tags);
562
13.6k
  WriteICCUint32(0, tags->size(), tags);
563
13.6k
  WriteICCUint8(primaries, tags->size(), tags);
564
13.6k
  WriteICCUint8(static_cast<uint8_t>(tf), tags->size(), tags);
565
  // Matrix
566
13.6k
  WriteICCUint8(0, tags->size(), tags);
567
  // Full range
568
13.6k
  WriteICCUint8(1, tags->size(), tags);
569
13.6k
  FinalizeICCTag(tags, offset, size);
570
13.6k
  AddToICCTagTable("cicp", *offset, *size, tagtable, offsets);
571
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
packed_image_convert.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
537
341k
                                  std::vector<size_t>* offsets) {
538
341k
  if (c.color_space != JXL_COLOR_SPACE_RGB) {
539
0
    return;
540
0
  }
541
341k
  uint8_t primaries = 0;
542
341k
  if (c.primaries == JXL_PRIMARIES_P3) {
543
4.00k
    if (c.white_point == JXL_WHITE_POINT_D65) {
544
183
      primaries = 12;
545
3.82k
    } else if (c.white_point == JXL_WHITE_POINT_DCI) {
546
3.24k
      primaries = 11;
547
3.24k
    } else {
548
586
      return;
549
586
    }
550
337k
  } else if (c.primaries != JXL_PRIMARIES_CUSTOM &&
551
337k
             c.white_point == JXL_WHITE_POINT_D65) {
552
335k
    primaries = static_cast<uint8_t>(c.primaries);
553
335k
  } else {
554
2.14k
    return;
555
2.14k
  }
556
338k
  JxlTransferFunction tf = c.transfer_function;
557
338k
  if (tf == JXL_TRANSFER_FUNCTION_UNKNOWN ||
558
338k
      tf == JXL_TRANSFER_FUNCTION_GAMMA) {
559
517
    return;
560
517
  }
561
338k
  WriteICCTag("cicp", tags->size(), tags);
562
338k
  WriteICCUint32(0, tags->size(), tags);
563
338k
  WriteICCUint8(primaries, tags->size(), tags);
564
338k
  WriteICCUint8(static_cast<uint8_t>(tf), tags->size(), tags);
565
  // Matrix
566
338k
  WriteICCUint8(0, tags->size(), tags);
567
  // Full range
568
338k
  WriteICCUint8(1, tags->size(), tags);
569
338k
  FinalizeICCTag(tags, offset, size);
570
338k
  AddToICCTagTable("cicp", *offset, *size, tagtable, offsets);
571
338k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
encode.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
537
46.3k
                                  std::vector<size_t>* offsets) {
538
46.3k
  if (c.color_space != JXL_COLOR_SPACE_RGB) {
539
0
    return;
540
0
  }
541
46.3k
  uint8_t primaries = 0;
542
46.3k
  if (c.primaries == JXL_PRIMARIES_P3) {
543
0
    if (c.white_point == JXL_WHITE_POINT_D65) {
544
0
      primaries = 12;
545
0
    } else if (c.white_point == JXL_WHITE_POINT_DCI) {
546
0
      primaries = 11;
547
0
    } else {
548
0
      return;
549
0
    }
550
46.3k
  } else if (c.primaries != JXL_PRIMARIES_CUSTOM &&
551
46.3k
             c.white_point == JXL_WHITE_POINT_D65) {
552
46.3k
    primaries = static_cast<uint8_t>(c.primaries);
553
46.3k
  } else {
554
0
    return;
555
0
  }
556
46.3k
  JxlTransferFunction tf = c.transfer_function;
557
46.3k
  if (tf == JXL_TRANSFER_FUNCTION_UNKNOWN ||
558
46.3k
      tf == JXL_TRANSFER_FUNCTION_GAMMA) {
559
0
    return;
560
0
  }
561
46.3k
  WriteICCTag("cicp", tags->size(), tags);
562
46.3k
  WriteICCUint32(0, tags->size(), tags);
563
46.3k
  WriteICCUint8(primaries, tags->size(), tags);
564
46.3k
  WriteICCUint8(static_cast<uint8_t>(tf), tags->size(), tags);
565
  // Matrix
566
46.3k
  WriteICCUint8(0, tags->size(), tags);
567
  // Full range
568
46.3k
  WriteICCUint8(1, tags->size(), tags);
569
46.3k
  FinalizeICCTag(tags, offset, size);
570
46.3k
  AddToICCTagTable("cicp", *offset, *size, tagtable, offsets);
571
46.3k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
jxl_cms.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Line
Count
Source
537
847
                                  std::vector<size_t>* offsets) {
538
847
  if (c.color_space != JXL_COLOR_SPACE_RGB) {
539
0
    return;
540
0
  }
541
847
  uint8_t primaries = 0;
542
847
  if (c.primaries == JXL_PRIMARIES_P3) {
543
0
    if (c.white_point == JXL_WHITE_POINT_D65) {
544
0
      primaries = 12;
545
0
    } else if (c.white_point == JXL_WHITE_POINT_DCI) {
546
0
      primaries = 11;
547
0
    } else {
548
0
      return;
549
0
    }
550
847
  } else if (c.primaries != JXL_PRIMARIES_CUSTOM &&
551
0
             c.white_point == JXL_WHITE_POINT_D65) {
552
0
    primaries = static_cast<uint8_t>(c.primaries);
553
847
  } else {
554
847
    return;
555
847
  }
556
0
  JxlTransferFunction tf = c.transfer_function;
557
0
  if (tf == JXL_TRANSFER_FUNCTION_UNKNOWN ||
558
0
      tf == JXL_TRANSFER_FUNCTION_GAMMA) {
559
0
    return;
560
0
  }
561
0
  WriteICCTag("cicp", tags->size(), tags);
562
0
  WriteICCUint32(0, tags->size(), tags);
563
0
  WriteICCUint8(primaries, tags->size(), tags);
564
0
  WriteICCUint8(static_cast<uint8_t>(tf), tags->size(), tags);
565
  // Matrix
566
0
  WriteICCUint8(0, tags->size(), tags);
567
  // Full range
568
0
  WriteICCUint8(1, tags->size(), tags);
569
0
  FinalizeICCTag(tags, offset, size);
570
0
  AddToICCTagTable("cicp", *offset, *size, tagtable, offsets);
571
0
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: codec.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::MaybeCreateICCCICPTag(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, unsigned long*, unsigned long*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*)
572
573
static void CreateICCCurvCurvTag(const std::vector<uint16_t>& curve,
574
11.4k
                                 std::vector<uint8_t>* tags) {
575
11.4k
  size_t pos = tags->size();
576
11.4k
  tags->resize(tags->size() + 12 + curve.size() * 2, 0);
577
11.4k
  WriteICCTag("curv", pos, tags);
578
11.4k
  WriteICCUint32(0, pos + 4, tags);
579
11.4k
  WriteICCUint32(curve.size(), pos + 8, tags);
580
747k
  for (size_t i = 0; i < curve.size(); i++) {
581
735k
    WriteICCUint16(curve[i], pos + 12 + i * 2, tags);
582
735k
  }
583
11.4k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
574
9.11k
                                 std::vector<uint8_t>* tags) {
575
9.11k
  size_t pos = tags->size();
576
9.11k
  tags->resize(tags->size() + 12 + curve.size() * 2, 0);
577
9.11k
  WriteICCTag("curv", pos, tags);
578
9.11k
  WriteICCUint32(0, pos + 4, tags);
579
9.11k
  WriteICCUint32(curve.size(), pos + 8, tags);
580
592k
  for (size_t i = 0; i < curve.size(); i++) {
581
583k
    WriteICCUint16(curve[i], pos + 12 + i * 2, tags);
582
583k
  }
583
9.11k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
574
21
                                 std::vector<uint8_t>* tags) {
575
21
  size_t pos = tags->size();
576
21
  tags->resize(tags->size() + 12 + curve.size() * 2, 0);
577
21
  WriteICCTag("curv", pos, tags);
578
21
  WriteICCUint32(0, pos + 4, tags);
579
21
  WriteICCUint32(curve.size(), pos + 8, tags);
580
1.36k
  for (size_t i = 0; i < curve.size(); i++) {
581
1.34k
    WriteICCUint16(curve[i], pos + 12 + i * 2, tags);
582
1.34k
  }
583
21
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: test_image.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
574
2.18k
                                 std::vector<uint8_t>* tags) {
575
2.18k
  size_t pos = tags->size();
576
2.18k
  tags->resize(tags->size() + 12 + curve.size() * 2, 0);
577
2.18k
  WriteICCTag("curv", pos, tags);
578
2.18k
  WriteICCUint32(0, pos + 4, tags);
579
2.18k
  WriteICCUint32(curve.size(), pos + 8, tags);
580
141k
  for (size_t i = 0; i < curve.size(); i++) {
581
139k
    WriteICCUint16(curve[i], pos + 12 + i * 2, tags);
582
139k
  }
583
2.18k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: encode.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
574
184
                                 std::vector<uint8_t>* tags) {
575
184
  size_t pos = tags->size();
576
184
  tags->resize(tags->size() + 12 + curve.size() * 2, 0);
577
184
  WriteICCTag("curv", pos, tags);
578
184
  WriteICCUint32(0, pos + 4, tags);
579
184
  WriteICCUint32(curve.size(), pos + 8, tags);
580
11.9k
  for (size_t i = 0; i < curve.size(); i++) {
581
11.7k
    WriteICCUint16(curve[i], pos + 12 + i * 2, tags);
582
11.7k
  }
583
184
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCCurvCurvTag(std::__1::vector<unsigned short, std::__1::allocator<unsigned short> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
584
585
// Writes 12 + 4*params.size() bytes
586
static Status CreateICCCurvParaTag(const std::vector<float>& params,
587
                                   size_t curve_type,
588
940k
                                   std::vector<uint8_t>* tags) {
589
940k
  WriteICCTag("para", tags->size(), tags);
590
940k
  WriteICCUint32(0, tags->size(), tags);
591
940k
  WriteICCUint16(curve_type, tags->size(), tags);
592
940k
  WriteICCUint16(0, tags->size(), tags);
593
4.12M
  for (float param : params) {
594
4.12M
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(param, tags->size(), tags));
595
4.12M
  }
596
940k
  return true;
597
940k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
588
502k
                                   std::vector<uint8_t>* tags) {
589
502k
  WriteICCTag("para", tags->size(), tags);
590
502k
  WriteICCUint32(0, tags->size(), tags);
591
502k
  WriteICCUint16(curve_type, tags->size(), tags);
592
502k
  WriteICCUint16(0, tags->size(), tags);
593
2.10M
  for (float param : params) {
594
2.10M
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(param, tags->size(), tags));
595
2.10M
  }
596
502k
  return true;
597
502k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
588
3.25k
                                   std::vector<uint8_t>* tags) {
589
3.25k
  WriteICCTag("para", tags->size(), tags);
590
3.25k
  WriteICCUint32(0, tags->size(), tags);
591
3.25k
  WriteICCUint16(curve_type, tags->size(), tags);
592
3.25k
  WriteICCUint16(0, tags->size(), tags);
593
16.0k
  for (float param : params) {
594
16.0k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(param, tags->size(), tags));
595
16.0k
  }
596
3.25k
  return true;
597
3.25k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
588
13.6k
                                   std::vector<uint8_t>* tags) {
589
13.6k
  WriteICCTag("para", tags->size(), tags);
590
13.6k
  WriteICCUint32(0, tags->size(), tags);
591
13.6k
  WriteICCUint16(curve_type, tags->size(), tags);
592
13.6k
  WriteICCUint16(0, tags->size(), tags);
593
68.1k
  for (float param : params) {
594
68.1k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(param, tags->size(), tags));
595
68.1k
  }
596
13.6k
  return true;
597
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
588
372k
                                   std::vector<uint8_t>* tags) {
589
372k
  WriteICCTag("para", tags->size(), tags);
590
372k
  WriteICCUint32(0, tags->size(), tags);
591
372k
  WriteICCUint16(curve_type, tags->size(), tags);
592
372k
  WriteICCUint16(0, tags->size(), tags);
593
1.68M
  for (float param : params) {
594
1.68M
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(param, tags->size(), tags));
595
1.68M
  }
596
372k
  return true;
597
372k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
588
48.4k
                                   std::vector<uint8_t>* tags) {
589
48.4k
  WriteICCTag("para", tags->size(), tags);
590
48.4k
  WriteICCUint32(0, tags->size(), tags);
591
48.4k
  WriteICCUint16(curve_type, tags->size(), tags);
592
48.4k
  WriteICCUint16(0, tags->size(), tags);
593
242k
  for (float param : params) {
594
242k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(param, tags->size(), tags));
595
242k
  }
596
48.4k
  return true;
597
48.4k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
588
752
                                   std::vector<uint8_t>* tags) {
589
752
  WriteICCTag("para", tags->size(), tags);
590
752
  WriteICCUint32(0, tags->size(), tags);
591
752
  WriteICCUint16(curve_type, tags->size(), tags);
592
752
  WriteICCUint16(0, tags->size(), tags);
593
3.67k
  for (float param : params) {
594
3.67k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(param, tags->size(), tags));
595
3.67k
  }
596
752
  return true;
597
752
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCCurvParaTag(std::__1::vector<float, std::__1::allocator<float> > const&, unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
598
599
5.03k
static Status CreateICCLutAtoBTagForXYB(std::vector<uint8_t>* tags) {
600
5.03k
  WriteICCTag("mAB ", tags->size(), tags);
601
  // 4 reserved bytes set to 0
602
5.03k
  WriteICCUint32(0, tags->size(), tags);
603
  // number of input channels
604
5.03k
  WriteICCUint8(3, tags->size(), tags);
605
  // number of output channels
606
5.03k
  WriteICCUint8(3, tags->size(), tags);
607
  // 2 reserved bytes for padding
608
5.03k
  WriteICCUint16(0, tags->size(), tags);
609
  // offset to first B curve
610
5.03k
  WriteICCUint32(32, tags->size(), tags);
611
  // offset to matrix
612
5.03k
  WriteICCUint32(244, tags->size(), tags);
613
  // offset to first M curve
614
5.03k
  WriteICCUint32(148, tags->size(), tags);
615
  // offset to CLUT
616
5.03k
  WriteICCUint32(80, tags->size(), tags);
617
  // offset to first A curve
618
  // (reuse linear B curves)
619
5.03k
  WriteICCUint32(32, tags->size(), tags);
620
621
  // offset = 32
622
  // no-op curves
623
5.03k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
624
5.03k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
625
5.03k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
626
  // offset = 80
627
  // number of grid points for each input channel
628
85.5k
  for (int i = 0; i < 16; ++i) {
629
80.4k
    WriteICCUint8(i < 3 ? 2 : 0, tags->size(), tags);
630
80.4k
  }
631
  // precision = 2
632
5.03k
  WriteICCUint8(2, tags->size(), tags);
633
  // 3 bytes of padding
634
5.03k
  WriteICCUint8(0, tags->size(), tags);
635
5.03k
  WriteICCUint16(0, tags->size(), tags);
636
  // 2*2*2*3 entries of 2 bytes each = 48 bytes
637
5.03k
  const jxl::cms::ColorCube3D& cube = jxl::cms::UnscaledA2BCube();
638
15.0k
  for (size_t ix = 0; ix < 2; ++ix) {
639
30.1k
    for (size_t iy = 0; iy < 2; ++iy) {
640
60.3k
      for (size_t ib = 0; ib < 2; ++ib) {
641
40.2k
        const jxl::cms::ColorCube0D& out_f = cube[ix][iy][ib];
642
160k
        for (int i = 0; i < 3; ++i) {
643
120k
          int32_t val = static_cast<int32_t>(std::lroundf(65535 * out_f[i]));
644
120k
          JXL_DASSERT(val >= 0 && val <= 65535);
645
120k
          WriteICCUint16(val, tags->size(), tags);
646
120k
        }
647
40.2k
      }
648
20.1k
    }
649
10.0k
  }
650
  // offset = 148
651
  // 3 curves with 5 parameters = 3 * (12 + 5 * 4) = 96 bytes
652
20.1k
  for (size_t i = 0; i < 3; ++i) {
653
15.0k
    const float b = -jxl::cms::kXYBOffset[i] -
654
15.0k
                    std::cbrt(jxl::cms::kNegOpsinAbsorbanceBiasRGB[i]);
655
15.0k
    std::vector<float> params = {
656
15.0k
        3,
657
15.0k
        1.0f / jxl::cms::kXYBScale[i],
658
15.0k
        b,
659
15.0k
        0,                                           // unused
660
15.0k
        std::max(0.f, -b * jxl::cms::kXYBScale[i]),  // make skcms happy
661
15.0k
    };
662
15.0k
    JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(params, 3, tags));
663
15.0k
  }
664
  // offset = 244
665
5.03k
  const double matrix[] = {1.5170095, -1.1065225, 0.071623,
666
5.03k
                           -0.050022, 0.5683655,  -0.018344,
667
5.03k
                           -1.387676, 1.1145555,  0.6857255};
668
  // 12 * 4 = 48 bytes
669
45.2k
  for (double v : matrix) {
670
45.2k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(v, tags->size(), tags));
671
45.2k
  }
672
20.1k
  for (size_t i = 0; i < 3; ++i) {
673
15.0k
    float intercept = 0;
674
60.3k
    for (size_t j = 0; j < 3; ++j) {
675
45.2k
      intercept += matrix[i * 3 + j] * jxl::cms::kNegOpsinAbsorbanceBiasRGB[j];
676
45.2k
    }
677
15.0k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(intercept, tags->size(), tags));
678
15.0k
  }
679
5.03k
  return true;
680
5.03k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
599
4.23k
static Status CreateICCLutAtoBTagForXYB(std::vector<uint8_t>* tags) {
600
4.23k
  WriteICCTag("mAB ", tags->size(), tags);
601
  // 4 reserved bytes set to 0
602
4.23k
  WriteICCUint32(0, tags->size(), tags);
603
  // number of input channels
604
4.23k
  WriteICCUint8(3, tags->size(), tags);
605
  // number of output channels
606
4.23k
  WriteICCUint8(3, tags->size(), tags);
607
  // 2 reserved bytes for padding
608
4.23k
  WriteICCUint16(0, tags->size(), tags);
609
  // offset to first B curve
610
4.23k
  WriteICCUint32(32, tags->size(), tags);
611
  // offset to matrix
612
4.23k
  WriteICCUint32(244, tags->size(), tags);
613
  // offset to first M curve
614
4.23k
  WriteICCUint32(148, tags->size(), tags);
615
  // offset to CLUT
616
4.23k
  WriteICCUint32(80, tags->size(), tags);
617
  // offset to first A curve
618
  // (reuse linear B curves)
619
4.23k
  WriteICCUint32(32, tags->size(), tags);
620
621
  // offset = 32
622
  // no-op curves
623
4.23k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
624
4.23k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
625
4.23k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
626
  // offset = 80
627
  // number of grid points for each input channel
628
72.0k
  for (int i = 0; i < 16; ++i) {
629
67.7k
    WriteICCUint8(i < 3 ? 2 : 0, tags->size(), tags);
630
67.7k
  }
631
  // precision = 2
632
4.23k
  WriteICCUint8(2, tags->size(), tags);
633
  // 3 bytes of padding
634
4.23k
  WriteICCUint8(0, tags->size(), tags);
635
4.23k
  WriteICCUint16(0, tags->size(), tags);
636
  // 2*2*2*3 entries of 2 bytes each = 48 bytes
637
4.23k
  const jxl::cms::ColorCube3D& cube = jxl::cms::UnscaledA2BCube();
638
12.7k
  for (size_t ix = 0; ix < 2; ++ix) {
639
25.4k
    for (size_t iy = 0; iy < 2; ++iy) {
640
50.8k
      for (size_t ib = 0; ib < 2; ++ib) {
641
33.8k
        const jxl::cms::ColorCube0D& out_f = cube[ix][iy][ib];
642
135k
        for (int i = 0; i < 3; ++i) {
643
101k
          int32_t val = static_cast<int32_t>(std::lroundf(65535 * out_f[i]));
644
101k
          JXL_DASSERT(val >= 0 && val <= 65535);
645
101k
          WriteICCUint16(val, tags->size(), tags);
646
101k
        }
647
33.8k
      }
648
16.9k
    }
649
8.47k
  }
650
  // offset = 148
651
  // 3 curves with 5 parameters = 3 * (12 + 5 * 4) = 96 bytes
652
16.9k
  for (size_t i = 0; i < 3; ++i) {
653
12.7k
    const float b = -jxl::cms::kXYBOffset[i] -
654
12.7k
                    std::cbrt(jxl::cms::kNegOpsinAbsorbanceBiasRGB[i]);
655
12.7k
    std::vector<float> params = {
656
12.7k
        3,
657
12.7k
        1.0f / jxl::cms::kXYBScale[i],
658
12.7k
        b,
659
12.7k
        0,                                           // unused
660
12.7k
        std::max(0.f, -b * jxl::cms::kXYBScale[i]),  // make skcms happy
661
12.7k
    };
662
12.7k
    JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(params, 3, tags));
663
12.7k
  }
664
  // offset = 244
665
4.23k
  const double matrix[] = {1.5170095, -1.1065225, 0.071623,
666
4.23k
                           -0.050022, 0.5683655,  -0.018344,
667
4.23k
                           -1.387676, 1.1145555,  0.6857255};
668
  // 12 * 4 = 48 bytes
669
38.1k
  for (double v : matrix) {
670
38.1k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(v, tags->size(), tags));
671
38.1k
  }
672
16.9k
  for (size_t i = 0; i < 3; ++i) {
673
12.7k
    float intercept = 0;
674
50.8k
    for (size_t j = 0; j < 3; ++j) {
675
38.1k
      intercept += matrix[i * 3 + j] * jxl::cms::kNegOpsinAbsorbanceBiasRGB[j];
676
38.1k
    }
677
12.7k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(intercept, tags->size(), tags));
678
12.7k
  }
679
4.23k
  return true;
680
4.23k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
599
3
static Status CreateICCLutAtoBTagForXYB(std::vector<uint8_t>* tags) {
600
3
  WriteICCTag("mAB ", tags->size(), tags);
601
  // 4 reserved bytes set to 0
602
3
  WriteICCUint32(0, tags->size(), tags);
603
  // number of input channels
604
3
  WriteICCUint8(3, tags->size(), tags);
605
  // number of output channels
606
3
  WriteICCUint8(3, tags->size(), tags);
607
  // 2 reserved bytes for padding
608
3
  WriteICCUint16(0, tags->size(), tags);
609
  // offset to first B curve
610
3
  WriteICCUint32(32, tags->size(), tags);
611
  // offset to matrix
612
3
  WriteICCUint32(244, tags->size(), tags);
613
  // offset to first M curve
614
3
  WriteICCUint32(148, tags->size(), tags);
615
  // offset to CLUT
616
3
  WriteICCUint32(80, tags->size(), tags);
617
  // offset to first A curve
618
  // (reuse linear B curves)
619
3
  WriteICCUint32(32, tags->size(), tags);
620
621
  // offset = 32
622
  // no-op curves
623
3
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
624
3
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
625
3
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
626
  // offset = 80
627
  // number of grid points for each input channel
628
51
  for (int i = 0; i < 16; ++i) {
629
48
    WriteICCUint8(i < 3 ? 2 : 0, tags->size(), tags);
630
48
  }
631
  // precision = 2
632
3
  WriteICCUint8(2, tags->size(), tags);
633
  // 3 bytes of padding
634
3
  WriteICCUint8(0, tags->size(), tags);
635
3
  WriteICCUint16(0, tags->size(), tags);
636
  // 2*2*2*3 entries of 2 bytes each = 48 bytes
637
3
  const jxl::cms::ColorCube3D& cube = jxl::cms::UnscaledA2BCube();
638
9
  for (size_t ix = 0; ix < 2; ++ix) {
639
18
    for (size_t iy = 0; iy < 2; ++iy) {
640
36
      for (size_t ib = 0; ib < 2; ++ib) {
641
24
        const jxl::cms::ColorCube0D& out_f = cube[ix][iy][ib];
642
96
        for (int i = 0; i < 3; ++i) {
643
72
          int32_t val = static_cast<int32_t>(std::lroundf(65535 * out_f[i]));
644
72
          JXL_DASSERT(val >= 0 && val <= 65535);
645
72
          WriteICCUint16(val, tags->size(), tags);
646
72
        }
647
24
      }
648
12
    }
649
6
  }
650
  // offset = 148
651
  // 3 curves with 5 parameters = 3 * (12 + 5 * 4) = 96 bytes
652
12
  for (size_t i = 0; i < 3; ++i) {
653
9
    const float b = -jxl::cms::kXYBOffset[i] -
654
9
                    std::cbrt(jxl::cms::kNegOpsinAbsorbanceBiasRGB[i]);
655
9
    std::vector<float> params = {
656
9
        3,
657
9
        1.0f / jxl::cms::kXYBScale[i],
658
9
        b,
659
9
        0,                                           // unused
660
9
        std::max(0.f, -b * jxl::cms::kXYBScale[i]),  // make skcms happy
661
9
    };
662
9
    JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(params, 3, tags));
663
9
  }
664
  // offset = 244
665
3
  const double matrix[] = {1.5170095, -1.1065225, 0.071623,
666
3
                           -0.050022, 0.5683655,  -0.018344,
667
3
                           -1.387676, 1.1145555,  0.6857255};
668
  // 12 * 4 = 48 bytes
669
27
  for (double v : matrix) {
670
27
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(v, tags->size(), tags));
671
27
  }
672
12
  for (size_t i = 0; i < 3; ++i) {
673
9
    float intercept = 0;
674
36
    for (size_t j = 0; j < 3; ++j) {
675
27
      intercept += matrix[i * 3 + j] * jxl::cms::kNegOpsinAbsorbanceBiasRGB[j];
676
27
    }
677
9
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(intercept, tags->size(), tags));
678
9
  }
679
3
  return true;
680
3
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: test_image.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
599
790
static Status CreateICCLutAtoBTagForXYB(std::vector<uint8_t>* tags) {
600
790
  WriteICCTag("mAB ", tags->size(), tags);
601
  // 4 reserved bytes set to 0
602
790
  WriteICCUint32(0, tags->size(), tags);
603
  // number of input channels
604
790
  WriteICCUint8(3, tags->size(), tags);
605
  // number of output channels
606
790
  WriteICCUint8(3, tags->size(), tags);
607
  // 2 reserved bytes for padding
608
790
  WriteICCUint16(0, tags->size(), tags);
609
  // offset to first B curve
610
790
  WriteICCUint32(32, tags->size(), tags);
611
  // offset to matrix
612
790
  WriteICCUint32(244, tags->size(), tags);
613
  // offset to first M curve
614
790
  WriteICCUint32(148, tags->size(), tags);
615
  // offset to CLUT
616
790
  WriteICCUint32(80, tags->size(), tags);
617
  // offset to first A curve
618
  // (reuse linear B curves)
619
790
  WriteICCUint32(32, tags->size(), tags);
620
621
  // offset = 32
622
  // no-op curves
623
790
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
624
790
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
625
790
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
626
  // offset = 80
627
  // number of grid points for each input channel
628
13.4k
  for (int i = 0; i < 16; ++i) {
629
12.6k
    WriteICCUint8(i < 3 ? 2 : 0, tags->size(), tags);
630
12.6k
  }
631
  // precision = 2
632
790
  WriteICCUint8(2, tags->size(), tags);
633
  // 3 bytes of padding
634
790
  WriteICCUint8(0, tags->size(), tags);
635
790
  WriteICCUint16(0, tags->size(), tags);
636
  // 2*2*2*3 entries of 2 bytes each = 48 bytes
637
790
  const jxl::cms::ColorCube3D& cube = jxl::cms::UnscaledA2BCube();
638
2.37k
  for (size_t ix = 0; ix < 2; ++ix) {
639
4.74k
    for (size_t iy = 0; iy < 2; ++iy) {
640
9.48k
      for (size_t ib = 0; ib < 2; ++ib) {
641
6.32k
        const jxl::cms::ColorCube0D& out_f = cube[ix][iy][ib];
642
25.2k
        for (int i = 0; i < 3; ++i) {
643
18.9k
          int32_t val = static_cast<int32_t>(std::lroundf(65535 * out_f[i]));
644
18.9k
          JXL_DASSERT(val >= 0 && val <= 65535);
645
18.9k
          WriteICCUint16(val, tags->size(), tags);
646
18.9k
        }
647
6.32k
      }
648
3.16k
    }
649
1.58k
  }
650
  // offset = 148
651
  // 3 curves with 5 parameters = 3 * (12 + 5 * 4) = 96 bytes
652
3.16k
  for (size_t i = 0; i < 3; ++i) {
653
2.37k
    const float b = -jxl::cms::kXYBOffset[i] -
654
2.37k
                    std::cbrt(jxl::cms::kNegOpsinAbsorbanceBiasRGB[i]);
655
2.37k
    std::vector<float> params = {
656
2.37k
        3,
657
2.37k
        1.0f / jxl::cms::kXYBScale[i],
658
2.37k
        b,
659
2.37k
        0,                                           // unused
660
2.37k
        std::max(0.f, -b * jxl::cms::kXYBScale[i]),  // make skcms happy
661
2.37k
    };
662
2.37k
    JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(params, 3, tags));
663
2.37k
  }
664
  // offset = 244
665
790
  const double matrix[] = {1.5170095, -1.1065225, 0.071623,
666
790
                           -0.050022, 0.5683655,  -0.018344,
667
790
                           -1.387676, 1.1145555,  0.6857255};
668
  // 12 * 4 = 48 bytes
669
7.11k
  for (double v : matrix) {
670
7.11k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(v, tags->size(), tags));
671
7.11k
  }
672
3.16k
  for (size_t i = 0; i < 3; ++i) {
673
2.37k
    float intercept = 0;
674
9.48k
    for (size_t j = 0; j < 3; ++j) {
675
7.11k
      intercept += matrix[i * 3 + j] * jxl::cms::kNegOpsinAbsorbanceBiasRGB[j];
676
7.11k
    }
677
2.37k
    JXL_RETURN_IF_ERROR(WriteICCS15Fixed16(intercept, tags->size(), tags));
678
2.37k
  }
679
790
  return true;
680
790
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: encode.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: jxl_cms.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCLutAtoBTagForXYB(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
681
682
static Status CreateICCLutAtoBTagForHDR(JxlColorEncoding color_encoding,
683
36.7k
                                        std::vector<uint8_t>* tags) {
684
36.7k
  static constexpr size_t k3DLutDim = 9;
685
36.7k
  WriteICCTag("mft1", tags->size(), tags);
686
  // 4 reserved bytes set to 0
687
36.7k
  WriteICCUint32(0, tags->size(), tags);
688
  // number of input channels
689
36.7k
  WriteICCUint8(3, tags->size(), tags);
690
  // number of output channels
691
36.7k
  WriteICCUint8(3, tags->size(), tags);
692
  // number of CLUT grid points
693
36.7k
  WriteICCUint8(k3DLutDim, tags->size(), tags);
694
  // 1 reserved bytes for padding
695
36.7k
  WriteICCUint8(0, tags->size(), tags);
696
697
  // Matrix (per specification, must be identity if input is not XYZ)
698
146k
  for (size_t i = 0; i < 3; ++i) {
699
440k
    for (size_t j = 0; j < 3; ++j) {
700
330k
      JXL_RETURN_IF_ERROR(
701
330k
          WriteICCS15Fixed16(i == j ? 1.f : 0.f, tags->size(), tags));
702
330k
    }
703
110k
  }
704
705
  // Input tables
706
146k
  for (size_t c = 0; c < 3; ++c) {
707
28.2M
    for (size_t i = 0; i < 256; ++i) {
708
28.1M
      WriteICCUint8(i, tags->size(), tags);
709
28.1M
    }
710
110k
  }
711
712
367k
  for (size_t ix = 0; ix < k3DLutDim; ++ix) {
713
3.30M
    for (size_t iy = 0; iy < k3DLutDim; ++iy) {
714
29.7M
      for (size_t ib = 0; ib < k3DLutDim; ++ib) {
715
26.7M
        float f[3] = {ix * (1.0f / (k3DLutDim - 1)),
716
26.7M
                      iy * (1.0f / (k3DLutDim - 1)),
717
26.7M
                      ib * (1.0f / (k3DLutDim - 1))};
718
26.7M
        uint8_t pcslab_out[3];
719
26.7M
        JXL_RETURN_IF_ERROR(ToneMapPixel(color_encoding, f, pcslab_out));
720
80.2M
        for (uint8_t val : pcslab_out) {
721
80.2M
          WriteICCUint8(val, tags->size(), tags);
722
80.2M
        }
723
26.7M
      }
724
2.97M
    }
725
330k
  }
726
727
  // Output tables
728
146k
  for (size_t c = 0; c < 3; ++c) {
729
28.2M
    for (size_t i = 0; i < 256; ++i) {
730
28.1M
      WriteICCUint8(i, tags->size(), tags);
731
28.1M
    }
732
110k
  }
733
734
36.7k
  return true;
735
36.7k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
683
24.4k
                                        std::vector<uint8_t>* tags) {
684
24.4k
  static constexpr size_t k3DLutDim = 9;
685
24.4k
  WriteICCTag("mft1", tags->size(), tags);
686
  // 4 reserved bytes set to 0
687
24.4k
  WriteICCUint32(0, tags->size(), tags);
688
  // number of input channels
689
24.4k
  WriteICCUint8(3, tags->size(), tags);
690
  // number of output channels
691
24.4k
  WriteICCUint8(3, tags->size(), tags);
692
  // number of CLUT grid points
693
24.4k
  WriteICCUint8(k3DLutDim, tags->size(), tags);
694
  // 1 reserved bytes for padding
695
24.4k
  WriteICCUint8(0, tags->size(), tags);
696
697
  // Matrix (per specification, must be identity if input is not XYZ)
698
97.6k
  for (size_t i = 0; i < 3; ++i) {
699
292k
    for (size_t j = 0; j < 3; ++j) {
700
219k
      JXL_RETURN_IF_ERROR(
701
219k
          WriteICCS15Fixed16(i == j ? 1.f : 0.f, tags->size(), tags));
702
219k
    }
703
73.2k
  }
704
705
  // Input tables
706
97.6k
  for (size_t c = 0; c < 3; ++c) {
707
18.8M
    for (size_t i = 0; i < 256; ++i) {
708
18.7M
      WriteICCUint8(i, tags->size(), tags);
709
18.7M
    }
710
73.2k
  }
711
712
244k
  for (size_t ix = 0; ix < k3DLutDim; ++ix) {
713
2.19M
    for (size_t iy = 0; iy < k3DLutDim; ++iy) {
714
19.7M
      for (size_t ib = 0; ib < k3DLutDim; ++ib) {
715
17.7M
        float f[3] = {ix * (1.0f / (k3DLutDim - 1)),
716
17.7M
                      iy * (1.0f / (k3DLutDim - 1)),
717
17.7M
                      ib * (1.0f / (k3DLutDim - 1))};
718
17.7M
        uint8_t pcslab_out[3];
719
17.7M
        JXL_RETURN_IF_ERROR(ToneMapPixel(color_encoding, f, pcslab_out));
720
53.3M
        for (uint8_t val : pcslab_out) {
721
53.3M
          WriteICCUint8(val, tags->size(), tags);
722
53.3M
        }
723
17.7M
      }
724
1.97M
    }
725
219k
  }
726
727
  // Output tables
728
97.6k
  for (size_t c = 0; c < 3; ++c) {
729
18.8M
    for (size_t i = 0; i < 256; ++i) {
730
18.7M
      WriteICCUint8(i, tags->size(), tags);
731
18.7M
    }
732
73.2k
  }
733
734
24.4k
  return true;
735
24.4k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
683
8
                                        std::vector<uint8_t>* tags) {
684
8
  static constexpr size_t k3DLutDim = 9;
685
8
  WriteICCTag("mft1", tags->size(), tags);
686
  // 4 reserved bytes set to 0
687
8
  WriteICCUint32(0, tags->size(), tags);
688
  // number of input channels
689
8
  WriteICCUint8(3, tags->size(), tags);
690
  // number of output channels
691
8
  WriteICCUint8(3, tags->size(), tags);
692
  // number of CLUT grid points
693
8
  WriteICCUint8(k3DLutDim, tags->size(), tags);
694
  // 1 reserved bytes for padding
695
8
  WriteICCUint8(0, tags->size(), tags);
696
697
  // Matrix (per specification, must be identity if input is not XYZ)
698
32
  for (size_t i = 0; i < 3; ++i) {
699
96
    for (size_t j = 0; j < 3; ++j) {
700
72
      JXL_RETURN_IF_ERROR(
701
72
          WriteICCS15Fixed16(i == j ? 1.f : 0.f, tags->size(), tags));
702
72
    }
703
24
  }
704
705
  // Input tables
706
32
  for (size_t c = 0; c < 3; ++c) {
707
6.16k
    for (size_t i = 0; i < 256; ++i) {
708
6.14k
      WriteICCUint8(i, tags->size(), tags);
709
6.14k
    }
710
24
  }
711
712
80
  for (size_t ix = 0; ix < k3DLutDim; ++ix) {
713
720
    for (size_t iy = 0; iy < k3DLutDim; ++iy) {
714
6.48k
      for (size_t ib = 0; ib < k3DLutDim; ++ib) {
715
5.83k
        float f[3] = {ix * (1.0f / (k3DLutDim - 1)),
716
5.83k
                      iy * (1.0f / (k3DLutDim - 1)),
717
5.83k
                      ib * (1.0f / (k3DLutDim - 1))};
718
5.83k
        uint8_t pcslab_out[3];
719
5.83k
        JXL_RETURN_IF_ERROR(ToneMapPixel(color_encoding, f, pcslab_out));
720
17.4k
        for (uint8_t val : pcslab_out) {
721
17.4k
          WriteICCUint8(val, tags->size(), tags);
722
17.4k
        }
723
5.83k
      }
724
648
    }
725
72
  }
726
727
  // Output tables
728
32
  for (size_t c = 0; c < 3; ++c) {
729
6.16k
    for (size_t i = 0; i < 256; ++i) {
730
6.14k
      WriteICCUint8(i, tags->size(), tags);
731
6.14k
    }
732
24
  }
733
734
8
  return true;
735
8
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: test_image.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
683
12.2k
                                        std::vector<uint8_t>* tags) {
684
12.2k
  static constexpr size_t k3DLutDim = 9;
685
12.2k
  WriteICCTag("mft1", tags->size(), tags);
686
  // 4 reserved bytes set to 0
687
12.2k
  WriteICCUint32(0, tags->size(), tags);
688
  // number of input channels
689
12.2k
  WriteICCUint8(3, tags->size(), tags);
690
  // number of output channels
691
12.2k
  WriteICCUint8(3, tags->size(), tags);
692
  // number of CLUT grid points
693
12.2k
  WriteICCUint8(k3DLutDim, tags->size(), tags);
694
  // 1 reserved bytes for padding
695
12.2k
  WriteICCUint8(0, tags->size(), tags);
696
697
  // Matrix (per specification, must be identity if input is not XYZ)
698
49.1k
  for (size_t i = 0; i < 3; ++i) {
699
147k
    for (size_t j = 0; j < 3; ++j) {
700
110k
      JXL_RETURN_IF_ERROR(
701
110k
          WriteICCS15Fixed16(i == j ? 1.f : 0.f, tags->size(), tags));
702
110k
    }
703
36.8k
  }
704
705
  // Input tables
706
49.1k
  for (size_t c = 0; c < 3; ++c) {
707
9.46M
    for (size_t i = 0; i < 256; ++i) {
708
9.43M
      WriteICCUint8(i, tags->size(), tags);
709
9.43M
    }
710
36.8k
  }
711
712
122k
  for (size_t ix = 0; ix < k3DLutDim; ++ix) {
713
1.10M
    for (size_t iy = 0; iy < k3DLutDim; ++iy) {
714
9.94M
      for (size_t ib = 0; ib < k3DLutDim; ++ib) {
715
8.95M
        float f[3] = {ix * (1.0f / (k3DLutDim - 1)),
716
8.95M
                      iy * (1.0f / (k3DLutDim - 1)),
717
8.95M
                      ib * (1.0f / (k3DLutDim - 1))};
718
8.95M
        uint8_t pcslab_out[3];
719
8.95M
        JXL_RETURN_IF_ERROR(ToneMapPixel(color_encoding, f, pcslab_out));
720
26.8M
        for (uint8_t val : pcslab_out) {
721
26.8M
          WriteICCUint8(val, tags->size(), tags);
722
26.8M
        }
723
8.95M
      }
724
994k
    }
725
110k
  }
726
727
  // Output tables
728
49.1k
  for (size_t c = 0; c < 3; ++c) {
729
9.46M
    for (size_t i = 0; i < 256; ++i) {
730
9.43M
      WriteICCUint8(i, tags->size(), tags);
731
9.43M
    }
732
36.8k
  }
733
734
12.2k
  return true;
735
12.2k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: encode.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: jxl_cms.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCLutAtoBTagForHDR(JxlColorEncoding, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
736
737
// Some software (Apple Safari, Preview) requires this.
738
41.7k
static Status CreateICCNoOpBToATag(std::vector<uint8_t>* tags) {
739
41.7k
  WriteICCTag("mBA ", tags->size(), tags);  // notypo
740
  // 4 reserved bytes set to 0
741
41.7k
  WriteICCUint32(0, tags->size(), tags);
742
  // number of input channels
743
41.7k
  WriteICCUint8(3, tags->size(), tags);
744
  // number of output channels
745
41.7k
  WriteICCUint8(3, tags->size(), tags);
746
  // 2 reserved bytes for padding
747
41.7k
  WriteICCUint16(0, tags->size(), tags);
748
  // offset to first B curve
749
41.7k
  WriteICCUint32(32, tags->size(), tags);
750
  // offset to matrix
751
41.7k
  WriteICCUint32(0, tags->size(), tags);
752
  // offset to first M curve
753
41.7k
  WriteICCUint32(0, tags->size(), tags);
754
  // offset to CLUT
755
41.7k
  WriteICCUint32(0, tags->size(), tags);
756
  // offset to first A curve
757
41.7k
  WriteICCUint32(0, tags->size(), tags);
758
759
41.7k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
760
41.7k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
761
41.7k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
762
763
41.7k
  return true;
764
41.7k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
738
28.6k
static Status CreateICCNoOpBToATag(std::vector<uint8_t>* tags) {
739
28.6k
  WriteICCTag("mBA ", tags->size(), tags);  // notypo
740
  // 4 reserved bytes set to 0
741
28.6k
  WriteICCUint32(0, tags->size(), tags);
742
  // number of input channels
743
28.6k
  WriteICCUint8(3, tags->size(), tags);
744
  // number of output channels
745
28.6k
  WriteICCUint8(3, tags->size(), tags);
746
  // 2 reserved bytes for padding
747
28.6k
  WriteICCUint16(0, tags->size(), tags);
748
  // offset to first B curve
749
28.6k
  WriteICCUint32(32, tags->size(), tags);
750
  // offset to matrix
751
28.6k
  WriteICCUint32(0, tags->size(), tags);
752
  // offset to first M curve
753
28.6k
  WriteICCUint32(0, tags->size(), tags);
754
  // offset to CLUT
755
28.6k
  WriteICCUint32(0, tags->size(), tags);
756
  // offset to first A curve
757
28.6k
  WriteICCUint32(0, tags->size(), tags);
758
759
28.6k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
760
28.6k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
761
28.6k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
762
763
28.6k
  return true;
764
28.6k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
738
11
static Status CreateICCNoOpBToATag(std::vector<uint8_t>* tags) {
739
11
  WriteICCTag("mBA ", tags->size(), tags);  // notypo
740
  // 4 reserved bytes set to 0
741
11
  WriteICCUint32(0, tags->size(), tags);
742
  // number of input channels
743
11
  WriteICCUint8(3, tags->size(), tags);
744
  // number of output channels
745
11
  WriteICCUint8(3, tags->size(), tags);
746
  // 2 reserved bytes for padding
747
11
  WriteICCUint16(0, tags->size(), tags);
748
  // offset to first B curve
749
11
  WriteICCUint32(32, tags->size(), tags);
750
  // offset to matrix
751
11
  WriteICCUint32(0, tags->size(), tags);
752
  // offset to first M curve
753
11
  WriteICCUint32(0, tags->size(), tags);
754
  // offset to CLUT
755
11
  WriteICCUint32(0, tags->size(), tags);
756
  // offset to first A curve
757
11
  WriteICCUint32(0, tags->size(), tags);
758
759
11
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
760
11
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
761
11
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
762
763
11
  return true;
764
11
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: test_image.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: test_utils.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
738
13.0k
static Status CreateICCNoOpBToATag(std::vector<uint8_t>* tags) {
739
13.0k
  WriteICCTag("mBA ", tags->size(), tags);  // notypo
740
  // 4 reserved bytes set to 0
741
13.0k
  WriteICCUint32(0, tags->size(), tags);
742
  // number of input channels
743
13.0k
  WriteICCUint8(3, tags->size(), tags);
744
  // number of output channels
745
13.0k
  WriteICCUint8(3, tags->size(), tags);
746
  // 2 reserved bytes for padding
747
13.0k
  WriteICCUint16(0, tags->size(), tags);
748
  // offset to first B curve
749
13.0k
  WriteICCUint32(32, tags->size(), tags);
750
  // offset to matrix
751
13.0k
  WriteICCUint32(0, tags->size(), tags);
752
  // offset to first M curve
753
13.0k
  WriteICCUint32(0, tags->size(), tags);
754
  // offset to CLUT
755
13.0k
  WriteICCUint32(0, tags->size(), tags);
756
  // offset to first A curve
757
13.0k
  WriteICCUint32(0, tags->size(), tags);
758
759
13.0k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
760
13.0k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
761
13.0k
  JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({1.0f}, 0, tags));
762
763
13.0k
  return true;
764
13.0k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: encode.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: jxl_cms.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::CreateICCNoOpBToATag(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
765
766
// These strings are baked into Description - do not change.
767
768
827k
static std::string ToString(JxlColorSpace color_space) {
769
827k
  switch (color_space) {
770
810k
    case JXL_COLOR_SPACE_RGB:
771
810k
      return "RGB";
772
11.1k
    case JXL_COLOR_SPACE_GRAY:
773
11.1k
      return "Gra";
774
5.03k
    case JXL_COLOR_SPACE_XYB:
775
5.03k
      return "XYB";
776
0
    case JXL_COLOR_SPACE_UNKNOWN:
777
0
      return "CS?";
778
0
    default:
779
      // Should not happen - visitor fails if enum is invalid.
780
0
      JXL_DEBUG_ABORT("Invalid ColorSpace %u",
781
0
                      static_cast<uint32_t>(color_space));
782
0
      return "Invalid";
783
827k
  }
784
827k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_fields.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::ToString(JxlColorSpace)
decode.cc:jxl::detail::ToString(JxlColorSpace)
Line
Count
Source
768
418k
static std::string ToString(JxlColorSpace color_space) {
769
418k
  switch (color_space) {
770
406k
    case JXL_COLOR_SPACE_RGB:
771
406k
      return "RGB";
772
7.27k
    case JXL_COLOR_SPACE_GRAY:
773
7.27k
      return "Gra";
774
4.23k
    case JXL_COLOR_SPACE_XYB:
775
4.23k
      return "XYB";
776
0
    case JXL_COLOR_SPACE_UNKNOWN:
777
0
      return "CS?";
778
0
    default:
779
      // Should not happen - visitor fails if enum is invalid.
780
0
      JXL_DEBUG_ABORT("Invalid ColorSpace %u",
781
0
                      static_cast<uint32_t>(color_space));
782
0
      return "Invalid";
783
418k
  }
784
418k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: image_metadata.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: quant_weights.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::ToString(JxlColorSpace)
color_encoding_internal.cc:jxl::detail::ToString(JxlColorSpace)
Line
Count
Source
768
3.27k
static std::string ToString(JxlColorSpace color_space) {
769
3.27k
  switch (color_space) {
770
3.24k
    case JXL_COLOR_SPACE_RGB:
771
3.24k
      return "RGB";
772
30
    case JXL_COLOR_SPACE_GRAY:
773
30
      return "Gra";
774
3
    case JXL_COLOR_SPACE_XYB:
775
3
      return "XYB";
776
0
    case JXL_COLOR_SPACE_UNKNOWN:
777
0
      return "CS?";
778
0
    default:
779
      // Should not happen - visitor fails if enum is invalid.
780
0
      JXL_DEBUG_ABORT("Invalid ColorSpace %u",
781
0
                      static_cast<uint32_t>(color_space));
782
0
      return "Invalid";
783
3.27k
  }
784
3.27k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: dec_group.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: dec_modular.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: dec_noise.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: epf.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: passes_state.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: blending.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: dec_cache.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_blending.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_cms.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_epf.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_noise.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_patches.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_splines.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_spot.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_write.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: image_bundle.cc:jxl::detail::ToString(JxlColorSpace)
test_image.cc:jxl::detail::ToString(JxlColorSpace)
Line
Count
Source
768
13.6k
static std::string ToString(JxlColorSpace color_space) {
769
13.6k
  switch (color_space) {
770
13.6k
    case JXL_COLOR_SPACE_RGB:
771
13.6k
      return "RGB";
772
1
    case JXL_COLOR_SPACE_GRAY:
773
1
      return "Gra";
774
0
    case JXL_COLOR_SPACE_XYB:
775
0
      return "XYB";
776
0
    case JXL_COLOR_SPACE_UNKNOWN:
777
0
      return "CS?";
778
0
    default:
779
      // Should not happen - visitor fails if enum is invalid.
780
0
      JXL_DEBUG_ABORT("Invalid ColorSpace %u",
781
0
                      static_cast<uint32_t>(color_space));
782
0
      return "Invalid";
783
13.6k
  }
784
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: metrics.cc:jxl::detail::ToString(JxlColorSpace)
packed_image_convert.cc:jxl::detail::ToString(JxlColorSpace)
Line
Count
Source
768
341k
static std::string ToString(JxlColorSpace color_space) {
769
341k
  switch (color_space) {
770
339k
    case JXL_COLOR_SPACE_RGB:
771
339k
      return "RGB";
772
1.42k
    case JXL_COLOR_SPACE_GRAY:
773
1.42k
      return "Gra";
774
790
    case JXL_COLOR_SPACE_XYB:
775
790
      return "XYB";
776
0
    case JXL_COLOR_SPACE_UNKNOWN:
777
0
      return "CS?";
778
0
    default:
779
      // Should not happen - visitor fails if enum is invalid.
780
0
      JXL_DEBUG_ABORT("Invalid ColorSpace %u",
781
0
                      static_cast<uint32_t>(color_space));
782
0
      return "Invalid";
783
341k
  }
784
341k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_frame.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_group.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_modular.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::ToString(JxlColorSpace)
encode.cc:jxl::detail::ToString(JxlColorSpace)
Line
Count
Source
768
48.4k
static std::string ToString(JxlColorSpace color_space) {
769
48.4k
  switch (color_space) {
770
46.3k
    case JXL_COLOR_SPACE_RGB:
771
46.3k
      return "RGB";
772
2.09k
    case JXL_COLOR_SPACE_GRAY:
773
2.09k
      return "Gra";
774
0
    case JXL_COLOR_SPACE_XYB:
775
0
      return "XYB";
776
0
    case JXL_COLOR_SPACE_UNKNOWN:
777
0
      return "CS?";
778
0
    default:
779
      // Should not happen - visitor fails if enum is invalid.
780
0
      JXL_DEBUG_ABORT("Invalid ColorSpace %u",
781
0
                      static_cast<uint32_t>(color_space));
782
0
      return "Invalid";
783
48.4k
  }
784
48.4k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: luminance.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_cache.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::ToString(JxlColorSpace)
jxl_cms.cc:jxl::detail::ToString(JxlColorSpace)
Line
Count
Source
768
1.42k
static std::string ToString(JxlColorSpace color_space) {
769
1.42k
  switch (color_space) {
770
1.06k
    case JXL_COLOR_SPACE_RGB:
771
1.06k
      return "RGB";
772
360
    case JXL_COLOR_SPACE_GRAY:
773
360
      return "Gra";
774
0
    case JXL_COLOR_SPACE_XYB:
775
0
      return "XYB";
776
0
    case JXL_COLOR_SPACE_UNKNOWN:
777
0
      return "CS?";
778
0
    default:
779
      // Should not happen - visitor fails if enum is invalid.
780
0
      JXL_DEBUG_ABORT("Invalid ColorSpace %u",
781
0
                      static_cast<uint32_t>(color_space));
782
0
      return "Invalid";
783
1.42k
  }
784
1.42k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: codec.cc:jxl::detail::ToString(JxlColorSpace)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::ToString(JxlColorSpace)
785
786
813k
static std::string ToString(JxlWhitePoint white_point) {
787
813k
  switch (white_point) {
788
804k
    case JXL_WHITE_POINT_D65:
789
804k
      return "D65";
790
0
    case JXL_WHITE_POINT_CUSTOM:
791
0
      return "Cst";
792
3.02k
    case JXL_WHITE_POINT_E:
793
3.02k
      return "EER";
794
6.01k
    case JXL_WHITE_POINT_DCI:
795
6.01k
      return "DCI";
796
0
    default:
797
      // Should not happen - visitor fails if enum is invalid.
798
0
      JXL_DEBUG_ABORT("Invalid WhitePoint %u",
799
0
                      static_cast<uint32_t>(white_point));
800
0
      return "Invalid";
801
813k
  }
802
813k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_fields.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::ToString(JxlWhitePoint)
decode.cc:jxl::detail::ToString(JxlWhitePoint)
Line
Count
Source
786
408k
static std::string ToString(JxlWhitePoint white_point) {
787
408k
  switch (white_point) {
788
403k
    case JXL_WHITE_POINT_D65:
789
403k
      return "D65";
790
0
    case JXL_WHITE_POINT_CUSTOM:
791
0
      return "Cst";
792
2.10k
    case JXL_WHITE_POINT_E:
793
2.10k
      return "EER";
794
2.69k
    case JXL_WHITE_POINT_DCI:
795
2.69k
      return "DCI";
796
0
    default:
797
      // Should not happen - visitor fails if enum is invalid.
798
0
      JXL_DEBUG_ABORT("Invalid WhitePoint %u",
799
0
                      static_cast<uint32_t>(white_point));
800
0
      return "Invalid";
801
408k
  }
802
408k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: image_metadata.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: quant_weights.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::ToString(JxlWhitePoint)
color_encoding_internal.cc:jxl::detail::ToString(JxlWhitePoint)
Line
Count
Source
786
3.21k
static std::string ToString(JxlWhitePoint white_point) {
787
3.21k
  switch (white_point) {
788
3.20k
    case JXL_WHITE_POINT_D65:
789
3.20k
      return "D65";
790
0
    case JXL_WHITE_POINT_CUSTOM:
791
0
      return "Cst";
792
6
    case JXL_WHITE_POINT_E:
793
6
      return "EER";
794
5
    case JXL_WHITE_POINT_DCI:
795
5
      return "DCI";
796
0
    default:
797
      // Should not happen - visitor fails if enum is invalid.
798
0
      JXL_DEBUG_ABORT("Invalid WhitePoint %u",
799
0
                      static_cast<uint32_t>(white_point));
800
0
      return "Invalid";
801
3.21k
  }
802
3.21k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: dec_group.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: dec_modular.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: dec_noise.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: epf.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: passes_state.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: blending.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: dec_cache.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_blending.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_cms.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_epf.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_noise.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_patches.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_splines.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_spot.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_write.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: image_bundle.cc:jxl::detail::ToString(JxlWhitePoint)
test_image.cc:jxl::detail::ToString(JxlWhitePoint)
Line
Count
Source
786
13.6k
static std::string ToString(JxlWhitePoint white_point) {
787
13.6k
  switch (white_point) {
788
13.6k
    case JXL_WHITE_POINT_D65:
789
13.6k
      return "D65";
790
0
    case JXL_WHITE_POINT_CUSTOM:
791
0
      return "Cst";
792
0
    case JXL_WHITE_POINT_E:
793
0
      return "EER";
794
0
    case JXL_WHITE_POINT_DCI:
795
0
      return "DCI";
796
0
    default:
797
      // Should not happen - visitor fails if enum is invalid.
798
0
      JXL_DEBUG_ABORT("Invalid WhitePoint %u",
799
0
                      static_cast<uint32_t>(white_point));
800
0
      return "Invalid";
801
13.6k
  }
802
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: metrics.cc:jxl::detail::ToString(JxlWhitePoint)
packed_image_convert.cc:jxl::detail::ToString(JxlWhitePoint)
Line
Count
Source
786
339k
static std::string ToString(JxlWhitePoint white_point) {
787
339k
  switch (white_point) {
788
335k
    case JXL_WHITE_POINT_D65:
789
335k
      return "D65";
790
0
    case JXL_WHITE_POINT_CUSTOM:
791
0
      return "Cst";
792
895
    case JXL_WHITE_POINT_E:
793
895
      return "EER";
794
3.31k
    case JXL_WHITE_POINT_DCI:
795
3.31k
      return "DCI";
796
0
    default:
797
      // Should not happen - visitor fails if enum is invalid.
798
0
      JXL_DEBUG_ABORT("Invalid WhitePoint %u",
799
0
                      static_cast<uint32_t>(white_point));
800
0
      return "Invalid";
801
339k
  }
802
339k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_frame.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_group.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_modular.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::ToString(JxlWhitePoint)
encode.cc:jxl::detail::ToString(JxlWhitePoint)
Line
Count
Source
786
48.4k
static std::string ToString(JxlWhitePoint white_point) {
787
48.4k
  switch (white_point) {
788
48.4k
    case JXL_WHITE_POINT_D65:
789
48.4k
      return "D65";
790
0
    case JXL_WHITE_POINT_CUSTOM:
791
0
      return "Cst";
792
0
    case JXL_WHITE_POINT_E:
793
0
      return "EER";
794
0
    case JXL_WHITE_POINT_DCI:
795
0
      return "DCI";
796
0
    default:
797
      // Should not happen - visitor fails if enum is invalid.
798
0
      JXL_DEBUG_ABORT("Invalid WhitePoint %u",
799
0
                      static_cast<uint32_t>(white_point));
800
0
      return "Invalid";
801
48.4k
  }
802
48.4k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: luminance.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_cache.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::ToString(JxlWhitePoint)
jxl_cms.cc:jxl::detail::ToString(JxlWhitePoint)
Line
Count
Source
786
386
static std::string ToString(JxlWhitePoint white_point) {
787
386
  switch (white_point) {
788
360
    case JXL_WHITE_POINT_D65:
789
360
      return "D65";
790
0
    case JXL_WHITE_POINT_CUSTOM:
791
0
      return "Cst";
792
26
    case JXL_WHITE_POINT_E:
793
26
      return "EER";
794
0
    case JXL_WHITE_POINT_DCI:
795
0
      return "DCI";
796
0
    default:
797
      // Should not happen - visitor fails if enum is invalid.
798
0
      JXL_DEBUG_ABORT("Invalid WhitePoint %u",
799
0
                      static_cast<uint32_t>(white_point));
800
0
      return "Invalid";
801
386
  }
802
386
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: codec.cc:jxl::detail::ToString(JxlWhitePoint)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::ToString(JxlWhitePoint)
803
804
806k
static std::string ToString(JxlPrimaries primaries) {
805
806k
  switch (primaries) {
806
785k
    case JXL_PRIMARIES_SRGB:
807
785k
      return "SRG";
808
11.7k
    case JXL_PRIMARIES_2100:
809
11.7k
      return "202";
810
9.70k
    case JXL_PRIMARIES_P3:
811
9.70k
      return "DCI";
812
0
    case JXL_PRIMARIES_CUSTOM:
813
0
      return "Cst";
814
0
    default:
815
      // Should not happen - visitor fails if enum is invalid.
816
0
      JXL_DEBUG_ABORT("Invalid Primaries %u", static_cast<uint32_t>(primaries));
817
0
      return "Invalid";
818
806k
  }
819
806k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_fields.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::ToString(JxlPrimaries)
decode.cc:jxl::detail::ToString(JxlPrimaries)
Line
Count
Source
804
404k
static std::string ToString(JxlPrimaries primaries) {
805
404k
  switch (primaries) {
806
396k
    case JXL_PRIMARIES_SRGB:
807
396k
      return "SRG";
808
1.90k
    case JXL_PRIMARIES_2100:
809
1.90k
      return "202";
810
5.72k
    case JXL_PRIMARIES_P3:
811
5.72k
      return "DCI";
812
0
    case JXL_PRIMARIES_CUSTOM:
813
0
      return "Cst";
814
0
    default:
815
      // Should not happen - visitor fails if enum is invalid.
816
0
      JXL_DEBUG_ABORT("Invalid Primaries %u", static_cast<uint32_t>(primaries));
817
0
      return "Invalid";
818
404k
  }
819
404k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: image_metadata.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: quant_weights.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::ToString(JxlPrimaries)
color_encoding_internal.cc:jxl::detail::ToString(JxlPrimaries)
Line
Count
Source
804
3.20k
static std::string ToString(JxlPrimaries primaries) {
805
3.20k
  switch (primaries) {
806
3.18k
    case JXL_PRIMARIES_SRGB:
807
3.18k
      return "SRG";
808
11
    case JXL_PRIMARIES_2100:
809
11
      return "202";
810
8
    case JXL_PRIMARIES_P3:
811
8
      return "DCI";
812
0
    case JXL_PRIMARIES_CUSTOM:
813
0
      return "Cst";
814
0
    default:
815
      // Should not happen - visitor fails if enum is invalid.
816
0
      JXL_DEBUG_ABORT("Invalid Primaries %u", static_cast<uint32_t>(primaries));
817
0
      return "Invalid";
818
3.20k
  }
819
3.20k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: dec_group.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: dec_modular.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: dec_noise.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: epf.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: passes_state.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: blending.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: dec_cache.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_blending.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_cms.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_epf.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_noise.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_patches.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_splines.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_spot.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_write.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: image_bundle.cc:jxl::detail::ToString(JxlPrimaries)
test_image.cc:jxl::detail::ToString(JxlPrimaries)
Line
Count
Source
804
13.6k
static std::string ToString(JxlPrimaries primaries) {
805
13.6k
  switch (primaries) {
806
13.6k
    case JXL_PRIMARIES_SRGB:
807
13.6k
      return "SRG";
808
0
    case JXL_PRIMARIES_2100:
809
0
      return "202";
810
0
    case JXL_PRIMARIES_P3:
811
0
      return "DCI";
812
0
    case JXL_PRIMARIES_CUSTOM:
813
0
      return "Cst";
814
0
    default:
815
      // Should not happen - visitor fails if enum is invalid.
816
0
      JXL_DEBUG_ABORT("Invalid Primaries %u", static_cast<uint32_t>(primaries));
817
0
      return "Invalid";
818
13.6k
  }
819
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: metrics.cc:jxl::detail::ToString(JxlPrimaries)
packed_image_convert.cc:jxl::detail::ToString(JxlPrimaries)
Line
Count
Source
804
339k
static std::string ToString(JxlPrimaries primaries) {
805
339k
  switch (primaries) {
806
332k
    case JXL_PRIMARIES_SRGB:
807
332k
      return "SRG";
808
3.16k
    case JXL_PRIMARIES_2100:
809
3.16k
      return "202";
810
3.97k
    case JXL_PRIMARIES_P3:
811
3.97k
      return "DCI";
812
0
    case JXL_PRIMARIES_CUSTOM:
813
0
      return "Cst";
814
0
    default:
815
      // Should not happen - visitor fails if enum is invalid.
816
0
      JXL_DEBUG_ABORT("Invalid Primaries %u", static_cast<uint32_t>(primaries));
817
0
      return "Invalid";
818
339k
  }
819
339k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_frame.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_group.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_modular.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::ToString(JxlPrimaries)
encode.cc:jxl::detail::ToString(JxlPrimaries)
Line
Count
Source
804
46.3k
static std::string ToString(JxlPrimaries primaries) {
805
46.3k
  switch (primaries) {
806
39.7k
    case JXL_PRIMARIES_SRGB:
807
39.7k
      return "SRG";
808
6.68k
    case JXL_PRIMARIES_2100:
809
6.68k
      return "202";
810
0
    case JXL_PRIMARIES_P3:
811
0
      return "DCI";
812
0
    case JXL_PRIMARIES_CUSTOM:
813
0
      return "Cst";
814
0
    default:
815
      // Should not happen - visitor fails if enum is invalid.
816
0
      JXL_DEBUG_ABORT("Invalid Primaries %u", static_cast<uint32_t>(primaries));
817
0
      return "Invalid";
818
46.3k
  }
819
46.3k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: luminance.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_cache.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: jxl_cms.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: codec.cc:jxl::detail::ToString(JxlPrimaries)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::ToString(JxlPrimaries)
820
821
817k
static std::string ToString(JxlTransferFunction transfer_function) {
822
817k
  switch (transfer_function) {
823
773k
    case JXL_TRANSFER_FUNCTION_SRGB:
824
773k
      return "SRG";
825
1.00k
    case JXL_TRANSFER_FUNCTION_LINEAR:
826
1.00k
      return "Lin";
827
4.88k
    case JXL_TRANSFER_FUNCTION_709:
828
4.88k
      return "709";
829
23.8k
    case JXL_TRANSFER_FUNCTION_PQ:
830
23.8k
      return "PeQ";
831
12.7k
    case JXL_TRANSFER_FUNCTION_HLG:
832
12.7k
      return "HLG";
833
1.56k
    case JXL_TRANSFER_FUNCTION_DCI:
834
1.56k
      return "DCI";
835
0
    case JXL_TRANSFER_FUNCTION_UNKNOWN:
836
0
      return "TF?";
837
0
    case JXL_TRANSFER_FUNCTION_GAMMA:
838
0
      JXL_DEBUG_ABORT("Invalid TransferFunction: gamma");
839
0
      return "Invalid";
840
0
    default:
841
      // Should not happen - visitor fails if enum is invalid.
842
0
      JXL_DEBUG_ABORT("Invalid TransferFunction %u",
843
0
                      static_cast<uint32_t>(transfer_function));
844
0
      return "Invalid";
845
817k
  }
846
817k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_fields.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::ToString(JxlTransferFunction)
decode.cc:jxl::detail::ToString(JxlTransferFunction)
Line
Count
Source
821
411k
static std::string ToString(JxlTransferFunction transfer_function) {
822
411k
  switch (transfer_function) {
823
383k
    case JXL_TRANSFER_FUNCTION_SRGB:
824
383k
      return "SRG";
825
504
    case JXL_TRANSFER_FUNCTION_LINEAR:
826
504
      return "Lin";
827
2.66k
    case JXL_TRANSFER_FUNCTION_709:
828
2.66k
      return "709";
829
13.1k
    case JXL_TRANSFER_FUNCTION_PQ:
830
13.1k
      return "PeQ";
831
10.0k
    case JXL_TRANSFER_FUNCTION_HLG:
832
10.0k
      return "HLG";
833
1.16k
    case JXL_TRANSFER_FUNCTION_DCI:
834
1.16k
      return "DCI";
835
0
    case JXL_TRANSFER_FUNCTION_UNKNOWN:
836
0
      return "TF?";
837
0
    case JXL_TRANSFER_FUNCTION_GAMMA:
838
0
      JXL_DEBUG_ABORT("Invalid TransferFunction: gamma");
839
0
      return "Invalid";
840
0
    default:
841
      // Should not happen - visitor fails if enum is invalid.
842
0
      JXL_DEBUG_ABORT("Invalid TransferFunction %u",
843
0
                      static_cast<uint32_t>(transfer_function));
844
0
      return "Invalid";
845
411k
  }
846
411k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: image_metadata.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: quant_weights.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::ToString(JxlTransferFunction)
color_encoding_internal.cc:jxl::detail::ToString(JxlTransferFunction)
Line
Count
Source
821
3.25k
static std::string ToString(JxlTransferFunction transfer_function) {
822
3.25k
  switch (transfer_function) {
823
3.14k
    case JXL_TRANSFER_FUNCTION_SRGB:
824
3.14k
      return "SRG";
825
13
    case JXL_TRANSFER_FUNCTION_LINEAR:
826
13
      return "Lin";
827
51
    case JXL_TRANSFER_FUNCTION_709:
828
51
      return "709";
829
19
    case JXL_TRANSFER_FUNCTION_PQ:
830
19
      return "PeQ";
831
16
    case JXL_TRANSFER_FUNCTION_HLG:
832
16
      return "HLG";
833
3
    case JXL_TRANSFER_FUNCTION_DCI:
834
3
      return "DCI";
835
0
    case JXL_TRANSFER_FUNCTION_UNKNOWN:
836
0
      return "TF?";
837
0
    case JXL_TRANSFER_FUNCTION_GAMMA:
838
0
      JXL_DEBUG_ABORT("Invalid TransferFunction: gamma");
839
0
      return "Invalid";
840
0
    default:
841
      // Should not happen - visitor fails if enum is invalid.
842
0
      JXL_DEBUG_ABORT("Invalid TransferFunction %u",
843
0
                      static_cast<uint32_t>(transfer_function));
844
0
      return "Invalid";
845
3.25k
  }
846
3.25k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: dec_group.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: dec_modular.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: dec_noise.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: epf.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: passes_state.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: blending.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: dec_cache.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_blending.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_cms.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_epf.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_noise.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_patches.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_splines.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_spot.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_write.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: image_bundle.cc:jxl::detail::ToString(JxlTransferFunction)
test_image.cc:jxl::detail::ToString(JxlTransferFunction)
Line
Count
Source
821
13.6k
static std::string ToString(JxlTransferFunction transfer_function) {
822
13.6k
  switch (transfer_function) {
823
12.1k
    case JXL_TRANSFER_FUNCTION_SRGB:
824
12.1k
      return "SRG";
825
2
    case JXL_TRANSFER_FUNCTION_LINEAR:
826
2
      return "Lin";
827
1.45k
    case JXL_TRANSFER_FUNCTION_709:
828
1.45k
      return "709";
829
0
    case JXL_TRANSFER_FUNCTION_PQ:
830
0
      return "PeQ";
831
0
    case JXL_TRANSFER_FUNCTION_HLG:
832
0
      return "HLG";
833
0
    case JXL_TRANSFER_FUNCTION_DCI:
834
0
      return "DCI";
835
0
    case JXL_TRANSFER_FUNCTION_UNKNOWN:
836
0
      return "TF?";
837
0
    case JXL_TRANSFER_FUNCTION_GAMMA:
838
0
      JXL_DEBUG_ABORT("Invalid TransferFunction: gamma");
839
0
      return "Invalid";
840
0
    default:
841
      // Should not happen - visitor fails if enum is invalid.
842
0
      JXL_DEBUG_ABORT("Invalid TransferFunction %u",
843
0
                      static_cast<uint32_t>(transfer_function));
844
0
      return "Invalid";
845
13.6k
  }
846
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: metrics.cc:jxl::detail::ToString(JxlTransferFunction)
packed_image_convert.cc:jxl::detail::ToString(JxlTransferFunction)
Line
Count
Source
821
339k
static std::string ToString(JxlTransferFunction transfer_function) {
822
339k
  switch (transfer_function) {
823
325k
    case JXL_TRANSFER_FUNCTION_SRGB:
824
325k
      return "SRG";
825
91
    case JXL_TRANSFER_FUNCTION_LINEAR:
826
91
      return "Lin";
827
468
    case JXL_TRANSFER_FUNCTION_709:
828
468
      return "709";
829
10.4k
    case JXL_TRANSFER_FUNCTION_PQ:
830
10.4k
      return "PeQ";
831
2.41k
    case JXL_TRANSFER_FUNCTION_HLG:
832
2.41k
      return "HLG";
833
225
    case JXL_TRANSFER_FUNCTION_DCI:
834
225
      return "DCI";
835
0
    case JXL_TRANSFER_FUNCTION_UNKNOWN:
836
0
      return "TF?";
837
0
    case JXL_TRANSFER_FUNCTION_GAMMA:
838
0
      JXL_DEBUG_ABORT("Invalid TransferFunction: gamma");
839
0
      return "Invalid";
840
0
    default:
841
      // Should not happen - visitor fails if enum is invalid.
842
0
      JXL_DEBUG_ABORT("Invalid TransferFunction %u",
843
0
                      static_cast<uint32_t>(transfer_function));
844
0
      return "Invalid";
845
339k
  }
846
339k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_frame.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_group.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_modular.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::ToString(JxlTransferFunction)
encode.cc:jxl::detail::ToString(JxlTransferFunction)
Line
Count
Source
821
48.4k
static std::string ToString(JxlTransferFunction transfer_function) {
822
48.4k
  switch (transfer_function) {
823
48.4k
    case JXL_TRANSFER_FUNCTION_SRGB:
824
48.4k
      return "SRG";
825
2
    case JXL_TRANSFER_FUNCTION_LINEAR:
826
2
      return "Lin";
827
0
    case JXL_TRANSFER_FUNCTION_709:
828
0
      return "709";
829
0
    case JXL_TRANSFER_FUNCTION_PQ:
830
0
      return "PeQ";
831
0
    case JXL_TRANSFER_FUNCTION_HLG:
832
0
      return "HLG";
833
0
    case JXL_TRANSFER_FUNCTION_DCI:
834
0
      return "DCI";
835
0
    case JXL_TRANSFER_FUNCTION_UNKNOWN:
836
0
      return "TF?";
837
0
    case JXL_TRANSFER_FUNCTION_GAMMA:
838
0
      JXL_DEBUG_ABORT("Invalid TransferFunction: gamma");
839
0
      return "Invalid";
840
0
    default:
841
      // Should not happen - visitor fails if enum is invalid.
842
0
      JXL_DEBUG_ABORT("Invalid TransferFunction %u",
843
0
                      static_cast<uint32_t>(transfer_function));
844
0
      return "Invalid";
845
48.4k
  }
846
48.4k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: luminance.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_cache.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::ToString(JxlTransferFunction)
jxl_cms.cc:jxl::detail::ToString(JxlTransferFunction)
Line
Count
Source
821
1.39k
static std::string ToString(JxlTransferFunction transfer_function) {
822
1.39k
  switch (transfer_function) {
823
244
    case JXL_TRANSFER_FUNCTION_SRGB:
824
244
      return "SRG";
825
393
    case JXL_TRANSFER_FUNCTION_LINEAR:
826
393
      return "Lin";
827
244
    case JXL_TRANSFER_FUNCTION_709:
828
244
      return "709";
829
172
    case JXL_TRANSFER_FUNCTION_PQ:
830
172
      return "PeQ";
831
172
    case JXL_TRANSFER_FUNCTION_HLG:
832
172
      return "HLG";
833
172
    case JXL_TRANSFER_FUNCTION_DCI:
834
172
      return "DCI";
835
0
    case JXL_TRANSFER_FUNCTION_UNKNOWN:
836
0
      return "TF?";
837
0
    case JXL_TRANSFER_FUNCTION_GAMMA:
838
0
      JXL_DEBUG_ABORT("Invalid TransferFunction: gamma");
839
0
      return "Invalid";
840
0
    default:
841
      // Should not happen - visitor fails if enum is invalid.
842
0
      JXL_DEBUG_ABORT("Invalid TransferFunction %u",
843
0
                      static_cast<uint32_t>(transfer_function));
844
0
      return "Invalid";
845
1.39k
  }
846
1.39k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: codec.cc:jxl::detail::ToString(JxlTransferFunction)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::ToString(JxlTransferFunction)
847
848
827k
static std::string ToString(JxlRenderingIntent rendering_intent) {
849
827k
  switch (rendering_intent) {
850
37.6k
    case JXL_RENDERING_INTENT_PERCEPTUAL:
851
37.6k
      return "Per";
852
784k
    case JXL_RENDERING_INTENT_RELATIVE:
853
784k
      return "Rel";
854
1.70k
    case JXL_RENDERING_INTENT_SATURATION:
855
1.70k
      return "Sat";
856
2.84k
    case JXL_RENDERING_INTENT_ABSOLUTE:
857
2.84k
      return "Abs";
858
827k
  }
859
  // Should not happen - visitor fails if enum is invalid.
860
0
  JXL_DEBUG_ABORT("Invalid RenderingIntent %u",
861
0
                  static_cast<uint32_t>(rendering_intent));
862
0
  return "Invalid";
863
0
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_fields.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::ToString(JxlRenderingIntent)
decode.cc:jxl::detail::ToString(JxlRenderingIntent)
Line
Count
Source
848
418k
static std::string ToString(JxlRenderingIntent rendering_intent) {
849
418k
  switch (rendering_intent) {
850
23.6k
    case JXL_RENDERING_INTENT_PERCEPTUAL:
851
23.6k
      return "Per";
852
390k
    case JXL_RENDERING_INTENT_RELATIVE:
853
390k
      return "Rel";
854
1.21k
    case JXL_RENDERING_INTENT_SATURATION:
855
1.21k
      return "Sat";
856
2.43k
    case JXL_RENDERING_INTENT_ABSOLUTE:
857
2.43k
      return "Abs";
858
418k
  }
859
  // Should not happen - visitor fails if enum is invalid.
860
0
  JXL_DEBUG_ABORT("Invalid RenderingIntent %u",
861
0
                  static_cast<uint32_t>(rendering_intent));
862
0
  return "Invalid";
863
0
}
Unexecuted instantiation: frame_header.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: image_metadata.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: quant_weights.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::ToString(JxlRenderingIntent)
color_encoding_internal.cc:jxl::detail::ToString(JxlRenderingIntent)
Line
Count
Source
848
3.27k
static std::string ToString(JxlRenderingIntent rendering_intent) {
849
3.27k
  switch (rendering_intent) {
850
77
    case JXL_RENDERING_INTENT_PERCEPTUAL:
851
77
      return "Per";
852
3.19k
    case JXL_RENDERING_INTENT_RELATIVE:
853
3.19k
      return "Rel";
854
3
    case JXL_RENDERING_INTENT_SATURATION:
855
3
      return "Sat";
856
4
    case JXL_RENDERING_INTENT_ABSOLUTE:
857
4
      return "Abs";
858
3.27k
  }
859
  // Should not happen - visitor fails if enum is invalid.
860
0
  JXL_DEBUG_ABORT("Invalid RenderingIntent %u",
861
0
                  static_cast<uint32_t>(rendering_intent));
862
0
  return "Invalid";
863
0
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: dec_group.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: dec_modular.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: dec_noise.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: epf.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: passes_state.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: blending.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: dec_cache.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_blending.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_cms.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_epf.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_noise.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_patches.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_splines.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_spot.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_write.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: image_bundle.cc:jxl::detail::ToString(JxlRenderingIntent)
test_image.cc:jxl::detail::ToString(JxlRenderingIntent)
Line
Count
Source
848
13.6k
static std::string ToString(JxlRenderingIntent rendering_intent) {
849
13.6k
  switch (rendering_intent) {
850
1.45k
    case JXL_RENDERING_INTENT_PERCEPTUAL:
851
1.45k
      return "Per";
852
12.1k
    case JXL_RENDERING_INTENT_RELATIVE:
853
12.1k
      return "Rel";
854
0
    case JXL_RENDERING_INTENT_SATURATION:
855
0
      return "Sat";
856
0
    case JXL_RENDERING_INTENT_ABSOLUTE:
857
0
      return "Abs";
858
13.6k
  }
859
  // Should not happen - visitor fails if enum is invalid.
860
0
  JXL_DEBUG_ABORT("Invalid RenderingIntent %u",
861
0
                  static_cast<uint32_t>(rendering_intent));
862
0
  return "Invalid";
863
0
}
Unexecuted instantiation: test_utils.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: metrics.cc:jxl::detail::ToString(JxlRenderingIntent)
packed_image_convert.cc:jxl::detail::ToString(JxlRenderingIntent)
Line
Count
Source
848
341k
static std::string ToString(JxlRenderingIntent rendering_intent) {
849
341k
  switch (rendering_intent) {
850
11.4k
    case JXL_RENDERING_INTENT_PERCEPTUAL:
851
11.4k
      return "Per";
852
329k
    case JXL_RENDERING_INTENT_RELATIVE:
853
329k
      return "Rel";
854
471
    case JXL_RENDERING_INTENT_SATURATION:
855
471
      return "Sat";
856
404
    case JXL_RENDERING_INTENT_ABSOLUTE:
857
404
      return "Abs";
858
341k
  }
859
  // Should not happen - visitor fails if enum is invalid.
860
0
  JXL_DEBUG_ABORT("Invalid RenderingIntent %u",
861
0
                  static_cast<uint32_t>(rendering_intent));
862
0
  return "Invalid";
863
0
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_frame.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_group.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_modular.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::ToString(JxlRenderingIntent)
encode.cc:jxl::detail::ToString(JxlRenderingIntent)
Line
Count
Source
848
48.4k
static std::string ToString(JxlRenderingIntent rendering_intent) {
849
48.4k
  switch (rendering_intent) {
850
0
    case JXL_RENDERING_INTENT_PERCEPTUAL:
851
0
      return "Per";
852
48.4k
    case JXL_RENDERING_INTENT_RELATIVE:
853
48.4k
      return "Rel";
854
0
    case JXL_RENDERING_INTENT_SATURATION:
855
0
      return "Sat";
856
0
    case JXL_RENDERING_INTENT_ABSOLUTE:
857
0
      return "Abs";
858
48.4k
  }
859
  // Should not happen - visitor fails if enum is invalid.
860
0
  JXL_DEBUG_ABORT("Invalid RenderingIntent %u",
861
0
                  static_cast<uint32_t>(rendering_intent));
862
0
  return "Invalid";
863
0
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: luminance.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_cache.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::ToString(JxlRenderingIntent)
jxl_cms.cc:jxl::detail::ToString(JxlRenderingIntent)
Line
Count
Source
848
1.42k
static std::string ToString(JxlRenderingIntent rendering_intent) {
849
1.42k
  switch (rendering_intent) {
850
1.05k
    case JXL_RENDERING_INTENT_PERCEPTUAL:
851
1.05k
      return "Per";
852
360
    case JXL_RENDERING_INTENT_RELATIVE:
853
360
      return "Rel";
854
14
    case JXL_RENDERING_INTENT_SATURATION:
855
14
      return "Sat";
856
0
    case JXL_RENDERING_INTENT_ABSOLUTE:
857
0
      return "Abs";
858
1.42k
  }
859
  // Should not happen - visitor fails if enum is invalid.
860
0
  JXL_DEBUG_ABORT("Invalid RenderingIntent %u",
861
0
                  static_cast<uint32_t>(rendering_intent));
862
0
  return "Invalid";
863
0
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: codec.cc:jxl::detail::ToString(JxlRenderingIntent)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::ToString(JxlRenderingIntent)
864
865
839k
static std::string ColorEncodingDescriptionImpl(const JxlColorEncoding& c) {
866
839k
  if (c.color_space == JXL_COLOR_SPACE_RGB &&
867
823k
      c.white_point == JXL_WHITE_POINT_D65) {
868
807k
    if (c.rendering_intent == JXL_RENDERING_INTENT_PERCEPTUAL &&
869
20.5k
        c.transfer_function == JXL_TRANSFER_FUNCTION_SRGB) {
870
1.04k
      if (c.primaries == JXL_PRIMARIES_SRGB) return "sRGB";
871
611
      if (c.primaries == JXL_PRIMARIES_P3) return "DisplayP3";
872
611
    }
873
806k
    if (c.rendering_intent == JXL_RENDERING_INTENT_RELATIVE &&
874
784k
        c.primaries == JXL_PRIMARIES_2100) {
875
19.1k
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_PQ) return "Rec2100PQ";
876
9.46k
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_HLG) return "Rec2100HLG";
877
9.46k
    }
878
806k
  }
879
880
827k
  std::string d = ToString(c.color_space);
881
882
827k
  bool explicit_wp_tf = (c.color_space != JXL_COLOR_SPACE_XYB);
883
827k
  if (explicit_wp_tf) {
884
821k
    d += '_';
885
821k
    if (c.white_point == JXL_WHITE_POINT_CUSTOM) {
886
8.45k
      d += jxl::ToString(c.white_point_xy[0]) + ';';
887
8.45k
      d += jxl::ToString(c.white_point_xy[1]);
888
813k
    } else {
889
813k
      d += ToString(c.white_point);
890
813k
    }
891
821k
  }
892
893
827k
  if ((c.color_space != JXL_COLOR_SPACE_GRAY) &&
894
815k
      (c.color_space != JXL_COLOR_SPACE_XYB)) {
895
810k
    d += '_';
896
810k
    if (c.primaries == JXL_PRIMARIES_CUSTOM) {
897
4.01k
      d += jxl::ToString(c.primaries_red_xy[0]) + ';';
898
4.01k
      d += jxl::ToString(c.primaries_red_xy[1]) + ';';
899
4.01k
      d += jxl::ToString(c.primaries_green_xy[0]) + ';';
900
4.01k
      d += jxl::ToString(c.primaries_green_xy[1]) + ';';
901
4.01k
      d += jxl::ToString(c.primaries_blue_xy[0]) + ';';
902
4.01k
      d += jxl::ToString(c.primaries_blue_xy[1]);
903
806k
    } else {
904
806k
      d += ToString(c.primaries);
905
806k
    }
906
810k
  }
907
908
827k
  d += '_';
909
827k
  d += ToString(c.rendering_intent);
910
911
827k
  if (explicit_wp_tf) {
912
821k
    JxlTransferFunction tf = c.transfer_function;
913
821k
    d += '_';
914
821k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
915
4.94k
      d += 'g';
916
4.94k
      d += jxl::ToString(c.gamma);
917
817k
    } else {
918
817k
      d += ToString(tf);
919
817k
    }
920
821k
  }
921
827k
  return d;
922
839k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_fields.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
decode.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Line
Count
Source
865
428k
static std::string ColorEncodingDescriptionImpl(const JxlColorEncoding& c) {
866
428k
  if (c.color_space == JXL_COLOR_SPACE_RGB &&
867
417k
      c.white_point == JXL_WHITE_POINT_D65) {
868
408k
    if (c.rendering_intent == JXL_RENDERING_INTENT_PERCEPTUAL &&
869
11.1k
        c.transfer_function == JXL_TRANSFER_FUNCTION_SRGB) {
870
742
      if (c.primaries == JXL_PRIMARIES_SRGB) return "sRGB";
871
385
      if (c.primaries == JXL_PRIMARIES_P3) return "DisplayP3";
872
385
    }
873
407k
    if (c.rendering_intent == JXL_RENDERING_INTENT_RELATIVE &&
874
395k
        c.primaries == JXL_PRIMARIES_2100) {
875
10.6k
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_PQ) return "Rec2100PQ";
876
1.24k
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_HLG) return "Rec2100HLG";
877
1.24k
    }
878
407k
  }
879
880
418k
  std::string d = ToString(c.color_space);
881
882
418k
  bool explicit_wp_tf = (c.color_space != JXL_COLOR_SPACE_XYB);
883
418k
  if (explicit_wp_tf) {
884
413k
    d += '_';
885
413k
    if (c.white_point == JXL_WHITE_POINT_CUSTOM) {
886
5.55k
      d += jxl::ToString(c.white_point_xy[0]) + ';';
887
5.55k
      d += jxl::ToString(c.white_point_xy[1]);
888
408k
    } else {
889
408k
      d += ToString(c.white_point);
890
408k
    }
891
413k
  }
892
893
418k
  if ((c.color_space != JXL_COLOR_SPACE_GRAY) &&
894
410k
      (c.color_space != JXL_COLOR_SPACE_XYB)) {
895
406k
    d += '_';
896
406k
    if (c.primaries == JXL_PRIMARIES_CUSTOM) {
897
2.53k
      d += jxl::ToString(c.primaries_red_xy[0]) + ';';
898
2.53k
      d += jxl::ToString(c.primaries_red_xy[1]) + ';';
899
2.53k
      d += jxl::ToString(c.primaries_green_xy[0]) + ';';
900
2.53k
      d += jxl::ToString(c.primaries_green_xy[1]) + ';';
901
2.53k
      d += jxl::ToString(c.primaries_blue_xy[0]) + ';';
902
2.53k
      d += jxl::ToString(c.primaries_blue_xy[1]);
903
404k
    } else {
904
404k
      d += ToString(c.primaries);
905
404k
    }
906
406k
  }
907
908
418k
  d += '_';
909
418k
  d += ToString(c.rendering_intent);
910
911
418k
  if (explicit_wp_tf) {
912
413k
    JxlTransferFunction tf = c.transfer_function;
913
413k
    d += '_';
914
413k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
915
2.85k
      d += 'g';
916
2.85k
      d += jxl::ToString(c.gamma);
917
411k
    } else {
918
411k
      d += ToString(tf);
919
411k
    }
920
413k
  }
921
418k
  return d;
922
428k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: image_metadata.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: quant_weights.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
color_encoding_internal.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Line
Count
Source
865
3.28k
static std::string ColorEncodingDescriptionImpl(const JxlColorEncoding& c) {
866
3.28k
  if (c.color_space == JXL_COLOR_SPACE_RGB &&
867
3.24k
      c.white_point == JXL_WHITE_POINT_D65) {
868
3.19k
    if (c.rendering_intent == JXL_RENDERING_INTENT_PERCEPTUAL &&
869
32
        c.transfer_function == JXL_TRANSFER_FUNCTION_SRGB) {
870
4
      if (c.primaries == JXL_PRIMARIES_SRGB) return "sRGB";
871
3
      if (c.primaries == JXL_PRIMARIES_P3) return "DisplayP3";
872
3
    }
873
3.19k
    if (c.rendering_intent == JXL_RENDERING_INTENT_RELATIVE &&
874
3.16k
        c.primaries == JXL_PRIMARIES_2100) {
875
7
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_PQ) return "Rec2100PQ";
876
6
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_HLG) return "Rec2100HLG";
877
6
    }
878
3.19k
  }
879
880
3.27k
  std::string d = ToString(c.color_space);
881
882
3.27k
  bool explicit_wp_tf = (c.color_space != JXL_COLOR_SPACE_XYB);
883
3.27k
  if (explicit_wp_tf) {
884
3.27k
    d += '_';
885
3.27k
    if (c.white_point == JXL_WHITE_POINT_CUSTOM) {
886
55
      d += jxl::ToString(c.white_point_xy[0]) + ';';
887
55
      d += jxl::ToString(c.white_point_xy[1]);
888
3.21k
    } else {
889
3.21k
      d += ToString(c.white_point);
890
3.21k
    }
891
3.27k
  }
892
893
3.27k
  if ((c.color_space != JXL_COLOR_SPACE_GRAY) &&
894
3.24k
      (c.color_space != JXL_COLOR_SPACE_XYB)) {
895
3.24k
    d += '_';
896
3.24k
    if (c.primaries == JXL_PRIMARIES_CUSTOM) {
897
37
      d += jxl::ToString(c.primaries_red_xy[0]) + ';';
898
37
      d += jxl::ToString(c.primaries_red_xy[1]) + ';';
899
37
      d += jxl::ToString(c.primaries_green_xy[0]) + ';';
900
37
      d += jxl::ToString(c.primaries_green_xy[1]) + ';';
901
37
      d += jxl::ToString(c.primaries_blue_xy[0]) + ';';
902
37
      d += jxl::ToString(c.primaries_blue_xy[1]);
903
3.20k
    } else {
904
3.20k
      d += ToString(c.primaries);
905
3.20k
    }
906
3.24k
  }
907
908
3.27k
  d += '_';
909
3.27k
  d += ToString(c.rendering_intent);
910
911
3.27k
  if (explicit_wp_tf) {
912
3.27k
    JxlTransferFunction tf = c.transfer_function;
913
3.27k
    d += '_';
914
3.27k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
915
23
      d += 'g';
916
23
      d += jxl::ToString(c.gamma);
917
3.25k
    } else {
918
3.25k
      d += ToString(tf);
919
3.25k
    }
920
3.27k
  }
921
3.27k
  return d;
922
3.28k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: dec_group.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: dec_modular.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: dec_noise.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: epf.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: passes_state.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: blending.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: dec_cache.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_blending.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_cms.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_epf.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_noise.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_patches.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_splines.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_spot.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_write.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: image_bundle.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
test_image.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Line
Count
Source
865
13.6k
static std::string ColorEncodingDescriptionImpl(const JxlColorEncoding& c) {
866
13.6k
  if (c.color_space == JXL_COLOR_SPACE_RGB &&
867
13.6k
      c.white_point == JXL_WHITE_POINT_D65) {
868
13.6k
    if (c.rendering_intent == JXL_RENDERING_INTENT_PERCEPTUAL &&
869
1.45k
        c.transfer_function == JXL_TRANSFER_FUNCTION_SRGB) {
870
0
      if (c.primaries == JXL_PRIMARIES_SRGB) return "sRGB";
871
0
      if (c.primaries == JXL_PRIMARIES_P3) return "DisplayP3";
872
0
    }
873
13.6k
    if (c.rendering_intent == JXL_RENDERING_INTENT_RELATIVE &&
874
12.1k
        c.primaries == JXL_PRIMARIES_2100) {
875
0
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_PQ) return "Rec2100PQ";
876
0
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_HLG) return "Rec2100HLG";
877
0
    }
878
13.6k
  }
879
880
13.6k
  std::string d = ToString(c.color_space);
881
882
13.6k
  bool explicit_wp_tf = (c.color_space != JXL_COLOR_SPACE_XYB);
883
13.6k
  if (explicit_wp_tf) {
884
13.6k
    d += '_';
885
13.6k
    if (c.white_point == JXL_WHITE_POINT_CUSTOM) {
886
0
      d += jxl::ToString(c.white_point_xy[0]) + ';';
887
0
      d += jxl::ToString(c.white_point_xy[1]);
888
13.6k
    } else {
889
13.6k
      d += ToString(c.white_point);
890
13.6k
    }
891
13.6k
  }
892
893
13.6k
  if ((c.color_space != JXL_COLOR_SPACE_GRAY) &&
894
13.6k
      (c.color_space != JXL_COLOR_SPACE_XYB)) {
895
13.6k
    d += '_';
896
13.6k
    if (c.primaries == JXL_PRIMARIES_CUSTOM) {
897
0
      d += jxl::ToString(c.primaries_red_xy[0]) + ';';
898
0
      d += jxl::ToString(c.primaries_red_xy[1]) + ';';
899
0
      d += jxl::ToString(c.primaries_green_xy[0]) + ';';
900
0
      d += jxl::ToString(c.primaries_green_xy[1]) + ';';
901
0
      d += jxl::ToString(c.primaries_blue_xy[0]) + ';';
902
0
      d += jxl::ToString(c.primaries_blue_xy[1]);
903
13.6k
    } else {
904
13.6k
      d += ToString(c.primaries);
905
13.6k
    }
906
13.6k
  }
907
908
13.6k
  d += '_';
909
13.6k
  d += ToString(c.rendering_intent);
910
911
13.6k
  if (explicit_wp_tf) {
912
13.6k
    JxlTransferFunction tf = c.transfer_function;
913
13.6k
    d += '_';
914
13.6k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
915
0
      d += 'g';
916
0
      d += jxl::ToString(c.gamma);
917
13.6k
    } else {
918
13.6k
      d += ToString(tf);
919
13.6k
    }
920
13.6k
  }
921
13.6k
  return d;
922
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: metrics.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
packed_image_convert.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Line
Count
Source
865
343k
static std::string ColorEncodingDescriptionImpl(const JxlColorEncoding& c) {
866
343k
  if (c.color_space == JXL_COLOR_SPACE_RGB &&
867
341k
      c.white_point == JXL_WHITE_POINT_D65) {
868
335k
    if (c.rendering_intent == JXL_RENDERING_INTENT_PERCEPTUAL &&
869
7.94k
        c.transfer_function == JXL_TRANSFER_FUNCTION_SRGB) {
870
296
      if (c.primaries == JXL_PRIMARIES_SRGB) return "sRGB";
871
223
      if (c.primaries == JXL_PRIMARIES_P3) return "DisplayP3";
872
223
    }
873
335k
    if (c.rendering_intent == JXL_RENDERING_INTENT_RELATIVE &&
874
327k
        c.primaries == JXL_PRIMARIES_2100) {
875
1.79k
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_PQ) return "Rec2100PQ";
876
1.53k
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_HLG) return "Rec2100HLG";
877
1.53k
    }
878
335k
  }
879
880
341k
  std::string d = ToString(c.color_space);
881
882
341k
  bool explicit_wp_tf = (c.color_space != JXL_COLOR_SPACE_XYB);
883
341k
  if (explicit_wp_tf) {
884
341k
    d += '_';
885
341k
    if (c.white_point == JXL_WHITE_POINT_CUSTOM) {
886
1.81k
      d += jxl::ToString(c.white_point_xy[0]) + ';';
887
1.81k
      d += jxl::ToString(c.white_point_xy[1]);
888
339k
    } else {
889
339k
      d += ToString(c.white_point);
890
339k
    }
891
341k
  }
892
893
341k
  if ((c.color_space != JXL_COLOR_SPACE_GRAY) &&
894
340k
      (c.color_space != JXL_COLOR_SPACE_XYB)) {
895
339k
    d += '_';
896
339k
    if (c.primaries == JXL_PRIMARIES_CUSTOM) {
897
380
      d += jxl::ToString(c.primaries_red_xy[0]) + ';';
898
380
      d += jxl::ToString(c.primaries_red_xy[1]) + ';';
899
380
      d += jxl::ToString(c.primaries_green_xy[0]) + ';';
900
380
      d += jxl::ToString(c.primaries_green_xy[1]) + ';';
901
380
      d += jxl::ToString(c.primaries_blue_xy[0]) + ';';
902
380
      d += jxl::ToString(c.primaries_blue_xy[1]);
903
339k
    } else {
904
339k
      d += ToString(c.primaries);
905
339k
    }
906
339k
  }
907
908
341k
  d += '_';
909
341k
  d += ToString(c.rendering_intent);
910
911
341k
  if (explicit_wp_tf) {
912
341k
    JxlTransferFunction tf = c.transfer_function;
913
341k
    d += '_';
914
341k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
915
2.03k
      d += 'g';
916
2.03k
      d += jxl::ToString(c.gamma);
917
339k
    } else {
918
339k
      d += ToString(tf);
919
339k
    }
920
341k
  }
921
341k
  return d;
922
343k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_frame.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_group.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_modular.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
encode.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Line
Count
Source
865
48.4k
static std::string ColorEncodingDescriptionImpl(const JxlColorEncoding& c) {
866
48.4k
  if (c.color_space == JXL_COLOR_SPACE_RGB &&
867
46.3k
      c.white_point == JXL_WHITE_POINT_D65) {
868
46.3k
    if (c.rendering_intent == JXL_RENDERING_INTENT_PERCEPTUAL &&
869
0
        c.transfer_function == JXL_TRANSFER_FUNCTION_SRGB) {
870
0
      if (c.primaries == JXL_PRIMARIES_SRGB) return "sRGB";
871
0
      if (c.primaries == JXL_PRIMARIES_P3) return "DisplayP3";
872
0
    }
873
46.3k
    if (c.rendering_intent == JXL_RENDERING_INTENT_RELATIVE &&
874
46.3k
        c.primaries == JXL_PRIMARIES_2100) {
875
6.68k
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_PQ) return "Rec2100PQ";
876
6.68k
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_HLG) return "Rec2100HLG";
877
6.68k
    }
878
46.3k
  }
879
880
48.4k
  std::string d = ToString(c.color_space);
881
882
48.4k
  bool explicit_wp_tf = (c.color_space != JXL_COLOR_SPACE_XYB);
883
48.4k
  if (explicit_wp_tf) {
884
48.4k
    d += '_';
885
48.4k
    if (c.white_point == JXL_WHITE_POINT_CUSTOM) {
886
0
      d += jxl::ToString(c.white_point_xy[0]) + ';';
887
0
      d += jxl::ToString(c.white_point_xy[1]);
888
48.4k
    } else {
889
48.4k
      d += ToString(c.white_point);
890
48.4k
    }
891
48.4k
  }
892
893
48.4k
  if ((c.color_space != JXL_COLOR_SPACE_GRAY) &&
894
46.3k
      (c.color_space != JXL_COLOR_SPACE_XYB)) {
895
46.3k
    d += '_';
896
46.3k
    if (c.primaries == JXL_PRIMARIES_CUSTOM) {
897
0
      d += jxl::ToString(c.primaries_red_xy[0]) + ';';
898
0
      d += jxl::ToString(c.primaries_red_xy[1]) + ';';
899
0
      d += jxl::ToString(c.primaries_green_xy[0]) + ';';
900
0
      d += jxl::ToString(c.primaries_green_xy[1]) + ';';
901
0
      d += jxl::ToString(c.primaries_blue_xy[0]) + ';';
902
0
      d += jxl::ToString(c.primaries_blue_xy[1]);
903
46.3k
    } else {
904
46.3k
      d += ToString(c.primaries);
905
46.3k
    }
906
46.3k
  }
907
908
48.4k
  d += '_';
909
48.4k
  d += ToString(c.rendering_intent);
910
911
48.4k
  if (explicit_wp_tf) {
912
48.4k
    JxlTransferFunction tf = c.transfer_function;
913
48.4k
    d += '_';
914
48.4k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
915
0
      d += 'g';
916
0
      d += jxl::ToString(c.gamma);
917
48.4k
    } else {
918
48.4k
      d += ToString(tf);
919
48.4k
    }
920
48.4k
  }
921
48.4k
  return d;
922
48.4k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: luminance.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_cache.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
jxl_cms.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Line
Count
Source
865
1.42k
static std::string ColorEncodingDescriptionImpl(const JxlColorEncoding& c) {
866
1.42k
  if (c.color_space == JXL_COLOR_SPACE_RGB &&
867
1.06k
      c.white_point == JXL_WHITE_POINT_D65) {
868
0
    if (c.rendering_intent == JXL_RENDERING_INTENT_PERCEPTUAL &&
869
0
        c.transfer_function == JXL_TRANSFER_FUNCTION_SRGB) {
870
0
      if (c.primaries == JXL_PRIMARIES_SRGB) return "sRGB";
871
0
      if (c.primaries == JXL_PRIMARIES_P3) return "DisplayP3";
872
0
    }
873
0
    if (c.rendering_intent == JXL_RENDERING_INTENT_RELATIVE &&
874
0
        c.primaries == JXL_PRIMARIES_2100) {
875
0
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_PQ) return "Rec2100PQ";
876
0
      if (c.transfer_function == JXL_TRANSFER_FUNCTION_HLG) return "Rec2100HLG";
877
0
    }
878
0
  }
879
880
1.42k
  std::string d = ToString(c.color_space);
881
882
1.42k
  bool explicit_wp_tf = (c.color_space != JXL_COLOR_SPACE_XYB);
883
1.42k
  if (explicit_wp_tf) {
884
1.42k
    d += '_';
885
1.42k
    if (c.white_point == JXL_WHITE_POINT_CUSTOM) {
886
1.03k
      d += jxl::ToString(c.white_point_xy[0]) + ';';
887
1.03k
      d += jxl::ToString(c.white_point_xy[1]);
888
1.03k
    } else {
889
386
      d += ToString(c.white_point);
890
386
    }
891
1.42k
  }
892
893
1.42k
  if ((c.color_space != JXL_COLOR_SPACE_GRAY) &&
894
1.06k
      (c.color_space != JXL_COLOR_SPACE_XYB)) {
895
1.06k
    d += '_';
896
1.06k
    if (c.primaries == JXL_PRIMARIES_CUSTOM) {
897
1.06k
      d += jxl::ToString(c.primaries_red_xy[0]) + ';';
898
1.06k
      d += jxl::ToString(c.primaries_red_xy[1]) + ';';
899
1.06k
      d += jxl::ToString(c.primaries_green_xy[0]) + ';';
900
1.06k
      d += jxl::ToString(c.primaries_green_xy[1]) + ';';
901
1.06k
      d += jxl::ToString(c.primaries_blue_xy[0]) + ';';
902
1.06k
      d += jxl::ToString(c.primaries_blue_xy[1]);
903
1.06k
    } else {
904
0
      d += ToString(c.primaries);
905
0
    }
906
1.06k
  }
907
908
1.42k
  d += '_';
909
1.42k
  d += ToString(c.rendering_intent);
910
911
1.42k
  if (explicit_wp_tf) {
912
1.42k
    JxlTransferFunction tf = c.transfer_function;
913
1.42k
    d += '_';
914
1.42k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
915
27
      d += 'g';
916
27
      d += jxl::ToString(c.gamma);
917
1.39k
    } else {
918
1.39k
      d += ToString(tf);
919
1.39k
    }
920
1.42k
  }
921
1.42k
  return d;
922
1.42k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: codec.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::ColorEncodingDescriptionImpl(JxlColorEncoding const&)
923
924
static Status MaybeCreateProfileImpl(const JxlColorEncoding& c,
925
839k
                                     std::vector<uint8_t>* icc) {
926
839k
  std::vector<uint8_t> header;
927
839k
  std::vector<uint8_t> tagtable;
928
839k
  std::vector<uint8_t> tags;
929
839k
  JxlTransferFunction tf = c.transfer_function;
930
839k
  if (c.color_space == JXL_COLOR_SPACE_UNKNOWN ||
931
839k
      tf == JXL_TRANSFER_FUNCTION_UNKNOWN) {
932
142
    return false;  // Not an error
933
142
  }
934
935
839k
  switch (c.color_space) {
936
823k
    case JXL_COLOR_SPACE_RGB:
937
834k
    case JXL_COLOR_SPACE_GRAY:
938
839k
    case JXL_COLOR_SPACE_XYB:
939
839k
      break;  // OK
940
0
    default:
941
0
      return JXL_FAILURE("Invalid CS %u",
942
839k
                         static_cast<unsigned int>(c.color_space));
943
839k
  }
944
945
839k
  if (c.color_space == JXL_COLOR_SPACE_XYB &&
946
5.04k
      c.rendering_intent != JXL_RENDERING_INTENT_PERCEPTUAL) {
947
13
    return JXL_FAILURE(
948
13
        "Only perceptual rendering intent implemented for XYB "
949
13
        "ICC profile.");
950
13
  }
951
952
839k
  JXL_RETURN_IF_ERROR(CreateICCHeader(c, &header));
953
954
839k
  std::vector<size_t> offsets;
955
  // tag count, deferred to later
956
839k
  WriteICCUint32(0, tagtable.size(), &tagtable);
957
958
839k
  size_t tag_offset = 0;
959
839k
  size_t tag_size = 0;
960
961
839k
  CreateICCMlucTag(ColorEncodingDescriptionImpl(c), &tags);
962
839k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
963
839k
  AddToICCTagTable("desc", tag_offset, tag_size, &tagtable, &offsets);
964
965
839k
  const std::string copyright = "CC0";
966
839k
  CreateICCMlucTag(copyright, &tags);
967
839k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
968
839k
  AddToICCTagTable("cprt", tag_offset, tag_size, &tagtable, &offsets);
969
970
  // TODO(eustas): isn't it the other way round: gray image has d50 WhitePoint?
971
839k
  if (c.color_space == JXL_COLOR_SPACE_GRAY) {
972
11.1k
    Color wtpt;
973
11.1k
    JXL_RETURN_IF_ERROR(
974
11.1k
        CIEXYZFromWhiteCIExy(c.white_point_xy[0], c.white_point_xy[1], wtpt));
975
11.1k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(wtpt, &tags));
976
828k
  } else {
977
828k
    Color d50{0.964203, 1.0, 0.824905};
978
828k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(d50, &tags));
979
828k
  }
980
839k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
981
839k
  AddToICCTagTable("wtpt", tag_offset, tag_size, &tagtable, &offsets);
982
983
839k
  if (c.color_space != JXL_COLOR_SPACE_GRAY) {
984
    // Chromatic adaptation matrix
985
828k
    Matrix3x3 chad;
986
828k
    JXL_RETURN_IF_ERROR(
987
828k
        CreateICCChadMatrix(c.white_point_xy[0], c.white_point_xy[1], chad));
988
989
828k
    JXL_RETURN_IF_ERROR(CreateICCChadTag(chad, &tags));
990
827k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
991
827k
    AddToICCTagTable("chad", tag_offset, tag_size, &tagtable, &offsets);
992
827k
  }
993
994
839k
  if (c.color_space == JXL_COLOR_SPACE_RGB) {
995
822k
    MaybeCreateICCCICPTag(c, &tags, &tag_offset, &tag_size, &tagtable,
996
822k
                          &offsets);
997
998
822k
    Matrix3x3 m;
999
822k
    JXL_RETURN_IF_ERROR(CreateICCRGBMatrix(
1000
822k
        c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
1001
822k
        c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
1002
822k
        c.white_point_xy[0], c.white_point_xy[1], m));
1003
822k
    Color r{m[0][0], m[1][0], m[2][0]};
1004
822k
    Color g{m[0][1], m[1][1], m[2][1]};
1005
822k
    Color b{m[0][2], m[1][2], m[2][2]};
1006
1007
822k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(r, &tags));
1008
822k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1009
822k
    AddToICCTagTable("rXYZ", tag_offset, tag_size, &tagtable, &offsets);
1010
1011
822k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(g, &tags));
1012
822k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1013
822k
    AddToICCTagTable("gXYZ", tag_offset, tag_size, &tagtable, &offsets);
1014
1015
822k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(b, &tags));
1016
822k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1017
822k
    AddToICCTagTable("bXYZ", tag_offset, tag_size, &tagtable, &offsets);
1018
822k
  }
1019
1020
838k
  if (c.color_space == JXL_COLOR_SPACE_XYB) {
1021
5.03k
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForXYB(&tags));
1022
5.03k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1023
5.03k
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1024
5.03k
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1025
5.03k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1026
5.03k
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1027
833k
  } else if (kEnable3DToneMapping && CanToneMap(c)) {
1028
36.7k
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForHDR(c, &tags));
1029
36.7k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1030
36.7k
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1031
36.7k
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1032
36.7k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1033
36.7k
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1034
797k
  } else {
1035
797k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
1036
4.90k
      float gamma = 1.0 / c.gamma;
1037
4.90k
      JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({gamma}, 0, &tags));
1038
792k
    } else if (c.color_space != JXL_COLOR_SPACE_XYB) {
1039
792k
      switch (tf) {
1040
4.99k
        case JXL_TRANSFER_FUNCTION_HLG:
1041
4.99k
          CreateICCCurvCurvTag(
1042
4.99k
              CreateTableCurve<64, ExtraTF::kHLG>(CanToneMap(c)), &tags);
1043
4.99k
          break;
1044
6.50k
        case JXL_TRANSFER_FUNCTION_PQ:
1045
6.50k
          CreateICCCurvCurvTag(
1046
6.50k
              CreateTableCurve<64, ExtraTF::kPQ>(CanToneMap(c)), &tags);
1047
6.50k
          break;
1048
773k
        case JXL_TRANSFER_FUNCTION_SRGB:
1049
773k
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1050
773k
              {2.4, 1.0 / 1.055, 0.055 / 1.055, 1.0 / 12.92, 0.04045}, 3,
1051
773k
              &tags));
1052
773k
          break;
1053
773k
        case JXL_TRANSFER_FUNCTION_709:
1054
4.70k
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1055
4.70k
              {1.0 / 0.45, 1.0 / 1.099, 0.099 / 1.099, 1.0 / 4.5, 0.081}, 3,
1056
4.70k
              &tags));
1057
4.70k
          break;
1058
4.70k
        case JXL_TRANSFER_FUNCTION_LINEAR:
1059
911
          JXL_RETURN_IF_ERROR(
1060
911
              CreateICCCurvParaTag({1.0, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1061
911
          break;
1062
1.48k
        case JXL_TRANSFER_FUNCTION_DCI:
1063
1.48k
          JXL_RETURN_IF_ERROR(
1064
1.48k
              CreateICCCurvParaTag({2.6, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1065
1.48k
          break;
1066
1.48k
        default:
1067
792k
          return JXL_UNREACHABLE("unknown TF %u",
1068
792k
                                 static_cast<unsigned int>(tf));
1069
792k
      }
1070
792k
    }
1071
797k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1072
797k
    if (c.color_space == JXL_COLOR_SPACE_GRAY) {
1073
11.1k
      AddToICCTagTable("kTRC", tag_offset, tag_size, &tagtable, &offsets);
1074
785k
    } else {
1075
785k
      AddToICCTagTable("rTRC", tag_offset, tag_size, &tagtable, &offsets);
1076
785k
      AddToICCTagTable("gTRC", tag_offset, tag_size, &tagtable, &offsets);
1077
785k
      AddToICCTagTable("bTRC", tag_offset, tag_size, &tagtable, &offsets);
1078
785k
    }
1079
797k
  }
1080
1081
  // Tag count
1082
838k
  WriteICCUint32(offsets.size(), 0, &tagtable);
1083
9.91M
  for (size_t i = 0; i < offsets.size(); i++) {
1084
9.07M
    WriteICCUint32(offsets[i] + header.size() + tagtable.size(), 4 + 12 * i + 4,
1085
9.07M
                   &tagtable);
1086
9.07M
  }
1087
1088
  // ICC profile size
1089
838k
  WriteICCUint32(header.size() + tagtable.size() + tags.size(), 0, &header);
1090
1091
838k
  *icc = header;
1092
838k
  Bytes(tagtable).AppendTo(*icc);
1093
838k
  Bytes(tags).AppendTo(*icc);
1094
1095
  // The MD5 checksum must be computed on the profile with profile flags,
1096
  // rendering intent, and region of the checksum itself, set to 0.
1097
  // TODO(lode): manually verify with a reliable tool that this creates correct
1098
  // signature (profile id) for ICC profiles.
1099
838k
  std::vector<uint8_t> icc_sum = *icc;
1100
838k
  if (icc_sum.size() >= 64 + 4) {
1101
838k
    memset(icc_sum.data() + 44, 0, 4);
1102
838k
    memset(icc_sum.data() + 64, 0, 4);
1103
838k
  }
1104
838k
  uint8_t checksum[16];
1105
838k
  detail::ICCComputeMD5(icc_sum, checksum);
1106
1107
838k
  memcpy(icc->data() + 84, checksum, sizeof(checksum));
1108
1109
838k
  return true;
1110
838k
}
Unexecuted instantiation: enc_ans.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
925
428k
                                     std::vector<uint8_t>* icc) {
926
428k
  std::vector<uint8_t> header;
927
428k
  std::vector<uint8_t> tagtable;
928
428k
  std::vector<uint8_t> tags;
929
428k
  JxlTransferFunction tf = c.transfer_function;
930
428k
  if (c.color_space == JXL_COLOR_SPACE_UNKNOWN ||
931
428k
      tf == JXL_TRANSFER_FUNCTION_UNKNOWN) {
932
0
    return false;  // Not an error
933
0
  }
934
935
428k
  switch (c.color_space) {
936
417k
    case JXL_COLOR_SPACE_RGB:
937
424k
    case JXL_COLOR_SPACE_GRAY:
938
428k
    case JXL_COLOR_SPACE_XYB:
939
428k
      break;  // OK
940
0
    default:
941
0
      return JXL_FAILURE("Invalid CS %u",
942
428k
                         static_cast<unsigned int>(c.color_space));
943
428k
  }
944
945
428k
  if (c.color_space == JXL_COLOR_SPACE_XYB &&
946
4.24k
      c.rendering_intent != JXL_RENDERING_INTENT_PERCEPTUAL) {
947
10
    return JXL_FAILURE(
948
10
        "Only perceptual rendering intent implemented for XYB "
949
10
        "ICC profile.");
950
10
  }
951
952
428k
  JXL_RETURN_IF_ERROR(CreateICCHeader(c, &header));
953
954
428k
  std::vector<size_t> offsets;
955
  // tag count, deferred to later
956
428k
  WriteICCUint32(0, tagtable.size(), &tagtable);
957
958
428k
  size_t tag_offset = 0;
959
428k
  size_t tag_size = 0;
960
961
428k
  CreateICCMlucTag(ColorEncodingDescriptionImpl(c), &tags);
962
428k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
963
428k
  AddToICCTagTable("desc", tag_offset, tag_size, &tagtable, &offsets);
964
965
428k
  const std::string copyright = "CC0";
966
428k
  CreateICCMlucTag(copyright, &tags);
967
428k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
968
428k
  AddToICCTagTable("cprt", tag_offset, tag_size, &tagtable, &offsets);
969
970
  // TODO(eustas): isn't it the other way round: gray image has d50 WhitePoint?
971
428k
  if (c.color_space == JXL_COLOR_SPACE_GRAY) {
972
7.27k
    Color wtpt;
973
7.27k
    JXL_RETURN_IF_ERROR(
974
7.27k
        CIEXYZFromWhiteCIExy(c.white_point_xy[0], c.white_point_xy[1], wtpt));
975
7.26k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(wtpt, &tags));
976
421k
  } else {
977
421k
    Color d50{0.964203, 1.0, 0.824905};
978
421k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(d50, &tags));
979
421k
  }
980
428k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
981
428k
  AddToICCTagTable("wtpt", tag_offset, tag_size, &tagtable, &offsets);
982
983
428k
  if (c.color_space != JXL_COLOR_SPACE_GRAY) {
984
    // Chromatic adaptation matrix
985
421k
    Matrix3x3 chad;
986
421k
    JXL_RETURN_IF_ERROR(
987
421k
        CreateICCChadMatrix(c.white_point_xy[0], c.white_point_xy[1], chad));
988
989
421k
    JXL_RETURN_IF_ERROR(CreateICCChadTag(chad, &tags));
990
421k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
991
421k
    AddToICCTagTable("chad", tag_offset, tag_size, &tagtable, &offsets);
992
421k
  }
993
994
428k
  if (c.color_space == JXL_COLOR_SPACE_RGB) {
995
417k
    MaybeCreateICCCICPTag(c, &tags, &tag_offset, &tag_size, &tagtable,
996
417k
                          &offsets);
997
998
417k
    Matrix3x3 m;
999
417k
    JXL_RETURN_IF_ERROR(CreateICCRGBMatrix(
1000
417k
        c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
1001
417k
        c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
1002
417k
        c.white_point_xy[0], c.white_point_xy[1], m));
1003
417k
    Color r{m[0][0], m[1][0], m[2][0]};
1004
417k
    Color g{m[0][1], m[1][1], m[2][1]};
1005
417k
    Color b{m[0][2], m[1][2], m[2][2]};
1006
1007
417k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(r, &tags));
1008
417k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1009
417k
    AddToICCTagTable("rXYZ", tag_offset, tag_size, &tagtable, &offsets);
1010
1011
417k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(g, &tags));
1012
417k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1013
417k
    AddToICCTagTable("gXYZ", tag_offset, tag_size, &tagtable, &offsets);
1014
1015
417k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(b, &tags));
1016
417k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1017
417k
    AddToICCTagTable("bXYZ", tag_offset, tag_size, &tagtable, &offsets);
1018
417k
  }
1019
1020
428k
  if (c.color_space == JXL_COLOR_SPACE_XYB) {
1021
4.23k
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForXYB(&tags));
1022
4.23k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1023
4.23k
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1024
4.23k
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1025
4.23k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1026
4.23k
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1027
424k
  } else if (kEnable3DToneMapping && CanToneMap(c)) {
1028
24.4k
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForHDR(c, &tags));
1029
24.4k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1030
24.4k
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1031
24.4k
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1032
24.4k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1033
24.4k
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1034
400k
  } else {
1035
400k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
1036
2.83k
      float gamma = 1.0 / c.gamma;
1037
2.83k
      JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({gamma}, 0, &tags));
1038
397k
    } else if (c.color_space != JXL_COLOR_SPACE_XYB) {
1039
397k
      switch (tf) {
1040
3.44k
        case JXL_TRANSFER_FUNCTION_HLG:
1041
3.44k
          CreateICCCurvCurvTag(
1042
3.44k
              CreateTableCurve<64, ExtraTF::kHLG>(CanToneMap(c)), &tags);
1043
3.44k
          break;
1044
5.66k
        case JXL_TRANSFER_FUNCTION_PQ:
1045
5.66k
          CreateICCCurvCurvTag(
1046
5.66k
              CreateTableCurve<64, ExtraTF::kPQ>(CanToneMap(c)), &tags);
1047
5.66k
          break;
1048
383k
        case JXL_TRANSFER_FUNCTION_SRGB:
1049
383k
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1050
383k
              {2.4, 1.0 / 1.055, 0.055 / 1.055, 1.0 / 12.92, 0.04045}, 3,
1051
383k
              &tags));
1052
383k
          break;
1053
383k
        case JXL_TRANSFER_FUNCTION_709:
1054
2.61k
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1055
2.61k
              {1.0 / 0.45, 1.0 / 1.099, 0.099 / 1.099, 1.0 / 4.5, 0.081}, 3,
1056
2.61k
              &tags));
1057
2.61k
          break;
1058
2.61k
        case JXL_TRANSFER_FUNCTION_LINEAR:
1059
500
          JXL_RETURN_IF_ERROR(
1060
500
              CreateICCCurvParaTag({1.0, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1061
500
          break;
1062
1.16k
        case JXL_TRANSFER_FUNCTION_DCI:
1063
1.16k
          JXL_RETURN_IF_ERROR(
1064
1.16k
              CreateICCCurvParaTag({2.6, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1065
1.16k
          break;
1066
1.16k
        default:
1067
397k
          return JXL_UNREACHABLE("unknown TF %u",
1068
397k
                                 static_cast<unsigned int>(tf));
1069
397k
      }
1070
397k
    }
1071
400k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1072
400k
    if (c.color_space == JXL_COLOR_SPACE_GRAY) {
1073
7.25k
      AddToICCTagTable("kTRC", tag_offset, tag_size, &tagtable, &offsets);
1074
392k
    } else {
1075
392k
      AddToICCTagTable("rTRC", tag_offset, tag_size, &tagtable, &offsets);
1076
392k
      AddToICCTagTable("gTRC", tag_offset, tag_size, &tagtable, &offsets);
1077
392k
      AddToICCTagTable("bTRC", tag_offset, tag_size, &tagtable, &offsets);
1078
392k
    }
1079
400k
  }
1080
1081
  // Tag count
1082
428k
  WriteICCUint32(offsets.size(), 0, &tagtable);
1083
5.04M
  for (size_t i = 0; i < offsets.size(); i++) {
1084
4.61M
    WriteICCUint32(offsets[i] + header.size() + tagtable.size(), 4 + 12 * i + 4,
1085
4.61M
                   &tagtable);
1086
4.61M
  }
1087
1088
  // ICC profile size
1089
428k
  WriteICCUint32(header.size() + tagtable.size() + tags.size(), 0, &header);
1090
1091
428k
  *icc = header;
1092
428k
  Bytes(tagtable).AppendTo(*icc);
1093
428k
  Bytes(tags).AppendTo(*icc);
1094
1095
  // The MD5 checksum must be computed on the profile with profile flags,
1096
  // rendering intent, and region of the checksum itself, set to 0.
1097
  // TODO(lode): manually verify with a reliable tool that this creates correct
1098
  // signature (profile id) for ICC profiles.
1099
428k
  std::vector<uint8_t> icc_sum = *icc;
1100
428k
  if (icc_sum.size() >= 64 + 4) {
1101
428k
    memset(icc_sum.data() + 44, 0, 4);
1102
428k
    memset(icc_sum.data() + 64, 0, 4);
1103
428k
  }
1104
428k
  uint8_t checksum[16];
1105
428k
  detail::ICCComputeMD5(icc_sum, checksum);
1106
1107
428k
  memcpy(icc->data() + 84, checksum, sizeof(checksum));
1108
1109
428k
  return true;
1110
428k
}
Unexecuted instantiation: frame_header.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
925
3.28k
                                     std::vector<uint8_t>* icc) {
926
3.28k
  std::vector<uint8_t> header;
927
3.28k
  std::vector<uint8_t> tagtable;
928
3.28k
  std::vector<uint8_t> tags;
929
3.28k
  JxlTransferFunction tf = c.transfer_function;
930
3.28k
  if (c.color_space == JXL_COLOR_SPACE_UNKNOWN ||
931
3.28k
      tf == JXL_TRANSFER_FUNCTION_UNKNOWN) {
932
0
    return false;  // Not an error
933
0
  }
934
935
3.28k
  switch (c.color_space) {
936
3.24k
    case JXL_COLOR_SPACE_RGB:
937
3.27k
    case JXL_COLOR_SPACE_GRAY:
938
3.28k
    case JXL_COLOR_SPACE_XYB:
939
3.28k
      break;  // OK
940
0
    default:
941
0
      return JXL_FAILURE("Invalid CS %u",
942
3.28k
                         static_cast<unsigned int>(c.color_space));
943
3.28k
  }
944
945
3.28k
  if (c.color_space == JXL_COLOR_SPACE_XYB &&
946
4
      c.rendering_intent != JXL_RENDERING_INTENT_PERCEPTUAL) {
947
1
    return JXL_FAILURE(
948
1
        "Only perceptual rendering intent implemented for XYB "
949
1
        "ICC profile.");
950
1
  }
951
952
3.28k
  JXL_RETURN_IF_ERROR(CreateICCHeader(c, &header));
953
954
3.28k
  std::vector<size_t> offsets;
955
  // tag count, deferred to later
956
3.28k
  WriteICCUint32(0, tagtable.size(), &tagtable);
957
958
3.28k
  size_t tag_offset = 0;
959
3.28k
  size_t tag_size = 0;
960
961
3.28k
  CreateICCMlucTag(ColorEncodingDescriptionImpl(c), &tags);
962
3.28k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
963
3.28k
  AddToICCTagTable("desc", tag_offset, tag_size, &tagtable, &offsets);
964
965
3.28k
  const std::string copyright = "CC0";
966
3.28k
  CreateICCMlucTag(copyright, &tags);
967
3.28k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
968
3.28k
  AddToICCTagTable("cprt", tag_offset, tag_size, &tagtable, &offsets);
969
970
  // TODO(eustas): isn't it the other way round: gray image has d50 WhitePoint?
971
3.28k
  if (c.color_space == JXL_COLOR_SPACE_GRAY) {
972
30
    Color wtpt;
973
30
    JXL_RETURN_IF_ERROR(
974
30
        CIEXYZFromWhiteCIExy(c.white_point_xy[0], c.white_point_xy[1], wtpt));
975
29
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(wtpt, &tags));
976
3.25k
  } else {
977
3.25k
    Color d50{0.964203, 1.0, 0.824905};
978
3.25k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(d50, &tags));
979
3.25k
  }
980
3.27k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
981
3.27k
  AddToICCTagTable("wtpt", tag_offset, tag_size, &tagtable, &offsets);
982
983
3.27k
  if (c.color_space != JXL_COLOR_SPACE_GRAY) {
984
    // Chromatic adaptation matrix
985
3.25k
    Matrix3x3 chad;
986
3.25k
    JXL_RETURN_IF_ERROR(
987
3.25k
        CreateICCChadMatrix(c.white_point_xy[0], c.white_point_xy[1], chad));
988
989
3.23k
    JXL_RETURN_IF_ERROR(CreateICCChadTag(chad, &tags));
990
3.22k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
991
3.22k
    AddToICCTagTable("chad", tag_offset, tag_size, &tagtable, &offsets);
992
3.22k
  }
993
994
3.25k
  if (c.color_space == JXL_COLOR_SPACE_RGB) {
995
3.22k
    MaybeCreateICCCICPTag(c, &tags, &tag_offset, &tag_size, &tagtable,
996
3.22k
                          &offsets);
997
998
3.22k
    Matrix3x3 m;
999
3.22k
    JXL_RETURN_IF_ERROR(CreateICCRGBMatrix(
1000
3.22k
        c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
1001
3.22k
        c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
1002
3.22k
        c.white_point_xy[0], c.white_point_xy[1], m));
1003
3.22k
    Color r{m[0][0], m[1][0], m[2][0]};
1004
3.22k
    Color g{m[0][1], m[1][1], m[2][1]};
1005
3.22k
    Color b{m[0][2], m[1][2], m[2][2]};
1006
1007
3.22k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(r, &tags));
1008
3.21k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1009
3.21k
    AddToICCTagTable("rXYZ", tag_offset, tag_size, &tagtable, &offsets);
1010
1011
3.21k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(g, &tags));
1012
3.21k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1013
3.21k
    AddToICCTagTable("gXYZ", tag_offset, tag_size, &tagtable, &offsets);
1014
1015
3.21k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(b, &tags));
1016
3.21k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1017
3.21k
    AddToICCTagTable("bXYZ", tag_offset, tag_size, &tagtable, &offsets);
1018
3.21k
  }
1019
1020
3.23k
  if (c.color_space == JXL_COLOR_SPACE_XYB) {
1021
3
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForXYB(&tags));
1022
3
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1023
3
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1024
3
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1025
3
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1026
3
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1027
3.23k
  } else if (kEnable3DToneMapping && CanToneMap(c)) {
1028
8
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForHDR(c, &tags));
1029
8
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1030
8
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1031
8
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1032
8
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1033
8
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1034
3.22k
  } else {
1035
3.22k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
1036
19
      float gamma = 1.0 / c.gamma;
1037
19
      JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({gamma}, 0, &tags));
1038
3.20k
    } else if (c.color_space != JXL_COLOR_SPACE_XYB) {
1039
3.20k
      switch (tf) {
1040
13
        case JXL_TRANSFER_FUNCTION_HLG:
1041
13
          CreateICCCurvCurvTag(
1042
13
              CreateTableCurve<64, ExtraTF::kHLG>(CanToneMap(c)), &tags);
1043
13
          break;
1044
8
        case JXL_TRANSFER_FUNCTION_PQ:
1045
8
          CreateICCCurvCurvTag(
1046
8
              CreateTableCurve<64, ExtraTF::kPQ>(CanToneMap(c)), &tags);
1047
8
          break;
1048
3.15k
        case JXL_TRANSFER_FUNCTION_SRGB:
1049
3.15k
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1050
3.15k
              {2.4, 1.0 / 1.055, 0.055 / 1.055, 1.0 / 12.92, 0.04045}, 3,
1051
3.15k
              &tags));
1052
3.15k
          break;
1053
3.15k
        case JXL_TRANSFER_FUNCTION_709:
1054
29
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1055
29
              {1.0 / 0.45, 1.0 / 1.099, 0.099 / 1.099, 1.0 / 4.5, 0.081}, 3,
1056
29
              &tags));
1057
29
          break;
1058
29
        case JXL_TRANSFER_FUNCTION_LINEAR:
1059
5
          JXL_RETURN_IF_ERROR(
1060
5
              CreateICCCurvParaTag({1.0, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1061
5
          break;
1062
5
        case JXL_TRANSFER_FUNCTION_DCI:
1063
3
          JXL_RETURN_IF_ERROR(
1064
3
              CreateICCCurvParaTag({2.6, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1065
3
          break;
1066
3
        default:
1067
3.20k
          return JXL_UNREACHABLE("unknown TF %u",
1068
3.20k
                                 static_cast<unsigned int>(tf));
1069
3.20k
      }
1070
3.20k
    }
1071
3.22k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1072
3.22k
    if (c.color_space == JXL_COLOR_SPACE_GRAY) {
1073
24
      AddToICCTagTable("kTRC", tag_offset, tag_size, &tagtable, &offsets);
1074
3.20k
    } else {
1075
3.20k
      AddToICCTagTable("rTRC", tag_offset, tag_size, &tagtable, &offsets);
1076
3.20k
      AddToICCTagTable("gTRC", tag_offset, tag_size, &tagtable, &offsets);
1077
3.20k
      AddToICCTagTable("bTRC", tag_offset, tag_size, &tagtable, &offsets);
1078
3.20k
    }
1079
3.22k
  }
1080
1081
  // Tag count
1082
3.23k
  WriteICCUint32(offsets.size(), 0, &tagtable);
1083
38.6k
  for (size_t i = 0; i < offsets.size(); i++) {
1084
35.3k
    WriteICCUint32(offsets[i] + header.size() + tagtable.size(), 4 + 12 * i + 4,
1085
35.3k
                   &tagtable);
1086
35.3k
  }
1087
1088
  // ICC profile size
1089
3.23k
  WriteICCUint32(header.size() + tagtable.size() + tags.size(), 0, &header);
1090
1091
3.23k
  *icc = header;
1092
3.23k
  Bytes(tagtable).AppendTo(*icc);
1093
3.23k
  Bytes(tags).AppendTo(*icc);
1094
1095
  // The MD5 checksum must be computed on the profile with profile flags,
1096
  // rendering intent, and region of the checksum itself, set to 0.
1097
  // TODO(lode): manually verify with a reliable tool that this creates correct
1098
  // signature (profile id) for ICC profiles.
1099
3.23k
  std::vector<uint8_t> icc_sum = *icc;
1100
3.23k
  if (icc_sum.size() >= 64 + 4) {
1101
3.23k
    memset(icc_sum.data() + 44, 0, 4);
1102
3.23k
    memset(icc_sum.data() + 64, 0, 4);
1103
3.23k
  }
1104
3.23k
  uint8_t checksum[16];
1105
3.23k
  detail::ICCComputeMD5(icc_sum, checksum);
1106
1107
3.23k
  memcpy(icc->data() + 84, checksum, sizeof(checksum));
1108
1109
3.23k
  return true;
1110
3.23k
}
Unexecuted instantiation: dec_frame.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
925
13.6k
                                     std::vector<uint8_t>* icc) {
926
13.6k
  std::vector<uint8_t> header;
927
13.6k
  std::vector<uint8_t> tagtable;
928
13.6k
  std::vector<uint8_t> tags;
929
13.6k
  JxlTransferFunction tf = c.transfer_function;
930
13.6k
  if (c.color_space == JXL_COLOR_SPACE_UNKNOWN ||
931
13.6k
      tf == JXL_TRANSFER_FUNCTION_UNKNOWN) {
932
0
    return false;  // Not an error
933
0
  }
934
935
13.6k
  switch (c.color_space) {
936
13.6k
    case JXL_COLOR_SPACE_RGB:
937
13.6k
    case JXL_COLOR_SPACE_GRAY:
938
13.6k
    case JXL_COLOR_SPACE_XYB:
939
13.6k
      break;  // OK
940
0
    default:
941
0
      return JXL_FAILURE("Invalid CS %u",
942
13.6k
                         static_cast<unsigned int>(c.color_space));
943
13.6k
  }
944
945
13.6k
  if (c.color_space == JXL_COLOR_SPACE_XYB &&
946
0
      c.rendering_intent != JXL_RENDERING_INTENT_PERCEPTUAL) {
947
0
    return JXL_FAILURE(
948
0
        "Only perceptual rendering intent implemented for XYB "
949
0
        "ICC profile.");
950
0
  }
951
952
13.6k
  JXL_RETURN_IF_ERROR(CreateICCHeader(c, &header));
953
954
13.6k
  std::vector<size_t> offsets;
955
  // tag count, deferred to later
956
13.6k
  WriteICCUint32(0, tagtable.size(), &tagtable);
957
958
13.6k
  size_t tag_offset = 0;
959
13.6k
  size_t tag_size = 0;
960
961
13.6k
  CreateICCMlucTag(ColorEncodingDescriptionImpl(c), &tags);
962
13.6k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
963
13.6k
  AddToICCTagTable("desc", tag_offset, tag_size, &tagtable, &offsets);
964
965
13.6k
  const std::string copyright = "CC0";
966
13.6k
  CreateICCMlucTag(copyright, &tags);
967
13.6k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
968
13.6k
  AddToICCTagTable("cprt", tag_offset, tag_size, &tagtable, &offsets);
969
970
  // TODO(eustas): isn't it the other way round: gray image has d50 WhitePoint?
971
13.6k
  if (c.color_space == JXL_COLOR_SPACE_GRAY) {
972
1
    Color wtpt;
973
1
    JXL_RETURN_IF_ERROR(
974
1
        CIEXYZFromWhiteCIExy(c.white_point_xy[0], c.white_point_xy[1], wtpt));
975
1
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(wtpt, &tags));
976
13.6k
  } else {
977
13.6k
    Color d50{0.964203, 1.0, 0.824905};
978
13.6k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(d50, &tags));
979
13.6k
  }
980
13.6k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
981
13.6k
  AddToICCTagTable("wtpt", tag_offset, tag_size, &tagtable, &offsets);
982
983
13.6k
  if (c.color_space != JXL_COLOR_SPACE_GRAY) {
984
    // Chromatic adaptation matrix
985
13.6k
    Matrix3x3 chad;
986
13.6k
    JXL_RETURN_IF_ERROR(
987
13.6k
        CreateICCChadMatrix(c.white_point_xy[0], c.white_point_xy[1], chad));
988
989
13.6k
    JXL_RETURN_IF_ERROR(CreateICCChadTag(chad, &tags));
990
13.6k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
991
13.6k
    AddToICCTagTable("chad", tag_offset, tag_size, &tagtable, &offsets);
992
13.6k
  }
993
994
13.6k
  if (c.color_space == JXL_COLOR_SPACE_RGB) {
995
13.6k
    MaybeCreateICCCICPTag(c, &tags, &tag_offset, &tag_size, &tagtable,
996
13.6k
                          &offsets);
997
998
13.6k
    Matrix3x3 m;
999
13.6k
    JXL_RETURN_IF_ERROR(CreateICCRGBMatrix(
1000
13.6k
        c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
1001
13.6k
        c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
1002
13.6k
        c.white_point_xy[0], c.white_point_xy[1], m));
1003
13.6k
    Color r{m[0][0], m[1][0], m[2][0]};
1004
13.6k
    Color g{m[0][1], m[1][1], m[2][1]};
1005
13.6k
    Color b{m[0][2], m[1][2], m[2][2]};
1006
1007
13.6k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(r, &tags));
1008
13.6k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1009
13.6k
    AddToICCTagTable("rXYZ", tag_offset, tag_size, &tagtable, &offsets);
1010
1011
13.6k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(g, &tags));
1012
13.6k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1013
13.6k
    AddToICCTagTable("gXYZ", tag_offset, tag_size, &tagtable, &offsets);
1014
1015
13.6k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(b, &tags));
1016
13.6k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1017
13.6k
    AddToICCTagTable("bXYZ", tag_offset, tag_size, &tagtable, &offsets);
1018
13.6k
  }
1019
1020
13.6k
  if (c.color_space == JXL_COLOR_SPACE_XYB) {
1021
0
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForXYB(&tags));
1022
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1023
0
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1024
0
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1025
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1026
0
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1027
13.6k
  } else if (kEnable3DToneMapping && CanToneMap(c)) {
1028
0
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForHDR(c, &tags));
1029
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1030
0
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1031
0
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1032
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1033
0
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1034
13.6k
  } else {
1035
13.6k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
1036
0
      float gamma = 1.0 / c.gamma;
1037
0
      JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({gamma}, 0, &tags));
1038
13.6k
    } else if (c.color_space != JXL_COLOR_SPACE_XYB) {
1039
13.6k
      switch (tf) {
1040
0
        case JXL_TRANSFER_FUNCTION_HLG:
1041
0
          CreateICCCurvCurvTag(
1042
0
              CreateTableCurve<64, ExtraTF::kHLG>(CanToneMap(c)), &tags);
1043
0
          break;
1044
0
        case JXL_TRANSFER_FUNCTION_PQ:
1045
0
          CreateICCCurvCurvTag(
1046
0
              CreateTableCurve<64, ExtraTF::kPQ>(CanToneMap(c)), &tags);
1047
0
          break;
1048
12.1k
        case JXL_TRANSFER_FUNCTION_SRGB:
1049
12.1k
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1050
12.1k
              {2.4, 1.0 / 1.055, 0.055 / 1.055, 1.0 / 12.92, 0.04045}, 3,
1051
12.1k
              &tags));
1052
12.1k
          break;
1053
12.1k
        case JXL_TRANSFER_FUNCTION_709:
1054
1.45k
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1055
1.45k
              {1.0 / 0.45, 1.0 / 1.099, 0.099 / 1.099, 1.0 / 4.5, 0.081}, 3,
1056
1.45k
              &tags));
1057
1.45k
          break;
1058
1.45k
        case JXL_TRANSFER_FUNCTION_LINEAR:
1059
2
          JXL_RETURN_IF_ERROR(
1060
2
              CreateICCCurvParaTag({1.0, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1061
2
          break;
1062
2
        case JXL_TRANSFER_FUNCTION_DCI:
1063
0
          JXL_RETURN_IF_ERROR(
1064
0
              CreateICCCurvParaTag({2.6, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1065
0
          break;
1066
0
        default:
1067
13.6k
          return JXL_UNREACHABLE("unknown TF %u",
1068
13.6k
                                 static_cast<unsigned int>(tf));
1069
13.6k
      }
1070
13.6k
    }
1071
13.6k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1072
13.6k
    if (c.color_space == JXL_COLOR_SPACE_GRAY) {
1073
1
      AddToICCTagTable("kTRC", tag_offset, tag_size, &tagtable, &offsets);
1074
13.6k
    } else {
1075
13.6k
      AddToICCTagTable("rTRC", tag_offset, tag_size, &tagtable, &offsets);
1076
13.6k
      AddToICCTagTable("gTRC", tag_offset, tag_size, &tagtable, &offsets);
1077
13.6k
      AddToICCTagTable("bTRC", tag_offset, tag_size, &tagtable, &offsets);
1078
13.6k
    }
1079
13.6k
  }
1080
1081
  // Tag count
1082
13.6k
  WriteICCUint32(offsets.size(), 0, &tagtable);
1083
163k
  for (size_t i = 0; i < offsets.size(); i++) {
1084
149k
    WriteICCUint32(offsets[i] + header.size() + tagtable.size(), 4 + 12 * i + 4,
1085
149k
                   &tagtable);
1086
149k
  }
1087
1088
  // ICC profile size
1089
13.6k
  WriteICCUint32(header.size() + tagtable.size() + tags.size(), 0, &header);
1090
1091
13.6k
  *icc = header;
1092
13.6k
  Bytes(tagtable).AppendTo(*icc);
1093
13.6k
  Bytes(tags).AppendTo(*icc);
1094
1095
  // The MD5 checksum must be computed on the profile with profile flags,
1096
  // rendering intent, and region of the checksum itself, set to 0.
1097
  // TODO(lode): manually verify with a reliable tool that this creates correct
1098
  // signature (profile id) for ICC profiles.
1099
13.6k
  std::vector<uint8_t> icc_sum = *icc;
1100
13.6k
  if (icc_sum.size() >= 64 + 4) {
1101
13.6k
    memset(icc_sum.data() + 44, 0, 4);
1102
13.6k
    memset(icc_sum.data() + 64, 0, 4);
1103
13.6k
  }
1104
13.6k
  uint8_t checksum[16];
1105
13.6k
  detail::ICCComputeMD5(icc_sum, checksum);
1106
1107
13.6k
  memcpy(icc->data() + 84, checksum, sizeof(checksum));
1108
1109
13.6k
  return true;
1110
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
925
343k
                                     std::vector<uint8_t>* icc) {
926
343k
  std::vector<uint8_t> header;
927
343k
  std::vector<uint8_t> tagtable;
928
343k
  std::vector<uint8_t> tags;
929
343k
  JxlTransferFunction tf = c.transfer_function;
930
343k
  if (c.color_space == JXL_COLOR_SPACE_UNKNOWN ||
931
343k
      tf == JXL_TRANSFER_FUNCTION_UNKNOWN) {
932
0
    return false;  // Not an error
933
0
  }
934
935
343k
  switch (c.color_space) {
936
341k
    case JXL_COLOR_SPACE_RGB:
937
342k
    case JXL_COLOR_SPACE_GRAY:
938
343k
    case JXL_COLOR_SPACE_XYB:
939
343k
      break;  // OK
940
0
    default:
941
0
      return JXL_FAILURE("Invalid CS %u",
942
343k
                         static_cast<unsigned int>(c.color_space));
943
343k
  }
944
945
343k
  if (c.color_space == JXL_COLOR_SPACE_XYB &&
946
792
      c.rendering_intent != JXL_RENDERING_INTENT_PERCEPTUAL) {
947
2
    return JXL_FAILURE(
948
2
        "Only perceptual rendering intent implemented for XYB "
949
2
        "ICC profile.");
950
2
  }
951
952
343k
  JXL_RETURN_IF_ERROR(CreateICCHeader(c, &header));
953
954
343k
  std::vector<size_t> offsets;
955
  // tag count, deferred to later
956
343k
  WriteICCUint32(0, tagtable.size(), &tagtable);
957
958
343k
  size_t tag_offset = 0;
959
343k
  size_t tag_size = 0;
960
961
343k
  CreateICCMlucTag(ColorEncodingDescriptionImpl(c), &tags);
962
343k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
963
343k
  AddToICCTagTable("desc", tag_offset, tag_size, &tagtable, &offsets);
964
965
343k
  const std::string copyright = "CC0";
966
343k
  CreateICCMlucTag(copyright, &tags);
967
343k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
968
343k
  AddToICCTagTable("cprt", tag_offset, tag_size, &tagtable, &offsets);
969
970
  // TODO(eustas): isn't it the other way round: gray image has d50 WhitePoint?
971
343k
  if (c.color_space == JXL_COLOR_SPACE_GRAY) {
972
1.42k
    Color wtpt;
973
1.42k
    JXL_RETURN_IF_ERROR(
974
1.42k
        CIEXYZFromWhiteCIExy(c.white_point_xy[0], c.white_point_xy[1], wtpt));
975
1.42k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(wtpt, &tags));
976
342k
  } else {
977
342k
    Color d50{0.964203, 1.0, 0.824905};
978
342k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(d50, &tags));
979
342k
  }
980
343k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
981
343k
  AddToICCTagTable("wtpt", tag_offset, tag_size, &tagtable, &offsets);
982
983
343k
  if (c.color_space != JXL_COLOR_SPACE_GRAY) {
984
    // Chromatic adaptation matrix
985
342k
    Matrix3x3 chad;
986
342k
    JXL_RETURN_IF_ERROR(
987
342k
        CreateICCChadMatrix(c.white_point_xy[0], c.white_point_xy[1], chad));
988
989
342k
    JXL_RETURN_IF_ERROR(CreateICCChadTag(chad, &tags));
990
342k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
991
342k
    AddToICCTagTable("chad", tag_offset, tag_size, &tagtable, &offsets);
992
342k
  }
993
994
343k
  if (c.color_space == JXL_COLOR_SPACE_RGB) {
995
341k
    MaybeCreateICCCICPTag(c, &tags, &tag_offset, &tag_size, &tagtable,
996
341k
                          &offsets);
997
998
341k
    Matrix3x3 m;
999
341k
    JXL_RETURN_IF_ERROR(CreateICCRGBMatrix(
1000
341k
        c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
1001
341k
        c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
1002
341k
        c.white_point_xy[0], c.white_point_xy[1], m));
1003
341k
    Color r{m[0][0], m[1][0], m[2][0]};
1004
341k
    Color g{m[0][1], m[1][1], m[2][1]};
1005
341k
    Color b{m[0][2], m[1][2], m[2][2]};
1006
1007
341k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(r, &tags));
1008
341k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1009
341k
    AddToICCTagTable("rXYZ", tag_offset, tag_size, &tagtable, &offsets);
1010
1011
341k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(g, &tags));
1012
341k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1013
341k
    AddToICCTagTable("gXYZ", tag_offset, tag_size, &tagtable, &offsets);
1014
1015
341k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(b, &tags));
1016
341k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1017
341k
    AddToICCTagTable("bXYZ", tag_offset, tag_size, &tagtable, &offsets);
1018
341k
  }
1019
1020
343k
  if (c.color_space == JXL_COLOR_SPACE_XYB) {
1021
790
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForXYB(&tags));
1022
790
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1023
790
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1024
790
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1025
790
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1026
790
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1027
342k
  } else if (kEnable3DToneMapping && CanToneMap(c)) {
1028
12.2k
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForHDR(c, &tags));
1029
12.2k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1030
12.2k
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1031
12.2k
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1032
12.2k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1033
12.2k
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1034
330k
  } else {
1035
330k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
1036
2.03k
      float gamma = 1.0 / c.gamma;
1037
2.03k
      JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({gamma}, 0, &tags));
1038
328k
    } else if (c.color_space != JXL_COLOR_SPACE_XYB) {
1039
328k
      switch (tf) {
1040
1.44k
        case JXL_TRANSFER_FUNCTION_HLG:
1041
1.44k
          CreateICCCurvCurvTag(
1042
1.44k
              CreateTableCurve<64, ExtraTF::kHLG>(CanToneMap(c)), &tags);
1043
1.44k
          break;
1044
735
        case JXL_TRANSFER_FUNCTION_PQ:
1045
735
          CreateICCCurvCurvTag(
1046
735
              CreateTableCurve<64, ExtraTF::kPQ>(CanToneMap(c)), &tags);
1047
735
          break;
1048
325k
        case JXL_TRANSFER_FUNCTION_SRGB:
1049
325k
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1050
325k
              {2.4, 1.0 / 1.055, 0.055 / 1.055, 1.0 / 12.92, 0.04045}, 3,
1051
325k
              &tags));
1052
325k
          break;
1053
325k
        case JXL_TRANSFER_FUNCTION_709:
1054
442
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1055
442
              {1.0 / 0.45, 1.0 / 1.099, 0.099 / 1.099, 1.0 / 4.5, 0.081}, 3,
1056
442
              &tags));
1057
442
          break;
1058
442
        case JXL_TRANSFER_FUNCTION_LINEAR:
1059
91
          JXL_RETURN_IF_ERROR(
1060
91
              CreateICCCurvParaTag({1.0, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1061
91
          break;
1062
225
        case JXL_TRANSFER_FUNCTION_DCI:
1063
225
          JXL_RETURN_IF_ERROR(
1064
225
              CreateICCCurvParaTag({2.6, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1065
225
          break;
1066
225
        default:
1067
328k
          return JXL_UNREACHABLE("unknown TF %u",
1068
328k
                                 static_cast<unsigned int>(tf));
1069
328k
      }
1070
328k
    }
1071
330k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1072
330k
    if (c.color_space == JXL_COLOR_SPACE_GRAY) {
1073
1.41k
      AddToICCTagTable("kTRC", tag_offset, tag_size, &tagtable, &offsets);
1074
329k
    } else {
1075
329k
      AddToICCTagTable("rTRC", tag_offset, tag_size, &tagtable, &offsets);
1076
329k
      AddToICCTagTable("gTRC", tag_offset, tag_size, &tagtable, &offsets);
1077
329k
      AddToICCTagTable("bTRC", tag_offset, tag_size, &tagtable, &offsets);
1078
329k
    }
1079
330k
  }
1080
1081
  // Tag count
1082
343k
  WriteICCUint32(offsets.size(), 0, &tagtable);
1083
4.09M
  for (size_t i = 0; i < offsets.size(); i++) {
1084
3.75M
    WriteICCUint32(offsets[i] + header.size() + tagtable.size(), 4 + 12 * i + 4,
1085
3.75M
                   &tagtable);
1086
3.75M
  }
1087
1088
  // ICC profile size
1089
343k
  WriteICCUint32(header.size() + tagtable.size() + tags.size(), 0, &header);
1090
1091
343k
  *icc = header;
1092
343k
  Bytes(tagtable).AppendTo(*icc);
1093
343k
  Bytes(tags).AppendTo(*icc);
1094
1095
  // The MD5 checksum must be computed on the profile with profile flags,
1096
  // rendering intent, and region of the checksum itself, set to 0.
1097
  // TODO(lode): manually verify with a reliable tool that this creates correct
1098
  // signature (profile id) for ICC profiles.
1099
343k
  std::vector<uint8_t> icc_sum = *icc;
1100
343k
  if (icc_sum.size() >= 64 + 4) {
1101
343k
    memset(icc_sum.data() + 44, 0, 4);
1102
343k
    memset(icc_sum.data() + 64, 0, 4);
1103
343k
  }
1104
343k
  uint8_t checksum[16];
1105
343k
  detail::ICCComputeMD5(icc_sum, checksum);
1106
1107
343k
  memcpy(icc->data() + 84, checksum, sizeof(checksum));
1108
1109
343k
  return true;
1110
343k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
925
48.4k
                                     std::vector<uint8_t>* icc) {
926
48.4k
  std::vector<uint8_t> header;
927
48.4k
  std::vector<uint8_t> tagtable;
928
48.4k
  std::vector<uint8_t> tags;
929
48.4k
  JxlTransferFunction tf = c.transfer_function;
930
48.4k
  if (c.color_space == JXL_COLOR_SPACE_UNKNOWN ||
931
48.4k
      tf == JXL_TRANSFER_FUNCTION_UNKNOWN) {
932
0
    return false;  // Not an error
933
0
  }
934
935
48.4k
  switch (c.color_space) {
936
46.3k
    case JXL_COLOR_SPACE_RGB:
937
48.4k
    case JXL_COLOR_SPACE_GRAY:
938
48.4k
    case JXL_COLOR_SPACE_XYB:
939
48.4k
      break;  // OK
940
0
    default:
941
0
      return JXL_FAILURE("Invalid CS %u",
942
48.4k
                         static_cast<unsigned int>(c.color_space));
943
48.4k
  }
944
945
48.4k
  if (c.color_space == JXL_COLOR_SPACE_XYB &&
946
0
      c.rendering_intent != JXL_RENDERING_INTENT_PERCEPTUAL) {
947
0
    return JXL_FAILURE(
948
0
        "Only perceptual rendering intent implemented for XYB "
949
0
        "ICC profile.");
950
0
  }
951
952
48.4k
  JXL_RETURN_IF_ERROR(CreateICCHeader(c, &header));
953
954
48.4k
  std::vector<size_t> offsets;
955
  // tag count, deferred to later
956
48.4k
  WriteICCUint32(0, tagtable.size(), &tagtable);
957
958
48.4k
  size_t tag_offset = 0;
959
48.4k
  size_t tag_size = 0;
960
961
48.4k
  CreateICCMlucTag(ColorEncodingDescriptionImpl(c), &tags);
962
48.4k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
963
48.4k
  AddToICCTagTable("desc", tag_offset, tag_size, &tagtable, &offsets);
964
965
48.4k
  const std::string copyright = "CC0";
966
48.4k
  CreateICCMlucTag(copyright, &tags);
967
48.4k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
968
48.4k
  AddToICCTagTable("cprt", tag_offset, tag_size, &tagtable, &offsets);
969
970
  // TODO(eustas): isn't it the other way round: gray image has d50 WhitePoint?
971
48.4k
  if (c.color_space == JXL_COLOR_SPACE_GRAY) {
972
2.09k
    Color wtpt;
973
2.09k
    JXL_RETURN_IF_ERROR(
974
2.09k
        CIEXYZFromWhiteCIExy(c.white_point_xy[0], c.white_point_xy[1], wtpt));
975
2.09k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(wtpt, &tags));
976
46.3k
  } else {
977
46.3k
    Color d50{0.964203, 1.0, 0.824905};
978
46.3k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(d50, &tags));
979
46.3k
  }
980
48.4k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
981
48.4k
  AddToICCTagTable("wtpt", tag_offset, tag_size, &tagtable, &offsets);
982
983
48.4k
  if (c.color_space != JXL_COLOR_SPACE_GRAY) {
984
    // Chromatic adaptation matrix
985
46.3k
    Matrix3x3 chad;
986
46.3k
    JXL_RETURN_IF_ERROR(
987
46.3k
        CreateICCChadMatrix(c.white_point_xy[0], c.white_point_xy[1], chad));
988
989
46.3k
    JXL_RETURN_IF_ERROR(CreateICCChadTag(chad, &tags));
990
46.3k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
991
46.3k
    AddToICCTagTable("chad", tag_offset, tag_size, &tagtable, &offsets);
992
46.3k
  }
993
994
48.4k
  if (c.color_space == JXL_COLOR_SPACE_RGB) {
995
46.3k
    MaybeCreateICCCICPTag(c, &tags, &tag_offset, &tag_size, &tagtable,
996
46.3k
                          &offsets);
997
998
46.3k
    Matrix3x3 m;
999
46.3k
    JXL_RETURN_IF_ERROR(CreateICCRGBMatrix(
1000
46.3k
        c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
1001
46.3k
        c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
1002
46.3k
        c.white_point_xy[0], c.white_point_xy[1], m));
1003
46.3k
    Color r{m[0][0], m[1][0], m[2][0]};
1004
46.3k
    Color g{m[0][1], m[1][1], m[2][1]};
1005
46.3k
    Color b{m[0][2], m[1][2], m[2][2]};
1006
1007
46.3k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(r, &tags));
1008
46.3k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1009
46.3k
    AddToICCTagTable("rXYZ", tag_offset, tag_size, &tagtable, &offsets);
1010
1011
46.3k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(g, &tags));
1012
46.3k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1013
46.3k
    AddToICCTagTable("gXYZ", tag_offset, tag_size, &tagtable, &offsets);
1014
1015
46.3k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(b, &tags));
1016
46.3k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1017
46.3k
    AddToICCTagTable("bXYZ", tag_offset, tag_size, &tagtable, &offsets);
1018
46.3k
  }
1019
1020
48.4k
  if (c.color_space == JXL_COLOR_SPACE_XYB) {
1021
0
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForXYB(&tags));
1022
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1023
0
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1024
0
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1025
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1026
0
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1027
48.4k
  } else if (kEnable3DToneMapping && CanToneMap(c)) {
1028
0
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForHDR(c, &tags));
1029
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1030
0
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1031
0
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1032
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1033
0
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1034
48.4k
  } else {
1035
48.4k
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
1036
0
      float gamma = 1.0 / c.gamma;
1037
0
      JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({gamma}, 0, &tags));
1038
48.4k
    } else if (c.color_space != JXL_COLOR_SPACE_XYB) {
1039
48.4k
      switch (tf) {
1040
0
        case JXL_TRANSFER_FUNCTION_HLG:
1041
0
          CreateICCCurvCurvTag(
1042
0
              CreateTableCurve<64, ExtraTF::kHLG>(CanToneMap(c)), &tags);
1043
0
          break;
1044
0
        case JXL_TRANSFER_FUNCTION_PQ:
1045
0
          CreateICCCurvCurvTag(
1046
0
              CreateTableCurve<64, ExtraTF::kPQ>(CanToneMap(c)), &tags);
1047
0
          break;
1048
48.4k
        case JXL_TRANSFER_FUNCTION_SRGB:
1049
48.4k
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1050
48.4k
              {2.4, 1.0 / 1.055, 0.055 / 1.055, 1.0 / 12.92, 0.04045}, 3,
1051
48.4k
              &tags));
1052
48.4k
          break;
1053
48.4k
        case JXL_TRANSFER_FUNCTION_709:
1054
0
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1055
0
              {1.0 / 0.45, 1.0 / 1.099, 0.099 / 1.099, 1.0 / 4.5, 0.081}, 3,
1056
0
              &tags));
1057
0
          break;
1058
2
        case JXL_TRANSFER_FUNCTION_LINEAR:
1059
2
          JXL_RETURN_IF_ERROR(
1060
2
              CreateICCCurvParaTag({1.0, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1061
2
          break;
1062
2
        case JXL_TRANSFER_FUNCTION_DCI:
1063
0
          JXL_RETURN_IF_ERROR(
1064
0
              CreateICCCurvParaTag({2.6, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1065
0
          break;
1066
0
        default:
1067
48.4k
          return JXL_UNREACHABLE("unknown TF %u",
1068
48.4k
                                 static_cast<unsigned int>(tf));
1069
48.4k
      }
1070
48.4k
    }
1071
48.4k
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1072
48.4k
    if (c.color_space == JXL_COLOR_SPACE_GRAY) {
1073
2.09k
      AddToICCTagTable("kTRC", tag_offset, tag_size, &tagtable, &offsets);
1074
46.3k
    } else {
1075
46.3k
      AddToICCTagTable("rTRC", tag_offset, tag_size, &tagtable, &offsets);
1076
46.3k
      AddToICCTagTable("gTRC", tag_offset, tag_size, &tagtable, &offsets);
1077
46.3k
      AddToICCTagTable("bTRC", tag_offset, tag_size, &tagtable, &offsets);
1078
46.3k
    }
1079
48.4k
  }
1080
1081
  // Tag count
1082
48.4k
  WriteICCUint32(offsets.size(), 0, &tagtable);
1083
567k
  for (size_t i = 0; i < offsets.size(); i++) {
1084
518k
    WriteICCUint32(offsets[i] + header.size() + tagtable.size(), 4 + 12 * i + 4,
1085
518k
                   &tagtable);
1086
518k
  }
1087
1088
  // ICC profile size
1089
48.4k
  WriteICCUint32(header.size() + tagtable.size() + tags.size(), 0, &header);
1090
1091
48.4k
  *icc = header;
1092
48.4k
  Bytes(tagtable).AppendTo(*icc);
1093
48.4k
  Bytes(tags).AppendTo(*icc);
1094
1095
  // The MD5 checksum must be computed on the profile with profile flags,
1096
  // rendering intent, and region of the checksum itself, set to 0.
1097
  // TODO(lode): manually verify with a reliable tool that this creates correct
1098
  // signature (profile id) for ICC profiles.
1099
48.4k
  std::vector<uint8_t> icc_sum = *icc;
1100
48.4k
  if (icc_sum.size() >= 64 + 4) {
1101
48.4k
    memset(icc_sum.data() + 44, 0, 4);
1102
48.4k
    memset(icc_sum.data() + 64, 0, 4);
1103
48.4k
  }
1104
48.4k
  uint8_t checksum[16];
1105
48.4k
  detail::ICCComputeMD5(icc_sum, checksum);
1106
1107
48.4k
  memcpy(icc->data() + 84, checksum, sizeof(checksum));
1108
1109
48.4k
  return true;
1110
48.4k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
925
1.56k
                                     std::vector<uint8_t>* icc) {
926
1.56k
  std::vector<uint8_t> header;
927
1.56k
  std::vector<uint8_t> tagtable;
928
1.56k
  std::vector<uint8_t> tags;
929
1.56k
  JxlTransferFunction tf = c.transfer_function;
930
1.56k
  if (c.color_space == JXL_COLOR_SPACE_UNKNOWN ||
931
1.42k
      tf == JXL_TRANSFER_FUNCTION_UNKNOWN) {
932
142
    return false;  // Not an error
933
142
  }
934
935
1.42k
  switch (c.color_space) {
936
1.06k
    case JXL_COLOR_SPACE_RGB:
937
1.42k
    case JXL_COLOR_SPACE_GRAY:
938
1.42k
    case JXL_COLOR_SPACE_XYB:
939
1.42k
      break;  // OK
940
0
    default:
941
0
      return JXL_FAILURE("Invalid CS %u",
942
1.42k
                         static_cast<unsigned int>(c.color_space));
943
1.42k
  }
944
945
1.42k
  if (c.color_space == JXL_COLOR_SPACE_XYB &&
946
0
      c.rendering_intent != JXL_RENDERING_INTENT_PERCEPTUAL) {
947
0
    return JXL_FAILURE(
948
0
        "Only perceptual rendering intent implemented for XYB "
949
0
        "ICC profile.");
950
0
  }
951
952
1.42k
  JXL_RETURN_IF_ERROR(CreateICCHeader(c, &header));
953
954
1.42k
  std::vector<size_t> offsets;
955
  // tag count, deferred to later
956
1.42k
  WriteICCUint32(0, tagtable.size(), &tagtable);
957
958
1.42k
  size_t tag_offset = 0;
959
1.42k
  size_t tag_size = 0;
960
961
1.42k
  CreateICCMlucTag(ColorEncodingDescriptionImpl(c), &tags);
962
1.42k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
963
1.42k
  AddToICCTagTable("desc", tag_offset, tag_size, &tagtable, &offsets);
964
965
1.42k
  const std::string copyright = "CC0";
966
1.42k
  CreateICCMlucTag(copyright, &tags);
967
1.42k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
968
1.42k
  AddToICCTagTable("cprt", tag_offset, tag_size, &tagtable, &offsets);
969
970
  // TODO(eustas): isn't it the other way round: gray image has d50 WhitePoint?
971
1.42k
  if (c.color_space == JXL_COLOR_SPACE_GRAY) {
972
360
    Color wtpt;
973
360
    JXL_RETURN_IF_ERROR(
974
360
        CIEXYZFromWhiteCIExy(c.white_point_xy[0], c.white_point_xy[1], wtpt));
975
360
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(wtpt, &tags));
976
1.06k
  } else {
977
1.06k
    Color d50{0.964203, 1.0, 0.824905};
978
1.06k
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(d50, &tags));
979
1.06k
  }
980
1.42k
  FinalizeICCTag(&tags, &tag_offset, &tag_size);
981
1.42k
  AddToICCTagTable("wtpt", tag_offset, tag_size, &tagtable, &offsets);
982
983
1.42k
  if (c.color_space != JXL_COLOR_SPACE_GRAY) {
984
    // Chromatic adaptation matrix
985
1.06k
    Matrix3x3 chad;
986
1.06k
    JXL_RETURN_IF_ERROR(
987
1.06k
        CreateICCChadMatrix(c.white_point_xy[0], c.white_point_xy[1], chad));
988
989
854
    JXL_RETURN_IF_ERROR(CreateICCChadTag(chad, &tags));
990
847
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
991
847
    AddToICCTagTable("chad", tag_offset, tag_size, &tagtable, &offsets);
992
847
  }
993
994
1.20k
  if (c.color_space == JXL_COLOR_SPACE_RGB) {
995
847
    MaybeCreateICCCICPTag(c, &tags, &tag_offset, &tag_size, &tagtable,
996
847
                          &offsets);
997
998
847
    Matrix3x3 m;
999
847
    JXL_RETURN_IF_ERROR(CreateICCRGBMatrix(
1000
847
        c.primaries_red_xy[0], c.primaries_red_xy[1], c.primaries_green_xy[0],
1001
847
        c.primaries_green_xy[1], c.primaries_blue_xy[0], c.primaries_blue_xy[1],
1002
847
        c.white_point_xy[0], c.white_point_xy[1], m));
1003
762
    Color r{m[0][0], m[1][0], m[2][0]};
1004
762
    Color g{m[0][1], m[1][1], m[2][1]};
1005
762
    Color b{m[0][2], m[1][2], m[2][2]};
1006
1007
762
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(r, &tags));
1008
626
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1009
626
    AddToICCTagTable("rXYZ", tag_offset, tag_size, &tagtable, &offsets);
1010
1011
626
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(g, &tags));
1012
588
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1013
588
    AddToICCTagTable("gXYZ", tag_offset, tag_size, &tagtable, &offsets);
1014
1015
588
    JXL_RETURN_IF_ERROR(CreateICCXYZTag(b, &tags));
1016
576
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1017
576
    AddToICCTagTable("bXYZ", tag_offset, tag_size, &tagtable, &offsets);
1018
576
  }
1019
1020
936
  if (c.color_space == JXL_COLOR_SPACE_XYB) {
1021
0
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForXYB(&tags));
1022
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1023
0
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1024
0
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1025
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1026
0
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1027
936
  } else if (kEnable3DToneMapping && CanToneMap(c)) {
1028
0
    JXL_RETURN_IF_ERROR(CreateICCLutAtoBTagForHDR(c, &tags));
1029
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1030
0
    AddToICCTagTable("A2B0", tag_offset, tag_size, &tagtable, &offsets);
1031
0
    JXL_RETURN_IF_ERROR(CreateICCNoOpBToATag(&tags));
1032
0
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1033
0
    AddToICCTagTable("B2A0", tag_offset, tag_size, &tagtable, &offsets);
1034
936
  } else {
1035
936
    if (tf == JXL_TRANSFER_FUNCTION_GAMMA) {
1036
21
      float gamma = 1.0 / c.gamma;
1037
21
      JXL_RETURN_IF_ERROR(CreateICCCurvParaTag({gamma}, 0, &tags));
1038
915
    } else if (c.color_space != JXL_COLOR_SPACE_XYB) {
1039
915
      switch (tf) {
1040
92
        case JXL_TRANSFER_FUNCTION_HLG:
1041
92
          CreateICCCurvCurvTag(
1042
92
              CreateTableCurve<64, ExtraTF::kHLG>(CanToneMap(c)), &tags);
1043
92
          break;
1044
92
        case JXL_TRANSFER_FUNCTION_PQ:
1045
92
          CreateICCCurvCurvTag(
1046
92
              CreateTableCurve<64, ExtraTF::kPQ>(CanToneMap(c)), &tags);
1047
92
          break;
1048
164
        case JXL_TRANSFER_FUNCTION_SRGB:
1049
164
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1050
164
              {2.4, 1.0 / 1.055, 0.055 / 1.055, 1.0 / 12.92, 0.04045}, 3,
1051
164
              &tags));
1052
164
          break;
1053
164
        case JXL_TRANSFER_FUNCTION_709:
1054
164
          JXL_RETURN_IF_ERROR(CreateICCCurvParaTag(
1055
164
              {1.0 / 0.45, 1.0 / 1.099, 0.099 / 1.099, 1.0 / 4.5, 0.081}, 3,
1056
164
              &tags));
1057
164
          break;
1058
311
        case JXL_TRANSFER_FUNCTION_LINEAR:
1059
311
          JXL_RETURN_IF_ERROR(
1060
311
              CreateICCCurvParaTag({1.0, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1061
311
          break;
1062
311
        case JXL_TRANSFER_FUNCTION_DCI:
1063
92
          JXL_RETURN_IF_ERROR(
1064
92
              CreateICCCurvParaTag({2.6, 1.0, 0.0, 1.0, 0.0}, 3, &tags));
1065
92
          break;
1066
92
        default:
1067
915
          return JXL_UNREACHABLE("unknown TF %u",
1068
915
                                 static_cast<unsigned int>(tf));
1069
915
      }
1070
915
    }
1071
936
    FinalizeICCTag(&tags, &tag_offset, &tag_size);
1072
936
    if (c.color_space == JXL_COLOR_SPACE_GRAY) {
1073
360
      AddToICCTagTable("kTRC", tag_offset, tag_size, &tagtable, &offsets);
1074
576
    } else {
1075
576
      AddToICCTagTable("rTRC", tag_offset, tag_size, &tagtable, &offsets);
1076
576
      AddToICCTagTable("gTRC", tag_offset, tag_size, &tagtable, &offsets);
1077
576
      AddToICCTagTable("bTRC", tag_offset, tag_size, &tagtable, &offsets);
1078
576
    }
1079
936
  }
1080
1081
  // Tag count
1082
936
  WriteICCUint32(offsets.size(), 0, &tagtable);
1083
8.13k
  for (size_t i = 0; i < offsets.size(); i++) {
1084
7.20k
    WriteICCUint32(offsets[i] + header.size() + tagtable.size(), 4 + 12 * i + 4,
1085
7.20k
                   &tagtable);
1086
7.20k
  }
1087
1088
  // ICC profile size
1089
936
  WriteICCUint32(header.size() + tagtable.size() + tags.size(), 0, &header);
1090
1091
936
  *icc = header;
1092
936
  Bytes(tagtable).AppendTo(*icc);
1093
936
  Bytes(tags).AppendTo(*icc);
1094
1095
  // The MD5 checksum must be computed on the profile with profile flags,
1096
  // rendering intent, and region of the checksum itself, set to 0.
1097
  // TODO(lode): manually verify with a reliable tool that this creates correct
1098
  // signature (profile id) for ICC profiles.
1099
936
  std::vector<uint8_t> icc_sum = *icc;
1100
936
  if (icc_sum.size() >= 64 + 4) {
1101
936
    memset(icc_sum.data() + 44, 0, 4);
1102
936
    memset(icc_sum.data() + 64, 0, 4);
1103
936
  }
1104
936
  uint8_t checksum[16];
1105
936
  detail::ICCComputeMD5(icc_sum, checksum);
1106
1107
936
  memcpy(icc->data() + 84, checksum, sizeof(checksum));
1108
1109
936
  return true;
1110
936
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::detail::MaybeCreateProfileImpl(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
1111
1112
}  // namespace detail
1113
1114
// Returns a representation of the ColorEncoding fields (not icc).
1115
// Example description: "RGB_D65_SRG_Rel_Lin"
1116
static JXL_MAYBE_UNUSED std::string ColorEncodingDescription(
1117
0
    const JxlColorEncoding& c) {
1118
0
  return detail::ColorEncodingDescriptionImpl(c);
1119
0
}
Unexecuted instantiation: enc_ans.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_fields.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_lz77.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: decode.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: frame_header.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: image_metadata.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: quant_weights.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: color_encoding_internal.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: dec_frame.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: dec_group.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: dec_modular.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: dec_noise.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: dec_xyb.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: epf.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: passes_state.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: render_pipeline.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_upsampling.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: blending.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: compressed_dc.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: dec_cache.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_blending.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_cms.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_epf.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_from_linear.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_gaborish.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_noise.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_patches.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_splines.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_spot.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_to_linear.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_write.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_xyb.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: stage_ycbcr.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: image_bundle.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: test_image.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: test_utils.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: metrics.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: packed_image_convert.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_comparator.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_external_image.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_frame.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_group.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_heuristics.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_image_bundle.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_modular.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_progressive_split.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_quant_weights.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_xyb.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: encode.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_jpeg_data.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_encoding.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: dec_external_image.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: luminance.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_cache.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_debug_image.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: enc_detect_dots.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: jxl_cms.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: codec.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
Unexecuted instantiation: fields_fuzzer.cc:jxl::ColorEncodingDescription(JxlColorEncoding const&)
1120
1121
// NOTE: for XYB colorspace, the created profile can be used to transform a
1122
// *scaled* XYB image (created by ScaleXYB()) to another colorspace.
1123
static JXL_MAYBE_UNUSED Status MaybeCreateProfile(const JxlColorEncoding& c,
1124
839k
                                                  std::vector<uint8_t>* icc) {
1125
839k
  return detail::MaybeCreateProfileImpl(c, icc);
1126
839k
}
Unexecuted instantiation: enc_ans.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fields.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_lz77.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
decode.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
1124
428k
                                                  std::vector<uint8_t>* icc) {
1125
428k
  return detail::MaybeCreateProfileImpl(c, icc);
1126
428k
}
Unexecuted instantiation: frame_header.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_metadata.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: quant_weights.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: decode_to_jpeg.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
color_encoding_internal.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
1124
3.28k
                                                  std::vector<uint8_t>* icc) {
1125
3.28k
  return detail::MaybeCreateProfileImpl(c, icc);
1126
3.28k
}
Unexecuted instantiation: dec_frame.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_group.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_modular.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_noise.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_patch_dictionary.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_xyb.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: epf.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: passes_state.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: simple_render_pipeline.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_upsampling.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: blending.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: compressed_dc.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_cache.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: render_pipeline_stage.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_blending.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_cms.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_epf.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_from_linear.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_gaborish.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_noise.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_patches.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_splines.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_spot.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_to_linear.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_tone_mapping.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_write.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_xyb.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: stage_ycbcr.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: image_bundle.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
test_image.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
1124
13.6k
                                                  std::vector<uint8_t>* icc) {
1125
13.6k
  return detail::MaybeCreateProfileImpl(c, icc);
1126
13.6k
}
Unexecuted instantiation: test_utils.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: metrics.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
packed_image_convert.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
1124
343k
                                                  std::vector<uint8_t>* icc) {
1125
343k
  return detail::MaybeCreateProfileImpl(c, icc);
1126
343k
}
Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_comparator.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_external_image.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_frame.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_group.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_heuristics.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_image_bundle.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_modular.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_progressive_split.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_quant_weights.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_xyb.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
encode.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
1124
48.4k
                                                  std::vector<uint8_t>* icc) {
1125
48.4k
  return detail::MaybeCreateProfileImpl(c, icc);
1126
48.4k
}
Unexecuted instantiation: enc_jpeg_data.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_encoding.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: dec_external_image.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: luminance.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_cache.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_debug_image.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_entropy_coder.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: enc_detect_dots.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
jxl_cms.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Line
Count
Source
1124
1.56k
                                                  std::vector<uint8_t>* icc) {
1125
1.56k
  return detail::MaybeCreateProfileImpl(c, icc);
1126
1.56k
}
Unexecuted instantiation: set_from_bytes_fuzzer.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: codec.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
Unexecuted instantiation: fields_fuzzer.cc:jxl::MaybeCreateProfile(JxlColorEncoding const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*)
1127
1128
}  // namespace jxl
1129
1130
#endif  // LIB_JXL_CMS_JXL_CMS_INTERNAL_H_