Changeset 1210 in 3DVCSoftware for branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComPic.cpp
- Timestamp:
- 14 May 2015, 03:55:10 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset for help on using the changeset viewer.