From ccd26e2affb0fb4a10b7261a85cb85b2525e5d9e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 23 Jul 2017 20:48:18 +0200 Subject: Fix some errors, add manual for blind-colour-matrix and add blind-primary-key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-affine-colour.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/blind-affine-colour.c') diff --git a/src/blind-affine-colour.c b/src/blind-affine-colour.c index 7be9ab6..654345f 100644 --- a/src/blind-affine-colour.c +++ b/src/blind-affine-colour.c @@ -88,14 +88,23 @@ PROCESS(struct stream *colour, struct stream *matrix) if (!x) { if (!y && !eread_segment(matrix, mbuf, dim * matrix->row_size)) break; - if (!per_pixel) + if (!per_pixel) { + if (!y) { + mat = (TYPE *)mbuf; + for (i = 0; i < dim; i++, mat += w) + for (j = 0; j < dim; j++) + M[i][j] = mat[j * matrix->n_chan + 1] + * mat[(j + 1) * matrix->n_chan - 1]; + } y = (y + 1) % colour->height; + } } if (per_pixel) { mat = (TYPE *)(mbuf + x * dim * matrix->pixel_size); for (i = 0; i < dim; i++, mat += w) for (j = 0; j < dim; j++) - M[i][j] = mat[j * matrix->n_chan + 1] * mat[(j + 1) * matrix->n_chan - 1]; + M[i][j] = mat[j * matrix->n_chan + 1] + * mat[(j + 1) * matrix->n_chan - 1]; } pixel = (TYPE *)(colour->buf + ptr); for (i = 0; i < dim; i++) { -- cgit v1.2.3-70-g09d2