[draft] Fix accidental disabling of masked compound in REFINE_ALL mode#5072
Open
kslu-aom wants to merge 1 commit into
Open
[draft] Fix accidental disabling of masked compound in REFINE_ALL mode#5072kslu-aom wants to merge 1 commit into
kslu-aom wants to merge 1 commit into
Conversation
In REFINE_ALL mode, the encoder incorrectly disabled the search for masked compound modes (WEDGE and DIFFWTD) for regular compound modes such as NEW_NEWMV. This issue was introduced in commit 7085cf3 ("CWG-F107 Fix OPFL issues and remove DAMR") after v10 anchor. There, the condition for masked_compound_used in process_compound_inter_mode(), which checked !opfl_allowed_cur_pred_mode(). Since mbmi->interinter_comp.type is initialized to COMPOUND_AVERAGE by default during the search, opfl_allowed_cur_pred_mode() returned true for regular modes in REFINE_ALL mode, incorrectly setting masked_compound_used to 0 and skipping the masked compound search. This patch fixes the issue by changing the condition to check if the mode is a regular compound mode (mbmi->mode < NEAR_NEARMV_OPTFLOW) instead of using opfl_allowed_cur_pred_mode(). This ensures that masked compound is only disabled for explicit OPTFLOW modes (in REFINE_SWITCHABLE mode) and remains enabled for regular compound modes in REFINE_ALL mode. This resolves a significant coding loss regression with --enable-opfl-refine=2 RA CTC on v15 Before the fix: +0.72% at 91.9% encoding time After the fix: +0.26% at XX.X% encoding time
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.
In REFINE_ALL mode, the encoder incorrectly disabled the search for masked compound modes (WEDGE and DIFFWTD) for regular compound modes such as NEW_NEWMV.
This issue was introduced in commit 7085cf3 ("CWG-F107 Fix OPFL issues and remove DAMR") after v10 anchor. There, the condition for masked_compound_used in process_compound_inter_mode(), which checked !opfl_allowed_cur_pred_mode(). Since mbmi->interinter_comp.type is initialized to COMPOUND_AVERAGE by default during the search, opfl_allowed_cur_pred_mode() returned true for regular modes in REFINE_ALL mode, incorrectly setting masked_compound_used to 0 and skipping the masked compound search.
This patch fixes the issue by changing the condition to check if the mode is a regular compound mode (mbmi->mode < NEAR_NEARMV_OPTFLOW) instead of using opfl_allowed_cur_pred_mode(). This ensures that masked compound is only disabled for explicit OPTFLOW modes (in REFINE_SWITCHABLE mode) and remains enabled for regular compound modes in REFINE_ALL mode.
This resolves a significant coding loss regression with --enable-opfl-refine=2
RA CTC on v15
Before the fix: +0.72% at 91.9% encoding time
After the fix: +0.2X% at XX.X% encoding time (Will update when results are ready)