Page 1 of 1

Something's broken with the HD scaler's buffering/frameskip [update: only when display is flipped]

Posted: Wed Jan 05, 2022 1:16 am
by AtomicShroom
There seems to be something wrong with how the HD scaler skips frames to accomodate for slight refresh rate differences between the TV and original hardware. Specifically I'm referring to using vsync_adjust=0.

I noticed it while playing Arkanoid (Arcade), which makes it very easy to spot since the ball moves in a very constant manner: Every once in a while, the ball hitches, which indicates a frame being repeated. This is very normal and expected since it runs at 59.1hz compared to the 60hz of my TV.

What is NOT normal, however, is that every once in a while, instead of repeating a frame causing the ball to stop in place, it shows a PREVIOUS frame where the ball effectively MOVES BACK one frame, indicating that the scaler flips to an OUTDATED render buffer that is older than the one that was currently being shown to me. This is definitely a bug that should not be happening.

Here's a video I recorded, and then slowed down, which shows the ball going backwards one frame instead of just stopping in place:

https://youtu.be/VLTznbuuzl0

(Now I know Arkanoid has a 60hz option, but not every core does, and this issue applies to all of them.)

Re: Something's broken with the HD scaler's buffering/frameskip

Posted: Wed Jan 05, 2022 3:07 am
by AtomicShroom
Actually when I look at the footage more closely, just as the ball hits the paddle, it SKIPS ahead one frame, which also shouldn’t be happening. If the scaler was working properly, the only thing we should ever see is one frame being repeated every X frames. No forward/backward skips.

The order in which buffers are being rendered and then flipped just seems to be completely out of whack.

Re: Something's broken with the HD scaler's buffering/frameskip

Posted: Wed Jan 05, 2022 3:31 am
by FoxbatStargazer
Maybe someone can verify this with direct capture to rule out your TV being the culprit. For example I know the 4K Sony's I've tried handle non-standard refreshes very strangely at 1440p compared to matching them pretty well at 1080p, showing some of the jumping-backwards you demonstrated. Some have also pointed to the erroneously wired CEC on Mister causing sync problems with some devices so blocking that might also help.

Re: Something's broken with the HD scaler's buffering/frameskip

Posted: Wed Jan 05, 2022 5:57 pm
by AtomicShroom
It's not my TV. I get the same result on 3 different TVs of varying brands and age. From a 2009 Toshiba to my modern 2020 Samsung Q80R. I'm also using a CEC-cancelling dongle so we can rule that out.

Re: Something's broken with the HD scaler's buffering/frameskip

Posted: Wed Jan 05, 2022 9:03 pm
by Grabulosaure
That's interesting.

I'm trying to update low lag mode for better resolution switches and change multi-buffering to reduce latency.

Re: Something's broken with the HD scaler's buffering/frameskip

Posted: Wed Jan 05, 2022 9:18 pm
by AtomicShroom
Grabulosaure wrote: Wed Jan 05, 2022 9:03 pm That's interesting.

I'm trying to update low lag mode for better resolution switches and change multi-buffering to reduce latency.
Awesome! Are you able to reproduce it on your end? Let me know if you need any further information! :)

Re: Something's broken with the HD scaler's buffering/frameskip

Posted: Sat Jan 08, 2022 5:00 pm
by AtomicShroom
Update: turns out this only occurs if the display is flipped! For example in Arkanoid it only occurs when set to Vertical, not Horizontal!