Coverage Report

Created: 2025-11-16 07:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libjxl/lib/jxl/base/override.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_BASE_OVERRIDE_H_
7
#define LIB_JXL_BASE_OVERRIDE_H_
8
9
#include <cstdint>
10
11
// 'Trool' for command line arguments: force enable/disable, or use default.
12
13
namespace jxl {
14
15
// No effect if kDefault, otherwise forces a feature (typically a FrameHeader
16
// flag) on or off.
17
enum class Override : int8_t { kOn = 1, kOff = 0, kDefault = -1 };
18
19
0
static inline Override OverrideFromBool(bool flag) {
20
0
  return flag ? Override::kOn : Override::kOff;
21
0
}
Unexecuted instantiation: encode.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_jpeg_data.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_frame.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_group.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_heuristics.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_modular.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_patch_dictionary.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_quant_weights.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_ans.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_cache.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_debug_image.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_lz77.cc:jxl::OverrideFromBool(bool)
Unexecuted instantiation: enc_detect_dots.cc:jxl::OverrideFromBool(bool)
22
23
30.1k
static inline bool ApplyOverride(Override o, bool default_condition) {
24
30.1k
  if (o == Override::kOn) return true;
25
30.1k
  if (o == Override::kOff) return false;
26
24.4k
  return default_condition;
27
30.1k
}
Unexecuted instantiation: encode.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_jpeg_data.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_fast_lossless.cc:jxl::ApplyOverride(jxl::Override, bool)
enc_frame.cc:jxl::ApplyOverride(jxl::Override, bool)
Line
Count
Source
23
19.7k
static inline bool ApplyOverride(Override o, bool default_condition) {
24
19.7k
  if (o == Override::kOn) return true;
25
19.7k
  if (o == Override::kOff) return false;
26
15.3k
  return default_condition;
27
19.7k
}
Unexecuted instantiation: enc_group.cc:jxl::ApplyOverride(jxl::Override, bool)
enc_heuristics.cc:jxl::ApplyOverride(jxl::Override, bool)
Line
Count
Source
23
3.48k
static inline bool ApplyOverride(Override o, bool default_condition) {
24
3.48k
  if (o == Override::kOn) return true;
25
3.48k
  if (o == Override::kOff) return false;
26
3.48k
  return default_condition;
27
3.48k
}
Unexecuted instantiation: enc_modular.cc:jxl::ApplyOverride(jxl::Override, bool)
enc_patch_dictionary.cc:jxl::ApplyOverride(jxl::Override, bool)
Line
Count
Source
23
6.96k
static inline bool ApplyOverride(Override o, bool default_condition) {
24
6.96k
  if (o == Override::kOn) return true;
25
6.96k
  if (o == Override::kOff) return false;
26
5.53k
  return default_condition;
27
6.96k
}
Unexecuted instantiation: enc_quant_weights.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_ac_strategy.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_ans.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_cache.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_debug_image.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_dot_dictionary.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_lz77.cc:jxl::ApplyOverride(jxl::Override, bool)
Unexecuted instantiation: enc_detect_dots.cc:jxl::ApplyOverride(jxl::Override, bool)
28
29
}  // namespace jxl
30
31
#endif  // LIB_JXL_BASE_OVERRIDE_H_