[babl] half/sse-half: register conversions for YaA as well
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] half/sse-half: register conversions for YaA as well
- Date: Tue, 20 Aug 2019 00:45:52 +0000 (UTC)
commit a34f5237282182416e69f5ee80305acd27e66f15
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Aug 20 02:45:24 2019 +0200
half/sse-half: register conversions for YaA as well
extensions/half.c | 31 +++++++++++++++++++++++++++++++
extensions/sse-half.c | 29 +++++++++++++++++++++++++++++
2 files changed, 60 insertions(+)
---
diff --git a/extensions/half.c b/extensions/half.c
index 26786abbc..f308e03b5 100644
--- a/extensions/half.c
+++ b/extensions/half.c
@@ -408,6 +408,9 @@ conv2_rgbaF_rgbaHalf (const Babl *conversion,
conv2_yF_yHalf (conversion, src, dst, samples * 4);
}
+#define conv_yAF_yAHalf conv_yaF_yaHalf
+#define conv_yAHalf_yAF conv_yaHalf_yaF
+
int init (void);
int
@@ -513,24 +516,48 @@ init (void)
babl_component ("Y"),
babl_component ("A"),
NULL);
+ const Babl *yAF_linear = babl_format_new (
+ babl_model ("YaA"),
+ babl_type ("float"),
+ babl_component ("Ya"),
+ babl_component ("A"),
+ NULL);
const Babl *yaHalf_linear = babl_format_new (
babl_model ("YA"),
babl_type ("half"),
babl_component ("Y"),
babl_component ("A"),
NULL);
+ const Babl *yAHalf_linear = babl_format_new (
+ babl_model ("YaA"),
+ babl_type ("half"),
+ babl_component ("Ya"),
+ babl_component ("A"),
+ NULL);
const Babl *yaF_gamma = babl_format_new (
babl_model ("Y'A"),
babl_type ("float"),
babl_component ("Y'"),
babl_component ("A"),
NULL);
+ const Babl *yAF_gamma = babl_format_new (
+ babl_model ("Y'aA"),
+ babl_type ("float"),
+ babl_component ("Y'a"),
+ babl_component ("A"),
+ NULL);
const Babl *yaHalf_gamma = babl_format_new (
babl_model ("Y'A"),
babl_type ("half"),
babl_component ("Y'"),
babl_component ("A"),
NULL);
+ const Babl *yAHalf_gamma = babl_format_new (
+ babl_model ("Y'aA"),
+ babl_type ("half"),
+ babl_component ("Y'a"),
+ babl_component ("A"),
+ NULL);
const Babl *yF_linear = babl_format_new (
babl_model ("Y"),
babl_type ("float"),
@@ -581,6 +608,10 @@ init (void)
CONV(rgbF, rgbHalf);
CONV(yaF, yaHalf);
CONV(yF, yHalf);
+
+ CONV(yAF, yAHalf);
+ CONV(yAHalf, yAF);
+
CONV2(rgbaF, rgbaHalf);
CONV2(rgbF, rgbHalf);
CONV2(yaF, yaHalf);
diff --git a/extensions/sse-half.c b/extensions/sse-half.c
index c2fe6a30a..cee397555 100644
--- a/extensions/sse-half.c
+++ b/extensions/sse-half.c
@@ -133,6 +133,9 @@ conv_yaF_yaHalf (const Babl *conversion,
conv_yF_yHalf (conversion, src, dst, samples * 2);
}
+#define conv_yAF_yAHalf conv_yaF_yaHalf
+#define conv_yAHalf_yAF conv_yaHalf_yaF
+
static void
conv_rgbF_rgbHalf (const Babl *conversion,
const float *src,
@@ -243,6 +246,30 @@ init (void)
babl_component ("Y'"),
babl_component ("A"),
NULL);
+ const Babl *yAF_linear = babl_format_new (
+ babl_model ("YaA"),
+ babl_type ("float"),
+ babl_component ("Ya"),
+ babl_component ("A"),
+ NULL);
+ const Babl *yAHalf_linear = babl_format_new (
+ babl_model ("YaA"),
+ babl_type ("half"),
+ babl_component ("Ya"),
+ babl_component ("A"),
+ NULL);
+ const Babl *yAF_gamma = babl_format_new (
+ babl_model ("Y'aA"),
+ babl_type ("float"),
+ babl_component ("Y'a"),
+ babl_component ("A"),
+ NULL);
+ const Babl *yAHalf_gamma = babl_format_new (
+ babl_model ("Y'aA"),
+ babl_type ("half"),
+ babl_component ("Y'a"),
+ babl_component ("A"),
+ NULL);
const Babl *yF_linear = babl_format_new (
babl_model ("Y"),
babl_type ("float"),
@@ -276,10 +303,12 @@ init (void)
CONV(rgbaHalf, rgbaF);
CONV(rgbHalf, rgbF);
CONV(yaHalf, yaF);
+ CONV(yAHalf, yAF);
CONV(yHalf, yF);
CONV(rgbaF, rgbaHalf);
CONV(rgbF, rgbHalf);
CONV(yaF, yaHalf);
+ CONV(yAF, yAHalf);
CONV(yF, yHalf);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]