Quoting Ville Syrj�l�: > On Tue, Jun 15, 2004 at 12:51:03AM +0200, Stefan Lucke wrote: > > On Dienstag, 15. Juni 2004 00:15, Ville Syrj�l� wrote: > > > On Tue, Jun 15, 2004 at 12:01:59AM +0200, Stefan Lucke wrote: > > > > I've a question how to realize some sort of cropping > > > > with SetScreenLocation ( .. ). > > > > > > > > My test stream has a 4:3 frame encoded as 16:9 anamorphic mpeg2 frame. > > > > To display this correct on a 4:3 or 5:4 display, a center out operation has to > > > > be > > > > done. > > > > > > > > Is such a operation possible with SetScreenLocation ? > > > > > > I'm not exactly sure what you mean. > > > > Let's say the decoded picture is of size 720x576. It is anamorphic 16:9. > > But I know (AFD descriptors tell that) the active area is of 4:3 format. So > > only this area should be drawn on a 4:3 screen in full size. Without doing > > that I would get black bars on top and bottom due to 16:9 scaling and > > black bars left and right, since the active area is 4:3. > > > > > Do you want to resize the image so > > > that parts of it go outside the visible screen? > > > > No (virtual yes). I want to draw a part of picture so that it fills the screen. > > With Xv output it is easy. There I can specify source x and y offsets and > > source width and height witch should be drawn at a given destination area. > > With Xv-X11 this works with matrox and radeon and I think with others too. > > DirectFB doesn't have any method of specifying source cropping for layers. > It would be a useful thing to add though.
It's already prepared to being added easily, at least the driver API covers source AND destination rectangles. > But you since you're looking to fill the entire screen you don't actually > need source cropping. SetScreenLocation() will suffice provided that the > driver crops things properly. You just have to calculate the coordinates > and size accordingly. Or you configure the layer to have the pixel size of the active area and copy only those pixels to the surface. -- Best regards, Denis Oliver Kropp .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | "------------------------------------------" Convergence GmbH
