diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/filter/vf_divtc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/video/filter/vf_divtc.c b/video/filter/vf_divtc.c index 869d7462d1..8e21df1f82 100644 --- a/video/filter/vf_divtc.c +++ b/video/filter/vf_divtc.c @@ -21,6 +21,7 @@ #include <string.h> #include <limits.h> #include <math.h> +#include <stdint.h> #include "config.h" #include "common/msg.h" @@ -97,13 +98,15 @@ static unsigned int checksum_plane(unsigned char *p, unsigned char *z, } */ +#define FAST_64BIT (UINTPTR_MAX >= UINT64_MAX) + static unsigned int checksum_plane(unsigned char *p, unsigned char *z, int w, int h, int s, int zs, int arg) { unsigned int shift; uint32_t sum, t; unsigned char *e, *e2; -#if HAVE_FAST_64BIT +#if FAST_64BIT typedef uint64_t wsum_t; #else typedef uint32_t wsum_t; @@ -118,7 +121,7 @@ static unsigned int checksum_plane(unsigned char *p, unsigned char *z, for(wsum=0, e2=e-sizeof(wsum_t)+1; p<e2; p+=sizeof(wsum_t)) wsum^=*(wsum_t *)p; -#if HAVE_FAST_64BIT +#if FAST_64BIT t=be2me_32((uint32_t)(wsum>>32^wsum)); #else t=be2me_32(wsum); |