Changeset 1472 in SHVCSoftware for branches/SHM-dev/source/App/TAppDecoder
- Timestamp:
- 14 Sep 2015, 19:46:40 (9 years ago)
- Location:
- branches/SHM-dev/source/App/TAppDecoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp
r1460 r1472 70 70 Int olsIdx; 71 71 #if CONFORMANCE_BITSTREAM_MODE 72 string cfg_confPrefix; 73 #endif 72 string confPrefix; 73 #endif 74 75 Int* cfg_outputBitDepthY[MAX_LAYERS]; 76 Int* cfg_outputBitDepthC[MAX_LAYERS]; 77 78 for( Int layer = 0; layer < MAX_LAYERS; layer++ ) 79 { 80 cfg_outputBitDepthY[layer] = &m_outputBitDepth[layer][CHANNEL_TYPE_LUMA]; 81 cfg_outputBitDepthC[layer] = &m_outputBitDepth[layer][CHANNEL_TYPE_CHROMA]; 82 } 74 83 #endif 75 84 … … 85 94 ("BitstreamFile,b", m_bitstreamFileName, string(""), "bitstream input file name") 86 95 #if SVC_EXTENSION 87 ("ReconFileL%d,-o%d", m_reconFileName, string(""), MAX_LAYERS, "Layer %d reconstructed YUV output file name\n" 96 ("c", po::parseConfigFile, "configuration file name") 97 ("ReconFile%d,-o%d", m_reconFileName, string(""), MAX_LAYERS, "Layer %d reconstructed YUV output file name\n" 88 98 "YUV writing is skipped if omitted") 89 99 #if AVC_BASE … … 94 104 ("OutpuLayerSetIdx,-olsidx", olsIdx, -1, "Index of output layer set to be decoded.") 95 105 #if CONFORMANCE_BITSTREAM_MODE 96 ("ConformanceBitstremMode,-confMode", m_confModeFlag, false, "Enable generation of conformance bitstream metadata; True: Generate metadata, False: No metadata generated")97 ("ConformanceMetadataPrefix, -confPrefix", cfg_confPrefix, string(""), "Prefix for the file name of the conformance data. Default name - 'decodedBitstream'")106 ("ConformanceBitstremMode,-confMode", m_confModeFlag, false, "Enable generation of conformance bitstream metadata; True: Generate metadata, False: No metadata generated") 107 ("ConformanceMetadataPrefix,-confPrefix", confPrefix, string(""), "Prefix for the file name of the conformance data. Default name - 'decodedBitstream'") 98 108 #endif 99 109 #else … … 103 113 ("WarnUnknowParameter,w", warnUnknowParameter, 0, "warn for unknown configuration parameters instead of failing") 104 114 ("SkipFrames,s", m_iSkipFrame, 0, "number of frames to skip before random access") 115 #if SVC_EXTENSION 116 ("OutputBitDepth%d,%d", cfg_outputBitDepthY, 0, MAX_LAYERS, "bit depth of YUV output luma component (default: use 0 for native depth)") 117 ("OutputBitDepthC%d,%d", cfg_outputBitDepthC, 0, MAX_LAYERS, "bit depth of YUV output chroma component (default: use 0 for native depth)") 118 #else 105 119 ("OutputBitDepth,d", m_outputBitDepth[CHANNEL_TYPE_LUMA], 0, "bit depth of YUV output luma component (default: use 0 for native depth)") 106 120 ("OutputBitDepthC,d", m_outputBitDepth[CHANNEL_TYPE_CHROMA], 0, "bit depth of YUV output chroma component (default: use 0 for native depth)") 121 #endif 107 122 ("OutputColourSpaceConvert", outputColourSpaceConvert, string(""), "Colour space conversion to apply to input 444 video. Permitted values are (empty string=UNCHANGED) " + getListOfColourSpaceConverts(false)) 108 123 ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers") … … 168 183 assert( olsIdx != -1 ); // In the conformance mode, target output layer set index is to be explicitly specified. 169 184 170 if( c fg_confPrefix.empty() )185 if( confPrefix.empty() ) 171 186 { 172 187 m_confPrefix = string("decodedBitstream"); … … 174 189 else 175 190 { 176 m_confPrefix = c fg_confPrefix;191 m_confPrefix = confPrefix; 177 192 } 178 193 // Open metadata file and write -
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h
r1460 r1472 64 64 #endif 65 65 Int m_iSkipFrame; ///< counter for frames prior to the random access point to skip 66 #if SVC_EXTENSION 67 Int m_outputBitDepth[MAX_LAYERS][MAX_NUM_CHANNEL_TYPE]; ///< bit depth used for writing output 68 #else 66 69 Int m_outputBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit depth used for writing output 70 #endif 67 71 InputColourSpaceConversion m_outputColourSpaceConvert; 68 72 … … 119 123 , m_bClipOutputVideoToRec709Range(false) 120 124 { 125 #if SVC_EXTENSION 126 for( Int layerId = 0; layerId < MAX_LAYERS; layerId++ ) 127 { 128 for( UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++ ) 129 { 130 m_outputBitDepth[layerId][channelTypeIndex] = 0; 131 } 132 } 133 #else 121 134 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) 122 135 { 123 136 m_outputBitDepth[channelTypeIndex] = 0; 124 137 } 138 #endif 125 139 } 126 140 -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1471 r1472 325 325 if ( !m_reconFileName[curLayerId].empty() && !openedReconFile[curLayerId] ) 326 326 { 327 const BitDepths &bitDepths=pcListPic->front()->getSlice(0)->getBitDepths(); // use bit depths of first reconstructed picture. 328 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 329 { 330 if (m_outputBitDepth[channelType] == 0) 327 const BitDepths& bitDepths = m_apcTDecTop[curLayerId]->getParameterSetManager()->getActiveVPS()->getBitDepths( m_apcTDecTop[curLayerId]->getParameterSetManager()->getActiveSPS(), curLayerId ); 328 329 for( UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 330 { 331 if( m_outputBitDepth[curLayerId][channelType] == 0 ) 331 332 { 332 m_outputBitDepth[c hannelType] = bitDepths.recon[channelType];333 m_outputBitDepth[curLayerId][channelType] = bitDepths.recon[channelType]; 333 334 } 334 335 } 335 m_apcTVideoIOYuvReconFile[curLayerId]->open( m_reconFileName[curLayerId], true, m_outputBitDepth , m_outputBitDepth, bitDepths.recon ); // write mode336 m_apcTVideoIOYuvReconFile[curLayerId]->open( m_reconFileName[curLayerId], true, m_outputBitDepth[curLayerId], m_outputBitDepth[curLayerId], bitDepths.recon ); // write mode 336 337 337 338 openedReconFile[curLayerId] = true;
Note: See TracChangeset for help on using the changeset viewer.