Changeset 167 in 3DVCSoftware for branches/HTM-4.1-dev1-Qualcomm
- Timestamp:
- 5 Nov 2012, 02:24:25 (12 years ago)
- Location:
- branches/HTM-4.1-dev1-Qualcomm/source/Lib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r163 r167 3513 3513 { 3514 3514 #if LGE_DVMCP 3515 #if LGE_IVMP_PARALLEL_MERGE_B0136 3515 #if LGE_IVMP_PARALLEL_MERGE_B0136 && !QC_SIMPLE_NBDV_B0047 3516 3516 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true, REF_PIC_LIST_X, -1, true ); 3517 3517 #else 3518 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true ); 3518 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo 3519 #if LGE_IVMP_PARALLEL_MERGE_B0136==QC_SIMPLE_NBDV_B0047 3520 , 3521 true 3522 #endif 3523 ); 3519 3524 #endif 3520 3525 #else … … 4901 4906 4902 4907 #if LGE_DVMCP 4908 #if QC_SIMPLE_NBDV_B0047 4909 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo 4910 #if LGE_IVMP_PARALLEL_MERGE_B0136 4911 , Bool bParMerge 4912 #endif 4913 #else 4903 4914 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0 4904 4915 #if LGE_IVMP_PARALLEL_MERGE_B0136 4905 4916 , Bool bParMerge 4906 4917 #endif 4918 #endif 4907 4919 ) 4908 4920 { 4909 4921 PartSize eCUMode = getPartitionSize( uiPartAddr ); 4910 4922 TComDataCU* pcTmpCU = NULL; 4923 #if !QC_SIMPLE_NBDV_B0047 4911 4924 TComDataCU* pcCULeft = NULL; 4925 #endif 4912 4926 pDInfo->iN = 0; 4913 4927 … … 4917 4931 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 4918 4932 4919 Int aiDvMcpDvCand[2][7] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal, DV-MCP ÁÖº¯ ºúÓ°¿¡¼ »ç¿E?DV¸¦ ÀúÀE 4933 #if QC_SIMPLE_NBDV_B0047 4934 const Int iNumofDvMCP = 7; 4935 Int aiDvMcpDvCand[2][iNumofDvMCP] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 4936 Bool abDvMcpFlag [2][iNumofDvMCP] = {{false,},{false,}}; 4937 #else 4938 Int aiDvMcpDvCand[2][7] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 4920 4939 Bool abDvMcpFlag [2][7] = {{false,},{false,}}; 4921 4940 //Int aiRefPOC [2][7] = {{-1,},{-1}}; // debug 4941 #endif 4922 4942 TComMv cTmpMvPred, cMv; 4923 4943 Bool bTmpIsSkipped = false; … … 4958 4978 #endif 4959 4979 4960 4980 #if !QC_SIMPLE_NBDV_B0047 4961 4981 pcCULeft = pcTmpCU; 4962 4982 UInt uiLeftPartIdx = uiIdx; 4983 #endif 4984 4963 4985 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4964 4986 { … … 5212 5234 if ( getSlice()->getPPS()->getEnableTMVPFlag() ) 5213 5235 { 5236 #if !QC_SIMPLE_NBDV_B0047 5214 5237 UInt uiPUIdx = uiPartIdx; 5215 5238 UInt uiAbsPartAddr = uiPartAddr; … … 5369 5392 } 5370 5393 } 5394 #else 5395 TComMv cColMv; 5396 Int iTargetViewIdx = 0; 5397 Int iTStartViewIdx = 0; 5398 UInt uiPartIdxRB, uiBRIdx; 5399 Int uiViewIdxCurr= getSlice()->getViewId(); 5400 UInt uiPartIdxCenter; 5401 xDeriveCenterIdx( eCUMode, uiPartIdx, uiPartIdxCenter ); 5402 5403 Int uiLCUIdx = getAddr(); 5404 Int uiLCUnew = uiLCUIdx; 5405 eCUMode = getPartitionSize( 0 ); 5406 deriveRightBottomIdx( eCUMode, uiPartIdx, uiPartIdxRB ); 5407 uiBRIdx = uiPartIdxLT; 5408 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 5409 if ( (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) &&(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() )) // image boundary check 5410 { 5411 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 5412 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row of LCU 5413 { 5414 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; 5415 } 5416 else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) // is not at the last column of LCU But is last row of LCU 5417 { 5418 uiBRIdx = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 5419 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU(); 5420 } 5421 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 5422 { 5423 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; 5424 uiLCUnew = uiLCUIdx + 1; 5425 } 5426 else //is the right bottom corner of LCU 5427 { 5428 uiBRIdx = 0; 5429 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU() + 1; 5430 } 5431 } 5432 const Int iNumofCandPic = 2; 5433 for(Int i =0; i < iNumofCandPic; i++) 5434 { 5435 Int lpRef=0; 5436 if(i == 0) 5437 { //check the col-located picture 5438 eRefPicList = RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0); 5439 #if COLLOCATED_REF_IDX 5440 lpRef = getSlice()->getColRefIdx(); 5441 #else 5442 Int lpRef = 0; 5443 #endif 5444 } 5445 else 5446 { 5447 if(!(getPic()->getRapbCheck())) 5448 break; 5449 eRefPicList=getPic()->getRapRefList(); 5450 lpRef=getPic()->getRapRefIdx(); 5451 } 5452 5453 if( m_pcSlice->getViewId() == getSlice()->getRefPic( eRefPicList, lpRef)->getViewId() ) 5454 { 5455 if (uiViewIdxCurr > 1) 5456 { 5457 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 5458 { 5459 clipMv(cColMv); 5460 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 5461 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 5462 return ; 5463 } 5464 } 5465 5466 if(xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiPartIdxCenter, cColMv, iTargetViewIdx, iTStartViewIdx )) 5467 { 5468 clipMv(cColMv); 5469 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 5470 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 5471 return ; 5472 } 5473 if(uiViewIdxCurr == 1) 5474 { 5475 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 5476 { 5477 clipMv(cColMv); 5478 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 5479 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 5480 return ; 5481 } 5482 } 5483 } 5484 } 5485 #endif 5371 5486 } // if TMVP Flag 5372 5487 5373 5488 if( bDvMcpIsFound ) // skip dvmcp 5374 5489 { 5490 #if QC_SIMPLE_NBDV_B0047 5491 for( Int i=1 ; i<iNumofDvMCP-1 ; i++ ) // 5 spatial 5492 #else 5375 5493 for( Int i=1 ; i<7 ; i++ ) // 5 spatial + 1 temporal 5494 #endif 5376 5495 { 5377 5496 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5389 5508 } 5390 5509 } 5391 5392 5510 return; 5393 5394 } 5395 #endif 5396 5511 } 5512 #endif 5397 5513 #endif 5398 5514 … … 5434 5550 cDisInfo.iN = 0; 5435 5551 #if LGE_DVMCP 5552 #if QC_SIMPLE_NBDV_B0047 5553 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo); 5554 #else 5436 5555 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx ); 5556 #endif 5437 5557 #else 5438 5558 getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo ); … … 5486 5606 { 5487 5607 #if LGE_DVMCP 5608 #if QC_SIMPLE_NBDV_B0047 5609 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo); 5610 #else 5488 5611 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx ); 5612 #endif 5489 5613 #else 5490 5614 getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo ); … … 6172 6296 Bool TComDataCU::xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx ) 6173 6297 { 6174 #if LGE_DVMCP 6298 #if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047 6175 6299 Int iDvMcpDispX[2] = {-1,}; 6176 6300 Bool bDvMcpFlag [2] = { false, }; … … 6191 6315 return false; 6192 6316 } 6193 #if LGE_DVMCP 6317 #if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047 6194 6318 Bool bColIsSkipped = pColCU->isSkipped( uiAbsPartAddr ); 6195 6319 #endif … … 6215 6339 if ( iColViewIdx == iColRefViewIdx ) // temporal vector 6216 6340 { 6217 #if LGE_DVMCP 6341 #if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047 6218 6342 if( iColViewIdx >0 ) 6219 6343 { … … 6242 6366 } 6243 6367 6244 #if LGE_DVMCP 6368 #if LGE_DVMCP && !QC_SIMPLE_NBDV_B0047 6245 6369 for( Int ilist=0 ; ilist<2 ; ilist++ ) 6246 6370 { … … 7360 7484 m_pePartSize[0] = SIZE_2Nx2N; 7361 7485 #if LGE_DVMCP 7486 #if QC_SIMPLE_NBDV_B0047 7487 getDisMvpCand2( 0, 0, &cDisInfo); 7488 #else 7362 7489 getDisMvpCand2( 0, 0, &cDisInfo, true ); 7490 #endif 7363 7491 #else 7364 7492 getDisMvpCand ( 0, 0, &cDisInfo ); -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r163 r167 538 538 Void getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo ); 539 539 #if LGE_DVMCP 540 #if QC_SIMPLE_NBDV_B0047 541 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo 542 #if LGE_IVMP_PARALLEL_MERGE_B0136 543 , Bool bParMerg = false 544 #endif 545 ); 546 #else 540 547 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1 541 548 #if LGE_IVMP_PARALLEL_MERGE_B0136 … … 543 550 #endif 544 551 ); 552 #endif 545 553 #endif 546 554 -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComPic.cpp
r100 r167 81 81 m_aaiCodedScale = 0; 82 82 m_aaiCodedOffset = 0; 83 #if QC_SIMPLE_NBDV_B0047 84 m_bRapCheck = false; 85 m_eRapRefList = REF_PIC_LIST_0; 86 m_uiRapRefIdx = 0; 87 #endif 88 83 89 } 84 90 … … 480 486 } 481 487 } 488 #if QC_SIMPLE_NBDV_B0047 489 Bool TComPic::getDisCandRefPictures(Int iColPOC) 490 { 491 UInt uiTempLayerCurr=7; 492 TComSlice* currSlice = getCurrSlice(); 493 UInt iPOCCurr=currSlice->getPOC(); 494 UInt iPOCDiff = 255; 495 Bool bRAP=false; 496 Bool bCheck = false; 497 Int MaxRef = currSlice->getNumRefIdx(RefPicList(0)); 498 RefPicList eRefPicList = REF_PIC_LIST_0 ; 499 if(currSlice->isInterB()) 500 { 501 if(currSlice->getNumRefIdx(RefPicList(0))< currSlice->getNumRefIdx(RefPicList(1))) 502 MaxRef = currSlice->getNumRefIdx(RefPicList(1)); 503 } 504 for(Int lpRef = 0; lpRef < MaxRef; lpRef++) 505 { 506 for(Int lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr ++) 507 { 508 eRefPicList = RefPicList(0); 509 if(currSlice->isInterB()) 510 eRefPicList = RefPicList(lpNr==0 ? (currSlice->getColDir()): (1-currSlice->getColDir())); 511 if(iColPOC == currSlice->getRefPOC(eRefPicList, lpRef)) 512 continue; 513 if(lpRef >= currSlice->getNumRefIdx(eRefPicList)||(currSlice->getViewId() != currSlice->getRefPic( eRefPicList, lpRef)->getViewId())) 514 continue; 515 Int iTempPoc = currSlice->getRefPic(eRefPicList, lpRef)->getPOC(); 516 UInt uiTempLayer = currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getTLayer(); 517 Int iTempDiff = (iTempPoc > iPOCCurr) ? (iTempPoc - iPOCCurr): (iPOCCurr - iTempPoc); 518 bRAP = (currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV? 1:0); 519 if( bRAP) 520 { 521 bCheck = true; 522 this->setRapRefIdx(lpRef); 523 this->setRapRefList(eRefPicList); 524 return bCheck; 525 } 526 if(uiTempLayerCurr > uiTempLayer) 527 { 528 bCheck = true; 529 if(uiTempLayerCurr == uiTempLayer) 530 { 531 if(iPOCDiff > iTempDiff) 532 { 533 iPOCDiff=iTempDiff; 534 if(iPOCDiff < 255) 535 { 536 this->setRapRefIdx(lpRef); 537 this->setRapRefList(eRefPicList); 538 } 539 } 540 } 541 else 542 { 543 iPOCDiff=iTempDiff; 544 uiTempLayerCurr = uiTempLayer; 545 this->setRapRefIdx(lpRef); 546 this->setRapRefList(eRefPicList); 547 } 548 } 549 } 550 } 551 return bCheck; 552 } 553 #endif 482 554 483 555 #if HHI_INTERVIEW_SKIP -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TComPic.h
r126 r167 82 82 Bool m_checked; 83 83 #endif 84 #if QC_SIMPLE_NBDV_B0047 85 UInt m_uiRapRefIdx; 86 RefPicList m_eRapRefList; 87 Bool m_bRapCheck; 88 #endif 84 89 #endif 85 90 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 173 178 #if HHI_INTER_VIEW_RESIDUAL_PRED 174 179 TComPicYuv* getResidual() { return m_pcResidual; } 180 #endif 181 #if QC_SIMPLE_NBDV_B0047 182 UInt getRapRefIdx() {return m_uiRapRefIdx;} 183 RefPicList getRapRefList() {return m_eRapRefList;} 184 Void setRapRefIdx(UInt uiRapRefIdx) {m_uiRapRefIdx = uiRapRefIdx;} 185 Void setRapRefList(RefPicList eRefPicList) {m_eRapRefList = eRefPicList;} 186 Bool getRapbCheck() {return m_bRapCheck;} 187 Void setRapbCheck(Bool bCheck) {m_bRapCheck = bCheck;} 188 Bool getDisCandRefPictures(Int iColPOC); 175 189 #endif 176 190 -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r163 r167 77 77 #define DIS_CANS 1 78 78 #endif 79 79 #define QC_SIMPLE_NBDV_B0047 1 //JCT2-B0047 80 80 #define MTK_INTERVIEW_MERGE_A0049 1 // JCT2-A0049 second part 81 81 #define SHARP_INTERVIEW_DECOUPLE_B0111 1 // JCT3V-B0111 decoupling inter-view candidate -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibDecoder/TDecGop.cpp
r100 r167 312 312 #endif 313 313 314 #if QC_SIMPLE_NBDV_B0047 315 if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode()) 316 { 317 Int iColPoc = pcSlice->getRefPOC(RefPicList(pcSlice->getColDir()), pcSlice->getColRefIdx()); 318 rpcPic->setRapbCheck(rpcPic->getDisCandRefPictures(iColPoc)); 319 } 320 #endif 314 321 315 322 m_pcSbacDecoders[0].load(m_pcSbacDecoder); -
branches/HTM-4.1-dev1-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp
r120 r167 719 719 #endif 720 720 721 #if QC_SIMPLE_NBDV_B0047 722 if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode()) 723 { 724 Int iColPoc = pcSlice->getRefPOC(RefPicList(pcSlice->getColDir()), pcSlice->getColRefIdx()); 725 pcPic->setRapbCheck(pcPic->getDisCandRefPictures(iColPoc)); 726 } 727 #endif 721 728 while(uiNextCUAddr<uiRealEndAddress) // determine slice boundaries 722 729 {
Note: See TracChangeset for help on using the changeset viewer.