Refactor compound type search functions - #5296
Merged
urvangjoshi merged 4 commits intoAug 21, 2026
Merged
Conversation
Author
|
@yunqingwang1 @urvangjoshi We have verified that this PR is bit-exact for speeds 0 to 3 across RA and LD configurations on a few test clips. Please review. Note: Each commit in this PR has its own commit message. Please do not squash them. |
yunqingwang1
approved these changes
Aug 20, 2026
yunqingwang1
left a comment
Contributor
There was a problem hiding this comment.
Looks good - thanks.
- Consolidated initializations and moved early gating to the function start - Introduced local variables for readability - Renamed calc_masked_type_cost() to calc_comp_type_cost() and abstracted compound type cost calculation - Replaced update_mask_best_mv() with av2_copy_array() - Renamed rs2 to comp_type_rate - Simplified the masked_compound_type_rd() signature - Made cosmetic changes to follow coding guidelines No Stats Changed
- Added CompTypeRdStats to consolidate RD cost members in COMP_RD_STATS - Replaced local arrays in av2_compound_type_rd() with CompTypeRdStats This improves readability, simplifies the function signature and data copy in various helper functions. No Stats Changed
- Unified pick_wedge() and pick_wedge_fixed_sign() to avoid code duplication - Cleaned up the dead code and debug prints in pick_wedge() - Modified get_wedge_cost() to cleanup unused parameter No Stats Changed
- Modified comments to ensure correctness and correct punctuations - Replaced INLINE with AVM_INLINE - Replaced hard coded values with enums - Used pre-increments in loop counters No Stats Changed
urvangjoshi
force-pushed
the
refactor-comp-type-search
branch
from
August 21, 2026 17:48
91c76f7 to
d668e9d
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.
No description provided.