On Sun, Jul 21, 2002 at 09:19:29PM +0200, Mike Pieper wrote:
> 
> 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.

Awesomely cool!  Then having MPEG1 progressive frames is not a
problem, as long as the fields are not processed (i.e. blending,
bluring, interpolating, etc.) to make the remove the "interlace"
artifacts from the progressive frame.

> If you have an interlaced video input stream, then you have both fields in one 
> frame.

Right.  MPEG1 captured from broadcast.

> If you would have a look at such a frame you would see the typical 
> zigzag on moved objects.

For sure!

> When you put this frame onto the VGA then it is sent 
> in two steps to the TV (as described before).

So you tell the G400 that you are sending full frames at 29.97 and it
takes care to send the odd and even fields from the frames at 59.94
(in NTSC land anyway).  That is so cool.

> The TV 'deinterlaces' the frame 
> then (on a 'natural way' if you have 50/60Hz or electronic if you have a 
> better 100/120Hz).

The TV?  You mean on a progressive scan TV, no?  A regular TV will
just show the odd field then the even field as the video card has sent
it, just like it were broadcast, no?

> Therefore it's also very important to have the exact size on the VGA screen. 

You mean it's important that your framebuffer (to the TV) has the same
number of lines as your broadcast standard?

> 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.

Oh yuck.  I see.  I am running my framebuffer at 800x600 right now.
But that is really only because I cannot get a decent 640/720x480 set
of framebuffer timings.  I capture at 640x480 right now.  I would
capture at whatever horizontal resolution (640, 720, etc.) I could get
the framebuffer to display with the image looking decently centered on
the screen.

Right now, the only timings I have for NTSC at 640x480 have the image
overscanned vertically too much and the horizontal display is too
narrow, leaving a big black border on the right.  Images look tall and
skinny.

> The result is a juggerish picture.

Right.

> 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.

Have you had any success in adjusting the picture on the G400 with
fbset upper/lower?  I found that the 640x480 timings I had would not
move much at all with changes to the timing values.

> 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).

Right.  MPlayer/directfb seem to be doing that correctly now.  Seems
to work pretty well with the vsync patch in the DirectFB/patches
directory.

> 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.

Right.

> If you have a progressive output all is very easy. The TV-out hardware of the 
> G400 will do the job.

I don't.  I have a regular ol' television.  Odd and even interlaced
fields.  But you said above that the G400 does the right thing and
outputs the odd and even fields of the frames as the TV would like to
replicate the broadcast display, no?

> I have created an application which works with TV as output 
> (http://df-gp.sf.net).

I looked.  Cool.

> 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.

Indeed.  I have half of the vsync patch you have (from
DirectFB/patches), and most of the mga-2.4.18.gz patch seems to be in
my vendor's kernel already, but none of the rest.  How important are
the maven patches?  What sorts of things do they do?  I noticed
quite a bit of maven stuff in one of them.  What is this all about?
Does any of it matter if I don't have any application support using
it?  i.e. does any of the maven patches alter the "general" or
"default" functionality of the framebuffer or does it just add
enhancements that applications can enable?

Do you use matroxset to put the BES on your G400's TVout (2nd) head or
do you run it without the BES?  I tried to get it to work without the
CRTC re-routing but could not get even a display on /dev/fb0.

Also, when you use fbset to report your framebuffer's timings, what
frequency does it report?  Am I correct in assuming that for purposes
of doing TVout with the G400 framebuffer, the frequency is ignored and
is actually the frequency of your television?  So all that matters is
adjusting the values to get a well centered, sized picture?

b.

-- 
Brian J. Murrell

Attachment: msg00813/pgp00000.pgp
Description: PGP signature

Reply via email to