SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-23-2006, 04:42 PM
moamoa's Avatar
moamoa moamoa is offline
Sage Advanced User
 
Join Date: Nov 2006
Posts: 118
Refresh rate related flicker?

I have a problem (i think) which although is not caused directly by sagetv, is only noticed when using sagetv, so I though someone else here might be able to help.

I have my HTPC connected to a Plasma running 1366x768. When I set the PC to that resolution the PC reports that that resolution is at 60hz. My plasma detects the PC and reports 60hz on it's OSD so I'm sure they are both in sync.

However, when watching TV (I'm using DVB-T in the UK) I notice a nasty visual effect when the picture pans horizontally. The image seems to have a staggered effect where the top half of the image is out by a few pixels from the bottom half of the image on some frames. The general image quality is perfect, but for these panning shots during programs. I think it may have something to do with the 60hz PC<->TV link and the fact the UK tv is PAL which is 50hz? Is this correct?

What can I do to sort this? My PC will ONLY support 60hz at 1366x768 which is the native resolution of my tv.

Any help?
__________________
SageTV Server 7.0.23 - SageTV Client on 50" Plasma - HD100 Extender on 42" Plasma - HD300 on 92" Espon EH-TW3200 Projector 5.1 DB/DTS on all clients.
Reply With Quote
  #2  
Old 12-23-2006, 05:24 PM
StephaneM's Avatar
StephaneM StephaneM is offline
Sage Icon
 
Join Date: Mar 2006
Location: France
Posts: 1,463
Quote:
Originally Posted by moamoa
However, when watching TV (I'm using DVB-T in the UK) I notice a nasty visual effect when the picture pans horizontally. The image seems to have a staggered effect where the top half of the image is out by a few pixels from the bottom half of the image on some frames.
This is tearing.

Quote:
I think it may have something to do with the 60hz PC<->TV link and the fact the UK tv is PAL which is 50hz? Is this correct?
I don't think so. Displaying 50Hz video on a 60Hz display will just give you a not smooth panning. This is because some frame need to be inserted but unfortunately not evenly so you'll notice some extraneous frames (and the only way to prevent this is either to feed 50Hz or 75Hz to your display or any multiple of 25Hz)


Quote:
What can I do to sort this? My PC will ONLY support 60hz at 1366x768 which is the native resolution of my tv.
What is your video card?
From what I know you are more prone to tearing if you have a Nvidia card (and tearing can be removed with those cards by using VMR9 renderer and Full Screen Exclusive mode).

If you have a recent Radeon card, usually tearing will not be a problem but you can also try VMR9, then Full Screen Exclusive mode.

Regards,
Stéphane.
Reply With Quote
  #3  
Old 01-17-2007, 12:42 PM
moamoa's Avatar
moamoa moamoa is offline
Sage Advanced User
 
Join Date: Nov 2006
Posts: 118
I have an example java proggy that show the problems i am having.

If you run this (after compiling) you will see scrolling vertical bars. On these bars I see a flicker as they scroll. This is just the same effect I see on my HTPC when watch anything in sage that has a similar pan left to right.

Can anyone else see it?

Code:
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

public class Pan extends JComponent implements Runnable
{
    int pos = 0;
    int w;
    int s;
    int bars = 4;
    long delay = 60;
    boolean running;
    int step;
    Dimension lastD;
    Image img;
    Graphics img_g;
    long base = System.currentTimeMillis();
    
    public Pan() 
    {
    }
    
    public void paint(Graphics g)
    {
        update(g);
    }
    
    public void setDelay(int d)
    {
        delay = d;
    }
    
    public void update(Graphics g)
    {
        Dimension d = getSize();
        if (!d.equals(lastD)) {
            img = createImage(d.width,d.height);
            img_g = img.getGraphics();
            lastD = d;
            System.out.println("reset");
        }
        img_g.setColor(Color.white);
        img_g.fillRect(0,0,d.width,d.height);
        w = d.width/bars;
        s = d.width/(bars*4);
        step = s/4;
        img_g.setColor(Color.black);
        for (int i=0; i<=bars; i++) {
            img_g.fillRect(pos+(w*i),0,s,d.height);
        }
        g.drawImage(img,0,0,null);       
    }
    
    public void run() 
    {
        running = true;
        while (running) {
            pos += step;
            if (pos>=(w-s)) pos = -s;
            try {
                repaint();
                Thread.sleep(delay);
            }
            catch (Exception ex) {
                ex.printStackTrace();
            }
        }
    }
    
    public void start()
    {
        Thread t = new Thread(this);
        t.start();
    }
    
    public void stop()
    {
        running = false;
    }
    
    public static void main(String[] args) 
    {
        JFrame f = new JFrame("Test");
        JPanel p = new JPanel(new BorderLayout());
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        final Pan pan = new Pan();
        f.setContentPane(p);
        p.add(BorderLayout.CENTER,pan);
        f.setSize(600,400);
        f.setVisible(true);
        pan.start();
        final JSlider s = new JSlider();
        s.setValue(60);
        s.setMinimum(10);
        s.setMaximum(1000);
        s.setMajorTickSpacing(10);
        s.setSnapToTicks(true);
        p.add(BorderLayout.SOUTH,s);
        s.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent ev) {
                pan.setDelay(s.getValue());
            }
        });
        s.revalidate();
    }
}
__________________
SageTV Server 7.0.23 - SageTV Client on 50" Plasma - HD100 Extender on 42" Plasma - HD300 on 92" Espon EH-TW3200 Projector 5.1 DB/DTS on all clients.
Reply With Quote
  #4  
Old 01-18-2007, 04:28 AM
Lucas Lucas is offline
Sage Icon
 
Join Date: Aug 2004
Location: Greece
Posts: 1,156
Moamoa,

even if your video card driver settings don't show 50Hz as an option, you can set it with powerstrip. The should be the ideal.

The nasty artifact does indeed look like tearing and it probably has to do with an underpowered video card if you are running VMR9.

Even with a recent Nvidia card I sometimes get something that looks like tearing. Can you give us some more info on your video card, drivers, SageTV settings etc?

Have you tried overlay?
__________________
Windows 10 64bit - Server: C2D, 6Gb RAM, 1xSamsung 840 Pro 128Gb, Seagate Archive HD 8TB - 2 x WD Green 1TB HDs for Recordings, PVR-USB2,Cinergy 2400i DVB-T, 2xTT DVB-S2 tuners, FireDTV S2
3 x HD300s
Reply With Quote
  #5  
Old 01-18-2007, 05:05 AM
moamoa's Avatar
moamoa moamoa is offline
Sage Advanced User
 
Join Date: Nov 2006
Posts: 118
I have tried all major codecs and all possible options in sage and codecs, and nothing really helps.

My system is built around the Abit iL-90MV motherboard;
http://www.abit-usa.com/products/mb/...es=1&model=324
This is Abit VIIV board and is really designed to be a HTPC for HD, so should really be totally up to the job. It uses the onbaord Intel GMA 950, which powerstrip does not support. My case is half height, so I really need to use the onboard card, which should really be ok anyway?

I am not sure it is a refresh problem anyway, as I can set the pc to run 75hz if I select a non native resolution for the display. 75hz should match the 50hz (25 interlaced of the UK). But even with this, I still see the "tearing", so I don't think it is this.

It looks to me as if the PC is half way through drawing a frame, when the monitor decides to draw it. But having tried emerying; codecs, reclock, setting, new drivers... you name it... I'm at a total loss.
__________________
SageTV Server 7.0.23 - SageTV Client on 50" Plasma - HD100 Extender on 42" Plasma - HD300 on 92" Espon EH-TW3200 Projector 5.1 DB/DTS on all clients.
Reply With Quote
  #6  
Old 01-18-2007, 06:39 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Tearing has nothing to do with refresh rate, it has to do with the card not being able to draw frames to the framebuffer fast enough to keep up with the "page flipping" to output them. As a result you get part of one frame and part of the next.

If anything, increasing the refresh rate could worsen it.

Using overlay, or Fullscreen Exclusive VMR9 may (should) help. But it may be a case where the card is just not up to the task.
Reply With Quote
  #7  
Old 01-18-2007, 07:05 AM
moamoa's Avatar
moamoa moamoa is offline
Sage Advanced User
 
Join Date: Nov 2006
Posts: 118
Quote:
Originally Posted by stanger89
Tearing has nothing to do with refresh rate, it has to do with the card not being able to draw frames to the framebuffer fast enough to keep up with the "page flipping" to output them. As a result you get part of one frame and part of the next.
Yes, this seem to fit the problem.
Quote:
Originally Posted by stanger89
Using overlay, or Fullscreen Exclusive VMR9 may (should) help. But it may be a case where the card is just not up to the task.
Yes I have tried all these options, with no real improvment. One Interesting this is that is is seems to play the windows HD-WMV better than other mpeg stuff, with less tearing?

If an application, like sagtv, starts to render a page to a buffer, what happens to make sure that only a fully draw frame buffer is swaped to the active display frame?

You can run this;
Demo Test App
When the delay is set to 200ms between frames the tearing scrolls down slowly, other values of delay show different results, no value removes it.

For example, as with the java application above; The application draws an Image to the graphics context, in jave there is no way of knowing when the graphics card is about to (or has) switch page. So what can be done to prevent the graphics card doing a page switch to a framebuffer that the java application was only half way through drawing?
__________________
SageTV Server 7.0.23 - SageTV Client on 50" Plasma - HD100 Extender on 42" Plasma - HD300 on 92" Espon EH-TW3200 Projector 5.1 DB/DTS on all clients.

Last edited by moamoa; 01-18-2007 at 11:12 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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 -6. The time now is 10:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.