Judder Test for Linux - AVS Forum | Home Theater Discussions And Reviews
Forum Jump: 
 
Thread Tools
post #1 of 16 Old 01-03-2006, 12:07 AM - Thread Starter
Senior Member
 
nitrogen's Avatar
 
Join Date: Feb 2003
Location: Utah
Posts: 264
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hello, everyone.

I got fed up with jerky video playback on my Linux HTPC and Plus UP-1100P projector, so I wrote this program today to help me solve the problem.

The Judder Test for Linux, version 0.1.0 (equivalent to version 1.0 in traditional Windows version numbering - this is not a beta), is a complete judder test tool for basic judder and tearing testing.

Judder Test for Linux uses OpenGL and SGI's sync extension to perfectly synchronize the test pattern with the display's refresh.

Everyone is welcome to give it a try. Feature requests and bug reports should be directed to this thread or the myhd-develop mailing list. Let me know what you think.

You can find it at http://myhd.sf.net/juddertest.php.

Please check out the screen shots link!
nitrogen is offline  
Sponsored Links
Advertisement
 
post #2 of 16 Old 01-05-2006, 01:48 PM
Member
 
jay_cee's Avatar
 
Join Date: Nov 2005
Posts: 140
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Nitrogen -

Sounds great. I just stumbled on this thread. I'm got one of these flaky Sceptre 37" LCDs on my Linux box (no Windows) at home. I've been pretty frustrated not being able to run judder-test. I'll give this a try tonight.

-J
jay_cee is offline  
post #3 of 16 Old 01-05-2006, 08:44 PM
Member
 
jay_cee's Avatar
 
Join Date: Nov 2005
Posts: 140
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I'm running an Athlon 2500 w/ an Nvidia 5200 based graphics card. My display is a a 37" Sceptre at 1920x1080. My refresh rate is set to ~53 Hz to work around a judder/tearing issue with the Sceptre display. Here are my results:

frames drawn: 1458
traces elapsed: 1481
frames dropped: 23
frame ratio: 0.984470
seconds elapsed: 27.729266
approximate fps: 52.579827

It looks like my system is actually dropping a few frames which is surprising. I think I can see the slight judder when a frame is dropped. Does this sound right? The 5200 is the standard g-card and an Athlon 2500 isn't that puny...

thanks - J
jay_cee is offline  
 
post #4 of 16 Old 01-05-2006, 10:49 PM - Thread Starter
Senior Member
 
nitrogen's Avatar
 
Join Date: Feb 2003
Location: Utah
Posts: 264
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by jay_cee
I'm running an Athlon 2500 w/ an Nvidia 5200 based graphics card. My display is a a 37" Sceptre at 1920x1080. My refresh rate is set to ~53 Hz to work around a judder/tearing issue with the Sceptre display. Here are my results:

frames drawn: 1458
traces elapsed: 1481
frames dropped: 23
frame ratio: 0.984470
seconds elapsed: 27.729266
approximate fps: 52.579827

It looks like my system is actually dropping a few frames which is surprising. I think I can see the slight judder when a frame is dropped. Does this sound right? The 5200 is the standard g-card and an Athlon 2500 isn't that puny...

thanks - J
That sounds right. Are the frames dropped regularly, about once a second, or did the drops happen close together? The 5200 is actually a pretty poor performing card as far as fill rate is concerned (some games actually run slower on it than a Geforce 2 MX in my experience), and that's the only thing this test depends on. I have 5200's in my desktop and HTPC, and an Athlon 2600 in my desktop. I can run at XGA, the resolution of my projector, but higher resolutions do drop a frame or two now and then. Because of the very high resolution, I'm not sure if it's possible to fix that. However, there are a few options.

The first option, and the one I would recommend, is running in windowed mode, drawing only to a subset of the screen. If a display is juddering, it will judder no matter what size the window is, as the problem is not with the computer. Try this command line to make a 1280x720 window:

Code:
FS=0 XRES=1280 YRES=720 ./judder
The second optino you could try is setting the frame skip to 2. That will take you to 53/2fps. The number of dropped frames reported should be equal to the number of frames drawn, and the frame ratio should be 0.5. Here's the command for that:

Code:
./judder 0 0 2
The final option, the option you should try if your system is running any background processes and the other two options don't work, is running Judder Test with realtime priority. As root, run:

Code:
(FS=0 XRES=1280 YRES=720) nice -n -20 ./judder
Run
Code:
./judder --help
to see other options available.

Hope this helps.
nitrogen is offline  
post #5 of 16 Old 01-06-2006, 08:31 AM
Advanced Member
 
seank's Avatar
 
Join Date: Sep 2002
Location: Ithaca, New York
Posts: 614
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 11
I am getting ready to put together a KnoppMyth box. Forgive my ignorance, but can anyone explain to me what judder is?

Thanks,

Sean
seank is offline  
post #6 of 16 Old 01-06-2006, 11:53 PM - Thread Starter
Senior Member
 
nitrogen's Avatar
 
Join Date: Feb 2003
Location: Utah
Posts: 264
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by seank
I am getting ready to put together a KnoppMyth box. Forgive my ignorance, but can anyone explain to me what judder is?

Thanks,

Sean
Judder is what people call the visual effect of an uneven framerate. Put simply, when a video is judder-free, a smooth pan or a credit roll will appear like real life - smooth as butter. With judder, the video will appear to jump, start and stop, or speed up and slow down, rather than continually move at an even speed.

Some common causes of judder are:

1. Projectors and other displays that have a fixed update rate running at a refresh rate different from their fixed update rate
2. Computers with insufficient processing power to keep video and audio in sync
3. Poor quality sound cards that cause video software to have a hard time keeping audio and video in sync
4. Video card refresh rate that isn't an integer or 3:2 multiple of the video frame rate (i.e. 59.94Hz is the ideal rate for 29.97Hz NTSC and 23.976Hz NTSC telecine - if displays could do it, doubling that rate to ~120Hz would be the best).

Number 1 and number 4 are the biggest problems. This Judder Test program is designed to help track down #1.

Does that answer your question?
nitrogen is offline  
post #7 of 16 Old 01-10-2006, 11:06 AM
Advanced Member
 
seank's Avatar
 
Join Date: Sep 2002
Location: Ithaca, New York
Posts: 614
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 11
Thanks. I didn't know there was one official term that covered all of those things.
seank is offline  
post #8 of 16 Old 01-13-2006, 11:04 PM - Thread Starter
Senior Member
 
nitrogen's Avatar
 
Join Date: Feb 2003
Location: Utah
Posts: 264
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by jay_cee
I'm running an Athlon 2500 w/ an Nvidia 5200 based graphics card. My display is a a 37" Sceptre at 1920x1080. My refresh rate is set to ~53 Hz to work around a judder/tearing issue with the Sceptre display. Here are my results:

frames drawn: 1458
traces elapsed: 1481
frames dropped: 23
frame ratio: 0.984470
seconds elapsed: 27.729266
approximate fps: 52.579827

It looks like my system is actually dropping a few frames which is surprising. I think I can see the slight judder when a frame is dropped. Does this sound right? The 5200 is the standard g-card and an Athlon 2500 isn't that puny...

thanks - J
I did some fiddling with nvclock and found that I could easily overclock my FX5200's memory bus from 265MHz to 340MHz, which yielded noticably better performance.

You might give "nvclock -m 340" a shot.
nitrogen is offline  
post #9 of 16 Old 04-07-2006, 02:09 PM
Newbie
 
lotan_rm's Avatar
 
Join Date: Apr 2006
Posts: 1
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hi,

I very much like the idea of targeting tearing issues in linux with a test program.

My problem is, though: I don't know too much about the whole issue.

I have a projector (BenQ PB6100) in conjunction with a graphics card (ATI Radeon 9800 XT) and the picture, the combination produces, has some judder and I'd like to get rid of it.

The trouble is:
I don't really know what to look out for within the judder test program and the return values don't make too much sense to me:

$ ./judder
Resolution 800x600, offset 0x0, refresh 60.033924, flags 0x00000000 - no exact mode match found
frames drawn: 17665
traces elapsed: 0
frames skipped: 17665
frame ratio: inf
seconds elapsed: 17.939865
approximate fps: 984.678530

So my I'd like to ask especially you, nitrogen, if you have any hints or explanations that would help me to produce a better picture.

Thanks.
lotan_rm is offline  
post #10 of 16 Old 04-08-2006, 02:26 AM - Thread Starter
Senior Member
 
nitrogen's Avatar
 
Join Date: Feb 2003
Location: Utah
Posts: 264
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
The returned values are mostly to see what's happening with the CPU and video card. You need to have no more than 2 or 3 dropped frames and no skipped frames for the judder test to work. It's very strange for you to be running at 984fps. Apparently your OpenGL's not syncing to vblank, doesn't support SGI's vsync extension, or since every frame drawn was skipped (a skipped frame is a frame that is drawn and overwritten by the next frame before the video card reaches the end of the vertical scan, resulting in a frame rate greater than the refresh rate) your OpenGL isn't working at all. Once you can figure out how to turn on vsync/vblank sync for the ATI driver, the judder program is used to spot tearing and jumping visually. ./judder --help would give you some options to try. For spotting tearing, I recommend:

./judder 0 8

Your fps and refresh rate should be nearly identical if the OpenGL driver is working right. Once you reach that point, visual inspection of the display while the judder test is running will show you whether your refresh rate matches your projector's native rate. If you see tearing or jumpiness (judder), you need to adjust the refresh rate. If there are periodic jumps every few seconds, then you can count the number of seconds to see about how close your refresh rate is. If there's a jump or tear every 5 seconds, then your refresh rate is within 1/5 or 0.2 Hz.

As of right now you need to use xvidtune to adjust the picture while the judder test is running in windowed mode (FS=0 XRES=400 YRES=600 ./judder). If you want to change the dot clock, the only way to do that with X is to change the modeline and restart.

Let me know if you can't get it working, and other OpenGL programs like glxgears work fine. I have only tested the program with nvidia 5000 series cards (5200 and 5900). If you have any other visual problems that you think would be easier to solve with a different drawing mode or other feature, suggestions are welcome.

Hope this helps.
nitrogen is offline  
post #11 of 16 Old 08-27-2006, 01:51 PM
Newbie
 
ubikdood's Avatar
 
Join Date: Jan 2006
Posts: 1
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
nitrogen,

Excellent utility, thank you !
ubikdood is offline  
post #12 of 16 Old 08-28-2006, 05:24 AM
Newbie
 
prhinOz's Avatar
 
Join Date: Jul 2006
Posts: 9
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by nitrogen
Hello, everyone.

I got fed up with jerky video playback on my Linux HTPC and Plus UP-1100P projector, so I wrote this program today to help me solve the problem.
This looks cool - I'm going to try it on my soon-to-be-ready myth box.

Now, did you solve your judder problem? And if so, how???

Paul
prhinOz is offline  
post #13 of 16 Old 08-31-2006, 09:07 PM - Thread Starter
Senior Member
 
nitrogen's Avatar
 
Join Date: Feb 2003
Location: Utah
Posts: 264
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by prhinOz
This looks cool - I'm going to try it on my soon-to-be-ready myth box.

Now, did you solve your judder problem? And if so, how???

Paul
Yes, I solved my judder problem, for about two weeks... Then my projector's power supply blew up. So... If anyone has an old Plus UP-880 or UP-1100 laying around, I'd like to steal..borrow your power supply.

Anyway, what I had to do was figure out what refresh rate the Plus was syncing to. Through trial and error, using a combination of judder test, xvidtune, and editing xorg.conf and restarting, I figured out that it was running at precisely 61 2/3 Hz. So, I came up with a modeline (using the gtf command line tool), and I was set. For film material, 23.976Hz is sufficiently below 61.67Hz that the image was equal to or better than the normal NTSC 3:2 judder. In other words, very smooth.

Now I'm alternating between a cheap Optoma and a halfway decent HP, when they're not in use by their educator owner. Unfortunately I don't have the budget to buy another projector for quite a while (what with work, school, and all).
nitrogen is offline  
post #14 of 16 Old 09-04-2006, 09:03 PM
Member
 
BlueCamel's Avatar
 
Join Date: Aug 2002
Location: Durham, NC
Posts: 102
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I found this thread quiet interesting and the judder tool itself is a keeper. But I'm left with some questions. My (current) setup is a barebones Pundit with the onboard SIS disabled and running an ATI PCI Radeon 9200 SE 128MB (R280) adapter. Far from ideal :) My display is a AE700 projector running 1280x720@60. Running judder without any options confirms this for me too.

Before using judder I did confirm using the DRI Trouble shooting guide at http://dri.freedesktop.org/wiki/DriTroubleshooting that my OpenGL/DRI config was running as expected.

I've never personally noticed tearing problems when using mplayer -vo xv to play back DVDs. I was able to confirm tearing before I started by running the command "FS=0 XRES=640 YRES=480 ./judder 0 1 -1 64" Here is the output from that:

Code:
frames drawn:    3522
traces elapsed:  816
frames skipped:  2706
frame ratio:     4.316176
seconds elapsed: 13.584962
approximate fps: 259.257258
And here are the results of running judder without any options at all.

Code:
Resolution 1280x720, offset 0x0, refresh 60.000000, flags 0x00000000 - no
exact mode match found
frames drawn:    710
traces elapsed:  313
frames skipped:  397
frame ratio:     2.268371
seconds elapsed: 5.212484
approximate fps: 136.211449
I got to reading the DRI wiki and found out about the /etc/drirc config file and noticed the vblank_mode option. See http://dri.freedesktop.org/wiki/ConfigurationOptions for the details of vblank_mode. I set up a drirc config file with vblank_mode=3 for my r200 DRI driver and ran judder without options. Here are the results:

Code:
Resolution 1280x720, offset 0x0, refresh 60.000000, flags 0x00000000 - no
exact mode match found
frames drawn:    434
traces elapsed:  433
frames skipped:  1
frame ratio:     1.002309
seconds elapsed: 7.220091
approximate fps: 60.110045
I think this would be considered judder-free nirvana without all the hassle of going through mode lines, vidtune, etc. But is it accurate? Is forcing the DRI driver to obey vsync achieving the same effect as what was intended or am I'm some how "cheating" on this judder test? It's hard for me to answer this question as I've never seen tearing or judder during normal system use.

Comments, thoughts?

Scott
BlueCamel is offline  
post #15 of 16 Old 09-05-2006, 04:29 PM - Thread Starter
Senior Member
 
nitrogen's Avatar
 
Join Date: Feb 2003
Location: Utah
Posts: 264
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
I think this would be considered judder-free nirvana without all the hassle of going through mode lines, vidtune, etc. But is it accurate? Is forcing the DRI driver to obey vsync achieving the same effect as what was intended or am I'm some how "cheating" on this judder test? It's hard for me to answer this question as I've never seen tearing or judder during normal system use.

Comments, thoughts?
When judder test shows skipped frames, it either means that glXWaitVideoSyncSGI is not waiting for vsync (which means that the video driver is ignoring applications' requests to sync to vblank), or that you're running with the second parameter set to -1. This is consistent with your results. If only the drirc file applied to nvidia cards.

What judder-free, tearing-free output over a period of at least 30 seconds in the judder test tells you is that your video card's refresh rate is being (nearly) exactly matched by your digital projector or flat panel display (or that you're using a CRT). Congratulations, you have eliminated the primary cause of judder during movie playback on a PC.

However, there is another potential cause of judder, and this is a refresh rate that is not identical to, an exact multiple of, or sufficiently higher than the video's frame rate. For example, playing 59.94fps video at a 61Hz refresh rate (assuming your system is fast enough) will cause regular "stuttering" of the video, as a frame is duplicated every 1/(61-59.94) or .94 seconds. This is less noticeable than a lack of projector sync, but can still be an issue. If you primarily watch 23.976fps material, it's probably not a problem. Check out this Wikipedia article on the Nyquist frequency if you're not already familiar with the concept: http://en.wikipedia.org/wiki/Nyquist_frequency -- it's slightly different for video than for audio or other similar signals, but the information about aliasing applies.

Finally, I'll comment on how this test relates to xv output from mplayer, xine, and other applications. Xv is typically double buffered, and the buffers are swapped on screen retrace. On an nvidia card, this can be changed using the nvidia-settings tool. If projector/plasma/lcd-induced judder is eliminated through the use of the judder tool, the secondary cause of judder mentioned should be examined to determine the cause of playback problems. Unfortunately, it is unlikely that both conditions can be satisfied. If you have to choose between a projector-friendly refresh rate and a frame-friendly rate, choose the projector-friendly rate. Motion compensating deinterlacing techniques may be able to help this case, but I'm not sure how well the TomsMoComp filter in Xine is implemented.

In all cases it is assumed that the CPU and video card bus are fast enough not to drop frames.
nitrogen is offline  
post #16 of 16 Old 09-05-2006, 05:34 PM
Member
 
BlueCamel's Avatar
 
Join Date: Aug 2002
Location: Durham, NC
Posts: 102
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by nitrogen
When judder test shows skipped frames, it either means that glXWaitVideoSyncSGI is not waiting for vsync (which means that the video driver is ignoring applications' requests to sync to vblank), or that you're running with the second parameter set to -1. This is consistent with your results. If only the drirc file applied to nvidia cards.
As far as I can tell, the drirc config options would apply to any DRI compatible driver. Most likely the nvidia proprietary drivers, and the ati fglrx proprietary drivers, would not work with a drirc config file.

Quote:
Originally Posted by nitrogen
What judder-free, tearing-free output over a period of at least 30 seconds in the judder test tells you is that your video card's refresh rate is being (nearly) exactly matched by your digital projector or flat panel display (or that you're using a CRT). Congratulations, you have eliminated the primary cause of judder during movie playback on a PC.
Based upon the output from judder and visual inspection of DVD action scenes, I would venture to say that any potential judder issues I may have had aren't there any more. :)

Quote:
Originally Posted by nitrogen
Check out this Wikipedia article on the Nyquist frequency if you're not already familiar with the concept: http://en.wikipedia.org/wiki/Nyquist_frequency -- it's slightly different for video than for audio or other similar signals, but the information about aliasing applies.
Cool reference. Thank you.

Quote:
Originally Posted by nitrogen
In all cases it is assumed that the CPU and video card bus are fast enough not to drop frames.
heh. I really need to fix my HTPC in this aspect.

Scott
BlueCamel is offline  
Sponsored Links
Advertisement
 
Closed Thread HTPC - Linux Chat

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off