[Mplayer-cvslog] CVS: main/postproc swscale.c,1.85,1.86
Michael Niedermayer
michael at mplayer.dev.hu
Thu Mar 21 19:53:44 CET 2002
Update of /cvsroot/mplayer/main/postproc
In directory mplayer:/var/tmp.root/cvs-serv2265
Modified Files:
swscale.c
Log Message:
fixing bgr15&16 on big_endian
i doubt that that will fix all big endian problems though, we very likely will have to support RGB & BGR output formats as either bgr32 or bgr15 is rgb depending upon the way rgb/bgr is defined
Index: swscale.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- swscale.c 22 Feb 2002 15:24:19 -0000 1.85
+++ swscale.c 21 Mar 2002 18:53:32 -0000 1.86
@@ -1125,12 +1125,12 @@
for(i=0; i<768; i++)
{
int v= clip_table[i];
- clip_table16b[i]= le2me_16( v>>3);
- clip_table16g[i]= le2me_16((v<<3)&0x07E0);
- clip_table16r[i]= le2me_16((v<<8)&0xF800);
- clip_table15b[i]= le2me_16( v>>3);
- clip_table15g[i]= le2me_16((v<<2)&0x03E0);
- clip_table15r[i]= le2me_16((v<<7)&0x7C00);
+ clip_table16b[i]= v>>3;
+ clip_table16g[i]= (v<<3)&0x07E0;
+ clip_table16r[i]= (v<<8)&0xF800;
+ clip_table15b[i]= v>>3;
+ clip_table15g[i]= (v<<2)&0x03E0;
+ clip_table15r[i]= (v<<7)&0x7C00;
}
cpuCaps= gCpuCaps;
@@ -1420,7 +1420,10 @@
{
// FIXME multiple yuv2rgb converters wont work that way cuz that thing is full of globals&statics
#ifdef WORDS_BIGENDIAN
- yuv2rgb_init( dstFormat&0xFF /* =bpp */, MODE_BGR);
+ if(dstFormat==IMGFMT_BGR32)
+ yuv2rgb_init( dstFormat&0xFF /* =bpp */, MODE_BGR);
+ else
+ yuv2rgb_init( dstFormat&0xFF /* =bpp */, MODE_RGB);
#else
yuv2rgb_init( dstFormat&0xFF /* =bpp */, MODE_RGB);
#endif
More information about the MPlayer-cvslog
mailing list