Showing the changes to codec/decoder/core/src/rec_mb.cpp (1 of 25 files). Show all
Unified · Split
| @@ -61,12 +61,66 @@ void WelsFillRecNeededMbInfo (PWelsDecoderContext pCtx, bool bOutput, PDqLayer p · 60 unmodified lines | ||
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | +int32_t RecI8x8Mb (int32_t iMbXy, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) { | |
| 65 | + RecI8x8Luma (iMbXy, pCtx, pScoeffLevel, pDqLayer); | |
| 66 | + RecI4x4Chroma (iMbXy, pCtx, pScoeffLevel, pDqLayer); | |
| 67 | + return ERR_NONE; | |
| 68 | +} | |
| 69 | + | |
| 70 | +int32_t RecI8x8Luma (int32_t iMbXy, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) { | |
| 71 | + /*****get local variable from outer variable********/ | |
| 72 | + /*prediction info*/ | |
| 73 | + uint8_t* pPred = pDqLayer->pPred[0]; | |
| 74 | + | |
| 75 | + int32_t iLumaStride = pDqLayer->iLumaStride; | |
| 76 | + int32_t* pBlockOffset = pCtx->iDecBlockOffsetArray; | |
| 77 | + PGetIntraPred8x8Func* pGetI8x8LumaPredFunc = pCtx->pGetI8x8LumaPredFunc; | |
| 78 | + | |
| 79 | + int8_t* pIntra8x8PredMode = pDqLayer->pIntra4x4FinalMode[iMbXy]; // I_NxN | |
| 80 | + int16_t* pRS = pScoeffLevel; | |
| 81 | + /*itransform info*/ | |
| 82 | + PIdctResAddPredFunc pIdctResAddPredFunc = pCtx->pIdctResAddPredFunc8x8; | |
| 83 | + | |
| 84 | + /*************local variable********************/ | |
| 85 | + uint8_t i = 0; | |
| 86 | + bool bTLAvail[4], bTRAvail[4]; | |
| 87 | + // Top-Right : Left : Top-Left : Top | |
| 88 | + bTLAvail[0] = !! (pDqLayer->pIntraNxNAvailFlag[iMbXy] & 0x02); | |
| 89 | + bTLAvail[1] = !! (pDqLayer->pIntraNxNAvailFlag[iMbXy] & 0x01); | |
| 90 | + bTLAvail[2] = !! (pDqLayer->pIntraNxNAvailFlag[iMbXy] & 0x04); | |
| 91 | + bTLAvail[3] = true; | |
| 92 | + | |
| 93 | + bTRAvail[0] = !! (pDqLayer->pIntraNxNAvailFlag[iMbXy] & 0x01); | |
| 94 | + bTRAvail[1] = !! (pDqLayer->pIntraNxNAvailFlag[iMbXy] & 0x08); | |
| 95 | + bTRAvail[2] = true; | |
| 96 | + bTRAvail[3] = false; | |
| 97 | + | |
| 98 | + /*************real process*********************/ | |
| 99 | + for (i = 0; i < 4; i++) { | |
| 100 | + | |
| 101 | + uint8_t* pPredI8x8 = pPred + pBlockOffset[i << 2]; | |
| 102 | + uint8_t uiMode = pIntra8x8PredMode[g_kuiScan4[i << 2]]; | |
| 103 | + | |
| 104 | + pGetI8x8LumaPredFunc[uiMode] (pPredI8x8, iLumaStride, bTLAvail[i], bTRAvail[i]); | |
| 105 | + | |
| 106 | + int32_t iIndex = g_kuiMbCountScan4Idx[i << 2]; | |
| 107 | + if (pDqLayer->pNzc[iMbXy][iIndex] || pDqLayer->pNzc[iMbXy][iIndex + 1] || pDqLayer->pNzc[iMbXy][iIndex + 4] | |
| 108 | + || pDqLayer->pNzc[iMbXy][iIndex + 5]) { | |
| 109 | + int16_t* pRSI8x8 = &pRS[i << 6]; | |
| 110 | + pIdctResAddPredFunc (pPredI8x8, iLumaStride, pRSI8x8); | |
| 111 | + } | |
| 112 | + } | |
| 113 | + | |
| 114 | + return ERR_NONE; | |
| 115 | +} | |
| 116 | + | |
| 64 | 117 | int32_t RecI4x4Mb (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) { |
| 65 | 118 | RecI4x4Luma (iMBXY, pCtx, pScoeffLevel, pDqLayer); |
| 66 | 119 | RecI4x4Chroma (iMBXY, pCtx, pScoeffLevel, pDqLayer); |
| 67 | 120 | return ERR_NONE; |
| 68 | 121 | } |
| 69 | 122 | |
| 123 | + | |
| 70 | 124 | int32_t RecI4x4Luma (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) { |
| 71 | 125 | /*****get local variable from outer variable********/ |
| 72 | 126 | /*prediction info*/ |