History

Add thread decoding support for multi-slice frame. Note: In each call to DecodeFrameNoDelay, iSrcLen must be the byte-size of one coded video frame.

xiaotianshi2 committed 6 years ago

Commit b1ce6991 parent e1b8cd23 files · +29 −8Browse files

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

Unified · Split

codec/decoder/core/src/decoder.cpp+3−3
@@ -813,7 +813,7 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 812 unmodified lines
813813 }
814814 CheckAndFinishLastPic (pCtx, ppDst, pDstBufInfo);
815815 if (pCtx->bAuReadyFlag && pCtx->pAccessUnitList->uiAvailUnitsNum != 0) {
816− if (pCtx->pThreadCtx == NULL) {
816+ if (GetThreadCount (pCtx) <= 1) {
817817 ConstructAccessUnit (pCtx, ppDst, pDstBufInfo);
818818 } else {
819819 pCtx->pAccessUnitList->uiAvailUnitsNum = 1;
@@ -873,11 +873,11 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 53 unmodified lines
873873 if (IS_PARAM_SETS_NALS (pCtx->sCurNalHead.eNalUnitType)) {
874874 iRet = ParseNonVclNal (pCtx, pNalPayload, iDstIdx - iConsumedBytes, pSrcNal - 3, iSrcIdx + 3);
875875 }
876− if (pCtx->pThreadCtx == NULL) {
876+ if (GetThreadCount (pCtx) <= 1) {
877877 CheckAndFinishLastPic (pCtx, ppDst, pDstBufInfo);
878878 }
879879 if (pCtx->bAuReadyFlag && pCtx->pAccessUnitList->uiAvailUnitsNum != 0) {
880− if (pCtx->pThreadCtx == NULL) {
880+ if (GetThreadCount (pCtx) <= 1) {
881881 ConstructAccessUnit (pCtx, ppDst, pDstBufInfo);
882882 } else {
883883 pCtx->pAccessUnitList->uiAvailUnitsNum = 1;

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