History

trace fix

ruil2 committed 12 years ago

Commit fa138e81 parent 0f4499114 files · +202 −200Browse files

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

Unified · Split

codec/decoder/core/src/decoder_core.cpp+33−32
@@ -63,14 +63,14 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 62 unmodified lines
63#else63#else
64 pCtx->bReferenceLostAtT0Flag = false; // need initialize it due new seq, 6/4/201064 pCtx->bReferenceLostAtT0Flag = false; // need initialize it due new seq, 6/4/2010
65#endif //LONG_TERM_REF65#endif //LONG_TERM_REF
66 WelsLog (pCtx, WELS_LOG_INFO,66 WelsLog (&(pCtx->sLogCtx), WELS_LOG_INFO,
67 "DecodeFrameConstruction()::::output first frame of new sequence, %d x %d, crop_left:%d, crop_right:%d, crop_top:%d, crop_bottom:%d.\n",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 kiWidth, kiHeight, pCtx->sFrameCrop.iLeftOffset, pCtx->sFrameCrop.iRightOffset, pCtx->sFrameCrop.iTopOffset,68 kiWidth, kiHeight, pCtx->sFrameCrop.iLeftOffset, pCtx->sFrameCrop.iRightOffset, pCtx->sFrameCrop.iTopOffset,
69 pCtx->sFrameCrop.iBottomOffset);69 pCtx->sFrameCrop.iBottomOffset);
70 }70 }
71 71
72 if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) {72 if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) {
73 WelsLog (pCtx, WELS_LOG_WARNING,73 WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING,
74 "DecodeFrameConstruction():::iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d \n",74 "DecodeFrameConstruction():::iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d \n",
75 pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight);75 pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight);
76 bFrameCompleteFlag = false; //return later after output buffer is done76 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
332int32_t CheckBsBuffer (PWelsDecoderContext pCtx, const int32_t kiSrcLen) {332int32_t CheckBsBuffer (PWelsDecoderContext pCtx, const int32_t kiSrcLen) {
333 if (kiSrcLen > MAX_ACCESS_UNIT_CAPACITY) { //exceeds max allowed data333 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 kiSrcLen);335 kiSrcLen);
336 pCtx->iErrorCode |= dsBitstreamError;336 pCtx->iErrorCode |= dsBitstreamError;
337 return ERR_INFO_INVALID_ACCESS;337 return ERR_INFO_INVALID_ACCESS;
@@ -455,6 +455,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 117 unmodified lines
455 bool bSgChangeCycleInvolved = false; // involved slice group change cycle ?455 bool bSgChangeCycleInvolved = false; // involved slice group change cycle ?
456 uint32_t uiCode;456 uint32_t uiCode;
457 int32_t iCode;457 int32_t iCode;
458 SLogContext* pLogCtx = &(pCtx->sLogCtx);
458 459
459 if (kpCurNal == NULL) {460 if (kpCurNal == NULL) {
460 return ERR_INFO_OUT_OF_MEMORY;461 return ERR_INFO_OUT_OF_MEMORY;
@@ -484,7 +485,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 23 unmodified lines
484 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //slice_type485 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //slice_type
485 uiSliceType = uiCode;486 uiSliceType = uiCode;
486 if (uiSliceType > 9) {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 pSliceHead->iFirstMbInSlice);489 pSliceHead->iFirstMbInSlice);
489 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE);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 uiSliceType -= 5;493 uiSliceType -= 5;
493 494
494 if (B_SLICE == uiSliceType) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_BIPRED);497 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_BIPRED);
497 }498 }
498 if ((NAL_UNIT_CODED_SLICE_IDR == eNalType) && (I_SLICE != uiSliceType)) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE);501 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE);
501 }502 }
502 503
503 if (kbExtensionFlag) {504 if (kbExtensionFlag) {
504 if (uiSliceType > 2) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE);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 iPpsId = uiCode;514 iPpsId = uiCode;
514 515
515 if (iPpsId >= MAX_PPS_COUNT) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_PPS_ID_OVERFLOW);518 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_PPS_ID_OVERFLOW);
518 }519 }
519 520
520 //add check PPS available here521 //add check PPS available here
521 if (pCtx->bPpsAvailFlags[iPpsId] == false) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_PPS_ID);524 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_PPS_ID);
524 }525 }
525 526
526 pPps = &pCtx->sPpsBuffer[iPpsId];527 pPps = &pCtx->sPpsBuffer[iPpsId];
527 528
528 if (pPps->uiNumSliceGroups == 0) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS);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 pSubsetSps = &pCtx->sSubsetSpsBuffer[pPps->iSpsId];535 pSubsetSps = &pCtx->sSubsetSpsBuffer[pPps->iSpsId];
535 pSps = &pSubsetSps->sSps;536 pSps = &pSubsetSps->sSps;
536 if (pCtx->bSubspsAvailFlags[pPps->iSpsId] == false) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);539 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
539 }540 }
540 } else {541 } else {
541 if (pCtx->bSpsAvailFlags[pPps->iSpsId] == false) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);544 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
544 }545 }
545 pSps = &pCtx->sSpsBuffer[pPps->iSpsId];546 pSps = &pCtx->sSpsBuffer[pPps->iSpsId];
@@ -554,7 +555,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 8 unmodified lines
554 bIdrFlag = (!kbExtensionFlag && eNalType == NAL_UNIT_CODED_SLICE_IDR) || (kbExtensionFlag && pNalHeaderExt->bIdrFlag);555 bIdrFlag = (!kbExtensionFlag && eNalType == NAL_UNIT_CODED_SLICE_IDR) || (kbExtensionFlag && pNalHeaderExt->bIdrFlag);
555 556
556 if (pSps->uiLog2MaxFrameNum == 0) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS);559 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS);
559 }560 }
560 // check first_mb_in_slice561 // check first_mb_in_slice
@@ -566,7 +567,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 5 unmodified lines
566 pSliceHead->bFieldPicFlag = false;567 pSliceHead->bFieldPicFlag = false;
567 pSliceHead->bBottomFiledFlag = false;568 pSliceHead->bBottomFiledFlag = false;
568 if (!pSps->bFrameMbsOnlyFlag) {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 pSps->bFrameMbsOnlyFlag);571 pSps->bFrameMbsOnlyFlag);
571 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MBAFF);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 if (bIdrFlag) {577 if (bIdrFlag) {
577 if (pSliceHead->iFrameNum != 0) {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 pSliceHead->iFrameNum);580 pSliceHead->iFrameNum);
580 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_FRAME_NUM);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 if (pSliceHead->uiRefCount[0] > MAX_REF_PIC_COUNT || pSliceHead->uiRefCount[1] > MAX_REF_PIC_COUNT) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_REF_COUNT_OVERFLOW);642 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_REF_COUNT_OVERFLOW);
642 }643 }
643 644
644 if (BASE_QUALITY_ID == uiQualityId) {645 if (BASE_QUALITY_ID == uiQualityId) {
645 iRet = ParseRefPicListReordering (pBs, pSliceHead);646 iRet = ParseRefPicListReordering (pBs, pSliceHead);
646 if (iRet != ERR_NONE) {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 return iRet;649 return iRet;
649 }650 }
650 651
@@ -665,7 +666,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 14 unmodified lines
665 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //store_ref_base_pic_flag666 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //store_ref_base_pic_flag
666 pSliceHeadExt->bStoreRefBasePicFlag = !!uiCode;667 pSliceHeadExt->bStoreRefBasePicFlag = !!uiCode;
667 if ((pNalHeaderExt->bUseRefBasePicFlag || pSliceHeadExt->bStoreRefBasePicFlag) && !bIdrFlag) {668 if ((pNalHeaderExt->bUseRefBasePicFlag || pSliceHeadExt->bStoreRefBasePicFlag) && !bIdrFlag) {
668 WelsLog (pCtx, WELS_LOG_WARNING,669 WelsLog (pLogCtx, WELS_LOG_WARNING,
669 "ParseSliceHeaderSyntaxs(): bUseRefBasePicFlag or bStoreRefBasePicFlag = 1 not supported.\n");670 "ParseSliceHeaderSyntaxs(): bUseRefBasePicFlag or bStoreRefBasePicFlag = 1 not supported.\n");
670 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_ILP);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 if (pPps->bEntropyCodingModeFlag) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_CABAC_EL);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 pSliceHead->iSliceQpDelta = iCode;683 pSliceHead->iSliceQpDelta = iCode;
683 pSliceHead->iSliceQp = pPps->iPicInitQp + pSliceHead->iSliceQpDelta;684 pSliceHead->iSliceQp = pPps->iPicInitQp + pSliceHead->iSliceQpDelta;
684 if (pSliceHead->iSliceQp < 0 || pSliceHead->iSliceQp > 51) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_QP);687 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_QP);
687 }688 }
688 689
689 //FIXME qscale / qp ... stuff690 //FIXME qscale / qp ... stuff
690 if (!kbExtensionFlag) {691 if (!kbExtensionFlag) {
691 if (uiSliceType == SP_SLICE || uiSliceType == SI_SLICE) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_SPSI);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 pSliceHead->uiDisableDeblockingFilterIdc = uiCode;703 pSliceHead->uiDisableDeblockingFilterIdc = uiCode;
703 //refer to JVT-X201wcm1.doc G.7.4.3.4--2010.4.20704 //refer to JVT-X201wcm1.doc G.7.4.3.4--2010.4.20
704 if (pSliceHead->uiDisableDeblockingFilterIdc > 6) {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 pSliceHead->uiDisableDeblockingFilterIdc);707 pSliceHead->uiDisableDeblockingFilterIdc);
707 return ERR_INFO_INVALID_DBLOCKING_IDC;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 (pos.iTopOffset + pos.iBottomOffset) / (1 + pSliceHead->bFieldPicFlag);787 (pos.iTopOffset + pos.iBottomOffset) / (1 + pSliceHead->bFieldPicFlag);
787 }788 }
788 } else if (uiQualityId > BASE_QUALITY_ID) {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 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS);791 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS);
791 } else {792 } else {
792 pSliceHeadExt->uiRefLayerDqId = (uint8_t) - 1;793 pSliceHeadExt->uiRefLayerDqId = (uint8_t) - 1;
@@ -845,7 +846,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 52 unmodified lines
845 WELS_READ_VERIFY (BsGetBits (pBs, 4, &uiCode)); //scan_idx_end846 WELS_READ_VERIFY (BsGetBits (pBs, 4, &uiCode)); //scan_idx_end
846 pSliceHeadExt->uiScanIdxEnd = uiCode;847 pSliceHeadExt->uiScanIdxEnd = uiCode;
847 if (pSliceHeadExt->uiScanIdxStart != 0 || pSliceHeadExt->uiScanIdxEnd != 15) {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 pSliceHeadExt->uiScanIdxStart, pSliceHeadExt->uiScanIdxEnd);850 pSliceHeadExt->uiScanIdxStart, pSliceHeadExt->uiScanIdxEnd);
850 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS);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 if (uiActualIdx ==940 if (uiActualIdx ==
940 pCurAu->uiActualUnitsNum) { // no found IDR nal within incoming AU, need exit to avoid mosaic issue, 11/19/2009941 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 if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) {943 if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) {
943#ifdef LONG_TERM_REF944#ifdef LONG_TERM_REF
944 pCtx->iErrorCode |= dsNoParamSets;945 pCtx->iErrorCode |= dsNoParamSets;
@@ -1630,7 +1631,7 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI · 685 unmodified lines
1630 iErr = SyncPictureResolutionExt (pCtx, pCtx->pSps->iMbWidth, pCtx->pSps->iMbHeight);1631 iErr = SyncPictureResolutionExt (pCtx, pCtx->pSps->iMbWidth, pCtx->pSps->iMbHeight);
1631 1632
1632 if (ERR_NONE != iErr) {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 return iErr;1635 return iErr;
1635 }1636 }
1636 InitErrorCon (pCtx); //Do EC initialization here, for sequence start1637 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 if (pCtx->bNewSeqBegin)1649 if (pCtx->bNewSeqBegin)
1649 ResetActiveSPSForEachLayer (pCtx);1650 ResetActiveSPSForEachLayer (pCtx);
1650 if (ERR_NONE != iErr) {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 return iErr;1653 return iErr;
1653 }1654 }
1654 1655
@@ -1784,7 +1785,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 129 unmodified lines
1784 pCtx->pDec = PrefetchPic (pCtx->pPicBuff[0]);1785 pCtx->pDec = PrefetchPic (pCtx->pPicBuff[0]);
1785 1786
1786 if (NULL == pCtx->pDec) {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 pCtx->pSps->iNumRefFrames);1789 pCtx->pSps->iNumRefFrames);
1789 pCtx->iErrorCode |= dsOutOfMemory;1790 pCtx->iErrorCode |= dsOutOfMemory;
1790 return ERR_INFO_REF_COUNT_OVERFLOW;1791 return ERR_INFO_REF_COUNT_OVERFLOW;
@@ -1837,7 +1838,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 46 unmodified lines
1837 pCtx->pFmo = &pCtx->sFmoList[iPpsId];1838 pCtx->pFmo = &pCtx->sFmoList[iPpsId];
1838 if (!FmoParamUpdate (pCtx->pFmo, pLayerInfo.pSps, pLayerInfo.pPps, &pCtx->iActiveFmoNum)) {1839 if (!FmoParamUpdate (pCtx->pFmo, pLayerInfo.pSps, pLayerInfo.pPps, &pCtx->iActiveFmoNum)) {
1839 pCtx->iErrorCode |= dsBitstreamError;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 pSh->eSliceType);1842 pSh->eSliceType);
1842 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_FMO_INIT_FAIL);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 if (!kbIdrFlag &&1863 if (!kbIdrFlag &&
1863 pSh->iFrameNum != pCtx->iPrevFrameNum &&1864 pSh->iFrameNum != pCtx->iPrevFrameNum &&
1864 pSh->iFrameNum != ((pCtx->iPrevFrameNum + 1) & ((1 << dq_cur->sLayerInfo.pSps->uiLog2MaxFrameNum) - 1))) {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 "referencing pictures lost due frame gaps exist, prev_frame_num: %d, curr_frame_num: %d\n", pCtx->iPrevFrameNum,1867 "referencing pictures lost due frame gaps exist, prev_frame_num: %d, curr_frame_num: %d\n", pCtx->iPrevFrameNum,
1867 pSh->iFrameNum);1868 pSh->iFrameNum);
1868 1869
@@ -1883,7 +1884,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 14 unmodified lines
1883 iRet = InitRefPicList (pCtx, uiNalRefIdc, bFreshSliceAvailable, pSh->iPicOrderCntLsb);1884 iRet = InitRefPicList (pCtx, uiNalRefIdc, bFreshSliceAvailable, pSh->iPicOrderCntLsb);
1884 if (iRet) {1885 if (iRet) {
1885 HandleReferenceLost (pCtx, pNalCur);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 pNalCur->sNalHeaderExt.uiTemporalId);1888 pNalCur->sNalHeaderExt.uiTemporalId);
1888 if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) {1889 if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) {
1889 return iRet;1890 return iRet;
@@ -1895,7 +1896,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 5 unmodified lines
1895 1896
1896 //Output good store_base reconstruction when enhancement quality layer occurred error for MGS key picture case1897 //Output good store_base reconstruction when enhancement quality layer occurred error for MGS key picture case
1897 if (iRet != ERR_NONE) {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 iRet, pSh->iFrameNum, iCurrIdD, iCurrIdQ);1900 iRet, pSh->iFrameNum, iCurrIdD, iCurrIdQ);
1900 HandleReferenceLostL0 (pCtx, pNalCur);1901 HandleReferenceLostL0 (pCtx, pNalCur);
1901 if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) {1902 if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) {

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