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
213 InitBits (&pEncCtx->pOut->sBsWrite, pEncCtx->pOut->pBsBuffer, pEncCtx->pOut->uiSize);213 InitBits (&pEncCtx->pOut->sBsWrite, pEncCtx->pOut->pBsBuffer, pEncCtx->pOut->uiSize);
214 214
215 if (keFrameType == WELS_FRAME_TYPE_P) {215 if (keFrameType == WELS_FRAME_TYPE_P) {
216 if (pEncCtx->pSvcParam->uiIntraPeriod) {216 ++pEncCtx->iFrameIndex;
217 ++pEncCtx->iFrameIndex;
218 }
219
220 ++pEncCtx->uiFrameIdxRc;
221 217
222 if (pEncCtx->iPOC < (1 << pEncCtx->pSps->iLog2MaxPocLsb) - 2) // if iPOC type is no 0, this need be modification218 if (pEncCtx->iPOC < (1 << pEncCtx->pSps->iLog2MaxPocLsb) - 2) // if iPOC type is no 0, this need be modification
223 pEncCtx->iPOC += 2; // for POC type 0219 pEncCtx->iPOC += 2; // for POC type 0
@@ -237,10 +233,7 @@ void InitFrameCoding (sWelsEncCtx* pEncCtx, const EFrameType keFrameType) { · 13 unmodified lines
237 pEncCtx->iFrameNum = 0;233 pEncCtx->iFrameNum = 0;
238 pEncCtx->iPOC = 0;234 pEncCtx->iPOC = 0;
239 pEncCtx->bEncCurFrmAsIdrFlag = false;235 pEncCtx->bEncCurFrmAsIdrFlag = false;
240 if (pEncCtx->pSvcParam->uiIntraPeriod) {236 pEncCtx->iFrameIndex = 0;
241 pEncCtx->iFrameIndex = 0;
242 }
243 pEncCtx->uiFrameIdxRc = 0;
244 237
245 pEncCtx->eNalType = NAL_UNIT_CODED_SLICE_IDR;238 pEncCtx->eNalType = NAL_UNIT_CODED_SLICE_IDR;
246 pEncCtx->eSliceType = I_SLICE;239 pEncCtx->eSliceType = I_SLICE;
@@ -286,7 +279,7 @@ EFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum) { · 39 unmodified lines
286 // perform scene change detection279 // perform scene change detection
287 if ((!pSvcParam->bEnableSceneChangeDetect) || pEncCtx->pVaa->bIdrPeriodFlag ||280 if ((!pSvcParam->bEnableSceneChangeDetect) || pEncCtx->pVaa->bIdrPeriodFlag ||
288 (kiSpatialNum < pSvcParam->iSpatialLayerNum)281 (kiSpatialNum < pSvcParam->iSpatialLayerNum)
289 || (pEncCtx->uiFrameIdxRc < (VGOP_SIZE << 1))) { // avoid too frequent I frame coding, rc control282 || (pEncCtx->iFrameIndex < (VGOP_SIZE << 1))) { // avoid too frequent I frame coding, rc control
290 bSceneChangeFlag = false;283 bSceneChangeFlag = false;
291 } else {284 } else {
292 bSceneChangeFlag = pEncCtx->pVaa->bSceneChangeFlag;285 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