History

make the decoder compile and run with treason

Sigrid Solveig Haflínudóttir committed 5 years ago

Commit 37423d41 parent be8e62f71 files · +961 −1217Browse files

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

Unified · Split

codec/decoder/core/src/decoder_core.cpp+52−54
@@ -43,7 +43,6 @@ · 42 unmodified lines
4343 #include "memory_align.h"
4444 #include "error_concealment.h"
4545
46−namespace WelsDec {
4746 static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
4847 PDqLayer pCurDq = pCtx->pCurDqLayer;
4948 PPicture pPic = pCtx->pDec;
@@ -90,9 +89,9 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 40 unmodified lines
9089 PAccessUnit pCurAu = pCtx->pAccessUnitList;
9190 if (dsErrorFree == pCtx->iErrorCode) { //correct decoding, add to data buffer
9291 SParserBsInfo* pParser = pCtx->pParserBsInfo;
93− SNalUnit* pCurNal = NULL;
92+ SNalUnit* pCurNal;
9493 int32_t iTotalNalLen = 0;
95− int32_t iNalLen = 0;
94+ int32_t iNalLen;
9695 int32_t iNum = 0;
9796 while (iNum < pParser->iNalNum) {
9897 iTotalNalLen += pParser->pNalLenInByte[iNum++];
@@ -100,7 +99,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 1 unmodified line
10099 uint8_t* pDstBuf = pParser->pDstBuff + iTotalNalLen;
101100 int32_t iIdx = pCurAu->uiStartPos;
102101 int32_t iEndIdx = pCurAu->uiEndPos;
103− uint8_t* pNalBs = NULL;
102+ uint8_t* pNalBs;
104103 pParser->uiOutBsTimeStamp = (pCurAu->pNalUnitsList [iIdx]) ? pCurAu->pNalUnitsList [iIdx]->uiTimeStamp : 0;
105104 //pParser->iNalNum = 0;
106105 pParser->iSpsWidthInPixel = (pCtx->pSps->iMbWidth << 4) - ((pCtx->pSps->sFrameCrop.iLeftOffset +
@@ -117,8 +116,8 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 10 unmodified lines
117116 WELS_VERIFY_RETURN_IF (ERR_INFO_OUT_OF_MEMORY, ExpandBsLenBuffer (pCtx, pParser->iNalNum + 2))
118117 }
119118 bool bSubSps = (NAL_UNIT_CODED_SLICE_EXT == pCurAu->pNalUnitsList [iIdx]->sNalHeaderExt.sNalUnitHeader.eNalUnitType);
120− SSpsBsInfo* pSpsBs = NULL;
121− SPpsBsInfo* pPpsBs = NULL;
119+ SSpsBsInfo* pSpsBs;
120+ SPpsBsInfo* pPpsBs;
122121 int32_t iSpsId = pCtx->pSps->iSpsId;
123122 int32_t iPpsId = pCtx->pPps->iPpsId;
124123 pCtx->bParamSetsLostFlag = false;
@@ -323,12 +322,12 @@ int32_t ParsePredWeightedTable (PBitStringAux pBs, PSliceHeader pSh) { · 198 unmodified lines
323322 int32_t iCode;
324323
325324 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode));
326− WELS_CHECK_SE_BOTH_ERROR_NOLOG (uiCode, 0, 7, "luma_log2_weight_denom",
325+ WELS_CHECK_SE_BOTH_ERROR_NOLOG ((int)uiCode, 0, 7, "luma_log2_weight_denom",
327326 GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_LUMA_LOG2_WEIGHT_DENOM));
328327 pSh->sPredWeightTable.uiLumaLog2WeightDenom = uiCode;
329328 if (pSh->pSps->uiChromaArrayType != 0) {
330329 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode));
331− WELS_CHECK_SE_BOTH_ERROR_NOLOG (uiCode, 0, 7, "chroma_log2_weight_denom",
330+ WELS_CHECK_SE_BOTH_ERROR_NOLOG ((int)uiCode, 0, 7, "chroma_log2_weight_denom",
332331 GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_CHROMA_LOG2_WEIGHT_DENOM));
333332 pSh->sPredWeightTable.uiChromaLog2WeightDenom = uiCode;
334333 }
@@ -544,7 +543,7 @@ int32_t ParseDecRefPicMarking (PWelsDecoderContext pCtx, PBitStringAux pBs, PSli · 209 unmodified lines
544543 bMmco4Exist = true;
545544 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //max_long_term_frame_idx_plus1
546545 int32_t iMaxLongTermFrameIdx = -1 + uiCode;
547− if (iMaxLongTermFrameIdx > int32_t (pSps->uiLog2MaxFrameNum)) {
546+ if (iMaxLongTermFrameIdx > (int32_t) (pSps->uiLog2MaxFrameNum)) {
548547 //ISO/IEC 14496-10:2009(E) 7.4.3.3 Decoded reference picture marking semantics page 96
549548 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_MARKING);
550549 }
@@ -609,26 +608,26 @@ int32_t InitBsBuffer (PWelsDecoderContext pCtx) { · 58 unmodified lines
609608 CMemoryAlign* pMa = pCtx->pMemAlign;
610609
611610 pCtx->iMaxBsBufferSizeInByte = MIN_ACCESS_UNIT_CAPACITY * MAX_BUFFERED_NUM;
612− if ((pCtx->sRawData.pHead = static_cast<uint8_t*> (pMa->WelsMallocz (pCtx->iMaxBsBufferSizeInByte,
611+ if ((pCtx->sRawData.pHead = (uint8_t*) (pMa->WelsMallocz (pCtx->iMaxBsBufferSizeInByte,
613612 "pCtx->sRawData.pHead"))) == NULL) {
614613 return ERR_INFO_OUT_OF_MEMORY;
615614 }
616615 pCtx->sRawData.pStartPos = pCtx->sRawData.pCurPos = pCtx->sRawData.pHead;
617616 pCtx->sRawData.pEnd = pCtx->sRawData.pHead + pCtx->iMaxBsBufferSizeInByte;
618617 if (pCtx->pParam->bParseOnly) {
619− pCtx->pParserBsInfo = static_cast<SParserBsInfo*> (pMa->WelsMallocz (sizeof (SParserBsInfo), "pCtx->pParserBsInfo"));
618+ pCtx->pParserBsInfo = (SParserBsInfo*) (pMa->WelsMallocz (sizeof (SParserBsInfo), "pCtx->pParserBsInfo"));
620619 if (pCtx->pParserBsInfo == NULL) {
621620 return ERR_INFO_OUT_OF_MEMORY;
622621 }
623622 memset (pCtx->pParserBsInfo, 0, sizeof (SParserBsInfo));
624− pCtx->pParserBsInfo->pDstBuff = static_cast<uint8_t*> (pMa->WelsMallocz (MAX_ACCESS_UNIT_CAPACITY * sizeof (uint8_t),
623+ pCtx->pParserBsInfo->pDstBuff = (uint8_t*) (pMa->WelsMallocz (MAX_ACCESS_UNIT_CAPACITY * sizeof (uint8_t),
625624 "pCtx->pParserBsInfo->pDstBuff"));
626625 if (pCtx->pParserBsInfo->pDstBuff == NULL) {
627626 return ERR_INFO_OUT_OF_MEMORY;
628627 }
629628 memset (pCtx->pParserBsInfo->pDstBuff, 0, MAX_ACCESS_UNIT_CAPACITY * sizeof (uint8_t));
630629
631− if ((pCtx->sSavedData.pHead = static_cast<uint8_t*> (pMa->WelsMallocz (pCtx->iMaxBsBufferSizeInByte,
630+ if ((pCtx->sSavedData.pHead = (uint8_t*) (pMa->WelsMallocz (pCtx->iMaxBsBufferSizeInByte,
632631 "pCtx->sSavedData.pHead"))) == NULL) {
633632 return ERR_INFO_OUT_OF_MEMORY;
634633 }
@@ -636,7 +635,7 @@ int32_t InitBsBuffer (PWelsDecoderContext pCtx) { · 1 unmodified line
636635 pCtx->sSavedData.pEnd = pCtx->sSavedData.pHead + pCtx->iMaxBsBufferSizeInByte;
637636
638637 pCtx->iMaxNalNum = MAX_NAL_UNITS_IN_LAYER + 2; //2 reserved for SPS+PPS
639− pCtx->pParserBsInfo->pNalLenInByte = static_cast<int*> (pMa->WelsMallocz (pCtx->iMaxNalNum * sizeof (int),
638+ pCtx->pParserBsInfo->pNalLenInByte = (int*) (pMa->WelsMallocz (pCtx->iMaxNalNum * sizeof (int),
640639 "pCtx->pParserBsInfo->pNalLenInByte"));
641640 if (pCtx->pParserBsInfo->pNalLenInByte == NULL) {
642641 return ERR_INFO_OUT_OF_MEMORY;
@@ -654,7 +653,7 @@ int32_t ExpandBsBuffer (PWelsDecoderContext pCtx, const int kiSrcLen) { · 11 unmodified lines
654653 CMemoryAlign* pMa = pCtx->pMemAlign;
655654
656655 //Realloc sRawData
657− uint8_t* pNewBsBuff = static_cast<uint8_t*> (pMa->WelsMallocz (iNewBuffLen, "pCtx->sRawData.pHead"));
656+ uint8_t* pNewBsBuff = (uint8_t*) (pMa->WelsMallocz (iNewBuffLen, "pCtx->sRawData.pHead"));
658657 if (pNewBsBuff == NULL) {
659658 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "ExpandBsBuffer() Failed for malloc pNewBsBuff (%d)", iNewBuffLen);
660659 pCtx->iErrorCode |= dsOutOfMemory;
@@ -679,7 +678,7 @@ int32_t ExpandBsBuffer (PWelsDecoderContext pCtx, const int kiSrcLen) { · 18 unmodified lines
679678
680679 if (pCtx->pParam->bParseOnly) {
681680 //Realloc sSavedData
682− uint8_t* pNewSavedBsBuff = static_cast<uint8_t*> (pMa->WelsMallocz (iNewBuffLen, "pCtx->sSavedData.pHead"));
681+ uint8_t* pNewSavedBsBuff = (uint8_t*) (pMa->WelsMallocz (iNewBuffLen, "pCtx->sSavedData.pHead"));
683682 if (pNewSavedBsBuff == NULL) {
684683 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "ExpandBsBuffer() Failed for malloc pNewSavedBsBuff (%d)", iNewBuffLen);
685684 pCtx->iErrorCode |= dsOutOfMemory;
@@ -704,7 +703,7 @@ int32_t ExpandBsLenBuffer (PWelsDecoderContext pCtx, const int kiCurrLen) { · 18 unmodified lines
704703 if (!pParser->pNalLenInByte)
705704 return ERR_INFO_INVALID_ACCESS;
706705
707− int iNewLen = kiCurrLen;
706+ int iNewLen;
708707 if (kiCurrLen >= MAX_MB_SIZE + 2) { //exceeds the max MB number of level 5.2
709708 WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "Current nal num (%d) exceededs %d.", kiCurrLen, MAX_MB_SIZE);
710709 pCtx->iErrorCode |= dsOutOfMemory;
@@ -715,7 +714,7 @@ int32_t ExpandBsLenBuffer (PWelsDecoderContext pCtx, const int kiCurrLen) { · 4 unmodified lines
715714 }
716715
717716 CMemoryAlign* pMa = pCtx->pMemAlign;
718− int* pNewLenBuffer = static_cast<int*> (pMa->WelsMallocz (iNewLen * sizeof (int),
717+ int* pNewLenBuffer = (int*) (pMa->WelsMallocz (iNewLen * sizeof (int),
719718 "pCtx->pParserBsInfo->pNalLenInByte"));
720719 if (pNewLenBuffer == NULL) {
721720 pCtx->iErrorCode |= dsOutOfMemory;
@@ -854,7 +853,7 @@ void UpdateDecoderStatisticsForActiveParaset (SDecoderStatistics* pDecoderStatis · 132 unmodified lines
854853 pDecoderStatistics->iCurrentActiveSpsId = pSps->iSpsId;
855854
856855 pDecoderStatistics->iCurrentActivePpsId = pPps->iPpsId;
857− pDecoderStatistics->uiProfile = static_cast<unsigned int> (pSps->uiProfileIdc);
856+ pDecoderStatistics->uiProfile = (unsigned int) (pSps->uiProfileIdc);
858857 pDecoderStatistics->uiLevel = pSps->uiLevelIdc;
859858 }
860859
@@ -876,19 +875,19 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 15 unmodified lines
876875 pCtx->pAccessUnitList->pNalUnitsList[pCtx->pAccessUnitList->uiAvailUnitsNum -
877876 1];
878877
879− PNalUnitHeaderExt pNalHeaderExt = NULL;
880− PSliceHeader pSliceHead = NULL;
881− PSliceHeaderExt pSliceHeadExt = NULL;
878+ PNalUnitHeaderExt pNalHeaderExt;
879+ PSliceHeader pSliceHead;
880+ PSliceHeaderExt pSliceHeadExt;
882881 PSubsetSps pSubsetSps = NULL;
883− PSps pSps = NULL;
884− PPps pPps = NULL;
885− EWelsNalUnitType eNalType = static_cast<EWelsNalUnitType> (0);
886− int32_t iPpsId = 0;
887− int32_t iRet = ERR_NONE;
888− uint8_t uiSliceType = 0;
882+ PSps pSps;
883+ PPps pPps;
884+ EWelsNalUnitType eNalType;
885+ int32_t iPpsId;
886+ int32_t iRet;
887+ uint8_t uiSliceType;
889888 uint8_t uiQualityId = BASE_QUALITY_ID;
890− bool bIdrFlag = false;
891− bool bSgChangeCycleInvolved = false; // involved slice group change cycle ?
889+ bool bIdrFlag;
890+ bool bSgChangeCycleInvolved; // involved slice group change cycle ?
892891 uint32_t uiCode;
893892 int32_t iCode;
894893 SLogContext* pLogCtx = & (pCtx->sLogCtx);
@@ -942,7 +941,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 47 unmodified lines
942941 }
943942 }
944943
945− pSliceHead->eSliceType = static_cast <EWelsSliceType> (uiSliceType);
944+ pSliceHead->eSliceType = (EWelsSliceType) (uiSliceType);
946945
947946 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_parameter_set_id
948947 WELS_CHECK_SE_UPPER_ERROR (uiCode, (MAX_PPS_COUNT - 1), "iPpsId out of range",
@@ -1253,7 +1252,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 304 unmodified lines
12531252 bSgChangeCycleInvolved = (bSgChangeCycleInvolved && (uiQualityId == BASE_QUALITY_ID));
12541253 if (bSgChangeCycleInvolved) {
12551254 if (pPps->uiSliceGroupChangeRate > 0) {
1256− const int32_t kiNumBits = (int32_t)WELS_CEIL (log (static_cast<double> (1 + pPps->uiPicSizeInMapUnits /
1255+ const int32_t kiNumBits = (int32_t)WELS_CEIL (log ((double) (1 + pPps->uiPicSizeInMapUnits /
12571256 pPps->uiSliceGroupChangeRate)));
12581257 WELS_READ_VERIFY (BsGetBits (pBs, kiNumBits, &uiCode)); //lice_group_change_cycle
12591258 pSliceHead->iSliceGroupChangeCycle = uiCode;
@@ -1392,11 +1391,11 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 132 unmodified lines
13921391 * ppDst: succeeded VCL NAL based AVC (I/P Slice)
13931392 */
13941393 bool PrefetchNalHeaderExtSyntax (PWelsDecoderContext pCtx, PNalUnit const kppDst, PNalUnit const kpSrc) {
1395− PNalUnitHeaderExt pNalHdrExtD = NULL, pNalHdrExtS = NULL;
1396− PSliceHeaderExt pShExtD = NULL;
1397− PPrefixNalUnit pPrefixS = NULL;
1398− PSps pSps = NULL;
1399− int32_t iIdx = 0;
1394+ PNalUnitHeaderExt pNalHdrExtD, pNalHdrExtS;
1395+ PSliceHeaderExt pShExtD ;
1396+ PPrefixNalUnit pPrefixS;
1397+ PSps pSps;
1398+ int32_t iIdx;
14001399
14011400 if (kppDst == NULL || kpSrc == NULL)
14021401 return false;
@@ -1792,7 +1791,6 @@ void UninitialDqLayersContext (PWelsDecoderContext pCtx) { · 389 unmodified lines
17921791 }
17931792 pMa->WelsFree (pDq, "pDq");
17941793
1795− pDq = NULL;
17961794 pCtx->pDqLayersList[i] = NULL;
17971795
17981796 ++ i;
@@ -1880,7 +1878,7 @@ void CheckAvailNalUnitsListContinuity (PWelsDecoderContext pCtx, int32_t iStartI · 81 unmodified lines
18801878 uint8_t uiLastNuDependencyId, uiLastNuLayerDqId;
18811879 uint8_t uiCurNuDependencyId, uiCurNuQualityId, uiCurNuLayerDqId, uiCurNuRefLayerDqId;
18821880
1883− int32_t iCurNalUnitIdx = 0;
1881+ int32_t iCurNalUnitIdx;
18841882
18851883 //check the continuity of pNalUnitsList forwards (from pIdxNoInterLayerPred to end_postion)
18861884 uiLastNuDependencyId = pCurAu->pNalUnitsList[iStartIdx]->sNalHeaderExt.uiDependencyId;//starting nal unit
@@ -2020,7 +2018,7 @@ bool CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) { · 133 unmodified lines
20202018 } else { //P_SLICE
20212019 //step 1: search uiDependencyId equal to pCtx->cur_seq_interval_target_dependency_id
20222020 bool bGetDependId = false;
2023− int32_t iIdxDependId = 0;
2021+ int32_t iIdxDependId;
20242022
20252023 iIdxDependId = kiEndPos;
20262024 while (iIdxDependId >= 0) {
@@ -2256,7 +2254,7 @@ void DecodeFinishUpdate (PWelsDecoderContext pCtx) { · 229 unmodified lines
22562254 * 0 - success; otherwise returned error_no defined in error_no.h
22572255 */
22582256 int32_t WelsDecodeInitAccessUnitStart (PWelsDecoderContext pCtx, SBufferInfo* pDstInfo) {
2259− int32_t iErr = ERR_NONE;
2257+ int32_t iErr;
22602258 PAccessUnit pCurAu = pCtx->pAccessUnitList;
22612259 pCtx->bAuReadyFlag = false;
22622260 pCtx->pLastDecPicInfo->bLastHasMmco5 = false;
@@ -2313,7 +2311,7 @@ int32_t AllocPicBuffOnNewSeqBegin (PWelsDecoderContext pCtx) { · 50 unmodified lines
23132311 * 0 - success; otherwise returned error_no defined in error_no.h
23142312 */
23152313 int32_t InitConstructAccessUnit (PWelsDecoderContext pCtx, SBufferInfo* pDstInfo) {
2316− int32_t iErr = ERR_NONE;
2314+ int32_t iErr;
23172315
23182316 iErr = WelsDecodeInitAccessUnitStart (pCtx, pDstInfo);
23192317 if (ERR_NONE != iErr) {
@@ -2342,7 +2340,7 @@ int32_t InitConstructAccessUnit (PWelsDecoderContext pCtx, SBufferInfo* pDstInfo · 22 unmodified lines
23422340 * 0 - success; otherwise returned error_no defined in error_no.h
23432341 */
23442342 int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
2345− int32_t iErr = ERR_NONE;
2343+ int32_t iErr;
23462344 if (GetThreadCount (pCtx) <= 1) {
23472345 iErr = InitConstructAccessUnit (pCtx, pDstInfo);
23482346 if (ERR_NONE != iErr) {
@@ -2425,7 +2423,8 @@ void WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps pS · 76 unmodified lines
24252423 }
24262424
24272425 int32_t InitRefPicList (PWelsDecoderContext pCtx, const uint8_t kuiNRi, int32_t iPoc) {
2428− int32_t iRet = ERR_NONE;
2426+ USED(kuiNRi);
2427+ int32_t iRet;
24292428 if (pCtx->eSliceType == B_SLICE) {
24302429 iRet = WelsInitBSliceRefList (pCtx, iPoc);
24312430 CreateImplicitWeightTable (pCtx);
@@ -2480,8 +2479,9 @@ void InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) { · 48 unmodified lines
24802479 * Decode current access unit when current AU is completed.
24812480 */
24822481 int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
2483− PNalUnit pNalCur = pCtx->pNalCur = NULL;
2482+ PNalUnit pNalCur;
24842483 PAccessUnit pCurAu = pCtx->pAccessUnitList;
2484+ pCtx->pNalCur = NULL;
24852485
24862486 int32_t iIdx = pCurAu->uiStartPos;
24872487 int32_t iEndIdx = pCurAu->uiEndPos;
@@ -2501,18 +2501,16 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 13 unmodified lines
25012501 }
25022502 }
25032503 int32_t iThreadCount = GetThreadCount (pCtx);
2504− int32_t iPpsId = 0;
2505− int32_t iRet = ERR_NONE;
2506−
2504+ int32_t iPpsId;
2505+ int32_t iRet;
25072506 bool bAllRefComplete = true; // Assume default all ref picutres are complete
25082507
25092508 const uint8_t kuiTargetLayerDqId = GetTargetDqId (pCtx->uiTargetDqId, pCtx->pParam);
25102509 const uint8_t kuiDependencyIdMax = (kuiTargetLayerDqId & 0x7F) >> 4;
25112510 int16_t iLastIdD = -1, iLastIdQ = -1;
2512− int16_t iCurrIdD = 0, iCurrIdQ = 0;
2511+ int16_t iCurrIdD, iCurrIdQ;
25132512 pCtx->uiNalRefIdc = 0;
2514− bool bFreshSliceAvailable =
2515− true; // Another fresh slice comingup for given dq layer, for multiple slices in case of header parts of slices sometimes loss over error-prone channels, 8/14/2008
2513+ bool bFreshSliceAvailable; // Another fresh slice comingup for given dq layer, for multiple slices in case of header parts of slices sometimes loss over error-prone channels, 8/14/2008
25162514
25172515 //update pCurDqLayer at the starting of AU decoding
25182516 if (pCtx->bInitialDqLayersMem || pCtx->pCurDqLayer == NULL) {
@@ -2525,7 +2523,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 6 unmodified lines
25252523 while (iIdx <= iEndIdx) {
25262524 PDqLayer dq_cur = pCtx->pCurDqLayer;
25272525 SLayerInfo pLayerInfo;
2528− PSliceHeaderExt pShExt = NULL;
2526+ PSliceHeaderExt pShExt;
25292527 PSliceHeader pSh = NULL;
25302528 bool isNewFrame = true;
25312529 if (iThreadCount > 1) {
@@ -2723,6 +2721,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 191 unmodified lines
27232721 SET_EVENT (&pThreadCtx->sSliceDecodeStart);
27242722 }
27252723 iRet = WelsDecodeAndConstructSlice (pCtx);
2724+fprint(2, "WelsDecodeAndConstructSlice %d\n", iRet);
27262725 } else {
27272726 iRet = WelsDecodeSlice (pCtx, bFreshSliceAvailable, pNalCur);
27282727 }
@@ -2834,7 +2833,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 105 unmodified lines
28342833 ++i;
28352834 }
28362835 }
2837− iRet = WelsMarkAsRef (pCtx);
2836+ iRet = WelsMarkAsRef (pCtx, NULL);
28382837 if (iRet != ERR_NONE) {
28392838 if (iRet == ERR_INFO_DUPLICATE_FRAME_NUM)
28402839 pCtx->iErrorCode |= dsBitstreamError;
@@ -2997,4 +2996,3 @@ bool CheckRefPicturesComplete (PWelsDecoderContext pCtx) { · 156 unmodified lines
29972996
29982997 return bAllRefComplete;
29992998 }
3000−} // namespace WelsDec

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