Skip to content

Commit cbd2114

Browse files
Jabin_Wuintel-mediadev
authored andcommitted
[Encode] Set Log2WeightDenomLuma to 0 in MFX AVC SLICE STATE
AVC VDEnc implicit mode weighted prediction requires Log2WeightDenomLuma = 0 in MFX AVC SLICE STATE. Change-Id: I949a305d49e233ea27ea54663e2eba63ea3efedf
1 parent a60a5e8 commit cbd2114

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

media_driver/agnostic/common/hw/vdbox/mhw_vdbox_mfx_generic.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,17 @@ class MhwVdboxMfxInterfaceGeneric : public MhwVdboxMfxInterface
763763
cmd.DW3.WeightedPredictionIndicator = picParams->weighted_bipred_idc;
764764
if (picParams->weighted_bipred_idc == IMPLICIT_WEIGHTED_INTER_PRED_MODE)
765765
{
766-
// SNB requirement
767-
cmd.DW2.Log2WeightDenomLuma = 5;
768-
cmd.DW2.Log2WeightDenomChroma = 5;
766+
if (avcSliceState->bVdencInUse)
767+
{
768+
cmd.DW2.Log2WeightDenomLuma = 0;
769+
cmd.DW2.Log2WeightDenomChroma = 0;
770+
}
771+
else
772+
{
773+
// SNB requirement
774+
cmd.DW2.Log2WeightDenomLuma = 5;
775+
cmd.DW2.Log2WeightDenomChroma = 5;
776+
}
769777
}
770778

771779
cmd.DW9.Roundinterenable = avcSliceState->bRoundingInterEnable;

0 commit comments

Comments
 (0)