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

For topics which do not fit in other specific forums.
AtomicShroom
Posts: 172
Joined: Sun Mar 07, 2021 12:28 pm
Has thanked: 31 times
Been thanked: 48 times

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

Unread post 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.)
AtomicShroom
Posts: 172
Joined: Sun Mar 07, 2021 12:28 pm
Has thanked: 31 times
Been thanked: 48 times

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

Unread post 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.
FoxbatStargazer
Top Contributor
Posts: 1018
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 315 times
Been thanked: 238 times

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

Unread post 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.
AtomicShroom
Posts: 172
Joined: Sun Mar 07, 2021 12:28 pm
Has thanked: 31 times
Been thanked: 48 times

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

Unread post 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.
User avatar
Grabulosaure
Core Developer
Posts: 79
Joined: Sun May 24, 2020 7:41 pm
Location: Mesozoic
Has thanked: 3 times
Been thanked: 92 times
Contact:

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

Unread post by Grabulosaure »

That's interesting.

I'm trying to update low lag mode for better resolution switches and change multi-buffering to reduce latency.
AtomicShroom
Posts: 172
Joined: Sun Mar 07, 2021 12:28 pm
Has thanked: 31 times
Been thanked: 48 times

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

Unread post 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! :)
AtomicShroom
Posts: 172
Joined: Sun Mar 07, 2021 12:28 pm
Has thanked: 31 times
Been thanked: 48 times

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

Unread post 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!
Post Reply