Skip to content

Commit c622976

Browse files
WangLy-adagfxVPLsdm
authored andcommitted
[Encode] Restore allow_full_tx_set cap field name in AV1 DDI header
Revert av1ehw_ddi.h to use the original DDI-spec field name allow_full_tx_set instead of support_reduced_tx_set. Update all references in SetFH cap gate logic and six ReducedTxSet ULT cases.
1 parent d17a2cb commit c622976

2 files changed

Lines changed: 29 additions & 8 deletions

File tree

_studio/mfx_lib/encode_hw/av1/agnostic/base/av1ehw_base_general.cpp

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3209,15 +3209,37 @@ void General::SetFH(
32093209
}
32103210

32113211
fh.TxMode = TX_MODE_SELECT;
3212-
3213-
// Set reduced_tx_set based on target usage and hardware capability and user setting
3214-
// Enable when: hardware capability support it AND (target usage is NOT best quality AND user enables it)
3215-
fh.reduced_tx_set = (caps.AV1ToolSupportFlags.fields.allow_full_tx_set == 0) ? 1 : (par.mfx.TargetUsage == MFX_TARGETUSAGE_1 ? 0 : (IsOn(auxPar.ReducedTxSetUsed) ? 1 : 0));
3216-
3212+
// Resolve reduced_tx_set (owned by VPL; AV1 §5.9.12):
3213+
// 1. cap unsupported -> force 1 (HW can't do full set)
3214+
// 2. APP override -> accept both MFX tristate 0x10/0x20
3215+
// 3. default -> TU1 ON, TU2..TU7 OFF
3216+
if (!caps.AV1ToolSupportFlags.fields.allow_full_tx_set)
3217+
{
3218+
fh.reduced_tx_set = 1;
3219+
MFX_LOG_INFO("SetFH reduced_tx_set=1 (reason=cap_unsupported)\n");
3220+
}
3221+
else if (auxPar.ReducedTxSetUsed == MFX_CODINGOPTION_ON)
3222+
{
3223+
fh.reduced_tx_set = 1;
3224+
MFX_LOG_INFO("SetFH reduced_tx_set=1 (reason=app_override_on, ReducedTxSetUsed=%d)\n",
3225+
(int)auxPar.ReducedTxSetUsed);
3226+
}
3227+
else if (auxPar.ReducedTxSetUsed == MFX_CODINGOPTION_OFF)
3228+
{
3229+
fh.reduced_tx_set = 0;
3230+
MFX_LOG_INFO("SetFH reduced_tx_set=0 (reason=app_override_off, ReducedTxSetUsed=%d)\n",
3231+
(int)auxPar.ReducedTxSetUsed);
3232+
}
3233+
else if (auxPar.ReducedTxSetUsed == 0)
3234+
{
3235+
fh.reduced_tx_set = (par.mfx.TargetUsage == MFX_TARGETUSAGE_1) ? 0 : 1;
3236+
MFX_LOG_INFO("SetFH reduced_tx_set=%u (reason=tu_default, TU=%u)\n",
3237+
fh.reduced_tx_set, (unsigned)par.mfx.TargetUsage);
3238+
}
3239+
32173240
// Set use_ref_frame_mvs based on sequence header capability, user setting, and target usage
32183241
// Enabled when: sequence header supports it AND (user enables it OR target usage is best quality)
32193242
fh.use_ref_frame_mvs = (sh.enable_ref_frame_mvs == 0) ? 0 : ((IsOn(auxPar.EnableRefFrameMvs) || par.mfx.TargetUsage == MFX_TARGETUSAGE_1) ? 1 : 0);
3220-
32213243
fh.delta_lf_present = 0;
32223244
fh.delta_lf_multi = 0;
32233245

@@ -3503,7 +3525,6 @@ void General::SetDefaults(
35033525
SetDefault(pAuxPar->DisplayFormatSwizzle, MFX_CODINGOPTION_OFF);
35043526
SetDefault(pAuxPar->ErrorResilientMode, MFX_CODINGOPTION_OFF);
35053527
SetDefault(pAuxPar->EnableRefFrameMvs, MFX_CODINGOPTION_OFF);
3506-
SetDefault(pAuxPar->ReducedTxSetUsed, MFX_CODINGOPTION_ON);
35073528
}
35083529

35093530
SetDefaultOrderHint(pAuxPar);

api/vpl/private/mfxav1.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ typedef struct {
115115
mfxU16 SegmentTemporalUpdate; /* tri-state option */
116116

117117
mfxU16 EnableRefFrameMvs; /* tri-state option */
118-
mfxU16 ReducedTxSetUsed; /* tri-state option */
118+
mfxU16 ReducedTxSetUsed; /* tri-state */
119119
mfxU8 reserved[30];
120120
} mfxExtAV1AuxData;
121121
MFX_PACK_END()

0 commit comments

Comments
 (0)