diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-09 13:05:55 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-09 13:05:55 +0000 |
commit | 9c2e03551695dc7461c00f66dceed655d1cb0d7b (patch) | |
tree | 740de21e93817313c3ab4263421c62d496886431 /Gui | |
parent | 35644f7ca2515e8227178f913b0934b8a178aa0a (diff) | |
download | mpv-9c2e03551695dc7461c00f66dceed655d1cb0d7b.tar.bz2 mpv-9c2e03551695dc7461c00f66dceed655d1cb0d7b.tar.xz |
app michale's rgb32tobgr32
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2783 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r-- | Gui/wm/ws.c | 3 | ||||
-rw-r--r-- | Gui/wm/wsconv.c | 20 | ||||
-rw-r--r-- | Gui/wm/wsconv.h | 22 |
3 files changed, 23 insertions, 22 deletions
diff --git a/Gui/wm/ws.c b/Gui/wm/ws.c index 3a4dee481f..5c9d529eae 100644 --- a/Gui/wm/ws.c +++ b/Gui/wm/ws.c @@ -245,7 +245,8 @@ if(mDisplay){ #ifdef DEBUG fprintf( stderr,"rgb32 to bgr32\n" ); #endif - wsConvFunc=BGR8880_to_BGR8880_c; +// wsConvFunc=BGR8880_to_BGR8880_c; + wsConvFunc=rgb32tobgr32; break; case wsRGB24: #ifdef DEBUG diff --git a/Gui/wm/wsconv.c b/Gui/wm/wsconv.c index aeff6ecf1f..dc32c6e3ba 100644 --- a/Gui/wm/wsconv.c +++ b/Gui/wm/wsconv.c @@ -18,7 +18,7 @@ wsTConvFunc wsConvFunc = NULL; #define SWAP_RGB_24(src,dst) dst[1]=src[0];dst[1]=src[1];dst[2]=src[0] -void BGR8880_to_RGB555_c( unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels) +void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels) { unsigned short pixel; int i; @@ -31,7 +31,7 @@ void BGR8880_to_RGB555_c( unsigned char * in_pixels, unsigned char * out_pixels, } } -void BGR8880_to_BGR555_c( unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels) +void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels) { unsigned short pixel; int i; @@ -44,7 +44,7 @@ void BGR8880_to_BGR555_c( unsigned char * in_pixels, unsigned char * out_pixels, } } -void BGR8880_to_RGB565_c( unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels) +void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels) { unsigned short pixel; int i; @@ -57,7 +57,7 @@ void BGR8880_to_RGB565_c( unsigned char * in_pixels, unsigned char * out_pixels, } } -void BGR8880_to_BGR565_c( unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels) +void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels) { unsigned short pixel; int i; @@ -70,7 +70,7 @@ void BGR8880_to_BGR565_c( unsigned char * in_pixels, unsigned char * out_pixels, } } -void BGR8880_to_RGB888_c( unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels ) +void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels ) { int i; for(i = 0; i < num_pixels / 4; i++) @@ -81,7 +81,7 @@ void BGR8880_to_RGB888_c( unsigned char * in_pixels, unsigned char * out_pixels, } } -void BGR8880_to_BGR888_c( unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels ) +void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels ) { int i; for(i = 0; i < num_pixels / 4; i++) @@ -92,7 +92,7 @@ void BGR8880_to_BGR888_c( unsigned char * in_pixels, unsigned char * out_pixels, } } -void BGR8880_to_BGR8880_c( unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels ) +void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels ) { int i; for(i = 0; i < num_pixels / 4; i++) @@ -103,7 +103,7 @@ void BGR8880_to_BGR8880_c( unsigned char * in_pixels, unsigned char * out_pixels } } -void BGR8880_to_RGB8880_c( unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels ) +void BGR8880_to_RGB8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels ) { memcpy( out_pixels,in_pixels,num_pixels ); } /* @@ -119,7 +119,7 @@ unsigned char * map_6_to_8[64]; #define RGB16_MIDDLE_MASK 0x07e0 #define RGB16_UPPER_MASK 0xf800 -void RGB565_to_RGB888_c( unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels) +void RGB565_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels) { unsigned short in_pixel; int i; @@ -169,7 +169,7 @@ static mmx_t rgb32_b_mask; // Mask for the blues of 2 RGB32 pixels static mmx_t lower_dword_mask; // Mask for the lower doublewords static mmx_t upper_dword_mask; // Mask for the upper doublewords -void BGR8880_to_RGB888_mmx(unsigned char * in_pixels,unsigned char * out_pixels,int num_pixels) +void BGR8880_to_RGB888_mmx(unsigned char * in_pixels,unsigned char * out_pixels,unsigned num_pixels) { int imax = num_pixels/4; int i; diff --git a/Gui/wm/wsconv.h b/Gui/wm/wsconv.h index 2beac88ad0..de7fee8b32 100644 --- a/Gui/wm/wsconv.h +++ b/Gui/wm/wsconv.h @@ -16,23 +16,23 @@ pixel<<=5;\ pixel|=(r>>3) -typedef void(*wsTConvFunc)( unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels ); +typedef void(*wsTConvFunc)( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels ); extern wsTConvFunc wsConvFunc; -extern void BGR8880_to_RGB555_c( unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels ); -extern void BGR8880_to_BGR555_c( unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels ); -extern void BGR8880_to_RGB565_c( unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels ); -extern void BGR8880_to_BGR565_c( unsigned char * in_pixels, unsigned char * out_pixels, int num_pixels ); -extern void BGR8880_to_RGB888_c( unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels ); -extern void BGR8880_to_BGR888_c( unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels ); -extern void BGR8880_to_BGR8880_c( unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels ); -extern void BGR8880_to_RGB8880_c( unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels ); +extern void BGR8880_to_RGB555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels ); +extern void BGR8880_to_BGR555_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels ); +extern void BGR8880_to_RGB565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels ); +extern void BGR8880_to_BGR565_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels ); +extern void BGR8880_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels ); +extern void BGR8880_to_BGR888_c( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels ); +extern void BGR8880_to_BGR8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels ); +extern void BGR8880_to_RGB8880_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels ); #ifdef xHAVE_MMX - extern void BGR8880_to_RGB888_mmx(unsigned char * in_pixels,unsigned char * out_pixels,int num_pixels); + extern void BGR8880_to_RGB888_mmx( const unsigned char * in_pixels,unsigned char * out_pixels,unsigned num_pixels); #endif -extern void RGB565_to_RGB888_c( unsigned char * in_pixels, unsigned char * out_pixels,int num_pixels); +extern void RGB565_to_RGB888_c( const unsigned char * in_pixels, unsigned char * out_pixels,unsigned num_pixels); extern void initConverter( void ); |