| 175 | } |
| 176 | |
| 177 | int32_t WelsMbInterSampleConstruction (PWelsDecoderContext pCtx, PDqLayer pCurDqLayer, |
| 178 | uint8_t* pDstY, uint8_t* pDstU, uint8_t* pDstV, int32_t iStrideL, int32_t iStrideC) { |
| 179 | int32_t iMbXy = pCurDqLayer->iMbXyIndex; |
| 180 | int32_t i, iIndex, iOffset; |
| 181 | |
| 182 | if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) { |
| 183 | for (i = 0; i < 4; i++) { |
| 184 | iIndex = g_kuiMbCountScan4Idx[i << 2]; |
| 185 | if (pCurDqLayer->pNzc[iMbXy][iIndex] || pCurDqLayer->pNzc[iMbXy][iIndex + 1] || pCurDqLayer->pNzc[iMbXy][iIndex + 4] |
| 186 | || pCurDqLayer->pNzc[iMbXy][iIndex + 5]) { |
| 187 | iOffset = ((iIndex >> 2) << 2) * iStrideL + ((iIndex % 4) << 2); |
| 188 | pCtx->pIdctResAddPredFunc8x8 (pDstY + iOffset, iStrideL, pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 6)); |
| 189 | } |
| 190 | } |
| 191 | } else { |
| 192 | // luma. |
| 193 | const int8_t* pNzc = pCurDqLayer->pNzc[iMbXy]; |
| 194 | int16_t* pScaledTCoeff = pCurDqLayer->pScaledTCoeff[iMbXy]; |
| 195 | pCtx->pIdctFourResAddPredFunc (pDstY + 0 * iStrideL + 0, iStrideL, pScaledTCoeff + 0 * 64, pNzc + 0); |
| 196 | pCtx->pIdctFourResAddPredFunc (pDstY + 0 * iStrideL + 8, iStrideL, pScaledTCoeff + 1 * 64, pNzc + 2); |
| 197 | pCtx->pIdctFourResAddPredFunc (pDstY + 8 * iStrideL + 0, iStrideL, pScaledTCoeff + 2 * 64, pNzc + 8); |
| 198 | pCtx->pIdctFourResAddPredFunc (pDstY + 8 * iStrideL + 8, iStrideL, pScaledTCoeff + 3 * 64, pNzc + 10); |
| 199 | } |
| 200 | |
| 201 | const int8_t* pNzc = pCurDqLayer->pNzc[iMbXy]; |
| 202 | int16_t* pScaledTCoeff = pCurDqLayer->pScaledTCoeff[iMbXy]; |
| 203 | // Cb. |
| 204 | pCtx->pIdctFourResAddPredFunc (pDstU, iStrideC, pScaledTCoeff + 4 * 64, pNzc + 16); |
| 205 | // Cr. |
| 206 | pCtx->pIdctFourResAddPredFunc (pDstV, iStrideC, pScaledTCoeff + 5 * 64, pNzc + 18); |
| 207 | |
| 208 | return ERR_NONE; |
| 209 | } |
| 210 | int32_t WelsMbInterConstruction (PWelsDecoderContext pCtx, PDqLayer pCurDqLayer) { |
| 211 | int32_t iMbX = pCurDqLayer->iMbX; |
| 212 | int32_t iMbY = pCurDqLayer->iMbY; |
no outgoing calls
no test coverage detected