From: Øyvind Kolås Date: Tue, 20 Aug 2019 00:45:24 +0000 (+0200) Subject: half/sse-half: register conversions for YaA as well X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~11^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a34f5237282182416e69f5ee80305acd27e66f15;p=babl.git half/sse-half: register conversions for YaA as well --- diff --git a/extensions/half.c b/extensions/half.c index 26786ab..f308e03 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 c2fe6a3..cee3975 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); }