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

VCRUISE: Make use of simpleBlitFrom and maskBlitFrom #6392

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ccawley2011
Copy link
Member

@ccawley2011 ccawley2011 commented Jan 5, 2025

This helps a bit with performance when running AD 2044 on the 3DS, since the code paths are simpler and it's no longer necessary to use a different true colour format to the screen in order to store transparency information. It doesn't completely fix the playback issues, but I suspect it might be an issue with the playback logic rather than just a performance issue since I've encountered cases where video playback never ends and the engine stops polling for events.

I haven't tested Reah or Schizm, but both of them should work assuming that none of the bitmaps require alpha blending, that scaling isn't needed, and that UI bitmaps 10 and 17 (and the screen) are true colour rather than paletted.

Trac #14870 looks like it may be related.

@ccawley2011 ccawley2011 requested a review from elasota January 5, 2025 19:43
@elasota
Copy link
Contributor

elasota commented Jan 8, 2025

I'm not really familiar with what simpleBlitFrom does, could you explain? The main reason for the mode selection working the way it does was to avoid selecting a graphics mode that would require expensive conversion from the video formats if there was an output mode that matched the video format.

@ccawley2011
Copy link
Member Author

I'm not really familiar with what simpleBlitFrom does, could you explain?

It's essentially blitFrom without scaling or alpha transparency. This way, it's easier to speed up blitting by using memcpy for true colour surfaces, or with lookup tables for palette to true colour conversion.

The main reason for the mode selection working the way it does was to avoid selecting a graphics mode that would require expensive conversion from the video formats if there was an output mode that matched the video format.

Which video codecs do you need? The way it's currently implemented means that with backends like SurfaceSDL, it'll pick a format that isn't natively supported over one that is, which adds in conversion even for YUV codecs or static images that can be converted ahead of time.

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

Successfully merging this pull request may close these issues.

2 participants