Changeset 177 in 3DVCSoftware for branches/HTM-4.1-dev2-RWTH/source/App
- Timestamp:
- 10 Nov 2012, 19:05:41 (12 years ago)
- Location:
- branches/HTM-4.1-dev2-RWTH/source/App/TAppEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.1-dev2-RWTH/source/App/TAppEncoder/TAppEncCfg.cpp
r152 r177 476 476 #if HHI_MPI 477 477 ("MVI", m_bUseMVI, false, "use motion vector inheritance for depth map coding") 478 #endif 479 #if RWTH_SDC_DLT_B0036 480 ("DLT", m_bUseDLT, true, "Enables Depth Lookup Table") 481 ("SDC", m_bUseSDC, true, "Enabled Simplified Depth Coding") 478 482 #endif 479 483 ; … … 1746 1750 printf("MVI:%d ", m_bUseMVI ? 1 : 0 ); 1747 1751 #endif 1752 #if RWTH_SDC_DLT_B0036 1753 printf("SDC:%d ", m_bUseSDC ? 1 : 0 ); 1754 printf("DLT:%d ", m_bUseDLT ? 1 : 0 ); 1755 #endif 1748 1756 #if LGE_WVSO_A0119 1749 1757 if ( m_bUseWVSO ) -
branches/HTM-4.1-dev2-RWTH/source/App/TAppEncoder/TAppEncCfg.h
r152 r177 269 269 Bool m_bUseMVI; ///< flag for using Motion Vector Inheritance for depth map coding 270 270 #endif 271 #if RWTH_SDC_DLT_B0036 272 Bool m_bUseDLT; 273 Bool m_bUseSDC; 274 #endif 271 275 272 276 Int m_useScalingListId; ///< using quantization matrix -
branches/HTM-4.1-dev2-RWTH/source/App/TAppEncoder/TAppEncTop.cpp
r156 r177 373 373 m_acTEncTopList[iViewIdx]->setUseMVI( false ); 374 374 #endif 375 #if RWTH_SDC_DLT_B0036 376 m_acTEncTopList[iViewIdx]->setUseDLT ( false ); 377 m_acTEncTopList[iViewIdx]->setUseSDC ( false ); 378 #endif 375 379 } 376 380 if( m_bUsingDepthMaps ) … … 655 659 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 656 660 #endif 661 #if RWTH_SDC_DLT_B0036 662 m_acTEncDepthTopList[iViewIdx]->setUseDLT ( m_bUseDLT ); 663 m_acTEncDepthTopList[iViewIdx]->setUseSDC ( m_bUseSDC ); 664 #endif 657 665 } 658 666 } … … 873 881 eos.push_back( false ); 874 882 depthEos.push_back( false ); 883 884 #if RWTH_SDC_DLT_B0036 885 if( m_bUsingDepthMaps && m_bUseDLT ) 886 xAnalyzeInputBaseDepth(iViewIdx, m_iIntraPeriod); 887 #endif 875 888 } 876 889 … … 1421 1434 return pcPic; 1422 1435 }; 1436 1437 #if RWTH_SDC_DLT_B0036 1438 Void TAppEncTop::xAnalyzeInputBaseDepth(Int iViewIdx, UInt uiNumFrames) 1439 { 1440 TComPicYuv* pcDepthPicYuvOrg = new TComPicYuv; 1441 // allocate original YUV buffer 1442 pcDepthPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 1443 1444 TVideoIOYuv* depthVideoFile = new TVideoIOYuv; 1445 1446 UInt uiMaxDepthValue = g_uiIBDI_MAX; 1447 1448 Bool abValidDepths[uiMaxDepthValue+1]; 1449 1450 depthVideoFile->open( m_pchDepthInputFileList[iViewIdx], false, m_uiInputBitDepth, m_uiInternalBitDepth ); // read mode 1451 1452 // initialize boolean array 1453 for(Int p=0; p<=uiMaxDepthValue; p++) 1454 abValidDepths[p] = false; 1455 1456 Int iHeight = pcDepthPicYuvOrg->getHeight(); 1457 Int iWidth = pcDepthPicYuvOrg->getWidth(); 1458 Int iStride = pcDepthPicYuvOrg->getStride(); 1459 1460 Pel* pInDM = pcDepthPicYuvOrg->getLumaAddr(); 1461 1462 for(Int uiFrame=0; uiFrame < uiNumFrames; uiFrame++ ) 1463 { 1464 depthVideoFile->read( pcDepthPicYuvOrg, m_aiPad, false ); 1465 1466 // check all pixel values 1467 for (Int i=0; i<iHeight; i++) 1468 { 1469 Int rowOffset = i*iStride; 1470 1471 for (Int j=0; j<iWidth; j++) 1472 { 1473 Pel depthValue = pInDM[rowOffset+j]; 1474 abValidDepths[depthValue] = true; 1475 } 1476 } 1477 } 1478 1479 depthVideoFile->close(); 1480 1481 pcDepthPicYuvOrg->destroy(); 1482 delete pcDepthPicYuvOrg; 1483 1484 // convert boolean array to idx2Depth LUT 1485 UInt* auiIdx2DepthValue = (UInt*) calloc(uiMaxDepthValue, sizeof(UInt)); 1486 UInt uiNumDepthValues = 0; 1487 for(UInt p=0; p<=uiMaxDepthValue; p++) 1488 { 1489 if( abValidDepths[p] == true) 1490 { 1491 auiIdx2DepthValue[uiNumDepthValues++] = p; 1492 } 1493 } 1494 1495 if( uiNumFrames == 0 || ceil(Log2(uiNumDepthValues)) == ceil(Log2(g_uiIBDI_MAX)) ) 1496 { 1497 // don't use DLT 1498 m_acTEncDepthTopList[iViewIdx]->setUseDLT(false); 1499 m_acTEncDepthTopList[iViewIdx]->getSPS()->setUseDLT(false); 1500 } 1501 1502 // assign LUT 1503 if( m_acTEncDepthTopList[iViewIdx]->getUseDLT() ) 1504 m_acTEncDepthTopList[iViewIdx]->getSPS()->setDepthLUTs(auiIdx2DepthValue, uiNumDepthValues); 1505 else 1506 m_acTEncDepthTopList[iViewIdx]->getSPS()->setDepthLUTs(); 1507 1508 // free temporary memory 1509 free(auiIdx2DepthValue); 1510 } 1511 #endif 1423 1512 1424 1513 //! \} -
branches/HTM-4.1-dev2-RWTH/source/App/TAppEncoder/TAppEncTop.h
r102 r177 161 161 Void xStoreVSORefPicsInBuffer(); ///< read in External Ref pic from file and store in buffer 162 162 #endif 163 164 #if RWTH_SDC_DLT_B0036 165 Void xAnalyzeInputBaseDepth(Int iViewIdx, UInt uiNumFrames); 166 #endif 163 167 164 168 };// END CLASS DEFINITION TAppEncTop
Note: See TracChangeset for help on using the changeset viewer.