Skip to content

Commit bdd0998

Browse files
chenhao5-Intelintel-mediadev
authored andcommitted
[Encode] Enable AV1 Encode LUT Rounding Under CQP in All Sceanrios on BMG Platform
This patch is to enable AV1 Encode LUT Rounding under CQP in all sceanrios on BMG platform.
1 parent fa20557 commit bdd0998

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

media_softlet/agnostic/Xe_M_plus/Xe2_HPM/codec/hal/enc/av1/features/encode_av1_basic_feature_xe2_hpm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ MOS_STATUS Av1BasicFeatureXe2_Hpm::Update(void *params)
3535
ENCODE_FUNC_CALL();
3636
ENCODE_CHK_NULL_RETURN(params);
3737
ENCODE_CHK_STATUS_RETURN(Av1BasicFeatureXe_Lpm_Plus_Base::Update(params));
38-
if (m_roundingMethod == RoundingMethod::fixedRounding && m_av1SeqParams && m_av1SeqParams->ScenarioInfo == ESCENARIO_VIDEOCONFERENCE && m_av1SeqParams->GopRefDist == 1)
38+
if (m_roundingMethod == RoundingMethod::fixedRounding)
3939
{
4040
m_roundingMethod = RoundingMethod::lookUpTableRounding;
4141
}

media_softlet/agnostic/Xe_M_plus/Xe2_HPM/codec/hal/enc/av1/features/encode_av1_vdenc_feature_manager_xe2_hpm.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
#include "encode_av1_vdenc_lpla_enc.h"
3838
#include "encode_av1_pipeline.h"
3939
#include "encode_av1_tile_xe2_hpm.h"
40-
#if _MEDIA_RESERVED
41-
#include "encode_av1_feature_ext.h"
42-
#endif // !(_MEDIA_RESERVED)
40+
#include "encode_av1_rounding_table.h"
4341

4442
namespace encode
4543
{
@@ -77,10 +75,9 @@ MOS_STATUS EncodeAv1VdencFeatureManagerXe2_Hpm::CreateFeatures(void *constSettin
7775
Av1EncodeAqm *encAqm = MOS_New(Av1EncodeAqm, this, m_allocator, m_hwInterface, constSettings);
7876
ENCODE_CHK_STATUS_RETURN(RegisterFeatures(Av1FeatureIDs::av1Aqm, encAqm, { Av1Pipeline::encodePreEncPacket }));
7977

80-
#if _MEDIA_RESERVED
81-
Av1ReservedFeature1* av1ReservedFeature1 = MOS_New(Av1ReservedFeature1, this, m_hwInterface, constSettings);
82-
ENCODE_CHK_STATUS_RETURN(RegisterFeatures(Av1FeatureIDs::av1ReservedFeatureID2, av1ReservedFeature1, {Av1Pipeline::encodePreEncPacket}));
83-
#endif // _MEDIA_RESERVED
78+
Av1EncodeRoundingTable *encRoundingTable = MOS_New(Av1EncodeRoundingTable, this, m_hwInterface, constSettings);
79+
MEDIA_CHK_NULL_RETURN(encRoundingTable);
80+
ENCODE_CHK_STATUS_RETURN(RegisterFeatures(Av1FeatureIDs::av1LookupTableRounding, encRoundingTable, { Av1Pipeline::encodePreEncPacket }));
8481

8582
Av1VdencPreEnc* av1Preenc = MOS_New(Av1VdencPreEnc, this, m_allocator, m_hwInterface, m_trackedBuf, m_recycleResource, constSettings);
8683
ENCODE_CHK_STATUS_RETURN(RegisterFeatures(FeatureIDs::preEncFeature, av1Preenc, { Av1Pipeline::encodePreEncPacket }, LIST_TYPE::ALLOW_LIST));

0 commit comments

Comments
 (0)