Mercurial > mplayer.hg
comparison libmpcodecs/vf_divtc.c @ 29195:a49f45515e08
Replace glibc-specific __WORDSIZE preprocessor check with HAVE_FAST_64BIT.
The latter is properly set by configure.
author | diego |
---|---|
date | Sat, 25 Apr 2009 19:09:54 +0000 |
parents | ccbde3575f0a |
children | bbb6ebec87a0 |
comparison
equal
deleted
inserted
replaced
29194:3a157edc770d | 29195:a49f45515e08 |
---|---|
126 int w, int h, int s, int zs, int arg) | 126 int w, int h, int s, int zs, int arg) |
127 { | 127 { |
128 unsigned int shift; | 128 unsigned int shift; |
129 uint32_t sum, t; | 129 uint32_t sum, t; |
130 unsigned char *e, *e2; | 130 unsigned char *e, *e2; |
131 #if __WORDSIZE==64 | 131 #if HAVE_FAST_64BIT |
132 typedef uint64_t wsum_t; | 132 typedef uint64_t wsum_t; |
133 #else | 133 #else |
134 typedef uint32_t wsum_t; | 134 typedef uint32_t wsum_t; |
135 #endif | 135 #endif |
136 wsum_t wsum; | 136 wsum_t wsum; |
141 sum^=*p++<<(shift=(shift-8)&31); | 141 sum^=*p++<<(shift=(shift-8)&31); |
142 | 142 |
143 for(wsum=0, e2=e-sizeof(wsum_t)+1; p<e2; p+=sizeof(wsum_t)) | 143 for(wsum=0, e2=e-sizeof(wsum_t)+1; p<e2; p+=sizeof(wsum_t)) |
144 wsum^=*(wsum_t *)p; | 144 wsum^=*(wsum_t *)p; |
145 | 145 |
146 #if __WORDSIZE==64 | 146 #if HAVE_FAST_64BIT |
147 t=be2me_32((uint32_t)(wsum>>32^wsum)); | 147 t=be2me_32((uint32_t)(wsum>>32^wsum)); |
148 #else | 148 #else |
149 t=be2me_32(wsum); | 149 t=be2me_32(wsum); |
150 #endif | 150 #endif |
151 | 151 |