summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h b/third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h
index 7bec5128fc..df54a9425e 100644
--- a/third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h
+++ b/third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h
@@ -63,7 +63,7 @@ struct State {
pixel_type_w pred = 0; // *before* removing the added bits.
std::vector<uint32_t> pred_errors[kNumPredictors];
std::vector<int32_t> error;
- const Header header;
+ const Header &header;
// Allows to approximate division by a number from 1 to 64.
// for (int i = 0; i < 64; i++) divlookup[i] = (1 << 24) / (i + 1);
@@ -82,7 +82,7 @@ struct State {
return static_cast<uint64_t>(x) << kPredExtraBits;
}
- State(Header header, size_t xsize, size_t ysize) : header(header) {
+ State(const Header &header, size_t xsize, size_t ysize) : header(header) {
// Extra margin to avoid out-of-bounds writes.
// All have space for two rows of data.
for (auto &pred_error : pred_errors) {