Changeset 1347 in 3DVCSoftware for branches/HTM-15.1-dev0-Disney
- Timestamp:
- 6 Oct 2015, 12:59:17 (9 years ago)
- Location:
- branches/HTM-15.1-dev0-Disney/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.1-dev0-Disney/source/Lib/TAppCommon/program_options_lite.h
r1344 r1347 408 408 template<> 409 409 inline void 410 Option< std::vector< std::vector<double>> >::parse(const std::string& arg, const IntAry1d& idcs, ErrorReporter&)410 Option< std::vector< std::vector<double> > >::parse(const std::string& arg, const IntAry1d& idcs, ErrorReporter&) 411 411 { 412 412 // xParseVec ( arg, opt_storage[ idcs[0] ] ); -
branches/HTM-15.1-dev0-Disney/source/Lib/TLibCommon/SEI.cpp
r1345 r1347 1027 1027 Void SEIDepthRepresentationInfo::setupFromCfgFile(const Char* cfgFile) 1028 1028 { 1029 // Set default values 1030 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1031 1032 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 1033 //defAppLayerIds .push_back( TBD ); 1034 defAppPocs .push_back( 0 ); 1035 //defAppTids .push_back( TBD ); 1036 //defAppVclNaluTypes.push_back( TBD ); 1037 1038 Int defSeiNaluId = 0; 1039 Int defPositionInSeiNalu = 0; 1040 Bool defModifyByEncoder = true; 1041 1042 // Setup config file options 1043 po::Options opts; 1044 1045 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1046 1047 opts.addOptions() 1048 ("ZNear_%d" , m_zNear , std::vector<double>(0,0) , MAX_NUM_LAYERS , "ZNear" ) 1049 ("ZFar_%d" , m_zFar , std::vector<double>(0,0) , MAX_NUM_LAYERS , "ZFar" ) 1050 ("DMin_%d" , m_dMin , std::vector<double>(0,0) , MAX_NUM_LAYERS , "DMin" ) 1051 ("DMax_%d" , m_dMax , std::vector<double>(0,0) , MAX_NUM_LAYERS , "DMax" ) 1052 ("DepthRepresentationInfoSeiPresentFlag_%d", m_depthRepresentationInfoSeiPresentFlag, BoolAry1d(1,0), MAX_NUM_LAYERS, "DepthRepresentationInfoSeiPresentFlag") 1053 ("DepthRepresentationType_%d" , m_depthRepresentationType , IntAry1d(0,0), MAX_NUM_LAYERS, "DepthRepresentationType" ) 1054 ("DisparityRefViewId_%d" , m_disparityRefViewId , IntAry1d(0,0), MAX_NUM_LAYERS, "DisparityRefViewId" ) 1055 ("DepthNonlinearRepresentationNumMinus1_%d", m_depthNonlinearRepresentationNumMinus1, IntAry1d(0,0), MAX_NUM_LAYERS, "DepthNonlinearRepresentationNumMinus1") 1056 ("DepthNonlinearRepresentationModel_%d" , m_depth_nonlinear_representation_model , IntAry1d(0,0), MAX_NUM_LAYERS, "DepthNonlinearRepresentationModel") ; 1057 1058 1059 po::setDefaults(opts); 1060 1061 // Parse the cfg file 1062 po::ErrorReporter err; 1063 po::parseConfigFile( opts, cfgFile, err ); 1064 1065 Bool wrongConfig = false; 1066 1067 for(int i=0;i<MAX_NUM_LAYERS;i++) 1068 { 1069 if (m_zNear[i].size()>0) 1070 m_zNearFlag.push_back(true); 1071 else 1072 m_zNearFlag.push_back(false); 1073 1074 if (m_zFar[i].size()>0) 1075 m_zFarFlag.push_back(true); 1076 else 1077 m_zFarFlag.push_back(false); 1078 1079 if (m_dMin[i].size()>0) 1080 m_dMinFlag.push_back(true); 1081 else 1082 m_dMinFlag.push_back(false); 1083 1084 if (m_dMax[i].size()>0) 1085 m_dMaxFlag.push_back(true); 1086 else 1087 m_dMaxFlag.push_back(false); 1088 1089 1090 if (m_depthRepresentationInfoSeiPresentFlag[i][0]) 1029 // Set default values 1030 IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 1031 1032 // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 1033 //defAppLayerIds .push_back( TBD ); 1034 defAppPocs .push_back( 0 ); 1035 //defAppTids .push_back( TBD ); 1036 //defAppVclNaluTypes.push_back( TBD ); 1037 1038 Int defSeiNaluId = 0; 1039 Int defPositionInSeiNalu = 0; 1040 Bool defModifyByEncoder = true; 1041 1042 // Setup config file options 1043 po::Options opts; 1044 1045 xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 1046 1047 opts.addOptions() 1048 ("ZNear_%d" , m_zNear , std::vector<double>(0,0) , MAX_NUM_LAYERS , "ZNear" ) 1049 ("ZFar_%d" , m_zFar , std::vector<double>(0,0) , MAX_NUM_LAYERS , "ZFar" ) 1050 ("DMin_%d" , m_dMin , std::vector<double>(0,0) , MAX_NUM_LAYERS , "DMin" ) 1051 ("DMax_%d" , m_dMax , std::vector<double>(0,0) , MAX_NUM_LAYERS , "DMax" ) 1052 ("DepthRepresentationInfoSeiPresentFlag_%d", m_depthRepresentationInfoSeiPresentFlag, BoolAry1d(1,0), MAX_NUM_LAYERS, "DepthRepresentationInfoSeiPresentFlag") 1053 ("DepthRepresentationType_%d" , m_depthRepresentationType , IntAry1d(0,0), MAX_NUM_LAYERS, "DepthRepresentationType" ) 1054 ("DisparityRefViewId_%d" , m_disparityRefViewId , IntAry1d(0,0), MAX_NUM_LAYERS, "DisparityRefViewId" ) 1055 ("DepthNonlinearRepresentationNumMinus1_%d", m_depthNonlinearRepresentationNumMinus1, IntAry1d(0,0), MAX_NUM_LAYERS, "DepthNonlinearRepresentationNumMinus1") 1056 ("DepthNonlinearRepresentationModel_%d" , m_depth_nonlinear_representation_model , IntAry1d(0,0), MAX_NUM_LAYERS, "DepthNonlinearRepresentationModel") ; 1057 1058 1059 po::setDefaults(opts); 1060 1061 // Parse the cfg file 1062 po::ErrorReporter err; 1063 po::parseConfigFile( opts, cfgFile, err ); 1064 1065 1066 for(int i=0;i<MAX_NUM_LAYERS;i++) 1067 { 1068 if (m_zNear[i].size()>0) 1069 { 1070 m_zNearFlag.push_back(true); 1071 } 1072 else 1073 { 1074 m_zNearFlag.push_back(false); 1075 } 1076 1077 if (m_zFar[i].size()>0) 1078 { 1079 m_zFarFlag.push_back(true); 1080 } 1081 else 1082 { 1083 m_zFarFlag.push_back(false); 1084 } 1085 1086 if (m_dMin[i].size()>0) 1087 { 1088 m_dMinFlag.push_back(true); 1089 } 1090 else 1091 { 1092 m_dMinFlag.push_back(false); 1093 } 1094 1095 if (m_dMax[i].size()>0) 1096 { 1097 m_dMaxFlag.push_back(true); 1098 } 1099 else 1100 { 1101 m_dMaxFlag.push_back(false); 1102 } 1103 1104 1105 if (m_depthRepresentationInfoSeiPresentFlag[i][0]) 1106 { 1107 if ( m_depthRepresentationType[i].size()<=0 ) 1108 { 1109 printf("DepthRepresentationType_%d must be present for layer %d\n",i,i ); 1110 return; 1111 } 1112 1113 if ( m_depthRepresentationType[i][0]<0 ) 1114 { 1115 printf("DepthRepresentationType_%d must be equal to or greater than 0\n",i ); 1116 return; 1117 } 1118 1119 if (m_dMinFlag[i] || m_dMaxFlag[i]) 1120 { 1121 if (m_disparityRefViewId[i].size()<=0) 1091 1122 { 1092 if ( m_depthRepresentationType[i].size()<=0 ) 1093 { 1094 printf("DepthRepresentationType_%d must be present for layer %d\n",i,i ); 1095 return; 1096 } 1097 1098 if ( m_depthRepresentationType[i][0]<0 ) 1099 { 1100 printf("DepthRepresentationType_%d must be equal to or greater than 0\n",i ); 1101 return; 1102 } 1103 1104 if (m_dMinFlag[i] || m_dMaxFlag[i]) 1105 { 1106 if (m_disparityRefViewId[i].size()<=0) 1107 { 1108 printf("DisparityRefViewId_%d must be present for layer %d\n",i,i ); 1109 assert(false); 1110 return; 1111 } 1112 if (m_disparityRefViewId[i][0]<0) 1113 { 1114 printf("DisparityRefViewId_%d must be equal to or greater than 0\n",i ); 1115 assert(false); 1116 return; 1117 } 1118 } 1119 1120 if (m_depthRepresentationType[i][0]==3) 1121 { 1122 if (m_depthNonlinearRepresentationNumMinus1[i].size()<=0) 1123 { 1124 printf("DepthNonlinearRepresentationNumMinus1_%d must be present for layer %d\n",i,i ); 1125 assert(false); 1126 return; 1127 } 1128 if (m_depthNonlinearRepresentationNumMinus1[i][0]<0) 1129 { 1130 printf("DepthNonlinearRepresentationNumMinus1_%d must be equal to or greater than 0\n",i ); 1131 assert(false); 1132 return; 1133 } 1134 1135 if (m_depth_nonlinear_representation_model[i].size() != m_depthNonlinearRepresentationNumMinus1[i][0]+1) 1136 { 1137 printf("the number of values in Depth_nonlinear_representation_model must be equal to DepthNonlinearRepresentationNumMinus1+1 in layer %d\n",i ); 1138 assert(false); 1139 return; 1140 } 1141 1142 1143 } 1144 1145 1123 printf("DisparityRefViewId_%d must be present for layer %d\n",i,i ); 1124 assert(false); 1125 return; 1146 1126 } 1147 1148 1149 } 1150 1151 assert(m_zNearFlag.size()==MAX_NUM_LAYERS); 1152 assert(m_zFarFlag.size()==MAX_NUM_LAYERS); 1153 assert(m_dMinFlag.size()==MAX_NUM_LAYERS); 1154 assert(m_dMaxFlag.size()==MAX_NUM_LAYERS); 1127 if (m_disparityRefViewId[i][0]<0) 1128 { 1129 printf("DisparityRefViewId_%d must be equal to or greater than 0\n",i ); 1130 assert(false); 1131 return; 1132 } 1133 } 1134 1135 if (m_depthRepresentationType[i][0]==3) 1136 { 1137 if (m_depthNonlinearRepresentationNumMinus1[i].size()<=0) 1138 { 1139 printf("DepthNonlinearRepresentationNumMinus1_%d must be present for layer %d\n",i,i ); 1140 assert(false); 1141 return; 1142 } 1143 if (m_depthNonlinearRepresentationNumMinus1[i][0]<0) 1144 { 1145 printf("DepthNonlinearRepresentationNumMinus1_%d must be equal to or greater than 0\n",i ); 1146 assert(false); 1147 return; 1148 } 1149 1150 if (m_depth_nonlinear_representation_model[i].size() != m_depthNonlinearRepresentationNumMinus1[i][0]+1) 1151 { 1152 printf("the number of values in Depth_nonlinear_representation_model must be equal to DepthNonlinearRepresentationNumMinus1+1 in layer %d\n",i ); 1153 assert(false); 1154 return; 1155 } 1156 } 1157 } 1158 } 1159 1160 assert(m_zNearFlag.size()==MAX_NUM_LAYERS); 1161 assert(m_zFarFlag.size()==MAX_NUM_LAYERS); 1162 assert(m_dMinFlag.size()==MAX_NUM_LAYERS); 1163 assert(m_dMaxFlag.size()==MAX_NUM_LAYERS); 1155 1164 } 1156 1165 -
branches/HTM-15.1-dev0-Disney/source/Lib/TLibCommon/SEI.h
r1345 r1347 986 986 BoolAry1d m_dMaxFlag; 987 987 BoolAry2d m_depthRepresentationInfoSeiPresentFlag; 988 std::vector< std::vector<Double>> m_zNear,m_zFar,m_dMin,m_dMax;988 std::vector< std::vector<Double> > m_zNear,m_zFar,m_dMin,m_dMax; 989 989 990 990 IntAry2d m_depthRepresentationType; -
branches/HTM-15.1-dev0-Disney/source/Lib/TLibCommon/TComRom.h
r1344 r1347 153 153 // Change later 154 154 #ifndef ENC_DEC_TRACE 155 #define ENC_DEC_TRACE 1155 #define ENC_DEC_TRACE 0 156 156 #endif 157 157 #endif
Note: See TracChangeset for help on using the changeset viewer.