diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-04-17 03:17:30 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-04-17 03:17:30 +0000 |
commit | 6b85c685f6b4a4d63e62319587c362682b1de42a (patch) | |
tree | 7cd4151b0e9a769f39c9b692b4582d2f72174956 /editor/pamflip/pamflip_sse.c | |
parent | 796cd77a2ec197c5827d1b1c5708354e8923a414 (diff) | |
download | netpbm-mirror-6b85c685f6b4a4d63e62319587c362682b1de42a.tar.gz netpbm-mirror-6b85c685f6b4a4d63e62319587c362682b1de42a.tar.xz netpbm-mirror-6b85c685f6b4a4d63e62319587c362682b1de42a.zip |
Release 10.70.02
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2463 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pamflip/pamflip_sse.c')
-rw-r--r-- | editor/pamflip/pamflip_sse.c | 9 |
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 |