Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: ANNOUNCE: Softdevice plugin. Use /dev/fb for output



Roland Praml wrote:
Hi,
i need some tips in developing my plugin.


You need:
A VDR of course.
A strong CPU (i think 800 MHz+)
Really 800 MHz+ ? DVDs can be played with a Celeron500 (without
post-processing), so you should tune your plugin a little bit.

Rene
When directly rendering to the framebuffer you can't use the graphics
card for scaling and YUV conversion, this wastes a significant amount of
time. Use DirectFB, SDL, XV, XRender, OpenGL or any other accelerating
graphics library of your choice.

that's my problem, the plugin gets too slow if I implement all in software.
I played around with the Vidix driver the last days. The YUV->RGB conversion
and scaling is now accellerated by hardware (the decoding needs only 20-30%
CPU time instead 50%-60% if the conversion is done by software)

My dream is an implementation like this:

MPEG2 -> [SW-Decoder] -> [HW YUV->RGB + Scaler] -> [HW-Alpha] -> Monitor/TV
OSD   -> [SW-Renderer] --------------------------------^

BUT:On my Matrox G200 I didn't figured out, how to display something BEFORE
the BES-layer. (google think's that this is not possible)
It's possible, we're did things like this in the convergence-inhouse-software based on DirectFB. The trick is that these cards need actually a destination colorkeying/blending and not a source colorkeying like you are used to.


If this is really not possible, how should I display OSD:
- implement all in software (slow!)
- scale the OSD in Software and blend with the YUV-Image (poor quality)
- use another VGA-Card (e.g. Geforce4 MX)
Basically you have the freedom of choice when using modern graphics cards.

First you can do it using alpha-blended stretchblits. All modern graphics cards can do this in hardware and you have most flexibility here. SDL, OpenGL, XRender and DirectFB provide you the required API to access this functionality.

The you can use the scaler unit and render the video on the overlay. The OSD can get drawn on the second screen/layer. In order to make it visible you have to configure the layer transparency and colorkey
appropriatly. This functionality can get accessed through SDL, DirectFB and XVideo. Even when these libraries provide a common API to access the scaler and layer functionality of the graphics cards the actual hardware still significantly differs from vendor to vendor, so you need to implement multiple code paths for different graphics cards.

And then you can take the pure software approach, this is the most portable but also the most inefficient way and will always require the latest'n'greatest processor.

Approach #1 will be the most elegant way and be portable on all modern cards, approach #2 will probably perform best on older graphics cards but takes much more work. Approach #3 is only suited for people that like the java-way of living and have plenty of money to burn.


SDL is probably the most portable approach right now, DirectFB provides
you the fanciest API designed for STB OSD displays but is native only on
the Linux Framebuffer, for all other OSs and Windowing systems you need
to install the SDL-DirectFB driver. Not too hard.

Should I go away from the Vidix-lirary and should use another library in the
first place? What do you suggest?
I must admit that I'm not familiar with Vidix, so I can't say much how the other libraries relate to Vidix, but in general it depends on what you want to do and how portable you want to be.

The most portable way in the PC/Mac world would be based on SDL or OpenGL - if you design your code properly then your code will run on all cards that are supported by these libraries: this is virtually all available hardware in conjuction with all commonly used operating systems.

When you want to let your code run once on 'real SetTopBoxes' then DirectFB is probably your first choice.

I personally would choose OpenGL for a bigger project - SDL and DirectFB for smaller ones. If you are interested I can send you off-list some codelets for DirectFB and SDL showing how you can implement this.

Holger



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index