Repository navigation
perf(filter): optimize perspective, lenscorrection, defish0r, and c0rners remap kernels - #345
Open
Quantum-Quasar wants to merge 4 commits into
Open
Quantum-Quasar wants to merge 4 commits into
Quantum-Quasar wants to merge 4 commits into
Conversation
added 4 commits
November 27, 2026 04:24
…ic kernels with SSE2
…c kernels with SSE2
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bit-exact (
max_abs_diff = 0) CPU rendering optimizations for four geometric remapping and distortion plugins:perspective&lenscorrection: Cache dirty-trackedint32_tcoordinate remap tables across frames when parameters are unchanged (avoiding per-frame floating-point transforms andlrint()libm calls), plusmemsetzero-fill inperspective.defish0r&c0rners(interp.h): Devirtualizeremap32()outside the pixel loop (eliminating per-pixel indirect function pointer calls), replace per-pixelfloorf/ceilf/roundflibm calls with exact inline integer truncation/adjustment, and vectorize NN, Bilinear, Bicubic Smooth (Aitken-Neville), and Bicubic Sharp (Helmut Dersch) across all 4 RGBA channels with SSE2__m128.Benchmarks (3-Run Median, 1080p & 4K RGBA8888, GCC 12.2.0 Release)
perspectivelenscorrectionc0rners(Bicubic Smooth)c0rners(Bilinear)defish0r(Bicubic Smooth)defish0r(Bilinear)defish0r(Bicubic Sharp)Verification
max_abs_diff = 0against baseline.sobuilds on both 1080p and 4K RGBA frames across 3 consecutive frames.