ref: 87a7b8711df890470be7d96428b29fbf9079bde4
parent: 5d956c4d90d58c1fca70e8c3828e43ea92ee6876
author: Sebastian Rasmussen <sebras@gmail.com>
date: Sun Jul 8 20:42:51 EDT 2018
jbig2dec: Use corresponding stride for gray-scale bitplane. All bitplanes have the same stride, but this change makes it obvious that we will not overwrite any boundaries (i.e. use the stride of the bitplane in question, not the stride for another bitplane).
--- a/jbig2_halftone.c
+++ b/jbig2_halftone.c
@@ -349,7 +349,7 @@
/* C.5 step 3. (b):
* for each [x,y]
* GSPLANES[j][x][y] = GSPLANES[j+1][x][y] XOR GSPLANES[j][x][y] */
- stride = GSPLANES[0]->stride;
+ stride = GSPLANES[j]->stride;
for (i = 0; i < stride * GSH; ++i)
GSPLANES[j]->data[i] ^= GSPLANES[j + 1]->data[i];