[Mplayer-users] YV12/I420 with DLL (VfW/DShow) codecs?

Jens Hoffmann hoffmajs at gmx.de
Mon Apr 16 07:38:49 CEST 2001


Arpi wrote:
> 
> Hi,
> 
> Any ideas how to get planar YUV images from the Win32 DLL codecs?
> As mpeg4 variants uses YV12 internally, it should be faster than
> YUY2. And it's less memory usage and less memcpy too.
> 
> I've tried YV12 with VwF DLl codecs, but the only thing I got is
> some noise in the fron of the buffer. maybe something should be
> done at codecs initialization. For example, it doesn't accept 12bpp,
> so I changed it to 16.

ok i got YV12 working with SDL (and Intel Indeo5 vfw):

after i figured out that the src[1] and src[2] as the parameter for
draw_frame()
is a red hering (just the memory contents of the rest after char
*our_out_buffer;)

and in reality the planes are just behind in memory starting at src[0]
 
priv->framePlaneY bytes  - the Y Plane 
priv->framePlaneUV bytes - the V Plane
priv->framePlaneUV bytes - the U Plane

i tried that:

    dst = (uint8_t *) *(priv->overlay->pixels);
    memcpy (dst, src[0], priv->framePlaneY + 2 * priv->framePlaneUV);

this gave me a green display.

then i found out that the size of o_bih.biSizeImage was equal to
priv->framePlaneY
(missing 2 * priv->framePlaneUV bytes)
which had the result, that the codec only decoded the Y-Plane and then
stoped.

after i adjusted o_bih.biSizeImage the video played correct :-)


jens

_______________________________________________
Mplayer-users mailing list
Mplayer-users at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-users



More information about the MPlayer-users mailing list