Showing the changes to codec/decoder/core/src/rec_mb.cpp (1 of 29 files). Show all
Unified · Split
| @@ -44,20 +44,20 @@ · 43 unmodified lines | ||
| 44 | 44 | |
| 45 | 45 | namespace WelsDec { |
| 46 | 46 | |
| 47 | −void WelsFillRecNeededMbInfo (PWelsDecoderContext pCtx, bool bOutput, PDqLayer pCurLayer) { | |
| 47 | +void WelsFillRecNeededMbInfo (PWelsDecoderContext pCtx, bool bOutput, PDqLayer pCurDqLayer) { | |
| 48 | 48 | PPicture pCurPic = pCtx->pDec; |
| 49 | 49 | int32_t iLumaStride = pCurPic->iLinesize[0]; |
| 50 | 50 | int32_t iChromaStride = pCurPic->iLinesize[1]; |
| 51 | − int32_t iMbX = pCurLayer->iMbX; | |
| 52 | − int32_t iMbY = pCurLayer->iMbY; | |
| 51 | + int32_t iMbX = pCurDqLayer->iMbX; | |
| 52 | + int32_t iMbY = pCurDqLayer->iMbY; | |
| 53 | 53 | |
| 54 | − pCurLayer->iLumaStride = iLumaStride; | |
| 55 | − pCurLayer->iChromaStride = iChromaStride; | |
| 54 | + pCurDqLayer->iLumaStride = iLumaStride; | |
| 55 | + pCurDqLayer->iChromaStride = iChromaStride; | |
| 56 | 56 | |
| 57 | 57 | if (bOutput) { |
| 58 | − pCurLayer->pPred[0] = pCurPic->pData[0] + ((iMbY * iLumaStride + iMbX) << 4); | |
| 59 | − pCurLayer->pPred[1] = pCurPic->pData[1] + ((iMbY * iChromaStride + iMbX) << 3); | |
| 60 | − pCurLayer->pPred[2] = pCurPic->pData[2] + ((iMbY * iChromaStride + iMbX) << 3); | |
| 58 | + pCurDqLayer->pPred[0] = pCurPic->pData[0] + ((iMbY * iLumaStride + iMbX) << 4); | |
| 59 | + pCurDqLayer->pPred[1] = pCurPic->pData[1] + ((iMbY * iChromaStride + iMbX) << 3); | |
| 60 | + pCurDqLayer->pPred[2] = pCurPic->pData[2] + ((iMbY * iChromaStride + iMbX) << 3); | |
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| @@ -446,7 +446,7 @@ int32_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWels · 382 unmodified lines | ||
| 446 | 446 | |
| 447 | 447 | int16_t iMVs[2] = {0}; |
| 448 | 448 | |
| 449 | − uint32_t iMBType = pCurDqLayer->pMbType[iMBXY]; | |
| 449 | + uint32_t iMBType = pCurDqLayer->pDec->pMbType[iMBXY]; | |
| 450 | 450 | |
| 451 | 451 | int32_t iMBOffsetX = pCurDqLayer->iMbX << 4; |
| 452 | 452 | int32_t iMBOffsetY = pCurDqLayer->iMbY << 4; |
| @@ -471,60 +471,60 @@ int32_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWels · 18 unmodified lines | ||
| 471 | 471 | switch (iMBType) { |
| 472 | 472 | case MB_TYPE_SKIP: |
| 473 | 473 | case MB_TYPE_16x16: |
| 474 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][0][0]; | |
| 475 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][0][1]; | |
| 476 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[0][iMBXY], 0, LIST_0)); | |
| 474 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][0][0]; | |
| 475 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][0][1]; | |
| 476 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[0][iMBXY], 0, LIST_0)); | |
| 477 | 477 | BaseMC (&pMCRefMem, iMBOffsetX, iMBOffsetY, pMCFunc, 16, 16, iMVs); |
| 478 | 478 | |
| 479 | 479 | if (pCurDqLayer->bUseWeightPredictionFlag) { |
| 480 | − iRefIndex = pCurDqLayer->pRefIndex[0][iMBXY][0]; | |
| 480 | + iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][0]; | |
| 481 | 481 | WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 16, 16); |
| 482 | 482 | } |
| 483 | 483 | break; |
| 484 | 484 | case MB_TYPE_16x8: |
| 485 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][0][0]; | |
| 486 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][0][1]; | |
| 487 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[0][iMBXY], 0, LIST_0)); | |
| 485 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][0][0]; | |
| 486 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][0][1]; | |
| 487 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[0][iMBXY], 0, LIST_0)); | |
| 488 | 488 | BaseMC (&pMCRefMem, iMBOffsetX, iMBOffsetY, pMCFunc, 16, 8, iMVs); |
| 489 | 489 | |
| 490 | 490 | if (pCurDqLayer->bUseWeightPredictionFlag) { |
| 491 | − iRefIndex = pCurDqLayer->pRefIndex[0][iMBXY][0]; | |
| 491 | + iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][0]; | |
| 492 | 492 | WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 16, 8); |
| 493 | 493 | } |
| 494 | 494 | |
| 495 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][8][0]; | |
| 496 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][8][1]; | |
| 497 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[0][iMBXY], 8, LIST_0)); | |
| 495 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][8][0]; | |
| 496 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][8][1]; | |
| 497 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[0][iMBXY], 8, LIST_0)); | |
| 498 | 498 | pMCRefMem.pDstY = pPredY + (iDstLineLuma << 3); |
| 499 | 499 | pMCRefMem.pDstU = pPredCb + (iDstLineChroma << 2); |
| 500 | 500 | pMCRefMem.pDstV = pPredCr + (iDstLineChroma << 2); |
| 501 | 501 | BaseMC (&pMCRefMem, iMBOffsetX, iMBOffsetY + 8, pMCFunc, 16, 8, iMVs); |
| 502 | 502 | |
| 503 | 503 | if (pCurDqLayer->bUseWeightPredictionFlag) { |
| 504 | − iRefIndex = pCurDqLayer->pRefIndex[0][iMBXY][8]; | |
| 504 | + iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][8]; | |
| 505 | 505 | WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 16, 8); |
| 506 | 506 | } |
| 507 | 507 | break; |
| 508 | 508 | case MB_TYPE_8x16: |
| 509 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][0][0]; | |
| 510 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][0][1]; | |
| 511 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[0][iMBXY], 0, LIST_0)); | |
| 509 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][0][0]; | |
| 510 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][0][1]; | |
| 511 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[0][iMBXY], 0, LIST_0)); | |
| 512 | 512 | BaseMC (&pMCRefMem, iMBOffsetX, iMBOffsetY, pMCFunc, 8, 16, iMVs); |
| 513 | 513 | if (pCurDqLayer->bUseWeightPredictionFlag) { |
| 514 | − iRefIndex = pCurDqLayer->pRefIndex[0][iMBXY][0]; | |
| 514 | + iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][0]; | |
| 515 | 515 | WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 8, 16); |
| 516 | 516 | } |
| 517 | 517 | |
| 518 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][2][0]; | |
| 519 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][2][1]; | |
| 520 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[0][iMBXY], 2, LIST_0)); | |
| 518 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][2][0]; | |
| 519 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][2][1]; | |
| 520 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[0][iMBXY], 2, LIST_0)); | |
| 521 | 521 | pMCRefMem.pDstY = pPredY + 8; |
| 522 | 522 | pMCRefMem.pDstU = pPredCb + 4; |
| 523 | 523 | pMCRefMem.pDstV = pPredCr + 4; |
| 524 | 524 | BaseMC (&pMCRefMem, iMBOffsetX + 8, iMBOffsetY, pMCFunc, 8, 16, iMVs); |
| 525 | 525 | |
| 526 | 526 | if (pCurDqLayer->bUseWeightPredictionFlag) { |
| 527 | − iRefIndex = pCurDqLayer->pRefIndex[0][iMBXY][2]; | |
| 527 | + iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][2]; | |
| 528 | 528 | WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 8, 16); |
| 529 | 529 | } |
| 530 | 530 | break; |
| @@ -541,8 +541,8 @@ int32_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWels · 10 unmodified lines | ||
| 541 | 541 | iYOffset = iMBOffsetY + iBlk8Y; |
| 542 | 542 | |
| 543 | 543 | iIIdx = ((i >> 1) << 3) + ((i & 1) << 1); |
| 544 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[0][iMBXY], iIIdx, LIST_0)); | |
| 545 | − iRefIndex = pCurDqLayer->bUseWeightPredictionFlag ? pCurDqLayer->pRefIndex[0][iMBXY][iIIdx] : 0; | |
| 544 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[0][iMBXY], iIIdx, LIST_0)); | |
| 545 | + iRefIndex = pCurDqLayer->bUseWeightPredictionFlag ? pCurDqLayer->pDec->pRefIndex[0][iMBXY][iIIdx] : 0; | |
| 546 | 546 | |
| 547 | 547 | pDstY = pPredY + iBlk8X + iBlk8Y * iDstLineLuma; |
| 548 | 548 | pDstU = pPredCb + (iBlk8X >> 1) + (iBlk8Y >> 1) * iDstLineChroma; |
| @@ -552,8 +552,8 @@ int32_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWels · 3 unmodified lines | ||
| 552 | 552 | pMCRefMem.pDstV = pDstV; |
| 553 | 553 | switch (iSubMBType) { |
| 554 | 554 | case SUB_MB_TYPE_8x8: |
| 555 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][iIIdx][0]; | |
| 556 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][iIIdx][1]; | |
| 555 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][0]; | |
| 556 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][1]; | |
| 557 | 557 | BaseMC (&pMCRefMem, iXOffset, iYOffset, pMCFunc, 8, 8, iMVs); |
| 558 | 558 | if (pCurDqLayer->bUseWeightPredictionFlag) { |
| 559 | 559 | |
| @@ -562,8 +562,8 @@ int32_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWels · 2 unmodified lines | ||
| 562 | 562 | |
| 563 | 563 | break; |
| 564 | 564 | case SUB_MB_TYPE_8x4: |
| 565 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][iIIdx][0]; | |
| 566 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][iIIdx][1]; | |
| 565 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][0]; | |
| 566 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][1]; | |
| 567 | 567 | BaseMC (&pMCRefMem, iXOffset, iYOffset, pMCFunc, 8, 4, iMVs); |
| 568 | 568 | if (pCurDqLayer->bUseWeightPredictionFlag) { |
| 569 | 569 | |
| @@ -571,8 +571,8 @@ int32_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWels · 1 unmodified line | ||
| 571 | 571 | } |
| 572 | 572 | |
| 573 | 573 | |
| 574 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][iIIdx + 4][0]; | |
| 575 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][iIIdx + 4][1]; | |
| 574 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + 4][0]; | |
| 575 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + 4][1]; | |
| 576 | 576 | pMCRefMem.pDstY += (iDstLineLuma << 2); |
| 577 | 577 | pMCRefMem.pDstU += (iDstLineChroma << 1); |
| 578 | 578 | pMCRefMem.pDstV += (iDstLineChroma << 1); |
| @@ -584,8 +584,8 @@ int32_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWels · 5 unmodified lines | ||
| 584 | 584 | |
| 585 | 585 | break; |
| 586 | 586 | case SUB_MB_TYPE_4x8: |
| 587 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][iIIdx][0]; | |
| 588 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][iIIdx][1]; | |
| 587 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][0]; | |
| 588 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][1]; | |
| 589 | 589 | BaseMC (&pMCRefMem, iXOffset, iYOffset, pMCFunc, 4, 8, iMVs); |
| 590 | 590 | if (pCurDqLayer->bUseWeightPredictionFlag) { |
| 591 | 591 | |
| @@ -593,8 +593,8 @@ int32_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWels · 1 unmodified line | ||
| 593 | 593 | } |
| 594 | 594 | |
| 595 | 595 | |
| 596 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][iIIdx + 1][0]; | |
| 597 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][iIIdx + 1][1]; | |
| 596 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + 1][0]; | |
| 597 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + 1][1]; | |
| 598 | 598 | pMCRefMem.pDstY += 4; |
| 599 | 599 | pMCRefMem.pDstU += 2; |
| 600 | 600 | pMCRefMem.pDstV += 2; |
| @@ -618,8 +618,8 @@ int32_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWels · 17 unmodified lines | ||
| 618 | 618 | pMCRefMem.pDstU = pDstU + iUVLineStride; |
| 619 | 619 | pMCRefMem.pDstV = pDstV + iUVLineStride; |
| 620 | 620 | |
| 621 | − iMVs[0] = pCurDqLayer->pMv[0][iMBXY][iIIdx + iJIdx][0]; | |
| 622 | − iMVs[1] = pCurDqLayer->pMv[0][iMBXY][iIIdx + iJIdx][1]; | |
| 621 | + iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + iJIdx][0]; | |
| 622 | + iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + iJIdx][1]; | |
| 623 | 623 | BaseMC (&pMCRefMem, iXOffset + iBlk4X, iYOffset + iBlk4Y, pMCFunc, 4, 4, iMVs); |
| 624 | 624 | if (pCurDqLayer->bUseWeightPredictionFlag) { |
| 625 | 625 | |
| @@ -652,7 +652,7 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 26 unmodified lines | ||
| 652 | 652 | |
| 653 | 653 | int16_t iMVs[2] = { 0 }; |
| 654 | 654 | |
| 655 | − uint32_t iMBType = pCurDqLayer->pMbType[iMBXY]; | |
| 655 | + uint32_t iMBType = pCurDqLayer->pDec->pMbType[iMBXY]; | |
| 656 | 656 | |
| 657 | 657 | int32_t iMBOffsetX = pCurDqLayer->iMbX << 4; |
| 658 | 658 | int32_t iMBOffsetY = pCurDqLayer->iMbY << 4; |
| @@ -684,17 +684,17 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 25 unmodified lines | ||
| 684 | 684 | |
| 685 | 685 | if (IS_INTER_16x16 (iMBType)) { |
| 686 | 686 | if (IS_TYPE_L0 (iMBType) && IS_TYPE_L1 (iMBType)) { |
| 687 | − iMVs[0] = pCurDqLayer->pMv[LIST_0][iMBXY][0][0]; | |
| 688 | − iMVs[1] = pCurDqLayer->pMv[LIST_0][iMBXY][0][1]; | |
| 689 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[LIST_0][iMBXY], 0, LIST_0)); | |
| 687 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][0][0]; | |
| 688 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][0][1]; | |
| 689 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[LIST_0][iMBXY], 0, LIST_0)); | |
| 690 | 690 | BaseMC (&pMCRefMem, iMBOffsetX, iMBOffsetY, pMCFunc, 16, 16, iMVs); |
| 691 | 691 | |
| 692 | − iMVs[0] = pCurDqLayer->pMv[LIST_1][iMBXY][0][0]; | |
| 693 | − iMVs[1] = pCurDqLayer->pMv[LIST_1][iMBXY][0][1]; | |
| 694 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, pCurDqLayer->pRefIndex[LIST_1][iMBXY], 0, LIST_1)); | |
| 692 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][0][0]; | |
| 693 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][0][1]; | |
| 694 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY], 0, LIST_1)); | |
| 695 | 695 | BaseMC (&pTempMCRefMem, iMBOffsetX, iMBOffsetY, pMCFunc, 16, 16, iMVs); |
| 696 | − iRefIndex1 = pCurDqLayer->pRefIndex[LIST_0][iMBXY][0]; | |
| 697 | − iRefIndex2 = pCurDqLayer->pRefIndex[LIST_1][iMBXY][0]; | |
| 696 | + iRefIndex1 = pCurDqLayer->pDec->pRefIndex[LIST_0][iMBXY][0]; | |
| 697 | + iRefIndex2 = pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY][0]; | |
| 698 | 698 | if (pCurDqLayer->bUseWeightedBiPredIdc) { |
| 699 | 699 | BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex1, iRefIndex2, bWeightedBipredIdcIs1, 16, 16); |
| 700 | 700 | } else { |
| @@ -702,12 +702,12 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 1 unmodified line | ||
| 702 | 702 | } |
| 703 | 703 | } else { |
| 704 | 704 | int32_t listIdx = (iMBType & MB_TYPE_P0L0) ? LIST_0 : LIST_1; |
| 705 | − iMVs[0] = pCurDqLayer->pMv[listIdx][iMBXY][0][0]; | |
| 706 | − iMVs[1] = pCurDqLayer->pMv[listIdx][iMBXY][0][1]; | |
| 707 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[listIdx][iMBXY], 0, listIdx)); | |
| 705 | + iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][0][0]; | |
| 706 | + iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][0][1]; | |
| 707 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY], 0, listIdx)); | |
| 708 | 708 | BaseMC (&pMCRefMem, iMBOffsetX, iMBOffsetY, pMCFunc, 16, 16, iMVs); |
| 709 | 709 | if (bWeightedBipredIdcIs1) { |
| 710 | − int32_t iRefIndex = pCurDqLayer->pRefIndex[listIdx][iMBXY][0]; | |
| 710 | + int32_t iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][0]; | |
| 711 | 711 | WeightPrediction (pCurDqLayer, &pMCRefMem, listIdx, iRefIndex, 16, 16); |
| 712 | 712 | } |
| 713 | 713 | } |
| @@ -719,9 +719,9 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 5 unmodified lines | ||
| 719 | 719 | for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) { |
| 720 | 720 | if (IS_DIR (iMBType, i, listIdx)) { |
| 721 | 721 | lastListIdx = listIdx; |
| 722 | − iMVs[0] = pCurDqLayer->pMv[listIdx][iMBXY][iPartIdx][0]; | |
| 723 | − iMVs[1] = pCurDqLayer->pMv[listIdx][iMBXY][iPartIdx][1]; | |
| 724 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[listIdx][iMBXY], iPartIdx, listIdx)); | |
| 722 | + iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iPartIdx][0]; | |
| 723 | + iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iPartIdx][1]; | |
| 724 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY], iPartIdx, listIdx)); | |
| 725 | 725 | if (i) { |
| 726 | 726 | pMCRefMem.pDstY += (iDstLineLuma << 3); |
| 727 | 727 | pMCRefMem.pDstU += (iDstLineChroma << 2); |
| @@ -729,9 +729,9 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 1 unmodified line | ||
| 729 | 729 | } |
| 730 | 730 | BaseMC (&pMCRefMem, iMBOffsetX, iMBOffsetY + iPartIdx, pMCFunc, 16, 8, iMVs); |
| 731 | 731 | if (++listCount == 2) { |
| 732 | − iMVs[0] = pCurDqLayer->pMv[LIST_1][iMBXY][iPartIdx][0]; | |
| 733 | − iMVs[1] = pCurDqLayer->pMv[LIST_1][iMBXY][iPartIdx][1]; | |
| 734 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, pCurDqLayer->pRefIndex[LIST_1][iMBXY], iPartIdx, LIST_1)); | |
| 732 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iPartIdx][0]; | |
| 733 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iPartIdx][1]; | |
| 734 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY], iPartIdx, LIST_1)); | |
| 735 | 735 | if (i) { |
| 736 | 736 | pTempMCRefMem.pDstY += (iDstLineLuma << 3); |
| 737 | 737 | pTempMCRefMem.pDstU += (iDstLineChroma << 2); |
| @@ -739,8 +739,8 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 1 unmodified line | ||
| 739 | 739 | } |
| 740 | 740 | BaseMC (&pTempMCRefMem, iMBOffsetX, iMBOffsetY + iPartIdx, pMCFunc, 16, 8, iMVs); |
| 741 | 741 | if (pCurDqLayer->bUseWeightedBiPredIdc) { |
| 742 | − iRefIndex1 = pCurDqLayer->pRefIndex[LIST_0][iMBXY][iPartIdx]; | |
| 743 | − iRefIndex2 = pCurDqLayer->pRefIndex[LIST_1][iMBXY][iPartIdx]; | |
| 742 | + iRefIndex1 = pCurDqLayer->pDec->pRefIndex[LIST_0][iMBXY][iPartIdx]; | |
| 743 | + iRefIndex2 = pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY][iPartIdx]; | |
| 744 | 744 | BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex1, iRefIndex2, bWeightedBipredIdcIs1, 16, 8); |
| 745 | 745 | } else { |
| 746 | 746 | BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, 16, 8); |
| @@ -750,7 +750,7 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 3 unmodified lines | ||
| 750 | 750 | } |
| 751 | 751 | if (listCount == 1) { |
| 752 | 752 | if (bWeightedBipredIdcIs1) { |
| 753 | − int32_t iRefIndex = pCurDqLayer->pRefIndex[lastListIdx][iMBXY][iPartIdx]; | |
| 753 | + int32_t iRefIndex = pCurDqLayer->pDec->pRefIndex[lastListIdx][iMBXY][iPartIdx]; | |
| 754 | 754 | WeightPrediction (pCurDqLayer, &pMCRefMem, lastListIdx, iRefIndex, 16, 8); |
| 755 | 755 | } |
| 756 | 756 | } |
| @@ -762,9 +762,9 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 5 unmodified lines | ||
| 762 | 762 | for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) { |
| 763 | 763 | if (IS_DIR (iMBType, i, listIdx)) { |
| 764 | 764 | lastListIdx = listIdx; |
| 765 | − iMVs[0] = pCurDqLayer->pMv[listIdx][iMBXY][i << 1][0]; | |
| 766 | − iMVs[1] = pCurDqLayer->pMv[listIdx][iMBXY][i << 1][1]; | |
| 767 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[listIdx][iMBXY], i << 1, listIdx)); | |
| 765 | + iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][i << 1][0]; | |
| 766 | + iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][i << 1][1]; | |
| 767 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY], i << 1, listIdx)); | |
| 768 | 768 | if (i) { |
| 769 | 769 | pMCRefMem.pDstY += 8; |
| 770 | 770 | pMCRefMem.pDstU += 4; |
| @@ -772,9 +772,9 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 1 unmodified line | ||
| 772 | 772 | } |
| 773 | 773 | BaseMC (&pMCRefMem, iMBOffsetX + (i ? 8 : 0), iMBOffsetY, pMCFunc, 8, 16, iMVs); |
| 774 | 774 | if (++listCount == 2) { |
| 775 | − iMVs[0] = pCurDqLayer->pMv[LIST_1][iMBXY][i << 1][0]; | |
| 776 | − iMVs[1] = pCurDqLayer->pMv[LIST_1][iMBXY][i << 1][1]; | |
| 777 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, pCurDqLayer->pRefIndex[LIST_1][iMBXY], i << 1, LIST_1)); | |
| 775 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][i << 1][0]; | |
| 776 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][i << 1][1]; | |
| 777 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY], i << 1, LIST_1)); | |
| 778 | 778 | if (i) { |
| 779 | 779 | pTempMCRefMem.pDstY += 8; |
| 780 | 780 | pTempMCRefMem.pDstU += 4; |
| @@ -782,8 +782,8 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 1 unmodified line | ||
| 782 | 782 | } |
| 783 | 783 | BaseMC (&pTempMCRefMem, iMBOffsetX + (i ? 8 : 0), iMBOffsetY, pMCFunc, 8, 16, iMVs); |
| 784 | 784 | if (pCurDqLayer->bUseWeightedBiPredIdc) { |
| 785 | − iRefIndex1 = pCurDqLayer->pRefIndex[LIST_0][iMBXY][i << 1]; | |
| 786 | − iRefIndex2 = pCurDqLayer->pRefIndex[LIST_1][iMBXY][i << 1]; | |
| 785 | + iRefIndex1 = pCurDqLayer->pDec->pRefIndex[LIST_0][iMBXY][i << 1]; | |
| 786 | + iRefIndex2 = pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY][i << 1]; | |
| 787 | 787 | BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex1, iRefIndex2, bWeightedBipredIdcIs1, 8, 16); |
| 788 | 788 | } else { |
| 789 | 789 | BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, 8, 16); |
| @@ -793,7 +793,7 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 3 unmodified lines | ||
| 793 | 793 | } |
| 794 | 794 | if (listCount == 1) { |
| 795 | 795 | if (bWeightedBipredIdcIs1) { |
| 796 | − int32_t iRefIndex = pCurDqLayer->pRefIndex[lastListIdx][iMBXY][i << 1]; | |
| 796 | + int32_t iRefIndex = pCurDqLayer->pDec->pRefIndex[lastListIdx][iMBXY][i << 1]; | |
| 797 | 797 | WeightPrediction (pCurDqLayer, &pMCRefMem, lastListIdx, iRefIndex, 8, 16); |
| 798 | 798 | } |
| 799 | 799 | } |
| @@ -830,25 +830,25 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 30 unmodified lines | ||
| 830 | 830 | pTempMCRefMem.pDstV = pDstV2; |
| 831 | 831 | |
| 832 | 832 | if ((IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType))) { |
| 833 | − iRefIndex1 = pCurDqLayer->pRefIndex[LIST_0][iMBXY][iIIdx]; | |
| 834 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[LIST_0][iMBXY], iIIdx, LIST_0)); | |
| 833 | + iRefIndex1 = pCurDqLayer->pDec->pRefIndex[LIST_0][iMBXY][iIIdx]; | |
| 834 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[LIST_0][iMBXY], iIIdx, LIST_0)); | |
| 835 | 835 | |
| 836 | − iRefIndex2 = pCurDqLayer->pRefIndex[LIST_1][iMBXY][iIIdx]; | |
| 837 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, pCurDqLayer->pRefIndex[LIST_1][iMBXY], iIIdx, LIST_1)); | |
| 836 | + iRefIndex2 = pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY][iIIdx]; | |
| 837 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY], iIIdx, LIST_1)); | |
| 838 | 838 | } else { |
| 839 | 839 | int32_t listIdx = IS_TYPE_L0 (iSubMBType) ? LIST_0 : LIST_1; |
| 840 | − iRefIndex1 = pCurDqLayer->pRefIndex[listIdx][iMBXY][iIIdx]; | |
| 841 | − WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pRefIndex[listIdx][iMBXY], iIIdx, listIdx)); | |
| 840 | + iRefIndex1 = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iIIdx]; | |
| 841 | + WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY], iIIdx, listIdx)); | |
| 842 | 842 | } |
| 843 | 843 | |
| 844 | 844 | if (IS_SUB_8x8 (iSubMBType)) { |
| 845 | 845 | if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) { |
| 846 | − iMVs[0] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx][0]; | |
| 847 | − iMVs[1] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx][1]; | |
| 846 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][0]; | |
| 847 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][1]; | |
| 848 | 848 | BaseMC (&pMCRefMem, iXOffset, iYOffset, pMCFunc, 8, 8, iMVs); |
| 849 | 849 | |
| 850 | − iMVs[0] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx][0]; | |
| 851 | − iMVs[1] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx][1]; | |
| 850 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][0]; | |
| 851 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][1]; | |
| 852 | 852 | BaseMC (&pTempMCRefMem, iXOffset, iYOffset, pMCFunc, 8, 8, iMVs); |
| 853 | 853 | |
| 854 | 854 | if (pCurDqLayer->bUseWeightedBiPredIdc) { |
| @@ -858,21 +858,21 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 3 unmodified lines | ||
| 858 | 858 | } |
| 859 | 859 | } else { |
| 860 | 860 | int32_t listIdx = IS_TYPE_L0 (iSubMBType) ? LIST_0 : LIST_1; |
| 861 | − iMVs[0] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx][0]; | |
| 862 | − iMVs[1] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx][1]; | |
| 861 | + iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][0]; | |
| 862 | + iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][1]; | |
| 863 | 863 | BaseMC (&pMCRefMem, iXOffset, iYOffset, pMCFunc, 8, 8, iMVs); |
| 864 | 864 | if (bWeightedBipredIdcIs1) { |
| 865 | − int32_t iRefIndex = pCurDqLayer->pRefIndex[listIdx][iMBXY][iIIdx]; | |
| 865 | + int32_t iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iIIdx]; | |
| 866 | 866 | WeightPrediction (pCurDqLayer, &pMCRefMem, listIdx, iRefIndex, 8, 8); |
| 867 | 867 | } |
| 868 | 868 | } |
| 869 | 869 | } else if (IS_SUB_8x4 (iSubMBType)) { |
| 870 | 870 | if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) { //B_Bi_8x4 |
| 871 | − iMVs[0] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx][0]; | |
| 872 | − iMVs[1] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx][1]; | |
| 871 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][0]; | |
| 872 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][1]; | |
| 873 | 873 | BaseMC (&pMCRefMem, iXOffset, iYOffset, pMCFunc, 8, 4, iMVs); |
| 874 | − iMVs[0] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx][0]; | |
| 875 | − iMVs[1] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx][1]; | |
| 874 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][0]; | |
| 875 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][1]; | |
| 876 | 876 | BaseMC (&pTempMCRefMem, iXOffset, iYOffset, pMCFunc, 8, 4, iMVs); |
| 877 | 877 | |
| 878 | 878 | if (pCurDqLayer->bUseWeightedBiPredIdc) { |
| @@ -884,15 +884,15 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 5 unmodified lines | ||
| 884 | 884 | pMCRefMem.pDstY += (iDstLineLuma << 2); |
| 885 | 885 | pMCRefMem.pDstU += (iDstLineChroma << 1); |
| 886 | 886 | pMCRefMem.pDstV += (iDstLineChroma << 1); |
| 887 | − iMVs[0] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx + 4][0]; | |
| 888 | − iMVs[1] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx + 4][1]; | |
| 887 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + 4][0]; | |
| 888 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + 4][1]; | |
| 889 | 889 | BaseMC (&pMCRefMem, iXOffset, iYOffset + 4, pMCFunc, 8, 4, iMVs); |
| 890 | 890 | |
| 891 | 891 | pTempMCRefMem.pDstY += (iDstLineLuma << 2); |
| 892 | 892 | pTempMCRefMem.pDstU += (iDstLineChroma << 1); |
| 893 | 893 | pTempMCRefMem.pDstV += (iDstLineChroma << 1); |
| 894 | − iMVs[0] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx + 4][0]; | |
| 895 | − iMVs[1] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx + 4][1]; | |
| 894 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + 4][0]; | |
| 895 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + 4][1]; | |
| 896 | 896 | BaseMC (&pTempMCRefMem, iXOffset, iYOffset + 4, pMCFunc, 8, 4, iMVs); |
| 897 | 897 | |
| 898 | 898 | if (pCurDqLayer->bUseWeightedBiPredIdc) { |
| @@ -902,27 +902,27 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 3 unmodified lines | ||
| 902 | 902 | } |
| 903 | 903 | } else { //B_L0_8x4 B_L1_8x4 |
| 904 | 904 | int32_t listIdx = IS_TYPE_L0 (iSubMBType) ? LIST_0 : LIST_1; |
| 905 | − iMVs[0] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx][0]; | |
| 906 | − iMVs[1] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx][1]; | |
| 905 | + iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][0]; | |
| 906 | + iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][1]; | |
| 907 | 907 | BaseMC (&pMCRefMem, iXOffset, iYOffset, pMCFunc, 8, 4, iMVs); |
| 908 | 908 | pMCRefMem.pDstY += (iDstLineLuma << 2); |
| 909 | 909 | pMCRefMem.pDstU += (iDstLineChroma << 1); |
| 910 | 910 | pMCRefMem.pDstV += (iDstLineChroma << 1); |
| 911 | − iMVs[0] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx + 4][0]; | |
| 912 | − iMVs[1] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx + 4][1]; | |
| 911 | + iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + 4][0]; | |
| 912 | + iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + 4][1]; | |
| 913 | 913 | BaseMC (&pMCRefMem, iXOffset, iYOffset + 4, pMCFunc, 8, 4, iMVs); |
| 914 | 914 | if (bWeightedBipredIdcIs1) { |
| 915 | − int32_t iRefIndex = pCurDqLayer->pRefIndex[listIdx][iMBXY][iIIdx]; | |
| 915 | + int32_t iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iIIdx]; | |
| 916 | 916 | WeightPrediction (pCurDqLayer, &pMCRefMem, listIdx, iRefIndex, 8, 4); |
| 917 | 917 | } |
| 918 | 918 | } |
| 919 | 919 | } else if (IS_SUB_4x8 (iSubMBType)) { |
| 920 | 920 | if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) { //B_Bi_4x8 |
| 921 | − iMVs[0] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx][0]; | |
| 922 | − iMVs[1] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx][1]; | |
| 921 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][0]; | |
| 922 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][1]; | |
| 923 | 923 | BaseMC (&pMCRefMem, iXOffset, iYOffset, pMCFunc, 4, 8, iMVs); |
| 924 | − iMVs[0] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx][0]; | |
| 925 | − iMVs[1] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx][1]; | |
| 924 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][0]; | |
| 925 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][1]; | |
| 926 | 926 | BaseMC (&pTempMCRefMem, iXOffset, iYOffset, pMCFunc, 4, 8, iMVs); |
| 927 | 927 | |
| 928 | 928 | if (pCurDqLayer->bUseWeightedBiPredIdc) { |
| @@ -934,15 +934,15 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 5 unmodified lines | ||
| 934 | 934 | pMCRefMem.pDstY += 4; |
| 935 | 935 | pMCRefMem.pDstU += 2; |
| 936 | 936 | pMCRefMem.pDstV += 2; |
| 937 | − iMVs[0] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx + 1][0]; | |
| 938 | − iMVs[1] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx + 1][1]; | |
| 937 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + 1][0]; | |
| 938 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + 1][1]; | |
| 939 | 939 | BaseMC (&pMCRefMem, iXOffset + 4, iYOffset, pMCFunc, 4, 8, iMVs); |
| 940 | 940 | |
| 941 | 941 | pTempMCRefMem.pDstY += 4; |
| 942 | 942 | pTempMCRefMem.pDstU += 2; |
| 943 | 943 | pTempMCRefMem.pDstV += 2; |
| 944 | − iMVs[0] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx + 1][0]; | |
| 945 | − iMVs[1] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx + 1][1]; | |
| 944 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + 1][0]; | |
| 945 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + 1][1]; | |
| 946 | 946 | BaseMC (&pTempMCRefMem, iXOffset + 4, iYOffset, pMCFunc, 4, 8, iMVs); |
| 947 | 947 | |
| 948 | 948 | if (pCurDqLayer->bUseWeightedBiPredIdc) { |
| @@ -952,17 +952,17 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 3 unmodified lines | ||
| 952 | 952 | } |
| 953 | 953 | } else { //B_L0_4x8 B_L1_4x8 |
| 954 | 954 | int32_t listIdx = IS_TYPE_L0 (iSubMBType) ? LIST_0 : LIST_1; |
| 955 | − iMVs[0] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx][0]; | |
| 956 | − iMVs[1] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx][1]; | |
| 955 | + iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][0]; | |
| 956 | + iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][1]; | |
| 957 | 957 | BaseMC (&pMCRefMem, iXOffset, iYOffset, pMCFunc, 4, 8, iMVs); |
| 958 | 958 | pMCRefMem.pDstY += 4; |
| 959 | 959 | pMCRefMem.pDstU += 2; |
| 960 | 960 | pMCRefMem.pDstV += 2; |
| 961 | − iMVs[0] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx + 1][0]; | |
| 962 | − iMVs[1] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx + 1][1]; | |
| 961 | + iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + 1][0]; | |
| 962 | + iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + 1][1]; | |
| 963 | 963 | BaseMC (&pMCRefMem, iXOffset + 4, iYOffset, pMCFunc, 4, 8, iMVs); |
| 964 | 964 | if (bWeightedBipredIdcIs1) { |
| 965 | − int32_t iRefIndex = pCurDqLayer->pRefIndex[listIdx][iMBXY][iIIdx]; | |
| 965 | + int32_t iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iIIdx]; | |
| 966 | 966 | WeightPrediction (pCurDqLayer, &pMCRefMem, listIdx, iRefIndex, 4, 8); |
| 967 | 967 | } |
| 968 | 968 | } |
| @@ -980,16 +980,16 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 11 unmodified lines | ||
| 980 | 980 | pMCRefMem.pDstU = pDstU + iUVLineStride; |
| 981 | 981 | pMCRefMem.pDstV = pDstV + iUVLineStride; |
| 982 | 982 | |
| 983 | − iMVs[0] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx + iJIdx][0]; | |
| 984 | − iMVs[1] = pCurDqLayer->pMv[LIST_0][iMBXY][iIIdx + iJIdx][1]; | |
| 983 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + iJIdx][0]; | |
| 984 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + iJIdx][1]; | |
| 985 | 985 | BaseMC (&pMCRefMem, iXOffset + iBlk4X, iYOffset + iBlk4Y, pMCFunc, 4, 4, iMVs); |
| 986 | 986 | |
| 987 | 987 | pTempMCRefMem.pDstY = pDstY2 + iBlk8X + iBlk8Y * iDstLineLuma; |
| 988 | 988 | pTempMCRefMem.pDstU = pDstU2 + iUVLineStride; |
| 989 | 989 | pTempMCRefMem.pDstV = pDstV2 + iUVLineStride;; |
| 990 | 990 | |
| 991 | − iMVs[0] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx + iJIdx][0]; | |
| 992 | − iMVs[1] = pCurDqLayer->pMv[LIST_1][iMBXY][iIIdx + iJIdx][1]; | |
| 991 | + iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + iJIdx][0]; | |
| 992 | + iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + iJIdx][1]; | |
| 993 | 993 | BaseMC (&pTempMCRefMem, iXOffset + iBlk4X, iYOffset + iBlk4Y, pMCFunc, 4, 4, iMVs); |
| 994 | 994 | |
| 995 | 995 | if (pCurDqLayer->bUseWeightedBiPredIdc) { |
| @@ -1000,7 +1000,7 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 4 unmodified lines | ||
| 1000 | 1000 | } |
| 1001 | 1001 | } else { |
| 1002 | 1002 | int32_t listIdx = IS_TYPE_L0 (iSubMBType) ? LIST_0 : LIST_1; |
| 1003 | − int32_t iRefIndex = pCurDqLayer->pRefIndex[listIdx][iMBXY][iIIdx]; | |
| 1003 | + int32_t iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iIIdx]; | |
| 1004 | 1004 | for (int32_t j = 0; j < 4; j++) { |
| 1005 | 1005 | int32_t iUVLineStride; |
| 1006 | 1006 | iJIdx = ((j >> 1) << 2) + (j & 1); |
| @@ -1013,8 +1013,8 @@ int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWels · 6 unmodified lines | ||
| 1013 | 1013 | pMCRefMem.pDstU = pDstU + iUVLineStride; |
| 1014 | 1014 | pMCRefMem.pDstV = pDstV + iUVLineStride; |
| 1015 | 1015 | |
| 1016 | − iMVs[0] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx + iJIdx][0]; | |
| 1017 | − iMVs[1] = pCurDqLayer->pMv[listIdx][iMBXY][iIIdx + iJIdx][1]; | |
| 1016 | + iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + iJIdx][0]; | |
| 1017 | + iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + iJIdx][1]; | |
| 1018 | 1018 | BaseMC (&pMCRefMem, iXOffset + iBlk4X, iYOffset + iBlk4Y, pMCFunc, 4, 4, iMVs); |
| 1019 | 1019 | if (bWeightedBipredIdcIs1) { |
| 1020 | 1020 | WeightPrediction (pCurDqLayer, &pMCRefMem, listIdx, iRefIndex, 4, 4); |