From 2061cfc54e6ba856708290a46b7ef9710b307591 Mon Sep 17 00:00:00 2001 From: Simon Segerblom Rex Date: Thu, 22 Apr 2021 14:35:32 +0200 Subject: [PATCH] Fix predictor modes 2-7 for lossless JPEG Predictor modes 2-7 were broken. I just copy-pasted this line from dcraw.c After this fix it should be possible to remove lj92 (the lib + lossless_dnglj92_load_raw) and always use lossless_dng_load_raw. --- rtengine/dcraw.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 275b35d81..144fcd0ee 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -923,7 +923,7 @@ ushort * CLASS ljpeg_row (int jrow, struct jhead *jh) } getbits(-1); } - FORC3 row[c] = (jh->row + ((jrow & 1) + 1) * (jh->wide*jh->clrs*((jrow+c) & 1))); + FORC3 row[c] = jh->row + jh->wide*jh->clrs*((jrow+c) & 1); for (col=0; col < jh->wide; col++) FORC(jh->clrs) { diff = ljpeg_diff (jh->huff[c]); @@ -9078,7 +9078,7 @@ void CLASS adobe_coeff (const char *make, const char *model) RT_matrix_from_constant = ThreeValBool::T; } // -- RT -------------------------------------------------------------------- - + for (i=0; i < sizeof table / sizeof *table; i++) if (!strncmp (name, table[i].prefix, strlen(table[i].prefix))) { if (RT_blacklevel_from_constant == ThreeValBool::T && table[i].black) black = (ushort) table[i].black;