Changeset 1210 in 3DVCSoftware
- Timestamp:
- 14 May 2015, 03:55:10 (10 years ago)
- Location:
- branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r1200 r1210 125 125 m_bDecSubCu = false; 126 126 127 #if H_3D_NBDV127 #if NH_3D_NBDV 128 128 m_pDvInfo = NULL; 129 129 #endif … … 208 208 } 209 209 210 #if H_3D_NBDV210 #if NH_3D_NBDV 211 211 m_pDvInfo = (DisInfo* )xMalloc(DisInfo, uiNumPartition); 212 212 #endif … … 463 463 m_acCUMvField[rpl].destroy(); 464 464 } 465 #if H_3D_NBDV465 #if NH_3D_NBDV 466 466 if ( m_pDvInfo ) { xFree(m_pDvInfo); m_pDvInfo = NULL; } 467 467 #endif … … 1078 1078 m_pePredMode=pcCU->getPredictionMode() + uiPart; 1079 1079 m_CUTransquantBypass = pcCU->getCUTransquantBypass()+uiPart; 1080 #if H_3D_NBDV1080 #if NH_3D_NBDV 1081 1081 m_pDvInfo = pcCU->getDvInfo() + uiPart; 1082 1082 #endif … … 1177 1177 } 1178 1178 1179 #if H_3D_NBDV1179 #if NH_3D_NBDV 1180 1180 Void TComDataCU::copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx) 1181 1181 { … … 1186 1186 // Copy inter prediction info from the biggest CU 1187 1187 Void TComDataCU::copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList 1188 #if H_3D_NBDV1188 #if NH_3D_NBDV 1189 1189 , Bool bNBDV 1190 1190 #endif … … 1217 1217 1218 1218 m_pePartSize = pcCU->getPartitionSize () + uiAbsPartIdx; 1219 #if H_3D_NBDV1219 #if NH_3D_NBDV 1220 1220 if(bNBDV == true) 1221 1221 { … … 1256 1256 1257 1257 m_acCUMvField[ eRefPicList ].linkToWithOffset( pcCU->getCUMvField(eRefPicList), uiAbsPartIdx ); 1258 #if H_3D_NBDV1258 #if NH_3D_NBDV 1259 1259 } 1260 1260 #endif … … 1413 1413 1414 1414 memcpy( pCtu->getQP() + m_absZIdxInCtu, m_phQP, sizeInChar ); 1415 #if H_3D_NBDV1416 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof(* m_pDvInfo)* m_uiNumPartition );1415 #if NH_3D_NBDV 1416 memcpy( pCtu->getDvInfo() + m_absZIdxInCtu, m_pDvInfo, sizeof(* m_pDvInfo) * m_uiNumPartition ); 1417 1417 #endif 1418 1418 … … 3120 3120 predFlag[iRefListIdX] = 1; 3121 3121 mvVSP[0+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3122 #if H_3D_NBDV3122 #if NH_3D_NBDV 3123 3123 mvVSP[0+iRefListIdX].getMv().setIDVFlag (false); 3124 3124 #endif … … 3172 3172 if(!bRemove) 3173 3173 { 3174 #if H_3D_NBDV3174 #if NH_3D_NBDV 3175 3175 if(iLoop) // For IvMcShift candidate 3176 3176 { … … 3539 3539 puhInterDirNeighbours[uiArrayAddr] = dir; 3540 3540 abCandIsInter[uiArrayAddr] = true; 3541 #if H_3D_NBDV3541 #if NH_3D_NBDV 3542 3542 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 3543 3543 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); … … 3711 3711 3712 3712 #if H_3D 3713 #if H_3D_NBDV3713 #if NH_3D_NBDV 3714 3714 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 3715 3715 { … … 4251 4251 if(!bRemoveSpa) 4252 4252 { 4253 #if H_3D_NBDV4253 #if NH_3D_NBDV 4254 4254 tmpMV[0].getMv().setIDVFlag (false); 4255 4255 tmpMV[1].getMv().setIDVFlag (false); … … 5758 5758 } 5759 5759 #endif 5760 #if H_3D_NBDV5760 #if NH_3D_NBDV 5761 5761 //Notes from QC: 5762 5762 //TBD#1: DoNBDV related contributions are just partially integrated under the marco of H_3D_NBDV_REF, remove this comment once DoNBDV and BVSP are done … … 5810 5810 ///*** Derive center position *** 5811 5811 UInt uiPartIdxCenter; 5812 Int uiLCUIdx = getAddr();5812 Int uiLCUIdx = getCtuRsAddr(); 5813 5813 xDeriveCenterIdx(uiPartIdx, uiPartIdxCenter ); 5814 5814 … … 5883 5883 if(pcTmpCU != NULL ) 5884 5884 { 5885 bCheckMcpDv = ( ( get Addr() - pcTmpCU->getAddr() ) == 0);5885 bCheckMcpDv = ( ( getCtuRsAddr() - pcTmpCU->getCtuRsAddr() ) == 0); 5886 5886 if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_ABOVE 5887 5887 #if H_3D_NBDV_REF … … 6080 6080 { 6081 6081 UInt uiPartIdx = 0; 6082 UInt uiNumPartInCUWidth = m_pcPic->getNumPartIn Width();6083 Int uiLCUIdx = get Addr();6082 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInCtuWidth(); 6083 Int uiLCUIdx = getCtuRsAddr(); 6084 6084 6085 6085 UInt uiPartIdxRB; … … 6087 6087 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 6088 6088 6089 if (( m_pcPic->getC U(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )6089 if (( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) 6090 6090 { 6091 6091 riLCUIdxRBNb = -1; 6092 6092 riPartIdxRBNb = -1; 6093 6093 } 6094 else if(( m_pcPic->getC U(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )6094 else if(( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 6095 6095 { 6096 6096 riLCUIdxRBNb = -1; … … 6100 6100 { 6101 6101 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 6102 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartIn Height() - 1 ) ) // is not at the last row of LCU6102 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInCtuHeight() - 1 ) ) // is not at the last row of LCU 6103 6103 { 6104 6104 riPartIdxRBNb = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; … … 6110 6110 riLCUIdxRBNb = -1; 6111 6111 } 6112 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartIn Height() - 1 ) // is not at the last row of LCU But is last column of LCU6112 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInCtuHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 6113 6113 { 6114 6114 riPartIdxRBNb = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; … … 6126 6126 Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth ) 6127 6127 { 6128 UInt uiCurrPartNumb = m_pcPic->getNumPartInC U() >> (uiDepth << 1);6128 UInt uiCurrPartNumb = m_pcPic->getNumPartInCtuWidth() >> (uiDepth << 1); 6129 6129 for (UInt ui = 0; ui < uiCurrPartNumb; ui++ ) 6130 6130 { … … 6145 6145 Int iColViewIdx, iColRefViewIdx; 6146 6146 TComPic *pColPic = getSlice()->getRefPic( eRefPicList, refidx); 6147 TComDataCU *pColCU = pColPic->getC U( uiCUAddr );6147 TComDataCU *pColCU = pColPic->getCtu( uiCUAddr ); 6148 6148 iColViewIdx = pColCU->getSlice()->getViewIndex(); 6149 if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)== SIZE_NONE||pColCU->isIntra(uiPartUnitIdx))6149 if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==NUMBER_OF_PART_SIZES||pColCU->isIntra(uiPartUnitIdx)) 6150 6150 { 6151 6151 return false; … … 6357 6357 6358 6358 Bool abPdmAvailable[8] = {false, false, false, false, false, false, false, false}; 6359 #if H_3D_NBDV6359 #if NH_3D_NBDV 6360 6360 for( Int i = 0; i < 8; i++) 6361 6361 { … … 6433 6433 abPdmAvailable[ uiCurrRefListId ] = true; 6434 6434 TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer()); 6435 #if H_3D_NBDV6435 #if NH_3D_NBDV 6436 6436 #if H_3D_IV_MERGE 6437 6437 if( !bIsDepth ) … … 6590 6590 abPdmAvailable[ (uiCurrRefListId + (iLoopCan<<2)) ] = true; 6591 6591 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 6592 #if H_3D_NBDV6592 #if NH_3D_NBDV 6593 6593 #if H_3D_IV_MERGE 6594 6594 if( !bIsDepth ) -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r1200 r1210 167 167 Char* m_apiMVPNum[NUM_REF_PIC_LIST_01]; ///< array of number of possible motion vectors predictors 168 168 Bool* m_pbIPCMFlag; ///< array of intra_pcm flags 169 #if H_3D_NBDV169 #if NH_3D_NBDV 170 170 DisInfo* m_pDvInfo; 171 171 #endif … … 282 282 Void initSubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp ); 283 283 Void setOutsideCUPart ( UInt uiAbsPartIdx, UInt uiDepth ); 284 #if H_3D_NBDV285 Void copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx);284 #if NH_3D_NBDV 285 Void copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx); 286 286 #endif 287 287 288 288 Void copySubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx ); 289 289 Void copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList 290 #if H_3D_NBDV290 #if NH_3D_NBDV 291 291 , Bool bNBDV = false 292 292 #endif … … 480 480 Void setIPCMFlag (UInt uiIdx, Bool b ) { m_pbIPCMFlag[uiIdx] = b; } 481 481 Void setIPCMFlagSubParts (Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth); 482 #if H_3D_NBDV482 #if NH_3D_NBDV 483 483 Void setDvInfoSubParts ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth ); 484 484 Void setDvInfoSubParts ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth); … … 486 486 DisInfo getDvInfo (UInt uiIdx) { return m_pDvInfo[uiIdx]; } 487 487 #endif 488 #if H_3D_NBDV488 #if NH_3D_NBDV 489 489 Void xDeriveRightBottomNbIdx(Int &uiLCUIdxRBNb, Int &uiPartIdxRBNb ); 490 490 Bool xCheckSpatialNBDV (TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paMvpDvInfo, -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComMotionInfo.h
r1196 r1210 60 60 } AMVPInfo; 61 61 62 #if H_3D_NBDV62 #if NH_3D_NBDV 63 63 typedef struct _DisCand 64 64 { -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComMv.h
r1200 r1210 57 57 Short m_iHor; ///< horizontal component of motion vector 58 58 Short m_iVer; ///< vertical component of motion vector 59 #if H_3D_NBDV59 #if NH_3D_NBDV 60 60 Bool m_bIDV; 61 61 Short m_iIDVHor; … … 72 72 m_iHor(0), 73 73 m_iVer(0) 74 #if H_3D_NBDV74 #if NH_3D_NBDV 75 75 , m_bIDV(false) 76 76 , m_iIDVHor(0) … … 84 84 m_iHor(iHor), 85 85 m_iVer(iVer) 86 #if H_3D_NBDV86 #if NH_3D_NBDV 87 87 , m_bIDV(false) 88 88 , m_iIDVHor(0) … … 101 101 Void setVer ( Short i ) { m_iVer = i; } 102 102 Void setZero () { m_iHor = m_iVer = 0; 103 #if H_3D_NBDV103 #if NH_3D_NBDV 104 104 m_bIDV = false; m_iIDVHor = m_iIDVVer = 0; 105 105 m_iIDVVId = 0; 106 106 #endif 107 107 } 108 #if H_3D_NBDV108 #if NH_3D_NBDV 109 109 Void setIDVHor (Short i) {m_iIDVHor = i;} 110 110 Void setIDVVer (Short i) {m_iIDVVer = i;} … … 120 120 Int getAbsHor () const { return abs( m_iHor ); } 121 121 Int getAbsVer () const { return abs( m_iVer ); } 122 #if H_3D_NBDV122 #if NH_3D_NBDV 123 123 Short getIDVHor () const { return m_iIDVHor; } 124 124 Short getIDVVer () const { return m_iIDVVer; } -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComPic.cpp
r1200 r1210 78 78 m_bReduceBitsQTL = 0; 79 79 #endif 80 #if H_3D_NBDV80 #if NH_3D_NBDV 81 81 m_iNumDdvCandPics = 0; 82 82 m_eRapRefList = REF_PIC_LIST_0; … … 303 303 #endif // NH_MV 304 304 305 #if H_3D_NBDV306 Int TComPic::getDisCandRefPictures( Int iColPOC)305 #if NH_3D_NBDV 306 Int TComPic::getDisCandRefPictures(Int iColPOC) 307 307 { 308 308 UInt uiTempLayerCurr = 7; … … 310 310 UInt numDdvCandPics = 0; 311 311 312 if ( !currSlice->getEnableTMVPFlag() ) 312 if(!currSlice->getEnableTMVPFlag()) 313 { 313 314 return numDdvCandPics; 315 } 314 316 315 317 numDdvCandPics += 1; … … 318 320 UInt pocDiff = 255; 319 321 320 for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr 321 { 322 UIntx = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag();323 324 for 322 for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr++) 323 { 324 Bool x = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag(); 325 326 for(UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++) 325 327 { 326 328 if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex() 327 && (x == currSlice->getColFromL0Flag()||currSlice->getRefPOC((RefPicList)x, i)!= iColPOC) && numDdvCandPics!=2)329 && (x == currSlice->getColFromL0Flag() || currSlice->getRefPOC((RefPicList)x, i) != iColPOC) && numDdvCandPics != 2) 328 330 { 329 331 TComSlice* refSlice = currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx()); 330 Bool bRAP = (refSlice->getViewIndex() && refSlice->isIRAP()) ? 1: 0;332 Bool bRAP = (refSlice->getViewIndex() && refSlice->isIRAP()) ? 1 : 0; 331 333 UInt uiTempLayer = currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer(); 332 334 333 if( bRAP)335 if(bRAP) 334 336 { 335 337 this->setRapRefIdx(i); … … 350 352 UInt idx = 0; 351 353 352 for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2 : 1); lpNr++)353 { 354 UInt x = lpNr? currSlice->getColFromL0Flag() : 1-currSlice->getColFromL0Flag();354 for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2 : 1); lpNr++) 355 { 356 Bool x = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag(); 355 357 356 for 358 for(UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++) 357 359 { 358 360 Int iTempPoc = currSlice->getRefPic((RefPicList)x, i)->getPOC(); 359 Int iTempDiff = (iTempPoc > pocCurr) ? (iTempPoc - pocCurr) : (pocCurr - iTempPoc);361 Int iTempDiff = (iTempPoc > pocCurr) ? (iTempPoc - pocCurr) : (pocCurr - iTempPoc); 360 362 361 if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex() && (x == currSlice->getColFromL0Flag()||currSlice->getRefPOC((RefPicList)x, i)!= iColPOC)362 && currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer() == uiTempLayerCurr && pocDiff > iTempDiff)363 if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex() && (x == currSlice->getColFromL0Flag() || currSlice->getRefPOC((RefPicList)x, i) != iColPOC) 364 && currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer() == uiTempLayerCurr && pocDiff > iTempDiff) 363 365 { 364 366 pocDiff = iTempDiff; … … 369 371 } 370 372 371 if( pocDiff < 255)373 if(pocDiff < 255) 372 374 { 373 375 this->setRapRefIdx(idx); 374 this->setRapRefList((RefPicList) z 376 this->setRapRefList((RefPicList) z); 375 377 numDdvCandPics = 2; 376 378 } … … 383 385 TComSlice* currSlice = getSlice(getCurrSliceIdx()); 384 386 const Int numCandPics = this->getNumDdvCandPics(); 387 385 388 for(Int curCandPic = 0; curCandPic < numCandPics; curCandPic++) 386 389 { 387 390 RefPicList eCurRefPicList = REF_PIC_LIST_0 ; 388 391 Int curCandPicRefIdx = 0; 389 if( curCandPic == 0)392 if(curCandPic == 0) 390 393 { 391 eCurRefPicList = RefPicList(currSlice->isInterB() ? 1 -currSlice->getColFromL0Flag() : 0);394 eCurRefPicList = RefPicList(currSlice->isInterB() ? 1 - currSlice->getColFromL0Flag() : 0); 392 395 curCandPicRefIdx = currSlice->getColRefIdx(); 393 396 } … … 397 400 curCandPicRefIdx = this->getRapRefIdx(); 398 401 } 399 TComPic* pcCandColPic = currSlice->getRefPic( eCurRefPicList, curCandPicRefIdx); 400 TComSlice* pcCandColSlice = pcCandColPic->getSlice(0);// currently only support single slice 402 403 TComPic* pcCandColPic = currSlice->getRefPic(eCurRefPicList, curCandPicRefIdx); 404 TComSlice* pcCandColSlice = pcCandColPic->getSlice(0); // currently only support single slice 401 405 402 406 if(!pcCandColSlice->isIntra()) 403 407 { 404 for( Int iColRefDir = 0; iColRefDir < (pcCandColSlice->isInterB() ? 2: 1); iColRefDir ++)405 { 406 for( Int iColRefIdx =0; iColRefIdx < pcCandColSlice->getNumRefIdx(( RefPicList )iColRefDir); iColRefIdx++)408 for(Int iColRefDir = 0; iColRefDir < (pcCandColSlice->isInterB() ? 2 : 1); iColRefDir++) 409 { 410 for(Int iColRefIdx = 0; iColRefIdx < pcCandColSlice->getNumRefIdx((RefPicList)iColRefDir); iColRefIdx++) 407 411 { 408 412 m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = false; 409 413 Int iColViewIdx = pcCandColSlice->getViewIndex(); 410 Int iColRefViewIdx = pcCandColSlice->getRefPic( ( RefPicList)iColRefDir, iColRefIdx)->getViewIndex();414 Int iColRefViewIdx = pcCandColSlice->getRefPic((RefPicList)iColRefDir, iColRefIdx)->getViewIndex(); 411 415 if(iColViewIdx == iColRefViewIdx) 416 { 412 417 continue; 413 414 for(Int iCurrRefDir = 0;(iCurrRefDir < (currSlice->isInterB() ? 2: 1)) && (m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] == false ); iCurrRefDir++) 418 } 419 420 for(Int iCurrRefDir = 0; (iCurrRefDir < (currSlice->isInterB() ? 2 : 1)) && (m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] == false); iCurrRefDir++) 415 421 { 416 for( Int iCurrRefIdx =0; iCurrRefIdx < currSlice->getNumRefIdx(( RefPicList )iCurrRefDir); iCurrRefIdx++)422 for(Int iCurrRefIdx = 0; iCurrRefIdx < currSlice->getNumRefIdx((RefPicList)iCurrRefDir); iCurrRefIdx++) 417 423 { 418 if( currSlice->getRefPic( ( RefPicList )iCurrRefDir, iCurrRefIdx )->getViewIndex() == iColRefViewIdx)424 if(currSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iColRefViewIdx) 419 425 { 420 426 m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = true; … … 428 434 } 429 435 } 436 430 437 Bool TComPic::isTempIVRefValid(Int currCandPic, Int iColRefDir, Int iColRefIdx) 431 438 { … … 433 440 } 434 441 435 Void TComPic::checkTextureRef( 442 Void TComPic::checkTextureRef() 436 443 { 437 444 TComSlice* pcCurrSlice = getSlice(getCurrSliceIdx()); 438 TComPic* pcTextPic = pcCurrSlice->get TexturePic();445 TComPic* pcTextPic = pcCurrSlice->getIvPic(0, getViewIndex()); 439 446 #if H_3D_FCO 440 447 if ( pcTextPic ) 441 448 { 442 449 #endif 443 444 450 TComSlice* pcTextSlice = pcTextPic->getSlice(0); // currently only support single slice 445 451 446 for( Int iTextRefDir = 0; (iTextRefDir < (pcTextSlice->isInterB()? 2:1) ) && !pcTextSlice->isIntra(); iTextRefDir ++)447 { 448 for( Int iTextRefIdx =0; iTextRefIdx<pcTextSlice->getNumRefIdx(( RefPicList )iTextRefDir); iTextRefIdx++)449 { 450 Int iTextRefPOC = pcTextSlice->getRefPOC( ( RefPicList)iTextRefDir, iTextRefIdx);451 Int iTextRefViewId = pcTextSlice->getRefPic( ( RefPicList)iTextRefDir, iTextRefIdx)->getViewIndex();452 for(Int iTextRefDir = 0; (iTextRefDir < (pcTextSlice->isInterB() ? 2 :1) ) && !pcTextSlice->isIntra(); iTextRefDir++) 453 { 454 for(Int iTextRefIdx =0; iTextRefIdx < pcTextSlice->getNumRefIdx((RefPicList)iTextRefDir); iTextRefIdx++) 455 { 456 Int iTextRefPOC = pcTextSlice->getRefPOC((RefPicList)iTextRefDir, iTextRefIdx); 457 Int iTextRefViewId = pcTextSlice->getRefPic((RefPicList)iTextRefDir, iTextRefIdx)->getViewIndex(); 452 458 m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = -1; 453 459 Int iCurrRefDir = iTextRefDir; 454 for( Int iCurrRefIdx =0; ( iCurrRefIdx<pcCurrSlice->getNumRefIdx(( RefPicList )iCurrRefDir ) ) && ( m_aiTexToDepRef[iTextRefDir][iTextRefIdx] < 0 ) ; iCurrRefIdx++) 460 461 for(Int iCurrRefIdx = 0; (iCurrRefIdx<pcCurrSlice->getNumRefIdx((RefPicList)iCurrRefDir)) && (m_aiTexToDepRef[iTextRefDir][iTextRefIdx] < 0); iCurrRefIdx++) 455 462 { 456 if( pcCurrSlice->getRefPOC( ( RefPicList)iCurrRefDir, iCurrRefIdx ) == iTextRefPOC &&457 pcCurrSlice->getRefPic( ( RefPicList )iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId)463 if(pcCurrSlice->getRefPOC((RefPicList)iCurrRefDir, iCurrRefIdx ) == iTextRefPOC && 464 pcCurrSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId) 458 465 { 459 466 m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = iCurrRefIdx; … … 461 468 } 462 469 } 463 464 470 } 465 471 #if H_3D_FCO -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComPic.h
r1200 r1210 97 97 Bool m_bReduceBitsQTL; 98 98 #endif 99 #if H_3D_NBDV99 #if NH_3D_NBDV 100 100 UInt m_uiRapRefIdx; 101 101 RefPicList m_eRapRefList; 102 102 Int m_iNumDdvCandPics; 103 Bool m_abTIVRINCurrRL 103 Bool m_abTIVRINCurrRL [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists 104 104 Int m_aiTexToDepRef [2][MAX_NUM_REF]; 105 105 #endif … … 209 209 Void print( Bool legend ); 210 210 #endif 211 #if H_3D_NBDV211 #if NH_3D_NBDV 212 212 Int getNumDdvCandPics() {return m_iNumDdvCandPics; } 213 213 Int getDisCandRefPictures(Int iColPOC); -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp
r1200 r1210 1480 1480 TComPic* pcPicYuvBaseRef = NULL; 1481 1481 1482 #if H_3D_NBDV1482 #if NH_3D_NBDV 1483 1483 DisInfo cDistparity; 1484 1484 cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV; -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp
r1200 r1210 3585 3585 #endif 3586 3586 } 3587 #if H_3D3588 Void TComSlice::setDefaultRefView( 3589 { 3590 setDefaultRefViewIdx( -1);3591 setDefaultRefViewIdxAvailableFlag( false);3587 #if NH_3D_NBDV 3588 Void TComSlice::setDefaultRefView() 3589 { 3590 setDefaultRefViewIdx(-1); 3591 setDefaultRefViewIdxAvailableFlag(false); 3592 3592 3593 3593 Int valid = 0; 3594 3594 Int DefaultRefViewIdx = -1; 3595 for( UInt curViewIdx = 0; curViewIdx < getViewIndex() && valid == 0; curViewIdx++ ) 3596 { 3597 for( Int iRefListId = 0; ( iRefListId < (isInterB() ? 2 : 1) ) && !isIntra() && valid == 0; iRefListId++ ) 3598 { 3599 RefPicList eRefPicList = RefPicList( iRefListId ); 3600 Int iNumRefPics = getNumRefIdx( eRefPicList ); 3601 for( Int i = 0; i < iNumRefPics; i++ ) 3595 3596 for(UInt curViewIdx = 0; curViewIdx < getViewIndex() && valid == 0; curViewIdx++) 3597 { 3598 for(Int iRefListId = 0; (iRefListId < (isInterB() ? 2 : 1)) && !isIntra() && valid == 0; iRefListId++) 3599 { 3600 RefPicList eRefPicList = RefPicList(iRefListId); 3601 Int iNumRefPics = getNumRefIdx(eRefPicList); 3602 3603 for(Int i = 0; i < iNumRefPics; i++) 3602 3604 { 3603 if(getPOC() == getRefPic( eRefPicList, i )->getPOC() && curViewIdx == getRefPic( eRefPicList, i)->getViewIndex())3605 if(getPOC() == getRefPic(eRefPicList, i)->getPOC() && curViewIdx == getRefPic(eRefPicList, i)->getViewIndex()) 3604 3606 { 3605 3607 valid = 1; … … 3610 3612 } 3611 3613 } 3612 if( valid ) 3613 { 3614 setDefaultRefViewIdx( DefaultRefViewIdx ); 3615 setDefaultRefViewIdxAvailableFlag( true ); 3614 3615 if(valid) 3616 { 3617 setDefaultRefViewIdx(DefaultRefViewIdx); 3618 setDefaultRefViewIdxAvailableFlag(true); 3616 3619 } 3617 3620 } -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComSlice.h
r1200 r1210 3073 3073 Int getMpiSubPbSize ( ) { return m_mpiSubPbSize ; }; 3074 3074 Int getSubPbSize ( ) { return m_subPbSize ; }; 3075 #if NH_3D_NBDV 3076 Int getDefaultRefViewIdx() { return m_iDefaultRefViewIdx; } 3077 Void setDefaultRefViewIdx(Int iViewIdx) { m_iDefaultRefViewIdx = iViewIdx; } 3078 3079 Bool getDefaultRefViewIdxAvailableFlag() { return m_bDefaultRefViewIdxAvailableFlag; } 3080 Void setDefaultRefViewIdxAvailableFlag(Bool bViewIdx) { m_bDefaultRefViewIdxAvailableFlag = bViewIdx; } 3081 Void setDefaultRefView( ); 3082 #endif 3075 3083 #endif 3076 3084 // Inference -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r1201 r1210 69 69 #if NH_3D 70 70 #define NH_3D_VSO 1 71 #define NH_3D_NBDV 1 71 72 #endif 72 73 … … 122 123 // SEC_IC_NEIGHBOR_CLIP_I0080 // Clipping of neighboring sample position, JCT3V-I0080 123 124 // LGE_CHROMA_IC_J0050_J0034 124 #if H_3D_NBDV125 #if NH_3D_NBDV 125 126 #define H_3D_NBDV_REF 1 // Depth oriented neighboring block disparity derivation 126 127 // MTK_D0156 … … 287 288 #endif 288 289 //// ****** NEIGHBOURING BLOCK-BASED DISPARITY VECTOR ********* 289 #if H_3D_NBDV290 #if NH_3D_NBDV 290 291 #define DVFROM_LEFT 0 291 292 #define DVFROM_ABOVE 1 -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp
r1200 r1210 283 283 pcCU->setQPSubParts( pcCU->getRefQP(uiAbsPartIdx), uiAbsPartIdx, uiDepth ); // set QP to default QP 284 284 } 285 #if H_3D_NBDV285 #if NH_3D_NBDV 286 286 DisInfo DvInfo; 287 287 DvInfo.m_acNBDV.setZero(); … … 307 307 #endif 308 308 { 309 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true);310 m_ppcCU[uiDepth]->copyDVInfoFrom( 309 m_ppcCU[uiDepth]->copyInterPredInfoFrom(pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true); 310 m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx); 311 311 PartSize ePartTemp = m_ppcCU[uiDepth]->getPartitionSize(0); 312 312 UChar cWidTemp = m_ppcCU[uiDepth]->getWidth(0); 313 313 UChar cHeightTemp = m_ppcCU[uiDepth]->getHeight(0); 314 m_ppcCU[uiDepth]->setWidth ( 0, pcCU->getSlice()->getSPS()->getMaxCUWidth ()/(1<<uiDepth));315 m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth));316 m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth);314 m_ppcCU[uiDepth]->setWidth (0, pcCU->getSlice()->getSPS()->getMaxCUWidth () / (1 << uiDepth)); 315 m_ppcCU[uiDepth]->setHeight(0, pcCU->getSlice()->getSPS()->getMaxCUHeight() / (1 << uiDepth)); 316 m_ppcCU[uiDepth]->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth); 317 317 #if H_3D_IV_MERGE 318 318 if( pcCU->getSlice()->getIsDepth()) … … 346 346 } 347 347 #endif 348 349 348 pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth); 350 m_ppcCU[uiDepth]->setPartSizeSubParts( ePartTemp, 0, uiDepth);351 m_ppcCU[uiDepth]->setWidth ( 0, cWidTemp);352 m_ppcCU[uiDepth]->setHeight ( 0, cHeightTemp);349 m_ppcCU[uiDepth]->setPartSizeSubParts(ePartTemp, 0, uiDepth); 350 m_ppcCU[uiDepth]->setWidth(0, cWidTemp); 351 m_ppcCU[uiDepth]->setHeight(0, cHeightTemp); 353 352 } 354 353 } -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibDecoder/TDecGop.cpp
r1200 r1210 122 122 } 123 123 124 #if H_3D_NBDV124 #if NH_3D_NBDV 125 125 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 126 126 { 127 Int iColPoc = pcSlice->getRefPOC(RefPicList(1 -pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());128 rpcPic->setNumDdvCandPics(rpcPic->getDisCandRefPictures(iColPoc));127 Int iColPoc = pcSlice->getRefPOC(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx()); 128 pcPic->setNumDdvCandPics(pcPic->getDisCandRefPictures(iColPoc)); 129 129 } 130 130 131 131 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 132 132 { 133 rpcPic->checkTemporalIVRef();133 pcPic->checkTemporalIVRef(); 134 134 } 135 135 136 136 if(pcSlice->getIsDepth()) 137 137 { 138 rpcPic->checkTextureRef();138 pcPic->checkTextureRef(); 139 139 } 140 140 #endif -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibDecoder/TDecTop.cpp
r1200 r1210 1142 1142 pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr); 1143 1143 pcSlice->setRefPicList ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 1144 #if H_3D1144 #if NH_3D_NBDV 1145 1145 pcSlice->setDefaultRefView(); 1146 1146 #endif -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp
r1200 r1210 441 441 Bool earlyDetectionSkipMode = false; 442 442 443 #if H_3D_VSP443 #if NH_3D_NBDV 444 444 DisInfo DvInfo; 445 445 DvInfo.m_acNBDV.setZero(); … … 584 584 #endif 585 585 586 #if H_3D_NBDV586 #if NH_3D_NBDV 587 587 if( rpcTempCU->getSlice()->getSliceType() != I_SLICE ) 588 588 { … … 602 602 { 603 603 PartSize ePartTemp = rpcTempCU->getPartitionSize(0); 604 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );604 rpcTempCU->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth); 605 605 #if H_3D_IV_MERGE 606 606 if (rpcTempCU->getSlice()->getIsDepth() ) -
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp
r1200 r1210 1471 1471 pcSlice->setRefPicList ( rcListPic ); 1472 1472 #endif 1473 #if H_3D1473 #if NH_3D_NBDV 1474 1474 pcSlice->setDefaultRefView(); 1475 1475 #endif … … 1731 1731 UInt uiNumSliceSegments = 1; 1732 1732 1733 #if H_3D_NBDV1733 #if NH_3D_NBDV 1734 1734 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 1735 1735 { 1736 Int iColPoc = pcSlice->getRefPOC(RefPicList(1 -pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());1736 Int iColPoc = pcSlice->getRefPOC(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx()); 1737 1737 pcPic->setNumDdvCandPics(pcPic->getDisCandRefPictures(iColPoc)); 1738 1738 } … … 1743 1743 #endif 1744 1744 1745 #if H_3D_NBDV1745 #if NH_3D_NBDV 1746 1746 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 1747 1747 {
Note: See TracChangeset for help on using the changeset viewer.