about summary refs log tree commit diff
path: root/editor/pamflip/pamflip_sse.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-04-09 01:38:43 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-04-09 01:38:43 +0000
commit946e0515bbae993f3ee091c848fdae2bda51e97a (patch)
treedf6c7303fa91df474857633e083b5fa0bf5db8a1 /editor/pamflip/pamflip_sse.c
parentd4fe9378cb8b94e847f7295d4b984b5135692b18 (diff)
downloadnetpbm-mirror-946e0515bbae993f3ee091c848fdae2bda51e97a.tar.gz
netpbm-mirror-946e0515bbae993f3ee091c848fdae2bda51e97a.tar.xz
netpbm-mirror-946e0515bbae993f3ee091c848fdae2bda51e97a.zip
Work around GCC < 4.2 bug that causes compile failure
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2455 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pamflip/pamflip_sse.c')
-rw-r--r--editor/pamflip/pamflip_sse.c9
1 files changed, 7 insertions, 2 deletions
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. <emmintrin.h> 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