[Mplayer-cvslog] CVS: main/Gui/bitmap bitmap.c,1.3,1.4 bitmap.h,1.3,1.4
Zoltan Ponekker
pontscho at mplayer.dev.hu
Sat Feb 23 16:13:23 CET 2002
- Previous message: [Mplayer-cvslog] CVS: main/Gui app.c,1.9,1.10 events.h,1.8,1.9 gui.mak,1.7,1.8 interface.c,1.1,1.2 interface.h,1.1,1.2 error.c,1.2,NONE error.h,1.2,NONE language.c,1.2,NONE language.h,1.2,NONE timer.c,1.1,NONE timer.h,1.2,NONE
- Next message: [Mplayer-cvslog] CVS: main/Gui/bitmap/bmp bmp.c,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/Gui/bitmap
In directory mplayer:/var/tmp.root/cvs-serv25081/Gui/bitmap
Modified Files:
bitmap.c bitmap.h
Log Message:
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
Index: bitmap.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/bitmap/bitmap.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- bitmap.c 5 Nov 2001 17:00:27 -0000 1.3
+++ bitmap.c 23 Feb 2002 15:12:51 -0000 1.4
@@ -4,7 +4,6 @@
#include <string.h>
#include "bitmap.h"
-#include "../error.h"
#define BMP 1
#define TGA 2
@@ -25,13 +24,11 @@
bf->BPP=32;
if ( ( bf->Image=malloc( bf->ImageSize ) ) == NULL )
{
- #ifdef DEBUG
- dbprintf( 4,"[bitmap] Not enough memory for image.\n" );
- #endif
+ mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[bitmap] Not enough memory for image.\n" );
return 1;
}
memset( bf->Image,0,bf->ImageSize );
- for ( c=0,i=0;i < bf->Width * bf->Height * 3; )
+ for ( c=0,i=0;i < (int)(bf->Width * bf->Height * 3); )
{
bf->Image[c++]=tmpImage[i++];
bf->Image[c++]=tmpImage[i++];
@@ -47,7 +44,7 @@
unsigned char c;
int i;
- for ( i=0;i < bf->ImageSize;i+=4 )
+ for ( i=0;i < (int)bf->ImageSize;i+=4 )
{
c=bf->Image[i];
bf->Image[i]=bf->Image[i+2];
@@ -58,8 +55,7 @@
void Normalize( txSample * bf )
{
int i;
-
- for ( i=0;i < bf->ImageSize;i+=4 ) bf->Image[i+3]=0;
+ for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i+3]=0;
}
unsigned char tmp[512];
@@ -149,23 +145,17 @@
bgr=1;
break;
case TGAPACKED:
- #ifdef DEBUG
- dbprintf( 4,"[bitmap] sorry, packed TGA not supported.\n" );
- #endif
+ mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[bitmap] sorry, packed TGA not supported.\n" );
return -6;
default:
{
- #ifdef DEBUG
- dbprintf( 4,"[bitmap] Unknown file type ( %s ).\n",fname );
- #endif
+ mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[bitmap] Unknown file type ( %s ).\n",fname );
return -7;
}
}
if ( bf->BPP < 24 )
{
- #ifdef DEBUG
- dbprintf( 4,"[bitmap] sorry, 16 or less bitmaps not supported.\n" );
- #endif
+ mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[bitmap] sorry, 16 or less bitmaps not supported.\n" );
return -1;
}
if ( conv24to32( bf ) ) return -8;
@@ -180,15 +170,15 @@
out->Height=in->Height;
out->BPP=1;
out->ImageSize=out->Width * out->Height / 8;
- dbprintf( 4,"[c1to32] imagesize: %d\n",out->ImageSize );
+ mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c1to32] imagesize: %d\n",out->ImageSize );
out->Image=(char *)calloc( 1,out->ImageSize );
- if ( out->Image == NULL ) dbprintf( 4,"nem van ram baze\n" );
+ if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" );
{
int i,b,c=0; unsigned long * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1;
buf=(unsigned long *)in->Image;
- for ( b=0,i=0;i < out->Width * out->Height;i++ )
+ for ( b=0,i=0;i < (int)(out->Width * out->Height);i++ )
{
- if ( buf[i] != adaptivlimit ) tmp=( tmp >> 1 )|128;
+ if ( (int)buf[i] != adaptivlimit ) tmp=( tmp >> 1 )|128;
else { tmp=tmp >> 1; buf[i]=nothaveshape=0; }
if ( b++ == 7 ) { out->Image[c++]=tmp; tmp=b=0; }
}
@@ -205,12 +195,12 @@
out->BPP=32;
out->ImageSize=out->Width * out->Height * 4;
out->Image=(char *)calloc( 1,out->ImageSize );
- dbprintf( 4,"[c32to1] imagesize: %d\n",out->ImageSize );
- if ( out->Image == NULL ) dbprintf( 4,"nem van ram baze\n" );
+ mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c32to1] imagesize: %d\n",out->ImageSize );
+ if ( (int)out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" );
{
int i,b,c=0; unsigned long * buf = NULL; unsigned char tmp = 0;
buf=(unsigned long *)out->Image;
- for ( c=0,i=0;i < in->Width * in->Height / 8;i++ )
+ for ( c=0,i=0;i < (int)(in->Width * in->Height / 8);i++ )
{
tmp=in->Image[i];
for ( b=0;b<8;b++ )
Index: bitmap.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/bitmap/bitmap.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- bitmap.h 5 Nov 2001 17:00:27 -0000 1.3
+++ bitmap.h 23 Feb 2002 15:12:51 -0000 1.4
@@ -14,6 +14,7 @@
#include "tga/tga.h"
#include "bmp/bmp.h"
#include "png/png.h"
+#include "../../mp_msg.h"
extern int bpRead( char * fname, txSample * bf );
extern int conv24to32( txSample * bf );
- Previous message: [Mplayer-cvslog] CVS: main/Gui app.c,1.9,1.10 events.h,1.8,1.9 gui.mak,1.7,1.8 interface.c,1.1,1.2 interface.h,1.1,1.2 error.c,1.2,NONE error.h,1.2,NONE language.c,1.2,NONE language.h,1.2,NONE timer.c,1.1,NONE timer.h,1.2,NONE
- Next message: [Mplayer-cvslog] CVS: main/Gui/bitmap/bmp bmp.c,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list