Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix video output having small black borders all the times #11889

Merged
merged 1 commit into from Jun 16, 2023

Conversation

Filoppi
Copy link
Contributor

@Filoppi Filoppi commented Jun 4, 2023

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).

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).
@MayImilae
Copy link
Contributor

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

@iwubcode
Copy link
Contributor

iwubcode commented Jun 5, 2023

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

@Filoppi
Copy link
Contributor Author

Filoppi commented Jun 8, 2023

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.

@Pokechu22
Copy link
Contributor

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).

@Filoppi
Copy link
Contributor Author

Filoppi commented Jun 8, 2023

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.

@mbc07
Copy link
Contributor

mbc07 commented Jun 8, 2023

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...

@Filoppi
Copy link
Contributor Author

Filoppi commented Jun 8, 2023

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
Copy link
Contributor Author

Filoppi commented Jun 10, 2023

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.

@AdmiralCurtiss
Copy link
Contributor

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 AdmiralCurtiss merged commit cbcf5bf into dolphin-emu:master Jun 16, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants