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

[Screencap] StitchImages optimized #202

Merged

Conversation

takahiro0327
Copy link
Contributor

StitchImages has been optimized.
Please merge it if there are no problems.

The processing time was measured using the code below, and the processing time that used to take 4 seconds was reduced to 0.5 seconds. Depending on the capture parameters, it can be sped up by a factor of 5 to 8.

Stopwatch watch = Stopwatch.StartNew();
var result = FlipEyesIn3DCapture.Value ? StitchImages(capture, capture2, 0) : StitchImages(capture2, capture, 0);
System.Console.WriteLine($"@@ {watch.ElapsedMilliseconds}");

There is no visible change.
Before:
CharaStudio-2024-07-03-10-20-20-3D-360

After:
CharaStudio-2024-07-03-10-19-01-3D-360

I think it would be more than 10 times faster if the processing were completed entirely in VRAM, including the argument textures. However, additional VRAM would be required for the buffer.
I refrained from doing so because I knew that people would inevitably complain that they could no longer capture.

Copy link
Collaborator

@ManlyMarco ManlyMarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clean

@ManlyMarco ManlyMarco merged commit 002efda into IllusionMods:master Jul 3, 2024
@takahiro0327 takahiro0327 deleted the StitchImages-optimization branch July 4, 2024 12:31
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