Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 4 files). Show all
Unified · Split
| @@ -155,9 +155,6 @@ int32_t WelsMbInterSampleConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLa · 154 unmodified lines | ||
| 155 | 155 | int32_t iMbXy = pCurLayer->iMbXyIndex; |
| 156 | 156 | int32_t i, iIndex, iOffset; |
| 157 | 157 | |
| 158 | − WelsChromaDcIdct (pCurLayer->pScaledTCoeff[iMbXy] + 256); // 256 = 16*16 | |
| 159 | − WelsChromaDcIdct (pCurLayer->pScaledTCoeff[iMbXy] + 320); // 320 = 16*16 + 16*4 | |
| 160 | − | |
| 161 | 158 | if (pCurLayer->pTransformSize8x8Flag[iMbXy]) { |
| 162 | 159 | for (i = 0; i < 4; i++) { |
| 163 | 160 | iIndex = g_kuiMbCountScan4Idx[i << 2]; |
| @@ -207,7 +204,7 @@ int32_t WelsMbInterConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLayer) { · 43 unmodified lines | ||
| 207 | 204 | } |
| 208 | 205 | |
| 209 | 206 | void WelsLumaDcDequantIdct (int16_t* pBlock, int32_t iQp, PWelsDecoderContext pCtx) { |
| 210 | − const int32_t kiQMul = pCtx->bUseScalingList ? pCtx->pDequant_coeff4x4[0][iQp][0] >> 4 : g_kuiDequantCoeff[iQp][0]; | |
| 207 | + const int32_t kiQMul = pCtx->bUseScalingList ? pCtx->pDequant_coeff4x4[0][iQp][0] : (g_kuiDequantCoeff[iQp][0] << 4); | |
| 211 | 208 | #define STRIDE 16 |
| 212 | 209 | int32_t i; |
| 213 | 210 | int32_t iTemp[16]; //FIXME check if this is a good idea |
| @@ -240,10 +237,10 @@ void WelsLumaDcDequantIdct (int16_t* pBlock, int32_t iQp, PWelsDecoderContext pC · 26 unmodified lines | ||
| 240 | 237 | const int32_t kiZ2 = iTemp[kiI4] - iTemp[8 + kiI4]; |
| 241 | 238 | const int32_t kiZ3 = iTemp[kiI4] + iTemp[8 + kiI4]; |
| 242 | 239 | |
| 243 | − pBlk[kiOffset] = ((kiZ0 + kiZ3) * kiQMul + 2) >> 2; //FIXME think about merging this into decode_resdual | |
| 244 | − pBlk[kiYOffset[1] + kiOffset] = ((kiZ1 + kiZ2) * kiQMul + 2) >> 2; | |
| 245 | − pBlk[kiYOffset[2] + kiOffset] = ((kiZ1 - kiZ2) * kiQMul + 2) >> 2; | |
| 246 | − pBlk[kiYOffset[3] + kiOffset] = ((kiZ0 - kiZ3) * kiQMul + 2) >> 2; | |
| 240 | + pBlk[kiOffset] = ((kiZ0 + kiZ3) * kiQMul + (1 << 5)) >> 6; //FIXME think about merging this into decode_resdual | |
| 241 | + pBlk[kiYOffset[1] + kiOffset] = ((kiZ1 + kiZ2) * kiQMul + (1 << 5)) >> 6; | |
| 242 | + pBlk[kiYOffset[2] + kiOffset] = ((kiZ1 - kiZ2) * kiQMul + (1 << 5)) >> 6; | |
| 243 | + pBlk[kiYOffset[3] + kiOffset] = ((kiZ0 - kiZ3) * kiQMul + (1 << 5)) >> 6; | |
| 247 | 244 | } |
| 248 | 245 | #undef STRIDE |
| 249 | 246 | } |
| @@ -255,19 +252,12 @@ int32_t WelsMbIntraPredictionConstruction (PWelsDecoderContext pCtx, PDqLayer pC · 5 unmodified lines | ||
| 255 | 252 | WelsFillRecNeededMbInfo (pCtx, bOutput, pCurLayer); |
| 256 | 253 | |
| 257 | 254 | if (IS_INTRA16x16 (pCurLayer->pMbType[iMbXy])) { |
| 258 | − WelsLumaDcDequantIdct (pCurLayer->pScaledTCoeff[iMbXy], pCurLayer->pLumaQp[iMbXy], pCtx); | |
| 259 | 255 | RecI16x16Mb (iMbXy, pCtx, pCurLayer->pScaledTCoeff[iMbXy], pCurLayer); |
| 260 | − | |
| 261 | − return ERR_NONE; | |
| 262 | − } | |
| 263 | − | |
| 264 | − if (IS_INTRA8x8 (pCurLayer->pMbType[iMbXy])) { | |
| 256 | + } else if (IS_INTRA8x8 (pCurLayer->pMbType[iMbXy])) { | |
| 265 | 257 | RecI8x8Mb (iMbXy, pCtx, pCurLayer->pScaledTCoeff[iMbXy], pCurLayer); |
| 266 | − } | |
| 267 | − | |
| 268 | − if (IS_INTRA4x4 (pCurLayer->pMbType[iMbXy])) | |
| 258 | + } else if (IS_INTRA4x4 (pCurLayer->pMbType[iMbXy])) { | |
| 269 | 259 | RecI4x4Mb (iMbXy, pCtx, pCurLayer->pScaledTCoeff[iMbXy], pCurLayer); |
| 270 | − | |
| 260 | + } | |
| 271 | 261 | return ERR_NONE; |
| 272 | 262 | } |
| 273 | 263 | |
| @@ -327,10 +317,10 @@ void WelsChromaDcIdct (int16_t* pBlock) { · 53 unmodified lines | ||
| 327 | 317 | iB = iC - iD; |
| 328 | 318 | iC += iD; |
| 329 | 319 | |
| 330 | − pBlk[0] = (iA + iC) >> 1; | |
| 331 | − pBlk[iXStride] = (iE + iB) >> 1; | |
| 332 | − pBlk[iStride] = (iA - iC) >> 1; | |
| 333 | − pBlk[iStride1] = (iE - iB) >> 1; | |
| 320 | + pBlk[0] = (iA + iC); | |
| 321 | + pBlk[iXStride] = (iE + iB); | |
| 322 | + pBlk[iStride] = (iA - iC); | |
| 323 | + pBlk[iStride1] = (iE - iB); | |
| 334 | 324 | } |
| 335 | 325 | |
| 336 | 326 | void WelsMapNxNNeighToSampleNormal (PWelsNeighAvail pNeighAvail, int32_t* pSampleAvail) { |