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.
This commit is contained in:
Simon Segerblom Rex
2021-04-22 14:35:32 +02:00
parent 53bb6e41bb
commit 2061cfc54e

View File

@@ -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;