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

Scaling not great? #2

Closed
francisdb opened this issue Jan 16, 2024 · 4 comments
Closed

Scaling not great? #2

francisdb opened this issue Jan 16, 2024 · 4 comments

Comments

@francisdb
Copy link
Contributor

PPUC/libzedmd#13 mentions that the issue is probably here?

This is Baywatch:

192x64 rendered to 128*32

  • Could scaling be improved? Is nearest neighbor in use?
  • I wonder if stretching to the full space would be a good idea?

image

@toxieainc
Copy link
Member

When i last looked at the code, some scaling code was using bilinear lookups, but this will only have a positive effect when upscaling. For downscaling, one must do an averaging of the downscaled pixels.
The problem is that with these very low resolutions and non-integer scalings, the result will also suck.
So what i did for pinmame (when adapting the external dmd driver code) was to downscale in y-direction via averaging (to go from 192x64 to 192x32 by averaging 2 rows into one) and then only averaging 2/3s of the pixels in x-direction, and leaving 1/3 untouched/as-is (to go to 128x32). Also not optimal, but was the best tradeoff in my experiments.

@jsm174
Copy link
Collaborator

jsm174 commented Jan 22, 2024

Scaling / aspect ratio centering is only for Pixelcade which we do in this library. I added it at the last moment as I realized some games would not work on it. I'm no expert on this topic 😄

@francisdb is showing a ZeDMD device I believe, and ZeDMD firmware and or libzedmd handles all the scaling.

@mkalkbrenner could elaborate on this more?

@francisdb
Copy link
Contributor Author

I asked @mkalkbrenner before and he told me the scaling is done here 🤔

@jsm174
Copy link
Collaborator

jsm174 commented Jan 22, 2024

All I can say is if you look at the code in this repo, there is no scaling done on the frame for the zedmd path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants