[babl] extensions: speed up 8bit gray scale for GIMP
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] extensions: speed up 8bit gray scale for GIMP
- Date: Fri, 9 Dec 2016 13:26:44 +0000 (UTC)
commit 75429d2f0b63833a0fde3da1442aa08018ea8750
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Dec 9 14:26:31 2016 +0100
extensions: speed up 8bit gray scale for GIMP
extensions/gimp-8bit.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/extensions/gimp-8bit.c b/extensions/gimp-8bit.c
index d3e9522..55bd95c 100644
--- a/extensions/gimp-8bit.c
+++ b/extensions/gimp-8bit.c
@@ -229,6 +229,24 @@ conv_ga8_gamma_2_2_gaF_linear (unsigned char *src,
}
static INLINE long
+conv_ga8_gamma_2_2_rgba8_gamma_2_2 (unsigned char *src,
+ unsigned char *dst,
+ long samples)
+{
+ long n = samples;
+
+ while (n--)
+ {
+ *dst++ = *src;
+ *dst++ = *src;
+ *dst++ = *src++;
+ *dst++ = *src++;
+ }
+
+ return samples;
+}
+
+static INLINE long
conv_ga8_linear_rgbaF_linear (unsigned char *src,
unsigned char *dst,
long samples)
@@ -496,6 +514,8 @@ init (void)
o (ga8_linear, rgbaF_linear);
o (ga8_gamma_2_2, rgbaF_linear);
+ o (ga8_gamma_2_2, rgba8_gamma_2_2);
+
o (g8_linear, gF_linear);
o (g8_gamma_2_2, gF_linear);
o (g8_linear, rgbaF_linear);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]