Lines Matching refs:pDecContext
501 PWelsDecoderContext pDecContext = m_pDecThrCtx[i].pCtx; in SetOption() local
502 if (pDecContext == NULL && eOptID != DECODER_OPTION_TRACE_LEVEL && in SetOption()
511 if (pDecContext == NULL) return dsInitialOptExpected; in SetOption()
513 pDecContext->bEndOfStreamFlag = iVal ? true : false; in SetOption()
520 if (pDecContext == NULL) return dsInitialOptExpected; in SetOption()
524 if ((pDecContext->pParam->bParseOnly) && (iVal != (int32_t)ERROR_CON_DISABLE)) { in SetOption()
530 pDecContext->pParam->eEcActiveIdc = (ERROR_CON_IDC)iVal; in SetOption()
531 InitErrorCon (pDecContext); in SetOption()
563 if (pDecContext == NULL) return dsInitialOptExpected; in SetOption()
564 pDecContext->pDecoderStatistics->iStatisticsLogInterval = (* ((unsigned int*)pOption)); in SetOption()
585 PWelsDecoderContext pDecContext = m_pDecThrCtx[0].pCtx; in GetOption() local
586 if (pDecContext == NULL) in GetOption()
593 iVal = pDecContext->bEndOfStreamFlag; in GetOption()
599 iVal = pDecContext->uiCurIdrPicId; in GetOption()
603 iVal = pDecContext->iFrameNum; in GetOption()
607 iVal = pDecContext->bCurAuContainLtrMarkSeFlag; in GetOption()
611 iVal = pDecContext->iFrameNumOfAuMarkedLtr; in GetOption()
617 iVal = pDecContext->iFeedbackVclNalInAu; in GetOption()
621 iVal = pDecContext->iFeedbackTidInAu; in GetOption()
625 iVal = pDecContext->iFeedbackNalRefIdc; in GetOption()
631 iVal = (int)pDecContext->pParam->eEcActiveIdc; in GetOption()
637 memcpy (pDecoderStatistics, pDecContext->pDecoderStatistics, sizeof (SDecoderStatistics)); in GetOption()
639 if (pDecContext->pDecoderStatistics->uiDecodedFrameCount != 0) { //not original status in GetOption()
640 pDecoderStatistics->fAverageFrameSpeedInMs = (float) (pDecContext->dDecTime) / in GetOption()
641 (pDecContext->pDecoderStatistics->uiDecodedFrameCount); in GetOption()
642 pDecoderStatistics->fActualAverageFrameSpeedInMs = (float) (pDecContext->dDecTime) / in GetOption()
643 …(pDecContext->pDecoderStatistics->uiDecodedFrameCount + pDecContext->pDecoderStatistics->uiFreezin… in GetOption()
644 pDecContext->pDecoderStatistics->uiFreezingNonIDRNum); in GetOption()
649 iVal = pDecContext->pDecoderStatistics->iStatisticsLogInterval; in GetOption()
656 if (!pDecContext->pSps) { in GetOption()
659 pVuiSarInfo->uiSarWidth = pDecContext->pSps->sVui.uiSarWidth; in GetOption()
660 pVuiSarInfo->uiSarHeight = pDecContext->pSps->sVui.uiSarHeight; in GetOption()
661 pVuiSarInfo->bOverscanAppropriateFlag = pDecContext->pSps->sVui.bOverscanAppropriateFlag; in GetOption()
665 if (!pDecContext->pSps) { in GetOption()
668 iVal = (int)pDecContext->pSps->uiProfileIdc; in GetOption()
672 if (!pDecContext->pSps) { in GetOption()
675 iVal = (int)pDecContext->pSps->uiLevelIdc; in GetOption()
729 DECODING_STATE CWelsDecoder::DecodeFrame2WithCtx (PWelsDecoderContext pDecContext, const unsigned c… in DecodeFrame2WithCtx() argument
733 if (pDecContext == NULL || pDecContext->pParam == NULL) { in DecodeFrame2WithCtx()
740 if (pDecContext->pParam->bParseOnly) { in DecodeFrame2WithCtx()
742 pDecContext->iErrorCode |= dsInvalidArgument; in DecodeFrame2WithCtx()
745 if (CheckBsBuffer (pDecContext, kiSrcLen)) { in DecodeFrame2WithCtx()
746 if (ResetDecoder(pDecContext)) { in DecodeFrame2WithCtx()
763 pDecContext->bEndOfStreamFlag = false; in DecodeFrame2WithCtx()
764 if (GetThreadCount (pDecContext) <= 0) { in DecodeFrame2WithCtx()
765 pDecContext->uiDecodingTimeStamp = ++m_uiDecodeTimeStamp; in DecodeFrame2WithCtx()
770 pDecContext->bEndOfStreamFlag = true; in DecodeFrame2WithCtx()
771 pDecContext->bInstantDecFlag = true; in DecodeFrame2WithCtx()
777 if (GetThreadCount (pDecContext) <= 1) { in DecodeFrame2WithCtx()
780 pDecContext->iErrorCode = dsErrorFree; //initialize at the starting of AU decoding. in DecodeFrame2WithCtx()
781 pDecContext->iFeedbackVclNalInAu = FEEDBACK_UNKNOWN_NAL; //initialize in DecodeFrame2WithCtx()
783 if (GetThreadCount (pDecContext) <= 1) { in DecodeFrame2WithCtx()
788 pDecContext->bReferenceLostAtT0Flag = false; //initialize for LTR in DecodeFrame2WithCtx()
789 pDecContext->bCurAuContainLtrMarkSeFlag = false; in DecodeFrame2WithCtx()
790 pDecContext->iFrameNumOfAuMarkedLtr = 0; in DecodeFrame2WithCtx()
791 pDecContext->iFrameNum = -1; //initialize in DecodeFrame2WithCtx()
794 pDecContext->iFeedbackTidInAu = -1; //initialize in DecodeFrame2WithCtx()
795 pDecContext->iFeedbackNalRefIdc = -1; //initialize in DecodeFrame2WithCtx()
798 pDecContext->uiTimeStamp = pDstInfo->uiInBsTimeStamp; in DecodeFrame2WithCtx()
800 pDecContext->uiTimeStamp = 0; in DecodeFrame2WithCtx()
802 WelsDecodeBs (pDecContext, kpSrc, kiSrcLen, ppDst, in DecodeFrame2WithCtx()
804 pDecContext->bInstantDecFlag = false; //reset no-delay flag in DecodeFrame2WithCtx()
805 if (pDecContext->iErrorCode) { in DecodeFrame2WithCtx()
809 eNalType = pDecContext->sCurNalHead.eNalUnitType; in DecodeFrame2WithCtx()
810 if (pDecContext->iErrorCode & dsOutOfMemory) { in DecodeFrame2WithCtx()
811 if (ResetDecoder (pDecContext)) { in DecodeFrame2WithCtx()
817 if (pDecContext->iErrorCode & dsRefListNullPtrs) { in DecodeFrame2WithCtx()
818 if (ResetDecoder (pDecContext)) { in DecodeFrame2WithCtx()
826 (VIDEO_BITSTREAM_AVC == pDecContext->eVideoType)) { in DecodeFrame2WithCtx()
827 if (pDecContext->pParam->eEcActiveIdc == ERROR_CON_DISABLE) { in DecodeFrame2WithCtx()
829 pDecContext->bParamSetsLostFlag = true; in DecodeFrame2WithCtx()
831 pDecContext->bReferenceLostAtT0Flag = true; in DecodeFrame2WithCtx()
836 if (pDecContext->bPrintFrameErrorTraceFlag) { in DecodeFrame2WithCtx()
838 pDecContext->iErrorCode); in DecodeFrame2WithCtx()
839 pDecContext->bPrintFrameErrorTraceFlag = false; in DecodeFrame2WithCtx()
841 pDecContext->iIgnoredErrorInfoPacketCount++; in DecodeFrame2WithCtx()
842 if (pDecContext->iIgnoredErrorInfoPacketCount == INT_MAX) { in DecodeFrame2WithCtx()
844 pDecContext->iIgnoredErrorInfoPacketCount = 0; in DecodeFrame2WithCtx()
847 … if ((pDecContext->pParam->eEcActiveIdc != ERROR_CON_DISABLE) && (pDstInfo->iBufferStatus == 1)) { in DecodeFrame2WithCtx()
849 pDecContext->iErrorCode |= dsDataErrorConcealed; in DecodeFrame2WithCtx()
851 pDecContext->pDecoderStatistics->uiDecodedFrameCount++; in DecodeFrame2WithCtx()
852 … if (pDecContext->pDecoderStatistics->uiDecodedFrameCount == 0) { //exceed max value of uint32_t in DecodeFrame2WithCtx()
853 ResetDecStatNums (pDecContext->pDecoderStatistics); in DecodeFrame2WithCtx()
854 pDecContext->pDecoderStatistics->uiDecodedFrameCount++; in DecodeFrame2WithCtx()
856 int32_t iMbConcealedNum = pDecContext->iMbEcedNum + pDecContext->iMbEcedPropNum; in DecodeFrame2WithCtx()
857 pDecContext->pDecoderStatistics->uiAvgEcRatio = pDecContext->iMbNum == 0 ? in DecodeFrame2WithCtx()
858 …(pDecContext->pDecoderStatistics->uiAvgEcRatio * pDecContext->pDecoderStatistics->uiEcFrameNum) : … in DecodeFrame2WithCtx()
859 …pDecContext->pDecoderStatistics->uiAvgEcRatio * pDecContext->pDecoderStatistics->uiEcFrameNum) + (( in DecodeFrame2WithCtx()
860 iMbConcealedNum * 100) / pDecContext->iMbNum)); in DecodeFrame2WithCtx()
861 pDecContext->pDecoderStatistics->uiAvgEcPropRatio = pDecContext->iMbNum == 0 ? in DecodeFrame2WithCtx()
862 …(pDecContext->pDecoderStatistics->uiAvgEcPropRatio * pDecContext->pDecoderStatistics->uiEcFrameNum… in DecodeFrame2WithCtx()
863 …pDecContext->pDecoderStatistics->uiAvgEcPropRatio * pDecContext->pDecoderStatistics->uiEcFrameNum)… in DecodeFrame2WithCtx()
864 pDecContext->iMbEcedPropNum * 100) / pDecContext->iMbNum)); in DecodeFrame2WithCtx()
865 pDecContext->pDecoderStatistics->uiEcFrameNum += (iMbConcealedNum == 0 ? 0 : 1); in DecodeFrame2WithCtx()
866 …pDecContext->pDecoderStatistics->uiAvgEcRatio = pDecContext->pDecoderStatistics->uiEcFrameNum == 0… in DecodeFrame2WithCtx()
867 … pDecContext->pDecoderStatistics->uiAvgEcRatio / pDecContext->pDecoderStatistics->uiEcFrameNum; in DecodeFrame2WithCtx()
868 …pDecContext->pDecoderStatistics->uiAvgEcPropRatio = pDecContext->pDecoderStatistics->uiEcFrameNum … in DecodeFrame2WithCtx()
869 … pDecContext->pDecoderStatistics->uiAvgEcPropRatio / pDecContext->pDecoderStatistics->uiEcFrameNum; in DecodeFrame2WithCtx()
872 pDecContext->dDecTime += (iEnd - iStart) / 1e3; in DecodeFrame2WithCtx()
874 OutputStatisticsLog (*pDecContext->pDecoderStatistics); in DecodeFrame2WithCtx()
875 if (GetThreadCount (pDecContext) >= 1) { in DecodeFrame2WithCtx()
878 BufferingReadyPicture (pDecContext, ppDst, pDstInfo); in DecodeFrame2WithCtx()
881 ReorderPicturesInDisplay (pDecContext, ppDst, pDstInfo); in DecodeFrame2WithCtx()
884 return (DECODING_STATE)pDecContext->iErrorCode; in DecodeFrame2WithCtx()
890 pDecContext->pDecoderStatistics->uiDecodedFrameCount++; in DecodeFrame2WithCtx()
891 if (pDecContext->pDecoderStatistics->uiDecodedFrameCount == 0) { //exceed max value of uint32_t in DecodeFrame2WithCtx()
892 ResetDecStatNums (pDecContext->pDecoderStatistics); in DecodeFrame2WithCtx()
893 pDecContext->pDecoderStatistics->uiDecodedFrameCount++; in DecodeFrame2WithCtx()
896 OutputStatisticsLog (*pDecContext->pDecoderStatistics); in DecodeFrame2WithCtx()
899 pDecContext->dDecTime += (iEnd - iStart) / 1e3; in DecodeFrame2WithCtx()
901 if (GetThreadCount (pDecContext) >= 1) { in DecodeFrame2WithCtx()
904 BufferingReadyPicture (pDecContext, ppDst, pDstInfo); in DecodeFrame2WithCtx()
907 ReorderPicturesInDisplay (pDecContext, ppDst, pDstInfo); in DecodeFrame2WithCtx()
916 PWelsDecoderContext pDecContext = m_pDecThrCtx[0].pCtx; in DecodeFrame2() local
917 return DecodeFrame2WithCtx (pDecContext, kpSrc, kiSrcLen, ppDst, pDstInfo); in DecodeFrame2()
1194 DECODING_STATE CWelsDecoder::ReorderPicturesInDisplay(PWelsDecoderContext pDecContext, unsigned cha… in ReorderPicturesInDisplay() argument
1197 if (pDecContext->pSps != NULL) { in ReorderPicturesInDisplay()
1198 m_bIsBaseline = pDecContext->pSps->uiProfileIdc == 66 || pDecContext->pSps->uiProfileIdc == 83; in ReorderPicturesInDisplay()
1201 BufferingReadyPicture(pDecContext, ppDst, pDstInfo); in ReorderPicturesInDisplay()
1203 ReleaseBufferedReadyPictureNoReorder (pDecContext, ppDst, pDstInfo); in ReorderPicturesInDisplay()
1206 ReleaseBufferedReadyPictureReorder (pDecContext, ppDst, pDstInfo); in ReorderPicturesInDisplay()
1215 PWelsDecoderContext pDecContext = m_pDecThrCtx[0].pCtx; in DecodeParser() local
1217 if (pDecContext == NULL || pDecContext->pParam == NULL) { in DecodeParser()
1224 if (!pDecContext->pParam->bParseOnly) { in DecodeParser()
1226 pDecContext->iErrorCode |= dsInvalidArgument; in DecodeParser()
1230 if (CheckBsBuffer (pDecContext, kiSrcLen)) { in DecodeParser()
1231 if (ResetDecoder (pDecContext)) in DecodeParser()
1243 pDecContext->bEndOfStreamFlag = false; in DecodeParser()
1247 pDecContext->bEndOfStreamFlag = true; in DecodeParser()
1248 pDecContext->bInstantDecFlag = true; in DecodeParser()
1251 pDecContext->iErrorCode = dsErrorFree; //initialize at the starting of AU decoding. in DecodeParser()
1252 pDecContext->pParam->eEcActiveIdc = ERROR_CON_DISABLE; //add protection to disable EC here. in DecodeParser()
1253 pDecContext->iFeedbackNalRefIdc = -1; //initialize in DecodeParser()
1254 if (!pDecContext->bFramePending) { //frame complete in DecodeParser()
1255 pDecContext->pParserBsInfo->iNalNum = 0; in DecodeParser()
1256 memset (pDecContext->pParserBsInfo->pNalLenInByte, 0, MAX_NAL_UNITS_IN_LAYER); in DecodeParser()
1261 pDecContext->uiTimeStamp = pDstInfo->uiInBsTimeStamp; in DecodeParser()
1264 pDecContext->uiTimeStamp = 0; in DecodeParser()
1266 WelsDecodeBs (pDecContext, kpSrc, kiSrcLen, NULL, NULL, pDstInfo); in DecodeParser()
1267 if (pDecContext->iErrorCode & dsOutOfMemory) { in DecodeParser()
1268 if (ResetDecoder (pDecContext)) in DecodeParser()
1273 if (!pDecContext->bFramePending && pDecContext->pParserBsInfo->iNalNum) { in DecodeParser()
1274 memcpy (pDstInfo, pDecContext->pParserBsInfo, sizeof (SParserBsInfo)); in DecodeParser()
1276 if (pDecContext->iErrorCode == ERR_NONE) { //update statistics: decoding frame count in DecodeParser()
1277 pDecContext->pDecoderStatistics->uiDecodedFrameCount++; in DecodeParser()
1278 … if (pDecContext->pDecoderStatistics->uiDecodedFrameCount == 0) { //exceed max value of uint32_t in DecodeParser()
1279 ResetDecStatNums (pDecContext->pDecoderStatistics); in DecodeParser()
1280 pDecContext->pDecoderStatistics->uiDecodedFrameCount++; in DecodeParser()
1285 pDecContext->bInstantDecFlag = false; //reset no-delay flag in DecodeParser()
1287 if (pDecContext->iErrorCode && pDecContext->bPrintFrameErrorTraceFlag) { in DecodeParser()
1288 …WelsTrace->m_sLogCtx, WELS_LOG_INFO, "decode failed, failure type:%d \n", pDecContext->iErrorCode); in DecodeParser()
1289 pDecContext->bPrintFrameErrorTraceFlag = false; in DecodeParser()
1292 pDecContext->dDecTime += (iEnd - iStart) / 1e3; in DecodeParser()
1293 return (DECODING_STATE)pDecContext->iErrorCode; in DecodeParser()