Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 14 files). Show all
Unified · Split
| @@ -63,14 +63,14 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 62 unmodified lines | ||
| 63 | 63 | #else |
| 64 | 64 | pCtx->bReferenceLostAtT0Flag = false; // need initialize it due new seq, 6/4/2010 |
| 65 | 65 | #endif //LONG_TERM_REF |
| 66 | − WelsLog (pCtx, WELS_LOG_INFO, | |
| 66 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_INFO, | |
| 67 | 67 | "DecodeFrameConstruction()::::output first frame of new sequence, %d x %d, crop_left:%d, crop_right:%d, crop_top:%d, crop_bottom:%d.\n", |
| 68 | 68 | kiWidth, kiHeight, pCtx->sFrameCrop.iLeftOffset, pCtx->sFrameCrop.iRightOffset, pCtx->sFrameCrop.iTopOffset, |
| 69 | 69 | pCtx->sFrameCrop.iBottomOffset); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) { |
| 73 | − WelsLog (pCtx, WELS_LOG_WARNING, | |
| 73 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, | |
| 74 | 74 | "DecodeFrameConstruction():::iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d \n", |
| 75 | 75 | pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight); |
| 76 | 76 | bFrameCompleteFlag = false; //return later after output buffer is done |
| @@ -331,7 +331,7 @@ int32_t ExpandBsBuffer (PWelsDecoderContext pCtx, const int kiSrcLen) { · 254 unmodified lines | ||
| 331 | 331 | |
| 332 | 332 | int32_t CheckBsBuffer (PWelsDecoderContext pCtx, const int32_t kiSrcLen) { |
| 333 | 333 | if (kiSrcLen > MAX_ACCESS_UNIT_CAPACITY) { //exceeds max allowed data |
| 334 | − WelsLog (pCtx, WELS_LOG_WARNING, "Max AU size exceeded. Allowed size = %d, current size = %d", MAX_ACCESS_UNIT_CAPACITY, | |
| 334 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "Max AU size exceeded. Allowed size = %d, current size = %d", MAX_ACCESS_UNIT_CAPACITY, | |
| 335 | 335 | kiSrcLen); |
| 336 | 336 | pCtx->iErrorCode |= dsBitstreamError; |
| 337 | 337 | return ERR_INFO_INVALID_ACCESS; |
| @@ -455,6 +455,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 117 unmodified lines | ||
| 455 | 455 | bool bSgChangeCycleInvolved = false; // involved slice group change cycle ? |
| 456 | 456 | uint32_t uiCode; |
| 457 | 457 | int32_t iCode; |
| 458 | + SLogContext* pLogCtx = &(pCtx->sLogCtx); | |
| 458 | 459 | |
| 459 | 460 | if (kpCurNal == NULL) { |
| 460 | 461 | return ERR_INFO_OUT_OF_MEMORY; |
| @@ -484,7 +485,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 23 unmodified lines | ||
| 484 | 485 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //slice_type |
| 485 | 486 | uiSliceType = uiCode; |
| 486 | 487 | if (uiSliceType > 9) { |
| 487 | − WelsLog (pCtx, WELS_LOG_WARNING, "slice type too large (%d) at first_mb(%d)\n", uiSliceType, | |
| 488 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "slice type too large (%d) at first_mb(%d)\n", uiSliceType, | |
| 488 | 489 | pSliceHead->iFirstMbInSlice); |
| 489 | 490 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE); |
| 490 | 491 | } |
| @@ -492,17 +493,17 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 1 unmodified line | ||
| 492 | 493 | uiSliceType -= 5; |
| 493 | 494 | |
| 494 | 495 | if (B_SLICE == uiSliceType) { |
| 495 | − WelsLog (pCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(): B slice not supported.\n"); | |
| 496 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(): B slice not supported.\n"); | |
| 496 | 497 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_BIPRED); |
| 497 | 498 | } |
| 498 | 499 | if ((NAL_UNIT_CODED_SLICE_IDR == eNalType) && (I_SLICE != uiSliceType)) { |
| 499 | − WelsLog (pCtx, WELS_LOG_WARNING, "Invalid slice type(%d) in IDR picture. \n", uiSliceType); | |
| 500 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "Invalid slice type(%d) in IDR picture. \n", uiSliceType); | |
| 500 | 501 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE); |
| 501 | 502 | } |
| 502 | 503 | |
| 503 | 504 | if (kbExtensionFlag) { |
| 504 | 505 | if (uiSliceType > 2) { |
| 505 | − WelsLog (pCtx, WELS_LOG_WARNING, "Invalid slice type(%d).\n", uiSliceType); | |
| 506 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "Invalid slice type(%d).\n", uiSliceType); | |
| 506 | 507 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE); |
| 507 | 508 | } |
| 508 | 509 | } |
| @@ -513,20 +514,20 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 4 unmodified lines | ||
| 513 | 514 | iPpsId = uiCode; |
| 514 | 515 | |
| 515 | 516 | if (iPpsId >= MAX_PPS_COUNT) { |
| 516 | − WelsLog (pCtx, WELS_LOG_WARNING, "iPpsId out of range\n"); | |
| 517 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "iPpsId out of range\n"); | |
| 517 | 518 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_PPS_ID_OVERFLOW); |
| 518 | 519 | } |
| 519 | 520 | |
| 520 | 521 | //add check PPS available here |
| 521 | 522 | if (pCtx->bPpsAvailFlags[iPpsId] == false) { |
| 522 | − WelsLog (pCtx, WELS_LOG_ERROR, "PPS id is invalid!\n"); | |
| 523 | + WelsLog (pLogCtx, WELS_LOG_ERROR, "PPS id is invalid!\n"); | |
| 523 | 524 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_PPS_ID); |
| 524 | 525 | } |
| 525 | 526 | |
| 526 | 527 | pPps = &pCtx->sPpsBuffer[iPpsId]; |
| 527 | 528 | |
| 528 | 529 | if (pPps->uiNumSliceGroups == 0) { |
| 529 | − WelsLog (pCtx, WELS_LOG_WARNING, "non existing PPS referenced\n"); | |
| 530 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "non existing PPS referenced\n"); | |
| 530 | 531 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS); |
| 531 | 532 | } |
| 532 | 533 | |
| @@ -534,12 +535,12 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 1 unmodified line | ||
| 534 | 535 | pSubsetSps = &pCtx->sSubsetSpsBuffer[pPps->iSpsId]; |
| 535 | 536 | pSps = &pSubsetSps->sSps; |
| 536 | 537 | if (pCtx->bSubspsAvailFlags[pPps->iSpsId] == false) { |
| 537 | − WelsLog (pCtx, WELS_LOG_ERROR, "SPS id is invalid!\n"); | |
| 538 | + WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!\n"); | |
| 538 | 539 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID); |
| 539 | 540 | } |
| 540 | 541 | } else { |
| 541 | 542 | if (pCtx->bSpsAvailFlags[pPps->iSpsId] == false) { |
| 542 | − WelsLog (pCtx, WELS_LOG_ERROR, "SPS id is invalid!\n"); | |
| 543 | + WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!\n"); | |
| 543 | 544 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID); |
| 544 | 545 | } |
| 545 | 546 | pSps = &pCtx->sSpsBuffer[pPps->iSpsId]; |
| @@ -554,7 +555,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 8 unmodified lines | ||
| 554 | 555 | bIdrFlag = (!kbExtensionFlag && eNalType == NAL_UNIT_CODED_SLICE_IDR) || (kbExtensionFlag && pNalHeaderExt->bIdrFlag); |
| 555 | 556 | |
| 556 | 557 | if (pSps->uiLog2MaxFrameNum == 0) { |
| 557 | − WelsLog (pCtx, WELS_LOG_WARNING, "non existing SPS referenced\n"); | |
| 558 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "non existing SPS referenced\n"); | |
| 558 | 559 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS); |
| 559 | 560 | } |
| 560 | 561 | // check first_mb_in_slice |
| @@ -566,7 +567,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 5 unmodified lines | ||
| 566 | 567 | pSliceHead->bFieldPicFlag = false; |
| 567 | 568 | pSliceHead->bBottomFiledFlag = false; |
| 568 | 569 | if (!pSps->bFrameMbsOnlyFlag) { |
| 569 | − WelsLog (pCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(): frame_mbs_only_flag = %d not supported. \n", | |
| 570 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(): frame_mbs_only_flag = %d not supported. \n", | |
| 570 | 571 | pSps->bFrameMbsOnlyFlag); |
| 571 | 572 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MBAFF); |
| 572 | 573 | } |
| @@ -575,7 +576,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 2 unmodified lines | ||
| 575 | 576 | |
| 576 | 577 | if (bIdrFlag) { |
| 577 | 578 | if (pSliceHead->iFrameNum != 0) { |
| 578 | − WelsLog (pCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(), invaild frame number: %d due to IDR frame introduced!\n", | |
| 579 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(), invaild frame number: %d due to IDR frame introduced!\n", | |
| 579 | 580 | pSliceHead->iFrameNum); |
| 580 | 581 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_FRAME_NUM); |
| 581 | 582 | } |
| @@ -637,14 +638,14 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 55 unmodified lines | ||
| 637 | 638 | } |
| 638 | 639 | |
| 639 | 640 | if (pSliceHead->uiRefCount[0] > MAX_REF_PIC_COUNT || pSliceHead->uiRefCount[1] > MAX_REF_PIC_COUNT) { |
| 640 | − WelsLog (pCtx, WELS_LOG_WARNING, "reference overflow\n"); | |
| 641 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "reference overflow\n"); | |
| 641 | 642 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_REF_COUNT_OVERFLOW); |
| 642 | 643 | } |
| 643 | 644 | |
| 644 | 645 | if (BASE_QUALITY_ID == uiQualityId) { |
| 645 | 646 | iRet = ParseRefPicListReordering (pBs, pSliceHead); |
| 646 | 647 | if (iRet != ERR_NONE) { |
| 647 | − WelsLog (pCtx, WELS_LOG_WARNING, "invalid ref pPic list reordering syntaxs!\n"); | |
| 648 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "invalid ref pPic list reordering syntaxs!\n"); | |
| 648 | 649 | return iRet; |
| 649 | 650 | } |
| 650 | 651 | |
| @@ -665,7 +666,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 14 unmodified lines | ||
| 665 | 666 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //store_ref_base_pic_flag |
| 666 | 667 | pSliceHeadExt->bStoreRefBasePicFlag = !!uiCode; |
| 667 | 668 | if ((pNalHeaderExt->bUseRefBasePicFlag || pSliceHeadExt->bStoreRefBasePicFlag) && !bIdrFlag) { |
| 668 | − WelsLog (pCtx, WELS_LOG_WARNING, | |
| 669 | + WelsLog (pLogCtx, WELS_LOG_WARNING, | |
| 669 | 670 | "ParseSliceHeaderSyntaxs(): bUseRefBasePicFlag or bStoreRefBasePicFlag = 1 not supported.\n"); |
| 670 | 671 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_ILP); |
| 671 | 672 | } |
| @@ -674,7 +675,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 2 unmodified lines | ||
| 674 | 675 | } |
| 675 | 676 | |
| 676 | 677 | if (pPps->bEntropyCodingModeFlag) { |
| 677 | − WelsLog (pCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(): CABAC in Enhancement layer not supported.\n"); | |
| 678 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(): CABAC in Enhancement layer not supported.\n"); | |
| 678 | 679 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_CABAC_EL); |
| 679 | 680 | } |
| 680 | 681 | |
| @@ -682,14 +683,14 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 1 unmodified line | ||
| 682 | 683 | pSliceHead->iSliceQpDelta = iCode; |
| 683 | 684 | pSliceHead->iSliceQp = pPps->iPicInitQp + pSliceHead->iSliceQpDelta; |
| 684 | 685 | if (pSliceHead->iSliceQp < 0 || pSliceHead->iSliceQp > 51) { |
| 685 | − WelsLog (pCtx, WELS_LOG_WARNING, "QP %d out of range\n", pSliceHead->iSliceQp); | |
| 686 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "QP %d out of range\n", pSliceHead->iSliceQp); | |
| 686 | 687 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_QP); |
| 687 | 688 | } |
| 688 | 689 | |
| 689 | 690 | //FIXME qscale / qp ... stuff |
| 690 | 691 | if (!kbExtensionFlag) { |
| 691 | 692 | if (uiSliceType == SP_SLICE || uiSliceType == SI_SLICE) { |
| 692 | − WelsLog (pCtx, WELS_LOG_WARNING, "SP/SI not supported\n"); | |
| 693 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "SP/SI not supported\n"); | |
| 693 | 694 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_SPSI); |
| 694 | 695 | } |
| 695 | 696 | } |
| @@ -702,7 +703,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 6 unmodified lines | ||
| 702 | 703 | pSliceHead->uiDisableDeblockingFilterIdc = uiCode; |
| 703 | 704 | //refer to JVT-X201wcm1.doc G.7.4.3.4--2010.4.20 |
| 704 | 705 | if (pSliceHead->uiDisableDeblockingFilterIdc > 6) { |
| 705 | − WelsLog (pCtx, WELS_LOG_WARNING, "disable_deblock_filter_idc (%d) out of range [0, 6]\n", | |
| 706 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "disable_deblock_filter_idc (%d) out of range [0, 6]\n", | |
| 706 | 707 | pSliceHead->uiDisableDeblockingFilterIdc); |
| 707 | 708 | return ERR_INFO_INVALID_DBLOCKING_IDC; |
| 708 | 709 | } |
| @@ -786,7 +787,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 77 unmodified lines | ||
| 786 | 787 | (pos.iTopOffset + pos.iBottomOffset) / (1 + pSliceHead->bFieldPicFlag); |
| 787 | 788 | } |
| 788 | 789 | } else if (uiQualityId > BASE_QUALITY_ID) { |
| 789 | − WelsLog (pCtx, WELS_LOG_WARNING, "MGS not supported.\n"); | |
| 790 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "MGS not supported.\n"); | |
| 790 | 791 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS); |
| 791 | 792 | } else { |
| 792 | 793 | pSliceHeadExt->uiRefLayerDqId = (uint8_t) - 1; |
| @@ -845,7 +846,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 52 unmodified lines | ||
| 845 | 846 | WELS_READ_VERIFY (BsGetBits (pBs, 4, &uiCode)); //scan_idx_end |
| 846 | 847 | pSliceHeadExt->uiScanIdxEnd = uiCode; |
| 847 | 848 | if (pSliceHeadExt->uiScanIdxStart != 0 || pSliceHeadExt->uiScanIdxEnd != 15) { |
| 848 | − WelsLog (pCtx, WELS_LOG_WARNING, "uiScanIdxStart (%d) != 0 and uiScanIdxEnd (%d) !=15 not supported here\n", | |
| 849 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "uiScanIdxStart (%d) != 0 and uiScanIdxEnd (%d) !=15 not supported here\n", | |
| 849 | 850 | pSliceHeadExt->uiScanIdxStart, pSliceHeadExt->uiScanIdxEnd); |
| 850 | 851 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS); |
| 851 | 852 | } |
| @@ -938,7 +939,7 @@ int32_t UpdateAccessUnit (PWelsDecoderContext pCtx) { · 86 unmodified lines | ||
| 938 | 939 | } |
| 939 | 940 | if (uiActualIdx == |
| 940 | 941 | pCurAu->uiActualUnitsNum) { // no found IDR nal within incoming AU, need exit to avoid mosaic issue, 11/19/2009 |
| 941 | − WelsLog (pCtx, WELS_LOG_WARNING, "UpdateAccessUnit():::::Key frame lost.....CAN NOT find IDR from current AU.\n"); | |
| 942 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "UpdateAccessUnit():::::Key frame lost.....CAN NOT find IDR from current AU.\n"); | |
| 942 | 943 | if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) { |
| 943 | 944 | #ifdef LONG_TERM_REF |
| 944 | 945 | pCtx->iErrorCode |= dsNoParamSets; |
| @@ -1630,7 +1631,7 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI · 685 unmodified lines | ||
| 1630 | 1631 | iErr = SyncPictureResolutionExt (pCtx, pCtx->pSps->iMbWidth, pCtx->pSps->iMbHeight); |
| 1631 | 1632 | |
| 1632 | 1633 | if (ERR_NONE != iErr) { |
| 1633 | − WelsLog (pCtx, WELS_LOG_WARNING, "sync picture resolution ext failed, the error is %d", iErr); | |
| 1634 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "sync picture resolution ext failed, the error is %d", iErr); | |
| 1634 | 1635 | return iErr; |
| 1635 | 1636 | } |
| 1636 | 1637 | InitErrorCon (pCtx); //Do EC initialization here, for sequence start |
| @@ -1648,7 +1649,7 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI · 11 unmodified lines | ||
| 1648 | 1649 | if (pCtx->bNewSeqBegin) |
| 1649 | 1650 | ResetActiveSPSForEachLayer (pCtx); |
| 1650 | 1651 | if (ERR_NONE != iErr) { |
| 1651 | − WelsLog (pCtx, WELS_LOG_INFO, "returned error from decoding:[0x%x]\n", iErr); | |
| 1652 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_INFO, "returned error from decoding:[0x%x]\n", iErr); | |
| 1652 | 1653 | return iErr; |
| 1653 | 1654 | } |
| 1654 | 1655 | |
| @@ -1784,7 +1785,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 129 unmodified lines | ||
| 1784 | 1785 | pCtx->pDec = PrefetchPic (pCtx->pPicBuff[0]); |
| 1785 | 1786 | |
| 1786 | 1787 | if (NULL == pCtx->pDec) { |
| 1787 | − WelsLog (pCtx, WELS_LOG_ERROR, "DecodeCurrentAccessUnit()::::::PrefetchPic ERROR, pSps->iNumRefFrames:%d.\n", | |
| 1788 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_ERROR, "DecodeCurrentAccessUnit()::::::PrefetchPic ERROR, pSps->iNumRefFrames:%d.\n", | |
| 1788 | 1789 | pCtx->pSps->iNumRefFrames); |
| 1789 | 1790 | pCtx->iErrorCode |= dsOutOfMemory; |
| 1790 | 1791 | return ERR_INFO_REF_COUNT_OVERFLOW; |
| @@ -1837,7 +1838,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 46 unmodified lines | ||
| 1837 | 1838 | pCtx->pFmo = &pCtx->sFmoList[iPpsId]; |
| 1838 | 1839 | if (!FmoParamUpdate (pCtx->pFmo, pLayerInfo.pSps, pLayerInfo.pPps, &pCtx->iActiveFmoNum)) { |
| 1839 | 1840 | pCtx->iErrorCode |= dsBitstreamError; |
| 1840 | − WelsLog (pCtx, WELS_LOG_WARNING, "DecodeCurrentAccessUnit(), FmoParamUpdate failed, eSliceType: %d.\n", | |
| 1841 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "DecodeCurrentAccessUnit(), FmoParamUpdate failed, eSliceType: %d.\n", | |
| 1841 | 1842 | pSh->eSliceType); |
| 1842 | 1843 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_FMO_INIT_FAIL); |
| 1843 | 1844 | } |
| @@ -1862,7 +1863,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 18 unmodified lines | ||
| 1862 | 1863 | if (!kbIdrFlag && |
| 1863 | 1864 | pSh->iFrameNum != pCtx->iPrevFrameNum && |
| 1864 | 1865 | pSh->iFrameNum != ((pCtx->iPrevFrameNum + 1) & ((1 << dq_cur->sLayerInfo.pSps->uiLog2MaxFrameNum) - 1))) { |
| 1865 | − WelsLog (pCtx, WELS_LOG_WARNING, | |
| 1866 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, | |
| 1866 | 1867 | "referencing pictures lost due frame gaps exist, prev_frame_num: %d, curr_frame_num: %d\n", pCtx->iPrevFrameNum, |
| 1867 | 1868 | pSh->iFrameNum); |
| 1868 | 1869 | |
| @@ -1883,7 +1884,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 14 unmodified lines | ||
| 1883 | 1884 | iRet = InitRefPicList (pCtx, uiNalRefIdc, bFreshSliceAvailable, pSh->iPicOrderCntLsb); |
| 1884 | 1885 | if (iRet) { |
| 1885 | 1886 | HandleReferenceLost (pCtx, pNalCur); |
| 1886 | − WelsLog (pCtx, WELS_LOG_WARNING, "reference picture introduced by this frame is lost during transmission! uiTId: %d\n", | |
| 1887 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "reference picture introduced by this frame is lost during transmission! uiTId: %d\n", | |
| 1887 | 1888 | pNalCur->sNalHeaderExt.uiTemporalId); |
| 1888 | 1889 | if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) { |
| 1889 | 1890 | return iRet; |
| @@ -1895,7 +1896,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 5 unmodified lines | ||
| 1895 | 1896 | |
| 1896 | 1897 | //Output good store_base reconstruction when enhancement quality layer occurred error for MGS key picture case |
| 1897 | 1898 | if (iRet != ERR_NONE) { |
| 1898 | − WelsLog (pCtx, WELS_LOG_WARNING, "DecodeCurrentAccessUnit() failed (%d) in frame: %d uiDId: %d uiQId: %d\n", | |
| 1899 | + WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "DecodeCurrentAccessUnit() failed (%d) in frame: %d uiDId: %d uiQId: %d\n", | |
| 1899 | 1900 | iRet, pSh->iFrameNum, iCurrIdD, iCurrIdQ); |
| 1900 | 1901 | HandleReferenceLostL0 (pCtx, pNalCur); |
| 1901 | 1902 | if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) { |