comparison libmpcodecs/vf_divtc.c @ 27667:88dfab272467

Remove word size check and macro and use __WORDSIZE directly instead. It has been done this way in libswscale for years without apparent ill effect.
author diego
date Sat, 04 Oct 2008 10:16:48 +0000
parents 00fff9a3b735
children 08d18fe9da52
comparison
equal deleted inserted replaced
27666:9936b7fa9e63 27667:88dfab272467
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 MP_WORDSIZE==64 131 #if __WORDSIZE==64
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 MP_WORDSIZE==64 146 #if __WORDSIZE==64
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