Hello, On Fri, Jun 29, 2007 at 05:55:02PM +0200, Nicolas George wrote:
The negotiation of pixel format in mpcodecs_config_vo could be more a problem, but I believe that it can be evacuated by deciding that all decoded data will be in YV12. ffmpeg's colorspace converters are probably better than microsoft's anyway...
YV12 with some wmv3 video produces incorrect colours, so you actually do loose a little bit by not allowing other formats.
I have tried further to implement things, but I am stuck with a non-deterministic bug in the loader. I try a minimalistic program (at the end of this mail). All it does it call DMO_VideoDecoder_Open. I build it with:
cc -I /tmp/mplayer -Wall -O4 -pthread -o testdmo main0.c \ -L /tmp/mplayer/loader -lloader /tmp/mplayer/osdep/mmap_anon.o \ /tmp/mplayer/cpudetect.o -lm
-pthread should not be needed, though it should not hurt either.
/* values from guignols-20070622.wmv */ BITMAPINFOHEADER bih = { .biSize = 44,
sizeof(BITMAPINFOHEADER) == 40, so you forgot the 4 additional bytes after the struct. Probably the decoder needs those, but only gets random data with your code. Greetings, Reimar Döffinger