Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 07-31-07, 02:26 PM   #1
skandalfo
Registered User
 
Join Date: Apr 2006
Posts: 6
Default OpenGL sync to vblank and interlaced fields

Hello.

I'm (almost) successfully using an VGA-to-RGB-Scart (http://www.nexusuk.org/projects/vga2scart/) converter so that my GeForce 7800 GS provides me a wonderful picture quality for my MythTV box.

I'm using the following PAL Modeline (which provides for square pixel 1024x576 16:9 PAL resolution):

Code:
ModeLine "1024x576pali"  20.0  1024 1056 1152 1280  576 579 581 625 -hsync -vsync interlace
Half of the time the TV that MythTV displays (live or recorded) shows up perfectly. I would say that it's better than the same channel as tuned by the TV I'm using. It's much better than using the card TV encoder, that doesn't support any square-pixel or 50Hz 16:9 resolution. The other half of the time, unfortunately, moving parts of the image are a mess.

This is because, even if MythTV is using the OpenGL method to synchronize its video output to vertical blank, somehow half of the time the sync jumps, so that the even and odd interlaced fields get swapped. Depending on the video source, the switch ok -> swapped -> ok -> swapped happens after varying periods of time. The video is perfect in the "ok" moments, and horrible in the "swapped" ones.

I think the problem comes from the OpenGL sync code synchronizing with any field, not even fields only, when the card is outputting an interlaced resolution. I don't know whether the hardware actually supports it, but the solution for this problem would be for the vblank sync code to wait until the next even field, skipping any odd field in between.

Is there any way to select this behaviour in the current drivers? If not, and in the case the hardware does indeed support it, what would be the nicest way to ask for this feature to be included in the linux nVidia drivers?


Thanks in advance,

Skandalfo.
skandalfo is offline   Reply With Quote
Old 07-31-07, 11:03 PM   #2
Thunderbird
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
Default Re: OpenGL sync to vblank and interlaced fields

Have you tried to enable sync to vblank for opengl? It can be set as an environment variable or in nvidia-settings (though in case of nvidia-settngs make sure it is reapplied each time).
Thunderbird is offline   Reply With Quote
Old 08-01-07, 12:50 AM   #3
skandalfo
Registered User
 
Join Date: Apr 2006
Posts: 6
Default Re: OpenGL sync to vblank and interlaced fields

I've done, both by using nvidia-settings (that gets re-run in the MythTV startup script) and by exporting the envirnoment variables.

See the .xsession file I'm using:
Code:
#!/bin/sh
export __GL_SYNC_TO_VBLANK=1
export __GL_SYNC_DISPLAY_DEVICE=CRT-0
/usr/X11R6/bin/xset s noblank
/usr/X11R6/bin/xset s off
/usr/X11R6/bin/xset -dpms

/usr/X11R6/bin/xmodmap ~/.xmodmap

/usr/bin/nvidia-settings -l

/usr/bin/metacity &
/usr/bin/gnome-volume-manager &

sleep 2
exec /usr/bin/mythfrontend --logfile ~/.mythtv/mythfrontend.log
The thing is that sync to vblank is actually happening, only that it's syncing to fields (or half-frames), instead of syncing to full frames.
skandalfo is offline   Reply With Quote
Old 08-26-07, 03:02 AM   #4
finn
Registered User
 
Join Date: Jan 2005
Posts: 1
Default Re: OpenGL sync to vblank and interlaced fields

Bump.
I'm having exactly the same issue, and it's incredibly annoying. 50 percent of the time my interlaced DVB video goes out to the tv perfectly over my VGA to RGB SCART cable. 50 percent of the time the picture has the nasty jagged movement caused by the interlaced fields being reversed. I could live with it if the sync didn't drift every 5 or 6 minutes, swapping between perfect picture and crap picture.

Is a solution to this in the works at all?
finn is offline   Reply With Quote
Old 12-02-07, 06:04 AM   #5
walken
Registered User
 
Join Date: Nov 2007
Posts: 3
Default Re: OpenGL sync to vblank and interlaced fields

I'm having the exact same issue too.

I wish nvidia would provide an option to make sure the sync only hapens on a specified field. Then it'd be pretty easy to update xine and others to make use of that option.
walken is offline   Reply With Quote
Old 12-22-08, 09:27 AM   #6
ali1234
Registered User
 
Join Date: Dec 2008
Posts: 1
Default Re: OpenGL sync to vblank and interlaced fields

Bump

Here is a list of the things people have already suggested to me that don't work:

"Try turning on sync to vblank."

This does not work because as the original poster said, it syncs per *field* not per *frame.*

"You have to deinterlace your video."

No. This is not acceptable. If I wanted horrible smudgy video, I would use composite video out.

"Just get a HDTV."

Again, not acceptable, since I only have access to interlaced SD content, I would still have to deinterlace *and* upscale it to display it on a HDTV, and that would result in even worse quality than deinterlacing the signal and displaying it on an SD screen.

"Try the open source nv driver."

It does not support interlaced modes at all.
ali1234 is offline   Reply With Quote
Old 12-31-08, 12:39 PM   #7
Moe1
Registered User
 
Join Date: Dec 2008
Posts: 3
Default Re: OpenGL sync to vblank and interlaced fields

Same problem with same resolution (Nvidia AGP 5200FX + Sony KV-32WF1B CRT with VGA-Scart).
I just discover (because of an HD crash) your settings whose provide the sharpen picture with the problems that you mention.
Until now, I was using the 'TrippleBuffer' option. And now I see that with that option, the lines are doubled (so the picture is a little blurry). But there is no movement problem nor vsync defaults.
I think like you, that there is a problem with the buffers/flip mecanism that handle a half-frame a a complete frame.
Moe1 is offline   Reply With Quote
Old 12-31-08, 02:00 PM   #8
bwheaton
Registered User
 
Join Date: Nov 2008
Location: California
Posts: 59
Send a message via AIM to bwheaton
Default Re: OpenGL sync to vblank and interlaced fields

Out of curiousity, have you tried with a true PAL modeline? It seems to me that your 1024 wide modeline would be enough to convince the card that you're providing progressive frames, and therefore frame/field is irrelevant?

Otherwise, if you presented 25 frames per second - not 50, each with an even and odd field, would it pick the right one? The simplest check would be to swap on every other 'field', which is trivial from the OpenGL API, if not from the NVidia control panel.

Bruce
bwheaton is offline   Reply With Quote

Old 12-31-08, 05:19 PM   #9
Thunderbird
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
Default Re: OpenGL sync to vblank and interlaced fields

Note that scart (s-video / composite) in general offer don't more than 720x576 / 720x480. The tvout encoder scales it and TVs also only expect these resolutions. In case of anamorphic DVDs the pixels aren't square (they are squeezed in) and then the TV stretches the 720x576 image to something which is effectively '1024x576' in square pixels but the pixels are in fact 16:9. The only thing which is really needed is a way to turn on the 'wide signal' inside the s-video signal to get widescreen in the same way it is done for television channels (the WSS signal basically means zoom on).

You could also try to let your media player render an anamorphic image (so on a 4:3 screen it looks like 9:16, yes 9:16) and then let your tv unstretch that image. I believe that is another way dvd players can work.
Thunderbird is offline   Reply With Quote
Old 01-01-09, 04:34 AM   #10
Moe1
Registered User
 
Join Date: Dec 2008
Posts: 3
Default Re: OpenGL sync to vblank and interlaced fields

When using VGA/Scart adaptator, there is no limitation of the horizontal resolution . CRT TV only limited by their internal bandwidth (which does a limitation to the visible pixels).
So with a good 16/9 CRT TV, the bandwidth is enought to get the 1024 horizontal resolution (only with the VGA-Scart adaptator).

About the interlace problem, I've seen that the problem is reduced, when activating all VBlank and Flipping options (the OpenGL VBlank option seem to have no effect).
I did only a few tests, but it seems that the interlace ghost problem appears mainly on MythTV LiveTV.
My MythTV configuration is: xv-blit + no deinterlacer.
My xorg.conf contain the Composite Extension enabled.

Section "Devices"
Option "UseEvents" "True"
Option "DamageEvents" "True"
Option "DPMS" "False"
Option "AllowGLXWithComposite" "True"
Option "UseCompositeWrapper" "True"
Option "DisableGLXRootClipping" "True"
Option "NvAGP" "1"
Option "TrippleBuffer" "True"
Option "ExactModeTimingsDVI" "True"
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection



Before my HD crash, I was not using the Composite extension. They were no interlace problem, but the pictures were like line doubled (noticeable only on TV logos and text).

I'll try to find Composite options to see if that can fix the interlace problem.
Moe1 is offline   Reply With Quote
Old 01-02-09, 04:58 PM   #11
bwheaton
Registered User
 
Join Date: Nov 2008
Location: California
Posts: 59
Send a message via AIM to bwheaton
Default Re: OpenGL sync to vblank and interlaced fields

Quote:
When using VGA/Scart adaptator, there is no limitation of the horizontal resolution . CRT TV only limited by their internal bandwidth (which does a limitation to the visible pixels).
So with a good 16/9 CRT TV, the bandwidth is enought to get the 1024 horizontal resolution (only with the VGA-Scart adaptator).
Yes, but, the Nvidia video out system won't output any arbitrary resolution. It will take whatever size you've defined and scale that into (probably) 720 x 480/576, the now standard DV sizes. There's no way they're dealing with higher resolutions on a basic product like this. I still suspect your 1024 x xxx is triggering a 'scaled' path, not an original content path and thus interlace will be completely disregarded. That's supposition though, I haven't found any docs relating to the video output sub-system - wish I had.

Your SCART connector is irrelevant, more so since Nvidia is a US company and that connector didn't make it over here.

Bruce
bwheaton is offline   Reply With Quote
Old 01-02-09, 10:40 PM   #12
darklegion
Registered User
 
Join Date: Oct 2004
Posts: 37
Default Re: OpenGL sync to vblank and interlaced fields

Quote:
Originally Posted by bwheaton View Post
Yes, but, the Nvidia video out system won't output any arbitrary resolution. It will take whatever size you've defined and scale that into (probably) 720 x 480/576, the now standard DV sizes. There's no way they're dealing with higher resolutions on a basic product like this. I still suspect your 1024 x xxx is triggering a 'scaled' path, not an original content path and thus interlace will be completely disregarded. That's supposition though, I haven't found any docs relating to the video output sub-system - wish I had.

Your SCART connector is irrelevant, more so since Nvidia is a US company and that connector didn't make it over here.

Bruce
He's using a VGA > Scart adapter, which doesn't involve the video-out portion of the card.
darklegion is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:35 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.