[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[73] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2010-01-05 11:40:02
|
Revision: 73 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=73&view=rev Author: nickols_k Date: 2010-01-05 11:39:56 +0000 (Tue, 05 Jan 2010) Log Message: ----------- support for new codecs and fourcc Modified Paths: -------------- etc/codecs.conf mplayerxp/codec-cfg.c mplayerxp/libvo/img_format.c mplayerxp/libvo/img_format.h mplayerxp/libvo/vo_opengl.c mplayerxp/libvo/vo_x11.c mplayerxp/libvo/vo_xvidix.c mplayerxp/m_option.c mplayerxp/mp_image.c mplayerxp/postproc/vf_scale.c Modified: etc/codecs.conf =================================================================== --- etc/codecs.conf 2010-01-05 08:04:53 UTC (rev 72) +++ etc/codecs.conf 2010-01-05 11:39:56 UTC (rev 73) @@ -24,6 +24,9 @@ fourcc mx3n,mx3p fourcc AVmp fourcc mp2v,mpgv + fourcc m2v1,m1v1 + fourcc PIM1 ; Pinnacle hardware-MPEG-1 + fourcc PIM2 ; Pinnacle hardware-MPEG-2 fourcc VCR2 fourcc LMP2 ; Lead mpeg2 in avi driver mpegpes @@ -117,6 +120,14 @@ out I420,IYUV out YV12 +videocodec ffv210 + info "FFmpeg V210 - 10-bit" + status untested + fourcc v210 + driver ffmpeg + dll v210 + out 422P16 + ; ============== MPLAYER OPENSOURCE CODECS ========= videocodec cvid @@ -191,6 +202,45 @@ dll "xanlib.dll" out BGR24,BGR15,BGR8 flip +videocodec nogatech + status working + fourcc NTN1,NTN2 + driver vfw + dll "nuvision.ax" + out BGR24 flip + +videocodec geomp4 + info "GeoVision Advanced MPEG-4" + status working + fourcc GMP4,GM40 + driver vfw + dll "GXAMP4.dll" + out BGR24 flip + +videocodec frwuvfw + info "Forward Uncompressed Video Codec" + status working + fourcc FRWU + driver vfw + dll "FRWU.dll" + out BGR24 flip + +videocodec frwdvfw + info "Forward JPEG Video Codec" + status working + fourcc FRWD + driver vfw + dll "FRWD.dll" + out BGR24 flip + +videocodec frwtvfw + info "Forward JPEG+Alpha Video" + status working + fourcc FRWT + driver vfw + dll "FRWT.dll" + out BGR24 flip + videocodec u263 info "UB Video H.263/H.263+/H.263++ Decoder" comment "added by Juanjo" @@ -262,7 +312,7 @@ out YUY2 yuvhack out BGR32,BGR24,BGR15 cpuflags mmx - + videocodec divx4vfw info "DivX4Windows-VFW (DivX 3.x, DivX4)" status working @@ -353,6 +403,16 @@ out YUY2 out BGR32,BGR24,BGR15 + +videocodec sp4x + info "SP4x codec - used by Aiptek MegaCam" + status working + fourcc SP40,SP41,SP42,SP43,SP44,SP45 + fourcc SP46,SP47 + driver vfw + dll "SP4X_32.DLL" + out BGR24,BGR15 flip + videocodec sp5x info "SP5x codec - used by Aiptek MegaCam" status working @@ -466,6 +526,39 @@ dll "psiv.dll" out BGR32,BGR24 flip +videocodec midivid3 + info "www.midivid.com/codec/mv3codec.html" + status working + fourcc MV30 + driver vfw + dll "MV3.dll" + out BGR24,BGR16 + +videocodec moyea + info "Moyea Flash to Video Converter" + comment "requires zlib1.dll" ; c7d4d685a0af2a09cbc21cb474358595 + status working + fourcc MFZ0 + driver vfw + dll "MyFlashZip0.ax" + out BGR24 flip + +videocodec nsvideo + info "Power VideoWorks video" + status working + fourcc NSVI + driver vfw + dll "nsvideo.dll" + out BGR24 flip + +videocodec smv2vfw + info "DideoNET SMV2" + status working + fourcc SMV2 + driver vfw + dll "smv2vfw.dll" + out BGR32,BGR24,BGR8,RGB32,RGB24,RGB8 flip + videocodec canopushq status working info "Canopus HQ Codec" @@ -484,6 +577,174 @@ dll "CLLCcodc.dll" out BGR24 +videocodec wavcvfw + info "centre for wavelets, approximation and infromation processing" + status working + fourcc wavc + driver vfw + dll "WavCWAIP.dll" + out BGR24 flip + +videocodec slifvfw + info "SoftLab-NSK Forward MPEG2 I-frames" + status working + fourcc slif + driver vfw + dll "slif.dll" + out RGB32 flip + +videocodec cjpg + info "Creative Labs Video Blaster Webcam" + comment "sequential jpeg files?" + status working + fourcc CJPG + driver vfw + dll "CtWbJpg.DLL" + out YUY2 + out UYVY + out BGR24,BGR15 + +videocodec kensington + info "kensington webcam" + status working + fourcc AJPG,ABYR + fourcc LBYR,JBYR ; untested, creative labs cam + fourcc UV12 ; untested + driver vfw + dll "aoxdxipl.ax" + out BGR24 flip + +videocodec xjpg + info "xiricam Veo PC Camera" + status working + fourcc XJPG + driver vfw + dll "camfc.dll" + out BGR24 flip + +videocodec tm2xvfw + info "TrueMotion 2.0" + status working + fourcc TM2X + fourcc TM2A + driver vfw + dll "tm2X.dll" + out BGR32,BGR24,BGR16 flip + +videocodec tr20 + info "TrueMotion RT" + status working + fourcc TR20 + driver vfw + dll "tr2032.dll" + out BGR15 + +videocodec sif1vfw + info "sif1 alpha4" + status working + fourcc SIF1 + driver vfw + dll "Sif1_vfw.dll" + out YV12,YUY2 + +videocodec bt411 + info "Brooktree 411 codec" + status working + fourcc BT20,Y41P + driver vfwex + dll "btvvc32.drv" + out BGR24 + +videocodec bwmpeg + info "Broadway MPEG Capture Codec" + status working + fourcc BW10 + driver vfwex + dll "bw10.dll" ;requires vtaccess.dll + out YV12,YUY2,I420 + +videocodec zdsoft + info "zdsoft screen recorder" + status working + fourcc ZDSV + driver vfwex + dll "scrvid.dll" + out BGR32 + +videocodec webtrain + info "WebTrain Communication lossless screen recorder" + status working + fourcc WTVC + driver vfw + dll "wtvc.dll" + out BGR16 flip + +videocodec kegavideo + info "Kega Video" + comment "requires MSVCR80.DLL on windows" + status working + fourcc KGV1 + driver vfw + dll "KGV1-VFW.dll" + out BGR16 flip + +videocodec xfire + info "xfire video" + status working + fourcc XFR1 + driver vfw + dll "xfcodec.dll" + out YV12,YUY2 + +videocodec vfapi + info "VFAPI rgb transcode codec" + status untested + fourcc vifp + driver vfwex + dll "VFCodec.dll" + out BGR24 flip + +videocodec eyecon + info "nokia eti camcorder eyecon" + status working + fourcc NUB0,NUB1,NUB2 + driver vfw + dll "nub2.dll" + out YV12,YUY2 + +videocodec smsvvfw + info "WorldConnect Wavelet Video" + comment "found in visualmail videos" + status working + fourcc SMSV + driver vfw + dll "wv32vfw.dll" + out BGR24 flip + +videocodec foxmotion + info "fox motion video" + status working + fourcc FMVC + driver vfw + dll "fmcodec.dll" + out BGR32,BGR24,BGR15 flip + +videocodec tridvfw + status untested + fourcc ty2c,TY2C,ty0n + fourcc TY2N,TY0N,T565 + driver vfw + dll "TRICDC32.DRV" + out BGR24 flip + +videocodec vdtzvfw + info "Telegeny VDTZ" + status working + fourcc VDTZ + driver vfw + dll "VTZ32.DLL" + out BGR24 flip + ; ======= DMO Video codecs ============= videocodec wmv9dmo info "Windows Media Video 9 DMO" @@ -544,6 +805,15 @@ guid 0x7bafb3b1, 0xd8f4, 0x4279, 0x92, 0x53, 0x27, 0xda, 0x42, 0x31, 0x08, 0xde out BGR32,BGR24,BGR16 +videocodec gotomeeting + info "GoToMeeting codec" + status working + fourcc G2M2,G2M3 + driver dmo + dll "G2M.dll" + guid 0x23F891A4, 0x572B, 0x474A, 0x86, 0xDA, 0x66, 0xCD, 0xD3, 0xD1, 0xAC, 0x2E + out BGR24,RGB24 flip + videocodec wmv7 info "Windows Media Video 7" status working @@ -579,6 +849,16 @@ ; out YUY2 ; YUV output faulting out BGR32,BGR24,BGR16,BGR15 +videocodec sif1ds + info "sif1 alpha4" + status buggy + comment "one frame every 5 seconds?" + fourcc SIF1 + driver dshow + dll "Sif1Dec.ax" + guid 0x31666973, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71 + out BGR32 + videocodec qdv info "Sony Digital Video (DV)" status working @@ -1254,7 +1534,7 @@ videocodec sp6x info "SP6x codec" status working - fourcc SP61 + fourcc SP60,SP61,SP62 driver vfw dll "sp6x_32.dll" out BGR24 flip @@ -1284,9 +1564,19 @@ fourcc ljpg,LJPG ; lossless jpeg fourcc dmb1,DMB1 ; MJPEG by Matrox Rainbow Runner fourcc MJLS ; JPEG-LS custom FOURCC for avi - encoder + fourcc MMJP,QIVG + fourcc ACDV ; ACDSee jpeg + fourcc SLMJ ; SL M-JPEG + fourcc MVJP ; Midvid JPEG Video Codec + fourcc IJLV ; Intel JPEG Library Video Codec + fourcc avi1,avi2 + fourcc MTSJ driver ffmpeg dll mjpeg out YV12,I420,IYUV + out BGR32 ; lossless JPEG + out RGB24 ; JPEG-LS + out Y800 videocodec ffmjpegb info "FFmpeg MJPEG-B decoder" @@ -1310,9 +1600,11 @@ videocodec ffh263 info "FFmpeg H263+ decoder" status working + fourcc T263 fourcc D263 ; DEC H263 fourcc ILVR ; ITU H263+ fourcc L263 ; Lead H263 + fourcc VX1K ; Agora Labs VX1000S H263 fourcc H263,h263 fourcc M263,m263 fourcc S263,s263 @@ -1379,6 +1671,7 @@ fourcc MPG3,mpg3 fourcc MP43,mp43 ; M$ MPEG4 v3 (fourcc mapping to div3) fourcc DIV3,div3 + fourcc DIVF,divf ; divx4.12 fourcc DIV4,div4 fourcc DIV5,div5 ; DivX 3.20 fourcc DIV6,div6 ; -||- @@ -1386,6 +1679,7 @@ fourcc COL0,col0 fourcc COL1,col1 ; Cool codec (based on mpg4ds32.ax) fourcc 3IVD,3ivd ; divxdoctored files (3ivx.com) + fourcc DVX3 driver ffmpeg dll msmpeg4 out YV12,I420,IYUV @@ -1393,6 +1687,7 @@ videocodec ffmp42 info "FFmpeg M$ MPEG-4 v2" status working + fourcc DIV1,div1 fourcc DIV2,div2 fourcc MP42,mp42 driver ffmpeg @@ -1442,6 +1737,22 @@ dll cyuv out 411P +videocodec ffaura + info "Auravision Aura (libavcodec)" + status working + fourcc aura,AURA + driver ffmpeg + dll "aura" + out 411P + +videocodec ffaura2 + info "Auravision Aura 2 (libavcodec)" + status working + fourcc aur2,AUR2 + driver ffmpeg + dll "aura2" + out 422P + videocodec ffsvq1 info "Sorenson video codec v1" status working @@ -1450,6 +1761,14 @@ dll svq1 out YVU9 +videocodec ffr210 + info "FFmpeg R210 - 10-bit RGB" + status working + fourcc r210 + driver ffmpeg + dll "r210" + out RGB48BE,RGB48LE + videocodec ff4xm info "FFmpeg 4XM video" status working @@ -1504,6 +1823,10 @@ fourcc m4cc,M4CC fourcc hdx4,HDX4 fourcc FVFW,fvfw + fourcc FFDS + fourcc DCOD,MVXM,EM4A,PM4V + fourcc M4T3,DMK2,DIGI,INMC + fourcc EPHV,SN40 driver ffmpeg dll mpeg4 ;opendivx out YV12,I420,IYUV @@ -1568,6 +1891,8 @@ videocodec ffdv info "Raw DV decoder using libavcodec" status working + fourcc CDVC,cdvc + fourcc CDVH,cdvh ; Canopus DVCPRO HD fourcc DVSD,dvsd ; PAL fourcc DVCS,dvcs ; NTSC ? fourcc "dvcp" ; PAL DV in .mov @@ -1580,6 +1905,7 @@ fourcc dvhq,dvhp fourcc dvh5,dvh6,dvh3 fourcc dvhd,dvsl,dv25 + fourcc dvs1,dvh1 driver ffmpeg dll dvvideo out YV12,411P @@ -1742,7 +2068,7 @@ driver ffmpeg dll h263 out YV12,I420,IYUV flip - + videocodec fftheora info "FFmpeg's Theora" status untested @@ -1755,6 +2081,7 @@ info "Duck Truemotion1" status working fourcc DUCK + fourcc PVEZ driver ffmpeg dll "truemotion1" out BGR15 @@ -2164,6 +2491,13 @@ dll c93 out BGR8 +videocodec fffrwu + info "FFmpeg Forward Uncompressed Video Codec" + status working + fourcc FRWU + driver ffmpeg + dll "FRWU" + out UYVY ; ============== RAW (uncompressed) and NULL CODECS ========= @@ -2590,6 +2924,13 @@ driver qtaudio dll "QuickTime.qts" +audiocodec zygoaudio + info "Zygo audio" + status working + fourcc SPXN + driver qtaudio + dll "ZyGoAudioS.qtx" + ;============ FFMPEG's codecs audiocodec ffra144 @@ -3053,6 +3394,14 @@ driver ffmpeg dll adpcm_yamaha +audiocodec fftwinvq + info "FFmpeg TwinVQ" + status working + fourcc TWI2 ; internal MPlayer FourCC, different from mplayer's TwinVQ decoder + ; since lavf demuxer is incompatible with it + driver ffmpeg + dll twinvq + ; =============== Windows ACM codecs audiocodec msadpcmacm Modified: mplayerxp/codec-cfg.c =================================================================== --- mplayerxp/codec-cfg.c 2010-01-05 08:04:53 UTC (rev 72) +++ mplayerxp/codec-cfg.c 2010-01-05 11:39:56 UTC (rev 73) @@ -132,9 +132,19 @@ {"CLJR", IMGFMT_CLJR}, {"CYUV", IMGFMT_cyuv}, +{"444P16BE", IMGFMT_444P16_BE}, +{"444P16LE", IMGFMT_444P16_LE}, +{"444P16", IMGFMT_444P16}, +{"422P16BE", IMGFMT_422P16_BE}, +{"422P16LE", IMGFMT_422P16_LE}, +{"422P16", IMGFMT_422P16}, +{"420P16BE", IMGFMT_420P16_BE}, +{"420P16LE", IMGFMT_420P16_LE}, +{"420P16", IMGFMT_420P16}, {"444P", IMGFMT_444P}, {"422P", IMGFMT_422P}, {"411P", IMGFMT_411P}, +{"420A", IMGFMT_420A}, {"NV12", IMGFMT_NV12}, {"NV21", IMGFMT_NV21}, @@ -156,6 +166,9 @@ {"YUVP", IMGFMT_YUVP}, {"UYVP", IMGFMT_UYVP}, +{"RGB48LE",IMGFMT_RGB48LE}, +{"RGB48BE",IMGFMT_RGB48BE}, +{"RGB48", IMGFMT_RGB48NE}, {"RGB4", IMGFMT_RGB|4}, {"RGB8", IMGFMT_RGB|8}, {"RGB15", IMGFMT_RGB|15}, @@ -166,6 +179,9 @@ {"ARGB", IMGFMT_ARGB}, {"RGB1", IMGFMT_RGB|1}, +{"BGR48LE",IMGFMT_BGR48LE}, +{"BGR48BE",IMGFMT_BGR48BE}, +{"BGR48", IMGFMT_BGR48NE}, {"BGR4", IMGFMT_BGR|4}, {"BGR8", IMGFMT_BGR|8}, {"BGR15", IMGFMT_BGR|15}, @@ -219,16 +235,20 @@ sflags+=strlen(flagstr[j]); } while (*(sflags++) == ','); - if (*(--sflags) != '\0') + if (*(--sflags) != '\0') { + MSG_ERR("\n{found unparsed flg tile: %s}\n",sflags); goto err_out_parse_error; + } } 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) + if (fmt_table[j].name == NULL) { + MSG_ERR("\n{%s is not registered format}\n",sfmt); goto err_out_parse_error; + } outfmt[i] = fmt_table[j].num; outflags[i] = flags; ++i; @@ -238,9 +258,11 @@ if (!freeslots) goto err_out_too_many; - if (*(--sfmt) != '\0') + if (*(--sfmt) != '\0') { + MSG_ERR("\n{found unparsed tile %s}\n",sfmt); goto err_out_parse_error; - + } + return 1; err_out_too_many: MSG_ERR("too many out..."); @@ -378,14 +400,15 @@ codecs_t **codecsp = NULL;// points to audio_codecs or to video_codecs char *endptr; // strtoul()... int *nr_codecsp; + const char *err_hint=NULL; int codec_type; /* TYPE_VIDEO/TYPE_AUDIO */ int tmp, i; // in case we call it secont time if(video_codecs!=NULL)free(video_codecs); else video_codecs=NULL; - - if(audio_codecs!=NULL)free(audio_codecs); + + if(audio_codecs!=NULL)free(audio_codecs); else audio_codecs=NULL; nr_vcodecs = 0; @@ -414,8 +437,8 @@ goto out; if (!strcmp(token[0], "audiocodec") || !strcmp(token[0], "videocodec")) goto loop_enter; + err_hint=token[0]; goto err_out_parse_error; - while ((tmp = get_token(1, 1)) != RET_EOF) { if (tmp == RET_EOL) continue; @@ -440,7 +463,7 @@ } if (!(*codecsp = (codecs_t *) realloc(*codecsp, sizeof(codecs_t) * (*nr_codecsp + 2)))) { - MSG_FATAL("can't realloc '*codecsp': %s\n", strerror(errno)); + MSG_FATAL(" can't realloc '*codecsp': %s\n", strerror(errno)); goto err_out; } codec=*codecsp + *nr_codecsp; @@ -449,53 +472,71 @@ memset(codec->fourcc, 0xff, sizeof(codec->fourcc)); memset(codec->outfmt, 0xff, sizeof(codec->outfmt)); memset(codec->infmt, 0xff, sizeof(codec->infmt)); - + if (get_token(1, 1) < 0) goto err_out_parse_error; for (i = 0; i < *nr_codecsp - 1; i++) { if(( (*codecsp)[i].codec_name!=NULL) && (!strcmp(token[0], (*codecsp)[i].codec_name)) ) { - MSG_ERR("codec name '%s' isn't unique", token[0]); + MSG_ERR(" codec name '%s' isn't unique", token[0]); goto err_out_print_linenum; } } strncpy(codec->codec_name,token[0],sizeof(codec->codec_name)); codec->codec_name[sizeof(codec->codec_name)-1]=0; } else if (!strcmp(token[0], "info")) { - if (codec->s_info[0] || get_token(1, 1) < 0) + err_hint="info"; + if (codec->s_info[0] || get_token(1, 1) < 0) { goto err_out_parse_error; + } strncpy(codec->s_info,token[0],sizeof(codec->s_info)); codec->s_info[sizeof(codec->s_info)-1]=0; } else if (!strcmp(token[0], "comment")) { - if (get_token(1, 1) < 0) + err_hint="comment"; + if (get_token(1, 1) < 0) { goto err_out_parse_error; + } strncat(codec->s_comment,token[0],sizeof(codec->s_comment)); codec->s_comment[sizeof(codec->s_comment)-1]=0; } else if (!strcmp(token[0], "fourcc")) { - if (get_token(1, 2) < 0) + err_hint="fourcc"; + if (get_token(1, 2) < 0) { goto err_out_parse_error; + } if (!add_to_fourcc(token[0], token[1], codec->fourcc, - codec->fourccmap)) + codec->fourccmap)) { + MSG_ERR(" can't add fourcc '%s'",token[0]); goto err_out_print_linenum; + } } else if (!strcmp(token[0], "format")) { - if (get_token(1, 1) < 0) + err_hint="format"; + if (get_token(1, 1) < 0) { goto err_out_parse_error; - if (!add_to_format(token[0], codec->fourcc,codec->fourccmap)) + } + if (!add_to_format(token[0], codec->fourcc,codec->fourccmap)) { + MSG_ERR(" can't add format '%s'", token[0]); goto err_out_print_linenum; + } } else if (!strcmp(token[0], "driver")) { - if (get_token(1, 1) < 0) + err_hint="driver"; + if (get_token(1, 1) < 0) { goto err_out_parse_error; + } strncpy(codec->driver_name,token[0],sizeof(codec->driver_name)); codec->driver_name[sizeof(codec->driver_name)-1]=0; } else if (!strcmp(token[0], "dll")) { - if (get_token(1, 1) < 0) + err_hint="dll"; + if (get_token(1, 1) < 0) { goto err_out_parse_error; + } strncpy(codec->dll_name,token[0],sizeof(codec->dll_name)); codec->dll_name[sizeof(codec->dll_name)-1]=0; } else if (!strcmp(token[0], "guid")) { - if (get_token(11, 11) < 0) + err_hint="guid"; + if (get_token(11, 11) < 0) { goto err_out_parse_error; + } codec->guid.f1=strtoul(token[0],&endptr,0); if ((*endptr != ',' || *(endptr + 1) != '\0') && *endptr != '\0') @@ -515,27 +556,39 @@ goto err_out_parse_error; } } else if (!strcmp(token[0], "out")) { - if (get_token(1, 2) < 0) + err_hint="out"; + if (get_token(1, 2) < 0) { goto err_out_parse_error; + } if (!add_to_inout(token[0], token[1], codec->outfmt, - codec->outflags)) + codec->outflags)) { + MSG_ERR(" can't add outfmt '%s'", token[0]); goto err_out_print_linenum; + } } else if (!strcmp(token[0], "in")) { - if (get_token(1, 2) < 0) + err_hint="in"; + if (get_token(1, 2) < 0) { goto err_out_parse_error; + } if (!add_to_inout(token[0], token[1], codec->infmt, - codec->inflags)) + codec->inflags)) { + MSG_ERR(" can't add infmt '%s'", token[0]); goto err_out_print_linenum; + } } else if (!strcmp(token[0], "flags")) { - if (get_token(1, 1) < 0) + err_hint="flags"; + if (get_token(1, 1) < 0) { goto err_out_parse_error; + } if (!strcmp(token[0], "seekable")) codec->flags |= CODECS_FLAG_SEEKABLE; else goto err_out_parse_error; } else if (!strcmp(token[0], "status")) { - if (get_token(1, 1) < 0) + err_hint="status"; + if (get_token(1, 1) < 0) { goto err_out_parse_error; + } if (!strcasecmp(token[0], "working")) codec->status = CODECS_STATUS_WORKING; else if (!strcasecmp(token[0], "crashing")) @@ -547,31 +600,34 @@ else goto err_out_parse_error; } else if (!strcmp(token[0], "cpuflags")) { + err_hint="cpuflags"; if (get_token(1, 1) < 0) goto err_out_parse_error; if (!(codec->cpuflags = get_cpuflags(token[0]))) goto err_out_parse_error; } else if (!strcasecmp(token[0], "priority")) { + err_hint="priority"; if (get_token(1, 1) < 0) goto err_out_parse_error; - codec->priority = atoi(token[0]); - } else - goto err_out_parse_error; - } - if (!validate_codec(codec, codec_type)) - goto err_out_not_valid; - MSG_INFO("%d audio & %d video codecs\n", nr_acodecs, nr_vcodecs); - if(video_codecs) video_codecs[nr_vcodecs].codec_name[0] = '\0'; - if(audio_codecs) audio_codecs[nr_acodecs].codec_name[0] = '\0'; + codec->priority = atoi(token[0]); + } else + goto err_out_parse_error; + } + if (!validate_codec(codec, codec_type)) + goto err_out_not_valid; + MSG_INFO("%d audio & %d video codecs\n", nr_acodecs, nr_vcodecs); + if(video_codecs) video_codecs[nr_vcodecs].codec_name[0] = '\0'; + if(audio_codecs) audio_codecs[nr_acodecs].codec_name[0] = '\0'; out: - free(line); - line=NULL; - fclose(fp); - return 1; + free(line); + line=NULL; + fclose(fp); + return 1; err_out_parse_error: - MSG_ERR("parse error"); + MSG_ERR("parse error "); err_out_print_linenum: + if(err_hint) MSG_ERR("(%s)",err_hint); PRINT_LINENUM; err_out: if (audio_codecs) Modified: mplayerxp/libvo/img_format.c =================================================================== --- mplayerxp/libvo/img_format.c 2010-01-05 08:04:53 UTC (rev 72) +++ mplayerxp/libvo/img_format.c 2010-01-05 11:39:56 UTC (rev 73) @@ -14,6 +14,7 @@ case IMGFMT_RGB15: return("RGB 15-bit"); case IMGFMT_RGB16: return("RGB 16-bit"); case IMGFMT_RGB24: return("RGB 24-bit"); + case IMGFMT_RGB48NE: return("RGB 48-bit"); // case IMGFMT_RGB32: return("RGB 32-bit"); case IMGFMT_BGR1: return("BGR 1-bit"); case IMGFMT_BGR4: return("BGR 4-bit"); @@ -22,6 +23,7 @@ case IMGFMT_BGR15: return("BGR 15-bit"); case IMGFMT_BGR16: return("BGR 16-bit"); case IMGFMT_BGR24: return("BGR 24-bit"); + case IMGFMT_BGR48NE: return("BGR 48-bit"); // case IMGFMT_BGR32: return("BGR 32-bit"); case IMGFMT_ABGR: return("ABGR"); case IMGFMT_BGRA: return("BGRA"); @@ -61,6 +63,13 @@ case IMGFMT_CLJR: return("Packed CLJR"); case IMGFMT_YUVP: return("Packed YUVP"); case IMGFMT_UYVP: return("Packed UYVP"); + case IMGFMT_420A: return "Planar YV12 with alpha"; + case IMGFMT_420P16_LE: return "Planar 420P 16-bit little-endian"; + case IMGFMT_420P16_BE: return "Planar 420P 16-bit big-endian"; + case IMGFMT_422P16_LE: return "Planar 422P 16-bit little-endian"; + case IMGFMT_422P16_BE: return "Planar 422P 16-bit big-endian"; + case IMGFMT_444P16_LE: return "Planar 444P 16-bit little-endian"; + case IMGFMT_444P16_BE: return "Planar 444P 16-bit big-endian"; case IMGFMT_MPEGPES: return("Mpeg PES"); case IMGFMT_ZRMJPEGNI: return("Zoran MJPEG non-interlaced"); case IMGFMT_ZRMJPEGIT: return("Zoran MJPEG top field first"); @@ -88,6 +97,8 @@ { PIX_FMT_YUV410P, IMGFMT_YVU9 }, ///< Planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples) { PIX_FMT_YUV410P, IMGFMT_IF09 }, ///< rough alias { PIX_FMT_YUV411P, IMGFMT_411P }, ///< Planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) + { PIX_FMT_RGB48BE, IMGFMT_RGB48BE }, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, big-endian + { PIX_FMT_RGB48LE, IMGFMT_RGB48LE }, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, little-endian { PIX_FMT_RGB565, IMGFMT_RGB16}, ///< Packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), in cpu endianness { PIX_FMT_RGB555, IMGFMT_RGB15}, ///< Packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), in cpu endianness most significant bit to 1 { PIX_FMT_GRAY8, IMGFMT_Y800 }, ///< Y , 8bpp @@ -115,6 +126,14 @@ { PIX_FMT_NV12, IMGFMT_NV12 }, ///< Planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 for UV { PIX_FMT_NV21, IMGFMT_NV21 }, ///< as above, but U and V bytes are swapped + { PIX_FMT_YUVA420P, IMGFMT_420A },///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples) + { PIX_FMT_YUV420P16LE, IMGFMT_420P16_LE }, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian + { PIX_FMT_YUV420P16BE, IMGFMT_420P16_BE },///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian + { PIX_FMT_YUV422P16LE, IMGFMT_422P16_LE },///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + { PIX_FMT_YUV422P16BE, IMGFMT_422P16_BE },///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + { PIX_FMT_YUV444P16LE, IMGFMT_444P16_LE },///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian + { PIX_FMT_YUV444P16BE, IMGFMT_444P16_BE },///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + { PIX_FMT_RGB32_1, IMGFMT_RGBA }, ///< Packed RGB 8:8:8, 32bpp, (msb)8R 8G 8B 8A(lsb), in cpu endianness { PIX_FMT_BGR32_1, IMGFMT_BGRA } ///< Packed RGB 8:8:8, 32bpp, (msb)8B 8G 8R 8A(lsb), in cpu endianness }; @@ -142,6 +161,11 @@ int rgbfmt_depth(int fmt) { switch(pixfmt_from_fourcc(fmt)) { + case PIX_FMT_RGB48BE: + case PIX_FMT_RGB48LE: +// case PIX_FMT_BGR48BE: +// case PIX_FMT_BGR48LE: + return 48; case PIX_FMT_BGRA: case PIX_FMT_ABGR: case PIX_FMT_RGBA: @@ -169,6 +193,6 @@ case PIX_FMT_MONOBLACK: return 1; default: - return 0; + return 256; } } Modified: mplayerxp/libvo/img_format.h =================================================================== --- mplayerxp/libvo/img_format.h 2010-01-05 08:04:53 UTC (rev 72) +++ mplayerxp/libvo/img_format.h 2010-01-05 11:39:56 UTC (rev 73) @@ -15,6 +15,8 @@ #define IMGFMT_RGB16 (IMGFMT_RGB|16) #define IMGFMT_RGB24 (IMGFMT_RGB|24) #define IMGFMT_RGB32 (IMGFMT_RGB|32) +#define IMGFMT_RGB48LE (IMGFMT_RGB|48) +#define IMGFMT_RGB48BE (IMGFMT_RGB|48|128) #define IMGFMT_BGR_MASK 0xFFFFFF00 #define IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8)) @@ -26,8 +28,8 @@ #define IMGFMT_BGR16 (IMGFMT_BGR|16) #define IMGFMT_BGR24 (IMGFMT_BGR|24) #define IMGFMT_BGR32 (IMGFMT_BGR|32) -#define IMGFMT_RGB48LE (IMGFMT_RGB|48) -#define IMGFMT_RGB48BE (IMGFMT_RGB|48|128) +#define IMGFMT_BGR48LE (IMGFMT_BGR|48) +#define IMGFMT_BGR48BE (IMGFMT_BGR|48|128) #ifdef WORDS_BIGENDIAN #define IMGFMT_ABGR IMGFMT_RGB32 @@ -35,12 +37,14 @@ #define IMGFMT_ARGB IMGFMT_BGR32 #define IMGFMT_RGBA (IMGFMT_BGR32|64) #define IMGFMT_RGB48NE IMGFMT_RGB48BE +#define IMGFMT_BGR48NE IMGFMT_RGB48LE #else #define IMGFMT_ABGR (IMGFMT_BGR32|64) #define IMGFMT_BGRA IMGFMT_BGR32 #define IMGFMT_ARGB (IMGFMT_RGB32|64) #define IMGFMT_RGBA IMGFMT_RGB32 #define IMGFMT_RGB48NE IMGFMT_RGB48LE +#define IMGFMT_BGR48NE IMGFMT_RGB48BE #endif /* old names for compatibility */ @@ -94,6 +98,31 @@ #define IMGFMT_YUVP 0x50565559 #define IMGFMT_UYVP 0x50565955 +// 4:2:0 planar with alpha +#define IMGFMT_420A 0x41303234 + +#define IMGFMT_444P16_LE 0x51343434 +#define IMGFMT_444P16_BE 0x34343451 +#define IMGFMT_422P16_LE 0x51323234 +#define IMGFMT_422P16_BE 0x34323251 +#define IMGFMT_420P16_LE 0x51303234 +#define IMGFMT_420P16_BE 0x34323051 +#if HAVE_BIGENDIAN +#define IMGFMT_444P16 IMGFMT_444P16_BE +#define IMGFMT_422P16 IMGFMT_422P16_BE +#define IMGFMT_420P16 IMGFMT_420P16_BE +#else +#define IMGFMT_444P16 IMGFMT_444P16_LE +#define IMGFMT_422P16 IMGFMT_422P16_LE +#define IMGFMT_420P16 IMGFMT_420P16_LE +#endif + +#define IMGFMT_IS_YUVP16_LE(fmt) (((fmt ^ IMGFMT_420P16_LE) & 0xff0000ff) == 0) +#define IMGFMT_IS_YUVP16_BE(fmt) (((fmt ^ IMGFMT_420P16_BE) & 0xff0000ff) == 0) +#define IMGFMT_IS_YUVP16_NE(fmt) (((fmt ^ IMGFMT_420P16 ) & 0xff0000ff) == 0) +#define IMGFMT_IS_YUVP16(fmt) (IMGFMT_IS_YUVP16_LE(fmt) || IMGFMT_IS_YUVP16_BE(fmt)) + + /* Compressed Formats */ #define IMGFMT_MPEGPES (('M'<<24)|('P'<<16)|('E'<<8)|('S')) /* Formats that are understood by zoran chips, we include Modified: mplayerxp/libvo/vo_opengl.c =================================================================== --- mplayerxp/libvo/vo_opengl.c 2010-01-05 08:04:53 UTC (rev 72) +++ mplayerxp/libvo/vo_opengl.c 2010-01-05 11:39:56 UTC (rev 73) @@ -428,12 +428,14 @@ static uint32_t __FASTCALL__ query_format( vo_query_fourcc_t* format ) { - MSG_DBG2("vo_x11: query_format was called: %x (%s)\n",format->fourcc,vo_format_name(format->fourcc)); - if (IMGFMT_IS_BGR(format->fourcc)||IMGFMT_IS_RGB(format->fourcc)) + MSG_DBG2("vo_opengl: query_format was called: %x (%s)\n",format->fourcc,vo_format_name(format->fourcc)); + if((IMGFMT_IS_BGR(format->fourcc)||IMGFMT_IS_RGB(format->fourcc))&&rgbfmt_depth(format->fourcc)<48) { + MSG_DBG2("vo_opengl: OK\n"); return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_FLIP | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN; } + MSG_DBG2("vo_opengl: FALSE\n"); return 0; } Modified: mplayerxp/libvo/vo_x11.c =================================================================== --- mplayerxp/libvo/vo_x11.c 2010-01-05 08:04:53 UTC (rev 72) +++ mplayerxp/libvo/vo_x11.c 2010-01-05 11:39:56 UTC (rev 73) @@ -423,9 +423,9 @@ { MSG_DBG2("vo_x11: query_format was called: %x (%s)\n",format->fourcc,vo_format_name(format->fourcc)); #ifdef WORDS_BIGENDIAN - if (IMGFMT_IS_BGR(format->fourcc)) + if (IMGFMT_IS_BGR(format->fourcc) && rgbfmt_depth(format->fourcc)<48) #else - if (IMGFMT_IS_RGB(format->fourcc)) + if (IMGFMT_IS_RGB(format->fourcc) && rgbfmt_depth(format->fourcc)<48) #endif { if (rgbfmt_depth(format->fourcc) == (unsigned)vo_depthonscreen) Modified: mplayerxp/libvo/vo_xvidix.c =================================================================== --- mplayerxp/libvo/vo_xvidix.c 2010-01-05 08:04:53 UTC (rev 72) +++ mplayerxp/libvo/vo_xvidix.c 2010-01-05 11:39:56 UTC (rev 73) @@ -187,7 +187,7 @@ image_width = width; image_format = format; - if (IMGFMT_IS_RGB(format) || IMGFMT_IS_BGR(format)) + if ((IMGFMT_IS_RGB(format) || IMGFMT_IS_BGR(format)) && rgbfmt_depth(format)<48) { image_depth = rgbfmt_depth(format); } Modified: mplayerxp/m_option.c =================================================================== --- mplayerxp/m_option.c 2010-01-05 08:04:53 UTC (rev 72) +++ mplayerxp/m_option.c 2010-01-05 11:39:56 UTC (rev 73) @@ -1014,9 +1014,19 @@ const char* name; unsigned int fmt; } mp_imgfmt_list[] = { + {"444p16be", IMGFMT_444P16_BE}, + {"444p16le", IMGFMT_444P16_LE}, + {"444p16", IMGFMT_444P16}, + {"422p16be", IMGFMT_422P16_BE}, + {"422p16le", IMGFMT_422P16_LE}, + {"422p16", IMGFMT_422P16}, + {"420p16be", IMGFMT_420P16_BE}, + {"420p16le", IMGFMT_420P16_LE}, + {"420p16", IMGFMT_420P16}, {"444p", IMGFMT_444P}, {"422p", IMGFMT_422P}, {"411p", IMGFMT_411P}, + {"420a", IMGFMT_420A}, {"yuy2", IMGFMT_YUY2}, {"uyvy", IMGFMT_UYVY}, {"yvu9", IMGFMT_YVU9}, @@ -1030,6 +1040,9 @@ {"y8", IMGFMT_Y8}, {"nv12", IMGFMT_NV12}, {"nv21", IMGFMT_NV21}, + {"bgr48be", IMGFMT_BGR48BE}, + {"bgr48le", IMGFMT_BGR48LE}, + {"bgr48", IMGFMT_BGR48NE}, {"bgr24", IMGFMT_BGR24}, {"bgr32", IMGFMT_BGR32}, {"bgr16", IMGFMT_BGR16}, @@ -1038,6 +1051,9 @@ {"bgr4", IMGFMT_BGR4}, {"bg4b", IMGFMT_BG4B}, {"bgr1", IMGFMT_BGR1}, + {"rgb48be", IMGFMT_RGB48BE}, + {"rgb48le", IMGFMT_RGB48LE}, + {"rgb48", IMGFMT_RGB48NE}, {"rgb24", IMGFMT_RGB24}, {"rgb32", IMGFMT_RGB32}, {"rgb16", IMGFMT_RGB16}, @@ -1196,7 +1212,6 @@ return d; return -1e100; } - static int parse_time(const m_option_t* opt,const char *name, char *param, void* dst, int src) { @@ -1204,14 +1219,14 @@ if (param == NULL || strlen(param) == 0) return M_OPT_MISSING_PARAM; - + time = parse_timestring(param); if (time == -1e100) { MSG_ERR("Option %s: invalid time: '%s'\n", name,param); return M_OPT_INVALID; } - + if (dst) *(double *)dst = time; return 1; @@ -1240,7 +1255,7 @@ if (param == NULL || strlen(param) == 0) return M_OPT_MISSING_PARAM; - + ts.pos=0; /* End at size parsing */ if(sscanf(param, "%lf%3s", &end_at, unit) == 2) { @@ -1269,7 +1284,7 @@ name,param); return M_OPT_INVALID; } - + ts.type = END_AT_TIME; ts.pos = end_at; out: @@ -1291,7 +1306,6 @@ NULL }; - //// Objects (i.e. filters, etc) settings #include "m_struct.h" @@ -1439,7 +1453,7 @@ ret = malloc((n+2)*2*sizeof(char*)); n = nold = 0; last_ptr = params; - + while(last_ptr && last_ptr[0] != '\0') { ptr = strchr(last_ptr,separator); if(!ptr) { @@ -1459,7 +1473,7 @@ } ret[n*2] = ret[n*2+1] = NULL; *_ret = ret; - + return 1; } @@ -1489,7 +1503,7 @@ for(r = 0 ; opts[r] ; r += 2) m_struct_set(desc,dst,opts[r],opts[r+1]); - return 1; + return 1; } @@ -1532,7 +1546,6 @@ char *param,**plist = NULL; const m_struct_t* desc; m_obj_settings_t *ret = _ret ? *_ret : NULL; - // Now check that the object exists param = strchr(str,'='); @@ -1748,7 +1761,7 @@ if( ((opt->flags & M_OPT_MIN) && (n < opt->min)) || ((opt->flags & M_OPT_MAX) && (n > opt->max)) ) return M_OPT_OUT_OF_RANGE; - + if(dst) { if(queue) { int qsize; @@ -1767,7 +1780,7 @@ memcpy(&head[hsize],res,(n+1)*sizeof(m_obj_settings_t)); free(res); res = head; - } + } VAL(dst) = res; } return 1; @@ -1802,9 +1815,7 @@ if(VAL(dst)) free_obj_settings_list(dst); if(!s) return; - - - + for(n = 0 ; s[n].name ; n++) /* NOP */; d = malloc((n+1)*sizeof(m_obj_settings_t)); @@ -1831,8 +1842,6 @@ free_obj_settings_list, }; - - static int parse_obj_presets(const m_option_t* opt,const char *name, char *param, void* dst, int src) { m_obj_presets_t* obj_p = (m_obj_presets_t*)opt->priv; @@ -1878,7 +1887,7 @@ } if(!dst) return 1; - + for(i = 0 ; in_desc->fields[i].name ; i++) { const m_option_t* out_opt = m_option_list_find(out_desc->fields, in_desc->fields[i].name); @@ -1910,7 +1919,7 @@ int pos1, pos2, r, v6addr = 0; char *ptr1=NULL, *ptr2=NULL, *ptr3=NULL, *ptr4=NULL; m_struct_t* desc = opt->priv; - + if(!desc) { MSG_ERR("Option %s: Custom URL needs a pointer to a m_struct_t in the priv field.\n",name); return M_OPT_PARSER_ERR; @@ -1956,7 +1965,7 @@ ptr2 = NULL; } if( ptr2!=NULL ) { - + // We got something, at least a username... if(!m_option_list_find(desc->fields,"username")) { MSG_WARN("Option %s: This URL doesn't have a username part.\n",name); @@ -2013,7 +2022,7 @@ ptr2 = ptr3; v6addr = 1; } else { - ptr2 = ptr1; + ptr2 = ptr1; } // look if the port is given @@ -2113,4 +2122,4 @@ NULL, NULL, NULL -}; +}; Modified: mplayerxp/mp_image.c =================================================================== --- mplayerxp/mp_image.c 2010-01-05 08:04:53 UTC (rev 72) +++ mplayerxp/mp_image.c 2010-01-05 11:39:56 UTC (rev 73) @@ -52,6 +52,7 @@ mpi->chroma_x_shift=1; mpi->chroma_y_shift=1; return; + case IMGFMT_420A: case IMGFMT_IF09: mpi->num_planes=4; case IMGFMT_YVU9: @@ -62,6 +63,15 @@ mpi->chroma_x_shift=2; mpi->chroma_y_shift=2; return; + case IMGFMT_444P16_LE: + case IMGFMT_444P16_BE: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=48; + mpi->chroma_width=(mpi->width); + mpi->chroma_height=(mpi->height); + mpi->chroma_x_shift=0; + mpi->chroma_y_shift=0; + return; case IMGFMT_444P: mpi->flags|=MP_IMGFLAG_PLANAR; mpi->bpp=24; @@ -70,6 +80,15 @@ mpi->chroma_x_shift=0; mpi->chroma_y_shift=0; return; + case IMGFMT_422P16_LE: + case IMGFMT_422P16_BE: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=32; + mpi->chroma_width=(mpi->width>>1); + mpi->chroma_height=(mpi->height); + mpi->chroma_x_shift=1; + mpi->chroma_y_shift=0; + return; case IMGFMT_422P: mpi->flags|=MP_IMGFLAG_PLANAR; mpi->bpp=16; @@ -78,6 +97,15 @@ mpi->chroma_x_shift=1; mpi->chroma_y_shift=0; return; + case IMGFMT_420P16_LE: + case IMGFMT_420P16_BE: + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=24; + mpi->chroma_width=(mpi->width>>2); + mpi->chroma_height=(mpi->height); + mpi->chroma_x_shift=2; + mpi->chroma_y_shift=0; + return; case IMGFMT_411P: mpi->flags|=MP_IMGFLAG_PLANAR; mpi->bpp=12; Modified: mplayerxp/postproc/vf_scale.c =================================================================== --- mplayerxp/postproc/vf_scale.c 2010-01-05 08:04:53 UTC (rev 72) +++ mplayerxp/postproc/vf_scale.c 2010-01-05 11:39:56 UTC (rev 73) @@ -50,6 +50,13 @@ static const unsigned int outfmt_list[]={ // YUV: + IMGFMT_444P16_LE, + IMGFMT_444P16_BE, + IMGFMT_422P16_LE, + IMGFMT_422P16_BE, + IMGFMT_420P16_LE, + IMGFMT_420P16_BE, + IMGFMT_420A, IMGFMT_444P, IMGFMT_422P, IMGFMT_YV12, @@ -61,6 +68,8 @@ IMGFMT_YUY2, IMGFMT_UYVY, // RGB and grayscale (Y8 and Y800): + IMGFMT_RGB48LE, + IMGFMT_RGB48BE, IMGFMT_BGR32, IMGFMT_RGB32, IMGFMT_BGR24, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |