Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[Enctools] Adds new LA Models for higher compression efficiency (#3455)" #235

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _studio/enctools/aenc/include/aenc.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ extern "C" {
mfxU32 Type; //FrameType, e.g. MFX_FRAMETYPE_I
mfxI32 DeltaQP;
mfxU32 ClassAPQ;
mfxU32 SpatialComplexity;
mfxU32 ClassCmplx;
mfxU32 KeepInDPB;
mfxU32 RemoveFromDPBSize;
mfxU32 RemoveFromDPB[32];
Expand All @@ -79,7 +79,7 @@ extern "C" {
mfxStatus MFX_CDECL AEncProcessFrame(mfxHDL pthis, mfxU32 POC, mfxU8* InFrame, mfxI32 pitch, AEncFrame* OutFrame);
mfxU16 MFX_CDECL AEncGetIntraDecision(mfxHDL pthis, mfxU32 displayOrder);
mfxU16 MFX_CDECL AEncGetPersistenceMap(mfxHDL pthis, mfxU32 displayOrder, mfxU8 PMap[AENC_MAP_SIZE]);
void MFX_CDECL AEncUpdateFrame(mfxHDL pthis, mfxU32 displayOrder, mfxU32 bits, mfxU32 QpY);
void MFX_CDECL AEncUpdateFrame(mfxHDL pthis, mfxU32 displayOrder, mfxU32 bits, mfxU32 QpY, mfxU32 ClassCmplx);

#ifdef __cplusplus
} // extern "C"
Expand Down
5 changes: 2 additions & 3 deletions _studio/enctools/include/mfx_enctools_brc.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace EncToolsBRC
constexpr mfxF64 RACA_SCALE = 128.0;

constexpr mfxU8 TOTAL_NUM_AV1_SEGMENTS_FOR_ENCTOOLS = 7;

/*
NalHrdConformance | VuiNalHrdParameters | Result
--------------------------------------------------------------
Expand Down Expand Up @@ -149,7 +150,6 @@ class cBRCParams
mfxU16 mHasALTR; // When mHasALTR, LTR marking decision (on/off) based on content.
mfxU32 codecId;
bool mMBBRC; // Enable Macroblock-CU level QP control (true/false)
bool lowPower;

public:
cBRCParams() :
Expand Down Expand Up @@ -205,8 +205,7 @@ class cBRCParams
mLaScale(0),
mHasALTR(0),
codecId(0),
mMBBRC(false),
lowPower(0)
mMBBRC(false)
{}

mfxStatus Init(mfxEncToolsCtrl const & ctrl, bool bMBBRC, bool bFieldMode);
Expand Down
3 changes: 1 addition & 2 deletions _studio/enctools/src/mfx_enctools_aenc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ mfxStatus AEnc_EncTool::ReportEncResult(mfxU32 displayOrder, mfxEncToolsBRCEncod
mfxStatus sts = FindOutFrame(displayOrder);
MFX_CHECK_STS(sts);

AEncUpdateFrame(m_aenc, displayOrder, pEncRes.CodedFrameSize*8, pEncRes.QpY);
AEncUpdateFrame(m_aenc, displayOrder, pEncRes.CodedFrameSize*8, pEncRes.QpY, (*m_frameIt).ClassCmplx);

return MFX_ERR_NONE;
}
Expand All @@ -187,7 +187,6 @@ mfxStatus AEnc_EncTool::GetSCDecision(mfxU32 displayOrder, mfxEncToolsHintPreEnc
pPreEncSC->SceneChangeFlag = static_cast<mfxU16>((*m_frameIt).SceneChanged);
pPreEncSC->RepeatedFrameFlag = static_cast<mfxU16>((*m_frameIt).RepeatedFrame);
pPreEncSC->TemporalComplexity = static_cast<mfxU16>((*m_frameIt).TemporalComplexity);
pPreEncSC->SpatialComplexity = static_cast<mfxU16>((*m_frameIt).SpatialComplexity);

return sts;
}
Expand Down
55 changes: 14 additions & 41 deletions _studio/enctools/src/mfx_enctools_brc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ mfxStatus cBRCParams::Init(mfxEncToolsCtrl const & ctrl, bool bMBBRC, bool field

bFieldMode= fieldMode;
codecId = ctrl.CodecId;
lowPower = IsOn(ctrl.LowPower);
targetbps = ctrl.TargetKbps * 1000;
maxbps = ctrl.MaxKbps * 1000;

Expand Down Expand Up @@ -1042,9 +1041,10 @@ mfxStatus BRC_EncToolBase::UpdateFrame(mfxU32 dispOrder, mfxEncToolsBRCStatus *p
mfxU16 isIntra = frameStruct.frameType & (MFX_FRAMETYPE_IDR | MFX_FRAMETYPE_I);
bool bIdr = (picType == MFX_FRAMETYPE_IDR);
mfxF64 qstep = QP2Qstep(qpY, m_par.quantOffset);
mfxU32 ParFrameCmplx = 0;
mfxU16 ParSceneChange = (ParFrameCmplx || frameStruct.LaAvgEncodedSize) ? frameStruct.sceneChange : 0;

mfxU16 ParSceneChange = (frameStruct.frameCmplx || frameStruct.LaAvgEncodedSize) ? frameStruct.sceneChange : 0;
mfxU32 ParFrameCmplx = frameStruct.frameCmplx;
if (isIntra && !ParFrameCmplx) ParFrameCmplx = frameStruct.LaAvgEncodedSize;
mfxU16 ParQpModulation = frameStruct.qpModulation;
mfxU16 miniGoPSize = frameStruct.miniGopSize == 0 ? m_par.gopRefDist : frameStruct.miniGopSize;
if (ParQpModulation == MFX_QP_MODULATION_NOT_DEFINED
Expand Down Expand Up @@ -1145,8 +1145,8 @@ mfxStatus BRC_EncToolBase::UpdateFrame(mfxU32 dispOrder, mfxEncToolsBRCStatus *p
pFrameSts->FrameStatus.MinFrameSize = (m_hrdSpec->GetMinFrameSizeInBits(frameStruct.encOrder,bIdr) + 7) >> 3;
//printf("%d: poc %d, size %d QP %d (%d %d), HRD sts %d, maxFrameSize %d, type %d \n",frame_par->EncodedOrder, frame_par->DisplayOrder, bitsEncoded, m_ctx.Quant, m_ctx.QuantMin, m_ctx.QuantMax, brcSts, m_hrd.GetMaxFrameSize(), frame_par->FrameType);
}
bool bCalcSetI = (isIntra && (ParFrameCmplx > 0 || frameStruct.LaAvgEncodedSize) && frameStruct.encOrder == m_ctx.LastIEncOrder // We could set Qp
&& ((ParSceneChange > 0 || frameStruct.encOrder == 0) && m_ctx.LastIQpSet == m_ctx.LastIQpMin)); // We did set Qp and/or was SceneChange
bool bCalcSetI = (isIntra && ParFrameCmplx > 0 && frameStruct.encOrder == m_ctx.LastIEncOrder // We could set Qp
&& ((ParSceneChange > 0 || frameStruct.encOrder == 0) && m_ctx.LastIQpSet == m_ctx.LastIQpMin)); // We did set Qp and/or was SceneChange
if ((e2pe > BRC_SCENE_CHANGE_RATIO2 && bitsEncoded > 4 * m_par.inputBitsPerFrame) ||
bCalcSetI
)
Expand Down Expand Up @@ -1263,9 +1263,9 @@ mfxStatus BRC_EncToolBase::UpdateFrame(mfxU32 dispOrder, mfxEncToolsBRCStatus *p
mfxF64 lFR = std::min(m_par.gopPicSize - 1, 4);
mfxF64 lowFrameSizeI = std::min(maxFrameSize, lFR *(mfxF64)m_par.inputBitsPerFrame);
// Did we set the qp?
if (isIntra && (ParFrameCmplx > 0 || frameStruct.LaAvgEncodedSize) // We could set Qp
if (isIntra && ParFrameCmplx > 0 // We could set Qp
&& frameStruct.encOrder == m_ctx.LastIEncOrder && m_ctx.LastIQpSet == m_ctx.LastIQpMin // We did set Qp
&& frameStruct.numRecode == 0 && bitsEncoded < (lowFrameSizeI / 2.0) && quant > quantMin) // We can & should recode
&& frameStruct.numRecode == 0 && bitsEncoded < (lowFrameSizeI / 2.0) && quant > quantMin) // We can & should recode
{
// too small; do something
mfxI32 quant_new = GetNewQP(bitsEncoded, (mfxU32)lowFrameSizeI, quantMin, quantMax, quant, m_par.quantOffset, 0.78, false, true);
Expand Down Expand Up @@ -1418,7 +1418,7 @@ mfxStatus BRC_EncToolBase::UpdateFrame(mfxU32 dispOrder, mfxEncToolsBRCStatus *p

m_ctx.totalDeviation += ((mfxF64)bitsEncoded - m_par.inputBitsPerFrame);

//printf("------------------ %d (%d)) Total deviation %f, old scene %d, bNeedUpdateQP %d, m_ctx.Quant %d, type %d, m_ctx.fAbLong %f m_par.inputBitsPerFrame %f\n", frameStruct.encOrder, frameStruct.dispOrder,m_ctx.totalDeviation, oldScene , bNeedUpdateQP, m_ctx.Quant,picType, m_ctx.fAbLong, m_par.inputBitsPerFrame);
//printf("------------------ %d (%d)) Total deviation %f, old scene %d, bNeedUpdateQP %d, m_ctx.Quant %d, type %d, m_ctx.fAbLong %f m_par.inputBitsPerFrame %f\n", frame_par->EncodedOrder, frame_par->DisplayOrder,m_ctx.totalDeviation, oldScene , bNeedUpdateQP, m_ctx.Quant,picType, m_ctx.fAbLong, m_par.inputBitsPerFrame);
if (m_par.HRDConformance != MFX_BRC_NO_HRD)
{
m_hrdSpec->Update(bitsEncoded, frameStruct.encOrder, bIdr);
Expand Down Expand Up @@ -1605,35 +1605,11 @@ mfxI32 BRC_EncToolBase::GetLaQpEst(mfxU32 LaAvgEncodedSize, mfxF64 inputBitsPerF
{
if (m_par.codecId == MFX_CODEC_AVC)
{
if(m_par.mLaQp != 26 || !frameStruct.frameCmplx || !m_par.lowPower) {
laQp = (mfxI32)(0.679f*laQ + 0.465f); // NN V L
} else {
mfxF32 R = (mfxF32) ((1.5 * m_par.width * m_par.height) / (inputBitsPerFrame * m_par.frameRate / 1000.0));
mfxF32 SC = (mfxF32) frameStruct.frameCmplx;
mfxF32 C = std::max(SC / (128*64), 0.03f);
mfxF32 B = (mfxF32)laScaledSize / (mfxF32) (1.5 * m_par.width * m_par.height);
mfxF32 F = (mfxF32) (std::max(std::min(m_par.frameRate, 61.0), 23.0));
const mfxF32 Alpha=0.094160103f, Beta=0.70605035f, Gamma=0.551621897f, Delta=0.042768353f, Epsilon=0.457860107f;
mfxF32 Q = Alpha * powf(R, Beta) * powf(F, Epsilon) * powf(B, Gamma) * powf(C, Delta);
mfxF32 Qp = 6.f * (logf(Q)/logf(2.f)) + 2.f;
laQp = (mfxI32) (Qp);
}
laQp = (mfxI32)(0.679f*laQ + 0.465f); // NN V L
}
else
{
if(m_par.mLaQp != 26 || !frameStruct.frameCmplx || !m_par.lowPower) {
laQp = (mfxI32)(0.6634f*laQ - 0.035f); // NN V L
} else {
mfxF32 R = (mfxF32) ((1.5 * m_par.width * m_par.height) / (inputBitsPerFrame * m_par.frameRate / 1000.0));
mfxF32 SC = (mfxF32) frameStruct.frameCmplx;
mfxF32 C = std::max(SC / (128*64), 0.03f);
mfxF32 B = (mfxF32)laScaledSize / (mfxF32) (1.5 * m_par.width * m_par.height);
mfxF32 F = (mfxF32) (std::max(std::min(m_par.frameRate, 61.0), 23.0));
const mfxF32 Alpha=0.095227005f, Beta=0.661596921f, Gamma=0.486806893f, Delta=0.078518546f, Epsilon=0.446383738f;
mfxF32 Q = Alpha * powf(R, Beta) * powf(F, Epsilon) * powf(B, Gamma) * powf(C, Delta);
mfxF32 Qp = 6.f * (logf(Q)/logf(2.f)) + 3.f;
laQp = (mfxI32) (Qp);
}
laQp = (mfxI32)(0.6634f*laQ - 0.035f); // NN V L
}
}
else
Expand Down Expand Up @@ -1663,7 +1639,7 @@ mfxStatus BRC_EncToolBase::ProcessFrame(mfxU32 dispOrder, mfxEncToolsBRCQuantCon
mfxU16 ParSceneChange = frameStruct.sceneChange;
mfxU16 ParLongTerm = frameStruct.longTerm;

mfxU32 ParFrameCmplx = 0; // Used only for LA models for now
mfxU32 ParFrameCmplx = frameStruct.frameCmplx;
mfxU16 ParQpModulation = frameStruct.qpModulation;
mfxI32 ParQpDeltaP = 0;
mfxU16 miniGoPSize = frameStruct.miniGopSize == 0 ? m_par.gopRefDist : frameStruct.miniGopSize;
Expand Down Expand Up @@ -2039,10 +2015,9 @@ mfxStatus BRC_EncToolBase::ProcessFrame(mfxU32 dispOrder, mfxEncToolsBRCQuantCon
}
frameStruct.qp = qp - m_par.quantOffset;

//printf("EncOrder %d recode %d type %d ctrl->QpY %d, qp %d PyrLayer %d QpMod %d quantOffset %d
// Cmplx %ld LaCurEncodedSize %d LaAvgEncodedSize %d Deviation %f\n",
// frameStruct.encOrder, frameStruct.numRecode, type, frameStruct.qp, qp, frameStruct.pyrLayer, ParQpModulation, m_par.quantOffset,
// ParFrameCmplx, frameStruct.LaCurEncodedSize, frameStruct.LaAvgEncodedSize, m_ctx.totalDeviation);
//printf("EncOrder %d type %d ctrl->QpY %d, qp %d PyrLayer %d QpMod %d quantOffset %d Cmplx %ld LaCurEncodedSize %d LaAvgEncodedSize %d\n",
// frameStruct.encOrder, type, frameStruct.qp, qp, frameStruct.pyrLayer, ParQpModulation, m_par.quantOffset,
// ParFrameCmplx, frameStruct.LaCurEncodedSize, frameStruct.LaAvgEncodedSize);

if (isIntra) {
m_ctx.LastIQpSetOrder = frameStruct.encOrder;
Expand Down Expand Up @@ -2098,7 +2073,6 @@ mfxStatus BRC_EncToolBase::SetFrameStruct(mfxU32 dispOrder, mfxEncToolsBRCFrameP
frStruct.encOrder = pFrameStruct.EncodeOrder;
frStruct.longTerm = pFrameStruct.LongTerm;
frStruct.sceneChange = pFrameStruct.SceneChange;
frStruct.frameCmplx = pFrameStruct.SpatialComplexity;
frStruct.PersistenceMapNZ = pFrameStruct.PersistenceMapNZ;
memcpy(frStruct.PersistenceMap, pFrameStruct.PersistenceMap, sizeof(frStruct.PersistenceMap));
m_FrameStruct.push_back(frStruct);
Expand All @@ -2112,7 +2086,6 @@ mfxStatus BRC_EncToolBase::SetFrameStruct(mfxU32 dispOrder, mfxEncToolsBRCFrameP
(*frameStruct).numRecode++; // ??? check
(*frameStruct).longTerm = pFrameStruct.LongTerm;
(*frameStruct).sceneChange = pFrameStruct.SceneChange;
(*frameStruct).frameCmplx = pFrameStruct.SpatialComplexity;
(*frameStruct).PersistenceMapNZ = pFrameStruct.PersistenceMapNZ;
memcpy((*frameStruct).PersistenceMap, pFrameStruct.PersistenceMap, sizeof((*frameStruct).PersistenceMap));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,11 +771,10 @@ namespace Base
/* Scene Change parameter */
mfxU16 SceneChange = 0;
#if defined(MFX_ENABLE_ENCTOOLS)
mfxU16 SpatialComplexity = 0;
/* Persistence Map */
mfxU16 PersistenceMapNZ;
mfxU8 PersistenceMap[MFX_ENCTOOLS_PREENC_MAP_SIZE];
#endif
#endif
};

using RepeatedFrames = std::vector<RepeatedFrameInfo>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,6 @@ mfxStatus AV1EncTools::BRCGetCtrl(StorageW& global, StorageW& s_task,
extFrameData.FrameType = task.FrameType;
extFrameData.PyramidLayer = (mfxU16) task.PyramidLevel;
extFrameData.SceneChange = task.GopHints.SceneChange;
extFrameData.SpatialComplexity = task.GopHints.SpatialComplexity;
extFrameData.PersistenceMapNZ = task.GopHints.PersistenceMapNZ;
if (extFrameData.PersistenceMapNZ)
memcpy(extFrameData.PersistenceMap, task.GopHints.PersistenceMap, sizeof(extFrameData.PersistenceMap));
Expand Down Expand Up @@ -1106,7 +1105,6 @@ mfxStatus AV1EncTools::QueryPreEncTask(StorageW& /*global*/, StorageW& s_task)
task.GopHints.MiniGopSize = preEncodeGOP.MiniGopSize;
task.GopHints.FrameType = preEncodeGOP.FrameType;
task.GopHints.SceneChange = preEncodeSChg.SceneChangeFlag;
task.GopHints.SpatialComplexity = preEncodeSChg.SpatialComplexity;
task.GopHints.PersistenceMapNZ = preEncodeSChg.PersistenceMapNZ;
if (preEncodeSChg.PersistenceMapNZ)
memcpy(task.GopHints.PersistenceMap, preEncodeSChg.PersistenceMap, sizeof(task.GopHints.PersistenceMap));
Expand Down
16 changes: 4 additions & 12 deletions _studio/mfx_lib/encode_hw/h264/include/mfx_h264_encode_hw_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -1062,11 +1062,8 @@ namespace MfxHwH264Encode
#endif
, m_TCBRCTargetFrameSize(0)
, m_SceneChange(0)
#if defined(MFX_ENABLE_ENCTOOLS)
, m_SpatialComplexity(0)
, m_PersistenceMapNZ(0)
, m_PersistenceMap{}
#endif
, m_PersistenceMap{}
#if defined(MFX_ENABLE_MCTF_IN_AVC)
, m_doMCTFIntraFiltering(0)
#endif
Expand Down Expand Up @@ -1365,11 +1362,8 @@ namespace MfxHwH264Encode
#endif
mfxU32 m_TCBRCTargetFrameSize;
mfxU32 m_SceneChange;
#if defined(MFX_ENABLE_ENCTOOLS)
mfxU16 m_SpatialComplexity;
mfxU16 m_PersistenceMapNZ;
mfxU8 m_PersistenceMap[128];
#endif
mfxU8 m_PersistenceMap[128];
#if defined(MFX_ENABLE_MCTF_IN_AVC)
mfxU32 m_doMCTFIntraFiltering;
#endif
Expand Down Expand Up @@ -2274,8 +2268,7 @@ class H264EncTools
{
MFX_CHECK(m_pEncTools != 0, MFX_ERR_NOT_INITIALIZED);
MFX_CHECK(IsOn(m_EncToolConfig.AdaptiveI) ||
IsOn(m_EncToolConfig.AdaptiveLTR) ||
IsOn(m_EncToolConfig.BRC), MFX_ERR_NOT_INITIALIZED);
IsOn(m_EncToolConfig.AdaptiveLTR), MFX_ERR_NOT_INITIALIZED);

mfxEncToolsTaskParam par = {};
par.DisplayOrder = displayOrder;
Expand Down Expand Up @@ -2361,10 +2354,9 @@ class H264EncTools
extFrameStruct.PyramidLayer = frame_par->PyramidLayer;
extFrameStruct.LongTerm = frame_par->LongTerm;
extFrameStruct.SceneChange = frame_par->SceneChange;
extFrameStruct.SpatialComplexity = task.m_SpatialComplexity;
extFrameStruct.PersistenceMapNZ = task.m_PersistenceMapNZ;
if (task.m_PersistenceMapNZ)
memcpy(extFrameStruct.PersistenceMap, task.m_PersistenceMap, sizeof(task.m_PersistenceMap));
memcpy(extFrameStruct.PersistenceMap, task.m_PersistenceMap, sizeof(task.m_PersistenceMap));
extParams.push_back((mfxExtBuffer *)&extFrameStruct);

if (frame_par->OptimalFrameSizeInBytes | frame_par->LaAvgEncodedSize)
Expand Down
5 changes: 2 additions & 3 deletions _studio/mfx_lib/encode_hw/h264/src/mfx_h264_encode_hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3219,15 +3219,14 @@ mfxStatus ImplementationAvc::FillPreEncParams(DdiTask &task)
}
}

if (m_encTools.IsAdaptiveI() || m_encTools.IsAdaptiveLTR() || m_encTools.IsBRC()) {
if (m_encTools.IsAdaptiveI() || m_encTools.IsAdaptiveLTR()) {
mfxEncToolsHintPreEncodeSceneChange schg = {};
sts = m_encTools.QueryPreEncSChg(task.m_frameOrder, schg);
MFX_CHECK_STS(sts);
task.m_SceneChange = schg.SceneChangeFlag;
task.m_SpatialComplexity = schg.SpatialComplexity;
task.m_PersistenceMapNZ = schg.PersistenceMapNZ;
if(task.m_PersistenceMapNZ)
memcpy(task.m_PersistenceMap, schg.PersistenceMap, sizeof(task.m_PersistenceMap));
memcpy(task.m_PersistenceMap, schg.PersistenceMap, sizeof(task.m_PersistenceMap));
}

if (m_encTools.IsAdaptiveLTR() || m_encTools.IsAdaptiveRef())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,12 +753,9 @@ namespace Base
mfxU32 QPModulaton = 0;
/* Scene Change parameter */
mfxU16 SceneChange = 0;
#if defined(MFX_ENABLE_ENCTOOLS)
mfxU16 SpatialComplexity = 0;
/* Maps */
mfxU16 PersistenceMapNZ;
mfxU8 PersistenceMap[128];
#endif
};

struct mfxBRCHints {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,6 @@ mfxStatus HevcEncTools::BRCGetCtrl(StorageW& global , StorageW& s_task,
extFrameData.FrameType = task.FrameType;
extFrameData.PyramidLayer = (mfxU16) task.PyramidLevel;
extFrameData.SceneChange = task.GopHints.SceneChange;
extFrameData.SpatialComplexity = task.GopHints.SpatialComplexity;
extFrameData.PersistenceMapNZ = task.GopHints.PersistenceMapNZ;
memcpy(extFrameData.PersistenceMap, task.GopHints.PersistenceMap, sizeof(extFrameData.PersistenceMap));

Expand Down Expand Up @@ -1010,8 +1009,8 @@ mfxStatus HevcEncTools::QueryPreEncTask(StorageW& global, StorageW& s_task)
task.GopHints.MiniGopSize = preEncodeGOP.MiniGopSize;
task.GopHints.FrameType = preEncodeGOP.FrameType;
task.GopHints.SceneChange = preEncodeSChg.SceneChangeFlag;
task.GopHints.SpatialComplexity = preEncodeSChg.SpatialComplexity;
task.GopHints.PersistenceMapNZ = preEncodeSChg.PersistenceMapNZ;

if (qpMapHint.QpMapFilled)
task.bCUQPMap = true;
memcpy(task.GopHints.PersistenceMap, preEncodeSChg.PersistenceMap, sizeof(task.GopHints.PersistenceMap));
Expand Down
Binary file modified contrib/aenc/libaenc.a
Binary file not shown.