aboutsummaryrefslogtreecommitdiffstats
path: root/en_masse-template.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-06-10 14:02:39 +0200
committerMattias Andrée <maandree@kth.se>2017-06-10 14:02:39 +0200
commit218b41129040515d7bf6a04a82576d61f83d8bf7 (patch)
tree247c04b539842229878bab283b304c33381155dd /en_masse-template.c
parentAdd libcolour_convert_en_masse (diff)
downloadlibcolour-218b41129040515d7bf6a04a82576d61f83d8bf7.tar.gz
libcolour-218b41129040515d7bf6a04a82576d61f83d8bf7.tar.bz2
libcolour-218b41129040515d7bf6a04a82576d61f83d8bf7.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'en_masse-template.c')
-rw-r--r--en_masse-template.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/en_masse-template.c b/en_masse-template.c
index d823026..127d766 100644
--- a/en_masse-template.c
+++ b/en_masse-template.c
@@ -108,13 +108,19 @@ libcolour_convert_en_masse(const libcolour_colour_t *from, const libcolour_colou
}
while (n--) {
- tfrom.rgb.R = in1[n * width];
- tfrom.rgb.G = in2[n * width];
- tfrom.rgb.B = in3[n * width];
+ tfrom.rgb.R = *in1;
+ tfrom.rgb.G = *in2;
+ tfrom.rgb.B = *in3;
libcolour_convert(&tfrom, &tto);
- out1[n * width] = tto.rgb.R;
- out2[n * width] = tto.rgb.G;
- out3[n * width] = tto.rgb.B;
+ *out1 = tto.rgb.R;
+ *out2 = tto.rgb.G;
+ *out3 = tto.rgb.B;
+ in1 += width;
+ in2 += width;
+ in3 += width;
+ out1 += width;
+ out2 += width;
+ out3 += width;
}
(void) on_cpu;