remove uiFrameIdxRc
This commit is contained in:
parent
1eb688264b
commit
bc1850a54d
@ -151,7 +151,6 @@ typedef struct TagWelsEncCtx {
|
||||
// Derived
|
||||
int32_t iCodingIndex;
|
||||
int32_t iFrameIndex; // count how many frames elapsed during coding context currently
|
||||
uint32_t uiFrameIdxRc; //only for RC
|
||||
int32_t iFrameNum; // current frame number coding
|
||||
int32_t iPOC; // frame iPOC
|
||||
EWelsSliceType eSliceType; // currently coding slice type
|
||||
|
@ -213,11 +213,7 @@ void InitFrameCoding (sWelsEncCtx* pEncCtx, const EFrameType keFrameType) {
|
||||
InitBits (&pEncCtx->pOut->sBsWrite, pEncCtx->pOut->pBsBuffer, pEncCtx->pOut->uiSize);
|
||||
|
||||
if (keFrameType == WELS_FRAME_TYPE_P) {
|
||||
if (pEncCtx->pSvcParam->uiIntraPeriod) {
|
||||
++pEncCtx->iFrameIndex;
|
||||
}
|
||||
|
||||
++pEncCtx->uiFrameIdxRc;
|
||||
++pEncCtx->iFrameIndex;
|
||||
|
||||
if (pEncCtx->iPOC < (1 << pEncCtx->pSps->iLog2MaxPocLsb) - 2) // if iPOC type is no 0, this need be modification
|
||||
pEncCtx->iPOC += 2; // for POC type 0
|
||||
@ -237,10 +233,7 @@ void InitFrameCoding (sWelsEncCtx* pEncCtx, const EFrameType keFrameType) {
|
||||
pEncCtx->iFrameNum = 0;
|
||||
pEncCtx->iPOC = 0;
|
||||
pEncCtx->bEncCurFrmAsIdrFlag = false;
|
||||
if (pEncCtx->pSvcParam->uiIntraPeriod) {
|
||||
pEncCtx->iFrameIndex = 0;
|
||||
}
|
||||
pEncCtx->uiFrameIdxRc = 0;
|
||||
pEncCtx->iFrameIndex = 0;
|
||||
|
||||
pEncCtx->eNalType = NAL_UNIT_CODED_SLICE_IDR;
|
||||
pEncCtx->eSliceType = I_SLICE;
|
||||
@ -286,7 +279,7 @@ EFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum) {
|
||||
// perform scene change detection
|
||||
if ((!pSvcParam->bEnableSceneChangeDetect) || pEncCtx->pVaa->bIdrPeriodFlag ||
|
||||
(kiSpatialNum < pSvcParam->iSpatialLayerNum)
|
||||
|| (pEncCtx->uiFrameIdxRc < (VGOP_SIZE << 1))) { // avoid too frequent I frame coding, rc control
|
||||
|| (pEncCtx->iFrameIndex < (VGOP_SIZE << 1))) { // avoid too frequent I frame coding, rc control
|
||||
bSceneChangeFlag = false;
|
||||
} else {
|
||||
bSceneChangeFlag = pEncCtx->pVaa->bSceneChangeFlag;
|
||||
|
@ -678,7 +678,7 @@ void RcTraceFrameBits (sWelsEncCtx* pEncCtx) {
|
||||
|
||||
WelsLog (pEncCtx, WELS_LOG_INFO,
|
||||
"[Rc] encoding_qp%d, qp = %3d, index = %8d, iTid = %1d, used = %8d, target = %8d, remaingbits = %8d\n",
|
||||
pEncCtx->uiDependencyId, pWelsSvcRc->iAverageFrameQp, pEncCtx->uiFrameIdxRc, pEncCtx->uiTemporalId,
|
||||
pEncCtx->uiDependencyId, pWelsSvcRc->iAverageFrameQp, pEncCtx->iFrameIndex, pEncCtx->uiTemporalId,
|
||||
pWelsSvcRc->iFrameDqBits,
|
||||
pWelsSvcRc->iTargetBits, pWelsSvcRc->iRemainingBits);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user