[MPlayer-cvslog] r30601 - in trunk/libvo: spuenc.c spuenc.h
reimar
subversion at mplayerhq.hu
Tue Feb 16 20:34:41 CET 2010
Author: reimar
Date: Tue Feb 16 20:34:41 2010
New Revision: 30601
Log:
Remove unused XPM-loading function from spuenc.c
Modified:
trunk/libvo/spuenc.c
trunk/libvo/spuenc.h
Modified: trunk/libvo/spuenc.c
==============================================================================
--- trunk/libvo/spuenc.c Tue Feb 16 20:07:06 2010 (r30600)
+++ trunk/libvo/spuenc.c Tue Feb 16 20:34:41 2010 (r30601)
@@ -229,50 +229,3 @@ pixbuf_encode_rle(int x, int y, int w, i
}
encode_do_control(x,y, ed, &pb);
}
-
-
-static void
-pixbuf_load_xpm( pixbuf* pb, char* xpm[] ) {
- int colors, chrs, l, n;
- char c[4], table[256];
- unsigned char *b, *i;
-
- sscanf( xpm[0], "%d %d %d %d", &pb->x, &pb->y, &colors, &chrs);
- if( colors > 4 ) {
- fprintf( stderr, "the pixmap MUST be 4 colors or less\n");
- exit (-1);
- }
- if( chrs != 1 ) {
- fprintf( stderr, "the XPM format MUST be 1 char per pixel\n");
- exit (-1);
- }
- if( pb->x > 0xFFF || pb->y > 0xFFF ) {
- fprintf( stderr, "the size is excesive\n");
- exit (-1);
- }
-
- for( l=0; l<colors; l++ ) {
- n= sscanf( xpm[l+1], "%c c #%x", &c[l], &pb->rgb[l]);
- if( n < 2 ) {
- /* this one is transparent */
- pb->rgb[l]=0xff000000;
- }
- table[(int)c[l]]=l;
- }
-
- pb->pixels= malloc( pb->x * pb->y );
- b= pb->pixels;
-
- for( l= colors+1; l <= pb->y + colors; l++ ) {
- i= xpm[l];
- while( (int)*i) {
- *b++ = table[*i++];
- }
- }
-}
-
-static void
-pixbuf_delete( pixbuf* pb ) {
- free( pb->pixels );
-}
-
Modified: trunk/libvo/spuenc.h
==============================================================================
--- trunk/libvo/spuenc.h Tue Feb 16 20:07:06 2010 (r30600)
+++ trunk/libvo/spuenc.h Tue Feb 16 20:34:41 2010 (r30601)
@@ -41,6 +41,5 @@ typedef struct {
} encodedata;
void pixbuf_encode_rle(int x, int y, int w, int h, char *inbuf, int stride, encodedata *ed);
-void pixbuf_delete(pixbuf* pb);
#endif /* MPLAYER_SPUENC_H */
More information about the MPlayer-cvslog
mailing list