Added 32-bit YUYV->UYVY

This commit is contained in:
Martin Pulec
2014-07-03 13:08:30 +02:00
parent 9002e348a9
commit 4b11862b14
2 changed files with 17 additions and 2 deletions

View File

@@ -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

View File

@@ -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
}
/**