* Fix some new GCC 4.3 warnings
* Fix many many strict aliasing warnings, now that it's re-enabled
This commit is contained in:
parent
7c19978aaa
commit
72dea0a184
19 changed files with 220 additions and 152 deletions
|
@ -620,7 +620,10 @@ static void decodeCodeBook( byte *input, unsigned short roq_flags )
|
|||
unsigned short *aptr, *bptr, *cptr, *dptr;
|
||||
long y0,y1,y2,y3,cr,cb;
|
||||
byte *bbptr, *baptr, *bcptr, *bdptr;
|
||||
unsigned int *iaptr, *ibptr, *icptr, *idptr;
|
||||
union {
|
||||
unsigned int *i;
|
||||
unsigned short *s;
|
||||
} iaptr, ibptr, icptr, idptr;
|
||||
|
||||
if (!roq_flags) {
|
||||
two = four = 256;
|
||||
|
@ -663,7 +666,7 @@ static void decodeCodeBook( byte *input, unsigned short roq_flags )
|
|||
VQ2TO4(aptr,bptr,cptr,dptr);
|
||||
}
|
||||
} else if (cinTable[currentHandle].samplesPerPixel==4) {
|
||||
ibptr = (unsigned int *)bptr;
|
||||
ibptr.s = bptr;
|
||||
for(i=0;i<two;i++) {
|
||||
y0 = (long)*input++;
|
||||
y1 = (long)*input++;
|
||||
|
@ -671,20 +674,22 @@ static void decodeCodeBook( byte *input, unsigned short roq_flags )
|
|||
y3 = (long)*input++;
|
||||
cr = (long)*input++;
|
||||
cb = (long)*input++;
|
||||
*ibptr++ = yuv_to_rgb24( y0, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( y1, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( y2, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( y3, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( y0, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( y1, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( y2, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( y3, cr, cb );
|
||||
}
|
||||
|
||||
icptr = (unsigned int *)vq4;
|
||||
idptr = (unsigned int *)vq8;
|
||||
icptr.s = vq4;
|
||||
idptr.s = vq8;
|
||||
|
||||
for(i=0;i<four;i++) {
|
||||
iaptr = (unsigned int *)vq2 + (*input++)*4;
|
||||
ibptr = (unsigned int *)vq2 + (*input++)*4;
|
||||
iaptr.s = vq2;
|
||||
iaptr.i += (*input++)*4;
|
||||
ibptr.s = vq2;
|
||||
ibptr.i += (*input++)*4;
|
||||
for(j=0;j<2;j++)
|
||||
VQ2TO4(iaptr, ibptr, icptr, idptr);
|
||||
VQ2TO4(iaptr.i, ibptr.i, icptr.i, idptr.i);
|
||||
}
|
||||
} else if (cinTable[currentHandle].samplesPerPixel==1) {
|
||||
bbptr = (byte *)bptr;
|
||||
|
@ -739,7 +744,7 @@ static void decodeCodeBook( byte *input, unsigned short roq_flags )
|
|||
}
|
||||
}
|
||||
} else if (cinTable[currentHandle].samplesPerPixel==4) {
|
||||
ibptr = (unsigned int *)bptr;
|
||||
ibptr.s = bptr;
|
||||
for(i=0;i<two;i++) {
|
||||
y0 = (long)*input++;
|
||||
y1 = (long)*input++;
|
||||
|
@ -747,25 +752,27 @@ static void decodeCodeBook( byte *input, unsigned short roq_flags )
|
|||
y3 = (long)*input++;
|
||||
cr = (long)*input++;
|
||||
cb = (long)*input++;
|
||||
*ibptr++ = yuv_to_rgb24( y0, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( y1, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( ((y0*3)+y2)/4, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( ((y1*3)+y3)/4, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( (y0+(y2*3))/4, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( (y1+(y3*3))/4, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( y2, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( y3, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( y0, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( y1, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( ((y0*3)+y2)/4, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( ((y1*3)+y3)/4, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( (y0+(y2*3))/4, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( (y1+(y3*3))/4, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( y2, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( y3, cr, cb );
|
||||
}
|
||||
|
||||
icptr = (unsigned int *)vq4;
|
||||
idptr = (unsigned int *)vq8;
|
||||
icptr.s = vq4;
|
||||
idptr.s = vq8;
|
||||
|
||||
for(i=0;i<four;i++) {
|
||||
iaptr = (unsigned int *)vq2 + (*input++)*8;
|
||||
ibptr = (unsigned int *)vq2 + (*input++)*8;
|
||||
iaptr.s = vq2;
|
||||
iaptr.i += (*input++)*8;
|
||||
ibptr.s = vq2;
|
||||
ibptr.i += (*input++)*8;
|
||||
for(j=0;j<2;j++) {
|
||||
VQ2TO4(iaptr, ibptr, icptr, idptr);
|
||||
VQ2TO4(iaptr, ibptr, icptr, idptr);
|
||||
VQ2TO4(iaptr.i, ibptr.i, icptr.i, idptr.i);
|
||||
VQ2TO4(iaptr.i, ibptr.i, icptr.i, idptr.i);
|
||||
}
|
||||
}
|
||||
} else if (cinTable[currentHandle].samplesPerPixel==1) {
|
||||
|
@ -841,24 +848,26 @@ static void decodeCodeBook( byte *input, unsigned short roq_flags )
|
|||
}
|
||||
}
|
||||
} else if (cinTable[currentHandle].samplesPerPixel == 4) {
|
||||
ibptr = (unsigned int *) bptr;
|
||||
ibptr.s = bptr;
|
||||
for(i=0;i<two;i++) {
|
||||
y0 = (long)*input; input+=2;
|
||||
y2 = (long)*input; input+=2;
|
||||
cr = (long)*input++;
|
||||
cb = (long)*input++;
|
||||
*ibptr++ = yuv_to_rgb24( y0, cr, cb );
|
||||
*ibptr++ = yuv_to_rgb24( y2, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( y0, cr, cb );
|
||||
*ibptr.i++ = yuv_to_rgb24( y2, cr, cb );
|
||||
}
|
||||
|
||||
icptr = (unsigned int *)vq4;
|
||||
idptr = (unsigned int *)vq8;
|
||||
icptr.s = vq4;
|
||||
idptr.s = vq8;
|
||||
|
||||
for(i=0;i<four;i++) {
|
||||
iaptr = (unsigned int *)vq2 + (*input++)*2;
|
||||
ibptr = (unsigned int *)vq2 + (*input++)*2;
|
||||
iaptr.s = vq2;
|
||||
iaptr.i += (*input++)*2;
|
||||
ibptr.s = vq2 + (*input++)*2;
|
||||
ibptr.i += (*input++)*2;
|
||||
for(j=0;j<2;j++) {
|
||||
VQ2TO2(iaptr,ibptr,icptr,idptr);
|
||||
VQ2TO2(iaptr.i,ibptr.i,icptr.i,idptr.i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue