Changeset 189 in 3DVCSoftware for trunk/source/App/TAppEncoder
- Timestamp:
- 18 Nov 2012, 22:11:37 (12 years ago)
- Location:
- trunk/source/App/TAppEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r128 r189 74 74 { 75 75 m_aidQP = NULL; 76 #if FIXES77 76 m_aidQPdepth = NULL; 78 #endif79 77 } 80 78 … … 86 84 } 87 85 88 #if FIXES89 86 if ( m_aidQPdepth ) 90 87 { 91 88 delete[] m_aidQPdepth; m_aidQPdepth = NULL; 92 89 } 93 #endif94 90 95 91 for(Int i = 0; i< m_pchInputFileList.size(); i++ ) … … 120 116 #endif 121 117 122 #if FIX_MEM_LEAKS123 118 if ( m_pchCameraParameterFile != NULL ) 124 119 free ( m_pchCameraParameterFile ); … … 139 134 free ( m_scalingListFile ); 140 135 141 #endif142 136 143 137 } … … 326 320 ("LoopFilterBetaOffset_div2", m_loopFilterBetaOffsetDiv2, 0 ) 327 321 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 ) 322 #if LGE_ILLUCOMP_B0045 323 ("IlluCompEnable", m_bUseIC , true , "Use illumination compensation for inter-view prediction" ) 324 #endif 328 325 #if DBL_CONTROL 329 #if FIX_DBL_CONTROL_DEFAULT330 326 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, true) 331 #else332 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false)333 #endif334 327 #endif 335 328 … … 346 339 ("LambdaScaleVSO", m_dLambdaScaleVSO , (Double) 1 , "Lambda Scaling for VSO") 347 340 348 #if HHI_VSO_LS_TABLE 341 #if HHI_VSO_LS_TABLE_M23714 349 342 ("VSOLSTable", m_bVSOLSTable , true , "Depth QP dependent video/depth rate allocation by Lagrange multiplier" ) 350 343 #endif … … 361 354 #endif 362 355 #if LGE_WVSO_A0119 363 ("WVSO", m_bUseWVSO , false, "Use depth fidelity term for VSO" )356 ("WVSO", m_bUseWVSO , true , "Use depth fidelity term for VSO" ) 364 357 ("VSOWeight", m_iVSOWeight , 10 , "Synthesized View Distortion Change weight" ) 365 358 ("VSDWeight", m_iVSDWeight , 1 , "View Synthesis Distortion estimate weight" ) … … 367 360 #endif 368 361 369 #if OL_ DEPTHLIMIT_A0044370 (" DPL", m_bDepthPartitionLimiting , false , "Use DepthPartitionLimiting" )362 #if OL_QTLIMIT_PREDCODING_B0068 363 ("QTLPC", m_bUseQTLPC , true , "Use depth Quadtree Limitation + Predictive Coding" ) 371 364 #endif 372 365 … … 454 447 "\t0: disable") 455 448 449 #if TMVP_DEPTH_SWITCH 450 ("TMVP", m_enableTMVP, std::vector<Bool>(1,true), "Enable TMVP" ) 451 #else 456 452 ("TMVP", m_enableTMVP, true, "Enable TMVP" ) 453 #endif 457 454 458 455 ("FEN", m_bUseFastEnc, false, "fast encoder setting") … … 473 470 #if HHI_MPI 474 471 ("MVI", m_bUseMVI, false, "use motion vector inheritance for depth map coding") 472 #endif 473 #if RWTH_SDC_DLT_B0036 474 ("DLT", m_bUseDLT, true, "use depth lookup table for depth map coding") 475 ("SDC", m_bUseSDC, true, "use simplified depth coding tree") 475 476 #endif 476 477 ; … … 684 685 xCleanUpVectors(); 685 686 687 688 #if TMVP_DEPTH_SWITCH 689 if ( m_enableTMVP.size() < 2) 690 { 691 m_enableTMVP.push_back( m_enableTMVP[0] ); 692 } 693 #endif 694 695 686 696 #if HHI_VSO 687 697 if ( m_abUseALF .size() < 2) … … 712 722 #if HHI_VSO 713 723 714 #if HHI_VSO_LS_TABLE 724 #if HHI_VSO_LS_TABLE_M23714 715 725 // Q&D 716 726 Double adLambdaScaleTable[] = … … 1620 1630 printf("VSO Negative Distortion : %d\n", m_bAllowNegDist ? 1 : 0); 1621 1631 #endif 1622 #if HHI_VSO_LS_TABLE 1632 #if HHI_VSO_LS_TABLE_M23714 1623 1633 printf("VSO LS Table : %d\n", m_bVSOLSTable ? 1 : 0); 1624 1634 #endif … … 1704 1714 printf(" ScalingList:%d ", m_useScalingListId ); 1705 1715 1716 #if !TMVP_DEPTH_SWITCH 1706 1717 printf("TMVP:%d ", m_enableTMVP ); 1718 #endif 1707 1719 1708 1720 #if ADAPTIVE_QP_SELECTION … … 1718 1730 printf("SAO:%d ", (m_abUseSAO [0] ? 1 : 0)); 1719 1731 printf("RDQ:%d ", (m_abUseRDOQ[0] ? 1 : 0) ); 1732 #if TMVP_DEPTH_SWITCH 1733 printf("TMVP:%d ", (m_enableTMVP[0] ? 1 : 0) ); 1734 #endif 1735 #if LGE_ILLUCOMP_B0045 1736 printf("IlluCompEnable: %d ", m_bUseIC); 1737 #endif 1738 1720 1739 printf("\n"); 1721 1740 … … 1724 1743 printf("SAO:%d ", (m_abUseSAO [1] ? 1 : 0)); 1725 1744 printf("RDQ:%d ", (m_abUseRDOQ[1] ? 1 : 0)); 1745 #if TMVP_DEPTH_SWITCH 1746 printf("TMVP:%d ", (m_enableTMVP[1] ? 1 : 0) ); 1747 #endif 1726 1748 #if HHI_VSO 1727 1749 printf("VSO:%d ", m_bUseVSO ); … … 1730 1752 printf("WVSO:%d ", m_bUseWVSO ); 1731 1753 #endif 1732 #if OL_ DEPTHLIMIT_A00441733 printf(" DPL:%d ", m_bDepthPartitionLimiting);1754 #if OL_QTLIMIT_PREDCODING_B0068 1755 printf("QTLPC:%d ", m_bUseQTLPC); 1734 1756 #endif 1735 1757 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX … … 1739 1761 printf("MVI:%d ", m_bUseMVI ? 1 : 0 ); 1740 1762 #endif 1763 #if RWTH_SDC_DLT_B0036 1764 printf("SDC:%d ", m_bUseSDC ? 1 : 0 ); 1765 printf("DLT:%d ", m_bUseDLT ? 1 : 0 ); 1766 #endif 1741 1767 #if LGE_WVSO_A0119 1742 printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight ); 1768 if ( m_bUseWVSO ) 1769 printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight ); 1743 1770 #endif 1744 1771 printf("\n\n"); -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r120 r189 160 160 #endif 161 161 vector<Bool> m_abUseSAO; 162 #if LGE_ILLUCOMP_B0045 163 Bool m_bUseIC; ///< flag for using illumination compensation for inter-view prediction 164 #endif 162 165 #if SAO_UNIT_INTERLEAVING 163 166 Int m_maxNumOffsetsPerPic; ///< SAO maximun number of offset per picture … … 258 261 UInt m_uiBiPredIdc; ///< Use of Bi-Directional Weighting Prediction (B_SLICE): explicit(1) or implicit(2) 259 262 263 #if TMVP_DEPTH_SWITCH 264 vector<Bool> m_enableTMVP; ///< Enable TMVP [0] video, [1] depth 265 #else 260 266 Bool m_enableTMVP; 267 #endif 268 261 269 #if MULTIBITS_DATA_HIDING 262 270 Int m_signHideFlag; … … 265 273 #if HHI_MPI 266 274 Bool m_bUseMVI; ///< flag for using Motion Vector Inheritance for depth map coding 275 #endif 276 #if RWTH_SDC_DLT_B0036 277 Bool m_bUseDLT; 278 Bool m_bUseSDC; 267 279 #endif 268 280 … … 280 292 Char* m_pchVSOConfig; 281 293 Bool m_bUseVSO; ///< flag for using View Synthesis Optimization 282 #if HHI_VSO_LS_TABLE 294 #if HHI_VSO_LS_TABLE_M23714 283 295 Bool m_bVSOLSTable; ///< Depth QP dependent Lagrange parameter optimization (m23714) 284 296 #endif … … 308 320 #endif 309 321 310 #if OL_ DEPTHLIMIT_A0044311 Bool m_b DepthPartitionLimiting;322 #if OL_QTLIMIT_PREDCODING_B0068 323 Bool m_bUseQTLPC; ///< flag for using depth QuadTree Limitation + Predictive Coding 312 324 #endif 313 325 -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r124 r189 300 300 m_acTEncTopList[iViewIdx]->setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag ); 301 301 m_acTEncTopList[iViewIdx]->setUseSAO ( m_abUseSAO[0] ); 302 #if LGE_ILLUCOMP_B0045 303 m_acTEncTopList[iViewIdx]->setUseIC ( m_bUseIC ); 304 #endif 302 305 #if SAO_UNIT_INTERLEAVING 303 306 m_acTEncTopList[iViewIdx]->setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic); … … 342 345 m_acTEncTopList[iViewIdx]->setWaveFrontFlush ( m_iWaveFrontFlush ); 343 346 m_acTEncTopList[iViewIdx]->setWaveFrontSubstreams ( m_iWaveFrontSubstreams ); 347 #if TMVP_DEPTH_SWITCH 348 m_acTEncTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP[0] ); 349 #else 344 350 m_acTEncTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP ); 351 #endif 345 352 m_acTEncTopList[iViewIdx]->setUseScalingListId ( m_useScalingListId ); 346 353 m_acTEncTopList[iViewIdx]->setScalingListFile ( m_scalingListFile ); … … 364 371 m_acTEncTopList[iViewIdx]->setUseDMM ( false ); 365 372 #endif 366 #if OL_ DEPTHLIMIT_A0044367 m_acTEncTopList[iViewIdx]->setUse DPL( false );373 #if OL_QTLIMIT_PREDCODING_B0068 374 m_acTEncTopList[iViewIdx]->setUseQTLPC ( false ); 368 375 #endif 369 376 #if HHI_MPI 370 377 m_acTEncTopList[iViewIdx]->setUseMVI( false ); 378 #endif 379 #if RWTH_SDC_DLT_B0036 380 m_acTEncTopList[iViewIdx]->setUseDLT ( false ); 381 m_acTEncTopList[iViewIdx]->setUseSDC ( false ); 371 382 #endif 372 383 } … … 579 590 m_acTEncDepthTopList[iViewIdx]->setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag ); 580 591 m_acTEncDepthTopList[iViewIdx]->setUseSAO ( m_abUseSAO[1] ); 592 #if LGE_ILLUCOMP_B0045 593 m_acTEncDepthTopList[iViewIdx]->setUseIC ( false ); 594 #endif 581 595 #if SAO_UNIT_INTERLEAVING 582 596 m_acTEncDepthTopList[iViewIdx]->setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic); … … 621 635 m_acTEncDepthTopList[iViewIdx]->setWaveFrontFlush ( m_iWaveFrontFlush ); 622 636 m_acTEncDepthTopList[iViewIdx]->setWaveFrontSubstreams ( m_iWaveFrontSubstreams ); 637 #if TMVP_DEPTH_SWITCH 638 m_acTEncDepthTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP[1] ); 639 #else 623 640 m_acTEncDepthTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP ); 641 #endif 624 642 m_acTEncDepthTopList[iViewIdx]->setUseScalingListId ( m_useScalingListId ); 625 643 m_acTEncDepthTopList[iViewIdx]->setScalingListFile ( m_scalingListFile ); … … 643 661 m_acTEncDepthTopList[iViewIdx]->setUseDMM ( m_bUseDMM ); 644 662 #endif 645 #if OL_ DEPTHLIMIT_A0044646 m_acTEncDepthTopList[iViewIdx]->setUse DPL (m_bDepthPartitionLimiting);663 #if OL_QTLIMIT_PREDCODING_B0068 664 m_acTEncDepthTopList[iViewIdx]->setUseQTLPC (m_bUseQTLPC); 647 665 #endif 648 666 #if HHI_MPI 649 667 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 650 668 #endif 669 #if RWTH_SDC_DLT_B0036 670 m_acTEncDepthTopList[iViewIdx]->setUseDLT ( m_bUseDLT ); 671 m_acTEncDepthTopList[iViewIdx]->setUseSDC ( m_bUseSDC ); 672 #endif 651 673 } 652 674 } … … 667 689 if ( m_uiVSOMode == 4 ) 668 690 { 669 #if HHI_VSO_SPEEDUP_A0033670 691 #if LGE_VSO_EARLY_SKIP_A0093 671 692 m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0, m_bVSOEarlySkip ); 672 693 #else 673 694 m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0 ); 674 #endif675 #else676 m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, LOG2_DISP_PREC_LUT, 0 );677 695 #endif 678 696 … … 867 885 eos.push_back( false ); 868 886 depthEos.push_back( false ); 887 888 #if RWTH_SDC_DLT_B0036 889 if( m_bUsingDepthMaps && m_bUseDLT ) 890 xAnalyzeInputBaseDepth(iViewIdx, m_iIntraPeriod); 891 #endif 869 892 } 870 893 … … 1000 1023 pcDepthPicYuvOrg = NULL; 1001 1024 1002 #if FIX_MEM_LEAKS1003 1025 if ( pcPdmDepthOrg != NULL ) 1004 1026 { … … 1007 1029 pcPdmDepthOrg = NULL; 1008 1030 }; 1009 #endif1010 1031 1011 1032 … … 1266 1287 #endif 1267 1288 #if HHI_VSO 1268 #if HHI_VSO_SPEEDUP_A00331269 1289 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset ) 1270 1290 { 1271 #if FIX_VSO_SETUP1272 1291 m_cRendererModel.setupPart( iHorOffset, Min( g_uiMaxCUHeight, m_iSourceHeight - iHorOffset ) ); 1273 #else1274 m_cRendererModel.setHorOffset( iHorOffset );1275 #endif1276 #else1277 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent )1278 {1279 #endif1280 1292 Int iEncViewSIdx = m_cCameraData.getBaseId2SortedId()[ iEncViewIdx ]; 1281 1293 … … 1415 1427 return pcPic; 1416 1428 }; 1429 1430 #if RWTH_SDC_DLT_B0036 1431 Void TAppEncTop::xAnalyzeInputBaseDepth(Int iViewIdx, UInt uiNumFrames) 1432 { 1433 TComPicYuv* pcDepthPicYuvOrg = new TComPicYuv; 1434 // allocate original YUV buffer 1435 pcDepthPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 1436 1437 TVideoIOYuv* depthVideoFile = new TVideoIOYuv; 1438 1439 UInt uiMaxDepthValue = g_uiIBDI_MAX; 1440 1441 Bool abValidDepths[256]; 1442 1443 depthVideoFile->open( m_pchDepthInputFileList[iViewIdx], false, m_uiInputBitDepth, m_uiInternalBitDepth ); // read mode 1444 1445 // initialize boolean array 1446 for(Int p=0; p<=uiMaxDepthValue; p++) 1447 abValidDepths[p] = false; 1448 1449 Int iHeight = pcDepthPicYuvOrg->getHeight(); 1450 Int iWidth = pcDepthPicYuvOrg->getWidth(); 1451 Int iStride = pcDepthPicYuvOrg->getStride(); 1452 1453 Pel* pInDM = pcDepthPicYuvOrg->getLumaAddr(); 1454 1455 for(Int uiFrame=0; uiFrame < uiNumFrames; uiFrame++ ) 1456 { 1457 depthVideoFile->read( pcDepthPicYuvOrg, m_aiPad, false ); 1458 1459 // check all pixel values 1460 for (Int i=0; i<iHeight; i++) 1461 { 1462 Int rowOffset = i*iStride; 1463 1464 for (Int j=0; j<iWidth; j++) 1465 { 1466 Pel depthValue = pInDM[rowOffset+j]; 1467 abValidDepths[depthValue] = true; 1468 } 1469 } 1470 } 1471 1472 depthVideoFile->close(); 1473 1474 pcDepthPicYuvOrg->destroy(); 1475 delete pcDepthPicYuvOrg; 1476 1477 // convert boolean array to idx2Depth LUT 1478 UInt* auiIdx2DepthValue = (UInt*) calloc(uiMaxDepthValue, sizeof(UInt)); 1479 UInt uiNumDepthValues = 0; 1480 for(UInt p=0; p<=uiMaxDepthValue; p++) 1481 { 1482 if( abValidDepths[p] == true) 1483 { 1484 auiIdx2DepthValue[uiNumDepthValues++] = p; 1485 } 1486 } 1487 1488 if( uiNumFrames == 0 || ceil(Log2(uiNumDepthValues)) == ceil(Log2(g_uiIBDI_MAX)) ) 1489 { 1490 // don't use DLT 1491 m_acTEncDepthTopList[iViewIdx]->setUseDLT(false); 1492 m_acTEncDepthTopList[iViewIdx]->getSPS()->setUseDLT(false); 1493 } 1494 1495 // assign LUT 1496 if( m_acTEncDepthTopList[iViewIdx]->getUseDLT() ) 1497 m_acTEncDepthTopList[iViewIdx]->getSPS()->setDepthLUTs(auiIdx2DepthValue, uiNumDepthValues); 1498 else 1499 m_acTEncDepthTopList[iViewIdx]->getSPS()->setDepthLUTs(); 1500 1501 // free temporary memory 1502 free(auiIdx2DepthValue); 1503 } 1504 #endif 1417 1505 1418 1506 //! \} -
trunk/source/App/TAppEncoder/TAppEncTop.h
r102 r189 136 136 #endif 137 137 #if HHI_VSO 138 #if HHI_VSO_SPEEDUP_A0033139 138 Void setupRenModel ( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset ); 140 #else141 Void setupRenModel ( Int iPoc, Int iEncViewIdx, Int iEncContent );142 #endif143 139 #endif 144 140 … … 161 157 Void xStoreVSORefPicsInBuffer(); ///< read in External Ref pic from file and store in buffer 162 158 #endif 159 160 #if RWTH_SDC_DLT_B0036 161 Void xAnalyzeInputBaseDepth(Int iViewIdx, UInt uiNumFrames); 162 #endif 163 163 164 164 };// END CLASS DEFINITION TAppEncTop
Note: See TracChangeset for help on using the changeset viewer.