Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1762,7 +1762,8 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI · 1761 unmodified lines | |||
| 1762 | iErr = DecodeCurrentAccessUnit (pCtx, ppDst, pDstInfo); | 1762 | iErr = DecodeCurrentAccessUnit (pCtx, ppDst, pDstInfo); |
| 1763 | 1763 | ||
| 1764 | if (pCtx->bParseOnly) { | 1764 | if (pCtx->bParseOnly) { |
| 1765 | if ((dsErrorFree == pCtx->iErrorCode) && ((uint32_t) pCtx->iTotalNumMbRec == pCtx->pSps->iMbHeight * pCtx->pSps->iMbWidth)) { | 1765 | if ((dsErrorFree == pCtx->iErrorCode) |
| 1766 | && ((uint32_t) pCtx->iTotalNumMbRec == pCtx->pSps->iMbHeight * pCtx->pSps->iMbWidth)) { | ||
| 1766 | SParserBsInfo* pParser = pCtx->pParserBsInfo; | 1767 | SParserBsInfo* pParser = pCtx->pParserBsInfo; |
| 1767 | uint8_t* pDstBuf = pParser->pDstBuff; | 1768 | uint8_t* pDstBuf = pParser->pDstBuff; |
| 1768 | SNalUnit* pCurNal = NULL; | 1769 | SNalUnit* pCurNal = NULL; |
| @@ -2128,6 +2129,10 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 359 unmodified lines | |||
| 2128 | pCtx->pDec->bIsComplete = bAllRefComplete; | 2129 | pCtx->pDec->bIsComplete = bAllRefComplete; |
| 2129 | if (!pCtx->pDec->bIsComplete) { // Ref pictures ECed, result in ECed | 2130 | if (!pCtx->pDec->bIsComplete) { // Ref pictures ECed, result in ECed |
| 2130 | pCtx->iErrorCode |= dsDataErrorConcealed; | 2131 | pCtx->iErrorCode |= dsDataErrorConcealed; |
| 2132 | } else if (pCtx->bParseOnly) { | ||
| 2133 | pCtx->pDec->bIsComplete = (pCtx->iTotalNumMbRec == pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight); | ||
| 2134 | if (!pCtx->pDec->bIsComplete) | ||
| 2135 | return -1; | ||
| 2131 | } | 2136 | } |
| 2132 | 2137 | ||
| 2133 | // A dq layer decoded here | 2138 | // A dq layer decoded here |
| @@ -2165,8 +2170,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 31 unmodified lines | |||
| 2165 | } | 2170 | } |
| 2166 | if (!pCtx->bParseOnly) | 2171 | if (!pCtx->bParseOnly) |
| 2167 | ExpandReferencingPicture (pCtx->pDec->pData, pCtx->pDec->iWidthInPixel, pCtx->pDec->iHeightInPixel, | 2172 | ExpandReferencingPicture (pCtx->pDec->pData, pCtx->pDec->iWidthInPixel, pCtx->pDec->iHeightInPixel, |
| 2168 | pCtx->pDec->iLinesize, | 2173 | pCtx->pDec->iLinesize, |
| 2169 | pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture); | 2174 | pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture); |
| 2170 | } | 2175 | } |
| 2171 | pCtx->pDec = NULL; //after frame decoding, always set to NULL | 2176 | pCtx->pDec = NULL; //after frame decoding, always set to NULL |
| 2172 | } | 2177 | } |