History

remove uiFrameIdxRc

volvet committed 12 years ago

Commit bc1850a1 parent 1eb68823 files · +4 −12Browse files

Showing the changes to codec/encoder/core/src/encoder.cpp (1 of 3 files). Show all

Unified · Split

codec/encoder/core/src/encoder.cpp+3−10
@@ -213,11 +213,7 @@ void InitFrameCoding (sWelsEncCtx* pEncCtx, const EFrameType keFrameType) { · 212 unmodified lines
213213 InitBits (&pEncCtx->pOut->sBsWrite, pEncCtx->pOut->pBsBuffer, pEncCtx->pOut->uiSize);
214214
215215 if (keFrameType == WELS_FRAME_TYPE_P) {
216− if (pEncCtx->pSvcParam->uiIntraPeriod) {
217− ++pEncCtx->iFrameIndex;
218− }
219−
220− ++pEncCtx->uiFrameIdxRc;
216+ ++pEncCtx->iFrameIndex;
221217
222218 if (pEncCtx->iPOC < (1 << pEncCtx->pSps->iLog2MaxPocLsb) - 2) // if iPOC type is no 0, this need be modification
223219 pEncCtx->iPOC += 2; // for POC type 0
@@ -237,10 +233,7 @@ void InitFrameCoding (sWelsEncCtx* pEncCtx, const EFrameType keFrameType) { · 13 unmodified lines
237233 pEncCtx->iFrameNum = 0;
238234 pEncCtx->iPOC = 0;
239235 pEncCtx->bEncCurFrmAsIdrFlag = false;
240− if (pEncCtx->pSvcParam->uiIntraPeriod) {
241− pEncCtx->iFrameIndex = 0;
242− }
243− pEncCtx->uiFrameIdxRc = 0;
236+ pEncCtx->iFrameIndex = 0;
244237
245238 pEncCtx->eNalType = NAL_UNIT_CODED_SLICE_IDR;
246239 pEncCtx->eSliceType = I_SLICE;
@@ -286,7 +279,7 @@ EFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum) { · 39 unmodified lines
286279 // perform scene change detection
287280 if ((!pSvcParam->bEnableSceneChangeDetect) || pEncCtx->pVaa->bIdrPeriodFlag ||
288281 (kiSpatialNum < pSvcParam->iSpatialLayerNum)
289− || (pEncCtx->uiFrameIdxRc < (VGOP_SIZE << 1))) { // avoid too frequent I frame coding, rc control
282+ || (pEncCtx->iFrameIndex < (VGOP_SIZE << 1))) { // avoid too frequent I frame coding, rc control
290283 bSceneChangeFlag = false;
291284 } else {
292285 bSceneChangeFlag = pEncCtx->pVaa->bSceneChangeFlag;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t