[MPlayer-dev-eng] Re: [PATCH] support for On2 vp6.2 video codec

adland123 adland123 at yahoo.com
Mon Mar 15 07:32:14 CET 2004


Reimar Döffinger <Reimar.Doeffinger <at> stud.uni-karlsruhe.de> writes:

> 
> Hello,
> 
> > patch is attached
> 
> You shouldn't compress such a small patch - like this at least I can't 
> simply read it in the mail client but instead have to save, uncompress, 
> open - too much work.
> 

I apologize but it was the only way I could send an email without the lines
wrapping.

> In addition I would suggest a modified version that does some checks. It 
> would be also nice if we could get On2's agreement for this...

I did not know we needed their agreement since we did not supply any codecs,
make any enhancements or build anything to sell.
The end user is the one who is downloading codecs from their site. 
Does it matter if you use personal edition codecs on linux versus windows to
play their media files. 

> Any comments on this?
> 

I like the checks which you added making it much better. 

I cant test the vp5 or older vp6 codecs myself but it looks good.

Info the vp5 files on the ON2 website seemed to be non standard in their header
slightly, MPlayer did not realize they were an AVI and did not read them.

Only issue I see in the patch might be if someone has the 6.1 version of codec
installed and tries to play a 6.2 encoded file since both versions have the 
same filename vp6vfw.dll and VP62 fourcc is enabled in codecs.conf.

I am thinking it will just not play.

Other things I am working on currently.

I havent been able to get the sound to work on any of the On2 vp5-6 
encoded files except the .vpz samples from iraq using mpeg audio.

the audio format is reported as 0x501. Believe this to be using the AVM
 codec they have mentioned on their site.
 
I also havent been able to get the Windows Media 9 speech codec wmspdmod to 
work. format reported as 0xA.

(Some online radio stations etc use this format apparently)

audiocodec wmaspdmo
  info "Windows Media 9 Speech DMO"
  status untested
  format 0xA
  driver dmo
  dll "wmspdmod.dll"
  guid 0x874131cB, 0x4ecc, 0x443b, 0x89, 0x48, 0x74, 0x6B, 0x89, 0x59,
 0x5d, 0x20

Repeated error and no audio.
Win32 Warning: Unlocking unlocked Critical Section 0x83c09b8!!

Problems like this have been mentioned on mailing list before I believe.

My latest codec attempt is on a Video codec which has two Dlls A and B.
I load A.dll in codecs.conf using the dshow driver.

I was able to implement the missing advapi32.dll function RegCreateKeyA 
inside win32.c from the wine source code for this dll.

(used to Store a key something about the company in registry)

but the decompress frame function is in the B dll and is also unknown.

(B dll just has two functions compress and decompress frame)

obviously at this point since it cant decompress frames the playing fails.

Unsure how to proceed. I cant implement the function myself as the codec
algorithm is unknown to me.

And I am unsure how to allow the exported function in B.dll to be called
from A.dll.

Any tips would be welcomed.


> Patch(es) attached
> 
> Greetings,
> Reimar Döffinger
> 
> 
> --- MPlayer-cvs/loader/module.c	2004-02-01 19:06:01.000000000 +0100
> +++ MPlayer-test/loader/module.c	2004-03-03 19:50:52.000000000 +0100
>  <at>  <at>  -422,6 +422,39  <at>  <at> 
>  	if (!wm)
>  	    printf("Win32 LoadLibrary failed to load: %s\n", checked);
> 
> +        // remove a few divs in the VP codecs that make trouble
> +        if (strstr(libname,"vp5vfw.dll") && wm)
> +        {
> +          int i;
> +          if (PE_FindExportedFunction(wm, "DriverProc",
TRUE)==(void*)0x10003930) {
> +            for (i=0;i<3;i++) ((char*)0x10004e86)[i]=0x90;
> +            for (i=0;i<3;i++) ((char*)0x10005a23)[i]=0x90;
> +            for (i=0;i<3;i++) ((char*)0x10005bff)[i]=0x90;
> +          } else {
> +            fprintf(stderr, "Unsupported VP5 version\n");
> +            return 0;
> +          }
> +        }
> +
> +        if (strstr(libname,"vp6vfw.dll") && wm)
> +        {
> +          int i;
> +          if (PE_FindExportedFunction(wm, "DriverProc",
TRUE)==(void*)0x10003ef0) {
> +            // looks like VP 6.1.0.2
> +            for (i=0;i<6;i++) ((char*)0x10007268)[i]=0x90;
> +            for (i=0;i<6;i++) ((char*)0x10007e83)[i]=0x90;
> +            for (i=0;i<6;i++) ((char*)0x1000806a)[i]=0x90;
> +          } else if (PE_FindExportedFunction(wm, "DriverProc",
TRUE)==(void*)0x10004120) {
> +            // looks like VP 6.2.0.10
> +            for (i=0;i<6;i++) ((char*)0x10007688)[i]=0x90;
> +            for (i=0;i<6;i++) ((char*)0x100082c3)[i]=0x90;
> +            for (i=0;i<6;i++) ((char*)0x100084aa)[i]=0x90;
> +          } else {
> +            fprintf(stderr, "Unsupported VP6 version\n");
> +            return 0;
> +          }
> +        }
> +
>  	if (strstr(libname,"QuickTime.qts") && wm)
>  	{
>  	    void** ptr;
> 
> 
> --- MPlayer-cvs/etc/codecs.conf	2004-02-19 00:01:47.000000000 +0100
> +++ MPlayer/etc/codecs.conf	2004-03-14 22:02:43.000000000 +0100
>  <at>  <at>  -1147,6 +1147,24  <at>  <at> 
>    out YUY2
>    out BGR32,BGR24
>  
> +videocodec vp5
> +  info "On2 VP5 Personal Codec"
> +  status working
> +  fourcc VP50
> +  driver vfwex
> +  dll "vp5vfw.dll"
> +  out YUY2
> +  out BGR32,BGR24
> +
> +videocodec vp6
> +  info "On2 VP6 Personal Codec"
> +  status working
> +  fourcc VP60,VP61,VP62
> +  driver vfwex
> +  dll "vp6vfw.dll"
> +  out YUY2
> +  out BGR32,BGR24
> +
>  videocodec mwv1
>    info "Motion Wavelets"
>    status working
> 
> 
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng <at> mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> 







More information about the MPlayer-dev-eng mailing list