Re: [Intel-gfx] How To Reduce/Eliminate Horizontal Tearing

2008-12-16 Thread Tino Keitel
On Thu, Dec 11, 2008 at 22:37:43 -0500, Nick Nobody wrote:

[...]

 Sorry, you're right. I glanced over it when reading through the xvinfo
 output.

In the case that your applications use the textured video XV port as
the default port, you could use version 2.5.1 of the driver and the
XvPreferOverlay option.

Regards,
Tino
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: How To Reduce/Eliminate Horizontal Tearing

2008-12-14 Thread Nikos Chantziaras
Ross Vandegrift wrote:
 On Fri, Dec 12, 2008 at 12:00:17AM +0200, Nikos Chantziaras wrote:
 Markus Strobl wrote:
 That's not my experience. I've tested most of the possible combinations: 
 Intel, ATI+fglrx,
 ATI+Radeon and closed-source NVidia. Only Intel has the tearing issue. 
 All the others play
 video, including HD-Video, perfectly.  BTW, my MediaPC has a cheap dual 
 core Intel Core 2 @1.8 GHz
 and a $30 NVidia graphics card. It has no problems playing H.264 720p. 
 The above is using XV, I don't use
 the OpenGL overlay as it had some issues.
 ATI does not.  Only NVidia plays without tearing with Xv.
 
 mga does.  Just watched a few hours of shows on an mga G-series and
 mplayer, tearing doesn't exist.

Oops, sorry, you're right.  These days we tend to think that there's 
only ATI, NVidia and a bit of Intel out there :)  I also never had 
tearing my old Matrox.

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: How To Reduce/Eliminate Horizontal Tearing

2008-12-11 Thread Michel Dänzer
On Wed, 2008-12-10 at 21:11 -0800, Keith Packard wrote:
 
 There aren't any options at this point, but I'm wondering -- is this
 full-screen? If we made full-screen Xv operations block until vblank
 (which would lock up the X server), would that be an acceptable option?
 
 It's actually very easy to do, just stick a 'wait for vblank' command
 into the ring right before the 'copy the new picture' command in the Xv
 extension code. It's just annoying when you're watching a tiny movie and
 your whole session stops responding.

The radeon driver from current Git just stalls the command stream until
scanout is outside of the vertical area rendered to by the XVideo blit.
Pretty sure Intel hardware would support this as well.


-- 
Earthling Michel Dänzer   |  http://tungstengraphics.com
Libre software enthusiast |  Debian, X and DRI developer

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: How To Reduce/Eliminate Horizontal Tearing

2008-12-11 Thread Glynn Clements

Nick Nobody wrote:

 Can you recommend a media player that is able to use OpenGL? I've tried
 mplayer but even on a relatively fast cpu it can't playback the video fast
 enough (720p content). Unless I'm missing some magic switch that's buried
 deep within the man page :)

MPlayer can be compiled with OpenGL support; mplayer -vo help will
give you a list of supported drivers.

For HD video, you really need video hardware which can take 4:2:0 YUV
data and perform conversion and scaling itself. If the player has to
perform conversion and/or scaling, that's going to eat both CPU and
memory bandwidth.

You also need to avoid exceeding any hardware-imposed limits on the
size of the source data (i.e. either the size of the overlay or the
maximum texture size). E.g. if the card limits textures to 1024x1024,
and you try to play 1280x720 video with a driver that uses OpenGL
texture mapping for scaling, the player may silently fall back to a
slower driver.

Finally, h.264 is far more CPU-intensive than e.g. XviD. If the player
is using 100% CPU, it's possible that the decoding is the bottleneck. 
Try mplayer -vo null; if that uses 100% CPU, then the problem is
with decoding the video rather than displaying it.

-- 
Glynn Clements [EMAIL PROTECTED]
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: How To Reduce/Eliminate Horizontal Tearing

2008-12-11 Thread Markus Strobl

Nikos Chantziaras wrote:

Nick Nobody wrote:
  

That would be just a temporary solution with too many problems (since I
assume a real solution will be in DRI2?)  The OpenGL method with VSync
works quite well.

  

Can you recommend a media player that is able to use OpenGL? I've tried
mplayer but even on a relatively fast cpu it can't playback the video fast
enough (720p content). Unless I'm missing some magic switch that's buried
deep within the man page :)



I'm afraid there's no magic switch :P  You can give VLC a shot but it 
never worked for me.  Unfortunately, HD video and Linux still don't play 
along well.
  


That's not my experience. I've tested most of the possible combinations: 
Intel, ATI+fglrx,
ATI+Radeon and closed-source NVidia. Only Intel has the tearing issue. 
All the others play
video, including HD-Video, perfectly.  BTW, my MediaPC has a cheap dual 
core Intel Core 2 @1.8 GHz
and a $30 NVidia graphics card. It has no problems playing H.264 720p. 
The above is using XV, I don't use

the OpenGL overlay as it had some issues.

/Markus
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: How To Reduce/Eliminate Horizontal Tearing

2008-12-11 Thread Nikos Chantziaras
Markus Strobl wrote:
 That's not my experience. I've tested most of the possible combinations: 
 Intel, ATI+fglrx,
 ATI+Radeon and closed-source NVidia. Only Intel has the tearing issue. 
 All the others play
 video, including HD-Video, perfectly.  BTW, my MediaPC has a cheap dual 
 core Intel Core 2 @1.8 GHz
 and a $30 NVidia graphics card. It has no problems playing H.264 720p. 
 The above is using XV, I don't use
 the OpenGL overlay as it had some issues.

ATI does not.  Only NVidia plays without tearing with Xv.

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: [Fwd: Re: How To Reduce/Eliminate Horizontal Tearing]

2008-12-11 Thread elupus
On Thu, 11 Dec 2008 00:34:47 -0500 (EST), Nick Nobody wrote:
 
 That would be really cool, I obviously have no idea how to implement it
 though... At the moment I'm using XBMC to play back videos and it does
 have a Vertical Blank Sync option but I'm not sure of how it's
 implemented (it clearly doesn't work as advertised). I doubt they're using
 Xv anyway so that's irrelevant.


Hmm.. There shouldn't be a problem with tearing in xbmc for intel cards.
Atleast I don't have it anymore. I have noted that if driconf is set to
always wait on blank, on some systems we end up waiting twice (just set it
to driver select in settings), but otherwise there shouldn't be a problem.

Then again, I've not tested master of current xorg/xserver/dri. But
hardy/gutsy versions work just fine.

The only issue was that we have to force a glFinish() before swapping in
case of driconf set to always wait, since driver seem to wait for vblank
then flush/finish opengl commands which makes it often miss the vblank.

And no we don't use xv.

Regards
elu...@xbmc.org

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: [Intel-gfx] How To Reduce/Eliminate Horizontal Tearing

2008-12-11 Thread Zhenyu Wang
On 2008.12.11 13:32:35 +0800, Nick Nobody wrote:
  I'm using Ubuntu 8.10 with a GM945 (at 1920x1080) for my media center
  PC.
  The problem I'm running into is a bunch of horizontal tearing on
  higher
  resolution videos (720p or greater). From what I can tell it's not a
  CPU
  limitation but rather something related to the graphics card...
 
  Are there any options that I can enable in my xorg.conf to help
  reduce/eliminate this tearing? Or is this simply a hardware
  limitation?
  Can XvMC somehow help me here?
 
 There aren't any options at this point, but I'm wondering -- is this
 full-screen? If we made full-screen Xv operations block until vblank
 (which would lock up the X server), would that be an acceptable option?
 
 It's actually very easy to do, just stick a 'wait for vblank' command
 into the ring right before the 'copy the new picture' command in the Xv
 extension code. It's just annoying when you're watching a tiny movie and
 your whole session stops responding.

Keith, how about a Xv attribute for this? User can decide if want to turn it
on or off. 

 
 The GM945 only has the overlay adaptor, I initially thought that was the
 cause too...

No, 945 has texture video support, overlay should do vblank sync for you in
the hw.

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827


signature.asc
Description: Digital signature
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: [Intel-gfx] How To Reduce/Eliminate Horizontal Tearing

2008-12-11 Thread Nick Nobody
On Thu, December 11, 2008 22:00, Zhenyu Wang wrote:
 On 2008.12.11 13:32:35 +0800, Nick Nobody wrote:
  I'm using Ubuntu 8.10 with a GM945 (at 1920x1080) for my media
 center
  PC.
  The problem I'm running into is a bunch of horizontal tearing on
  higher
  resolution videos (720p or greater). From what I can tell it's not a
  CPU
  limitation but rather something related to the graphics card...
 
  Are there any options that I can enable in my xorg.conf to help
  reduce/eliminate this tearing? Or is this simply a hardware
  limitation?
  Can XvMC somehow help me here?
 
 There aren't any options at this point, but I'm wondering -- is this
 full-screen? If we made full-screen Xv operations block until vblank
 (which would lock up the X server), would that be an acceptable
 option?
 
 It's actually very easy to do, just stick a 'wait for vblank' command
 into the ring right before the 'copy the new picture' command in the
 Xv
 extension code. It's just annoying when you're watching a tiny movie
 and
 your whole session stops responding.

 Keith, how about a Xv attribute for this? User can decide if want to turn
 it
 on or off.


 The GM945 only has the overlay adaptor, I initially thought that was the
 cause too...

 No, 945 has texture video support, overlay should do vblank sync for you
 in
 the hw.

Sorry, you're right. I glanced over it when reading through the xvinfo
output.

nick


___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: How To Reduce/Eliminate Horizontal Tearing

2008-12-11 Thread Cameron Hutchison
Nick Nobody m...@nikosapi.org writes:

I'm using Ubuntu 8.10 with a GM945 (at 1920x1080) for my media center PC.
The problem I'm running into is a bunch of horizontal tearing on higher
resolution videos (720p or greater). From what I can tell it's not a CPU
limitation but rather something related to the graphics card...

I have a GM945-based media centre PC that I just set up, although only
at standard definition. I also noticed tearing when playing full screen
videos with mplayer.

My solution was found by running xvinfo, noticing that two X-Video
ports were ports were available and using the second.

For mplayer, this was a matter of running it with -vo xv:port=xx, where
xx was the port number of the second port. This can also go into
mplayer's config file.

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: How To Reduce/Eliminate Horizontal Tearing

2008-12-11 Thread Michel Dänzer
On Fri, 2008-12-12 at 00:00 +0200, Nikos Chantziaras wrote:
 Markus Strobl wrote:
  That's not my experience. I've tested most of the possible combinations: 
  Intel, ATI+fglrx,
  ATI+Radeon and closed-source NVidia. Only Intel has the tearing issue. 
  All the others play
  video, including HD-Video, perfectly.  BTW, my MediaPC has a cheap dual 
  core Intel Core 2 @1.8 GHz
  and a $30 NVidia graphics card. It has no problems playing H.264 720p. 
  The above is using XV, I don't use
  the OpenGL overlay as it had some issues.
 
 ATI does not.  Only NVidia plays without tearing with Xv.

Define 'ATI'. The radeon driver in current Git is able to play Xv
without tearing on all pre-R600 Radeons.


-- 
Earthling Michel Dänzer   |  http://tungstengraphics.com
Libre software enthusiast |  Debian, X and DRI developer

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: How To Reduce/Eliminate Horizontal Tearing

2008-12-10 Thread Nikos Chantziaras
Nick Nobody wrote:
 Hello,
 
 I'm using Ubuntu 8.10 with a GM945 (at 1920x1080) for my media center PC.
 The problem I'm running into is a bunch of horizontal tearing on higher
 resolution videos (720p or greater). From what I can tell it's not a CPU
 limitation but rather something related to the graphics card...
 
 Are there any options that I can enable in my xorg.conf to help
 reduce/eliminate this tearing? Or is this simply a hardware limitation?
 Can XvMC somehow help me here?

I don't think it's possible to have video without tearing in X.Org with 
xv.  You'll have to use a media player that can render in OpenGL and 
enable VSync.  At least, that's how I was able to get acceptable video 
without tearing.

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


RE: [Intel-gfx] How To Reduce/Eliminate Horizontal Tearing

2008-12-10 Thread Nick Nobody
On Thu, December 11, 2008 00:16, Zou, Nanhai wrote:
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Keith
 Packard
Sent: 2008Äê12ÔÂ11ÈÕ 13:12
To: Nick Nobody
Cc: [EMAIL PROTECTED]; xorg@lists.freedesktop.org
Subject: Re: [Intel-gfx] How To Reduce/Eliminate Horizontal Tearing

On Wed, 2008-12-10 at 23:14 -0500, Nick Nobody wrote:
 Hello,

 I'm using Ubuntu 8.10 with a GM945 (at 1920x1080) for my media center
 PC.
 The problem I'm running into is a bunch of horizontal tearing on
 higher
 resolution videos (720p or greater). From what I can tell it's not a
 CPU
 limitation but rather something related to the graphics card...

 Are there any options that I can enable in my xorg.conf to help
 reduce/eliminate this tearing? Or is this simply a hardware
 limitation?
 Can XvMC somehow help me here?

There aren't any options at this point, but I'm wondering -- is this
full-screen? If we made full-screen Xv operations block until vblank
(which would lock up the X server), would that be an acceptable option?

It's actually very easy to do, just stick a 'wait for vblank' command
into the ring right before the 'copy the new picture' command in the Xv
extension code. It's just annoying when you're watching a tiny movie and
your whole session stops responding.
  Select overlay output will fix the tearing I think.

 Thanks
 Zou Nan hai


The GM945 only has the overlay adaptor, I initially thought that was the
cause too...

nick

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


[Fwd: Re: How To Reduce/Eliminate Horizontal Tearing]

2008-12-10 Thread Nick Nobody
Forgot to reply to all :S

 Original Message 
Subject: Re: How To Reduce/Eliminate Horizontal Tearing
From:Nick Nobody [EMAIL PROTECTED]
Date:Thu, December 11, 2008 00:30
To:  Keith Packard [EMAIL PROTECTED]
--

On Thu, December 11, 2008 00:11, Keith Packard wrote:
 On Wed, 2008-12-10 at 23:14 -0500, Nick Nobody wrote:
 Hello,

 I'm using Ubuntu 8.10 with a GM945 (at 1920x1080) for my media center
 PC.
 The problem I'm running into is a bunch of horizontal tearing on higher
 resolution videos (720p or greater). From what I can tell it's not a CPU
 limitation but rather something related to the graphics card...

 Are there any options that I can enable in my xorg.conf to help
 reduce/eliminate this tearing? Or is this simply a hardware limitation?
 Can XvMC somehow help me here?

 There aren't any options at this point, but I'm wondering -- is this
 full-screen? If we made full-screen Xv operations block until vblank
 (which would lock up the X server), would that be an acceptable option?

 It's actually very easy to do, just stick a 'wait for vblank' command
 into the ring right before the 'copy the new picture' command in the Xv
 extension code. It's just annoying when you're watching a tiny movie and
 your whole session stops responding.

 --
 [EMAIL PROTECTED]


Hi Keith!

That would be really cool, I obviously have no idea how to implement it
though... At the moment I'm using XBMC to play back videos and it does
have a Vertical Blank Sync option but I'm not sure of how it's
implemented (it clearly doesn't work as advertised). I doubt they're using
Xv anyway so that's irrelevant.

Seeing as this is a media center PC, I really don't care if the system has
to wait for the next vblank, it's only being used to watch videos. And at
at a 60Hz vsync I doubt it would even be noticeable

I just wanted to make sure that my hardware is capable of playing back
this content. I got quite worried when I noticed the tearing on this new
box that I bought :)

Thanks,

nick


___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: How To Reduce/Eliminate Horizontal Tearing

2008-12-10 Thread Nick Nobody
On Thu, December 11, 2008 00:31, Nikos Chantziaras wrote:
 Keith Packard wrote:
 On Wed, 2008-12-10 at 23:14 -0500, Nick Nobody wrote:
 Hello,

 I'm using Ubuntu 8.10 with a GM945 (at 1920x1080) for my media center
 PC.
 The problem I'm running into is a bunch of horizontal tearing on higher
 resolution videos (720p or greater). From what I can tell it's not a
 CPU
 limitation but rather something related to the graphics card...

 Are there any options that I can enable in my xorg.conf to help
 reduce/eliminate this tearing? Or is this simply a hardware limitation?
 Can XvMC somehow help me here?

 There aren't any options at this point, but I'm wondering -- is this
 full-screen? If we made full-screen Xv operations block until vblank
 (which would lock up the X server), would that be an acceptable option?

 It's actually very easy to do, just stick a 'wait for vblank' command
 into the ring right before the 'copy the new picture' command in the Xv
 extension code. It's just annoying when you're watching a tiny movie and
 your whole session stops responding.

 That would be just a temporary solution with too many problems (since I
 assume a real solution will be in DRI2?)  The OpenGL method with VSync
 works quite well.


Can you recommend a media player that is able to use OpenGL? I've tried
mplayer but even on a relatively fast cpu it can't playback the video fast
enough (720p content). Unless I'm missing some magic switch that's buried
deep within the man page :)

nick


___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: How To Reduce/Eliminate Horizontal Tearing

2008-12-10 Thread Nikos Chantziaras
Nick Nobody wrote:
 That would be just a temporary solution with too many problems (since I
 assume a real solution will be in DRI2?)  The OpenGL method with VSync
 works quite well.

 
 Can you recommend a media player that is able to use OpenGL? I've tried
 mplayer but even on a relatively fast cpu it can't playback the video fast
 enough (720p content). Unless I'm missing some magic switch that's buried
 deep within the man page :)

I'm afraid there's no magic switch :P  You can give VLC a shot but it 
never worked for me.  Unfortunately, HD video and Linux still don't play 
along well.

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg