Commit bba7711a authored by Miroslav Goncharenko's avatar Miroslav Goncharenko Committed by Vitaliy Ilichev

h264 brc: added missing condition for qp change

parent 9b7c81e1
......@@ -1525,7 +1525,8 @@ mfxU8 LookAheadBrc2::GetQpForRecode(const BRCFrameParams& par, mfxU8 curQP)
{
qp = GetNewQP(par.CodedFrameSize, m_maxFrameSize, curQP);
}
qp = curQP + std::max<mfxU8>(1, par.NumRecode);
if (qp <= curQP)
qp = curQP + std::max<mfxU8>(1, par.NumRecode);
mfxU32 ind = GetFrameTypeIndex(par.FrameType);
qp = CLIPVAL(m_QPMin[ind], m_QPMax[ind], qp);
......@@ -1871,7 +1872,8 @@ mfxU8 VMEBrc::GetQpForRecode(const BRCFrameParams& par, mfxU8 curQP)
{
qp = GetNewQP(par.CodedFrameSize, m_maxFrameSize, curQP);
}
qp = curQP + std::max<mfxU8>(1, par.NumRecode);
if (qp <= curQP)
qp = curQP + std::max<mfxU8>(1, par.NumRecode);
mfxU32 ind = GetFrameTypeIndex(par.FrameType);
qp = CLIPVAL(m_QPMin[ind], m_QPMax[ind],qp);
return qp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment