Changeset 1386 in 3DVCSoftware for trunk/source/App/TAppEncoder
- Timestamp:
- 13 Nov 2015, 16:29:39 (9 years ago)
- Location:
- trunk/source/App/TAppEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r1356 r1386 109 109 110 110 TAppEncCfg::TAppEncCfg() 111 #if NH_MV 112 : m_pchBitstreamFile() 113 #else 114 : m_pchInputFile() 115 , m_pchBitstreamFile() 116 , m_pchReconFile() 117 #endif 118 , m_inputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) 111 : m_inputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) 119 112 , m_snrInternalColourSpace(false) 120 113 , m_outputInternalColourSpace(false) 121 , m_pchdQPFile()122 , m_scalingListFile()123 114 { 124 115 #if !NH_MV … … 171 162 m_targetPivotValue = NULL; 172 163 } 173 #if !NH_MV174 free(m_pchInputFile);175 #endif176 free(m_pchBitstreamFile);177 164 #if NH_MV 178 165 for(Int i = 0; i< m_pchReconFileList.size(); i++ ) … … 181 168 free (m_pchReconFileList[i]); 182 169 } 183 #else 184 free(m_pchReconFile); 185 #endif 186 free(m_pchdQPFile); 187 free(m_scalingListFile); 188 #if NH_MV 170 189 171 for( Int i = 0; i < m_GOPListMvc.size(); i++ ) 190 172 { … … 195 177 } 196 178 } 197 #endif 198 #if NH_3D 179 180 if ( m_pchBaseViewCameraNumbers != NULL ) 181 { 182 free ( m_pchBaseViewCameraNumbers ); 183 } 184 #endif 199 185 #if NH_3D_VSO 200 186 if ( m_pchVSOConfig != NULL) … … 202 188 free ( m_pchVSOConfig ); 203 189 } 204 #endif 190 205 191 if ( m_pchCameraParameterFile != NULL ) 206 192 { 207 193 free ( m_pchCameraParameterFile ); 208 }209 210 if ( m_pchBaseViewCameraNumbers != NULL )211 {212 free ( m_pchBaseViewCameraNumbers );213 194 } 214 195 #endif … … 224 205 225 206 226 #if NH_MV _SEI207 #if NH_MV 227 208 Void TAppEncCfg::xParseSeiCfg() 228 209 { … … 302 283 } 303 284 304 Bool confirmPara(Bool bflag, const Char* message);285 Bool confirmPara(Bool bflag, const TChar* message); 305 286 306 287 static inline ChromaFormat numberToChromaFormat(const Int val) … … 318 299 static const struct MapStrToProfile 319 300 { 320 const Char* str;301 const TChar* str; 321 302 Profile::Name value; 322 303 } … … 340 321 static const struct MapStrToExtendedProfile 341 322 { 342 const Char* str;323 const TChar* str; 343 324 ExtendedProfileName value; 344 325 } … … 405 386 static const struct MapStrToTier 406 387 { 407 const Char* str;388 const TChar* str; 408 389 Level::Tier value; 409 390 } … … 416 397 static const struct MapStrToLevel 417 398 { 418 const Char* str;399 const TChar* str; 419 400 Level::Name value; 420 401 } … … 438 419 }; 439 420 421 #if U0132_TARGET_BITS_SATURATION 422 UInt g_uiMaxCpbSize[2][21] = 423 { 424 // LEVEL1, LEVEL2,LEVEL2_1, LEVEL3, LEVEL3_1, LEVEL4, LEVEL4_1, LEVEL5, LEVEL5_1, LEVEL5_2, LEVEL6, LEVEL6_1, LEVEL6_2 425 { 0, 0, 0, 350000, 0, 0, 1500000, 3000000, 0, 6000000, 10000000, 0, 12000000, 20000000, 0, 25000000, 40000000, 60000000, 60000000, 120000000, 240000000 }, 426 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30000000, 50000000, 0, 100000000, 160000000, 240000000, 240000000, 480000000, 800000000 } 427 }; 428 #endif 429 440 430 static const struct MapStrToCostMode 441 431 { 442 const Char* str;432 const TChar* str; 443 433 CostMode value; 444 434 } … … 453 443 static const struct MapStrToScalingListMode 454 444 { 455 const Char* str;445 const TChar* str; 456 446 ScalingListMode value; 457 447 } … … 533 523 { 534 524 const T minValIncl; 535 const T maxValIncl; // Use 0 for unlimited525 const T maxValIncl; 536 526 const std::size_t minNumValuesIncl; 537 527 const std::size_t maxNumValuesIncl; // Use 0 for unlimited … … 545 535 SMultiValueInput<T> &operator=(const std::vector<T> &userValues) { values=userValues; return *this; } 546 536 SMultiValueInput<T> &operator=(const SMultiValueInput<T> &userValues) { values=userValues.values; return *this; } 537 538 T readValue(const TChar *&pStr, Bool &bSuccess); 539 540 istream& readValues(std::istream &in); 547 541 }; 548 542 549 static inline istream& operator >> (istream &in, SMultiValueInput<UInt> &values) 543 template <class T> 544 static inline istream& operator >> (std::istream &in, SMultiValueInput<T> &values) 550 545 { 551 values.values.clear(); 546 return values.readValues(in); 547 } 548 549 template<> 550 UInt SMultiValueInput<UInt>::readValue(const TChar *&pStr, Bool &bSuccess) 551 { 552 TChar *eptr; 553 UInt val=strtoul(pStr, &eptr, 0); 554 pStr=eptr; 555 bSuccess=!(*eptr!=0 && !isspace(*eptr) && *eptr!=',') && !(val<minValIncl || val>maxValIncl); 556 return val; 557 } 558 559 template<> 560 Int SMultiValueInput<Int>::readValue(const TChar *&pStr, Bool &bSuccess) 561 { 562 TChar *eptr; 563 Int val=strtol(pStr, &eptr, 0); 564 pStr=eptr; 565 bSuccess=!(*eptr!=0 && !isspace(*eptr) && *eptr!=',') && !(val<minValIncl || val>maxValIncl); 566 return val; 567 } 568 569 template<> 570 Double SMultiValueInput<Double>::readValue(const TChar *&pStr, Bool &bSuccess) 571 { 572 TChar *eptr; 573 Double val=strtod(pStr, &eptr); 574 pStr=eptr; 575 bSuccess=!(*eptr!=0 && !isspace(*eptr) && *eptr!=',') && !(val<minValIncl || val>maxValIncl); 576 return val; 577 } 578 579 template<> 580 Bool SMultiValueInput<Bool>::readValue(const TChar *&pStr, Bool &bSuccess) 581 { 582 TChar *eptr; 583 Int val=strtol(pStr, &eptr, 0); 584 pStr=eptr; 585 bSuccess=!(*eptr!=0 && !isspace(*eptr) && *eptr!=',') && !(val<Int(minValIncl) || val>Int(maxValIncl)); 586 return val!=0; 587 } 588 589 template <class T> 590 istream& SMultiValueInput<T>::readValues(std::istream &in) 591 { 592 values.clear(); 552 593 string str; 553 594 while (!in.eof()) … … 557 598 if (!str.empty()) 558 599 { 559 const Char *pStr=str.c_str();600 const TChar *pStr=str.c_str(); 560 601 // soak up any whitespace 561 602 for(;isspace(*pStr);pStr++); … … 563 604 while (*pStr != 0) 564 605 { 565 Char *eptr;566 UInt val=strtoul(pStr, &eptr, 0);567 if ( *eptr!=0 && !isspace(*eptr) && *eptr!=',')606 Bool bSuccess=true; 607 T val=readValue(pStr, bSuccess); 608 if (!bSuccess) 568 609 { 569 610 in.setstate(ios::failbit); 570 611 break; 571 612 } 572 if (val<values.minValIncl || val>values.maxValIncl) 613 614 if (maxNumValuesIncl != 0 && values.size() >= maxNumValuesIncl) 573 615 { 574 616 in.setstate(ios::failbit); 575 617 break; 576 618 } 577 578 if (values.maxNumValuesIncl != 0 && values.values.size() >= values.maxNumValuesIncl) 579 { 580 in.setstate(ios::failbit); 581 break; 582 } 583 values.values.push_back(val); 619 values.push_back(val); 584 620 // soak up any whitespace and up to 1 comma. 585 pStr=eptr;586 621 for(;isspace(*pStr);pStr++); 587 622 if (*pStr == ',') … … 592 627 } 593 628 } 594 if (values.values.size() < values.minNumValuesIncl) 595 { 596 in.setstate(ios::failbit); 597 } 598 return in; 599 } 600 601 static inline istream& operator >> (istream &in, SMultiValueInput<Int> &values) 602 { 603 values.values.clear(); 604 string str; 605 while (!in.eof()) 606 { 607 string tmp; in >> tmp; str+=" " + tmp; 608 } 609 if (!str.empty()) 610 { 611 const Char *pStr=str.c_str(); 612 // soak up any whitespace 613 for(;isspace(*pStr);pStr++); 614 615 while (*pStr != 0) 616 { 617 Char *eptr; 618 Int val=strtol(pStr, &eptr, 0); 619 if (*eptr!=0 && !isspace(*eptr) && *eptr!=',') 620 { 621 in.setstate(ios::failbit); 622 break; 623 } 624 if (val<values.minValIncl || val>values.maxValIncl) 625 { 626 in.setstate(ios::failbit); 627 break; 628 } 629 630 if (values.maxNumValuesIncl != 0 && values.values.size() >= values.maxNumValuesIncl) 631 { 632 in.setstate(ios::failbit); 633 break; 634 } 635 values.values.push_back(val); 636 // soak up any whitespace and up to 1 comma. 637 pStr=eptr; 638 for(;isspace(*pStr);pStr++); 639 if (*pStr == ',') 640 { 641 pStr++; 642 } 643 for(;isspace(*pStr);pStr++); 644 } 645 } 646 if (values.values.size() < values.minNumValuesIncl) 647 { 648 in.setstate(ios::failbit); 649 } 650 return in; 651 } 652 653 static inline istream& operator >> (istream &in, SMultiValueInput<Bool> &values) 654 { 655 values.values.clear(); 656 string str; 657 while (!in.eof()) 658 { 659 string tmp; in >> tmp; str+=" " + tmp; 660 } 661 if (!str.empty()) 662 { 663 const Char *pStr=str.c_str(); 664 // soak up any whitespace 665 for(;isspace(*pStr);pStr++); 666 667 while (*pStr != 0) 668 { 669 Char *eptr; 670 Int val=strtol(pStr, &eptr, 0); 671 if (*eptr!=0 && !isspace(*eptr) && *eptr!=',') 672 { 673 in.setstate(ios::failbit); 674 break; 675 } 676 if (val<Int(values.minValIncl) || val>Int(values.maxValIncl)) 677 { 678 in.setstate(ios::failbit); 679 break; 680 } 681 682 if (values.maxNumValuesIncl != 0 && values.values.size() >= values.maxNumValuesIncl) 683 { 684 in.setstate(ios::failbit); 685 break; 686 } 687 values.values.push_back(val!=0); 688 // soak up any whitespace and up to 1 comma. 689 pStr=eptr; 690 for(;isspace(*pStr);pStr++); 691 if (*pStr == ',') 692 { 693 pStr++; 694 } 695 for(;isspace(*pStr);pStr++); 696 } 697 } 698 if (values.values.size() < values.minNumValuesIncl) 629 if (values.size() < minNumValuesIncl) 699 630 { 700 631 in.setstate(ios::failbit); … … 786 717 \retval true when success 787 718 */ 788 Bool TAppEncCfg::parseCfg( Int argc, Char* argv[] )719 Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] ) 789 720 { 790 721 Bool do_help = false; 791 722 792 #if !NH_MV793 string cfg_InputFile;794 #endif795 string cfg_BitstreamFile;796 #if !NH_MV797 string cfg_ReconFile;798 #endif799 723 #if NH_MV 800 724 vector<Int> cfg_dimensionLength; … … 809 733 #endif 810 734 #endif 811 string cfg_dQPFile;812 string cfg_ScalingListFile;813 735 814 736 Int tmpChromaFormat; 815 737 Int tmpInputChromaFormat; 816 738 Int tmpConstraintChromaFormat; 739 Int tmpWeightedPredictionMethod; 740 Int tmpFastInterSearchMode; 741 Int tmpMotionEstimationSearchMethod; 742 Int tmpSliceMode; 743 Int tmpSliceSegmentMode; 744 Int tmpDecodedPictureHashSEIMappedType; 817 745 string inputColourSpaceConvert; 818 746 #if NH_MV … … 829 757 SMultiValueInput<Int> cfg_codedPivotValue (std::numeric_limits<Int>::min(), std::numeric_limits<Int>::max(), 0, 1<<16); 830 758 SMultiValueInput<Int> cfg_targetPivotValue (std::numeric_limits<Int>::min(), std::numeric_limits<Int>::max(), 0, 1<<16); 759 760 SMultiValueInput<Double> cfg_adIntraLambdaModifier (0, std::numeric_limits<Double>::max(), 0, MAX_TLAYER); ///< Lambda modifier for Intra pictures, one for each temporal layer. If size>temporalLayer, then use [temporalLayer], else if size>0, use [size()-1], else use m_adLambdaModifier. 761 831 762 832 763 const UInt defaultInputKneeCodes[3] = { 600, 800, 900 }; … … 866 797 ("InputFile_%d,i_%d", m_pchInputFileList, (char *) 0 , MAX_NUM_LAYER_IDS , "original Yuv input file name %d") 867 798 #else 868 ("InputFile,i", cfg_InputFile,string(""), "Original YUV input file name")869 #endif 870 ("BitstreamFile,b", cfg_BitstreamFile,string(""), "Bitstream output file name")799 ("InputFile,i", m_inputFileName, string(""), "Original YUV input file name") 800 #endif 801 ("BitstreamFile,b", m_bitstreamFileName, string(""), "Bitstream output file name") 871 802 #if NH_MV 872 803 ("ReconFile_%d,o_%d", m_pchReconFileList, (char *) 0 , MAX_NUM_LAYER_IDS , "reconstructed Yuv output file name %d") 873 804 #else 874 ("ReconFile,o", cfg_ReconFile,string(""), "Reconstructed YUV output file name")875 #endif 876 #if NH_MV 877 ("NumberOfLayers", m_numberOfLayers , 1, "Number of layers")878 #if !NH_3D 879 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary")880 #else 881 ("ScalabilityMask", m_scalabilityMask , 3 , "Scalability Mask, 1: Texture 3: Texture + Depth ")805 ("ReconFile,o", m_reconFileName, string(""), "Reconstructed YUV output file name") 806 #endif 807 #if NH_MV 808 ("NumberOfLayers", m_numberOfLayers , 1, "Number of layers") 809 #if !NH_3D 810 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary") 811 #else 812 ("ScalabilityMask", m_scalabilityMask , 3 , "Scalability Mask, 1: Texture 3: Texture + Depth ") 882 813 #endif 883 ("DimensionIdLen", m_dimensionIdLen , cfg_dimensionLength , "Number of bits used to store dimensions Id")814 ("DimensionIdLen", m_dimensionIdLen , cfg_dimensionLength , "Number of bits used to store dimensions Id") 884 815 ("ViewOrderIndex", m_viewOrderIndex , IntAry1d(1,0), "View Order Index per layer") 885 816 ("ViewId", m_viewId , IntAry1d(1,0), "View Id per View Order Index") 886 817 ("AuxId", m_auxId , IntAry1d(1,0), "AuxId per layer") 887 #if NH_3D 818 #if NH_3D_VSO 888 819 ("DepthFlag", m_depthFlag , IntAry1d(1,0), "Depth Flag") 889 820 #endif 890 821 ("TargetEncLayerIdList", m_targetEncLayerIdList , IntAry1d(0,0), "LayerIds in Nuh to be encoded") 891 822 ("LayerIdInNuh", m_layerIdInNuh , IntAry1d(1,0), "LayerId in Nuh") 892 ("SplittingFlag", m_splittingFlag , false ,"Splitting Flag")823 ("SplittingFlag", m_splittingFlag , false, "Splitting Flag") 893 824 894 825 // Layer Sets + Output Layer Sets + Profile Tier Level 895 ("VpsNumLayerSets" , m_vpsNumLayerSets , 1 ,"Number of layer sets")896 ("LayerIdsInSet_%d" , m_layerId sInSets , IntAry1d(1,0) , MAX_VPS_OP_SETS_PLUS1 , "LayerIds of Layer set")897 ("NumAddLayerSets" , m_numAddLayerSets , 0 ,"NumAddLayerSets ")826 ("VpsNumLayerSets" , m_vpsNumLayerSets , 1 , "Number of layer sets") 827 ("LayerIdsInSet_%d" , m_layerIdxInVpsInSets , IntAry1d(1,0) , MAX_VPS_OP_SETS_PLUS1 , "Layer indices in VPS of layers in layer set") 828 ("NumAddLayerSets" , m_numAddLayerSets , 0 , "NumAddLayerSets ") 898 829 ("HighestLayerIdxPlus1_%d" , m_highestLayerIdxPlus1 , IntAry1d(0,0) , MAX_VPS_NUM_ADD_LAYER_SETS , "HighestLayerIdxPlus1") 899 ("DefaultTargetOutputLayerIdc" , m_defaultOutputLayerIdc , 0,"Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")830 ("DefaultTargetOutputLayerIdc" , m_defaultOutputLayerIdc , 0 , "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet") 900 831 ("OutputLayerSetIdx" , m_outputLayerSetIdx , IntAry1d(0,0) , "Indices of layer sets used as additional output layer sets") 901 832 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , IntAry1d(0,0) , MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") … … 941 872 ("ConfWinTop", m_confWinTop, 0, "Top offset for window conformance mode 3") 942 873 ("ConfWinBottom", m_confWinBottom, 0, "Bottom offset for window conformance mode 3") 874 ("AccessUnitDelimiter", m_AccessUnitDelimiter, false, "Enable Access Unit Delimiter NALUs") 943 875 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 944 876 ("FrameSkip,-fs", m_FrameSkip, 0u, "Number of frames to skip at start of input YUV") … … 1003 935 // motion search options 1004 936 ("DisableIntraInInter", m_bDisableIntraPUsInInterSlices, false, "Flag to disable intra PUs in inter slices") 1005 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST")937 ("FastSearch", tmpMotionEstimationSearchMethod, Int(MESEARCH_DIAMOND), "0:Full search 1:Diamond 2:Selective 3:Enhanced Diamond") 1006 938 ("SearchRange,-sr", m_iSearchRange, 96, "Motion search range") 1007 939 #if NH_MV … … 1010 942 #endif 1011 943 ("BipredSearchRange", m_bipredSearchRange, 4, "Motion search range for bipred refinement") 944 ("MinSearchWindow", m_minSearchWindow, 8, "Minimum motion search window size for the adaptive window ME") 945 ("RestrictMESampling", m_bRestrictMESampling, false, "Restrict ME Sampling for selective inter motion search") 1012 946 ("ClipForBiPredMEEnabled", m_bClipForBiPredMeEnabled, false, "Enables clipping in the Bi-Pred ME. It is disabled to reduce encoder run-time") 1013 947 ("FastMEAssumingSmootherMVEnabled", m_bFastMEAssumingSmootherMVEnabled, true, "Enables fast ME assuming a smoother MV.") … … 1017 951 1018 952 // Mode decision parameters 1019 ("LambdaModifier0,-LM0", m_adLambdaModifier[ 0 ], ( Double )1.0, "Lambda modifier for temporal layer 0") 1020 ("LambdaModifier1,-LM1", m_adLambdaModifier[ 1 ], ( Double )1.0, "Lambda modifier for temporal layer 1") 1021 ("LambdaModifier2,-LM2", m_adLambdaModifier[ 2 ], ( Double )1.0, "Lambda modifier for temporal layer 2") 1022 ("LambdaModifier3,-LM3", m_adLambdaModifier[ 3 ], ( Double )1.0, "Lambda modifier for temporal layer 3") 1023 ("LambdaModifier4,-LM4", m_adLambdaModifier[ 4 ], ( Double )1.0, "Lambda modifier for temporal layer 4") 1024 ("LambdaModifier5,-LM5", m_adLambdaModifier[ 5 ], ( Double )1.0, "Lambda modifier for temporal layer 5") 1025 ("LambdaModifier6,-LM6", m_adLambdaModifier[ 6 ], ( Double )1.0, "Lambda modifier for temporal layer 6") 953 ("LambdaModifier0,-LM0", m_adLambdaModifier[ 0 ], ( Double )1.0, "Lambda modifier for temporal layer 0. If LambdaModifierI is used, this will not affect intra pictures") 954 ("LambdaModifier1,-LM1", m_adLambdaModifier[ 1 ], ( Double )1.0, "Lambda modifier for temporal layer 1. If LambdaModifierI is used, this will not affect intra pictures") 955 ("LambdaModifier2,-LM2", m_adLambdaModifier[ 2 ], ( Double )1.0, "Lambda modifier for temporal layer 2. If LambdaModifierI is used, this will not affect intra pictures") 956 ("LambdaModifier3,-LM3", m_adLambdaModifier[ 3 ], ( Double )1.0, "Lambda modifier for temporal layer 3. If LambdaModifierI is used, this will not affect intra pictures") 957 ("LambdaModifier4,-LM4", m_adLambdaModifier[ 4 ], ( Double )1.0, "Lambda modifier for temporal layer 4. If LambdaModifierI is used, this will not affect intra pictures") 958 ("LambdaModifier5,-LM5", m_adLambdaModifier[ 5 ], ( Double )1.0, "Lambda modifier for temporal layer 5. If LambdaModifierI is used, this will not affect intra pictures") 959 ("LambdaModifier6,-LM6", m_adLambdaModifier[ 6 ], ( Double )1.0, "Lambda modifier for temporal layer 6. If LambdaModifierI is used, this will not affect intra pictures") 960 ("LambdaModifierI,-LMI", cfg_adIntraLambdaModifier, cfg_adIntraLambdaModifier, "Lambda modifiers for Intra pictures, comma separated, up to one the number of temporal layer. If entry for temporalLayer exists, then use it, else if some are specified, use the last, else use the standard LambdaModifiers.") 961 ("IQPFactor,-IQF", m_dIntraQpFactor, -1.0, "Intra QP Factor for Lambda Computation. If negative, use the default equation: 0.57*(1.0 - Clip3( 0.0, 0.5, 0.05*(Double)(isField ? (GopSize-1)/2 : GopSize-1) ))") 1026 962 1027 963 /* Quantization parameters */ … … 1046 982 ("AdaptiveQP,-aq", m_bUseAdaptiveQP, false, "QP adaptation based on a psycho-visual model") 1047 983 ("MaxQPAdaptationRange,-aqr", m_iQPAdaptationRange, 6, "QP adaptation range") 1048 ("dQPFile,m", cfg_dQPFile,string(""), "dQP file name")984 ("dQPFile,m", m_dQPFileName, string(""), "dQP file name") 1049 985 ("RDOQ", m_useRDOQ, true) 1050 986 ("RDOQTS", m_useRDOQTS, true) … … 1090 1026 ("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "Max number of SAO offset per picture (Default: 2048)") 1091 1027 ("SAOLcuBoundary", m_saoCtuBoundary, false, "0: right/bottom CTU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas") 1092 ("SliceMode", m_sliceMode, 0, "0: Disable all Recon slice limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice")1028 ("SliceMode", tmpSliceMode, Int(NO_SLICES), "0: Disable all Recon slice limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice") 1093 1029 ("SliceArgument", m_sliceArgument, 0, "Depending on SliceMode being:" 1094 1030 "\t1: max number of CTUs per slice" 1095 1031 "\t2: max number of bytes per slice" 1096 1032 "\t3: max number of tiles per slice") 1097 ("SliceSegmentMode", m_sliceSegmentMode, 0, "0: Disable all slice segment limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice")1033 ("SliceSegmentMode", tmpSliceSegmentMode, Int(NO_SLICES), "0: Disable all slice segment limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice") 1098 1034 ("SliceSegmentArgument", m_sliceSegmentArgument, 0, "Depending on SliceSegmentMode being:" 1099 1035 "\t1: max number of CTUs per slice segment" … … 1112 1048 ("PCMInputBitDepthFlag", m_bPCMInputBitDepthFlag, true) 1113 1049 ("PCMFilterDisableFlag", m_bPCMFilterDisableFlag, false) 1114 ("IntraReferenceSmoothing", m_enableIntraReferenceSmoothing, true, "0: Disable use of intra reference smoothing . 1: Enable use of intra reference smoothing (not valid in V1 profiles)")1050 ("IntraReferenceSmoothing", m_enableIntraReferenceSmoothing, true, "0: Disable use of intra reference smoothing (not valid in V1 profiles). 1: Enable use of intra reference smoothing (same as V1)") 1115 1051 ("WeightedPredP,-wpP", m_useWeightedPred, false, "Use weighted prediction in P slices") 1116 1052 ("WeightedPredB,-wpB", m_useWeightedBiPred, false, "Use weighted (bidirectional) prediction in B slices") 1053 ("WeightedPredMethod,-wpM", tmpWeightedPredictionMethod, Int(WP_PER_PICTURE_WITH_SIMPLE_DC_COMBINED_COMPONENT), "Weighted prediction method") 1117 1054 ("Log2ParallelMergeLevel", m_log2ParallelMergeLevel, 2u, "Parallel merge estimation region") 1118 1055 //deprecated copies of renamed tile parameters … … 1127 1064 ("TileRowHeightArray", cfg_RowHeight, cfg_RowHeight, "Array containing tile row height values in units of CTU") 1128 1065 ("LFCrossTileBoundaryFlag", m_bLFCrossTileBoundaryFlag, true, "1: cross-tile-boundary loop filtering. 0:non-cross-tile-boundary loop filtering") 1129 ("WaveFrontSynchro", m_ iWaveFrontSynchro, 0, "0: no synchro; 1 synchro with top-right-right")1066 ("WaveFrontSynchro", m_entropyCodingSyncEnabledFlag, false, "0: entropy coding sync disabled; 1 entropy coding sync enabled") 1130 1067 ("ScalingList", m_useScalingListId, SCALING_LIST_OFF, "0/off: no scaling list, 1/default: default scaling lists, 2/file: scaling lists specified in ScalingListFile") 1131 ("ScalingListFile", cfg_ScalingListFile,string(""), "Scaling list file name. Use an empty string to produce help.")1068 ("ScalingListFile", m_scalingListFileName, string(""), "Scaling list file name. Use an empty string to produce help.") 1132 1069 ("SignHideFlag,-SBH", m_signHideFlag, true) 1133 1070 ("MaxNumMergeCand", m_maxNumMergeCand, 5u, "Maximum number of merge candidates") 1134 1071 /* Misc. */ 1135 ("SEIDecodedPictureHash", m_decodedPictureHashSEIEnabled,0, "Control generation of decode picture hash SEI messages\n"1072 ("SEIDecodedPictureHash", tmpDecodedPictureHashSEIMappedType, 0, "Control generation of decode picture hash SEI messages\n" 1136 1073 "\t3: checksum\n" 1137 1074 "\t2: CRC\n" … … 1139 1076 "\t0: disable") 1140 1077 ("TMVPMode", m_TMVPModeId, 1, "TMVP mode 0: TMVP disable for all slices. 1: TMVP enable for all slices (default) 2: TMVP enable for certain slices only") 1141 ("FEN", m_bUseFastEnc, false, "fast encoder setting")1078 ("FEN", tmpFastInterSearchMode, Int(FASTINTERSEARCH_DISABLED), "fast encoder setting") 1142 1079 ("ECU", m_bUseEarlyCU, false, "Early CU setting") 1143 1080 ("FDM", m_useFastDecisionForMerge, true, "Fast decision for Merge RD Cost") … … 1152 1089 ( "RCForceIntraQP", m_RCForceIntraQP, false, "Rate control: force intra QP to be equal to initial QP" ) 1153 1090 1091 #if U0132_TARGET_BITS_SATURATION 1092 ( "RCCpbSaturation", m_RCCpbSaturationEnabled, false, "Rate control: enable target bits saturation to avoid CPB overflow and underflow" ) 1093 ( "RCCpbSize", m_RCCpbSize, 0u, "Rate control: CPB size" ) 1094 ( "RCInitialCpbFullness", m_RCInitialCpbFullness, 0.9, "Rate control: initial CPB fullness" ) 1095 #endif 1096 1154 1097 #if KWU_RC_VIEWRC_E0227 1155 1098 ("ViewWiseTargetBits, -vtbr" , m_viewTargetBits, std::vector<Int>(1, 32), "View-wise target bit-rate setting") … … 1162 1105 // A lot of this stuff could should actually be derived by the encoder. 1163 1106 // VPS VUI 1164 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false, "VpsVuiPresentFlag ")1165 ("CrossLayerPicTypeAlignedFlag" , m_crossLayerPicTypeAlignedFlag, false, "CrossLayerPicTypeAlignedFlag") // Could actually be derived by the encoder1166 ("CrossLayerIrapAlignedFlag" , m_crossLayerIrapAlignedFlag , false, "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder1167 ("AllLayersIdrAlignedFlag" , m_allLayersIdrAlignedFlag , false, "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder1168 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false, "BitRatePresentVpsFlag ")1169 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false, "PicRatePresentVpsFlag ")1170 ("BitRatePresentFlag" , m_bitRatePresentFlag , BoolAry1d(1,0) ,MAX_VPS_OP_SETS_PLUS1, "BitRatePresentFlag per sub layer for the N-th layer set")1171 ("PicRatePresentFlag" , m_picRatePresentFlag , BoolAry1d(1,0) ,MAX_VPS_OP_SETS_PLUS1, "PicRatePresentFlag per sub layer for the N-th layer set")1172 ("AvgBitRate" , m_avgBitRate , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgBitRate per sub layer for the N-th layer set")1173 ("MaxBitRate" , m_maxBitRate , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "MaxBitRate per sub layer for the N-th layer set")1174 ("ConstantPicRateIdc" , m_constantPicRateIdc , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set")1175 ("AvgPicRate" , m_avgPicRate , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgPicRate per sub layer for the N-th layer set")1176 ("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 ") 1177 1120 ("TilesInUseFlag" , m_tilesInUseFlag , BoolAry1d(1,false) , "TilesInUseFlag ") 1178 ("LoopFilterNotAcrossTilesFlag" , m_loopFilterNotAcrossTilesFlag , BoolAry1d(1,false) , "LoopFilterNotAcrossTilesFlag ")1179 ("WppNotInUseFlag" , m_wppNotInUseFlag , true 1180 ("WppInUseFlag" , m_wppInUseFlag , BoolAry1d(1,0) , "WppInUseFlag ")1181 ("TileBoundariesAlignedFlag" , m_tileBoundariesAlignedFlag , BoolAry1d(1,0) ,MAX_NUM_LAYERS, "TileBoundariesAlignedFlag per direct reference for the N-th layer")1182 ("IlpRestrictedRefLayersFlag" , m_ilpRestrictedRefLayersFlag , false, "IlpRestrictedRefLayersFlag")1183 ("MinSpatialSegmentOffsetPlus1" , m_minSpatialSegmentOffsetPlus1 , IntAry1d (1,0), MAX_NUM_LAYERS , "MinSpatialSegmentOffsetPlus1 per direct reference for the N-th layer")1184 ("CtuBasedOffsetEnabledFlag" , m_ctuBasedOffsetEnabledFlag , BoolAry1d(1,0) ,MAX_NUM_LAYERS, "CtuBasedOffsetEnabledFlag per direct reference for the N-th layer")1185 ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , IntAry1d (1,0), MAX_NUM_LAYERS , "MinHorizontalCtuOffsetPlus1 per direct reference for the N-th layer")1186 ("SingleLayerForNonIrapFlag" , m_singleLayerForNonIrapFlag, false, "SingleLayerForNonIrapFlag")1187 ("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 ") 1188 1131 #endif 1189 1132 … … 1227 1170 ("Log2MaxMvLengthHorizontal", m_log2MaxMvLengthHorizontal, 15, "Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units") 1228 1171 ("Log2MaxMvLengthVertical", m_log2MaxMvLengthVertical, 15, "Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units") 1229 ("SEIRecoveryPoint", m_recoveryPointSEIEnabled, 0, "Control generation of recovery point SEI messages") 1230 ("SEIBufferingPeriod", m_bufferingPeriodSEIEnabled, 0, "Control generation of buffering period SEI messages") 1231 ("SEIPictureTiming", m_pictureTimingSEIEnabled, 0, "Control generation of picture timing SEI messages") 1172 ("SEIColourRemappingInfoFileRoot,-cri", m_colourRemapSEIFileRoot, string(""), "Colour Remapping Information SEI parameters root file name (wo num ext)") 1173 ("SEIRecoveryPoint", m_recoveryPointSEIEnabled, false, "Control generation of recovery point SEI messages") 1174 ("SEIBufferingPeriod", m_bufferingPeriodSEIEnabled, false, "Control generation of buffering period SEI messages") 1175 ("SEIPictureTiming", m_pictureTimingSEIEnabled, false, "Control generation of picture timing SEI messages") 1232 1176 ("SEIToneMappingInfo", m_toneMappingInfoSEIEnabled, false, "Control generation of Tone Mapping SEI messages") 1233 1177 ("SEIToneMapId", m_toneMapId, 0, "Specifies Id of Tone Mapping SEI message for a given session") … … 1262 1206 ("SEIToneMapNominalWhiteLevelLumaCodeValue", m_nominalWhiteLevelLumaCodeValue, 235, "Specifies luma sample value of the nominal white level assigned decoded pictures") 1263 1207 ("SEIToneMapExtendedWhiteLevelLumaCodeValue", m_extendedWhiteLevelLumaCodeValue, 300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures") 1264 ("SEIChroma SamplingFilterHint", m_chromaSamplingFilterSEIenabled,false, "Control generation of the chroma sampling filter hint SEI message")1265 ("SEIChroma SamplingHorizontalFilterType", m_chromaSamplingHorFilterIdc,2, "Defines the Index of the chroma sampling horizontal filter\n"1208 ("SEIChromaResamplingFilterHint", m_chromaResamplingFilterSEIenabled, false, "Control generation of the chroma sampling filter hint SEI message") 1209 ("SEIChromaResamplingHorizontalFilterType", m_chromaResamplingHorFilterIdc, 2, "Defines the Index of the chroma sampling horizontal filter\n" 1266 1210 "\t0: unspecified - Chroma filter is unknown or is determined by the application" 1267 1211 "\t1: User-defined - Filter coefficients are specified in the chroma sampling filter hint SEI message" 1268 1212 "\t2: Standards-defined - ITU-T Rec. T.800 | ISO/IEC15444-1, 5/3 filter") 1269 ("SEIChroma SamplingVerticalFilterType", m_chromaSamplingVerFilterIdc, 2, "Defines the Index of the chroma sampling vertical filter\n"1213 ("SEIChromaResamplingVerticalFilterType", m_chromaResamplingVerFilterIdc, 2, "Defines the Index of the chroma sampling vertical filter\n" 1270 1214 "\t0: unspecified - Chroma filter is unknown or is determined by the application" 1271 1215 "\t1: User-defined - Filter coefficients are specified in the chroma sampling filter hint SEI message" 1272 1216 "\t2: Standards-defined - ITU-T Rec. T.800 | ISO/IEC15444-1, 5/3 filter") 1273 ("SEIFramePacking", m_framePackingSEIEnabled, 0, "Control generation of frame packing SEI messages")1217 ("SEIFramePacking", m_framePackingSEIEnabled, false, "Control generation of frame packing SEI messages") 1274 1218 ("SEIFramePackingType", m_framePackingSEIType, 0, "Define frame packing arrangement\n" 1275 1219 "\t3: side by side - frames are displayed horizontally\n" … … 1282 1226 "\t1: stereo pair, frame0 represents left view\n" 1283 1227 "\t2: stereo pair, frame0 represents right view") 1284 ("SEISegmentedRectFramePacking", m_segmentedRectFramePackingSEIEnabled, 0, "Controls generation of segmented rectangular frame packing SEI messages")1228 ("SEISegmentedRectFramePacking", m_segmentedRectFramePackingSEIEnabled, false, "Controls generation of segmented rectangular frame packing SEI messages") 1285 1229 ("SEISegmentedRectFramePackingCancel", m_segmentedRectFramePackingSEICancel, false, "If equal to 1, cancels the persistence of any previous SRFPA SEI message") 1286 1230 ("SEISegmentedRectFramePackingType", m_segmentedRectFramePackingSEIType, 0, "Specifies the arrangement of the frames in the reconstructed picture") … … 1289 1233 "\tN: 0 < N < (2^16 - 1) enable display orientation SEI message with anticlockwise_rotation = N and display_orientation_repetition_period = 1\n" 1290 1234 "\t0: disable") 1291 ("SEITemporalLevel0Index", m_temporalLevel0IndexSEIEnabled, 0, "Control generation of temporal level 0 index SEI messages")1292 ("SEIGradualDecodingRefreshInfo", m_gradualDecodingRefreshInfoEnabled, 0, "Control generation of gradual decoding refresh information SEI message")1235 ("SEITemporalLevel0Index", m_temporalLevel0IndexSEIEnabled, false, "Control generation of temporal level 0 index SEI messages") 1236 ("SEIGradualDecodingRefreshInfo", m_gradualDecodingRefreshInfoEnabled, false, "Control generation of gradual decoding refresh information SEI message") 1293 1237 ("SEINoDisplay", m_noDisplaySEITLayer, 0, "Control generation of no display SEI message\n" 1294 1238 "\tN: 0 < N enable no display SEI message for temporal layer N or higher\n" 1295 1239 "\t0: disable") 1296 ("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, 0, "Control generation of decoding unit information SEI message.")1297 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages")1298 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages")1240 ("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, false, "Control generation of decoding unit information SEI message.") 1241 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, false, "Control generation of SOP description SEI messages") 1242 ("SEIScalableNesting", m_scalableNestingSEIEnabled, false, "Control generation of scalable nesting SEI messages") 1299 1243 ("SEITempMotionConstrainedTileSets", m_tmctsSEIEnabled, false, "Control generation of temporal motion constrained tile sets SEI message") 1300 1244 ("SEITimeCodeEnabled", m_timeCodeSEIEnabled, false, "Control generation of time code information SEI message") … … 1332 1276 ("SEIMasteringDisplayWhitePoint", cfg_DisplayWhitePointCode, cfg_DisplayWhitePointCode, "Mastering display white point CIE xy coordinates in normalised increments of 1/50000 (e.g. 0.333 = 16667)") 1333 1277 #if NH_MV 1334 #if !NH_MV_SEI 1335 ("SubBitstreamPropSEIEnabled", m_subBistreamPropSEIEnabled, false ,"Enable signaling of sub-bitstream property SEI message") 1336 ("SEISubBitstreamNumAdditionalSubStreams", m_sbPropNumAdditionalSubStreams,0 ,"Number of substreams for which additional information is signalled") 1337 ("SEISubBitstreamSubBitstreamMode", m_sbPropSubBitstreamMode, IntAry1d (1,0) ,"Specifies mode of generation of the i-th sub-bitstream (0 or 1)") 1338 ("SEISubBitstreamOutputLayerSetIdxToVps", m_sbPropOutputLayerSetIdxToVps, IntAry1d (1,0) ,"Specifies output layer set index of the i-th sub-bitstream ") 1339 ("SEISubBitstreamHighestSublayerId", m_sbPropHighestSublayerId, IntAry1d (1,0) ,"Specifies highest TemporalId of the i-th sub-bitstream") 1340 ("SEISubBitstreamAvgBitRate", m_sbPropAvgBitRate, IntAry1d (1,0) ,"Specifies average bit rate of the i-th sub-bitstream") 1341 ("SEISubBitstreamMaxBitRate", m_sbPropMaxBitRate, IntAry1d (1,0) ,"Specifies maximum bit rate of the i-th sub-bitstream") 1342 #else 1343 ("SeiCfgFileName_%d", m_seiCfgFileNames, (Char *) 0 , MAX_NUM_SEIS , "SEI cfg file name %d") 1344 #endif 1278 ("SeiCfgFileName_%d", m_seiCfgFileNames, (TChar *) 0 ,MAX_NUM_SEIS , "SEI cfg file name %d") 1345 1279 ("OutputVpsInfo", m_outputVpsInfo, false ,"Output information about the layer dependencies and layer sets") 1280 1281 /* Camera parameters */ 1282 ("BaseViewCameraNumbers", m_pchBaseViewCameraNumbers, (TChar *) 0 , "Numbers of base views") 1346 1283 #endif 1347 1284 #if NH_3D 1348 /* Camera parameters */1349 1285 ("Depth420OutputFlag", m_depth420OutputFlag, true , "Output depth layers in 4:2:0 ") 1350 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") 1351 ("BaseViewCameraNumbers", m_pchBaseViewCameraNumbers, (Char *) 0, "Numbers of base views") 1286 #endif 1287 #if NH_3D_VSO 1288 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (TChar *) 0 , "Camera Parameter File Name") 1352 1289 ("CodedCamParsPrecision", m_iCodedCamParPrecision, STD_CAM_PARAMETERS_PRECISION, "precision for coding of camera parameters (in units of 2^(-x) luma samples)" ) 1353 1290 1354 #if NH_3D_VSO1355 1291 /* View Synthesis Optimization */ 1356 ("VSOConfig", m_pchVSOConfig , ( Char *) 0,"VSO configuration")1292 ("VSOConfig", m_pchVSOConfig , (TChar *) 0 ,"VSO configuration") 1357 1293 ("VSO", m_bUseVSO , false ,"Use VSO" ) 1358 1294 ("VSOMode", m_uiVSOMode , (UInt) 4 ,"VSO Mode") … … 1371 1307 #endif //HHI_VSO 1372 1308 /* 3D- HEVC Tools */ 1309 #if NH_3D_QTL 1373 1310 ("QTL" , m_bUseQTL , true , "Use depth quad tree limitation (encoder only)" ) 1311 #endif 1312 #if NH_3D 1313 1374 1314 ("IvMvPredFlag" , m_ivMvPredFlag , BoolAry1d(2,true) , "Inter-view motion prediction" ) 1375 1315 ("IvMvScalingFlag" , m_ivMvScalingFlag , BoolAry1d(2,true) , "Inter-view motion vector scaling" ) … … 1447 1387 po::setDefaults(opts); 1448 1388 po::ErrorReporter err; 1449 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (constChar**) argv, err);1450 1451 for (list<const Char*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++)1389 const list<const TChar*>& argv_unhandled = po::scanArgv(opts, argc, (const TChar**) argv, err); 1390 1391 for (list<const TChar*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++) 1452 1392 { 1453 1393 fprintf(stderr, "Unhandled argument ignored: `%s'\n", *it); … … 1473 1413 * Set any derived parameters 1474 1414 */ 1475 /* convert std::string to c string for compatability */ 1476 #if !NH_MV 1477 m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str()); 1478 #endif 1479 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 1480 #if !NH_MV 1481 m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str()); 1482 #endif 1483 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 1484 1415 m_adIntraLambdaModifier = cfg_adIntraLambdaModifier.values; 1485 1416 if(m_isField) 1486 1417 { … … 1545 1476 } 1546 1477 1547 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str());1548 1549 1478 /* rules for input, output and internal bitdepths as per help text */ 1550 1479 if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] == 0) … … 1579 1508 m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat); 1580 1509 m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat))); 1510 1511 1512 assert(tmpWeightedPredictionMethod>=0 && tmpWeightedPredictionMethod<=WP_PER_PICTURE_WITH_HISTOGRAM_AND_PER_COMPONENT_AND_CLIPPING_AND_EXTENSION); 1513 if (!(tmpWeightedPredictionMethod>=0 && tmpWeightedPredictionMethod<=WP_PER_PICTURE_WITH_HISTOGRAM_AND_PER_COMPONENT_AND_CLIPPING_AND_EXTENSION)) 1514 { 1515 exit(EXIT_FAILURE); 1516 } 1517 m_weightedPredictionMethod = WeightedPredictionMethod(tmpWeightedPredictionMethod); 1518 1519 assert(tmpFastInterSearchMode>=0 && tmpFastInterSearchMode<=FASTINTERSEARCH_MODE3); 1520 if (tmpFastInterSearchMode<0 || tmpFastInterSearchMode>FASTINTERSEARCH_MODE3) 1521 { 1522 exit(EXIT_FAILURE); 1523 } 1524 m_fastInterSearchMode = FastInterSearchMode(tmpFastInterSearchMode); 1525 1526 assert(tmpMotionEstimationSearchMethod>=0 && tmpMotionEstimationSearchMethod<MESEARCH_NUMBER_OF_METHODS); 1527 if (tmpMotionEstimationSearchMethod<0 || tmpMotionEstimationSearchMethod>=MESEARCH_NUMBER_OF_METHODS) 1528 { 1529 exit(EXIT_FAILURE); 1530 } 1531 m_motionEstimationSearchMethod=MESearchMethod(tmpMotionEstimationSearchMethod); 1581 1532 1582 1533 #if NH_MV … … 1802 1753 } 1803 1754 1755 if (tmpSliceMode<0 || tmpSliceMode>=Int(NUMBER_OF_SLICE_CONSTRAINT_MODES)) 1756 { 1757 fprintf(stderr, "Error: bad slice mode\n"); 1758 exit(EXIT_FAILURE); 1759 } 1760 m_sliceMode = SliceConstraint(tmpSliceMode); 1761 if (tmpSliceSegmentMode<0 || tmpSliceSegmentMode>=Int(NUMBER_OF_SLICE_CONSTRAINT_MODES)) 1762 { 1763 fprintf(stderr, "Error: bad slice segment mode\n"); 1764 exit(EXIT_FAILURE); 1765 } 1766 m_sliceSegmentMode = SliceConstraint(tmpSliceSegmentMode); 1767 1768 if (tmpDecodedPictureHashSEIMappedType<0 || tmpDecodedPictureHashSEIMappedType>=Int(NUMBER_OF_HASHTYPES)) 1769 { 1770 fprintf(stderr, "Error: bad checksum mode\n"); 1771 exit(EXIT_FAILURE); 1772 } 1773 // Need to map values to match those of the SEI message: 1774 if (tmpDecodedPictureHashSEIMappedType==0) 1775 { 1776 m_decodedPictureHashSEIType=HASHTYPE_NONE; 1777 } 1778 else 1779 { 1780 m_decodedPictureHashSEIType=HashType(tmpDecodedPictureHashSEIMappedType-1); 1781 } 1782 1804 1783 // allocate slice-based dQP values 1805 1784 #if NH_MV … … 1828 1807 xResizeVector( m_auxId ); 1829 1808 1830 #if NH_3D 1809 #if NH_3D_VSO 1831 1810 xResizeVector( m_depthFlag ); 1832 1811 #endif … … 1923 1902 1924 1903 // reading external dQP description from file 1925 if ( m_pchdQPFile)1926 { 1927 FILE* fpt=fopen( m_ pchdQPFile, "r" );1904 if ( !m_dQPFileName.empty() ) 1905 { 1906 FILE* fpt=fopen( m_dQPFileName.c_str(), "r" ); 1928 1907 if ( fpt ) 1929 1908 { … … 1953 1932 } 1954 1933 1955 #if NH_MV _SEI1934 #if NH_MV 1956 1935 xParseSeiCfg(); 1957 1936 #endif … … 2037 2016 } 2038 2017 2039 #if NH_3D 2018 2040 2019 #if NH_3D_VSO 2041 2020 // Table base optimization … … 2054 2033 for (Int layer = 0; layer < m_numberOfLayers; layer++ ) 2055 2034 { 2056 if ( m_depthFlag[ layer ] )2035 if ( m_depthFlag[ layer ] || m_auxId[ layer ] == 2 ) 2057 2036 { 2058 2037 firstDepthLayer = layer; … … 2091 2070 LOG2_DISP_PREC_LUT ); 2092 2071 } 2072 #if NH_3D 2093 2073 else 2094 2074 { … … 2104 2084 LOG2_DISP_PREC_LUT ); 2105 2085 } 2106 #else2107 m_cCameraData .init ( ((UInt) m_iNumberOfViews ),2108 m_internalBitDepth[ CHANNEL_TYPE_LUMA],2109 (UInt) m_iCodedCamParPrecision,2110 m_FrameSkip,2111 (UInt) m_framesToBeEncoded,2112 m_pchCameraParameterFile,2113 m_pchBaseViewCameraNumbers,2114 NULL,2115 NULL,2116 LOG2_DISP_PREC_LUT );2117 #endif2118 2086 m_cCameraData.check( false, true ); 2087 #endif 2119 2088 #endif 2120 2089 … … 2145 2114 Void TAppEncCfg::xCheckParameter() 2146 2115 { 2147 if ( !m_decodedPictureHashSEIEnabled)2116 if (m_decodedPictureHashSEIType==HASHTYPE_NONE) 2148 2117 { 2149 2118 fprintf(stderr, "******************************************************************\n"); … … 2173 2142 #define xConfirmPara(a,b) check_failed |= confirmPara(a,b) 2174 2143 2175 xConfirmPara(m_ pchBitstreamFile==NULL, "A bitstream file name must be specified (BitstreamFile)");2144 xConfirmPara(m_bitstreamFileName.empty(), "A bitstream file name must be specified (BitstreamFile)"); 2176 2145 const UInt maxBitDepth=(m_chromaFormatIDC==CHROMA_400) ? m_internalBitDepth[CHANNEL_TYPE_LUMA] : std::max(m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 2177 2146 xConfirmPara(m_bitDepthConstraint<maxBitDepth, "The internalBitDepth must not be greater than the bitDepthConstraint value"); … … 2301 2270 #endif 2302 2271 2303 #if NH_3D 2272 #if NH_3D_VSO 2304 2273 if ( m_scalabilityMask & ( 1 << DEPTH_ID ) ) 2305 2274 { … … 2397 2366 if (lsIdx == 0) 2398 2367 { 2399 xConfirmPara( m_layerId sInSets[lsIdx].size() != 1 || m_layerIdsInSets[lsIdx][0] != 0 , "0-th layer shall only include layer 0. ");2400 } 2401 for ( Int i = 0; i < m_layerId sInSets[lsIdx].size(); i++ )2402 { 2403 xConfirmPara( m_layerId sInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx][i] >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than 0 and less than MAX_NUM_LAYER_IDS" );2368 xConfirmPara( m_layerIdxInVpsInSets[lsIdx].size() != 1 || m_layerIdxInVpsInSets[lsIdx][0] != 0 , "0-th layer shall only include layer 0. "); 2369 } 2370 for ( Int i = 0; i < m_layerIdxInVpsInSets[lsIdx].size(); i++ ) 2371 { 2372 xConfirmPara( m_layerIdxInVpsInSets[lsIdx][i] < 0 || m_layerIdxInVpsInSets[lsIdx][i] >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than 0 and less than MAX_NUM_LAYER_IDS" ); 2404 2373 } 2405 2374 } … … 2434 2403 { 2435 2404 Bool inLayerSetFlag = false; 2436 for (Int j = 0; j < m_layerId sInSets[ lsIdx].size(); j++ )2405 for (Int j = 0; j < m_layerIdxInVpsInSets[ lsIdx].size(); j++ ) 2437 2406 { 2438 if ( m_layerId sInSets[ lsIdx ][ j ] == m_layerIdsInDefOutputLayerSet[ lsIdx ][ i ] )2407 if ( m_layerIdxInVpsInSets[ lsIdx ][ j ] == m_layerIdsInDefOutputLayerSet[ lsIdx ][ i ] ) 2439 2408 { 2440 2409 inLayerSetFlag = true; … … 2544 2513 xConfirmPara( m_loopFilterBetaOffsetDiv2 < -6 || m_loopFilterBetaOffsetDiv2 > 6, "Loop Filter Beta Offset div. 2 exceeds supported range (-6 to 6)"); 2545 2514 xConfirmPara( m_loopFilterTcOffsetDiv2 < -6 || m_loopFilterTcOffsetDiv2 > 6, "Loop Filter Tc Offset div. 2 exceeds supported range (-6 to 6)"); 2546 xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2, "Fast Search Mode is not supported value (0:Full search 1:Diamond 2:PMVFAST)" );2547 2515 xConfirmPara( m_iSearchRange < 0 , "Search Range must be more than 0" ); 2548 xConfirmPara( m_bipredSearchRange < 0 , "Search Range must be more than 0" ); 2516 xConfirmPara( m_bipredSearchRange < 0 , "Bi-prediction refinement search range must be more than 0" ); 2517 xConfirmPara( m_minSearchWindow < 0, "Minimum motion search window size for the adaptive window ME must be greater than or equal to 0" ); 2549 2518 #if NH_MV 2550 2519 xConfirmPara( m_iVerticalDisparitySearchRange <= 0 , "Vertical Disparity Search Range must be more than 0" ); … … 2624 2593 } 2625 2594 2626 xConfirmPara( m_sliceMode < 0 || m_sliceMode > 3, "SliceMode exceeds supported range (0 to 3)" ); 2627 if (m_sliceMode!=0) 2595 if (m_sliceMode!=NO_SLICES) 2628 2596 { 2629 2597 xConfirmPara( m_sliceArgument < 1 , "SliceArgument should be larger than or equal to 1" ); 2630 2598 } 2631 xConfirmPara( m_sliceSegmentMode < 0 || m_sliceSegmentMode > 3, "SliceSegmentMode exceeds supported range (0 to 3)" ); 2632 if (m_sliceSegmentMode!=0) 2599 if (m_sliceSegmentMode!=NO_SLICES) 2633 2600 { 2634 2601 xConfirmPara( m_sliceSegmentArgument < 1 , "SliceSegmentArgument should be larger than or equal to 1" ); … … 2638 2605 if (m_profile!=Profile::HIGHTHROUGHPUTREXT) 2639 2606 { 2640 xConfirmPara( tileFlag && m_ iWaveFrontSynchro, "Tile and Wavefrontcan not be applied together, except in the High Throughput Intra 4:4:4 16 profile");2607 xConfirmPara( tileFlag && m_entropyCodingSyncEnabledFlag, "Tiles and entropy-coding-sync (Wavefronts) can not be applied together, except in the High Throughput Intra 4:4:4 16 profile"); 2641 2608 } 2642 2609 … … 2662 2629 } 2663 2630 2664 #if NH_3D 2631 #if NH_3D_VSO 2665 2632 xConfirmPara( m_pchCameraParameterFile == 0 , "CameraParameterFile must be given"); 2666 2633 xConfirmPara( m_pchBaseViewCameraNumbers == 0 , "BaseViewCameraNumbers must be given" ); 2667 2634 xConfirmPara( m_iNumberOfViews != m_cCameraData.getBaseViewNumbers().size() , "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); 2668 2635 xConfirmPara ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5, "CodedCamParsPrecision must be in range of 0..5" ); 2669 #if NH_3D_VSO2670 2636 if( m_bUseVSO ) 2671 2637 { … … 2673 2639 xConfirmPara( m_uiVSOMode > 4 , "VSO Mode must be less than 5"); 2674 2640 } 2675 #endif2676 2641 #endif 2677 2642 // max CU width and height should be power of 2 … … 3237 3202 m_minSpatialSegmentationIdc = 4*PicSizeInSamplesY/maxSizeInSamplesY-4; 3238 3203 } 3239 else if(m_ iWaveFrontSynchro)3204 else if(m_entropyCodingSyncEnabledFlag) 3240 3205 { 3241 3206 m_minSpatialSegmentationIdc = 4*PicSizeInSamplesY/((2*m_iSourceHeight+m_iSourceWidth)*m_uiMaxCUHeight)-4; … … 3250 3215 } 3251 3216 } 3252 3253 xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" );3254 3255 xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n");3256 3217 3257 3218 if (m_toneMappingInfoSEIEnabled) … … 3282 3243 } 3283 3244 3245 if (m_chromaResamplingFilterSEIenabled) 3246 { 3247 xConfirmPara( (m_chromaFormatIDC == CHROMA_400 ), "chromaResamplingFilterSEI is not allowed to be present when ChromaFormatIDC is equal to zero (4:0:0)" ); 3248 xConfirmPara(m_vuiParametersPresentFlag && m_chromaLocInfoPresentFlag && (m_chromaSampleLocTypeTopField != m_chromaSampleLocTypeBottomField ), "When chromaResamplingFilterSEI is enabled, ChromaSampleLocTypeTopField has to be equal to ChromaSampleLocTypeBottomField" ); 3249 } 3250 3284 3251 if ( m_RCEnableRateControl ) 3285 3252 { … … 3293 3260 } 3294 3261 xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" ); 3295 } 3262 #if U0132_TARGET_BITS_SATURATION 3263 #if NH_MV 3264 if ((m_RCCpbSaturationEnabled) && (m_level[0]!=Level::NONE) && (m_profile!=Profile::NONE)) 3265 { 3266 UInt uiLevelIdx = (m_level[0] / 10) + (UInt)((m_level[0] % 10) / 3); // (m_level / 30)*3 + ((m_level % 10) / 3); 3267 xConfirmPara(m_RCCpbSize > g_uiMaxCpbSize[m_levelTier[0]][uiLevelIdx], "RCCpbSize should be smaller than or equal to Max CPB size according to tier and level"); 3268 xConfirmPara(m_RCInitialCpbFullness > 1, "RCInitialCpbFullness should be smaller than or equal to 1"); 3269 } 3270 #else 3271 if ((m_RCCpbSaturationEnabled) && (m_level!=Level::NONE) && (m_profile!=Profile::NONE)) 3272 { 3273 UInt uiLevelIdx = (m_level / 10) + (UInt)((m_level % 10) / 3); // (m_level / 30)*3 + ((m_level % 10) / 3); 3274 xConfirmPara(m_RCCpbSize > g_uiMaxCpbSize[m_levelTier][uiLevelIdx], "RCCpbSize should be smaller than or equal to Max CPB size according to tier and level"); 3275 xConfirmPara(m_RCInitialCpbFullness > 1, "RCInitialCpbFullness should be smaller than or equal to 1"); 3276 } 3277 #endif 3278 #endif 3279 } 3280 #if U0132_TARGET_BITS_SATURATION 3281 else 3282 { 3283 xConfirmPara( m_RCCpbSaturationEnabled != 0, "Target bits saturation cannot be processed without Rate control" ); 3284 } 3285 #endif 3286 3296 3287 #if NH_MV 3297 3288 // VPS VUI … … 3328 3319 } 3329 3320 } 3330 #if !NH_MV_SEI3331 // Check input parameters for Sub-bitstream property SEI message3332 if( m_subBistreamPropSEIEnabled )3333 {3334 xConfirmPara(3335 (this->m_sbPropNumAdditionalSubStreams != m_sbPropAvgBitRate.size() )3336 || (this->m_sbPropNumAdditionalSubStreams != m_sbPropHighestSublayerId.size() )3337 || (this->m_sbPropNumAdditionalSubStreams != m_sbPropMaxBitRate.size() )3338 || (this->m_sbPropNumAdditionalSubStreams != m_sbPropOutputLayerSetIdxToVps.size() )3339 || (this->m_sbPropNumAdditionalSubStreams != m_sbPropSubBitstreamMode.size()), "Some parameters of some sub-bitstream not defined");3340 3341 for( Int i = 0; i < m_sbPropNumAdditionalSubStreams; i++ )3342 {3343 xConfirmPara( m_sbPropSubBitstreamMode[i] < 0 || m_sbPropSubBitstreamMode[i] > 1, "Mode value should be 0 or 1" );3344 xConfirmPara( m_sbPropHighestSublayerId[i] < 0 || m_sbPropHighestSublayerId[i] > MAX_TLAYER-1, "Maximum sub-layer ID out of range" );3345 xConfirmPara( m_sbPropOutputLayerSetIdxToVps[i] < 0 || m_sbPropOutputLayerSetIdxToVps[i] >= MAX_VPS_OUTPUTLAYER_SETS, "OutputLayerSetIdxToVps should be within allowed range" );3346 }3347 }3348 #endif3349 3321 #endif 3350 3322 3351 3323 if (m_segmentedRectFramePackingSEIEnabled) 3352 3324 { 3353 xConfirmPara(m_framePackingSEIEnabled > 0, "SEISegmentedRectFramePacking must be 0 when SEIFramePacking is 1");3325 xConfirmPara(m_framePackingSEIEnabled , "SEISegmentedRectFramePacking must be 0 when SEIFramePacking is 1"); 3354 3326 } 3355 3327 … … 3372 3344 } 3373 3345 3374 const Char *profileToString(const Profile::Name profile)3346 const TChar *profileToString(const Profile::Name profile) 3375 3347 { 3376 3348 static const UInt numberOfProfiles = sizeof(strToProfile)/sizeof(*strToProfile); … … 3400 3372 } 3401 3373 #else 3402 printf("Input File : %s\n", m_pchInputFile);3403 #endif 3404 printf("Bitstream File : %s\n", m_pchBitstreamFile);3374 printf("Input File : %s\n", m_inputFileName.c_str() ); 3375 #endif 3376 printf("Bitstream File : %s\n", m_bitstreamFileName.c_str() ); 3405 3377 #if NH_MV 3406 3378 for( Int layer = 0; layer < m_numberOfLayers; layer++) … … 3409 3381 } 3410 3382 #else 3411 printf("Reconstruction File : %s\n", m_pchReconFile);3383 printf("Reconstruction File : %s\n", m_reconFileName.c_str() ); 3412 3384 #endif 3413 3385 #if NH_MV … … 3421 3393 xPrintParaVector( "AuxId", m_auxId ); 3422 3394 #endif 3423 #if NH_3D 3395 #if NH_3D_VSO 3424 3396 xPrintParaVector( "DepthLayerFlag", m_depthFlag ); 3425 3397 printf("Coded Camera Param. Precision : %d\n", m_iCodedCamParPrecision); … … 3581 3553 3582 3554 printf("RateControl : %d\n", m_RCEnableRateControl ); 3555 printf("WPMethod : %d\n", Int(m_weightedPredictionMethod)); 3583 3556 3584 3557 if(m_RCEnableRateControl) … … 3591 3564 printf("ForceIntraQP : %d\n", m_RCForceIntraQP ); 3592 3565 3566 #if U0132_TARGET_BITS_SATURATION 3567 printf("CpbSaturation : %d\n", m_RCCpbSaturationEnabled ); 3568 if (m_RCCpbSaturationEnabled) 3569 { 3570 printf("CpbSize : %d\n", m_RCCpbSize); 3571 printf("InitalCpbFullness : %.2f\n", m_RCInitialCpbFullness); 3572 } 3573 #endif 3574 3593 3575 #if KWU_RC_MADPRED_E0227 3594 3576 printf("Depth based MAD prediction : %d\n", m_depthMADPred); … … 3613 3595 3614 3596 printf("Max Num Merge Candidates : %d\n", m_maxNumMergeCand); 3615 #if NH_3D 3597 #if NH_3D_VSO 3616 3598 printf("BaseViewCameraNumbers : %s\n", m_pchBaseViewCameraNumbers ); 3617 3599 printf("Coded Camera Param. Precision : %d\n", m_iCodedCamParPrecision); 3618 #if NH_3D_VSO3619 3600 printf("Force use of Lambda Scale : %d\n", m_bForceLambdaScaleVSO ); 3620 3601 … … 3634 3615 } 3635 3616 #endif //HHI_VSO 3636 #endif //NH_3D3637 3617 printf("\n"); 3638 3618 #if NH_MV … … 3648 3628 printf("SQP:%d ", m_uiDeltaQpRD ); 3649 3629 printf("ASR:%d ", m_bUseASR ); 3650 printf("FEN:%d ", m_bUseFastEnc ); 3630 printf("MinSearchWindow:%d ", m_minSearchWindow ); 3631 printf("RestrictMESampling:%d ", m_bRestrictMESampling ); 3632 printf("FEN:%d ", Int(m_fastInterSearchMode) ); 3651 3633 printf("ECU:%d ", m_bUseEarlyCU ); 3652 3634 printf("FDM:%d ", m_useFastDecisionForMerge ); … … 3657 3639 printf("TransformSkipFast:%d ", m_useTransformSkipFast ); 3658 3640 printf("TransformSkipLog2MaxSize:%d ", m_log2MaxTransformSkipBlockSize); 3659 printf("Slice: M=%d ", m_sliceMode);3641 printf("Slice: M=%d ", Int(m_sliceMode)); 3660 3642 if (m_sliceMode!=NO_SLICES) 3661 3643 { … … 3685 3667 printf("WPB:%d ", (Int)m_useWeightedBiPred); 3686 3668 printf("PME:%d ", m_log2ParallelMergeLevel); 3687 const Int iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; 3688 printf(" WaveFrontSynchro:%d WaveFrontSubstreams:%d", 3689 m_iWaveFrontSynchro, iWaveFrontSubstreams); 3669 const Int iWaveFrontSubstreams = m_entropyCodingSyncEnabledFlag ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; 3670 printf(" WaveFrontSynchro:%d WaveFrontSubstreams:%d", m_entropyCodingSyncEnabledFlag?1:0, iWaveFrontSubstreams); 3690 3671 printf(" ScalingList:%d ", m_useScalingListId ); 3691 3672 printf("TMVPMode:%d ", m_TMVPModeId ); … … 3700 3681 printf("WVSO:%d ", m_bUseWVSO ); 3701 3682 #endif 3683 #if NH_3D_QTL 3684 printf( "QTL:%d " , m_bUseQTL); 3685 #endif 3702 3686 #if NH_3D 3703 printf( "QTL:%d " , m_bUseQTL);3704 3687 printf( "IlluCompEnable:%d " , m_abUseIC); 3705 3688 printf( "IlluCompLowLatencyEnc:%d ", m_bUseLowLatencyICEnc); … … 3730 3713 } 3731 3714 3732 Bool confirmPara(Bool bflag, const Char* message)3715 Bool confirmPara(Bool bflag, const TChar* message) 3733 3716 { 3734 3717 if (!bflag) -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r1356 r1386 62 62 // file I/O 63 63 #if NH_MV 64 std::vector< char*> m_pchInputFileList; ///< source file names65 #else 66 Char* m_pchInputFile;///< source file name67 #endif 68 Char* m_pchBitstreamFile;///< output bitstream file64 std::vector<TChar*> m_pchInputFileList; ///< source file names 65 #else 66 std::string m_inputFileName; ///< source file name 67 #endif 68 std::string m_bitstreamFileName; ///< output bitstream file 69 69 #if NH_MV 70 70 std::vector<char*> m_pchReconFileList; ///< output reconstruction file names … … 72 72 Int m_iNumberOfViews; ///< number of Layers that are views 73 73 #else 74 Char* m_pchReconFile;///< output reconstruction file74 std::string m_reconFileName; ///< output reconstruction file 75 75 #endif 76 76 #if NH_MV … … 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 … … 91 91 // layer sets 92 92 Int m_vpsNumLayerSets; ///< Number of layer sets 93 IntAry2d m_layerId sInSets; ///< LayerIds in vps of layer set93 IntAry2d m_layerIdxInVpsInSets; ///< LayerIds in vps of layer set 94 94 Int m_numAddLayerSets; ///< Number of additional layer sets 95 95 IntAry2d m_highestLayerIdxPlus1; ///< HighestLayerIdxPlus1 for each additional layer set and each independent layer (value with index 0 will be ignored) … … 112 112 Bool m_bitRatePresentVpsFlag; 113 113 Bool m_picRatePresentVpsFlag; 114 BoolAry2d m_bitRatePresentFlag; 115 BoolAry2d m_picRatePresentFlag; 116 IntAry2d m_avgBitRate; 117 IntAry2d m_maxBitRate; 118 IntAry2d m_constantPicRateIdc; 119 IntAry2d m_avgPicRate; 120 Bool m_tilesNotInUseFlag; 121 BoolAry1d m_tilesInUseFlag; 122 BoolAry1d m_loopFilterNotAcrossTilesFlag; 123 Bool m_wppNotInUseFlag; 124 BoolAry1d m_wppInUseFlag; 125 126 BoolAry2d m_tileBoundariesAlignedFlag; 127 Bool m_ilpRestrictedRefLayersFlag; 128 IntAry2d m_minSpatialSegmentOffsetPlus1; 129 BoolAry2d m_ctuBasedOffsetEnabledFlag; 130 IntAry2d m_minHorizontalCtuOffsetPlus1; 131 Bool m_singleLayerForNonIrapFlag; 132 Bool m_higherLayerIrapSkipFlag; 133 134 114 BoolAry2d m_bitRatePresentFlag; 115 BoolAry2d m_picRatePresentFlag; 116 IntAry2d m_avgBitRate; 117 IntAry2d m_maxBitRate; 118 IntAry2d m_constantPicRateIdc; 119 IntAry2d m_avgPicRate; 120 Bool m_tilesNotInUseFlag; 121 BoolAry1d m_tilesInUseFlag; 122 BoolAry1d m_loopFilterNotAcrossTilesFlag; 123 Bool m_wppNotInUseFlag; 124 BoolAry1d m_wppInUseFlag; 125 126 BoolAry2d m_tileBoundariesAlignedFlag; 127 Bool m_ilpRestrictedRefLayersFlag; 128 IntAry2d m_minSpatialSegmentOffsetPlus1; 129 BoolAry2d m_ctuBasedOffsetEnabledFlag; 130 IntAry2d m_minHorizontalCtuOffsetPlus1; 131 Bool m_singleLayerForNonIrapFlag; 132 Bool m_higherLayerIrapSkipFlag; 135 133 #if NH_3D 136 134 Bool m_abUseIC; 137 135 Bool m_bUseLowLatencyICEnc; 138 136 #endif 139 140 #endif 137 #endif 138 // Lambda modifiers 141 139 Double m_adLambdaModifier[ MAX_TLAYER ]; ///< Lambda modifier array for each temporal layer 140 std::vector<Double> m_adIntraLambdaModifier; ///< Lambda modifier for Intra pictures, one for each temporal layer. If size>temporalLayer, then use [temporalLayer], else if size>0, use [size()-1], else use m_adLambdaModifier. 141 Double m_dIntraQpFactor; ///< Intra Q Factor. If negative, use a default equation: 0.57*(1.0 - Clip3( 0.0, 0.5, 0.05*(Double)(isField ? (GopSize-1)/2 : GopSize-1) )) 142 142 143 // source specification 143 144 Int m_iFrameRate; ///< source frame-rates (Hz) … … 160 161 Int m_framesToBeEncoded; ///< number of encoded frames 161 162 Int m_aiPad[2]; ///< number of padded pixels for width and height 163 Bool m_AccessUnitDelimiter; ///< add Access Unit Delimiter NAL units 162 164 InputColourSpaceConversion m_inputColourSpaceConvert; ///< colour space conversion to apply to input video 163 165 Bool m_snrInternalColourSpace; ///< if true, then no colour space conversion is applied for snr calculation, otherwise inverse of input is applied. … … 237 239 Int m_iQP; ///< QP value of key-picture (integer) 238 240 #endif 239 Char* m_pchdQPFile;///< QP offset for each slice (initialized from external file)241 std::string m_dQPFileName; ///< QP offset for each slice (initialized from external file) 240 242 #if NH_MV 241 243 std::vector<Int*> m_aidQP; ///< array of slice QP values for each layer … … 256 258 #endif 257 259 TComSEIMasteringDisplay m_masteringDisplay; 258 #if NH_MV _SEI260 #if NH_MV 259 261 std::vector<char*> m_seiCfgFileNames; ///< SEI message files. 260 262 SEIMessages m_seiMessages; ///< Buffer for SEI messages. … … 338 340 Int m_rdPenalty; ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty) 339 341 Bool m_bDisableIntraPUsInInterSlices; ///< Flag for disabling intra predicted PUs in inter slices. 340 Int m_iFastSearch; ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST 342 MESearchMethod m_motionEstimationSearchMethod; 343 Bool m_bRestrictMESampling; ///< Restrict sampling for the Selective ME 341 344 Int m_iSearchRange; ///< ME search range 342 345 Int m_bipredSearchRange; ///< ME search range for bipred refinement 346 Int m_minSearchWindow; ///< ME minimum search window size for the Adaptive Window ME 343 347 Bool m_bClipForBiPredMeEnabled; ///< Enables clipping for Bi-Pred ME. 344 348 Bool m_bFastMEAssumingSmootherMVEnabled; ///< Enables fast ME assuming a smoother MV. … … 347 351 Int m_iVerticalDisparitySearchRange; ///< ME vertical search range for inter-view prediction 348 352 #endif 349 Bool m_bUseFastEnc; ///< flag for using fast encoder setting353 FastInterSearchMode m_fastInterSearchMode; ///< Parameter that controls fast encoder settings 350 354 Bool m_bUseEarlyCU; ///< flag for using Early CU setting 351 355 Bool m_useFastDecisionForMerge; ///< flag for using Fast Decision Merge RD-Cost 352 356 Bool m_bUseCbfFastMode; ///< flag for using Cbf Fast PU Mode Decision 353 357 Bool m_useEarlySkipDetection; ///< flag for using Early SKIP Detection 354 Int m_sliceMode; ///< 0: no slice limits, 1 : max number of CTBs per slice, 2: max number of bytes per slice, 355 ///< 3: max number of tiles per slice 358 SliceConstraint m_sliceMode; 356 359 Int m_sliceArgument; ///< argument according to selected slice mode 357 Int m_sliceSegmentMode; ///< 0: no slice segment limits, 1 : max number of CTBs per slice segment, 2: max number of bytes per slice segment, 358 ///< 3: max number of tiles per slice segment 360 SliceConstraint m_sliceSegmentMode; 359 361 Int m_sliceSegmentArgument; ///< argument according to selected slice segment mode 360 362 … … 366 368 std::vector<Int> m_tileColumnWidth; 367 369 std::vector<Int> m_tileRowHeight; 368 Int m_iWaveFrontSynchro; //< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current. 369 Int m_iWaveFrontFlush; //< enable(1)/disable(0) the CABAC flush at the end of each line of LCUs. 370 Bool m_entropyCodingSyncEnabledFlag; 370 371 371 372 Bool m_bUseConstrainedIntraPred; ///< flag for using constrained intra prediction … … 374 375 Bool m_bUseBLambdaForNonKeyLowDelayPictures; 375 376 376 Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting ondecoded picture hash SEI message377 Intm_recoveryPointSEIEnabled;378 Intm_bufferingPeriodSEIEnabled;379 Intm_pictureTimingSEIEnabled;377 HashType m_decodedPictureHashSEIType; ///< Checksum mode for decoded picture hash SEI message 378 Bool m_recoveryPointSEIEnabled; 379 Bool m_bufferingPeriodSEIEnabled; 380 Bool m_pictureTimingSEIEnabled; 380 381 Bool m_toneMappingInfoSEIEnabled; 381 Bool m_chroma SamplingFilterSEIenabled;382 Int m_chroma SamplingHorFilterIdc;383 Int m_chroma SamplingVerFilterIdc;382 Bool m_chromaResamplingFilterSEIenabled; 383 Int m_chromaResamplingHorFilterIdc; 384 Int m_chromaResamplingVerFilterIdc; 384 385 Int m_toneMapId; 385 386 Bool m_toneMapCancelFlag; … … 408 409 Int* m_codedPivotValue; 409 410 Int* m_targetPivotValue; 410 Intm_framePackingSEIEnabled;411 Bool m_framePackingSEIEnabled; 411 412 Int m_framePackingSEIType; 412 413 Int m_framePackingSEIId; 413 414 Int m_framePackingSEIQuincunx; 414 415 Int m_framePackingSEIInterpretation; 415 Intm_segmentedRectFramePackingSEIEnabled;416 Bool m_segmentedRectFramePackingSEIEnabled; 416 417 Bool m_segmentedRectFramePackingSEICancel; 417 418 Int m_segmentedRectFramePackingSEIType; 418 419 Bool m_segmentedRectFramePackingSEIPersistence; 419 420 Int m_displayOrientationSEIAngle; 420 Intm_temporalLevel0IndexSEIEnabled;421 Intm_gradualDecodingRefreshInfoEnabled;421 Bool m_temporalLevel0IndexSEIEnabled; 422 Bool m_gradualDecodingRefreshInfoEnabled; 422 423 Int m_noDisplaySEITLayer; 423 Intm_decodingUnitInfoSEIEnabled;424 Intm_SOPDescriptionSEIEnabled;425 Intm_scalableNestingSEIEnabled;424 Bool m_decodingUnitInfoSEIEnabled; 425 Bool m_SOPDescriptionSEIEnabled; 426 Bool m_scalableNestingSEIEnabled; 426 427 Bool m_tmctsSEIEnabled; 427 428 Bool m_timeCodeSEIEnabled; … … 442 443 Bool m_useWeightedPred; ///< Use of weighted prediction in P slices 443 444 Bool m_useWeightedBiPred; ///< Use of bi-directional weighted prediction in B slices 445 WeightedPredictionMethod m_weightedPredictionMethod; 444 446 445 447 UInt m_log2ParallelMergeLevel; ///< Parallel merge estimation region … … 455 457 Int m_RCInitialQP; ///< inital QP for rate control 456 458 Bool m_RCForceIntraQP; ///< force all intra picture to use initial QP or not 457 459 460 #if U0132_TARGET_BITS_SATURATION 461 Bool m_RCCpbSaturationEnabled; ///< enable target bits saturation to avoid CPB overflow and underflow 462 UInt m_RCCpbSize; ///< CPB size 463 Double m_RCInitialCpbFullness; ///< initial CPB fullness 464 #endif 465 458 466 #if KWU_RC_VIEWRC_E0227 459 467 vector<Int> m_viewTargetBits; … … 464 472 #endif 465 473 466 ScalingListMode m_useScalingListId; ///< using quantization matrix467 Char* m_scalingListFile;///< quantization matrix file name474 ScalingListMode m_useScalingListId; ///< using quantization matrix 475 std::string m_scalingListFileName; ///< quantization matrix file name 468 476 469 477 Bool m_TransquantBypassEnableFlag; ///< transquant_bypass_enable_flag setting in PPS. … … 509 517 Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units 510 518 Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units 519 std::string m_colourRemapSEIFileRoot; 520 511 521 std::string m_summaryOutFilename; ///< filename to use for producing summary output file. 512 522 std::string m_summaryPicFilenameBase; ///< Base filename to use for producing summary picture output files. The actual filenames used will have I.txt, P.txt and B.txt appended. 513 523 UInt m_summaryVerboseness; ///< Specifies the level of the verboseness of the text output. 514 524 #if NH_MV 515 #if !NH_MV_SEI516 Bool m_subBistreamPropSEIEnabled;517 Int m_sbPropNumAdditionalSubStreams;518 IntAry1d m_sbPropSubBitstreamMode;519 IntAry1d m_sbPropOutputLayerSetIdxToVps;520 IntAry1d m_sbPropHighestSublayerId;521 IntAry1d m_sbPropAvgBitRate;522 IntAry1d m_sbPropMaxBitRate;523 #endif524 525 Bool m_outputVpsInfo; 525 #endif 526 TChar* m_pchBaseViewCameraNumbers; 527 #endif 528 526 529 #if NH_3D 527 530 // Output Format 528 531 Bool m_depth420OutputFlag; ///< Output depth layers in 4:2:0 format 529 // Camera parameters 530 Char* m_pchCameraParameterFile; ///< camera parameter file 531 Char* m_pchBaseViewCameraNumbers; 532 #endif 533 // Camera parameters 534 #if NH_3D_VSO 535 TChar* m_pchCameraParameterFile; ///< camera parameter file 532 536 TAppComCamPara m_cCameraData; 533 537 Int m_iCodedCamParPrecision; ///< precision for coding of camera parameters 534 #if NH_3D_VSO 535 Char* m_pchVSOConfig; 538 TChar* m_pchVSOConfig; 536 539 Bool m_bUseVSO; ///< flag for using View Synthesis Optimization 537 540 Bool m_bVSOLSTable; ///< Depth QP dependent Lagrange parameter optimization (m23714) … … 556 559 TRenModSetupStrParser m_cRenModStrParser; 557 560 #endif 558 561 #if NH_3D 559 562 Bool m_useDLT; ///< flag for using DLT 563 #endif 564 #if NH_3D_QTL 560 565 Bool m_bUseQTL; ///< flag for using depth QuadTree Limitation 566 #endif 567 #if NH_3D 561 568 BoolAry1d m_ivMvPredFlag; 562 569 BoolAry1d m_ivMvScalingFlag; … … 660 667 Void xPrintVectorElem( Double elem ) { printf(" %5.2f", elem );}; 661 668 Void xPrintVectorElem( Bool elem ) { printf(" %d" , ( elem ? 1 : 0 ));}; 662 #if NH_MV_SEI663 669 Void xParseSeiCfg(); 664 #endif 665 #endif 666 #if NH_MV 670 667 671 Int getGOPSize() { return m_iGOPSize; } 668 672 #endif … … 674 678 Void create (); ///< create option handling class 675 679 Void destroy (); ///< destroy option handling class 676 Bool parseCfg ( Int argc, Char* argv[] );///< parse configuration file to fill member variables680 Bool parseCfg ( Int argc, TChar* argv[] ); ///< parse configuration file to fill member variables 677 681 678 682 };// END CLASS DEFINITION TAppEncCfg -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r1356 r1386 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 … … 186 188 for (Int d = 0; d < 2; d++) 187 189 { 188 m_sps3dExtension.setIv MvPredFlag ( d, m_ivMvPredFlag[d] );189 m_sps3dExtension.setIvMvScal ingFlag ( d, m_ivMvScalingFlag[d] );190 m_sps3dExtension.setIvDiMcEnabledFlag ( d, m_ivMvPredFlag[d] ); 191 m_sps3dExtension.setIvMvScalEnabledFlag ( d, m_ivMvScalingFlag[d] ); 190 192 if (d == 0 ) 191 193 { 192 m_sps3dExtension.setLog2 SubPbSizeMinus3 ( d, m_log2SubPbSizeMinus3 );193 m_sps3dExtension.setIvResPred Flag ( d, m_ivResPredFlag );194 m_sps3dExtension.setDepthRef inementFlag ( d, m_depthRefinementFlag );195 m_sps3dExtension.setV iewSynthesisPredFlag ( d, m_viewSynthesisPredFlag );196 m_sps3dExtension.setD epthBasedBlkPartFlag ( d, m_depthBasedBlkPartFlag );194 m_sps3dExtension.setLog2IvmcSubPbSizeMinus3 ( d, m_log2SubPbSizeMinus3 ); 195 m_sps3dExtension.setIvResPredEnabledFlag ( d, m_ivResPredFlag ); 196 m_sps3dExtension.setDepthRefEnabledFlag ( d, m_depthRefinementFlag ); 197 m_sps3dExtension.setVspMcEnabledFlag ( d, m_viewSynthesisPredFlag ); 198 m_sps3dExtension.setDbbpEnabledFlag ( d, m_depthBasedBlkPartFlag ); 197 199 } 198 200 else 199 201 { 200 m_sps3dExtension.set MpiFlag ( d, m_mpiFlag );201 m_sps3dExtension.setLog2 MpiSubPbSizeMinus3( d, m_log2MpiSubPbSizeMinus3);202 m_sps3dExtension.setIntraContour Flag ( d, m_intraContourFlag );203 m_sps3dExtension.setIntra SdcWedgeFlag ( d, m_intraSdcFlag || m_intraWedgeFlag );204 m_sps3dExtension.set QtPredFlag ( d, m_qtPredFlag );205 m_sps3dExtension.setInter SdcFlag ( d, m_interSdcFlag );206 m_sps3dExtension.set DepthIntraSkipFlag ( d, m_depthIntraSkipFlag );202 m_sps3dExtension.setTexMcEnabledFlag ( d, m_mpiFlag ); 203 m_sps3dExtension.setLog2TexmcSubPbSizeMinus3( d, m_log2MpiSubPbSizeMinus3); 204 m_sps3dExtension.setIntraContourEnabledFlag ( d, m_intraContourFlag ); 205 m_sps3dExtension.setIntraDcOnlyWedgeEnabledFlag ( d, m_intraSdcFlag || m_intraWedgeFlag ); 206 m_sps3dExtension.setCqtCuPartPredEnabledFlag ( d, m_qtPredFlag ); 207 m_sps3dExtension.setInterDcOnlyEnabledFlag ( d, m_interSdcFlag ); 208 m_sps3dExtension.setSkipIntraEnabledFlag ( d, m_depthIntraSkipFlag ); 207 209 } 208 210 } … … 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 … … 378 386 m_cTEncTop.setLambdaModifier ( uiLoop, m_adLambdaModifier[ uiLoop ] ); 379 387 } 388 m_cTEncTop.setIntraLambdaModifier ( m_adIntraLambdaModifier ); 389 m_cTEncTop.setIntraQpFactor ( m_dIntraQpFactor ); 390 380 391 #if NH_MV 381 392 m_cTEncTop.setQP ( m_iQP[layerIdInVps] ); … … 385 396 386 397 m_cTEncTop.setPad ( m_aiPad ); 387 398 m_cTEncTop.setAccessUnitDelimiter ( m_AccessUnitDelimiter ); 388 399 #if NH_MV 389 400 m_cTEncTop.setMaxTempLayer ( m_maxTempLayerMvc[layerIdInVps] ); … … 408 419 //====== Motion search ======== 409 420 m_cTEncTop.setDisableIntraPUsInInterSlices ( m_bDisableIntraPUsInInterSlices ); 410 m_cTEncTop.set FastSearch ( m_iFastSearch);421 m_cTEncTop.setMotionEstimationSearchMethod ( m_motionEstimationSearchMethod ); 411 422 m_cTEncTop.setSearchRange ( m_iSearchRange ); 412 423 m_cTEncTop.setBipredSearchRange ( m_bipredSearchRange ); 413 424 m_cTEncTop.setClipForBiPredMeEnabled ( m_bClipForBiPredMeEnabled ); 414 425 m_cTEncTop.setFastMEAssumingSmootherMVEnabled ( m_bFastMEAssumingSmootherMVEnabled ); 426 m_cTEncTop.setMinSearchWindow ( m_minSearchWindow ); 427 m_cTEncTop.setRestrictMESampling ( m_bRestrictMESampling ); 415 428 416 429 #if NH_MV … … 439 452 m_cTEncTop.setExtendedPrecisionProcessingFlag ( m_extendedPrecisionProcessingFlag ); 440 453 m_cTEncTop.setHighPrecisionOffsetsEnabledFlag ( m_highPrecisionOffsetsEnabledFlag ); 454 455 m_cTEncTop.setWeightedPredictionMethod( m_weightedPredictionMethod ); 456 441 457 //====== Tool list ======== 442 458 m_cTEncTop.setDeltaQpRD ( m_uiDeltaQpRD ); … … 463 479 m_cTEncTop.setQuadtreeTUMaxDepthInter ( m_uiQuadtreeTUMaxDepthInter ); 464 480 m_cTEncTop.setQuadtreeTUMaxDepthIntra ( m_uiQuadtreeTUMaxDepthIntra ); 465 m_cTEncTop.set UseFastEnc ( m_bUseFastEnc);481 m_cTEncTop.setFastInterSearchMode ( m_fastInterSearchMode ); 466 482 m_cTEncTop.setUseEarlyCU ( m_bUseEarlyCU ); 467 483 m_cTEncTop.setUseFastDecisionForMerge ( m_useFastDecisionForMerge ); … … 513 529 514 530 //====== Slice ======== 515 m_cTEncTop.setSliceMode ( (SliceConstraint)m_sliceMode );531 m_cTEncTop.setSliceMode ( m_sliceMode ); 516 532 m_cTEncTop.setSliceArgument ( m_sliceArgument ); 517 533 518 534 //====== Dependent Slice ======== 519 m_cTEncTop.setSliceSegmentMode ( (SliceConstraint)m_sliceSegmentMode );535 m_cTEncTop.setSliceSegmentMode ( m_sliceSegmentMode ); 520 536 m_cTEncTop.setSliceSegmentArgument ( m_sliceSegmentArgument ); 521 537 … … 540 556 541 557 m_cTEncTop.setIntraSmoothingDisabledFlag (!m_enableIntraReferenceSmoothing ); 542 m_cTEncTop.setDecodedPictureHashSEI Enabled ( m_decodedPictureHashSEIEnabled);558 m_cTEncTop.setDecodedPictureHashSEIType ( m_decodedPictureHashSEIType ); 543 559 m_cTEncTop.setRecoveryPointSEIEnabled ( m_recoveryPointSEIEnabled ); 544 560 m_cTEncTop.setBufferingPeriodSEIEnabled ( m_bufferingPeriodSEIEnabled ); … … 571 587 m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 572 588 m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 573 m_cTEncTop.setChroma SamplingFilterHintEnabled ( m_chromaSamplingFilterSEIenabled );574 m_cTEncTop.setChroma SamplingHorFilterIdc ( m_chromaSamplingHorFilterIdc );575 m_cTEncTop.setChroma SamplingVerFilterIdc ( m_chromaSamplingVerFilterIdc );589 m_cTEncTop.setChromaResamplingFilterHintEnabled ( m_chromaResamplingFilterSEIenabled ); 590 m_cTEncTop.setChromaResamplingHorFilterIdc ( m_chromaResamplingHorFilterIdc ); 591 m_cTEncTop.setChromaResamplingVerFilterIdc ( m_chromaResamplingVerFilterIdc ); 576 592 m_cTEncTop.setFramePackingArrangementSEIEnabled ( m_framePackingSEIEnabled ); 577 593 m_cTEncTop.setFramePackingArrangementSEIType ( m_framePackingSEIType ); … … 590 606 m_cTEncTop.setSOPDescriptionSEIEnabled ( m_SOPDescriptionSEIEnabled ); 591 607 m_cTEncTop.setScalableNestingSEIEnabled ( m_scalableNestingSEIEnabled ); 592 #if NH_MV593 #if !NH_MV_SEI594 m_cTEncTop.setSubBitstreamPropSEIEnabled ( m_subBistreamPropSEIEnabled );595 if( m_subBistreamPropSEIEnabled )596 {597 m_cTEncTop.setNumAdditionalSubStreams ( m_sbPropNumAdditionalSubStreams );598 m_cTEncTop.setSubBitstreamMode ( m_sbPropSubBitstreamMode );599 m_cTEncTop.setOutputLayerSetIdxToVps ( m_sbPropOutputLayerSetIdxToVps );600 m_cTEncTop.setHighestSublayerId ( m_sbPropHighestSublayerId );601 m_cTEncTop.setAvgBitRate ( m_sbPropAvgBitRate );602 m_cTEncTop.setMaxBitRate ( m_sbPropMaxBitRate );603 }604 #endif605 #endif606 607 608 m_cTEncTop.setTMCTSSEIEnabled ( m_tmctsSEIEnabled ); 608 609 m_cTEncTop.setTimeCodeSEIEnabled ( m_timeCodeSEIEnabled ); … … 623 624 m_cTEncTop.setKneeSEIInputKneePoint ( m_kneeSEIInputKneePoint ); 624 625 m_cTEncTop.setKneeSEIOutputKneePoint ( m_kneeSEIOutputKneePoint ); 626 m_cTEncTop.setColourRemapInfoSEIFileRoot ( m_colourRemapSEIFileRoot ); 625 627 m_cTEncTop.setMasteringDisplaySEI ( m_masteringDisplay ); 626 628 627 #if NH_MV _SEI629 #if NH_MV 628 630 m_cTEncTop.setSeiMessages ( &m_seiMessages ); 629 631 #endif … … 644 646 } 645 647 m_cTEncTop.setLFCrossTileBoundaryFlag ( m_bLFCrossTileBoundaryFlag ); 646 m_cTEncTop.set WaveFrontSynchro ( m_iWaveFrontSynchro);648 m_cTEncTop.setEntropyCodingSyncEnabledFlag ( m_entropyCodingSyncEnabledFlag ); 647 649 m_cTEncTop.setTMVPModeId ( m_TMVPModeId ); 648 650 m_cTEncTop.setUseScalingListId ( m_useScalingListId ); 649 m_cTEncTop.setScalingListFile ( m_scalingListFile);651 m_cTEncTop.setScalingListFileName ( m_scalingListFileName ); 650 652 m_cTEncTop.setSignHideFlag ( m_signHideFlag); 651 653 #if KWU_RC_VIEWRC_E0227 || KWU_RC_MADPRED_E0227 … … 669 671 m_cTEncTop.setInitialQP ( m_RCInitialQP ); 670 672 m_cTEncTop.setForceIntraQP ( m_RCForceIntraQP ); 673 #if U0132_TARGET_BITS_SATURATION 674 m_cTEncTop.setCpbSaturationEnabled ( m_RCCpbSaturationEnabled ); 675 m_cTEncTop.setCpbSize ( m_RCCpbSize ); 676 m_cTEncTop.setInitialCpbFullness ( m_RCInitialCpbFullness ); 677 #endif 678 671 679 #if KWU_RC_MADPRED_E0227 672 680 if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth()) … … 796 804 TEncTop* pcEncTop = m_acTEncTopList[ layer ]; 797 805 Int iViewNum = pcEncTop->getViewIndex(); 798 Int iContent = pcEncTop->getIsDepth() ? 1 : 0;806 Int iContent = pcEncTop->getIsDepth() || pcEncTop->getIsAuxDepth() ? 1 : 0; 799 807 Int iNumOfModels = m_cRenModStrParser.getNumOfModelsForView(iViewNum, iContent); 800 808 … … 843 851 #else 844 852 // Video I/O 845 m_cTVideoIOYuvInputFile.open( m_ pchInputFile, false, m_inputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth ); // read mode853 m_cTVideoIOYuvInputFile.open( m_inputFileName, false, m_inputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth ); // read mode 846 854 m_cTVideoIOYuvInputFile.skipFrames(m_FrameSkip, m_iSourceWidth - m_aiPad[0], m_iSourceHeight - m_aiPad[1], m_InputChromaFormatIDC); 847 855 848 if ( m_pchReconFile)849 { 850 m_cTVideoIOYuvReconFile.open(m_ pchReconFile, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth); // write mode856 if (!m_reconFileName.empty()) 857 { 858 m_cTVideoIOYuvReconFile.open(m_reconFileName, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth); // write mode 851 859 } 852 860 … … 917 925 Void TAppEncTop::encode() 918 926 { 919 fstream bitstreamFile(m_ pchBitstreamFile, fstream::binary | fstream::out);927 fstream bitstreamFile(m_bitstreamFileName.c_str(), fstream::binary | fstream::out); 920 928 if (!bitstreamFile) 921 929 { 922 fprintf(stderr, "\nfailed to open bitstream file `%s' for writing\n", m_ pchBitstreamFile);930 fprintf(stderr, "\nfailed to open bitstream file `%s' for writing\n", m_bitstreamFileName.c_str()); 923 931 exit(EXIT_FAILURE); 924 932 } … … 1028 1036 for ( Int gopId=0; gopId < gopSize; gopId++ ) 1029 1037 { 1030 #if NH_3D 1038 #if NH_3D_VSO 1031 1039 UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId ); 1032 1040 if ( iNextPoc < m_framesToBeEncoded ) … … 1150 1158 printRateSummary(); 1151 1159 1152 #if H_3D_REN_MAX_DEV_OUT1160 #if NH_3D_REN_MAX_DEV_OUT 1153 1161 Double dMaxDispDiff = m_cCameraData.getMaxShiftDeviation(); 1154 1162 … … 1295 1303 } 1296 1304 #else 1297 if ( m_pchReconFile)1305 if (!m_reconFileName.empty()) 1298 1306 { 1299 1307 m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, NUM_CHROMA_FORMAT, m_isTopFieldFirst ); … … 1352 1360 } 1353 1361 #else 1354 if ( m_pchReconFile)1362 if (!m_reconFileName.empty()) 1355 1363 { 1356 1364 m_cTVideoIOYuvReconFile.write( pcPicYuvRec, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, … … 1670 1678 if( m_depthFlag[ curLayerIdInVps ] && ( m_mpiFlag|| m_qtPredFlag || m_intraContourFlag ) ) 1671 1679 { 1672 Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false );1680 Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false, 0 ); 1673 1681 if ( nuhLayerIdTex == refLayerIdInNuh ) 1674 1682 { … … 1696 1704 for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++ ) 1697 1705 { 1698 Int nuhLayerIdDep = vps.getLayerIdInNuh( vps.getViewIndex( vps.getIdRefListLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[j] ) ), true );1706 Int nuhLayerIdDep = vps.getLayerIdInNuh( vps.getViewIndex( vps.getIdRefListLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[j] ) ), true, 0 ); 1699 1707 if ( nuhLayerIdDep == refLayerIdInNuh ) 1700 1708 { … … 2063 2071 vps.setLayerIdIncludedFlag( false, lsIdx, layerId ); 2064 2072 } 2065 for ( Int i = 0; i < m_layerId sInSets[lsIdx].size(); i++)2073 for ( Int i = 0; i < m_layerIdxInVpsInSets[lsIdx].size(); i++) 2066 2074 { 2067 vps.setLayerIdIncludedFlag( true, lsIdx, vps.getLayerIdInNuh( m_layerId sInSets[lsIdx][i] ) );2075 vps.setLayerIdIncludedFlag( true, lsIdx, vps.getLayerIdInNuh( m_layerIdxInVpsInSets[lsIdx][i] ) ); 2068 2076 } 2069 2077 } -
trunk/source/App/TAppEncoder/TAppEncTop.h
r1313 r1386 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.