Changeset 1373 in 3DVCSoftware for branches/HTM-15.2-dev/source/App/TAppEncoder
- Timestamp:
- 6 Nov 2015, 16:18:36 (9 years ago)
- Location:
- branches/HTM-15.2-dev/source/App/TAppEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1362 r1373 177 177 } 178 178 } 179 #endif 180 181 #if NH_3D 179 180 if ( m_pchBaseViewCameraNumbers != NULL ) 181 { 182 free ( m_pchBaseViewCameraNumbers ); 183 } 184 #endif 182 185 #if NH_3D_VSO 183 186 if ( m_pchVSOConfig != NULL) … … 185 188 free ( m_pchVSOConfig ); 186 189 } 187 #endif 190 188 191 if ( m_pchCameraParameterFile != NULL ) 189 192 { 190 193 free ( m_pchCameraParameterFile ); 191 }192 193 if ( m_pchBaseViewCameraNumbers != NULL )194 {195 free ( m_pchBaseViewCameraNumbers );196 194 } 197 195 #endif … … 818 816 ("ViewId", m_viewId , IntAry1d(1,0), "View Id per View Order Index") 819 817 ("AuxId", m_auxId , IntAry1d(1,0), "AuxId per layer") 820 #if NH_3D 818 #if NH_3D_VSO 821 819 ("DepthFlag", m_depthFlag , IntAry1d(1,0), "Depth Flag") 822 820 #endif … … 1107 1105 // A lot of this stuff could should actually be derived by the encoder. 1108 1106 // VPS VUI 1109 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false, "VpsVuiPresentFlag ")1110 ("CrossLayerPicTypeAlignedFlag" , m_crossLayerPicTypeAlignedFlag, false, "CrossLayerPicTypeAlignedFlag") // Could actually be derived by the encoder1111 ("CrossLayerIrapAlignedFlag" , m_crossLayerIrapAlignedFlag , false, "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder1112 ("AllLayersIdrAlignedFlag" , m_allLayersIdrAlignedFlag , false, "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder1113 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false, "BitRatePresentVpsFlag ")1114 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false, "PicRatePresentVpsFlag ")1115 ("BitRatePresentFlag" , m_bitRatePresentFlag , BoolAry1d(1,0) ,MAX_VPS_OP_SETS_PLUS1, "BitRatePresentFlag per sub layer for the N-th layer set")1116 ("PicRatePresentFlag" , m_picRatePresentFlag , BoolAry1d(1,0) ,MAX_VPS_OP_SETS_PLUS1, "PicRatePresentFlag per sub layer for the N-th layer set")1117 ("AvgBitRate" , m_avgBitRate , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgBitRate per sub layer for the N-th layer set")1118 ("MaxBitRate" , m_maxBitRate , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "MaxBitRate per sub layer for the N-th layer set")1119 ("ConstantPicRateIdc" , m_constantPicRateIdc , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set")1120 ("AvgPicRate" , m_avgPicRate , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgPicRate per sub layer for the N-th layer set")1121 ("TilesNotInUseFlag" , m_tilesNotInUseFlag , true 1107 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") 1108 ("CrossLayerPicTypeAlignedFlag" , m_crossLayerPicTypeAlignedFlag , false , "CrossLayerPicTypeAlignedFlag") // Could actually be derived by the encoder 1109 ("CrossLayerIrapAlignedFlag" , m_crossLayerIrapAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 1110 ("AllLayersIdrAlignedFlag" , m_allLayersIdrAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 1111 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false , "BitRatePresentVpsFlag ") 1112 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false , "PicRatePresentVpsFlag ") 1113 ("BitRatePresentFlag" , m_bitRatePresentFlag , BoolAry1d(1,0), MAX_VPS_OP_SETS_PLUS1, "BitRatePresentFlag per sub layer for the N-th layer set") 1114 ("PicRatePresentFlag" , m_picRatePresentFlag , BoolAry1d(1,0), MAX_VPS_OP_SETS_PLUS1, "PicRatePresentFlag per sub layer for the N-th layer set") 1115 ("AvgBitRate" , m_avgBitRate , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgBitRate per sub layer for the N-th layer set") 1116 ("MaxBitRate" , m_maxBitRate , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "MaxBitRate per sub layer for the N-th layer set") 1117 ("ConstantPicRateIdc" , m_constantPicRateIdc , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set") 1118 ("AvgPicRate" , m_avgPicRate , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgPicRate per sub layer for the N-th layer set") 1119 ("TilesNotInUseFlag" , m_tilesNotInUseFlag , true , "TilesNotInUseFlag ") 1122 1120 ("TilesInUseFlag" , m_tilesInUseFlag , BoolAry1d(1,false) , "TilesInUseFlag ") 1123 ("LoopFilterNotAcrossTilesFlag" , m_loopFilterNotAcrossTilesFlag , BoolAry1d(1,false) , "LoopFilterNotAcrossTilesFlag ")1124 ("WppNotInUseFlag" , m_wppNotInUseFlag , true 1125 ("WppInUseFlag" , m_wppInUseFlag , BoolAry1d(1,0) , "WppInUseFlag ")1126 ("TileBoundariesAlignedFlag" , m_tileBoundariesAlignedFlag , BoolAry1d(1,0) ,MAX_NUM_LAYERS, "TileBoundariesAlignedFlag per direct reference for the N-th layer")1127 ("IlpRestrictedRefLayersFlag" , m_ilpRestrictedRefLayersFlag , false, "IlpRestrictedRefLayersFlag")1128 ("MinSpatialSegmentOffsetPlus1" , m_minSpatialSegmentOffsetPlus1 , IntAry1d (1,0), MAX_NUM_LAYERS , "MinSpatialSegmentOffsetPlus1 per direct reference for the N-th layer")1129 ("CtuBasedOffsetEnabledFlag" , m_ctuBasedOffsetEnabledFlag , BoolAry1d(1,0) ,MAX_NUM_LAYERS, "CtuBasedOffsetEnabledFlag per direct reference for the N-th layer")1130 ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , IntAry1d (1,0), MAX_NUM_LAYERS , "MinHorizontalCtuOffsetPlus1 per direct reference for the N-th layer")1131 ("SingleLayerForNonIrapFlag" , m_singleLayerForNonIrapFlag, false, "SingleLayerForNonIrapFlag")1132 ("HigherLayerIrapSkipFlag" , m_higherLayerIrapSkipFlag , false, "HigherLayerIrapSkipFlag ")1121 ("LoopFilterNotAcrossTilesFlag" , m_loopFilterNotAcrossTilesFlag , BoolAry1d(1,false) , "LoopFilterNotAcrossTilesFlag ") 1122 ("WppNotInUseFlag" , m_wppNotInUseFlag , true , "WppNotInUseFlag ") 1123 ("WppInUseFlag" , m_wppInUseFlag , BoolAry1d(1,0) , "WppInUseFlag ") 1124 ("TileBoundariesAlignedFlag" , m_tileBoundariesAlignedFlag , BoolAry1d(1,0) ,MAX_NUM_LAYERS , "TileBoundariesAlignedFlag per direct reference for the N-th layer") 1125 ("IlpRestrictedRefLayersFlag" , m_ilpRestrictedRefLayersFlag , false , "IlpRestrictedRefLayersFlag") 1126 ("MinSpatialSegmentOffsetPlus1" , m_minSpatialSegmentOffsetPlus1 , IntAry1d (1,0), MAX_NUM_LAYERS , "MinSpatialSegmentOffsetPlus1 per direct reference for the N-th layer") 1127 ("CtuBasedOffsetEnabledFlag" , m_ctuBasedOffsetEnabledFlag , BoolAry1d(1,0) ,MAX_NUM_LAYERS , "CtuBasedOffsetEnabledFlag per direct reference for the N-th layer") 1128 ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , IntAry1d (1,0), MAX_NUM_LAYERS , "MinHorizontalCtuOffsetPlus1 per direct reference for the N-th layer") 1129 ("SingleLayerForNonIrapFlag" , m_singleLayerForNonIrapFlag , false , "SingleLayerForNonIrapFlag") 1130 ("HigherLayerIrapSkipFlag" , m_higherLayerIrapSkipFlag , false , "HigherLayerIrapSkipFlag ") 1133 1131 #endif 1134 1132 … … 1290 1288 #endif 1291 1289 ("OutputVpsInfo", m_outputVpsInfo, false ,"Output information about the layer dependencies and layer sets") 1290 1291 /* Camera parameters */ 1292 ("BaseViewCameraNumbers", m_pchBaseViewCameraNumbers, (TChar *) 0 , "Numbers of base views") 1292 1293 #endif 1293 1294 #if NH_3D 1294 /* Camera parameters */1295 1295 ("Depth420OutputFlag", m_depth420OutputFlag, true , "Output depth layers in 4:2:0 ") 1296 #endif 1297 #if NH_3D_VSO 1296 1298 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (TChar *) 0 , "Camera Parameter File Name") 1297 ("BaseViewCameraNumbers", m_pchBaseViewCameraNumbers, (TChar *) 0 , "Numbers of base views")1298 1299 ("CodedCamParsPrecision", m_iCodedCamParPrecision, STD_CAM_PARAMETERS_PRECISION, "precision for coding of camera parameters (in units of 2^(-x) luma samples)" ) 1299 1300 1300 #if NH_3D_VSO1301 1301 /* View Synthesis Optimization */ 1302 1302 ("VSOConfig", m_pchVSOConfig , (TChar *) 0 ,"VSO configuration") … … 1317 1317 #endif //HHI_VSO 1318 1318 /* 3D- HEVC Tools */ 1319 #if NH_3D_QTL 1319 1320 ("QTL" , m_bUseQTL , true , "Use depth quad tree limitation (encoder only)" ) 1321 #endif 1322 #if NH_3D 1323 1320 1324 ("IvMvPredFlag" , m_ivMvPredFlag , BoolAry1d(2,true) , "Inter-view motion prediction" ) 1321 1325 ("IvMvScalingFlag" , m_ivMvScalingFlag , BoolAry1d(2,true) , "Inter-view motion vector scaling" ) … … 1813 1817 xResizeVector( m_auxId ); 1814 1818 1815 #if NH_3D 1819 #if NH_3D_VSO 1816 1820 xResizeVector( m_depthFlag ); 1817 1821 #endif … … 2022 2026 } 2023 2027 2024 #if NH_3D 2028 2025 2029 #if NH_3D_VSO 2026 2030 // Table base optimization … … 2039 2043 for (Int layer = 0; layer < m_numberOfLayers; layer++ ) 2040 2044 { 2041 if ( m_depthFlag[ layer ] )2045 if ( m_depthFlag[ layer ] || m_auxId[ layer ] == 2 ) 2042 2046 { 2043 2047 firstDepthLayer = layer; … … 2076 2080 LOG2_DISP_PREC_LUT ); 2077 2081 } 2082 #if NH_3D 2078 2083 else 2079 2084 { … … 2089 2094 LOG2_DISP_PREC_LUT ); 2090 2095 } 2091 #else2092 m_cCameraData .init ( ((UInt) m_iNumberOfViews ),2093 m_internalBitDepth[ CHANNEL_TYPE_LUMA],2094 (UInt) m_iCodedCamParPrecision,2095 m_FrameSkip,2096 (UInt) m_framesToBeEncoded,2097 m_pchCameraParameterFile,2098 m_pchBaseViewCameraNumbers,2099 NULL,2100 NULL,2101 LOG2_DISP_PREC_LUT );2102 #endif2103 2096 m_cCameraData.check( false, true ); 2097 #endif 2104 2098 #endif 2105 2099 … … 2286 2280 #endif 2287 2281 2288 #if NH_3D 2282 #if NH_3D_VSO 2289 2283 if ( m_scalabilityMask & ( 1 << DEPTH_ID ) ) 2290 2284 { … … 2645 2639 } 2646 2640 2647 #if NH_3D 2641 #if NH_3D_VSO 2648 2642 xConfirmPara( m_pchCameraParameterFile == 0 , "CameraParameterFile must be given"); 2649 2643 xConfirmPara( m_pchBaseViewCameraNumbers == 0 , "BaseViewCameraNumbers must be given" ); 2650 2644 xConfirmPara( m_iNumberOfViews != m_cCameraData.getBaseViewNumbers().size() , "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); 2651 2645 xConfirmPara ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5, "CodedCamParsPrecision must be in range of 0..5" ); 2652 #if NH_3D_VSO2653 2646 if( m_bUseVSO ) 2654 2647 { … … 2656 2649 xConfirmPara( m_uiVSOMode > 4 , "VSO Mode must be less than 5"); 2657 2650 } 2658 #endif2659 2651 #endif 2660 2652 // max CU width and height should be power of 2 … … 3430 3422 xPrintParaVector( "AuxId", m_auxId ); 3431 3423 #endif 3432 #if NH_3D 3424 #if NH_3D_VSO 3433 3425 xPrintParaVector( "DepthLayerFlag", m_depthFlag ); 3434 3426 printf("Coded Camera Param. Precision : %d\n", m_iCodedCamParPrecision); … … 3632 3624 3633 3625 printf("Max Num Merge Candidates : %d\n", m_maxNumMergeCand); 3634 #if NH_3D 3626 #if NH_3D_VSO 3635 3627 printf("BaseViewCameraNumbers : %s\n", m_pchBaseViewCameraNumbers ); 3636 3628 printf("Coded Camera Param. Precision : %d\n", m_iCodedCamParPrecision); 3637 #if NH_3D_VSO3638 3629 printf("Force use of Lambda Scale : %d\n", m_bForceLambdaScaleVSO ); 3639 3630 … … 3653 3644 } 3654 3645 #endif //HHI_VSO 3655 #endif //NH_3D3656 3646 printf("\n"); 3657 3647 #if NH_MV … … 3720 3710 printf("WVSO:%d ", m_bUseWVSO ); 3721 3711 #endif 3712 #if NH_3D_QTL 3713 printf( "QTL:%d " , m_bUseQTL); 3714 #endif 3722 3715 #if NH_3D 3723 printf( "QTL:%d " , m_bUseQTL);3724 3716 printf( "IlluCompEnable:%d " , m_abUseIC); 3725 3717 printf( "IlluCompLowLatencyEnc:%d ", m_bUseLowLatencyICEnc); -
branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncCfg.h
r1362 r1373 80 80 IntAry1d m_viewOrderIndex; ///< view order index 81 81 IntAry1d m_auxId; ///< auxiliary id 82 #if NH_3D 82 #if NH_3D_VSO 83 83 IntAry1d m_depthFlag; ///< depth flag 84 84 #endif … … 533 533 #endif 534 534 Bool m_outputVpsInfo; 535 #endif 535 TChar* m_pchBaseViewCameraNumbers; 536 #endif 537 536 538 #if NH_3D 537 539 // Output Format 538 540 Bool m_depth420OutputFlag; ///< Output depth layers in 4:2:0 format 539 // Camera parameters 541 #endif 542 // Camera parameters 543 #if NH_3D_VSO 540 544 TChar* m_pchCameraParameterFile; ///< camera parameter file 541 TChar* m_pchBaseViewCameraNumbers;542 545 TAppComCamPara m_cCameraData; 543 546 Int m_iCodedCamParPrecision; ///< precision for coding of camera parameters 544 #if NH_3D_VSO545 547 TChar* m_pchVSOConfig; 546 548 Bool m_bUseVSO; ///< flag for using View Synthesis Optimization … … 566 568 TRenModSetupStrParser m_cRenModStrParser; 567 569 #endif 568 570 #if NH_3D 569 571 Bool m_useDLT; ///< flag for using DLT 572 #endif 573 #if NH_3D_QTL 570 574 Bool m_bUseQTL; ///< flag for using depth QuadTree Limitation 575 #endif 576 #if NH_3D 571 577 BoolAry1d m_ivMvPredFlag; 572 578 BoolAry1d m_ivMvScalingFlag; -
branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1360 r1373 147 147 #if NH_3D 148 148 xSetCamPara ( vps ); 149 #endif 150 #if NH_3D_VSO 149 151 m_ivPicLists.setVPS ( &vps ); 150 152 #endif … … 276 278 m_cTEncTop.setViewId ( vps.getViewId ( layerId ) ); 277 279 m_cTEncTop.setViewIndex ( vps.getViewIndex ( layerId ) ); 278 #if NH_3D 279 Bool isDepth = ( vps.getDepthId ( layerId ) != 0 ) ; 280 m_cTEncTop.setIsDepth ( isDepth ); 280 #if NH_3D_VSO 281 Bool isDepth = ( vps.getDepthId ( layerId ) != 0 ) ; 282 Bool isAuxDepth = ( vps.getAuxId ( layerId ) == 2 ) ; // TBD: define 2 as AUX_DEPTH 283 m_cTEncTop.setIsDepth ( isDepth ); 284 m_cTEncTop.setIsAuxDepth ( isAuxDepth ); 281 285 //====== Camera Parameters ========= 282 286 m_cTEncTop.setCameraParameters ( &m_cCameraData ); 283 #if NH_3D_VSO284 287 //====== VSO ========= 285 288 m_cTEncTop.setRenderModelParameters ( &m_cRenModStrParser ); 286 m_cTEncTop.setForceLambdaScaleVSO ( isDepth ? m_bForceLambdaScaleVSO : false );287 m_cTEncTop.setLambdaScaleVSO ( isDepth ? m_dLambdaScaleVSO : 1 );288 m_cTEncTop.setVSOMode ( isDepth ? m_uiVSOMode : 0 );289 290 m_cTEncTop.setAllowNegDist ( isDepth ? m_bAllowNegDist : false );289 m_cTEncTop.setForceLambdaScaleVSO ( isDepth || isAuxDepth ? m_bForceLambdaScaleVSO : false ); 290 m_cTEncTop.setLambdaScaleVSO ( isDepth || isAuxDepth ? m_dLambdaScaleVSO : 1 ); 291 m_cTEncTop.setVSOMode ( isDepth || isAuxDepth ? m_uiVSOMode : 0 ); 292 293 m_cTEncTop.setAllowNegDist ( isDepth || isAuxDepth ? m_bAllowNegDist : false ); 291 294 292 295 // SAIT_VSO_EST_A0033 293 m_cTEncTop.setUseEstimatedVSD ( isDepth ? m_bUseEstimatedVSD : false );296 m_cTEncTop.setUseEstimatedVSD ( isDepth || isAuxDepth ? m_bUseEstimatedVSD : false ); 294 297 295 298 // LGE_WVSO_A0119 296 m_cTEncTop.setUseWVSO ( isDepth ? m_bUseWVSO : false );297 m_cTEncTop.setVSOWeight ( isDepth ? m_iVSOWeight : 0 );298 m_cTEncTop.setVSDWeight ( isDepth ? m_iVSDWeight : 0 );299 m_cTEncTop.setDWeight ( isDepth ? m_iDWeight : 0 );299 m_cTEncTop.setUseWVSO ( isDepth || isAuxDepth ? m_bUseWVSO : false ); 300 m_cTEncTop.setVSOWeight ( isDepth || isAuxDepth ? m_iVSOWeight : 0 ); 301 m_cTEncTop.setVSDWeight ( isDepth || isAuxDepth ? m_iVSDWeight : 0 ); 302 m_cTEncTop.setDWeight ( isDepth || isAuxDepth ? m_iDWeight : 0 ); 300 303 #endif // H_3D_VSO 304 #if NH_3D 301 305 #if NH_3D_IC 302 306 m_cTEncTop.setUseIC ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC ); … … 308 312 m_cTEncTop.setUseSDC ( isDepth ? m_intraSdcFlag : false ); 309 313 m_cTEncTop.setUseDLT ( isDepth ? m_useDLT : false ); 310 m_cTEncTop.setUseQTL ( isDepth ? m_bUseQTL : false ); 314 #endif 315 #if NH_3D_QTL 316 m_cTEncTop.setUseQTL ( isDepth || isAuxDepth ? m_bUseQTL : false ); 317 #endif 318 #if NH_3D 311 319 m_cTEncTop.setSps3dExtension ( m_sps3dExtension ); 312 320 #endif // NH_3D … … 811 819 TEncTop* pcEncTop = m_acTEncTopList[ layer ]; 812 820 Int iViewNum = pcEncTop->getViewIndex(); 813 Int iContent = pcEncTop->getIsDepth() ? 1 : 0;821 Int iContent = pcEncTop->getIsDepth() || pcEncTop->getIsAuxDepth() ? 1 : 0; 814 822 Int iNumOfModels = m_cRenModStrParser.getNumOfModelsForView(iViewNum, iContent); 815 823 … … 1043 1051 for ( Int gopId=0; gopId < gopSize; gopId++ ) 1044 1052 { 1045 #if NH_3D 1053 #if NH_3D_VSO 1046 1054 UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId ); 1047 1055 if ( iNextPoc < m_framesToBeEncoded ) … … 1685 1693 if( m_depthFlag[ curLayerIdInVps ] && ( m_mpiFlag|| m_qtPredFlag || m_intraContourFlag ) ) 1686 1694 { 1687 Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false );1695 Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false, 0 ); 1688 1696 if ( nuhLayerIdTex == refLayerIdInNuh ) 1689 1697 { … … 1711 1719 for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++ ) 1712 1720 { 1713 Int nuhLayerIdDep = vps.getLayerIdInNuh( vps.getViewIndex( vps.getIdRefListLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[j] ) ), true );1721 Int nuhLayerIdDep = vps.getLayerIdInNuh( vps.getViewIndex( vps.getIdRefListLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[j] ) ), true, 0 ); 1714 1722 if ( nuhLayerIdDep == refLayerIdInNuh ) 1715 1723 { -
branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncTop.h
r1313 r1373 46 46 #include "TLibCommon/AccessUnit.h" 47 47 #include "TAppEncCfg.h" 48 #if NH_3D 48 #if NH_3D_VSO 49 49 #include "../../Lib/TLibRenderer/TRenTop.h" 50 50 #endif
Note: See TracChangeset for help on using the changeset viewer.