|Site sponsored by IGEL|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[directfb-dev] Re: Getting started with DirectFB development
On Wed, Nov 19, 2003 at 07:05:20AM +0100, Andreas Korth wrote: > Hi! > > I'm new to DirectFB. I've successfully installed and configured it with my > Matrox G550 board. My goal is to write a video output plugin for VLC which > uses DirectFB. > > Before I start, I've got a couple of questions. Some might not seem very > specific, even naive, which is because I'm a little confused about DFB > architecture. I just need some brief explanations and I'll figure out the > details by myself. > > I've learned that there are several display layers: CRTC1, CRTC2 and BES > (did I miss any)? CRTC2 Sub-picture. > How do they work/interact? BES is is displayed over CRTC1. The output goes to the first output connector. CRTC2 + sub-picture output goes to TV-out. In reality you can change the CRTC -> output connector mapping but we use CRTC2 in a way that only works with TV-out. > Are there any limitations > (e.g. colordepth, resolution) when using a dual head configuration? TV-out is fixed to 720x576 PAL or 720x480 NTSC. Primary head has no artificial dual-head limitation like in Windows. I think the hardware maximum is 2048xsomething. > How would I configure/initialize DirectFB to use the first head (LCD) for > the user interface and the second head (TV-Out) for displaying the video > pictures? You need to enable multi-app support. So you need to use the fusion kernel module. You can then run XDirectFB, dfbterm or some other stuff on the primary head and from there you can start other DirectFB apps including ones using CRTC2. > I've also learned that each layer has a primary surface to which I can > draw primitives or blit offscreen surfaces. How do windows fit in this > concept and what is the benefit of using them? In DirectFB each window has a private surface in offscreen memory. DirectFB composes windows onto the primary surface when something changes. Apps only redraw their window contents when they want to. XFree86 uses a single buffer for the whole screen and so each window must be clipped so that they don't draw to other apps' windows. This also means that apps have to redraw their window contents when overlapping windows are moved. > What about different > cooperative levels? Display layer cooperative levels work like this: Shared: App can only change things related to it's own windows. It can't draw directly to the primary surface. Administrative: App can change display layer configuration and draw to the primary surface. It can also gain access to other apps' windows. Exclusive: App can change display layer configuration. All windows are hidden and the app is supposed to draw directly to the primary surface. > I would like to use X for development. Does it co-exist nicely with DFB or > are there any drawbacks? Which driver should I use (I noticed that both > 'fbdev' and 'mga' work fine)? You should use XDirectFB server instead of XFree86. > Does the Matrox driver support planar YUV formats such as IY12 or IYUV? > AFAIK only YUY2 and UYVY are hardware accelerated. BES and CRTC2 support I420 and YV12 primary surfaces. Acceleration is limited to (Stretch)Blit between two planar surfaces. BES and CRTC2 also support YUY2 and UYVY. Acceleration is limited to (Stretch)Blit from packed YUV to RGB surface. The driver could be extended to handle Blit between two packed YUV surfaces but StretchBlit is impossible. > Any response is greatly appreciated. Links to manuals, archives, howtos, > code samples - everything. API reference is included in the DirectFB package. DirectFB-examples and other packages have sample code. -- Ville Syrjälä email@example.com http://www.sci.fi/~syrjala/ -- Info: To unsubscribe send a mail to firstname.lastname@example.org with "unsubscribe directfb-dev" as subject.