Mercurial > mplayer.hg
comparison Gui/bitmap.c @ 6145:26cb8736927b
Gui and 64-bit issues patch from Gui and 64-bit issues
author | pontscho |
---|---|
date | Mon, 20 May 2002 13:39:23 +0000 |
parents | 35689e1e6745 |
children | dcf195b784bf |
comparison
equal
deleted
inserted
replaced
6144:bcb7c2050104 | 6145:26cb8736927b |
---|---|
183 out->ImageSize=out->Width * out->Height / 8; | 183 out->ImageSize=out->Width * out->Height / 8; |
184 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c1to32] imagesize: %d\n",out->ImageSize ); | 184 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c1to32] imagesize: %d\n",out->ImageSize ); |
185 out->Image=(char *)calloc( 1,out->ImageSize ); | 185 out->Image=(char *)calloc( 1,out->ImageSize ); |
186 if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" ); | 186 if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" ); |
187 { | 187 { |
188 int i,b,c=0; unsigned long * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1; | 188 int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1; |
189 buf=(unsigned long *)in->Image; | 189 buf=(unsigned int *)in->Image; |
190 for ( b=0,i=0;i < (int)(out->Width * out->Height);i++ ) | 190 for ( b=0,i=0;i < (int)(out->Width * out->Height);i++ ) |
191 { | 191 { |
192 if ( (int)buf[i] != adaptivlimit ) tmp=( tmp >> 1 )|128; | 192 if ( (int)buf[i] != adaptivlimit ) tmp=( tmp >> 1 )|128; |
193 else { tmp=tmp >> 1; buf[i]=nothaveshape=0; } | 193 else { tmp=tmp >> 1; buf[i]=nothaveshape=0; } |
194 if ( b++ == 7 ) { out->Image[c++]=tmp; tmp=b=0; } | 194 if ( b++ == 7 ) { out->Image[c++]=tmp; tmp=b=0; } |
207 out->ImageSize=out->Width * out->Height * 4; | 207 out->ImageSize=out->Width * out->Height * 4; |
208 out->Image=(char *)calloc( 1,out->ImageSize ); | 208 out->Image=(char *)calloc( 1,out->ImageSize ); |
209 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c32to1] imagesize: %d\n",out->ImageSize ); | 209 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c32to1] imagesize: %d\n",out->ImageSize ); |
210 if ( (int)out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" ); | 210 if ( (int)out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" ); |
211 { | 211 { |
212 int i,b,c=0; unsigned long * buf = NULL; unsigned char tmp = 0; | 212 int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0; |
213 buf=(unsigned long *)out->Image; | 213 buf=(unsigned int *)out->Image; |
214 for ( c=0,i=0;i < (int)(in->Width * in->Height / 8);i++ ) | 214 for ( c=0,i=0;i < (int)(in->Width * in->Height / 8);i++ ) |
215 { | 215 { |
216 tmp=in->Image[i]; | 216 tmp=in->Image[i]; |
217 for ( b=0;b<8;b++ ) | 217 for ( b=0;b<8;b++ ) |
218 { | 218 { |