Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 5 files). Show all
Unified · Split
| @@ -285,31 +285,7 @@ void WelsMbCopy (uint8_t* pDst, int32_t iStrideDst, uint8_t* pSrc, int32_t iStri · 284 unmodified lines | |||
| 285 | int32_t WelsTargetMbConstruction (PWelsDecoderContext pCtx) { | 285 | int32_t WelsTargetMbConstruction (PWelsDecoderContext pCtx) { |
| 286 | PDqLayer pCurLayer = pCtx->pCurDqLayer; | 286 | PDqLayer pCurLayer = pCtx->pCurDqLayer; |
| 287 | if (MB_TYPE_INTRA_PCM == pCurLayer->pMbType[pCurLayer->iMbXyIndex]) { | 287 | if (MB_TYPE_INTRA_PCM == pCurLayer->pMbType[pCurLayer->iMbXyIndex]) { |
| 288 | //copy cs into fdec | 288 | //already decoded and reconstructed when parsing |
| 289 | int32_t iCsStrideL = pCurLayer->iCsStride[0]; | ||
| 290 | int32_t iCsStrideC = pCurLayer->iCsStride[1]; | ||
| 291 | |||
| 292 | int32_t iDecStrideL = pCurLayer->pDec->iLinesize[0]; | ||
| 293 | int32_t iDecStrideC = pCurLayer->pDec->iLinesize[1]; | ||
| 294 | |||
| 295 | int32_t iCsOffsetL = (pCurLayer->iMbX + pCurLayer->iMbY * iCsStrideL) << 4; | ||
| 296 | int32_t iCsOffsetC = (pCurLayer->iMbX + pCurLayer->iMbY * iCsStrideC) << 3; | ||
| 297 | |||
| 298 | int32_t iDecOffsetL = (pCurLayer->iMbX + pCurLayer->iMbY * iDecStrideL) << 4; | ||
| 299 | int32_t iDecOffsetC = (pCurLayer->iMbX + pCurLayer->iMbY * iDecStrideC) << 3; | ||
| 300 | |||
| 301 | uint8_t* pSrcY = pCurLayer->pCsData[0] + iCsOffsetL; | ||
| 302 | uint8_t* pSrcU = pCurLayer->pCsData[1] + iCsOffsetC; | ||
| 303 | uint8_t* pSrcV = pCurLayer->pCsData[2] + iCsOffsetC; | ||
| 304 | |||
| 305 | uint8_t* pDecY = pCurLayer->pDec->pData[0] + iDecOffsetL; | ||
| 306 | uint8_t* pDecU = pCurLayer->pDec->pData[1] + iDecOffsetC; | ||
| 307 | uint8_t* pDecV = pCurLayer->pDec->pData[2] + iDecOffsetC; | ||
| 308 | |||
| 309 | WelsMbCopy (pDecY, iDecStrideL, pSrcY, iCsStrideL, 16, 16); | ||
| 310 | WelsMbCopy (pDecU, iDecStrideC, pSrcU, iCsStrideC, 8, 8); | ||
| 311 | WelsMbCopy (pDecV, iDecStrideC, pSrcV, iCsStrideC, 8, 8); | ||
| 312 | |||
| 313 | return 0; | 289 | return 0; |
| 314 | } else if (IS_INTRA (pCurLayer->pMbType[pCurLayer->iMbXyIndex])) { | 290 | } else if (IS_INTRA (pCurLayer->pMbType[pCurLayer->iMbXyIndex])) { |
| 315 | WelsMbIntraPredictionConstruction (pCtx, pCurLayer, 1); | 291 | WelsMbIntraPredictionConstruction (pCtx, pCurLayer, 1); |
| @@ -512,9 +488,9 @@ int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) { · 196 unmodified lines | |||
| 512 | int32_t iOffsetL = (iMbX + iMbY * iDecStrideL) << 4; | 488 | int32_t iOffsetL = (iMbX + iMbY * iDecStrideL) << 4; |
| 513 | int32_t iOffsetC = (iMbX + iMbY * iDecStrideC) << 3; | 489 | int32_t iOffsetC = (iMbX + iMbY * iDecStrideC) << 3; |
| 514 | 490 | ||
| 515 | uint8_t* pDecY = pCurLayer->pCsData[0] + iOffsetL; | 491 | uint8_t* pDecY = pCurLayer->pDec->pData[0] + iOffsetL; |
| 516 | uint8_t* pDecU = pCurLayer->pCsData[1] + iOffsetC; | 492 | uint8_t* pDecU = pCurLayer->pDec->pData[1] + iOffsetC; |
| 517 | uint8_t* pDecV = pCurLayer->pCsData[2] + iOffsetC; | 493 | uint8_t* pDecV = pCurLayer->pDec->pData[2] + iOffsetC; |
| 518 | 494 | ||
| 519 | uint8_t* pTmpBsBuf; | 495 | uint8_t* pTmpBsBuf; |
| 520 | 496 | ||
| @@ -821,9 +797,9 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { · 300 unmodified lines | |||
| 821 | int32_t iOffsetL = (iMbX + iMbY * iDecStrideL) << 4; | 797 | int32_t iOffsetL = (iMbX + iMbY * iDecStrideL) << 4; |
| 822 | int32_t iOffsetC = (iMbX + iMbY * iDecStrideC) << 3; | 798 | int32_t iOffsetC = (iMbX + iMbY * iDecStrideC) << 3; |
| 823 | 799 | ||
| 824 | uint8_t* pDecY = pCurLayer->pCsData[0] + iOffsetL; | 800 | uint8_t* pDecY = pCurLayer->pDec->pData[0] + iOffsetL; |
| 825 | uint8_t* pDecU = pCurLayer->pCsData[1] + iOffsetC; | 801 | uint8_t* pDecU = pCurLayer->pDec->pData[1] + iOffsetC; |
| 826 | uint8_t* pDecV = pCurLayer->pCsData[2] + iOffsetC; | 802 | uint8_t* pDecV = pCurLayer->pDec->pData[2] + iOffsetC; |
| 827 | 803 | ||
| 828 | uint8_t* pTmpBsBuf; | 804 | uint8_t* pTmpBsBuf; |
| 829 | 805 | ||