# HG changeset patch # User michael # Date 1092736676 0 # Node ID ab4ee35c4137229222226c84ac2723c232e322ae # Parent 24ed7893bf825bd23999c82d4de24050897a04e4 big endian fix (untested) diff -r 24ed7893bf82 -r ab4ee35c4137 huffyuv.c --- a/huffyuv.c Mon Aug 16 22:51:18 2004 +0000 +++ b/huffyuv.c Tue Aug 17 09:57:56 2004 +0000 @@ -32,6 +32,16 @@ #define VLC_BITS 11 +#ifdef WORDS_BIGENDIAN +#define B 3 +#define G 2 +#define R 1 +#else +#define B 0 +#define G 1 +#define R 2 +#endif + typedef enum Predictor{ LEFT= 0, PLANE, @@ -157,13 +167,13 @@ b= *blue; for(i=0; itemp[0][4*i+1]= get_vlc2(&s->gb, s->vlc[1].table, VLC_BITS, 3); - s->temp[0][4*i ]= get_vlc2(&s->gb, s->vlc[0].table, VLC_BITS, 3) + s->temp[0][4*i+1]; - s->temp[0][4*i+2]= get_vlc2(&s->gb, s->vlc[2].table, VLC_BITS, 3) + s->temp[0][4*i+1]; + s->temp[0][4*i+G]= get_vlc2(&s->gb, s->vlc[1].table, VLC_BITS, 3); + s->temp[0][4*i+B]= get_vlc2(&s->gb, s->vlc[0].table, VLC_BITS, 3) + s->temp[0][4*i+G]; + s->temp[0][4*i+R]= get_vlc2(&s->gb, s->vlc[2].table, VLC_BITS, 3) + s->temp[0][4*i+G]; get_vlc2(&s->gb, s->vlc[2].table, VLC_BITS, 3); //?! } } @@ -634,9 +644,9 @@ } }else{ for(i=0; itemp[0][4*i ]= get_vlc2(&s->gb, s->vlc[0].table, VLC_BITS, 3); - s->temp[0][4*i+1]= get_vlc2(&s->gb, s->vlc[1].table, VLC_BITS, 3); - s->temp[0][4*i+2]= get_vlc2(&s->gb, s->vlc[2].table, VLC_BITS, 3); + s->temp[0][4*i+B]= get_vlc2(&s->gb, s->vlc[0].table, VLC_BITS, 3); + s->temp[0][4*i+G]= get_vlc2(&s->gb, s->vlc[1].table, VLC_BITS, 3); + s->temp[0][4*i+R]= get_vlc2(&s->gb, s->vlc[2].table, VLC_BITS, 3); get_vlc2(&s->gb, s->vlc[2].table, VLC_BITS, 3); //?! } }