diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/jpeg-xl/lib/jxl/enc_aux_out.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/enc_aux_out.cc')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/enc_aux_out.cc | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/enc_aux_out.cc b/third_party/jpeg-xl/lib/jxl/enc_aux_out.cc index 12c8619e91..d529b381f8 100644 --- a/third_party/jpeg-xl/lib/jxl/enc_aux_out.cc +++ b/third_party/jpeg-xl/lib/jxl/enc_aux_out.cc @@ -5,16 +5,10 @@ #include "lib/jxl/enc_aux_out.h" -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS -#endif - #include <inttypes.h> #include <stddef.h> #include <stdint.h> -#include <algorithm> -#include <numeric> // accumulate #include <sstream> #include "lib/jxl/base/printf_macros.h" @@ -61,13 +55,11 @@ const char* LayerName(size_t layer) { void AuxOut::LayerTotals::Print(size_t num_inputs) const { if (JXL_DEBUG_V_LEVEL > 0) { - printf("%10" PRId64, static_cast<int64_t>(total_bits)); + printf("%10" PRIuS, total_bits); if (histogram_bits != 0) { - printf(" [c/i:%6.2f | hst:%8" PRId64 " | ex:%8" PRId64 - " | h+c+e:%12.3f", - num_clustered_histograms * 1.0 / num_inputs, - static_cast<int64_t>(histogram_bits >> 3), - static_cast<int64_t>(extra_bits >> 3), + printf(" [c/i:%6.2f | hst:%8" PRIuS " | ex:%8" PRIuS " | h+c+e:%12.3f", + num_clustered_histograms * 1.0 / num_inputs, histogram_bits >> 3, + extra_bits >> 3, (histogram_bits + clustered_entropy + extra_bits) / 8.0); printf("]"); } @@ -99,8 +91,8 @@ void AuxOut::Print(size_t num_inputs) const { if (num_inputs == 0) return; LayerTotals all_layers; - for (size_t i = 0; i < layers.size(); ++i) { - all_layers.Assimilate(layers[i]); + for (const auto& layer : layers) { + all_layers.Assimilate(layer); } printf("Average butteraugli iters: %10.2f\n", |