Bit-exact improvements to CCSO module - #5429
Merged
Merged
Conversation
dikshasingh-sys
force-pushed
the
ccso_simd_1
branch
from
September 23, 2026 11:06
45d3795 to
c002313
Compare
Author
|
@yunqingwang1 @urvangjoshi Please review. Note: Each commit in this PR is logically independent and has its own commit message. Please do not squash them. |
urvangjoshi
approved these changes
Sep 23, 2026
dikshasingh-sys
force-pushed
the
ccso_simd_1
branch
from
September 24, 2026 04:55
c002313 to
06e042b
Compare
urvangjoshi
approved these changes
Sep 24, 2026
The table look-up in ccso_filter_block_hbd_with_buf_avx2() is vectorized using multiple shuffle/blend instructions. Speed (C/AVX2 time): ccso_block_size | No. of bands | parent | optimized ----------------|--------------|--------|---------- 256x256 | 1 | 10.19x | 47.80x 256x256 | 2 | 10.12x | 41.78x 256x256 | 4 | 10.09x | 35.18x 256x256 | 8 | 10.09x | 26.34x ----------------|--------------|--------|---------- 128x128 | 1 | 8.42x | 26.66x 128x128 | 2 | 7.86x | 22.82x 128x128 | 4 | 7.83x | 20.98x 128x128 | 8 | 7.84x | 17.06x
The table look-up in ccso_filter_block_hbd_wo_buf_avx2() is optimized using multiple 'shuffle' instructions instead of 'gather' instruction. Speed test results(C/AVX2 time) are as follows: ccso_block_size |No. of bands | parent | optimized ----------------|-------------|--------|---------- 256x256 | 1 | 9.43x | 13.46x 256x256 | 2 | 6.01x | 12.55x 256x256 | 4 | 6.00x | 10.88x 256x256 | 8 | 5.97x | 8.39x ----------------|-------------|--------|---------- 128x128 | 1 | 6.33x | 8.43x 128x128 | 2 | 4.73x | 7.84x 128x128 | 4 | 4.70x | 7.03x 128x128 | 8 | 4.61x | 5.94x The function ccso_derive_src_block_avx2() is optimized via simplification of the edge index derivation. Speed test results: ccso_block_size | edge_clf | parent | optimized ----------------|----------|--------|---------- 256x256 | 0 | 14.05x | 17.56x 256x256 | 1 | 13.57x | 14.56x ----------------|----------|--------|---------- 128x128 | 0 | 7.88x | 8.19x 128x128 | 1 | 6.69x | 7.06x
The AVX2 implementation of compute_distortion_block() is optimized via - Use 16-bit subtraction to calculate the difference between source and reconstructed pixels - Defer the horizontal addition within SIMD registers to every nth row based on bit-depth and processing unit size Performance impact (C/AVX2 time): Unit size | Parent | Optimized -----------|--------|---------- 256x256 | 2.11x | 6.41x 128x128 | 2.00x | 5.75x 64x64 | 1.90x | 5.42x 32x32 | 1.77x | 3.37x
When BRU is disabled, call compute_distortion_block() for every CCSO filter unit instead of processing individual SBs. This change is bit-exact.
urvangjoshi
force-pushed
the
ccso_simd_1
branch
from
September 24, 2026 16:00
6ea64f0 to
6e723ba
Compare
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.
Test results (RA)
Anchor: commit d229da8
A1 - 17 frames
A2 - 33 frames
This change is verified to be bit-exact for all presets.