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 | int32_t iMbXy = pCurLayer->iMbXyIndex; | 155 | int32_t iMbXy = pCurLayer->iMbXyIndex; |
| 156 | int32_t i, iIndex, iOffset; | 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 | if (pCurLayer->pTransformSize8x8Flag[iMbXy]) { | 158 | if (pCurLayer->pTransformSize8x8Flag[iMbXy]) { |
| 162 | for (i = 0; i < 4; i++) { | 159 | for (i = 0; i < 4; i++) { |
| 163 | iIndex = g_kuiMbCountScan4Idx[i << 2]; | 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 | void WelsLumaDcDequantIdct (int16_t* pBlock, int32_t iQp, PWelsDecoderContext pCtx) { | 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 | #define STRIDE 16 | 208 | #define STRIDE 16 |
| 212 | int32_t i; | 209 | int32_t i; |
| 213 | int32_t iTemp[16]; //FIXME check if this is a good idea | 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 | const int32_t kiZ2 = iTemp[kiI4] - iTemp[8 + kiI4]; | 237 | const int32_t kiZ2 = iTemp[kiI4] - iTemp[8 + kiI4]; |
| 241 | const int32_t kiZ3 = iTemp[kiI4] + iTemp[8 + kiI4]; | 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 | 240 | pBlk[kiOffset] = ((kiZ0 + kiZ3) * kiQMul + (1 << 5)) >> 6; //FIXME think about merging this into decode_resdual |
| 244 | pBlk[kiYOffset[1] + kiOffset] = ((kiZ1 + kiZ2) * kiQMul + 2) >> 2; | 241 | pBlk[kiYOffset[1] + kiOffset] = ((kiZ1 + kiZ2) * kiQMul + (1 << 5)) >> 6; |
| 245 | pBlk[kiYOffset[2] + kiOffset] = ((kiZ1 - kiZ2) * kiQMul + 2) >> 2; | 242 | pBlk[kiYOffset[2] + kiOffset] = ((kiZ1 - kiZ2) * kiQMul + (1 << 5)) >> 6; |
| 246 | pBlk[kiYOffset[3] + kiOffset] = ((kiZ0 - kiZ3) * kiQMul + 2) >> 2; | 243 | pBlk[kiYOffset[3] + kiOffset] = ((kiZ0 - kiZ3) * kiQMul + (1 << 5)) >> 6; |
| 247 | } | 244 | } |
| 248 | #undef STRIDE | 245 | #undef STRIDE |
| 249 | } | 246 | } |
| @@ -255,19 +252,12 @@ int32_t WelsMbIntraPredictionConstruction (PWelsDecoderContext pCtx, PDqLayer pC · 5 unmodified lines | |||
| 255 | WelsFillRecNeededMbInfo (pCtx, bOutput, pCurLayer); | 252 | WelsFillRecNeededMbInfo (pCtx, bOutput, pCurLayer); |
| 256 | 253 | ||
| 257 | if (IS_INTRA16x16 (pCurLayer->pMbType[iMbXy])) { | 254 | if (IS_INTRA16x16 (pCurLayer->pMbType[iMbXy])) { |
| 258 | WelsLumaDcDequantIdct (pCurLayer->pScaledTCoeff[iMbXy], pCurLayer->pLumaQp[iMbXy], pCtx); | ||
| 259 | RecI16x16Mb (iMbXy, pCtx, pCurLayer->pScaledTCoeff[iMbXy], pCurLayer); | 255 | RecI16x16Mb (iMbXy, pCtx, pCurLayer->pScaledTCoeff[iMbXy], pCurLayer); |
| 260 | 256 | } else if (IS_INTRA8x8 (pCurLayer->pMbType[iMbXy])) { | |
| 261 | return ERR_NONE; | ||
| 262 | } | ||
| 263 | |||
| 264 | if (IS_INTRA8x8 (pCurLayer->pMbType[iMbXy])) { | ||
| 265 | RecI8x8Mb (iMbXy, pCtx, pCurLayer->pScaledTCoeff[iMbXy], pCurLayer); | 257 | RecI8x8Mb (iMbXy, pCtx, pCurLayer->pScaledTCoeff[iMbXy], pCurLayer); |
| 266 | } | 258 | } else if (IS_INTRA4x4 (pCurLayer->pMbType[iMbXy])) { |
| 267 | |||
| 268 | if (IS_INTRA4x4 (pCurLayer->pMbType[iMbXy])) | ||
| 269 | RecI4x4Mb (iMbXy, pCtx, pCurLayer->pScaledTCoeff[iMbXy], pCurLayer); | 259 | RecI4x4Mb (iMbXy, pCtx, pCurLayer->pScaledTCoeff[iMbXy], pCurLayer); |
| 270 | 260 | } | |
| 271 | return ERR_NONE; | 261 | return ERR_NONE; |
| 272 | } | 262 | } |
| 273 | 263 | ||
| @@ -327,10 +317,10 @@ void WelsChromaDcIdct (int16_t* pBlock) { · 53 unmodified lines | |||
| 327 | iB = iC - iD; | 317 | iB = iC - iD; |
| 328 | iC += iD; | 318 | iC += iD; |
| 329 | 319 | ||
| 330 | pBlk[0] = (iA + iC) >> 1; | 320 | pBlk[0] = (iA + iC); |
| 331 | pBlk[iXStride] = (iE + iB) >> 1; | 321 | pBlk[iXStride] = (iE + iB); |
| 332 | pBlk[iStride] = (iA - iC) >> 1; | 322 | pBlk[iStride] = (iA - iC); |
| 333 | pBlk[iStride1] = (iE - iB) >> 1; | 323 | pBlk[iStride1] = (iE - iB); |
| 334 | } | 324 | } |
| 335 | 325 | ||
| 336 | void WelsMapNxNNeighToSampleNormal (PWelsNeighAvail pNeighAvail, int32_t* pSampleAvail) { | 326 | void WelsMapNxNNeighToSampleNormal (PWelsNeighAvail pNeighAvail, int32_t* pSampleAvail) { |