Posts

Showing posts from September, 2020

piLagTesterPRO and the raspberry pi4: an alpha release is available

The piLagTesterPRO is a tool to measure display input lag, using custom hardware plugged into a raspberry pi. It works great on the pi 0, a $5 computer that out-specs SGIs from the mid-90s. It also works great on higher end PIs, such as the Pi3, which has a much faster processor but the same GPU as the pi0. 

**** UPDATE: full Pi4 is now available, the text below is out of date *****

It's now available for the pi4 too! but first some background:

The raspberry pi4 has been a problem because it uses a new GPU with much better specs but no backwards compatibility. For a while I've been working on supporting it. While it kind of worked, it wasn't ready for prime time, but now the official firmware and my work-around for bugs in the firmware seem to have reached a threshold where it would be reasonable to make a testing release.

While it works well for me I don't have the equipment to test the higher resolutions and refresh rates that the PI4 offers. Since this is the reason for using the Pi4 in the first place, I'm hesitant to call this a beta. Instead it's an alpha. This is not out of undo caution (I think). The Pi4 firmware has a bug where moderately high demands on the CPU cause the GPU to drop frames and it's very difficult to detect this in software, AND still know what the right value is.  From an end user perspective it's easy to tell something's up though: input lag will suddenly change by 16ms. I think I've got the code optimized enough to avoid this issue but there is a chance it will occur for higher refresh rates or resolutions. 

That's why I need your help. I need folks to test this on a range of displays and see if the input lag values stay constant or start to jump up/down by exactly 16ms. So for those of you who already own the piLagTesterPro and have a pi4, please try this image on your pi4. if you have an earlier pi, there's no reason to try this image. 

here's the download link; please don't use unless you have a pi4 and a piLagTesterPRO as it will eventually use up my quotas:

 https://1drv.ms/f/s!Ahb4rgU6L_z9gxV287CTdwmz8mvh

currently requires a 16gb microsd card, write it as you would any raspbery pi OS image.

login as root, password = t (just the letter t). you will see instructions after you log in.





Philips 42PFL3603D/F7 review: input lag, deinterlacing and upscaling using the piLagTesterPRO

This 1080P TV from 2009 looks good at 1080p but not so great at 720p & 480p/i. Input lag is middling and the display doesn't properly synchronize redraw with vsync. And it has an absurdly long model number. 

Overview/Image quality

This TV only really looks good at 1080P, where there's no aliasing and no cropping. At 720P and 480P there's no zoom setting that avoids some aliasing and ringing. A checkerboard made of 1-pixel wide black and white pixels gets rendered like the photo at right. Ugly in a sort of compellingly strange way.  Meanwhile a 45 degree line shows ugly ringing and aliasing artifacts. These aren't so obvious in 3D games but pixel art looks very bad because of this. 480i has a strange artifact where changes seem to "snap" in to place, I can't really describe it more clearly but let's just say that it looks bad, worse than other deinterlacing I've seen.  

It offers 3 HDMI inputs and a couple YPrPb inputs. 

Interestingly, this TV has upgradeable firmware. I haven't tried to see if it helps but the change log doesn't seem hopeful in that regard. It would be a fun hacking project indeed to see if you could totally change the TVs behavior by editing the firmware...

Input Lag

This display does not have a game mode. I toggled all the display quality settings and did not see a consistent effect on lag, however the tests reported are with every "enhancement" set to off. I used a piLagTesterPRO to measure input lag. This device sends a frame of video over HDMI and measures how long it takes to display it. Unfortunately this TV doesn't synchronize the panel refresh with the start of the video frame (vsync), so you get a different lag each time the TV (or game console) is powered on. Here I report the average, but the day-to-day lag will be +/- 8ms. 

I report two kinds of values. The minimum lag is the first point in time any change is detected at the top of the screen. This overly optimistic value doesn't tell you how long it takes to see anything useful, but matches what other reviewers use. I also report a more realistic measure of lag: when the display has reached 80% of full brightness at the bottom of the screen. This combines both input lag and response time, and is closer to what you would actually experience in a game.

Test results:

DisplayYear madeNative Resnative min lag480i real lag480p real lag720p real lag1080p real lagresponse timescan out
Dell U2410 (game)20101080p4.062.228.326.526.56.0016.20
Dell U2410 (sRGB)20101080p20.562.445.043.143.16.1316.13
Sony 40VL130 (game)20081080p22.866.349.047.347.39.0815.43
Sony 40S20L12007720p48.490.172.973.49.6014.00
Emprex HD 32022007720p27.0126.051.050.08.5015.00
LG 42LC2D2006720p28.354.650.850.46.3015.95
Vizio VO370M20101080p2.583.049.047.024.35.4715.67
Philips 42PFL3603D/F720091080p29.084.050.050.050.05.0016.00

Input lag is pretty poor for this TV no matter the resolution or interlacing. The only bright spot is the response time, which is better than any other TV I've seen. But because the lag is high and variable, I wouldn't recommend this set for gaming. 

And for those of you that want the raw values: 

480i top 1st480i top full480i bot 1st480i bot full480p top 1st480p top full480p bot 1st480p bot full720p top 1st720p top full720p bot 1st720p bot full1080p top 1st1080p top full1080p bot 1st1080p bot
 full
63687984293445502934455029344550

Every mode has the same lag, response time, etc, except for 480i, which of course is much slower do to deinterlacing. 

Conclusion

This would be a fine TV for watching movies or other video content but it's not great for gamers. The high and variable lag ruins it, as does the aliasing at  sub 1080p resolutions.

Other models

It appears that there are also 52" and 47" versions of this set. I assume they would have the same performance, but I made no effort to verify that the overlap in model numbers means the same video processing hardware. Here are the complete set: 52PFL3603D 47PFL3603D 42PFL3603D.

Variable input lag: displays that don't synchronize drawing with vsync

While developing the piLagTesterPRO I've come across at least 13 TVs that have highly variable input lag, leading to confusing results and potential disagreement with other published input lag measurements. While the symptoms vary, in all cases the issue traces back to how the TVs decide when to start drawing the video input, and it can introduce up to 16ms of variability every time you power cycle the TV or video source. Some of the TVs also drift over time.

TL;DR: the piLagTesterPRO now has a tool to check for this issue, called vsyncTest. Scroll to the bottom to see how to use it, or continue reading for a deeper explanation.

What's vsync?

Briefly, part of the video signal is known as vsync, and it proceeds the start of each frame. In the analog days CRTs waited until the end of vsync and then immediately started drawing the "pixel" data received over the wires or airwaves. They had zero buffer to save incoming values so the only option was to draw it the instant it arrived.

Modern video signals (such as HDMI or displayport) do not transfer analog values, but they still start/end each video frame with a vsync signal. Modern displays do have significant internal memory to buffer, preprocess, and then eventually draw those video signals. This is largely what causes input lag. You might expect that this buffering would always introduce a fixed delay, such that the TV starts drawing each frame exactly 25ms (or whatever) after the vsync signal was received. 

Empirical observations with Real TVs(TM)

But in fact many TVs don't work this way. One reason is if the TV only runs at a single refresh rate, such as NTSC's 59.94hz. If any other refresh rate (such as 60hz) gets fed to the TV there's going to be a problem. While the TV could just go dark for unsupported refresh rates, a "nicer" option is to buffer the input and draw those buffered frames at the rate supported by the TV. This scenario is depicted in the figure below. 



Part A) of the figure shows a schematic of what's going on, exaggerated for clarity. The width of each frame depicts how long it takes to send/draw it.  Since 60hz frames are shorter than 59.94hz frames they are narrower. The TV starts drawing frame 1 exactly the same time as it receives it, but what about frame 2? To make this clearer in part B) I redrew A) with extra space between frames. With every frame drawn the TV gets further behind the input, which means that the input lag grows. Eventually a whole frame's worth of delay accumulates, which occurs for frame 5 in this figure. By the time the TV finishes drawing frame 4, it's already receiving frame 6, and the only choice is to discard frame 5. So now we get a motion glitch, and the lag now drops down by 16ms (the length of one frame). Since 60hz and 59.94hz are actually quite close, in reality this takes much longer than 5 frames. Here's an actual example from an Emprex 3202HD:

Input lag is shown in blue. It starts out at about 35 ms and over the period of about 16 seconds it grows to about 51ms before abruptly jumping back down to 35ms by dropping a complete frame of input.

So what's the input lag then?

There's a philosophical question as to what single "input lag" number best represents this kind of screen. I've gone for the average (43ms in this example) in my reviews, but a case could be made that variable input lag is much worse than that subjectively.  Your brain can adapt hand-eye coordination to a fixed input lag to push buttons a few milliseconds early for events that can be predicted, and this clearly happens in the real world. But when input lag constantly drifts it puts limits on how well you can adapt. Thus even using the slowest input lag (51ms) might actually understate how laggy the TV actually feels. 

Even supported refresh rates don't always sync

You'd think that would be the end of the story: on a TV that can't draw at 60hz, you'd see variable input lag until you set the input refresh rate to 59.94hz. But with the proper refresh rate you should experience a constant input lag, and furthermore you'd expect that lag to be the minimum lag possible (35ms in the example above). Sadly I've more than 10 TVs that don't work that way. 

Instead these TVs make no attempt to synchronize the start of display refresh with the vsync signal. Instead the TV starts refreshing the LCD panel at some fixed point in time after it turns on. Once there's pixel data in the input buffer it draws that instead of a blank screen, but it does nothing to adjust when the panel refresh starts. So on this sort of TV the input lag varies each time you turn on the TV (or power cycle your gaming console). Sometimes you get a low lag, and sometimes a high amount of lag (the range is always the true refresh rate of the display, which is 16ms for ~60hz).

This might have been a "feature", actually. I own an upscaler/deinterlacer made for people who cared about video quality and had money to spare: the DVDO VP50. It cost $2500 new, and by the time I purchased it used 10 years after being discontinued it still cost me $150. One of its features (thankfully togglable) is to generate its own fixed output refresh rate at 59.94hz independent of the input. In the DVDO manual they explain this allows for a "smoother/quicker" transition between inputs. Well, not everybody is a gamer, and not every gamer cares about input lag.

A few more variants of this bug feature

That's the basic story. But I've seen a few variants that are worth mentioning. I tested an LG 42LC2D TV that couldn't even synchronize properly with 59.94hz. Over time it would slowly drift, gaining or losing a frame every minute or so. And with 60hz input it would lose a frame every 16 seconds. Definitely a poor choice for gamers.

I also tested a Vizio VO370M, which was an interesting mix of all of the above. It reports supporting 75hz, but if you choose a 75hz mode it still outputs at 60hz. Thus you have the same drifting lag that I saw with the 59.94/60hz mismatch only much, much worse, with dropped frames every second or so. For 60hz modes it didn't drift, but it had variable input lag, with a new lag value every time I power cycled the TV or the input device. But this did not hold for the panel's native 1080p resolution: it had a fantastic ~3ms input lag that never drifted. This suggests the TV had at least two panel drivers; one based on a TV "core" that handled all the modes a TV might be expected to receive, and one more like a computer monitor, where it could expect the video card to exactly match the resolution and refresh rate preferred by the display. 

You can see how prevalent this issue is by looking at my input lag database: the measurements for TVs with this problem are all coded in red. It's about half the list. 

Detecting this issue with piLagTesterPRO

If the TV draws 60hz as 59.94hz then it's easy to spot because each lag value reported will be around a millisecond longer than the last. That's part of the reason why I have set the tool to boot in 60hz by default. But as I've discovered, a lot of TVs don't drift constantly, but do vary between power cycles. So I wrote a tool for the piLagTesterPRO that turns it on and off repeatedly, measuring input lag each time. Here's an example command line:

vsyncTest 25 myTVname.txt tv720p

25 is the number of power cycles to test, and tv720p is the resolution that you'd like to test. It takes a minute or so, and then will report all measurements, sorted from smallest to largest. Because it only takes a few measurements per power cycle you can expect a range of 1-2ms between the shortest and longest input lag values, or even 3-4ms at most if the backlight on your TV flickers a lot. But if you have a TV that doesn't sync properly, the range should be on the order of 16ms, with a fairly even distribution. Based on my Vizio experience, it pays to test both native resolution and at least one other lower resolution. 





Vizio VO370M review: input lag, deinterlacing and upscaling using the piLagTesterPRO

This 1080P TV from 2010 has fantastic input lag at native resolution and is otherwise a mixed bag but might be a good choice depending on your needs and if you have an OSSC.

Overview/Image quality

At both 720p and 1080p the display is pixel perfect: there's no cropping and no aliasing. Very impressive, for a TV (but typical for PC displays). 480i/p doesn't fair as well - depending on the zoom level you can have either zero aliasing or zero cliping. It actually looks best in stretched mode, with minimal aliasing and clipping, but of course everything's too wide then.

It supports all the inputs: 3 hdmi ports, 2 component + vga, composite, & s-video. it accepts 480i over HDMI but not over VGA.

Input lag

This display does not have a game mode; just a game 'color' preset that does not impact lag at all. I toggled all the display quality settings and did not see a consistent effect on lag, however the tests reported are with every "enhancement" set to off. I used a piLagTesterPRO to measure input lag. This device sends a frame of video over HDMI and measures how long it takes to display it.

Complicating things significantly this is yet another display that does not actually sync to the input signal - instead it fills its own internal frame buffer from the HDMI input and then draws that with a fixed delay that is randomly decided each time you turn on the set. It does set the refresh rate properly based on the input refresh rate (60hz and 59.94hz), so there's no drift/dropped frames, but, to take one example, input lag for 720p can vary from 19.6ms to 35.4ms each time you switch inputs/turn on the set. What you get seems to be entirely up to chance, except perversely it seems to be closer to the 35ms side of the distribution.

But hold on: it doesn't do this strange behavior in every mode. In 1920x1080 (and some nearby modes discussed below) it does properly sync refresh with the input, giving a steady very low 3ms of lag, every time.

So, for 480i/p/720p, I'm going to report values that are roughly average (it's hard to get a perfect average since you have to power cycle the TV over and over to do it); actual lag will be something like +/- 8ms. For 1080p, however, the lag is exactly the same each time, no plus/minus caveat required.

Some TVs behave much better when driven over VGA, with low or more consistent lag (in fact a Vizio E470VL from 2011, just one year newer than this set, was much improved when driven over VGA).  So I tested the VGA input on this set just like I tested the HDMI set. Sadly, the TV performed identical under VGA as it did HDMI, with variable and moderately high lag in ever mode but 1080p. In 1080p I measured VGA as actually 0.2ms faster than HDMI, but variability in backlight flicker can account for that much difference. Well, at least I proved my HDMI->VGA adapter is lag free.

Full results


I report two kinds of values. The minimum lag is the first point in time any change is detected at the top of the screen. This overly optimistic value doesn't tell you how long it takes to see anything useful, but matches what other reviewers use. I also report a more realistic measure of lag: when the display has reached 80% of full brightness at the bottom of the screen. This combines both input lag and response time, and is closer to what you would actually experience in a game.

DisplayYear made (TV?)Native Resnative min lagnative real lag480i real lag480p real lag720p real lag1080p real lagnative response timenative scan out
Vizio VO370M20101080p2.523.683.049.047.024.35.4715.67
Dell E198FPb20081024p2.720.439.035.05.0012.70
Samsung S27C23020141080p2.936.136.636.137.018.2514.97
Dell 1907FPc20081024p3.034.035.934.815.0016.00
Dell E2211H20141080p3.033.634.734.534.133.815.0015.57
Corprit D157 (hdmi)20211080p3.134.534.934.834.633.916.2515.13
AOC/Envision G19LWK2010900p3.131.239.538.738.437.815.5012.60
Dell U2410 (game)20101080p4.026.262.228.326.526.56.0016.20
TCL 40S32520211080p6.527.360.629.027.927.76.0014.83
ACER AT326520121080p19.543.862.745.343.843.88.0016.27
RCA L40FHD4120101080p20.346.665.048.047.046.09.6816.63
Dell U2410 (sRGB)20101080p20.542.862.445.043.143.16.1316.13
Vizio E470VL (vga)20111080p22.039.039.039.039.09.008.00
Sony 40VL130 (game)20081080p22.847.366.349.047.347.39.0815.43
Emprex HD 32022007720p27.050.5126.051.050.08.5015.00
Vizio VO22L FHDTV10A2008720p28.061.094.061.061.061.018.0015.00
Polaroid FLM-373B2007720p28.049.082.049.049.049.07.0014.00
GPX TDE3245W2016720p28.051.0102.051.051.051.08.0015.00
Panasonic TH-58PE75U2008720p28.034.034.034.034.034.06.000.00
Sony KDL-46EX40020101080p28.052.087.052.052.052.08.0016.00
Vizio VX20L HDTV2007720p28.062.095.062.062.062.018.0016.00
LG 42LC2D2006720p28.350.654.650.850.46.3015.95
Philips 42PFL3603D/F720091080p29.050.084.050.050.050.05.0016.00
Toshiba 40L2200U20141080p30.056.074.056.056.056.010.0016.00
Sharp LC-C3234U2009720p33.064.683.666.664.615.0016.60
Sony 40S20L12007720p48.472.090.172.973.49.6014.00
Samsung LN46C63020121080p54.572.190.790.388.572.310.007.63
Toshiba 46L5200U20131080p55.071.089.076.071.074.08.008.00
LG 47LW6500-UA20121080p66.680.7149.7149.081.780.92.2711.83
SANYO DP507492010720p67.075.0103.094.079.075.07.001.00
Vizio E470VL (hdmi)20111080p69.086.0128.095.095.086.09.008.00
Samsung HP-T425420111080p69.775.794.176.075.75.001.00

This list is sorted by min input lag at native resolution. 

This vizio has the distinction of being the lowest input lag TV I've tested (out of 34!), when used at native resolution. At any other resolution it's very much middle of the pack, or worse. It's 480i performance, in particular, is one of the slowest. So out of the box this is not a TV for a retro gamer. But for modern gamers it provides great performance in native 1080p.

in case anybody wants to see the full results instead of the summary: (all values are ms):

480i top 1st480i top full480i bot 1st480i bot full480p top 1st480p top full480p bot 1st480p bot full720p top 1st720p top full720p bott 1st720p bott full1080p top 1st1080p top full1080p bot 1st1080p bot full
61.666.8788327.732.8434925.530.541472.57.618.724.3


Vizio VO370M + the OSSC


The TV supports some other modes as well: 1280x960 and 1440x900. Both have the same lag as 1080p: ~3ms. This is relevant because of a nice piece of hardware called the OSSC, which retro gamers are likely to be familiar with. This device is a upscaler (sort of) and deinterlacer (sort of) for retro consoles. In particular, it can take 480i and turn it into 480p by using BOB deinterlacing, also known as line doubling. This simple technique involves showing each interlaced line twice in a row; thus on each frame you first see all the odd lines at double height, and on the 2nd frame all the even lines are drawn instead, also at double height. This barely reduces the vertical resolution, because all lines are shown, just not the same time, but does result in mild flicker especially in JRPGs (text heavy interfaces with lots of horizontal lines). While it's not as good as adaptive deinterlacing, it's great for games with lots of action because the artifacts are minimal and because it is a zero lag technique.

On this TV that would mean 480i would be as fast as 480p, a savings of 33ms. But it gets better: the OSSC can't upscale arbitrarily, but it can can go by integer multiples, meaning that 480i/p can be displayed as 960p. And the Vizio can display 960p just fine, with the same lag as 1080p (3ms!).  Thus what was once 83ms is now 3ms (+ 5-6ms for response time). Thus at worst this TV + the OSSC is only 8ms slower than a real CRT. Unfortunately, this comes with some flicker that you wouldn't see on a CRT, and aliasing. 960p is not pixel perfect on this display. But if you don't have space for a CRT and like action games this is a pretty good choice.

Other models

I tested the input lag on the V0370M. I would strongly suspect that the VO420E (42") would perform the same, based on the manual, manufacturing dates, and identical photos of the mainboard for each TV. Just with larger pixels.




Email me

Name

Email *

Message *