[packages/ClanLib] - more sse

baggins baggins at pld-linux.org
Tue Nov 5 21:12:37 CET 2013


commit 4a7795d55067cf6735a2a8e92779d8e1ff807167
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Nov 5 21:12:28 2013 +0100

    - more sse

 really-disable-sse2.patch | 135 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 135 insertions(+)
---
diff --git a/really-disable-sse2.patch b/really-disable-sse2.patch
index 19330f3..9c5c359 100644
--- a/really-disable-sse2.patch
+++ b/really-disable-sse2.patch
@@ -58,6 +58,141 @@
  
  	std::unique_ptr<PixelReader> reader = impl->create_reader(input_format, sse2);
  	std::unique_ptr<PixelWriter> writer = impl->create_writer(output_format, sse2, sse4);
+@@ -162,9 +162,11 @@
+ 	switch (format)
+ 	{
+ 	case tf_bgra8:
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			return std::unique_ptr<PixelReader>(new PixelReaderSSE2_bgra8());
+ 		else
++#endif
+ 			return std::unique_ptr<PixelReader>(new PixelReader_bgra8());
+ 	case tf_bgr8:
+ 		return std::unique_ptr<PixelReader>(new PixelReader_bgr8());
+@@ -216,9 +218,11 @@
+ 	case tf_rgb5_a1:
+ 		return std::unique_ptr<PixelReader>(new PixelReader_rgb5_a1());
+ 	case tf_rgba8:
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			return std::unique_ptr<PixelReader>(new PixelReaderSSE2_rgba8());
+ 		else
++#endif
+ 			return std::unique_ptr<PixelReader>(new PixelReader_4norm<unsigned char>());
+ 	case tf_rgba8_snorm:
+ 		return std::unique_ptr<PixelReader>(new PixelReader_4norm<char>());
+@@ -227,18 +231,22 @@
+ 	case tf_rgba12:
+ 		break;
+ 	case tf_rgba16:
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			return std::unique_ptr<PixelReader>(new PixelReaderSSE2_rgba16());
+ 		else
++#endif
+ 			return std::unique_ptr<PixelReader>(new PixelReader_4norm<unsigned short>());
+ 	case tf_rgba16_snorm:
+ 		return std::unique_ptr<PixelReader>(new PixelReader_4norm<short>());
+ 	case tf_srgb8:
+ 		return std::unique_ptr<PixelReader>(new PixelReader_3norm<unsigned char>()); // TBD: should we add a 2.2 gamma filter?
+ 	case tf_srgb8_alpha8:
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			return std::unique_ptr<PixelReader>(new PixelReaderSSE2_rgba8());
+ 		else
++#endif
+ 			return std::unique_ptr<PixelReader>(new PixelReader_4norm<char>()); // TBD: should we add a 2.2 gamma filter?
+ 	case tf_r16f:
+ 		return std::unique_ptr<PixelReader>(new PixelReader_1hf());
+@@ -341,9 +349,11 @@
+ 	switch (format)
+ 	{
+ 	case tf_bgra8:
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			return std::unique_ptr<PixelWriter>(new PixelWriterSSE2_bgra8());
+ 		else
++#endif
+ 			return std::unique_ptr<PixelWriter>(new PixelWriter_bgra8());
+ 	case tf_bgr8:
+ 		return std::unique_ptr<PixelWriter>(new PixelWriter_bgr8());
+@@ -395,9 +405,11 @@
+ 	case tf_rgb5_a1:
+ 		return std::unique_ptr<PixelWriter>(new PixelWriter_rgb5_a1());
+ 	case tf_rgba8:
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			return std::unique_ptr<PixelWriter>(new PixelWriterSSE2_rgba8());
+ 		else
++#endif
+ 			return std::unique_ptr<PixelWriter>(new PixelWriter_4norm<unsigned char>());
+ 	case tf_rgba8_snorm:
+ 		return std::unique_ptr<PixelWriter>(new PixelWriter_4norm<char>());
+@@ -419,9 +431,11 @@
+ 	case tf_srgb8:
+ 		return std::unique_ptr<PixelWriter>(new PixelWriter_3norm<unsigned char>()); // TBD: should we add a 2.2 gamma filter?
+ 	case tf_srgb8_alpha8:
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			return std::unique_ptr<PixelWriter>(new PixelWriterSSE2_rgba8());
+ 		else
++#endif
+ 			return std::unique_ptr<PixelWriter>(new PixelWriter_4norm<char>()); // TBD: should we add a 2.2 gamma filter?
+ 	case tf_r16f:
+ 		return std::unique_ptr<PixelWriter>(new PixelWriter_1hf());
+@@ -525,41 +539,51 @@
+ 
+ 	if (input_is_ycrcb)
+ 	{
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSSE2_YCrCbToRGB()));
+ 		else
++#endif
+ 			filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterYCrCbToRGB()));
+ 	}
+ 
+ 	if (premultiply_alpha)
+ 	{
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterPremultiplyAlphaSSE2()));
+ 		else
++#endif
+ 			filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterPremultiplyAlpha()));
+ 	}
+ 
+ 	if (gamma != 1.0f)
+ 	{
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterGammaSSE2(gamma)));
+ 		else
++#endif
+ 			filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterGamma(gamma)));
+ 	}
+ 
+ 	if (swizzle != Vec4i(0,1,2,3))
+ 	{
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSwizzleSSE2(swizzle)));
+ 		else
++#endif
+ 			filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSwizzle(swizzle)));
+ 	}
+ 
+ 	if (output_is_ycrcb)
+ 	{
++#ifndef DISABLE_SSE2
+ 		if (sse2)
+ 			filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSSE2_RGBToYCrCb()));
+ 		else
++#endif
+ 			filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterRGBToYCrCb()));
+ 	}
+ 
 --- ClanLib-3.0.0/Sources/Display/Image/pixel_filter_gamma.h~	2013-09-24 13:53:31.000000000 +0200
 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_filter_gamma.h	2013-11-05 21:00:27.261709016 +0100
 @@ -50,6 +50,7 @@
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ClanLib.git/commitdiff/4a7795d55067cf6735a2a8e92779d8e1ff807167



More information about the pld-cvs-commit mailing list