From 05717d4c242b7a40d7cc2970f6f8c925bde4a431 Mon Sep 17 00:00:00 2001 From: arpi_esp Date: Sat, 12 May 2001 01:54:05 +0000 Subject: [PATCH] flip implemented for converted modes, soem cleanup, fixed indent git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@776 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_x11.c | 112 ++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 62 deletions(-) diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 204a50e38f..6765575d40 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -431,52 +431,60 @@ static uint32_t draw_slice( uint8_t *src[],int stride[],int w,int h,int x,int y void rgb15to16_mmx( char* s0,char* d0,int count ); -#if 1 -static uint32_t draw_frame( uint8_t *src[] ) -{ - if( image_format==IMGFMT_YV12 ) - { - yuv2rgb( ImageData,src[0],src[1],src[2],image_width,image_height,image_width*( bpp/8 ),image_width,image_width/2 ); - } - else - { +static uint32_t draw_frame( uint8_t *src[] ){ int i; int sbpp=( ( image_format&0xFF )+7 )/8; int dbpp=( bpp+7 )/8; char *d=ImageData; char *s=src[0]; //printf( "sbpp=%d dbpp=%d depth=%d bpp=%d\n",sbpp,dbpp,depth,bpp ); -#if 0 + + if( Flip_Flag ){ // flipped BGR int i; //printf( "Rendering flipped BGR frame bpp=%d src=%d dst=%d\n",bpp,sbpp,dbpp ); s+=sbpp*image_width*image_height; - for( i=0;i16bpp +#ifdef HAVE_MMX + rgb15to16_mmx( s,d,2*image_width ); +#else + unsigned short *s1=( unsigned short * )s; + unsigned short *d1=( unsigned short * )d; + unsigned short *e=s1+image_width; + while( s116bpp #ifdef HAVE_MMX rgb15to16_mmx( s,d,2*image_width*image_height ); @@ -484,51 +492,31 @@ static uint32_t draw_frame( uint8_t *src[] ) unsigned short *s1=( unsigned short * )s; unsigned short *d1=( unsigned short * )d; unsigned short *e=s1+image_width*image_height; - while( s132bpp conversion\n" ); - while( s32bpp conversion\n" ); + while( s