38 #ifndef __TENCRATECTRL__
39 #define __TENCRATECTRL__
43 #endif // _MSC_VER > 1000
46 #include "../TLibCommon/CommonDef.h"
47 #include "../TLibCommon/TComDataCU.h"
57 #include "../TLibEncoder/TEncCfg.h"
104 Void create(
Int totalFrames,
Int targetBitrate,
Int frameRate,
Int GOPSize,
Int picWidth,
Int picHeight,
Int LCUWidth,
Int LCUHeight,
Int numberOfLevel,
Bool useLCUSeparateModel,
Int adaptiveBit );
106 Void initBitsRatio(
Int bitsRatio[] );
107 Void initGOPID2Level(
Int GOPID2Level[] );
110 Void updateAfterPic (
Int bits );
193 Void updateAfterPicture(
Int bitsCost );
227 Int estimatePicQP (
Double lambda, list<TEncRCPic*>& listPreviousPictures );
228 Int getRefineBitsForIntra(
Int orgBits);
230 Double estimatePicLambda( list<TEncRCPic*>& listPreviousPictures,
SliceType eSliceType);
242 Void addToPictureLsit( list<TEncRCPic*>& listPreviousPictures );
244 Double calAverageLambda();
248 Int xEstPicHeaderBits( list<TEncRCPic*>& listPreviousPictures,
Int frameLevel );
272 Void getLCUInitTargetBits();
315 Void init(
Int totalFrames,
Int targetBitrate,
Int frameRate,
Int GOPSize,
Int picWidth,
Int picHeight,
Int LCUWidth,
Int LCUHeight,
Int keepHierBits,
Bool useLCUSeparateModel,
GOPEntry GOPList[
MAX_GOP] );
317 Void initRCPic(
Int frameLevel );
318 Void initRCGOP(
Int numberOfPictures );
332 Int updateCpbState(
Int actualBits);
const Double g_RCBetaMaxValue
SliceType
supported slice type
Void setPicEstLambda(Double lambda)
Void setBitLeft(Int bits)
Double m_remainingCostIntra
const Double g_RCAlphaMaxValue
const Double g_RCAlphaMinValue
Double getPicActualLambda()
TRCParameter getLCUPara(Int level, Int LCUIdx)
const Int g_RCInvalidQPValue
Int getGOPID2Level(Int ID)
TRCLCU & getLCU(Int LCUIdx)
const Double g_RCWeightPicTargetBitInGOP
Void setPicPara(Int level, TRCParameter para)
list< TEncRCPic * > m_listRCPictures
Void setTotalIntraCost(Double cost)
Bool getCpbSaturationEnabled()
static const Int MAX_GOP
max. value of hierarchical GOP size
const Int g_RCMaxPicListSize
TRCParameter * getPicPara()
Int * m_picTargetBitInGOP
const Int g_RCIterationNum
Bool m_useLCUSeparateModel
const Double g_RCWeightPicRargetBitInBuffer
TEncRCSeq * getRCSequence()
const Int g_RCSmoothWindowSize
Int m_picActualHeaderBits
TRCParameter ** m_LCUPara
Void setLCUPara(Int level, Int LCUIdx, TRCParameter para)
TRCParameter * getLCUPara(Int level)
const Double g_RCWeightHistoryLambda
const Double g_RCWeightCurrentLambda
Bool m_CpbSaturationEnabled
Void setTargetBits(Int bits)
Bool getUseLCUSeparateModel()
Int getTargetBitInGOP(Int i)
TRCParameter getPicPara(Int level)
Void setLastLambda(Double lamdba)
Int getPicActualHeaderBits()
list< TEncRCPic * > & getPicList()
const Int g_RCLCUSmoothWindowSize
const Double g_RCBetaMinValue
TEncRCSeq * getEncRCSeq()
TRCParameter ** getLCUPara()