diff --git a/configure.ac b/configure.ac index 4ac778547..961a8e4ff 100644 --- a/configure.ac +++ b/configure.ac @@ -202,9 +202,9 @@ then AC_MSG_ERROR([Your compiler does not accept C99.]) fi -AC_CHECK_SIZEOF([int *]) +AC_CHECK_SIZEOF([size_t]) -if test $ac_cv_sizeof_int_p -eq 8 +if test $ac_cv_sizeof_size_t -eq 8 then WORD_LEN=64 else diff --git a/src/video_codec.c b/src/video_codec.c index c2106e7b4..7e6cb35a0 100644 --- a/src/video_codec.c +++ b/src/video_codec.c @@ -507,6 +507,7 @@ void vc_copylinev210(unsigned char *dst, const unsigned char *src, int dst_len) */ void vc_copylineYUYV(unsigned char *dst, const unsigned char *src, int dst_len) { +#if WORD_LEN == 64 register uint32_t *d; register const uint32_t *s; const uint32_t * const end = (uint32_t *)(void *) dst + dst_len / 4; @@ -549,6 +550,20 @@ void vc_copylineYUYV(unsigned char *dst, const unsigned char *src, int dst_len) } } +#else + char u, y1, v, y2; + while (dst_len > 0) { + y1 = *src++; + u = *src++; + y2 = *src++; + v = *src++; + *dst++ = u; + *dst++ = y1; + *dst++ = v; + *dst++ = y2; + dst_len -= 4; + } +#endif } /**