[Mplayer-dev-eng] VP3 Codec

Felix Buenemann atmosfear at users.sourceforge.net
Sat Sep 22 16:08:24 CEST 2001


On Saturday, 22. September 2001 02:15, Arpi wrote:
> Hi,
>
> > > > > 0x10004bd6:     mov    %cr0,%edx
> > > >
> > > > Oops.  So a Win32 DLL can mess with %cr0?  Amazing.
> > >
> > > yes. you know their slogen: win98 - everything possible
> > >
> > > btw that routine just checks some flags in cr0, and depending on their
> > > value returns eax=0 or eax=1. i think thet can be replaced by a mov
> > > eax,0/1 and many nops.
> >
> > the codec seems to use much asm code, maybe it's some sort of cpu feature
> > detection.
>
> yes:
>
> ; check to see if OS supports SIMD instructions
>     mov     edx,cr0
>     bt      edx,2                           ; ensure no emulation
>     jnae    NoXMMSupport
>
>     mov     edx,cr4
>     bt      edx,9                           ; OS support SIMD
>     jnc     NoXMMSupport
>
> ; we support XMM instructions
>     mov     eax,1
>     jmp     Exit
>
> NoXMMSupport:
> ;    mov     eax,0                           ; OS does not support XMM
> instructi
>
> so it uses cr0 to check OS support of SSE. this is why it works for
> Gabucino (his k6 has no sse at all) and crashes for you.
>
I've now hacked the vp31vfw.dll removing this check and always assuming os 
supports sse (so eax==1). I've uploaded the hacked dll to ftp://mphq/.../vp3/.
I get green picture with YUY2 and black picture with bgr(16) :(

@ Nick: please fix biew search option for disassembler mode, it's very buggy 
(doesn't find search results, or finds wrong stuff with one byte searches, ie 
search for 73 find FF ans stuff like that, I'm using latest p7 version from 
aug, 11th).
>
> A'rpi / Astral & ESP-team

-- 
Best Regards,
	Atmos

_____
Ever tried? Ever failed? No Matter. Try again. Fail again. Fail Better.
	- Samuel Becket



More information about the MPlayer-dev-eng mailing list