Update of /cvsroot/mplayer/main In directory usw-pr-cvs1:/tmp/cvs-serv9261 Modified Files: codec-cfg.c Log Message: - applied overlay patch by Jens H Index: codec-cfg.c =================================================================== RCS file: /cvsroot/mplayer/main/codec-cfg.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** codec-cfg.c 2001/04/14 15:25:10 1.16 --- codec-cfg.c 2001/04/14 17:54:31 1.17 *************** *** 16,20 **** #include <string.h> ! #include "libvo/video_out.h" #include "codec-cfg.h" --- 16,20 ---- #include <string.h> ! #include "libvo/img_format.h" #include "codec-cfg.h" *************** *** 100,135 **** } static int add_to_out(char *sfmt, char *sflags, unsigned int *outfmt, unsigned char *outflags) { ! static char *fmtstr[] = { ! "YUY2", ! "YV12", ! "RGB8", ! "RGB15", ! "RGB16", ! "RGB24", ! "RGB32", ! "BGR8", ! "BGR15", ! "BGR16", ! "BGR24", ! "BGR32", ! NULL }; ! static unsigned int fmtnum[] = { ! IMGFMT_YUY2, ! IMGFMT_YV12, ! IMGFMT_RGB|8, ! IMGFMT_RGB|15, ! IMGFMT_RGB|16, ! IMGFMT_RGB|24, ! IMGFMT_RGB|32, ! IMGFMT_BGR|8, ! IMGFMT_BGR|15, ! IMGFMT_BGR|16, ! IMGFMT_BGR|24, ! IMGFMT_BGR|32 ! }; static char *flagstr[] = { "flip", --- 100,132 ---- } + static int add_to_out(char *sfmt, char *sflags, unsigned int *outfmt, unsigned char *outflags) { ! static struct { ! const char *name; ! const unsigned int num; ! } fmt_table[] = { ! "YV12", IMGFMT_YV12, ! "I420", IMGFMT_I420, ! "IYUV", IMGFMT_IYUV, ! ! "YUY2", IMGFMT_YUY2, ! "UYVY", IMGFMT_UYVY, ! "YVYU", IMGFMT_YVYU, ! ! "RGB8", IMGFMT_RGB|8, ! "RGB15", IMGFMT_RGB|15, ! "RGB16", IMGFMT_RGB|16, ! "RGB24", IMGFMT_RGB|24, ! "RGB32", IMGFMT_RGB|32, ! "BGR8", IMGFMT_BGR|8, ! "BGR15", IMGFMT_BGR|15, ! "BGR16", IMGFMT_BGR|16, ! "BGR24", IMGFMT_BGR|24, ! "BGR32", IMGFMT_BGR|32, ! NULL, 0 }; ! static char *flagstr[] = { "flip", *************** *** 166,178 **** do { ! for (j = 0; fmtstr[j] != NULL; j++) ! if (!strncmp(sfmt, fmtstr[j], strlen(fmtstr[j]))) break; ! if (fmtstr[j] == NULL) goto err_out_parse_error; ! outfmt[i] = fmtnum[j]; outflags[i] = flags; ++i; ! sfmt+=strlen(fmtstr[j]); } while ((*(sfmt++) == ',') && --freeslots); --- 163,175 ---- do { ! for (j = 0; fmt_table[j].name != NULL; j++) ! if (!strncmp(sfmt, fmt_table[j].name, strlen(fmt_table[j].name))) break; ! if (fmt_table[j].name == NULL) goto err_out_parse_error; ! outfmt[i] = fmt_table[j].num; outflags[i] = flags; ++i; ! sfmt+=strlen(fmt_table[j].name); } while ((*(sfmt++) == ',') && --freeslots); _______________________________________________ Mplayer-cvslog mailing list Mplayer-cvslog@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog