Refactor EncAdaptiveLoopFilter::getPreBlkStats#710
Open
athulya-arm wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
This is an initial commit that extracts |
Refactor the weighted and unweighted covariance accumulation paths out of `EncAdaptiveLoopFilter::getPreBlkStats()` into dispatchable helper functions. Introduce function pointers `m_getPreBlkStatsAccum` and `m_getPreBlkStatsWeightedAccum` to `EncAdaptiveLoopFilter` class. Move the x86 implementations into the EncoderLib x86 SIMD layer and assign them during EncAdaptiveLoopFilter x86 initialization, while keeping scalar helpers as the default fallback. Also include the EncoderLib x86 sources in the VVenC CMake x86 file lists.
Add unit tests for EncAdaptiveLoopFilter::getPreBlkStats functions. Modify the EncAdaptiveLoopFilter constructor to include a new 'enableOpt' parameter to create a reference object and an optimized object for testing. Add optional `tolerance` handling to `compare_value` so unit tests can compare results that are numerically equivalent but not bit-exact. This allows small floating-point accuracy differences in `getPreBlkStatsWeightedAccum` test cases. SIMD implementations can change the order of floating-point operations compared with the scalar reference, which may produce tiny differences while still being mathematically correct.
a64660e to
dd24369
Compare
Collaborator
|
Hi, thank you very much for the patch. In principle, the introduced structure looks good to me, but I am not sure if there was a specific reason why the SIMD code was implemented inline here, or if maybe the added indirect function call adds too much overhead here. We'll talk about that internally and I'll get back to you. |
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.
Refactor EncAdaptiveLoopFilter::getPreBlkStats
Add unit tests for EncAdaptiveLoopFilter::getPreBlkStats functions.