half/sse-half: register conversions for YaA as well
authorØyvind Kolås <pippin@gimp.org>
Tue, 20 Aug 2019 00:45:24 +0000 (02:45 +0200)
committerØyvind Kolås <pippin@gimp.org>
Tue, 20 Aug 2019 00:45:29 +0000 (02:45 +0200)
extensions/half.c
extensions/sse-half.c

index 26786abbc36bc3f28de71c4654ff66c81708baef..f308e03b563626298e250324a359e31ab2e3d9cc 100644 (file)
@@ -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);
index c2fe6a30ad8a54e7d77125cf89e6f7b4bf7691e9..cee397555a5c634fd570cf11f70932eec018123e 100644 (file)
@@ -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);
     }