[gegl] buffer: add optimized 6-byte case to gegl_buffer_iterate_write()
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: add optimized 6-byte case to gegl_buffer_iterate_write()
- Date: Wed, 14 Mar 2018 09:57:44 +0000 (UTC)
commit 3aeda3e1df7e095e8e08e42ac784b85f8b09cbce
Author: Ell <ell_se yahoo com>
Date: Wed Mar 14 05:44:52 2018 -0400
buffer: add optimized 6-byte case to gegl_buffer_iterate_write()
... to match the set of optimized gegl_buffer_iterate_read_simple()
cases.
gegl/buffer/gegl-buffer-access.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index d33d06a..a225ba7 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -580,6 +580,26 @@ with multi-threading - and should be added back later.
bp += buf_stride;
}
break;
+ case 6:
+ CHECK_ALIGNMENT (uint16_t);
+ for (row = offsety;
+ row < tile_height && y < height;
+ row++, y++)
+ {
+ if (buffer_y + y >= buffer_abyss_y &&
+ buffer_y + y < abyss_y_total)
+ {
+ ((uint16_t*)(&tp[lskip_offset]))[0] =
+ ((uint16_t*)(&bp[lskip_offset]))[0];
+ ((uint16_t*)(&tp[lskip_offset]))[1] =
+ ((uint16_t*)(&bp[lskip_offset]))[1];
+ ((uint16_t*)(&tp[lskip_offset]))[2] =
+ ((uint16_t*)(&bp[lskip_offset]))[2];
+ }
+ tp += tile_stride;
+ bp += buf_stride;
+ }
+ break;
case 8:
CHECK_ALIGNMENT (uint64_t);
for (row = offsety;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]