Re: Blur reduction possible on any monitor via software ?
Posted: 28 Oct 2017, 11:55
<HOMEBREW MONITOR-HACKING TALK>
Skip if you're not interested in technical chat
In theory, *depending* on how much the monitor's hardware can help dejitter your strobing signals (e.g. if it can begin a timed pulse for you, or capable of scheduling a pulse at the next VBI, or needs an ON-signal + OFF-signal), then triggering the pulse from software is likely acceptable. But it's a heavy "depends" -- and there's often no easy way to determine if the monitor firmware of a specific monitor is capable of helping you.
Strobe Phase precision is less important
The phase jitter can actually jitter a lot (Even a +/- 100 milliseconds jitter in *starting* the flash did not produce noticeable flicker, at least at high frequencies like 120Hz+) -- as long as length of flash remained darn near perfectly constant (same number of photons per second hitting the human eyeballs). But even lengthening/shortening the flash by 10 microseconds, will produce noticeable brightness flicker. Be noted, that strobe crosstalk can vibrate upwards/downwards slightly -- +/-100ms is a 200ms amplitude and 0.2/8.3ms -- or about 1/41th of a screen height vibration in strobe crosstalk for random +/-100ms vibrations in strobe phase precision. This is probably not as noticeable nor bothersome as flicker, but it is a subtle side effect that can be noticed at http://www.testufo.com/crosstalk ... it's at least important to mathematically understand vertical shifts in strobe crosstalk relating to strobe phase inaccuracy.
Strobe Length precision is super-important
10 microsecond error is very flickery. Let's consider many strobe backlights are capable of flashing at 1 millisecond per refresh cycle. That's 1000 microseconds. Now, vary that by 1% -- that's 10 microseconds. A strobe flash difference of 1000 microsecond versus 1010 microseconds is a 1% difference in number of photons hitting the human eyeballs, and is roughly almost three shades apart in 8-bit greyscale (0 to 255 -- basically almost the brightness difference of three shades apart in the color palette). So 10ms is WAY too inaccurate to time a strobe backlight flash -- you gotta aim for sub-microsecond precision for homebrew strobe backlight flash.
So if your monitor's firmware is capable of turning off a flash accurately, you can software trigger the flashes. But most monitor firmwares needs the firmware to do the turn-on signal and the turn-off signal to the backlights. And not all monitor firmwares have direct access to the backlight -- it's very panel dependant.
But a homebrew modder can open up a monitor, and piggyback an Arduino to the backlight. That's been done before by multiple modders, and quite successfully so. But it's very advanced stuff, it's easier to just buy the Cirthix/Zisworks backlight controller board and retrofit the monitor yourself to have a strobe backlight.
Regardless, USB random jitter is extremely bad -- you you will not get the necessary precision from software running in Windows except possibly as a real-time VxD running in the top-priority ring, connected to a direct logic GPIO line (like a parallel port pin) completely bypassing ports. This is probably doable from a Raspberry Pi running a RTOS, but it's easy to do with an Arduino -- a $20 Arduino clone is capable of driving a strobe backlight accurately even with a USB connection to the PC. The Arduino can de-jitter as needed.
If you are running software at a very thin OS level (e.g. dedicated DOS app, or an RTOS like QNX) certainly your existing computer probably can handle it. But not under Microsoft Windows (at least for strobe flash length part -- that would need to be handled separately of Windows).
Software black frame insertion does not have this problem at refresh-cycle granularity simply because the refresh cycles are running on an exact schedule (fixed Hz). It's simply framebuffered and the hardware times the refresh cycle exactly. That's why as long as VSYNC ON is working, the hardware VSYNC is de-jittering perfectly for you, prevening issues.
But trying to software-control a sub-refresh-cycle black frame insertion directly (via direct backlight control), you do not have the help of VSYNC ON to help de-jitter for you. You're completely on your own. Instead of hardware helping you (thanks to VSYNC ON), you don't have hardware helping you anymore for timing backlight-based blackness.
Bam, you now have, literally almost 4 orders more magnitudes of accuracy demands on your software for software-controlled backlights, versus simple framebuffer-based software black frame insertion. So trying to get one-quarter persistence (one quarter of a refresh cycle -- 2ms versus 8.3ms of 1/120sec) by using backlight instead of software BFI, you now have to have more than 5000x more software precision demanded of your software.
Software Precision Requirements
During 120Hz blackness-insertion between visible frames, to reduce motion blur:
Software framebuffer BFI: 8.333 milliseconds (8333 microseconds) since hardware VSYNC ON is helping you
Software backlight driving: 0.001 millisecond (1 microsecond) now becomes necessary
Ouch... about 5 orders of magnitude!
That's 8.333ms (1/120 = 8.333ms) for timing 120Hz software BFI, versus 1 microsecond for timing backlight flashes. Ouch! Almost 10,000x more software precision necessary just to get 4x better persistence (8.3ms full persistence versus 2ms strobed persistence) because you're now suddenly saying goodbye to hardware help ("VSYNC ON" during software BFI). That's the big brick wall you need to jump over, and it's mostly impassable unless you're on an RTOS instead of Microsoft Windows.
It's all fun stuff, but anything done via Windows needs at least *some* help from the hardware, to keep it sufficiently accurate to work very well.
The best the software can do is time the start of strobe flashes, or configure backlight flash timer hardware, basically you will need a little bit of help from hardware. Things like http://www.testufo.com/refreshrate and http://www.vsynctester.com manages to (over time) successfully extrapolate microsecond precision in refresh rates but you need the exact precision in realtime, every single refresh cycle. The most Windows may be able to do is use a USB (or DDC/CI connection) to approximately signal the VSYNC timing/phase to an Arduino attached to the monitor backlight. The Arduino which would then de-jitter (and filter outliers / missed VSYNC signals from USB jitter, etc) and then the Arduino would merrily continuously precisely timing the strobe backlights, especially correct strobe lengths. If you strobe a monitor's backlight, make sure you use one of those 32-bit ARM based Arduinos, those easily achieve microsecond precision with good programming.
Ideally, Arduino should directly monitor the VSYNC in the monitor signal (and that kind of makes the strobe-backlight VRR compatible -- variable rate strobing!) but in theory the software can configure the Arudino precisely enough via Windows, so minimally, just an attachment to the backlight only, bypassing the monitor motherboard and no nonstandard taps into video cables or monitor motherboards (thus making it more generic-monitor-mod compatible, in theory). Heck, you can even packetize it via timecoded VSYNC history (microsecond accurate) transmitted as random packets occasionally to an Arduino. And then the Arduino would extrapolate a darn-near perfect strobe flash out of it, so in theory you do not need any hardware VSYNC attachments at all. But you still need the Arduino to accurately time the strobe flashes.
BlurBusters originally started because of an Arduino scanning backlight, so we have learned enough to be able to inform you that if you do some of it in software, you still need help from the hardware -- whether as barebones like a GPIO connection to the backlight from an RTOS directly on your PC -- or via Windows configuring an Arduino backlight driver doing the flash timing for you. There are no APIs available to control monitor's backlight flashing at the sub-refresh-cycle level, so this is essentially 100% hack-on stuff if you do DIY strobe backlights.
It's cheaper to mail the monitor ($100 shipment), get someone to add the Zisworks board (a few hundred dollars for materials, labour, and monitor-specific tweaks), and mail the monitor back ($100 shipment), than to pay someone to attempt to do this in 100% software -- it's almost an Apollo mission without an RTOS / without GPIO logic lines / without an external microcontroller (whether existing in monitor, or a strap-on hack to the monitor backlight). It would even take me several weeks to pull it off even under QNX, assuming the motherboard had a microsecond-accurate GPIO line that I can attach to the monitor's backlight. And you wouldn't be able to run any Windows games, since the computer would be running QNX as the microsecond-accurate operating system -- or another RTOS instead. All this, at typical computer programmer rates in North America, that is many thousands of dollars. Cheaper to buy a high-end GSYNC monitor with ULMB.
So the easy route is strap-on an Arduino to the back of the monitor, wire it to control ON/OFF the backlight/edgelight of the monitor's panel, write a couple hundreds lines of Arduino code (for a basic strobe backlight), and only use Windows-side to configure the Arduino parameters (if necessary, even intermittently communicate the current refresh rate, phase and lengths, for the Arduino to extrapolate off. And/or communicating timestamps of past VSYNC events too for Arduino to extrapolate a synchronization to, if you're avoiding a VSYNC hardwire to a GPIO pin on the Arduino).
</HOMEBREW MONITOR-HACKING TALK>
Skip if you're not interested in technical chat
In theory, *depending* on how much the monitor's hardware can help dejitter your strobing signals (e.g. if it can begin a timed pulse for you, or capable of scheduling a pulse at the next VBI, or needs an ON-signal + OFF-signal), then triggering the pulse from software is likely acceptable. But it's a heavy "depends" -- and there's often no easy way to determine if the monitor firmware of a specific monitor is capable of helping you.
Strobe Phase precision is less important
The phase jitter can actually jitter a lot (Even a +/- 100 milliseconds jitter in *starting* the flash did not produce noticeable flicker, at least at high frequencies like 120Hz+) -- as long as length of flash remained darn near perfectly constant (same number of photons per second hitting the human eyeballs). But even lengthening/shortening the flash by 10 microseconds, will produce noticeable brightness flicker. Be noted, that strobe crosstalk can vibrate upwards/downwards slightly -- +/-100ms is a 200ms amplitude and 0.2/8.3ms -- or about 1/41th of a screen height vibration in strobe crosstalk for random +/-100ms vibrations in strobe phase precision. This is probably not as noticeable nor bothersome as flicker, but it is a subtle side effect that can be noticed at http://www.testufo.com/crosstalk ... it's at least important to mathematically understand vertical shifts in strobe crosstalk relating to strobe phase inaccuracy.
Strobe Length precision is super-important
10 microsecond error is very flickery. Let's consider many strobe backlights are capable of flashing at 1 millisecond per refresh cycle. That's 1000 microseconds. Now, vary that by 1% -- that's 10 microseconds. A strobe flash difference of 1000 microsecond versus 1010 microseconds is a 1% difference in number of photons hitting the human eyeballs, and is roughly almost three shades apart in 8-bit greyscale (0 to 255 -- basically almost the brightness difference of three shades apart in the color palette). So 10ms is WAY too inaccurate to time a strobe backlight flash -- you gotta aim for sub-microsecond precision for homebrew strobe backlight flash.
So if your monitor's firmware is capable of turning off a flash accurately, you can software trigger the flashes. But most monitor firmwares needs the firmware to do the turn-on signal and the turn-off signal to the backlights. And not all monitor firmwares have direct access to the backlight -- it's very panel dependant.
But a homebrew modder can open up a monitor, and piggyback an Arduino to the backlight. That's been done before by multiple modders, and quite successfully so. But it's very advanced stuff, it's easier to just buy the Cirthix/Zisworks backlight controller board and retrofit the monitor yourself to have a strobe backlight.
Regardless, USB random jitter is extremely bad -- you you will not get the necessary precision from software running in Windows except possibly as a real-time VxD running in the top-priority ring, connected to a direct logic GPIO line (like a parallel port pin) completely bypassing ports. This is probably doable from a Raspberry Pi running a RTOS, but it's easy to do with an Arduino -- a $20 Arduino clone is capable of driving a strobe backlight accurately even with a USB connection to the PC. The Arduino can de-jitter as needed.
If you are running software at a very thin OS level (e.g. dedicated DOS app, or an RTOS like QNX) certainly your existing computer probably can handle it. But not under Microsoft Windows (at least for strobe flash length part -- that would need to be handled separately of Windows).
Software black frame insertion does not have this problem at refresh-cycle granularity simply because the refresh cycles are running on an exact schedule (fixed Hz). It's simply framebuffered and the hardware times the refresh cycle exactly. That's why as long as VSYNC ON is working, the hardware VSYNC is de-jittering perfectly for you, prevening issues.
But trying to software-control a sub-refresh-cycle black frame insertion directly (via direct backlight control), you do not have the help of VSYNC ON to help de-jitter for you. You're completely on your own. Instead of hardware helping you (thanks to VSYNC ON), you don't have hardware helping you anymore for timing backlight-based blackness.
Bam, you now have, literally almost 4 orders more magnitudes of accuracy demands on your software for software-controlled backlights, versus simple framebuffer-based software black frame insertion. So trying to get one-quarter persistence (one quarter of a refresh cycle -- 2ms versus 8.3ms of 1/120sec) by using backlight instead of software BFI, you now have to have more than 5000x more software precision demanded of your software.
Software Precision Requirements
During 120Hz blackness-insertion between visible frames, to reduce motion blur:
Software framebuffer BFI: 8.333 milliseconds (8333 microseconds) since hardware VSYNC ON is helping you
Software backlight driving: 0.001 millisecond (1 microsecond) now becomes necessary
Ouch... about 5 orders of magnitude!
That's 8.333ms (1/120 = 8.333ms) for timing 120Hz software BFI, versus 1 microsecond for timing backlight flashes. Ouch! Almost 10,000x more software precision necessary just to get 4x better persistence (8.3ms full persistence versus 2ms strobed persistence) because you're now suddenly saying goodbye to hardware help ("VSYNC ON" during software BFI). That's the big brick wall you need to jump over, and it's mostly impassable unless you're on an RTOS instead of Microsoft Windows.
It's all fun stuff, but anything done via Windows needs at least *some* help from the hardware, to keep it sufficiently accurate to work very well.
The best the software can do is time the start of strobe flashes, or configure backlight flash timer hardware, basically you will need a little bit of help from hardware. Things like http://www.testufo.com/refreshrate and http://www.vsynctester.com manages to (over time) successfully extrapolate microsecond precision in refresh rates but you need the exact precision in realtime, every single refresh cycle. The most Windows may be able to do is use a USB (or DDC/CI connection) to approximately signal the VSYNC timing/phase to an Arduino attached to the monitor backlight. The Arduino which would then de-jitter (and filter outliers / missed VSYNC signals from USB jitter, etc) and then the Arduino would merrily continuously precisely timing the strobe backlights, especially correct strobe lengths. If you strobe a monitor's backlight, make sure you use one of those 32-bit ARM based Arduinos, those easily achieve microsecond precision with good programming.
Ideally, Arduino should directly monitor the VSYNC in the monitor signal (and that kind of makes the strobe-backlight VRR compatible -- variable rate strobing!) but in theory the software can configure the Arudino precisely enough via Windows, so minimally, just an attachment to the backlight only, bypassing the monitor motherboard and no nonstandard taps into video cables or monitor motherboards (thus making it more generic-monitor-mod compatible, in theory). Heck, you can even packetize it via timecoded VSYNC history (microsecond accurate) transmitted as random packets occasionally to an Arduino. And then the Arduino would extrapolate a darn-near perfect strobe flash out of it, so in theory you do not need any hardware VSYNC attachments at all. But you still need the Arduino to accurately time the strobe flashes.
BlurBusters originally started because of an Arduino scanning backlight, so we have learned enough to be able to inform you that if you do some of it in software, you still need help from the hardware -- whether as barebones like a GPIO connection to the backlight from an RTOS directly on your PC -- or via Windows configuring an Arduino backlight driver doing the flash timing for you. There are no APIs available to control monitor's backlight flashing at the sub-refresh-cycle level, so this is essentially 100% hack-on stuff if you do DIY strobe backlights.
It's cheaper to mail the monitor ($100 shipment), get someone to add the Zisworks board (a few hundred dollars for materials, labour, and monitor-specific tweaks), and mail the monitor back ($100 shipment), than to pay someone to attempt to do this in 100% software -- it's almost an Apollo mission without an RTOS / without GPIO logic lines / without an external microcontroller (whether existing in monitor, or a strap-on hack to the monitor backlight). It would even take me several weeks to pull it off even under QNX, assuming the motherboard had a microsecond-accurate GPIO line that I can attach to the monitor's backlight. And you wouldn't be able to run any Windows games, since the computer would be running QNX as the microsecond-accurate operating system -- or another RTOS instead. All this, at typical computer programmer rates in North America, that is many thousands of dollars. Cheaper to buy a high-end GSYNC monitor with ULMB.
So the easy route is strap-on an Arduino to the back of the monitor, wire it to control ON/OFF the backlight/edgelight of the monitor's panel, write a couple hundreds lines of Arduino code (for a basic strobe backlight), and only use Windows-side to configure the Arduino parameters (if necessary, even intermittently communicate the current refresh rate, phase and lengths, for the Arduino to extrapolate off. And/or communicating timestamps of past VSYNC events too for Arduino to extrapolate a synchronization to, if you're avoiding a VSYNC hardwire to a GPIO pin on the Arduino).
</HOMEBREW MONITOR-HACKING TALK>
