[MPlayer-dev-eng] Some stuff I can't figure out from the docs..
Arpi
arpi at thot.banki.hu
Tue Oct 8 01:10:21 CEST 2002
Hi,
> I'm implementing a videofilter that reads rgba32-bitmaps from a FIFO and shows
> them on top of the video.. It's working pretty well so far... ;)
> I have some questions though, that I couldn't figure out from the docs..
>
> 1) Are the filters always getting YV12 data? I've tested a lot of movies and
no.
see codecs.conf for which codec which colorspace support.
the major codecs (most ffmpeg codec except some mjpegs and dv-ntsc, and
other mpeg-like codecs use yv12. most win32 codecs uses yuy2 or bgr24/32.
also there are other formats, like yvu90 used by svq1...)
> TV/v4l and I always get YV12.. That's fine though, but I want to be sure I
> don't have to implement a whole bunch of different "plotters" or whatever I
> should call it ;)
you can tell libmpcodecs core that you only support YV12 (in
query_format()) so it will convert input to yv12 for you.
> 2) Is there a good and fast function already in mplayer that can scale a
> RGBA32 bitmap to a different size? I don't want to reinvent the wheel.. ;)
yes, the swscaler.
but it's imho rgb32 only, not rgb_a_32
> 3) Is it at all possible to apply the filter after everything is (hardware)
> scaled?
no
except if the hardware support subpictures (liek m g400 on 2nd head) but it
requires supoprt by linbo and probably by kernel driver too...
> 4) How do I blend YUV? Blend as in alpha-transparancy that is.. ;)
same way as rgb
but take care of U and V are 128 by default, so you probably have to do
U-128)*A+128
A'rpi / Astral & ESP-team
--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
More information about the MPlayer-dev-eng
mailing list