Ticket #1378: SCM3.0_T0048_bugfixes.diff
File SCM3.0_T0048_bugfixes.diff, 19.0 KB (added by cgisquet, 9 years ago) |
---|
-
App/TAppEncoder/TAppEncCfg.cpp
1087 1087 m_framesToBeEncoded *= 2; 1088 1088 } 1089 1089 1090 #if CANON_FORCE_TILES_3x3 1091 m_tileUniformSpacingFlag = true; 1092 m_numTileColumnsMinus1 = 2; 1093 m_numTileRowsMinus1 = 2; 1094 #endif 1095 1090 1096 if( !m_tileUniformSpacingFlag && m_numTileColumnsMinus1 > 0 ) 1091 1097 { 1092 1098 if (cfg_ColumnWidth.values.size() > m_numTileColumnsMinus1) … … 1744 1750 xConfirmPara( m_pcmLog2MaxSize < m_uiPCMLog2MinSize, "PCMLog2MaxSize must be equal to or greater than m_uiPCMLog2MinSize."); 1745 1751 } 1746 1752 1753 #if CANON_FORCE_SLICES_8 1754 m_sliceMode = 1; 1755 m_sliceArgument = 8; 1756 #endif 1757 1747 1758 xConfirmPara( m_sliceMode < 0 || m_sliceMode > 3, "SliceMode exceeds supported range (0 to 3)" ); 1748 1759 if (m_sliceMode!=0) 1749 1760 { -
Lib/TLibCommon/TComDataCU.h
339 339 TComMv getLastIntraBCMv(Int idx=0) {return m_lastIntraBCMv[idx]; } 340 340 Void setLastIntraBCMv(TComMv mv, Int idx=0 ) { m_lastIntraBCMv[idx] = mv; } 341 341 UInt getIntraBCSearchAreaWidth( UInt uiMaxSearchWidthToLeftInCTUs ); 342 #if CANON_LIMIT_IBC_TILES 343 UInt getIntraBCSearchAreaHeight( UInt uiMaxSearchHeightToUpInCTUs ); 344 #endif 342 345 343 346 TCoeff* getCoeff (ComponentID component) { return m_pcTrCoeff[component]; } 344 347 -
Lib/TLibCommon/TComDataCU.cpp
4214 4214 const UInt lcuWidth = getSlice()->getSPS()->getMaxCUWidth(); 4215 4215 const TComPicSym &picSym = *getPic()->getPicSym(); 4216 4216 const UInt currentTileIdx = picSym.getTileIdxMap(getCtuRsAddr()); 4217 #if CANON_LIMIT_IBC_SLICES 4218 const UInt currentSliceIdx = getSlice()->getSliceIdx(); 4219 #endif 4217 4220 const UInt maxWidth = uiMaxSearchWidthToLeftInCTUs*lcuWidth; 4218 4221 4219 4222 UInt width = 0; … … 4226 4229 { 4227 4230 break; 4228 4231 } 4232 #if CANON_LIMIT_IBC_SLICES 4233 if( getPic()->getCtu( pTestCU->getCtuRsAddr() )->getSlice()->getSliceIdx() != currentSliceIdx ) 4234 { 4235 break; 4236 } 4237 #endif 4229 4238 } 4230 4239 return std::min<UInt>(width, maxWidth); 4231 4240 } 4232 4241 4242 #if CANON_LIMIT_IBC_TILES 4243 UInt TComDataCU::getIntraBCSearchAreaHeight( UInt uiMaxSearchHeightToUpInCTUs ) 4244 { 4245 const UInt lcuHeight = getSlice()->getSPS()->getMaxCUHeight(); 4246 const TComPicSym &picSym = *getPic()->getPicSym(); 4247 const UInt currentTileIdx = picSym.getTileIdxMap(getCtuRsAddr()); 4248 #if CANON_LIMIT_IBC_SLICES 4249 const UInt currentSliceIdx = getSlice()->getSliceIdx(); 4250 #endif 4251 const UInt maxHeight = uiMaxSearchHeightToUpInCTUs*lcuHeight; 4252 4253 UInt height = 0; 4254 4255 for(TComDataCU *pTestCU=getCtuAbove(); 4256 height<maxHeight && pTestCU!=NULL && pTestCU->getSlice()!=NULL; 4257 pTestCU=pTestCU->getCtuAbove(), height+=lcuHeight) 4258 { 4259 if ( picSym.getTileIdxMap( pTestCU->getCtuRsAddr() ) != currentTileIdx ) 4260 { 4261 break; 4262 } 4263 #if CANON_LIMIT_IBC_SLICES 4264 if( getPic()->getCtu( pTestCU->getCtuRsAddr() )->getSlice()->getSliceIdx() != currentSliceIdx ) 4265 { 4266 break; 4267 } 4268 #endif 4269 } 4270 return std::min<UInt>(height, maxHeight); 4271 } 4272 #endif 4273 4233 4274 Void TComDataCU::setPLTScanRotationModeFlagSubParts (Bool bPLTScanRotationModeFlag, UInt uiAbsPartIdx, UInt uiDepth) 4234 4275 { 4235 4276 UInt uiCurrPartNumb = m_pcPic->getNumPartitionsInCtu() >> (uiDepth << 1); -
Lib/TLibCommon/TypeDef.h
41 41 #include <vector> 42 42 #include <cstdlib> 43 43 44 #define CANON_FORCE_TILES_3x3 0 45 #define CANON_FORCE_SLICES_8 1 46 47 #define CANON_LIMIT_IBC_TILES 1 48 #define CANON_LIMIT_IBC_SLICES 0 49 #define CANON_LIMIT_IBC_SLICES_v2 1 50 51 #define CANON_TOOL_VERIFICATION_IBC_TILES 1 52 #define CANON_TOOL_VERIFICATION_IBC_SLICES 1 53 44 54 //! \ingroup TLibCommon 45 55 //! \{ 46 56 -
Lib/TLibEncoder/TEncSlice.cpp
846 846 if (ctuRsAddr == firstCtuRsAddrOfTile) 847 847 { 848 848 m_pppcRDSbacCoder[0][CI_CURR_BEST]->resetEntropy(); 849 #if CANON_LIMIT_IBC_TILES 850 //clear the hash table used in Intra BC search 851 if( m_pcCfg->getUseHashBasedIntraBCSearch() ) 852 { 853 #if CANON_TOOL_VERIFICATION_IBC_TILES 854 printf("xClearIntraBCHashTable TileIdx:%d \n", pcPic->getPicSym()->getTileIdxMap(ctuRsAddr) ); 855 #endif 856 m_pcPredSearch->xClearIntraBCHashTable(); 857 } 858 #endif 849 859 } 850 860 else if ( ctuXPosInCtus == tileXPosInCtus && m_pcCfg->getWaveFrontsynchro()) 851 861 { … … 1146 1156 //clear the hash table used in Intra BC search 1147 1157 if( m_pcCfg->getUseHashBasedIntraBCSearch() ) 1148 1158 { 1159 #if CANON_TOOL_VERIFICATION_IBC_TILES 1160 printf("xClearIntraBCHashTable sliceIdx:%d \n", pcSlice->getSliceIdx() ); 1161 #endif 1149 1162 m_pcPredSearch->xClearIntraBCHashTable(); 1150 1163 } 1151 1164 } -
Lib/TLibEncoder/TEncSearch.h
455 455 } 456 456 #endif 457 457 458 #if CANON_LIMIT_IBC_SLICES_v2 459 if( pcCU->getSlice()->getSliceMode() ) 460 { 461 UInt currSliceIdx = pcCU->getSlice()->getSliceIdx(); 462 463 Int uiRefCuALX = (cuPelX + predX )/uiMaxCuWidth; 464 Int uiRefCuALY = (cuPelY + predY )/uiMaxCuHeight; 465 466 UInt ctuAddrAL = uiRefCuALY*pcCU->getPic()->getFrameWidthInCtus() + uiRefCuALX; 467 UInt ALSliceIdx = pcCU->getPic()->getCtu( ctuAddrAL )->getSlice()->getSliceIdx(); 468 469 if( ALSliceIdx != currSliceIdx ) 470 { 471 return false; 472 } 473 } 474 #endif 475 458 476 return (!pcCU->getSlice()->getPPS()->getConstrainedIntraPred()) || 459 477 (pcCU->getSlice()->getSliceType() == I_SLICE) || 460 478 xCIPIntraSearchPruning(pcCU, predX + ROIStartX, predY + ROIStartY, roiWidth, roiHeight); -
Lib/TLibEncoder/TEncSearch.cpp
5792 5792 5793 5793 if((pcCU->getWidth(0) == 16) && (pcCU->getPartitionSize(0) == SIZE_2Nx2N) && m_pcEncCfg->getUseIntraBCFullFrameSearch()) 5794 5794 { 5795 #if CANON_LIMIT_IBC_TILES 5796 if( pcCU->getSlice()->getPPS()->getTilesEnabledFlag() 5797 #if CANON_LIMIT_IBC_SLICES 5798 || pcCU->getSlice()->getSliceMode() 5799 #endif 5800 ) 5801 { 5802 Int maxXsr = (cuPelX % lcuWidth) + pcCU->getIntraBCSearchAreaWidth ( cuPelX/lcuWidth ); 5803 Int maxYsr = (cuPelY % lcuHeight) + pcCU->getIntraBCSearchAreaHeight( cuPelY/lcuHeight ); 5804 5805 srLeft = -maxXsr; 5806 srTop = -maxYsr; 5807 } 5808 else 5809 { 5810 srLeft = -1 * cuPelX; 5811 srTop = -1 * cuPelY; 5812 } 5813 #else 5795 5814 srLeft = -1 * cuPelX; 5796 5815 srTop = -1 * cuPelY; 5816 #endif 5797 5817 5798 5818 srRight = iPicWidth - cuPelX - iRoiWidth; 5799 5819 srBottom = lcuHeight - cuPelY % lcuHeight - iRoiHeight; … … 6099 6119 6100 6120 if(m_pcEncCfg->getUseIntraBCFullFrameSearch() ) 6101 6121 { 6102 srLeft = -1 * cuPelX; 6103 srTop = -1 * cuPelY; 6122 #if CANON_LIMIT_IBC_TILES 6123 if( pcCU->getSlice()->getPPS()->getTilesEnabledFlag() 6124 #if CANON_LIMIT_IBC_SLICES 6125 || pcCU->getSlice()->getSliceMode() 6126 #endif 6127 ) 6128 { 6129 Int maxXsr = (cuPelX % lcuWidth) + pcCU->getIntraBCSearchAreaWidth ( cuPelX/lcuWidth ); 6130 Int maxYsr = (cuPelY % lcuHeight) + pcCU->getIntraBCSearchAreaHeight( cuPelY/lcuHeight ); 6104 6131 6132 srLeft = -maxXsr; 6133 srTop = -maxYsr; 6134 } 6135 else 6136 { 6137 srLeft = -1 * cuPelX; 6138 srTop = -1 * cuPelY; 6139 } 6140 #endif 6141 6105 6142 srRight = iPicWidth - cuPelX - iRoiWidth; 6106 6143 srBottom = lcuHeight - cuPelY % lcuHeight - iRoiHeight; 6107 6144 … … 6279 6316 6280 6317 const Int boundY = (0 - iRoiHeight - puPelOffsetY); 6281 6318 #if SCM_S0067_IBC_FULL_1D_SEARCH_FOR_PU 6319 #if CANON_LIMIT_IBC_TILES 6282 6320 Int lowY = (pcCU->getPartitionSize(uiPartAddr) == SCM_S0067_IBC_FULL_1D_SEARCH_FOR_PU) 6321 ? srTop : max(iSrchRngVerTop, srTop); 6322 #else 6323 Int lowY = (pcCU->getPartitionSize(uiPartAddr) == SCM_S0067_IBC_FULL_1D_SEARCH_FOR_PU) 6283 6324 ? -cuPelY : max(iSrchRngVerTop, 0 - cuPelY); 6325 #endif 6284 6326 for(Int y = lowY ; y <= boundY ; ++y ) 6285 6327 #else 6286 6328 for(Int y = max(iSrchRngVerTop, 0 - cuPelY) ; y <= boundY ; ++y ) … … 6335 6377 } 6336 6378 6337 6379 #if SCM_S0067_IBC_FULL_1D_SEARCH_FOR_PU 6380 #if CANON_LIMIT_IBC_TILES 6338 6381 const Int boundX = (pcCU->getPartitionSize(uiPartAddr) == SCM_S0067_IBC_FULL_1D_SEARCH_FOR_PU) 6382 ? srLeft : max(iSrchRngHorLeft, srLeft); 6383 #else 6384 const Int boundX = (pcCU->getPartitionSize(uiPartAddr) == SCM_S0067_IBC_FULL_1D_SEARCH_FOR_PU) 6339 6385 ? -cuPelX : max(iSrchRngHorLeft, - cuPelX); 6386 #endif 6340 6387 #else 6341 6388 const Int boundX = max(iSrchRngHorLeft, - cuPelX); 6342 6389 #endif … … 6413 6460 6414 6461 if( pcCU->getWidth(0) < 16 && !bUse1DSearchFor8x8 ) 6415 6462 { 6463 #if CANON_LIMIT_IBC_TILES 6464 for(Int y = max(iSrchRngVerTop, srTop); y <= iSrchRngVerBottom; y +=2) 6465 #else 6416 6466 for(Int y = max(iSrchRngVerTop, -cuPelY); y <= iSrchRngVerBottom; y +=2) 6467 #endif 6417 6468 { 6418 6469 if ((y == 0) || ((Int) (cuPelY + y + iRoiHeight) >= iPicHeight)) //NOTE: RExt - is this still necessary? 6419 6470 continue; 6420 6471 6421 6472 Int iTempY = y + iRelCUPelY + iRoiHeight - 1; 6422 6473 6474 #if CANON_LIMIT_IBC_TILES 6475 for(Int x = max(iSrchRngHorLeft, srLeft); x <= iSrchRngHorRight; x++) 6476 #else 6423 6477 for(Int x = max(iSrchRngHorLeft, -cuPelX); x <= iSrchRngHorRight; x++) 6478 #endif 6424 6479 { 6425 6480 if ((x == 0) || ((Int) (cuPelX + x + iRoiWidth) >= iPicWidth)) //NOTE: RExt - is this still necessary? 6426 6481 continue; … … 6487 6542 #endif 6488 6543 } 6489 6544 6490 6545 #if CANON_LIMIT_IBC_TILES 6546 for(Int y = (max(iSrchRngVerTop, srTop) + 1); y <= iSrchRngVerBottom; y += 2) 6547 #else 6491 6548 for(Int y = (max(iSrchRngVerTop, -cuPelY) + 1); y <= iSrchRngVerBottom; y += 2) 6549 #endif 6492 6550 { 6493 6551 if ((y == 0) || ((Int) (cuPelY + y + iRoiHeight) >= iPicHeight)) //NOTE: RExt - is this still necessary? 6494 6552 continue; 6495 6553 6496 6554 Int iTempY = y + iRelCUPelY + iRoiHeight - 1; 6497 6555 6556 #if CANON_LIMIT_IBC_TILES 6557 for(Int x = max(iSrchRngHorLeft, srLeft); x <= iSrchRngHorRight; x += 2) 6558 #else 6498 6559 for(Int x = max(iSrchRngHorLeft, -cuPelX); x <= iSrchRngHorRight; x += 2) 6560 #endif 6499 6561 { 6500 6562 if ((x == 0) || ((Int) (cuPelX + x + iRoiWidth) >= iPicWidth)) //NOTE: RExt - is this still necessary? 6501 6563 continue; … … 6580 6642 6581 6643 uiTempSadBest = uiSadBestCand[0]; 6582 6644 6583 6645 #if CANON_LIMIT_IBC_TILES 6646 for(Int y = (max(iSrchRngVerTop, srTop) + 1); y <= iSrchRngVerBottom; y += 2) 6647 #else 6584 6648 for(Int y = (max(iSrchRngVerTop, -cuPelY) + 1); y <= iSrchRngVerBottom; y += 2) 6649 #endif 6585 6650 { 6586 6651 if ((y == 0) || ((Int) (cuPelY + y + iRoiHeight) >= iPicHeight)) //NOTE: RExt - is this still necessary? 6587 6652 continue; 6588 6653 6589 6654 Int iTempY = y + iRelCUPelY + iRoiHeight - 1; 6590 6655 6656 #if CANON_LIMIT_IBC_TILES 6657 for(Int x = (max(iSrchRngHorLeft, srLeft) + 1); x <= iSrchRngHorRight; x += 2) 6658 #else 6591 6659 for(Int x = (max(iSrchRngHorLeft, -cuPelX) + 1); x <= iSrchRngHorRight; x += 2) 6660 #endif 6592 6661 { 6593 6662 6594 6663 if ((x == 0) || ((Int) (cuPelX + x + iRoiWidth) >= iPicWidth)) //NOTE: RExt - is this still necessary? … … 6965 7034 } 6966 7035 #endif 6967 7036 7037 #if CANON_TOOL_VERIFICATION_IBC_TILES 7038 const TComPicSym &picSym = *pcCU->getPic()->getPicSym(); 7039 UInt currTileIdx = picSym.getTileIdxMap( pcCU->getCtuRsAddr() ); 7040 7041 // Check BottomRight Corner of referenced Block 7042 UInt ctuAddrBR = uiRefCuY*pcCU->getPic()->getFrameWidthInCtus() + uiRefCuX; 7043 UInt BRTileIdx = picSym.getTileIdxMap( ctuAddrBR ); 7044 7045 if( currTileIdx != BRTileIdx ) 7046 { 7047 printf("Error Hash IBC reference across Tiles absPartIdx:%d CurrCtu:%d CurrTileIdx:%d ctuBR:%d refBRTileIdx:%d mv(%d,%d) \n", pcCU->getZorderIdxInCtu(), pcCU->getCtuRsAddr(), currTileIdx, ctuAddrBR, BRTileIdx, iTempX, iTempY ); 7048 fflush(stdout); 7049 } 7050 7051 // Check AboveLeft Corner of referenced Block 7052 Int uiRefALCuX = iTempX / uiMaxCuWidth; 7053 Int uiRefALCuY = iTempY / uiMaxCuHeight; 7054 7055 UInt ctuAddrAL = uiRefALCuY*pcCU->getPic()->getFrameWidthInCtus() + uiRefALCuX; 7056 UInt ALTileIdx = picSym.getTileIdxMap( ctuAddrAL ); 7057 7058 if( currTileIdx != ALTileIdx ) 7059 { 7060 printf("Error Hash IBC reference across Tiles absPartIdx:%d CurrCtu:%d CurrTileIdx:%d ctuAL:%d refALTileIdx:%d mv(%d,%d) \n", pcCU->getZorderIdxInCtu(), pcCU->getCtuRsAddr(), currTileIdx, ctuAddrAL, ALTileIdx, iTempX, iTempY ); 7061 fflush(stdout); 7062 } 7063 #endif 7064 6968 7065 uiSad = 0;//m_pcRdCost->getCost( iTempX - cuPelX, iTempY - cuPelY); 6969 7066 6970 7067 for(int r = 0; r < iRoiHeight; ) … … 7033 7130 Int iOrgHashIndex; 7034 7131 IntraBCHashNode* NewHashNode; 7035 7132 7133 #if CANON_LIMIT_IBC_TILES || (CANON_LIMIT_IBC_SLICES || CANON_LIMIT_IBC_SLICES_v2) 7134 #if CANON_LIMIT_IBC_TILES 7135 const Bool tilesEnabled = pcCU->getSlice()->getPPS()->getTilesEnabledFlag(); 7136 const TComPicSym &picSym = *pcCU->getPic()->getPicSym(); 7137 const UInt currTileIdx = picSym.getTileIdxMap( pcCU->getCtuRsAddr() ); 7138 #endif 7139 #if CANON_LIMIT_IBC_SLICES || CANON_LIMIT_IBC_SLICES_v2 7140 const Bool slicesEnabled = pcCU->getSlice()->getSliceMode(); 7141 const UInt currSliceIdx = pcCU->getSlice()->getSliceIdx(); 7142 #endif 7036 7143 7144 const UInt uiMaxCuWidth = pcCU->getSlice()->getSPS()->getMaxCUWidth(); 7145 const UInt uiMaxCuHeight = pcCU->getSlice()->getSPS()->getMaxCUHeight(); 7146 #endif 7147 7037 7148 for(int j = 0; j < MAX_CU_SIZE; j++) 7038 7149 { 7039 7150 for(int i = 0; i < MAX_CU_SIZE; i++) … … 7046 7157 continue; 7047 7158 } 7048 7159 7160 #if CANON_LIMIT_IBC_TILES 7161 if( tilesEnabled ) 7162 { 7163 Int refCTBPosXAL = iTempX / uiMaxCuWidth; 7164 Int refCTBPosYAL = iTempY / uiMaxCuHeight; 7165 7166 UInt ctuAddrAL = refCTBPosYAL*pcCU->getPic()->getFrameWidthInCtus() + refCTBPosXAL; 7167 UInt ALTileIdx = picSym.getTileIdxMap( ctuAddrAL ); 7168 7169 if( currTileIdx != ALTileIdx ) 7170 { 7171 continue; 7172 } 7173 } 7174 #endif 7175 #if CANON_LIMIT_IBC_SLICES || CANON_LIMIT_IBC_SLICES_v2 7176 if( slicesEnabled ) 7177 { 7178 Int refCTBPosXAL = iTempX / uiMaxCuWidth; 7179 Int refCTBPosYAL = iTempY / uiMaxCuHeight; 7180 7181 UInt ctuAddrAL = refCTBPosYAL*pcCU->getPic()->getFrameWidthInCtus() + refCTBPosXAL; 7182 UInt ALSliceIdx = pcCU->getPic()->getCtu( ctuAddrAL )->getSlice()->getSliceIdx(); 7183 7184 if( currSliceIdx != ALSliceIdx ) 7185 { 7186 continue; 7187 } 7188 } 7189 #endif 7190 7049 7191 iOrgHashIndex = xIntraBCHashTableIndex(pcCU, iTempX, iTempY, iRoiWidth, iRoiHeight, isRec); 7050 7192 7051 7193 if(iOrgHashIndex < 0) -
Lib/TLibDecoder/TDecCu.cpp
533 533 fflush(stdout); 534 534 assert(0); 535 535 } 536 537 #if CANON_TOOL_VERIFICATION_IBC_TILES 538 if( pcCU->getSlice()->getPPS()->getTilesEnabledFlag() ) 539 { 540 const TComPicSym &picSym = *pcCU->getPic()->getPicSym(); 541 UInt currTileIdx = picSym.getTileIdxMap( pcCU->getCtuRsAddr() ); 542 543 // Check BottomRight Corner of referenced Block 544 UInt ctuAddrBR = refCTBPosY*pcCU->getPic()->getFrameWidthInCtus() + refCTBPosX; 545 UInt BRTileIdx = picSym.getTileIdxMap( ctuAddrBR ); 546 547 if( currTileIdx != BRTileIdx ) 548 { 549 printf("Error IBC reference across Tiles uiDepth:%d absPartIdx:%d CurrCtu:%d CurrTileIdx:%d ctuBR:%d refBRTileIdx:%d mv(%d,%d) \n", uiDepth, pcCU->getZorderIdxInCtu(), pcCU->getCtuRsAddr(), currTileIdx, ctuAddrBR, BRTileIdx, cMv.getHor(), cMv.getVer() ); 550 fflush(stdout); 551 } 552 553 // AboveLeft Corner 554 Int refPosXAL = posX + cMv.getHor(); 555 Int refPosYAL = posY + cMv.getVer(); 556 // CTB Position 557 Int refCTBPosXAL = refPosXAL / uiMaxCuWidth; 558 Int refCTBPosYAL = refPosYAL / uiMaxCuHeight; 559 560 UInt ctuAddrAL = refCTBPosYAL*pcCU->getPic()->getFrameWidthInCtus() + refCTBPosXAL; 561 UInt ALTileIdx = picSym.getTileIdxMap( ctuAddrAL ); 562 563 if( currTileIdx != ALTileIdx ) 564 { 565 printf("Error IBC reference across Tiles uiDepth:%d absPartIdx:%d CurrCtu:%d CurrTileIdx:%d ctuAL:%d refALTileIdx:%d mv(%d,%d) \n", uiDepth, pcCU->getZorderIdxInCtu(), pcCU->getCtuRsAddr(), currTileIdx, ctuAddrAL, ALTileIdx, cMv.getHor(), cMv.getVer() ); 566 fflush(stdout); 567 } 568 } 536 569 #endif 570 #if CANON_TOOL_VERIFICATION_IBC_SLICES 571 //if( pcCU->getSlice()->getSliceMode() ) // useless at decoder 572 { 573 UInt currSliceIdx = pcCU->getSlice()->getSliceIdx(); 574 575 // Check BottomRight Corner of referenced Block 576 UInt ctuAddrBR = refCTBPosY*pcCU->getPic()->getFrameWidthInCtus() + refCTBPosX; 577 UInt BRSliceIdx = pcCU->getPic()->getCtu( ctuAddrBR )->getSlice()->getSliceIdx(); 578 579 if( currSliceIdx != BRSliceIdx ) 580 { 581 printf("Error IBC reference across Slices uiDepth:%d absPartIdx:%d CurrCtu:%d CurrSliceIdx:%d ctuBR:%d refBRSliceIdx:%d mv(%d,%d) \n", uiDepth, pcCU->getZorderIdxInCtu(), pcCU->getCtuRsAddr(), currSliceIdx, ctuAddrBR, BRSliceIdx, cMv.getHor(), cMv.getVer() ); 582 fflush(stdout); 583 } 584 585 // AboveLeft Corner 586 Int refPosXAL = posX + cMv.getHor(); 587 Int refPosYAL = posY + cMv.getVer(); 588 // CTB Position 589 Int refCTBPosXAL = refPosXAL / uiMaxCuWidth; 590 Int refCTBPosYAL = refPosYAL / uiMaxCuHeight; 591 592 UInt ctuAddrAL = refCTBPosYAL*pcCU->getPic()->getFrameWidthInCtus() + refCTBPosXAL; 593 UInt ALSliceIdx = pcCU->getPic()->getCtu( ctuAddrAL )->getSlice()->getSliceIdx(); 594 595 if( currSliceIdx != ALSliceIdx ) 596 { 597 printf("Error IBC reference across Slices uiDepth:%d absPartIdx:%d CurrCtu:%d CurrSliceIdx:%d ctuAL:%d refALSliceIdx:%d mv(%d,%d) \n", uiDepth, pcCU->getZorderIdxInCtu(), pcCU->getCtuRsAddr(), currSliceIdx, ctuAddrAL, ALSliceIdx, cMv.getHor(), cMv.getVer() ); 598 fflush(stdout); 599 } 600 } 601 #endif 602 603 #endif 537 604 m_pcPrediction->intraBlockCopy( pcCU, m_ppcYuvReco[uiDepth], iPartIdx ); 538 605 } 539 606