Changeset 1325 in 3DVCSoftware for branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncCfg.cpp
- Timestamp:
- 7 Sep 2015, 18:40:35 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncCfg.cpp
r1313 r1325 73 73 #if NH_MV 74 74 MULTIVIEWMAIN = 6, 75 #if NH_3D76 MAIN3D = 8,77 #endif78 75 #endif 79 76 MONOCHROME_8 = 1008, … … 129 126 m_targetPivotValue = NULL; 130 127 131 #if KWU_RC_MADPRED_E0227132 m_depthMADPred = 0;133 #endif134 128 } 135 129 … … 194 188 m_GOPListMvc[i] = NULL; 195 189 } 196 }197 #endif198 #if NH_3D199 #if NH_3D_VSO200 if ( m_pchVSOConfig != NULL)201 {202 free ( m_pchVSOConfig );203 }204 #endif205 if ( m_pchCameraParameterFile != NULL )206 {207 free ( m_pchCameraParameterFile );208 }209 210 if ( m_pchBaseViewCameraNumbers != NULL )211 {212 free ( m_pchBaseViewCameraNumbers );213 190 } 214 191 #endif … … 267 244 } 268 245 #endif 269 #if NH_3D270 in>>entry.m_interCompPredFlag;271 #endif272 246 273 247 return in; … … 303 277 #if NH_MV 304 278 ,{"multiview-main" , Profile::MULTIVIEWMAIN }, 305 #if NH_3D306 {"3d-main" , Profile::MAIN3D }307 #endif308 279 #endif 309 280 … … 332 303 #if NH_MV 333 304 {"multiview-main" , MULTIVIEWMAIN }, 334 #if NH_3D335 {"3d-main" , MAIN3D },336 #endif337 305 #endif 338 306 {"monochrome", MONOCHROME_8 }, … … 774 742 string cfg_levels; 775 743 string cfg_tiers; 776 #if NH_3D777 cfg_dimensionLength.push_back( 2 ); // depth778 cfg_dimensionLength.push_back( 32 ); // texture779 #else780 744 cfg_dimensionLength.push_back( 64 ); 781 #endif782 745 #endif 783 746 string cfg_dQPFile; … … 848 811 #if NH_MV 849 812 ("NumberOfLayers", m_numberOfLayers , 1, "Number of layers") 850 #if !NH_3D851 813 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary") 852 #else853 ("ScalabilityMask", m_scalabilityMask , 3 , "Scalability Mask, 1: Texture 3: Texture + Depth ")854 #endif855 814 ("DimensionIdLen", m_dimensionIdLen , cfg_dimensionLength , "Number of bits used to store dimensions Id") 856 815 ("ViewOrderIndex", m_viewOrderIndex , std::vector<Int>(1,0), "View Order Index per layer") 857 816 ("ViewId", m_viewId , std::vector<Int>(1,0), "View Id per View Order Index") 858 817 ("AuxId", m_auxId , std::vector<Int>(1,0), "AuxId per layer") 859 #if NH_3D860 ("DepthFlag", m_depthFlag , std::vector<Int>(1,0), "Depth Flag")861 #endif862 818 ("TargetEncLayerIdList", m_targetEncLayerIdList, std::vector<Int>(0,0), "LayerIds in Nuh to be encoded") 863 819 ("LayerIdInNuh", m_layerIdInNuh , std::vector<Int>(1,0), "LayerId in Nuh") … … 1125 1081 ( "RCForceIntraQP", m_RCForceIntraQP, false, "Rate control: force intra QP to be equal to initial QP" ) 1126 1082 1127 #if KWU_RC_VIEWRC_E02271128 ("ViewWiseTargetBits, -vtbr" , m_viewTargetBits, std::vector<Int>(1, 32), "View-wise target bit-rate setting")1129 ("TargetBitAssign, -ta", m_viewWiseRateCtrl, false, "View-wise rate control on/off")1130 #endif1131 #if KWU_RC_MADPRED_E02271132 ("DepthMADPred, -dm", m_depthMADPred, (UInt)0, "Depth based MAD prediction on/off")1133 #endif1134 1083 #if NH_MV 1135 1084 // A lot of this stuff could should actually be derived by the encoder. … … 1315 1264 ("OutputVpsInfo", m_outputVpsInfo, false ,"Output information about the layer dependencies and layer sets") 1316 1265 #endif 1317 #if NH_3D1318 /* Camera parameters */1319 ("Depth420OutputFlag", m_depth420OutputFlag, true , "Output depth layers in 4:2:0 ")1320 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name")1321 ("BaseViewCameraNumbers", m_pchBaseViewCameraNumbers, (Char *) 0, "Numbers of base views")1322 ("CodedCamParsPrecision", m_iCodedCamParPrecision, STD_CAM_PARAMETERS_PRECISION, "precision for coding of camera parameters (in units of 2^(-x) luma samples)" )1323 1324 #if NH_3D_VSO1325 /* View Synthesis Optimization */1326 ("VSOConfig", m_pchVSOConfig , (Char *) 0 ,"VSO configuration")1327 ("VSO", m_bUseVSO , false ,"Use VSO" )1328 ("VSOMode", m_uiVSOMode , (UInt) 4 ,"VSO Mode")1329 ("LambdaScaleVSO", m_dLambdaScaleVSO , (Double) 1 ,"Lambda Scaling for VSO")1330 ("VSOLSTable", m_bVSOLSTable , true ,"Depth QP dependent video/depth rate allocation by Lagrange multiplier" )1331 ("ForceLambdaScaleVSO", m_bForceLambdaScaleVSO , false ,"Force using Lambda Scale VSO also in non-VSO-Mode")1332 ("AllowNegDist", m_bAllowNegDist , true ,"Allow negative Distortion in VSO")1333 1334 ("UseEstimatedVSD", m_bUseEstimatedVSD , true ,"Model based VSD estimation instead of rendering based for some encoder decisions" )1335 ("VSOEarlySkip", m_bVSOEarlySkip , true ,"Early skip of VSO computation if synthesis error assumed to be zero" )1336 1337 ("WVSO", m_bUseWVSO , true ,"Use depth fidelity term for VSO" )1338 ("VSOWeight", m_iVSOWeight , 10 ,"Synthesized View Distortion Change weight" )1339 ("VSDWeight", m_iVSDWeight , 1 ,"View Synthesis Distortion estimate weight" )1340 ("DWeight", m_iDWeight , 1 ,"Depth Distortion weight" )1341 #endif //HHI_VSO1342 /* 3D- HEVC Tools */1343 ("QTL" , m_bUseQTL , true , "Use depth quad tree limitation (encoder only)" )1344 ("IvMvPredFlag" , m_ivMvPredFlag , BoolAry1d(2,true) , "Inter-view motion prediction" )1345 ("IvMvScalingFlag" , m_ivMvScalingFlag , BoolAry1d(2,true) , "Inter-view motion vector scaling" )1346 ("Log2SubPbSizeMinus3" , m_log2SubPbSizeMinus3 , 0 , "Log2 minus 3 of sub Pb size" )1347 ("IvResPredFlag" , m_ivResPredFlag , true , "Inter-view residual prediction" )1348 ("DepthRefinementFlag" , m_depthRefinementFlag , true , "Depth to refine disparity" )1349 ("ViewSynthesisPredFlag" , m_viewSynthesisPredFlag , true , "View synthesis prediction" )1350 ("DepthBasedBlkPartFlag" , m_depthBasedBlkPartFlag , true , "Depth base block partitioning" )1351 ("MpiFlag" , m_mpiFlag , true , "Motion inheritance from texture to depth" )1352 ("Log2MpiSubPbSizeMinus3", m_log2MpiSubPbSizeMinus3 , 0 , "Log2 minus 3 of sub Pb size for MPI" )1353 ("IntraContourFlag" , m_intraContourFlag , true , "Intra contour mode" )1354 ("IntraWedgeFlag" , m_intraWedgeFlag , true , "Intra wedge mode and segmental depth DCs" )1355 ("IntraSdcFlag" , m_intraSdcFlag , true , "Intra depth DCs" )1356 ("QtPredFlag" , m_qtPredFlag , true , "Quad tree prediction from texture to depth")1357 ("InterSdcFlag" , m_interSdcFlag , true , "Inter depth DCs" )1358 ("DepthIntraSkip" , m_depthIntraSkipFlag , true , "Depth intra skip mode" )1359 ("DLT" , m_useDLT , true , "Depth lookup table" )1360 ("IlluCompEnable" , m_abUseIC , true , "Enable illumination compensation" )1361 ("IlluCompLowLatencyEnc" , m_bUseLowLatencyICEnc , false , "Enable low-latency illumination compensation encoding")1362 #endif //NH_3D1363 1266 1364 1267 ; … … 1555 1458 if( cfg_profiles.empty() ) 1556 1459 { 1557 #if NH_3D1558 cfg_profiles = string("main main 3d-main");1559 #else1560 1460 cfg_profiles = string("main main multiview-main"); 1561 #endif1562 1461 fprintf(stderr, "\nWarning: No profiles given, using defaults: %s", cfg_profiles.c_str() ); 1563 1462 anyEmpty = true; … … 1798 1697 xResizeVector( m_auxId ); 1799 1698 1800 #if NH_3D1801 xResizeVector( m_depthFlag );1802 #endif1803 1699 xResizeVector( m_fQP ); 1804 1700 … … 2004 1900 } 2005 1901 2006 #if NH_3D2007 #if NH_3D_VSO2008 // Table base optimization2009 // Q&D2010 Double adLambdaScaleTable[] =2011 { 0.031250, 0.031639, 0.032029, 0.032418, 0.032808, 0.033197, 0.033586, 0.033976, 0.034365, 0.034755,2012 0.035144, 0.035533, 0.035923, 0.036312, 0.036702, 0.037091, 0.037480, 0.037870, 0.038259, 0.038648,2013 0.039038, 0.039427, 0.039817, 0.040206, 0.040595, 0.040985, 0.041374, 0.041764, 0.042153, 0.042542,2014 0.042932, 0.043321, 0.043711, 0.044100, 0.044194, 0.053033, 0.061872, 0.070711, 0.079550, 0.088388,2015 0.117851, 0.147314, 0.176777, 0.235702, 0.294628, 0.353553, 0.471405, 0.589256, 0.707107, 0.707100,2016 0.753550, 0.8000002017 };2018 if ( m_bUseVSO && m_bVSOLSTable )2019 {2020 Int firstDepthLayer = -1;2021 for (Int layer = 0; layer < m_numberOfLayers; layer++ )2022 {2023 if ( m_depthFlag[ layer ])2024 {2025 firstDepthLayer = layer;2026 break;2027 }2028 }2029 AOT( firstDepthLayer == -1 );2030 AOT( (m_iQP[firstDepthLayer] < 0) || (m_iQP[firstDepthLayer] > 51));2031 m_dLambdaScaleVSO *= adLambdaScaleTable[m_iQP[firstDepthLayer]];2032 }2033 if ( m_bUseVSO && m_uiVSOMode == 4)2034 {2035 m_cRenModStrParser.setString( m_iNumberOfViews, m_pchVSOConfig );2036 m_cCameraData .init ( ((UInt) m_iNumberOfViews ),2037 m_internalBitDepth[ CHANNEL_TYPE_LUMA],2038 (UInt)m_iCodedCamParPrecision,2039 m_FrameSkip,2040 (UInt)m_framesToBeEncoded,2041 m_pchCameraParameterFile,2042 m_pchBaseViewCameraNumbers,2043 NULL,2044 m_cRenModStrParser.getSynthViews(),2045 LOG2_DISP_PREC_LUT );2046 }2047 else if ( m_bUseVSO && m_uiVSOMode != 4 )2048 {2049 m_cCameraData .init ( ((UInt) m_iNumberOfViews ),2050 m_internalBitDepth[ CHANNEL_TYPE_LUMA],2051 (UInt)m_iCodedCamParPrecision,2052 m_FrameSkip,2053 (UInt)m_framesToBeEncoded,2054 m_pchCameraParameterFile,2055 m_pchBaseViewCameraNumbers,2056 m_pchVSOConfig,2057 NULL,2058 LOG2_DISP_PREC_LUT );2059 }2060 else2061 {2062 m_cCameraData .init ( ((UInt) m_iNumberOfViews ),2063 m_internalBitDepth[ CHANNEL_TYPE_LUMA],2064 (UInt) m_iCodedCamParPrecision,2065 m_FrameSkip,2066 (UInt) m_framesToBeEncoded,2067 m_pchCameraParameterFile,2068 m_pchBaseViewCameraNumbers,2069 NULL,2070 NULL,2071 LOG2_DISP_PREC_LUT );2072 }2073 #else2074 m_cCameraData .init ( ((UInt) m_iNumberOfViews ),2075 m_internalBitDepth[ CHANNEL_TYPE_LUMA],2076 (UInt) m_iCodedCamParPrecision,2077 m_FrameSkip,2078 (UInt) m_framesToBeEncoded,2079 m_pchCameraParameterFile,2080 m_pchBaseViewCameraNumbers,2081 NULL,2082 NULL,2083 LOG2_DISP_PREC_LUT );2084 #endif2085 m_cCameraData.check( false, true );2086 #endif2087 1902 2088 1903 // check validity of input parameters … … 2262 2077 xConfirmPara( (m_layerIdInNuh.size()!=1) && (m_layerIdInNuh.size() < m_numberOfLayers) , "LayerIdInNuh must be given for all layers. "); 2263 2078 2264 #if NH_3D2265 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 3, "Scalability Mask must be equal to 2 or 3. ");2266 #else2267 2079 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 8 && m_scalabilityMask != 10, "Scalability Mask must be equal to 2, 8 or 10"); 2268 #endif 2269 2270 #if NH_3D 2271 if ( m_scalabilityMask & ( 1 << DEPTH_ID ) ) 2272 { 2273 m_dimIds.push_back( m_depthFlag ); 2274 } 2275 #endif 2080 2276 2081 2277 2082 m_dimIds.push_back( m_viewOrderIndex ); … … 2340 2145 xConfirmPara( allEqual , "Each layer shall have a different position in scalability space." ); 2341 2146 2342 #if !H_3D_FCO2343 2147 if ( numDiff == 1 ) 2344 2148 { … … 2351 2155 xConfirmPara( shallBeButIsNotIncreasing, "DimensionIds shall be increasing within one dimension. " ); 2352 2156 } 2353 #endif2354 2157 } 2355 2158 } … … 2558 2361 xConfirmPara( m_maxNumMergeCand < 1, "MaxNumMergeCand must be 1 or greater."); 2559 2362 xConfirmPara( m_maxNumMergeCand > 5, "MaxNumMergeCand must be 5 or smaller."); 2560 #if NH_3D2561 xConfirmPara( m_log2SubPbSizeMinus3 < 0, "Log2SubPbSizeMinus3 must be equal to 0 or greater.");2562 xConfirmPara( m_log2SubPbSizeMinus3 > 3, "Log2SubPbSizeMinus3 must be equal to 3 or smaller.");2563 xConfirmPara( (1<< ( m_log2SubPbSizeMinus3 + 3) ) > m_uiMaxCUWidth, "Log2SubPbSizeMinus3 must be equal to log2(maxCUSize)-3 or smaller.");2564 2565 xConfirmPara( m_log2MpiSubPbSizeMinus3 < 0, "Log2MpiSubPbSizeMinus3 must be equal to 0 or greater.");2566 xConfirmPara( m_log2MpiSubPbSizeMinus3 > 3, "Log2MpiSubPbSizeMinus3 must be equal to 3 or smaller.");2567 xConfirmPara( (1<< (m_log2MpiSubPbSizeMinus3 + 3)) > m_uiMaxCUWidth, "Log2MpiSubPbSizeMinus3 must be equal to log2(maxCUSize)-3 or smaller.");2568 #endif2569 2363 #if ADAPTIVE_QP_SELECTION 2570 2364 #if NH_MV … … 2629 2423 } 2630 2424 2631 #if NH_3D2632 xConfirmPara( m_pchCameraParameterFile == 0 , "CameraParameterFile must be given");2633 xConfirmPara( m_pchBaseViewCameraNumbers == 0 , "BaseViewCameraNumbers must be given" );2634 xConfirmPara( m_iNumberOfViews != m_cCameraData.getBaseViewNumbers().size() , "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );2635 xConfirmPara ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5, "CodedCamParsPrecision must be in range of 0..5" );2636 #if NH_3D_VSO2637 if( m_bUseVSO )2638 {2639 xConfirmPara( m_pchVSOConfig == 0 , "VSO Setup string must be given");2640 xConfirmPara( m_uiVSOMode > 4 , "VSO Mode must be less than 5");2641 }2642 #endif2643 #endif2644 2425 // max CU width and height should be power of 2 2645 2426 UInt ui = m_uiMaxCUWidth; … … 3386 3167 xPrintParaVector( "AuxId", m_auxId ); 3387 3168 #endif 3388 #if NH_3D3389 xPrintParaVector( "DepthLayerFlag", m_depthFlag );3390 printf("Coded Camera Param. Precision : %d\n", m_iCodedCamParPrecision);3391 #endif3392 3169 #if NH_MV 3393 3170 xPrintParaVector( "QP" , m_fQP ); … … 3556 3333 printf("ForceIntraQP : %d\n", m_RCForceIntraQP ); 3557 3334 3558 #if KWU_RC_MADPRED_E02273559 printf("Depth based MAD prediction : %d\n", m_depthMADPred);3560 #endif3561 #if KWU_RC_VIEWRC_E02273562 printf("View-wise Rate control : %d\n", m_viewWiseRateCtrl);3563 if(m_viewWiseRateCtrl)3564 {3565 3566 printf("ViewWiseTargetBits : ");3567 for (Int i = 0 ; i < m_iNumberOfViews ; i++)3568 printf("%d ", m_viewTargetBits[i]);3569 printf("\n");3570 }3571 else3572 {3573 printf("TargetBitrate : %d\n", m_RCTargetBitrate );3574 }3575 #endif3576 3335 3577 3336 } 3578 3337 3579 3338 printf("Max Num Merge Candidates : %d\n", m_maxNumMergeCand); 3580 #if NH_3D3581 printf("BaseViewCameraNumbers : %s\n", m_pchBaseViewCameraNumbers );3582 printf("Coded Camera Param. Precision : %d\n", m_iCodedCamParPrecision);3583 #if NH_3D_VSO3584 printf("Force use of Lambda Scale : %d\n", m_bForceLambdaScaleVSO );3585 3586 if ( m_bUseVSO )3587 {3588 printf("VSO Lambda Scale : %5.2f\n", m_dLambdaScaleVSO );3589 printf("VSO Mode : %d\n", m_uiVSOMode );3590 printf("VSO Config : %s\n", m_pchVSOConfig );3591 printf("VSO Negative Distortion : %d\n", m_bAllowNegDist ? 1 : 0);3592 printf("VSO LS Table : %d\n", m_bVSOLSTable ? 1 : 0);3593 printf("VSO Estimated VSD : %d\n", m_bUseEstimatedVSD ? 1 : 0);3594 printf("VSO Early Skip : %d\n", m_bVSOEarlySkip ? 1 : 0);3595 if ( m_bUseWVSO )3596 {3597 printf("Dist. Weights (VSO/VSD/SAD) : %d/%d/%d\n ", m_iVSOWeight, m_iVSDWeight, m_iDWeight );3598 }3599 }3600 #endif //HHI_VSO3601 #endif //NH_3D3602 3339 printf("\n"); 3603 3340 #if NH_MV … … 3661 3398 printf(" SignBitHidingFlag:%d ", m_signHideFlag); 3662 3399 printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 ); 3663 #if NH_3D_VSO3664 printf(" VSO:%d ", m_bUseVSO );3665 printf("WVSO:%d ", m_bUseWVSO );3666 #endif3667 #if NH_3D3668 printf( "QTL:%d " , m_bUseQTL);3669 printf( "IlluCompEnable:%d " , m_abUseIC);3670 printf( "IlluCompLowLatencyEnc:%d ", m_bUseLowLatencyICEnc);3671 printf( "DLT:%d ", m_useDLT );3672 3673 3674 printf( "IvMvPred:%d %d " , m_ivMvPredFlag[0] ? 1 : 0, m_ivMvPredFlag[1] ? 1 : 0);3675 printf( "IvMvScaling:%d %d " , m_ivMvScalingFlag[0] ? 1 : 0 , m_ivMvScalingFlag[1] ? 1 : 0);3676 3677 printf( "Log2SubPbSizeMinus3:%d " , m_log2SubPbSizeMinus3 );3678 printf( "IvResPred:%d " , m_ivResPredFlag ? 1 : 0 );3679 printf( "DepthRefinement:%d " , m_depthRefinementFlag ? 1 : 0 );3680 printf( "ViewSynthesisPred:%d " , m_viewSynthesisPredFlag ? 1 : 0 );3681 printf( "DepthBasedBlkPart:%d " , m_depthBasedBlkPartFlag ? 1 : 0 );3682 printf( "Mpi:%d " , m_mpiFlag ? 1 : 0 );3683 printf( "Log2MpiSubPbSizeMinus3:%d " , m_log2MpiSubPbSizeMinus3 );3684 printf( "IntraContour:%d " , m_intraContourFlag ? 1 : 0 );3685 printf( "IntraWedge:%d " , m_intraWedgeFlag ? 1 : 0 );3686 printf( "IntraSdc:%d " , m_intraSdcFlag ? 1 : 0 );3687 printf( "QtPred:%d " , m_qtPredFlag ? 1 : 0 );3688 printf( "InterSdc:%d " , m_interSdcFlag ? 1 : 0 );3689 printf( "DepthIntraSkip:%d " , m_depthIntraSkipFlag ? 1 : 0 );3690 #endif3691 3400 3692 3401 printf("\n\n");
Note: See TracChangeset for help on using the changeset viewer.