MCPcopy Create free account
hub / github.com/cisco/openh264 / WelsMbInterPrediction

Function WelsMbInterPrediction

codec/decoder/core/src/decode_slice.cpp:304–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304int32_t WelsMbInterPrediction (PWelsDecoderContext pCtx, PDqLayer pCurDqLayer) {
305 int32_t iMbX = pCurDqLayer->iMbX;
306 int32_t iMbY = pCurDqLayer->iMbY;
307 uint8_t* pDstY, *pDstCb, *pDstCr;
308
309 int32_t iLumaStride = pCtx->pDec->iLinesize[0];
310 int32_t iChromaStride = pCtx->pDec->iLinesize[1];
311
312 pDstY = pCurDqLayer->pDec->pData[0] + ((iMbY * iLumaStride + iMbX) << 4);
313 pDstCb = pCurDqLayer->pDec->pData[1] + ((iMbY * iChromaStride + iMbX) << 3);
314 pDstCr = pCurDqLayer->pDec->pData[2] + ((iMbY * iChromaStride + iMbX) << 3);
315
316 if (pCtx->eSliceType == P_SLICE) {
317 WELS_B_MB_REC_VERIFY (GetInterPred (pDstY, pDstCb, pDstCr, pCtx));
318 } else {
319 if (pCtx->pTempDec == NULL)
320 pCtx->pTempDec = AllocPicture (pCtx, pCtx->pSps->iMbWidth << 4, pCtx->pSps->iMbHeight << 4);
321 uint8_t* pTempDstYCbCr[3];
322 uint8_t* pDstYCbCr[3];
323 pTempDstYCbCr[0] = pCtx->pTempDec->pData[0] + ((iMbY * iLumaStride + iMbX) << 4);
324 pTempDstYCbCr[1] = pCtx->pTempDec->pData[1] + ((iMbY * iChromaStride + iMbX) << 3);
325 pTempDstYCbCr[2] = pCtx->pTempDec->pData[2] + ((iMbY * iChromaStride + iMbX) << 3);
326 pDstYCbCr[0] = pDstY;
327 pDstYCbCr[1] = pDstCb;
328 pDstYCbCr[2] = pDstCr;
329 WELS_B_MB_REC_VERIFY (GetInterBPred (pDstYCbCr, pTempDstYCbCr, pCtx));
330 }
331 return ERR_NONE;
332}
333
334int32_t WelsTargetMbConstruction (PWelsDecoderContext pCtx) {
335 PDqLayer pCurDqLayer = pCtx->pCurDqLayer;

Callers 1

WelsTargetMbConstructionFunction · 0.85

Calls 3

GetInterPredFunction · 0.85
GetInterBPredFunction · 0.85
AllocPictureFunction · 0.70

Tested by

no test coverage detected