From 6b85c685f6b4a4d63e62319587c362682b1de42a Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 17 Apr 2015 03:17:30 +0000 Subject: Release 10.70.02 git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2463 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pamflip/pamflip_sse.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'editor/pamflip/pamflip_sse.c') diff --git a/editor/pamflip/pamflip_sse.c b/editor/pamflip/pamflip_sse.c index eccbe965..e0929f65 100644 --- a/editor/pamflip/pamflip_sse.c +++ b/editor/pamflip/pamflip_sse.c @@ -24,6 +24,7 @@ #include "mallocvar.h" #include "pam.h" +#include "config.h" /* Defines SSE_PBM_XY_FLIP */ #include "flip.h" #include "pamflip_sse.h" @@ -32,7 +33,7 @@ (i.e. exists). */ -#if WANT_SSE && defined(__SSE2__) +#if SSE_PBM_XY_FLIP /*---------------------------------------------------------------------------- This is a specialized routine for row-for-column PBM transformations. @@ -59,7 +60,11 @@ As an enhancement, we clear the output raster to zero (=white) in the beginning and flip only the 8x16 blocks that contain non-zero bits (=any amount of black pixels). When we add padding to the edges, we initialize - it all to zero to prevent unnecessary transpositions. + it all to zero to prevent unnecessary transpositions. Because most + real-world documents are largely white, this saves much execution time. If + you are porting this code to an environment in which non-zero bits are the + majority, for example, BMP where zero means black, you should seriously + consider modifying this. All instructions unique to GCC/SSE are in transpose16Bitrows(). It is possible to write a non-SSE version by providing a generic -- cgit 1.4.1