+@@ -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()));
+ }
+