dolphin icon indicating copy to clipboard operation
dolphin copied to clipboard

Fix video output having small black borders all the times

Open Filoppi opened this issue 1 year ago • 8 comments

To maintain compatibility with some video encoders, the whole output buffer was scaled to be a multiple of 4. This change makes it so that that rule only applies while actively recording (or taking screenshots, even if it might not be necessary for that case).

Filoppi avatar Jun 04 '23 15:06 Filoppi

Currently screenshot dumping works well, so I'm going to need to double check this later.

MayImilae avatar Jun 04 '23 16:06 MayImilae

While you can't use screenshots, adding some print-screen captures to the OP would be helpful. (I too will try this out later)

iwubcode avatar Jun 05 '23 06:06 iwubcode

Screenshots and videos look identical with this change, that's the point :D. They are still both snapped to a multiple of 4 due to the video encoding limitation. I've tested it.

Filoppi avatar Jun 08 '23 00:06 Filoppi

Can you give an example of an affected game? All of the ones I've tried happen to use an XFB size that's divisible by 4 in both directions (640 by 448, 456, 480 or 528, and also 608 by 456 for Skyward Sword). I'm sure there's some that don't follow that but it seems to be rare (at least for US games).

Pokechu22 avatar Jun 08 '23 01:06 Pokechu22

Can you give an example of an affected game? All of the ones I've tried happen to use an XFB size that's divisible by 4 in both directions (640 by 448, 456, 480 or 528, and also 608 by 456 for Skyward Sword). I'm sure there's some that don't follow that but it seems to be rare (at least for US games).

Screenshots and recordings dump screenshots with the window resolution, not the XFB resolution (not sure why exactly, they should just dump the XFB IMO). There's no individual case. Everything works the same as before, this just prevents snapping the game window target resolution to a multiple of 4 when NOT taking a screenshot or video. Otherwise there would be small black bars at the edges of the window and the game image fully fit it.

Filoppi avatar Jun 08 '23 07:06 Filoppi

Screenshots and recordings dump screenshots with the window resolution, not the XFB resolution (not sure why exactly, they should just dump the XFB IMO)

Have you tried enabling "Dump at internal resolution"? It's an option in the advanced tab from the graphics settings...

mbc07 avatar Jun 08 '23 07:06 mbc07

Screenshots and recordings dump screenshots with the window resolution, not the XFB resolution (not sure why exactly, they should just dump the XFB IMO)

Have you tried enabling "Dump at internal resolution"? It's an option in the advanced tab from the graphics settings...

No, that's not related to this PR. I'm just fixing the black bars between the game window and the game rendering that fits it.

Filoppi avatar Jun 08 '23 07:06 Filoppi

This is what the PR addresses, a small ~2px black bar at the top, which was there just to make sure the output was a multiple of 4 so that the video coded could encode correctly: image now that requirment is only applied when videos are actually recording.

Filoppi avatar Jun 10 '23 09:06 Filoppi

To be clear, this fixes the small black line you get when you play with a client area height/width that isn't exactly divisible by 4.

Compare: master / this PR

Seems fine to me.

AdmiralCurtiss avatar Jun 16 '23 15:06 AdmiralCurtiss