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

Rewrite of Pixelate effect #426

Merged
merged 1 commit into from
Feb 27, 2020
Merged

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Feb 3, 2020

No real improvements this time, to be honest, since there's no real room for parallelization or optimization in the Pixelate code — it's pretty tight already.

However, I did rewrite it to make use of Qt's QRect and QMargins, in defining the area being pixelated. Which I think makes for marginally cleaner code (and certainly quite a bit shorter!), despite the lack of any significant performance impact.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Feb 3, 2020

Ironically, if I hadn't rewritten it, the old code could've been parallelized since it looped over scanlines doing a memcpy() — but I don't think the minor benefits there would outweigh the advantages of the cleaner rewrite.

@ferdnyc ferdnyc mentioned this pull request Feb 5, 2020
@jonoomph
Copy link
Member

Simple is good! LGTM

@jonoomph jonoomph merged commit ce39a53 into OpenShot:develop Feb 27, 2020
@ferdnyc ferdnyc deleted the pixelate-code branch February 28, 2020 02:44
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