MCPcopy Create free account
hub / github.com/cisco/openh264 / AdjustBaseLayer

Function AdjustBaseLayer

codec/encoder/core/src/slice_multi_threading.cpp:502–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500}
501
502int32_t AdjustBaseLayer (sWelsEncCtx* pCtx) {
503 SDqLayer* pCurDq = pCtx->ppDqLayerList[0];
504 int32_t iNeedAdj = 1;
505#ifdef MT_DEBUG
506 int64_t iT0 = WelsTime();
507#endif//MT_DEBUG
508
509 pCtx->pCurDqLayer = pCurDq;
510
511 // do not need adjust due to not different at both slices of consumed time
512 iNeedAdj = NeedDynamicAdjust (pCtx->ppDqLayerList[0]->ppSliceInLayer
513 , pCurDq->sSliceEncCtx.iSliceNumInFrame);
514 if (iNeedAdj)
515 DynamicAdjustSlicing (pCtx,
516 pCurDq,
517 0);
518#ifdef MT_DEBUG
519 iT0 = WelsTime() - iT0;
520 if (pCtx->pSliceThreading->pFSliceDiff) {
521 fprintf (pCtx->pSliceThreading->pFSliceDiff,
522 "%6" PRId64" us adjust time at base spatial layer, iNeedAdj %d, DynamicAdjustSlicing()\n",
523 iT0, iNeedAdj);
524 }
525#endif//MT_DEBUG
526
527 return iNeedAdj;
528}
529
530int32_t AdjustEnhanceLayer (sWelsEncCtx* pCtx, int32_t iCurDid) {
531#ifdef MT_DEBUG

Callers 1

WelsEncoderEncodeExtFunction · 0.85

Calls 3

WelsTimeFunction · 0.85
NeedDynamicAdjustFunction · 0.85
DynamicAdjustSlicingFunction · 0.85

Tested by

no test coverage detected