On Sunday 21 July 2002 20:18, [EMAIL PROTECTED] wrote: > Is there any support for re-interlacing the progressive frames of an > MPEG1 stream back into fields with directfb, assuming they were not > interpolated when combined into progressive frames?
This is easy! The matrox hardware still creates an interlaced output for TV, to get a full resolution picture. It does so by sending first all odd lines and then all even lines, i.e. a frame is sent by two fields. If you have an interlaced video input stream, then you have both fields in one frame. If you would have a look at such a frame you would see the typical zigzag on moved objects. When you put this frame onto the VGA then it is sent in two steps to the TV (as described before). The TV 'deinterlaces' the frame then (on a 'natural way' if you have 50/60Hz or electronic if you have a better 100/120Hz). Therefore it's also very important to have the exact size on the VGA screen. If you set your VGA screen to 1024x768 for instance, then this big picture will be scaled down for the TV-output. This may move odd lines into even lines and vice versa. The result is a juggerish picture. Instead set the VGA screen to the same line count and perform some fine tuning (fbset upper/lower) to make sure that the odd lines from your source are displayed on the odd lines on TV. For PAL this is 576 for the line count, upper 34 and lower 10. This gives together 620. Theoretically it should sum up to 625. I don't know who takes the 5 remaining lines (PAL has 625 lines of which 576 are visible). Also you have to make sure that you flip your frame buffer (which contains two fields) only when the output begins a new frame (the odd field). If you don't do that that it may happen that you still see the even field of one field ahead, which again gives a juggerish output. If you have a progressive output all is very easy. The TV-out hardware of the G400 will do the job. I have created an application which works with TV as output (http://df-gp.sf.net). There I solved these problems for PAL (where I live), but it should be the same for NTSC. The bad thing is that I had to patch many things to get this working. Therefore it's difficult to build. Mike -- Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe directfb-dev" as subject.
