# HG changeset patch # User michael # Date 1083507988 0 # Node ID b969547bb0b1d52dfc772dc9c7182376554cb645 # Parent b3ff1a576b8c6a8c56a8d8ecd23f5b31c4536e37 bigendian fix by (Romain Dolbeau ) with #if defined(WORDS_BIGENDIAN) && (WORDS_BIGENDIAN == 1) -> #ifdef WORDS_BIGENDIAN by me diff -r b3ff1a576b8c -r b969547bb0b1 postproc/rgb2rgb_template.c --- a/postproc/rgb2rgb_template.c Sun May 02 14:16:13 2004 +0000 +++ b/postproc/rgb2rgb_template.c Sun May 02 14:26:28 2004 +0000 @@ -1532,8 +1532,13 @@ int i, *idst = (int32_t *) dst; const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc; for(i = 0; i < chromWidth; i++){ +#ifdef WORDS_BIGENDIAN + *idst++ = (yc[0] << 24)+ (uc[0] << 16) + + (yc[1] << 8) + (vc[0] << 0); +#else *idst++ = yc[0] + (uc[0] << 8) + (yc[1] << 16) + (vc[0] << 24); +#endif yc += 2; uc++; vc++; @@ -1634,8 +1639,13 @@ int i, *idst = (int32_t *) dst; const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc; for(i = 0; i < chromWidth; i++){ +#ifdef WORDS_BIGENDIAN + *idst++ = (uc[0] << 24)+ (yc[0] << 16) + + (vc[0] << 8) + (yc[1] << 0); +#else *idst++ = uc[0] + (yc[0] << 8) + (vc[0] << 16) + (yc[1] << 24); +#endif yc += 2; uc++; vc++;