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

Function WelsMbInterConstruction

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

Source from the content-addressed store, hash-verified

208 return ERR_NONE;
209}
210int32_t WelsMbInterConstruction (PWelsDecoderContext pCtx, PDqLayer pCurDqLayer) {
211 int32_t iMbX = pCurDqLayer->iMbX;
212 int32_t iMbY = pCurDqLayer->iMbY;
213 uint8_t* pDstY, *pDstCb, *pDstCr;
214
215 int32_t iLumaStride = pCtx->pDec->iLinesize[0];
216 int32_t iChromaStride = pCtx->pDec->iLinesize[1];
217
218 pDstY = pCurDqLayer->pDec->pData[0] + ((iMbY * iLumaStride + iMbX) << 4);
219 pDstCb = pCurDqLayer->pDec->pData[1] + ((iMbY * iChromaStride + iMbX) << 3);
220 pDstCr = pCurDqLayer->pDec->pData[2] + ((iMbY * iChromaStride + iMbX) << 3);
221
222 if (pCtx->eSliceType == P_SLICE) {
223 WELS_B_MB_REC_VERIFY (GetInterPred (pDstY, pDstCb, pDstCr, pCtx));
224 } else {
225 if (pCtx->pTempDec == NULL)
226 pCtx->pTempDec = AllocPicture (pCtx, pCtx->pSps->iMbWidth << 4, pCtx->pSps->iMbHeight << 4);
227 uint8_t* pTempDstYCbCr[3];
228 uint8_t* pDstYCbCr[3];
229 pTempDstYCbCr[0] = pCtx->pTempDec->pData[0] + ((iMbY * iLumaStride + iMbX) << 4);
230 pTempDstYCbCr[1] = pCtx->pTempDec->pData[1] + ((iMbY * iChromaStride + iMbX) << 3);
231 pTempDstYCbCr[2] = pCtx->pTempDec->pData[2] + ((iMbY * iChromaStride + iMbX) << 3);
232 pDstYCbCr[0] = pDstY;
233 pDstYCbCr[1] = pDstCb;
234 pDstYCbCr[2] = pDstCr;
235 WELS_B_MB_REC_VERIFY (GetInterBPred (pDstYCbCr, pTempDstYCbCr, pCtx));
236 }
237 WelsMbInterSampleConstruction (pCtx, pCurDqLayer, pDstY, pDstCb, pDstCr, iLumaStride, iChromaStride);
238
239 if (GetThreadCount (pCtx) <= 1) {
240 pCtx->sBlockFunc.pWelsSetNonZeroCountFunc (
241 pCurDqLayer->pNzc[pCurDqLayer->iMbXyIndex]); // set all none-zero nzc to 1; dbk can be opti!
242 }
243 return ERR_NONE;
244}
245
246void WelsLumaDcDequantIdct (int16_t* pBlock, int32_t iQp, PWelsDecoderContext pCtx) {
247 const int32_t kiQMul = pCtx->bUseScalingList ? pCtx->pDequant_coeff4x4[0][iQp][0] : (g_kuiDequantCoeff[iQp][0] << 4);

Callers 1

WelsTargetMbConstructionFunction · 0.85

Calls 5

GetInterPredFunction · 0.85
GetInterBPredFunction · 0.85
GetThreadCountFunction · 0.85
AllocPictureFunction · 0.70

Tested by

no test coverage detected