Changeset 1029 in SHVCSoftware for branches/SHM-dev/source/App/TAppDecoder
- Timestamp:
- 26 Feb 2015, 00:21:54 (10 years ago)
- Location:
- branches/SHM-dev
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev
- Property svn:mergeinfo changed
-
branches/SHM-dev/source
- Property svn:mergeinfo changed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp
r1005 r1029 41 41 #include "TAppDecCfg.h" 42 42 #include "TAppCommon/program_options_lite.h" 43 #include "TLibCommon/TComChromaFormat.h" 43 44 #if SVC_EXTENSION 44 45 #include <cassert> … … 83 84 84 85 string cfg_TargetDecLayerIdSetFile; 86 string outputColourSpaceConvert; 85 87 86 88 po::Options opts; 87 89 opts.addOptions() 88 ("help", do_help, false, "this help text") 89 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "bitstream input file name") 90 91 92 ("help", do_help, false, "this help text") 93 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "bitstream input file name") 90 94 #if SVC_EXTENSION 91 95 ("ReconFileL%d,-o%d", cfg_ReconFile, string(""), MAX_LAYERS, "Layer %d reconstructed YUV output file name\n" … … 98 102 #endif 99 103 #endif 100 #else101 ("ReconFile,o", cfg_ReconFile, string(""), "reconstructed YUV output file name\n"102 "YUV writing is skipped if omitted")103 #endif104 ("SkipFrames,s", m_iSkipFrame, 0, "number of frames to skip before random access")105 ("OutputBitDepth,d", m_outputBitDepthY, 0, "bit depth of YUV output luma component (default: use 0 for native depth)")106 ("OutputBitDepthC,d", m_outputBitDepthC, 0, "bit depth of YUV output chroma component (default: use 0 for native depth)")107 #if SVC_EXTENSION108 104 #if FIX_CONF_MODE 109 105 ("LayerNum,-ls", nLayerNum, MAX_NUM_LAYER_IDS, "Number of layers to be decoded.") … … 118 114 ("ConformanceMetadataPrefix,-confPrefix", cfg_confPrefix, string(""), "Prefix for the file name of the conformance data. Default name - 'decodedBitstream'") 119 115 #endif 120 #endif 121 ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers") 122 ("SEIDecodedPictureHash", m_decodedPictureHashSEIEnabled, 1, "Control handling of decoded picture hash SEI messages\n" 123 "\t1: check hash in SEI messages if available in the bitstream\n" 124 "\t0: ignore SEI message") 125 ("SEIpictureDigest", m_decodedPictureHashSEIEnabled, 1, "deprecated alias for SEIDecodedPictureHash") 126 ("TarDecLayerIdSetFile,l", cfg_TargetDecLayerIdSetFile, string(""), "targetDecLayerIdSet file name. The file should include white space separated LayerId values to be decoded. Omitting the option or a value of -1 in the file decodes all layers.") 127 ("RespectDefDispWindow,w", m_respectDefDispWindow, 0, "Only output content inside the default display window\n") 116 #else 117 ("ReconFile,o", cfg_ReconFile, string(""), "reconstructed YUV output file name\n" 118 "YUV writing is skipped if omitted") 119 #endif 120 121 ("SkipFrames,s", m_iSkipFrame, 0, "number of frames to skip before random access") 122 ("OutputBitDepth,d", m_outputBitDepth[CHANNEL_TYPE_LUMA], 0, "bit depth of YUV output luma component (default: use 0 for native depth)") 123 ("OutputBitDepthC,d", m_outputBitDepth[CHANNEL_TYPE_CHROMA], 0, "bit depth of YUV output chroma component (default: use 0 for native depth)") 124 ("OutputColourSpaceConvert", outputColourSpaceConvert, string(""), "Colour space conversion to apply to input 444 video. Permitted values are (empty string=UNCHANGED) " + getListOfColourSpaceConverts(false)) 125 ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers") 126 ("SEIDecodedPictureHash", m_decodedPictureHashSEIEnabled, 1, "Control handling of decoded picture hash SEI messages\n" 127 "\t1: check hash in SEI messages if available in the bitstream\n" 128 "\t0: ignore SEI message") 129 ("SEIpictureDigest", m_decodedPictureHashSEIEnabled, 1, "deprecated alias for SEIDecodedPictureHash") 130 ("SEINoDisplay", m_decodedNoDisplaySEIEnabled, true, "Control handling of decoded no display SEI messages") 131 ("TarDecLayerIdSetFile,l", cfg_TargetDecLayerIdSetFile, string(""), "targetDecLayerIdSet file name. The file should include white space separated LayerId values to be decoded. Omitting the option or a value of -1 in the file decodes all layers.") 132 ("RespectDefDispWindow,w", m_respectDefDispWindow, 0, "Only output content inside the default display window\n") 133 #if O0043_BEST_EFFORT_DECODING 134 ("ForceDecodeBitDepth", m_forceDecodeBitDepth, 0U, "Force the decoder to operate at a particular bit-depth (best effort decoding)") 135 #endif 128 136 #if Q0074_COLOUR_REMAPPING_SEI 129 137 ("SEIColourRemappingInfo", m_colourRemapSEIEnabled, false, "Control handling of Colour Remapping Information SEI messages\n" … … 132 140 #endif 133 141 ; 142 134 143 po::setDefaults(opts); 135 144 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv); … … 143 152 { 144 153 po::doHelp(cout, opts); 154 return false; 155 } 156 157 m_outputColourSpaceConvert = stringToInputColourSpaceConvert(outputColourSpaceConvert, false); 158 if (m_outputColourSpaceConvert>=NUMBER_INPUT_COLOUR_SPACE_CONVERSIONS) 159 { 160 fprintf(stderr, "Bad output colour space conversion string\n"); 145 161 return false; 146 162 } … … 157 173 assert( m_tgtLayerId < MAX_NUM_LAYER_IDS ); 158 174 #endif 159 #if OUTPUT_LAYER_SET_INDEX 175 #if OUTPUT_LAYER_SET_INDEX 160 176 #if CONFORMANCE_BITSTREAM_MODE 161 177 if( m_confModeFlag ) … … 179 195 // Decoded layer YUV files 180 196 #if FIX_CONF_MODE 181 for(Int layer= 0; layer < = MAX_VPS_LAYER_ID_PLUS1-1; layer++ )197 for(Int layer= 0; layer < MAX_VPS_LAYER_ID_PLUS1; layer++ ) 182 198 #else 183 199 for(UInt layer=0; layer<= m_tgtLayerId; layer++) … … 190 206 } 191 207 #endif 192 this->getCommonDecoderParams()->setTargetOutputLayerSetIdx( olsIdx);193 this->getCommonDecoderParams()->setTargetLayerId( m_tgtLayerId );208 m_commonDecoderParams.setTargetOutputLayerSetIdx( olsIdx ); 209 m_commonDecoderParams.setTargetLayerId( m_tgtLayerId ); 194 210 #endif 195 211 #if FIX_CONF_MODE 196 for(Int layer = 0; layer < = MAX_VPS_LAYER_ID_PLUS1-1; layer++ )212 for(Int layer = 0; layer < MAX_VPS_LAYER_ID_PLUS1; layer++ ) 197 213 { 198 214 #else … … 212 228 if (!m_pchBitstreamFile) 213 229 { 214 fprintf(stderr, "No input file specif ed, aborting\n");230 fprintf(stderr, "No input file specified, aborting\n"); 215 231 return false; 216 232 } … … 240 256 if ( layerIdParsed < 0 || layerIdParsed >= MAX_NUM_LAYER_IDS ) 241 257 { 242 fprintf(stderr, "Warning! Parsed LayerId %d is not within gallowed range [0,%d]. Ignoring this value.\n", layerIdParsed, MAX_NUM_LAYER_IDS-1 );258 fprintf(stderr, "Warning! Parsed LayerId %d is not within allowed range [0,%d]. Ignoring this value.\n", layerIdParsed, MAX_NUM_LAYER_IDS-1 ); 243 259 } 244 260 else … … 250 266 fclose (targetDecLayerIdSetFile); 251 267 #if !R0235_SMALLEST_LAYER_ID // LayerId=0 is not required anymore in some cases 252 if ( m_targetDecLayerIdSet.size() > 0 && !isLayerIdZeroIncluded)268 if ( m_targetDecLayerIdSet.size() > 0 && !isLayerIdZeroIncluded ) 253 269 { 254 270 fprintf(stderr, "TargetDecLayerIdSet must contain LayerId=0, aborting" ); -
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h
r924 r1029 57 57 { 58 58 protected: 59 Char* m_pchBitstreamFile; ///< input bitstream file name59 Char* m_pchBitstreamFile; ///< input bitstream file name 60 60 #if SVC_EXTENSION 61 61 Char* m_pchReconFile [MAX_LAYERS]; ///< output reconstruction file name 62 62 #else 63 Char* m_pchReconFile; ///< output reconstruction file name63 Char* m_pchReconFile; ///< output reconstruction file name 64 64 #endif 65 Int m_iSkipFrame; ///< counter for frames prior to the random access point to skip66 Int m_outputBitDepth Y; ///< bit depth used for writing output (luma)67 In t m_outputBitDepthC; ///< bit depth used for writing output (chroma)t65 Int m_iSkipFrame; ///< counter for frames prior to the random access point to skip 66 Int m_outputBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit depth used for writing output 67 InputColourSpaceConversion m_outputColourSpaceConvert; 68 68 69 69 Int m_iMaxTemporalLayer; ///< maximum temporal layer to be decoded 70 70 Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message 71 Bool m_decodedNoDisplaySEIEnabled; ///< Enable(true)/disable(false) writing only pictures that get displayed based on the no display SEI message 71 72 #if Q0074_COLOUR_REMAPPING_SEI 72 73 Bool m_colourRemapSEIEnabled; ///< Enable the Colour Remapping Information SEI message if available (remapping decoded pictures) … … 85 86 86 87 std::vector<Int> m_targetDecLayerIdSet; ///< set of LayerIds to be included in the sub-bitstream extraction process. 87 Int m_respectDefDispWindow; ///< Only output content inside the default display window 88 Int m_respectDefDispWindow; ///< Only output content inside the default display window 89 #if O0043_BEST_EFFORT_DECODING 90 UInt m_forceDecodeBitDepth; ///< if non-zero, force the bit depth at the decoder (best effort decoding) 91 #endif 92 std::string m_outputDecodedSEIMessagesFilename; ///< filename to output decoded SEI messages to. If '-', then use stdout. If empty, do not output details. 88 93 #if OUTPUT_LAYER_SET_INDEX 89 94 CommonDecoderParams m_commonDecoderParams; … … 91 96 #if CONFORMANCE_BITSTREAM_MODE 92 97 Bool m_confModeFlag; 93 std::string m_confPrefix;94 std::string m_metadataFileName;95 Bool m_metadataFileRefresh;98 std::string m_confPrefix; 99 std::string m_metadataFileName; 100 Bool m_metadataFileRefresh; 96 101 std::string m_decodedYuvLayerFileName[63]; 97 102 Bool m_decodedYuvLayerRefresh[63]; … … 102 107 : m_pchBitstreamFile(NULL) 103 108 #if !SVC_EXTENSION 104 , m_pchReconFile(NULL) 109 , m_pchReconFile(NULL) 105 110 #endif 106 111 , m_iSkipFrame(0) 107 , m_outputBitDepthY(0) 108 , m_outputBitDepthC(0) 112 , m_outputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) 109 113 , m_iMaxTemporalLayer(-1) 110 114 , m_decodedPictureHashSEIEnabled(0) 115 , m_decodedNoDisplaySEIEnabled(false) 111 116 #if Q0074_COLOUR_REMAPPING_SEI 112 117 , m_colourRemapSEIEnabled(0) … … 120 125 #endif 121 126 , m_respectDefDispWindow(0) 122 {} 127 #if O0043_BEST_EFFORT_DECODING 128 , m_forceDecodeBitDepth(0) 129 #endif 130 { 131 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) 132 m_outputBitDepth[channelTypeIndex] = 0; 133 } 134 123 135 virtual ~TAppDecCfg() {} 124 136 125 137 Bool parseCfg ( Int argc, Char* argv[] ); ///< initialize option class from configuration 126 138 #if OUTPUT_LAYER_SET_INDEX -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1005 r1029 41 41 #include <fcntl.h> 42 42 #include <assert.h> 43 #include <iostream> 43 44 44 #include "TAppDecTop.h" 45 45 #include "TLibDecoder/AnnexBread.h" 46 46 #include "TLibDecoder/NALread.h" 47 #if RExt__DECODER_DEBUG_BIT_STATISTICS 48 #include "TLibCommon/TComCodingStatistics.h" 49 #endif 50 #if CONFORMANCE_BITSTREAM_MODE 47 51 #include "TLibCommon/TComPicYuv.h" 48 52 #include "libmd5/MD5.h" 53 #endif 54 49 55 //! \ingroup TAppDecoder 50 56 //! \{ … … 83 89 #if SVC_EXTENSION 84 90 #if FIX_CONF_MODE 85 for(Int i = 0; i < = MAX_VPS_LAYER_ID_PLUS1-1; i++ )91 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++ ) 86 92 #else 87 93 for( Int i = 0; i <= m_tgtLayerId; i++ ) … … 137 143 InputByteStream bytestream(bitstreamFile); 138 144 145 if (!m_outputDecodedSEIMessagesFilename.empty() && m_outputDecodedSEIMessagesFilename!="-") 146 { 147 m_seiMessageFileStream.open(m_outputDecodedSEIMessagesFilename.c_str(), std::ios::out); 148 if (!m_seiMessageFileStream.is_open() || !m_seiMessageFileStream.good()) 149 { 150 fprintf(stderr, "\nUnable to open file `%s' for writing decoded SEI messages\n", m_outputDecodedSEIMessagesFilename.c_str()); 151 exit(EXIT_FAILURE); 152 } 153 } 154 139 155 // create & initialize internal classes 140 156 xCreateDecLib(); 141 xInitDecLib (); 157 xInitDecLib (); 142 158 143 159 // main decoder loop … … 147 163 148 164 #if FIX_CONF_MODE 149 for(UInt layer = 0; layer < = MAX_VPS_LAYER_ID_PLUS1-1; layer++)165 for(UInt layer = 0; layer < MAX_VPS_LAYER_ID_PLUS1; layer++) 150 166 #else 151 167 for(UInt layer=0; layer<=m_tgtLayerId; layer++) … … 177 193 * requires the TDecTop::decode() method to be called again with the same 178 194 * nal unit. */ 195 #if RExt__DECODER_DEBUG_BIT_STATISTICS 196 TComCodingStatistics::TComCodingStatisticsData backupStats(TComCodingStatistics::GetStatistics()); 197 streampos location = bitstreamFile.tellg() - streampos(bytestream.GetNumBufferedBytes()); 198 #else 179 199 streampos location = bitstreamFile.tellg(); 200 #endif 180 201 AnnexBStats stats = AnnexBStats(); 181 202 … … 183 204 InputNALUnit nalu; 184 205 byteStreamNALUnit(bytestream, nalUnit, stats); 206 185 207 // call actual decoding function 186 208 Bool bNewPicture = false; 187 209 Bool bNewPOC = false; 210 188 211 if (nalUnit.empty()) 189 212 { … … 221 244 * [1] except for the first NAL unit in the file 222 245 * (but bNewPicture doesn't happen then) */ 246 #if RExt__DECODER_DEBUG_BIT_STATISTICS 247 bitstreamFile.seekg(location); 248 bytestream.reset(); 249 TComCodingStatistics::SetStatistics(backupStats); 250 #else 223 251 bitstreamFile.seekg(location-streamoff(3)); 224 252 bytestream.reset(); 253 #endif 225 254 } 226 255 #if POC_RESET_IDC_DECODER … … 232 261 bitstreamFile.seekg(location); 233 262 bytestream.reset(); 263 #if RExt__DECODER_DEBUG_BIT_STATISTICS 264 TComCodingStatistics::SetStatistics(backupStats); 265 #endif 234 266 } 235 267 #endif … … 238 270 239 271 #if POC_RESET_IDC_DECODER 240 if ((bNewPicture && m_acTDecTop[nalu.m_layerId].getParseIdc() == 3) || (m_acTDecTop[nalu.m_layerId].getParseIdc() == 0) || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) 241 #else 242 if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) 272 if ( ( (bNewPicture && m_acTDecTop[nalu.m_layerId].getParseIdc() == 3) || m_acTDecTop[nalu.m_layerId].getParseIdc() == 0 || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS ) && 273 !m_acTDecTop[nalu.m_layerId].getFirstSliceInSequence() ) 274 #else 275 if ( (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) && 276 !m_acTDecTop[nalu.m_layerId].getFirstSliceInSequence() ) 243 277 #endif 244 278 { 245 279 #if O0194_DIFFERENT_BITDEPTH_EL_BL 246 280 //Bug fix: The bit depth was not set correctly for each layer when doing DBF 247 g_bitDepth Y = g_bitDepthYLayer[curLayerId];248 g_bitDepth C = g_bitDepthCLayer[curLayerId];281 g_bitDepth[CHANNEL_TYPE_LUMA] = g_bitDepthLayer[CHANNEL_TYPE_LUMA][curLayerId]; 282 g_bitDepth[CHANNEL_TYPE_CHROMA] = g_bitDepthLayer[CHANNEL_TYPE_CHROMA][curLayerId]; 249 283 #endif 250 284 if (!loopFiltered[curLayerId] || bitstreamFile) … … 256 290 m_acTDecTop[curLayerId].earlyPicMarking(m_iMaxTemporalLayer, m_targetDecLayerIdSet); 257 291 #endif 292 if (nalu.m_nalUnitType == NAL_UNIT_EOS) 293 { 294 m_acTDecTop[nalu.m_layerId].setFirstSliceInSequence(true); 295 } 296 } 297 else if ( (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS ) && 298 m_acTDecTop[nalu.m_layerId].getFirstSliceInSequence () ) 299 { 300 m_acTDecTop[nalu.m_layerId].setFirstSliceInPicture (true); 258 301 } 259 302 … … 269 312 if ( m_pchReconFile[curLayerId] && !openedReconFile[curLayerId] ) 270 313 { 271 if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; } 272 if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; } 273 274 m_acTVideoIOYuvReconFile[curLayerId].open( m_pchReconFile[curLayerId], true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode 314 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 315 { 316 if (m_outputBitDepth[channelType] == 0) m_outputBitDepth[channelType] = g_bitDepth[channelType]; 317 } 318 m_acTVideoIOYuvReconFile[curLayerId].open( m_pchReconFile[curLayerId], true, m_outputBitDepth, m_outputBitDepth, g_bitDepth ); // write mode 275 319 276 320 openedReconFile[curLayerId] = true; … … 362 406 363 407 #if FIX_CONF_MODE 364 for(UInt layer = layerIdmin; layer < = MAX_VPS_LAYER_ID_PLUS1-1; layer++)408 for(UInt layer = layerIdmin; layer < MAX_VPS_LAYER_ID_PLUS1; layer++) 365 409 #else 366 410 for(UInt layer = layerIdmin; layer <= m_tgtLayerId; layer++) … … 390 434 391 435 InputByteStream bytestream(bitstreamFile); 436 437 if (!m_outputDecodedSEIMessagesFilename.empty() && m_outputDecodedSEIMessagesFilename!="-") 438 { 439 m_seiMessageFileStream.open(m_outputDecodedSEIMessagesFilename.c_str(), std::ios::out); 440 if (!m_seiMessageFileStream.is_open() || !m_seiMessageFileStream.good()) 441 { 442 fprintf(stderr, "\nUnable to open file `%s' for writing decoded SEI messages\n", m_outputDecodedSEIMessagesFilename.c_str()); 443 exit(EXIT_FAILURE); 444 } 445 } 392 446 393 447 // create & initialize internal classes … … 406 460 * requires the TDecTop::decode() method to be called again with the same 407 461 * nal unit. */ 462 #if RExt__DECODER_DEBUG_BIT_STATISTICS 463 TComCodingStatistics::TComCodingStatisticsData backupStats(TComCodingStatistics::GetStatistics()); 464 streampos location = bitstreamFile.tellg() - streampos(bytestream.GetNumBufferedBytes()); 465 #else 408 466 streampos location = bitstreamFile.tellg(); 467 #endif 409 468 AnnexBStats stats = AnnexBStats(); 410 469 … … 429 488 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) ) 430 489 { 431 432 490 bNewPicture = false; 491 } 433 492 else 434 493 { … … 441 500 * [1] except for the first NAL unit in the file 442 501 * (but bNewPicture doesn't happen then) */ 502 #if RExt__DECODER_DEBUG_BIT_STATISTICS 503 bitstreamFile.seekg(location); 504 bytestream.reset(); 505 TComCodingStatistics::SetStatistics(backupStats); 506 #else 443 507 bitstreamFile.seekg(location-streamoff(3)); 444 508 bytestream.reset(); 445 } 446 } 447 } 448 if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) 509 #endif 510 } 511 } 512 } 513 514 if ( (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) && 515 !m_cTDecTop.getFirstSliceInSequence () ) 449 516 { 450 517 if (!loopFiltered || bitstreamFile) … … 453 520 } 454 521 loopFiltered = (nalu.m_nalUnitType == NAL_UNIT_EOS); 455 } 456 #if !FIX_WRITING_OUTPUT 457 #if SETTING_NO_OUT_PIC_PRIOR 458 if (bNewPicture && m_cTDecTop.getNoOutputPriorPicsFlag()) 459 { 460 m_cTDecTop.checkNoOutputPriorPics( pcListPic ); 461 } 462 #endif 463 #endif 522 if (nalu.m_nalUnitType == NAL_UNIT_EOS) 523 { 524 m_cTDecTop.setFirstSliceInSequence(true); 525 } 526 } 527 else if ( (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS ) && 528 m_cTDecTop.getFirstSliceInSequence () ) 529 { 530 m_cTDecTop.setFirstSliceInPicture (true); 531 } 464 532 465 533 if( pcListPic ) … … 467 535 if ( m_pchReconFile && !openedReconFile ) 468 536 { 469 if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; } 470 if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; } 471 472 m_cTVideoIOYuvReconFile.open( m_pchReconFile, true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode 537 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 538 { 539 if (m_outputBitDepth[channelType] == 0) m_outputBitDepth[channelType] = g_bitDepth[channelType]; 540 } 541 542 m_cTVideoIOYuvReconFile.open( m_pchReconFile, true, m_outputBitDepth, m_outputBitDepth, g_bitDepth ); // write mode 473 543 openedReconFile = true; 474 544 } 475 #if FIX_WRITING_OUTPUT476 545 // write reconstruction to file 477 546 if( bNewPicture ) … … 479 548 xWriteOutput( pcListPic, nalu.m_temporalId ); 480 549 } 481 #if SETTING_NO_OUT_PIC_PRIOR482 550 if ( (bNewPicture || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA) && m_cTDecTop.getNoOutputPriorPicsFlag() ) 483 551 { … … 485 553 m_cTDecTop.setNoOutputPriorPicsFlag (false); 486 554 } 487 #endif488 #endif489 555 if ( bNewPicture && 490 556 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL … … 498 564 if (nalu.m_nalUnitType == NAL_UNIT_EOS) 499 565 { 500 #if FIX_OUTPUT_EOS501 566 xWriteOutput( pcListPic, nalu.m_temporalId ); 502 #else 503 xFlushOutput( pcListPic ); 504 #endif 567 m_cTDecTop.setFirstSliceInPicture (false); 505 568 } 506 569 // write reconstruction to file -- for additional bumping as defined in C.5.2.3 507 #if FIX_WRITING_OUTPUT508 570 if(!bNewPicture && nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL_N && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_VCL31) 509 #else510 if(bNewPicture)511 #endif512 571 { 513 572 xWriteOutput( pcListPic, nalu.m_temporalId ); … … 534 593 // initialize global variables 535 594 initROM(); 595 536 596 #if FIX_CONF_MODE 537 for(UInt layer = 0; layer < = MAX_VPS_LAYER_ID_PLUS1-1; layer++)597 for(UInt layer = 0; layer < MAX_VPS_LAYER_ID_PLUS1; layer++) 538 598 #else 539 599 for(UInt layer = 0; layer <= m_tgtLayerId; layer++) … … 559 619 // destroy ROM 560 620 destroyROM(); 621 561 622 #if FIX_CONF_MODE 562 for(UInt layer = 0; layer < = MAX_VPS_LAYER_ID_PLUS1-1; layer++)623 for(UInt layer = 0; layer < MAX_VPS_LAYER_ID_PLUS1; layer++) 563 624 #else 564 625 for(UInt layer = 0; layer <= m_tgtLayerId; layer++) … … 589 650 #if SVC_EXTENSION 590 651 #if FIX_CONF_MODE 591 for(UInt layer = 0; layer < = MAX_VPS_LAYER_ID_PLUS1-1; layer++)652 for(UInt layer = 0; layer < MAX_VPS_LAYER_ID_PLUS1; layer++) 592 653 #else 593 654 for(UInt layer = 0; layer <= m_tgtLayerId; layer++) … … 605 666 #endif 606 667 #if OUTPUT_LAYER_SET_INDEX 607 m_acTDecTop[layer].setCommonDecoderParams( this->getCommonDecoderParams());668 m_acTDecTop[layer].setCommonDecoderParams( &m_commonDecoderParams ); 608 669 #endif 609 670 } … … 615 676 #endif 616 677 { 617 m_acTDecTop[layer].setConfModeFlag ( this->getConfModeFlag());678 m_acTDecTop[layer].setConfModeFlag( m_confModeFlag ); 618 679 } 619 680 #endif … … 621 682 m_cTDecTop.init(); 622 683 m_cTDecTop.setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); 684 #if O0043_BEST_EFFORT_DECODING 685 m_cTDecTop.setForceDecodeBitDepth(m_forceDecodeBitDepth); 686 #endif 687 if (!m_outputDecodedSEIMessagesFilename.empty()) 688 { 689 std::ostream &os=m_seiMessageFileStream.is_open() ? m_seiMessageFileStream : std::cout; 690 m_cTDecTop.setDecodedSEIMessageOutputStream(&os); 691 } 623 692 #if Q0074_COLOUR_REMAPPING_SEI 624 693 m_cTDecTop.setColourRemappingInfoSEIEnabled(m_colourRemapSEIEnabled); … … 673 742 #endif 674 743 { 675 numPicsNotYetDisplayed++;744 numPicsNotYetDisplayed++; 676 745 dpbFullness++; 677 746 } … … 682 751 iterPic++; 683 752 } 684 iterPic = pcListPic->begin(); 753 754 iterPic = pcListPic->begin(); 755 685 756 if (numPicsNotYetDisplayed>2) 686 757 { … … 720 791 const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window(); 721 792 const Bool isTff = pcPicTop->isTopField(); 722 TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec(); 723 TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec(); 793 794 Bool display = true; 795 if( m_decodedNoDisplaySEIEnabled ) 796 { 797 SEIMessages noDisplay = getSeisByType(pcPic->getSEIs(), SEI::NO_DISPLAY ); 798 const SEINoDisplay *nd = ( noDisplay.size() > 0 ) ? (SEINoDisplay*) *(noDisplay.begin()) : NULL; 799 if( (nd != NULL) && nd->m_noDisplay ) 800 { 801 display = false; 802 } 803 } 804 805 if (display) 806 { 724 807 #if REPN_FORMAT_IN_VPS 725 UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc(); 726 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 727 728 m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRecTop, pPicCYuvRecBot, 729 conf.getWindowLeftOffset() * xScal + defDisp.getWindowLeftOffset(), 730 conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(), 731 conf.getWindowTopOffset() * yScal + defDisp.getWindowTopOffset(), 732 conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset(), isTff ); 733 #else 734 m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRecTop, pPicCYuvRecBot, 735 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 736 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 737 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 738 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), isTff ); 739 #endif 808 UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc(); 809 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 810 811 m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 812 m_outputColourSpaceConvert, 813 conf.getWindowLeftOffset() * xScal + defDisp.getWindowLeftOffset(), 814 conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(), 815 conf.getWindowTopOffset() * yScal + defDisp.getWindowTopOffset(), 816 conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff ); 817 #else 818 m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 819 m_outputColourSpaceConvert, 820 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 821 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 822 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 823 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff ); 824 #endif 825 } 740 826 } 741 827 … … 748 834 const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window(); 749 835 const Bool isTff = pcPicTop->isTopField(); 750 TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec(); 751 TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec(); 752 m_cTVideoIOYuvReconFile.write( pPicCYuvRecTop, pPicCYuvRecBot, 753 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 754 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 755 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 756 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), isTff ); 836 837 Bool display = true; 838 if( m_decodedNoDisplaySEIEnabled ) 839 { 840 SEIMessages noDisplay = getSeisByType(pcPic->getSEIs(), SEI::NO_DISPLAY ); 841 const SEINoDisplay *nd = ( noDisplay.size() > 0 ) ? (SEINoDisplay*) *(noDisplay.begin()) : NULL; 842 if( (nd != NULL) && nd->m_noDisplay ) 843 { 844 display = false; 845 } 846 } 847 848 if (display) 849 { 850 m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 851 m_outputColourSpaceConvert, 852 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 853 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 854 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 855 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff ); 856 } 757 857 } 758 858 … … 800 900 { 801 901 iterPic = pcListPic->begin(); 902 802 903 while (iterPic != pcListPic->end()) 803 904 { … … 813 914 { 814 915 // write to file 815 numPicsNotYetDisplayed--;916 numPicsNotYetDisplayed--; 816 917 if(pcPic->getSlice(0)->isReferenced() == false) 817 918 { … … 822 923 { 823 924 const Window &conf = pcPic->getConformanceWindow(); 824 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 825 TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec(); 925 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 826 926 #if REPN_FORMAT_IN_VPS 827 927 UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc(); 828 928 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 829 929 830 m_acTVideoIOYuvReconFile[layerId].write( p PicCYuvRec,930 m_acTVideoIOYuvReconFile[layerId].write( pcPic->getPicYuvRec(), m_outputColourSpaceConvert, 831 931 conf.getWindowLeftOffset() * xScal + defDisp.getWindowLeftOffset(), 832 932 conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(), … … 834 934 conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset() ); 835 935 #else 836 m_acTVideoIOYuvReconFile[layerId].write( p PicCYuvRec,936 m_acTVideoIOYuvReconFile[layerId].write( pcPic->getPicYuvRec(), m_outputColourSpaceConvert, 837 937 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 838 938 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), … … 847 947 if ( m_pchReconFile ) 848 948 { 849 const Window &conf = pcPic->getConformanceWindow();949 const Window &conf = pcPic->getConformanceWindow(); 850 950 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 951 851 952 m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(), 852 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 853 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 854 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 855 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() ); 953 m_outputColourSpaceConvert, 954 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 955 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 956 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 957 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() ); 856 958 } 857 959 … … 921 1023 const Window &conf = pcPicTop->getConformanceWindow(); 922 1024 const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window(); 923 const Bool isTff = pcPicTop->isTopField(); 924 TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec(); 925 TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec(); 1025 const Bool isTff = pcPicTop->isTopField(); 926 1026 #if REPN_FORMAT_IN_VPS 927 1027 UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc(); 928 1028 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 929 1029 930 m_acTVideoIOYuvReconFile[layerId].write( p PicCYuvRecTop, pPicCYuvRecBot,1030 m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), m_outputColourSpaceConvert, 931 1031 conf.getWindowLeftOffset() *xScal + defDisp.getWindowLeftOffset(), 932 1032 conf.getWindowRightOffset() *xScal + defDisp.getWindowRightOffset(), 933 1033 conf.getWindowTopOffset() *yScal + defDisp.getWindowTopOffset(), 934 conf.getWindowBottomOffset()*yScal + defDisp.getWindowBottomOffset(), isTff );935 #else 936 m_acTVideoIOYuvReconFile[layerId].write( p PicCYuvRecTop, pPicCYuvRecBot,1034 conf.getWindowBottomOffset()*yScal + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff ); 1035 #else 1036 m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), m_outputColourSpaceConvert, 937 1037 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 938 1038 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 939 1039 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 940 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), isTff );1040 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff ); 941 1041 #endif 942 1042 } … … 950 1050 const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window(); 951 1051 const Bool isTff = pcPicTop->isTopField(); 952 TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec(); 953 TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec(); 954 m_cTVideoIOYuvReconFile.write( pPicCYuvRecTop, pPicCYuvRecBot, 955 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 956 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 957 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 958 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), isTff ); 1052 m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 1053 m_outputColourSpaceConvert, 1054 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 1055 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 1056 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 1057 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff ); 959 1058 } 960 1059 … … 1027 1126 { 1028 1127 const Window &conf = pcPic->getConformanceWindow(); 1029 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 1030 TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec(); 1128 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 1031 1129 #if REPN_FORMAT_IN_VPS 1032 1130 UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc(); 1033 1131 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 1034 1132 1035 m_acTVideoIOYuvReconFile[layerId].write( p PicCYuvRec,1133 m_acTVideoIOYuvReconFile[layerId].write( pcPic->getPicYuvRec(), m_outputColourSpaceConvert, 1036 1134 conf.getWindowLeftOffset() *xScal + defDisp.getWindowLeftOffset(), 1037 1135 conf.getWindowRightOffset() *xScal + defDisp.getWindowRightOffset(), … … 1039 1137 conf.getWindowBottomOffset()*yScal + defDisp.getWindowBottomOffset() ); 1040 1138 #else 1041 m_acTVideoIOYuvReconFile[layerId].write( p PicCYuvRec,1139 m_acTVideoIOYuvReconFile[layerId].write( pcPic->getPicYuvRec(), m_outputColourSpaceConvert, 1042 1140 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 1043 1141 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), … … 1052 1150 if ( m_pchReconFile ) 1053 1151 { 1054 const Window &conf = pcPic->getConformanceWindow();1152 const Window &conf = pcPic->getConformanceWindow(); 1055 1153 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 1056 TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec(); 1057 m_cTVideoIOYuvReconFile.write( pPicCYuvRec, 1058 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 1059 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 1060 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 1061 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() ); 1154 1155 m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(), 1156 m_outputColourSpaceConvert, 1157 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 1158 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 1159 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 1160 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() ); 1062 1161 } 1063 1162 … … 1143 1242 #endif 1144 1243 TComPicYuv* pPicCYuvRec = pic->getPicYuvRec(); 1145 m_acTVideoIOYuvReconFile[layerIdx].write( pPicCYuvRec, 1244 m_acTVideoIOYuvReconFile[layerIdx].write( pPicCYuvRec, m_outputColourSpaceConvert, 1146 1245 conf.getWindowLeftOffset() * xScal + defDisp.getWindowLeftOffset(), 1147 1246 conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(), … … 1149 1248 conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset() ); 1150 1249 } 1151 1152 1250 // update POC of display order 1153 1251 pocLastDisplay = pic->getPOC(); … … 1405 1503 #if CONFORMANCE_BITSTREAM_MODE 1406 1504 FILE *fptr; 1407 if( this->getConfModeFlag())1408 { 1409 if( this->getMetadataFileRefresh())1505 if( m_confModeFlag ) 1506 { 1507 if( m_metadataFileRefresh ) 1410 1508 { 1411 1509 fptr = fopen( this->getMetadataFileName().c_str(), "w" ); … … 1418 1516 } 1419 1517 this->setMetadataFileRefresh(false); 1420 UChar recon_digest[3][16]; 1421 calcMD5(*pic->getPicYuvRec(), recon_digest); 1422 fprintf(fptr, "%8d%9d MD5:%s\n", pic->getLayerId(), pic->getSlice(0)->getPOC(), digestToString(recon_digest, 16)); 1518 1519 TComDigest recon_digest; 1520 Int numChar = calcMD5(*pic->getPicYuvRec(), recon_digest); 1521 fprintf(fptr, "%8d%9d MD5:%s\n", pic->getLayerId(), pic->getSlice(0)->getPOC(), digestToString(recon_digest, numChar).c_str()); 1423 1522 fclose(fptr); 1424 1523 } 1425 1524 #endif 1426 1427 1525 1428 1526 listOfPocsInEachLayer[layerIdx].erase( it ); … … 1434 1532 } 1435 1533 #if !FIX_ALIGN_BUMPING 1436 #// Update sub-DPB status1534 // Update sub-DPB status 1437 1535 for( Int subDpbIdx = 0; subDpbIdx < dpbStatus.m_numSubDpbs; subDpbIdx++) 1438 1536 { … … 1440 1538 } 1441 1539 #endif 1442 dpbStatus.m_numAUsNotDisplayed--; 1540 dpbStatus.m_numAUsNotDisplayed--; 1443 1541 1444 1542 #if CONFORMANCE_BITSTREAM_MODE 1445 if( this->getConfModeFlag())1543 if( m_confModeFlag ) 1446 1544 { 1447 1545 for( Int dpbLayerCtr = 0; dpbLayerCtr < dpbStatus.m_numLayers; dpbLayerCtr++) … … 1453 1551 if( this->getDecodedYuvLayerRefresh(layerIdx) ) 1454 1552 { 1455 if (!m_outputBitDepth Y) { m_outputBitDepthY = g_bitDepthY; }1456 if (!m_outputBitDepth C) { m_outputBitDepthC = g_bitDepthC; }1553 if (!m_outputBitDepth[CHANNEL_TYPE_LUMA]) { m_outputBitDepth[CHANNEL_TYPE_LUMA] = g_bitDepth[CHANNEL_TYPE_LUMA]; } 1554 if (!m_outputBitDepth[CHANNEL_TYPE_CHROMA]) { m_outputBitDepth[CHANNEL_TYPE_CHROMA] = g_bitDepth[CHANNEL_TYPE_CHROMA]; } 1457 1555 1458 1556 char tempFileName[256]; 1459 1557 strcpy(tempFileName, this->getDecodedYuvLayerFileName( layerIdx ).c_str()); 1460 m_confReconFile[layerIdx].open(tempFileName, true, m_outputBitDepth Y, m_outputBitDepthC, g_bitDepthY, g_bitDepthC); // write mode1558 m_confReconFile[layerIdx].open(tempFileName, true, m_outputBitDepth, m_outputBitDepth, g_bitDepth ); // write mode 1461 1559 this->setDecodedYuvLayerRefresh( layerIdx, false ); 1462 1560 } … … 1468 1566 const Window &conf = checkPic.getConformanceWindow(); 1469 1567 const Window &defDisp = m_respectDefDispWindow ? checkPic.getDefDisplayWindow() : Window(); 1470 Int xScal = 1568 Int xScal = 1, yScal = 1; 1471 1569 #if REPN_FORMAT_IN_VPS 1472 1570 UInt chromaFormatIdc = checkPic.getSlice(0)->getChromaFormatIdc(); … … 1477 1575 { 1478 1576 TComPicYuv* pPicCYuvRec = checkPic.getPicYuvRec(); 1479 m_confReconFile[layerIdx].write( pPicCYuvRec, 1577 m_confReconFile[layerIdx].write( pPicCYuvRec, m_outputColourSpaceConvert, 1480 1578 conf.getWindowLeftOffset() * xScal + defDisp.getWindowLeftOffset(), 1481 1579 conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(), … … 1493 1591 } 1494 1592 #endif 1593 1495 1594 // Remove the picture from the listOfPocs 1496 1595 listOfPocs.erase( listOfPocs.begin() ); 1497 1596 } 1498 1499 1597 1500 1598 TComVPS *TAppDecTop::findDpbParametersFromVps(std::vector<Int> const &listOfPocs, std::vector<Int> const *listOfPocsInEachLayer, std::vector<Int> const *listOfPocsPositionInEachLayer, DpbStatus &maxDpbLimit) -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h
r953 r1029 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 6 * Copyright (c) 2010-2014, ITU/ISO/IEC … … 71 71 TVideoIOYuv m_cTVideoIOYuvReconFile; ///< reconstruction YUV class 72 72 #endif 73 #if CONFORMANCE_BITSTREAM_MODE 74 TVideoIOYuv m_confReconFile[63]; ///< decode YUV files 75 #endif 73 76 74 // for output control 77 75 #if SVC_EXTENSION 76 #if CONFORMANCE_BITSTREAM_MODE 77 TVideoIOYuv m_confReconFile[63]; ///< decode YUV files 78 #endif 78 79 Int m_aiPOCLastDisplay [MAX_LAYERS]; ///< last POC in display order 79 80 #else 80 81 Int m_iPOCLastDisplay; ///< last POC in display order 81 82 #endif 82 83 std::ofstream m_seiMessageFileStream; ///< Used for outputing SEI messages. 84 83 85 public: 84 86 TAppDecTop(); 85 87 virtual ~TAppDecTop() {} 86 88 87 89 Void create (); ///< create internal members 88 90 Void destroy (); ///< destroy internal members 89 91 Void decode (); ///< main decoding function 90 92 91 93 protected: 92 94 Void xCreateDecLib (); ///< create internal classes -
branches/SHM-dev/source/App/TAppDecoder/decmain.cpp
r595 r1029 44 44 //! \{ 45 45 46 bool g_md5_mismatch = false; ///< top level flag that indicates if there has been a decoding mismatch46 Bool g_md5_mismatch = false; ///< top level flag that indicates if there has been a decoding mismatch 47 47 48 48 // ==================================================================================================================== … … 59 59 fprintf( stdout, "SHM software: Decoder Version [%s]", NV_VERSION ); 60 60 #else 61 fprintf( stdout, "HM software: Decoder Version [%s] ", NV_VERSION );61 fprintf( stdout, "HM software: Decoder Version [%s] (including RExt)", NV_VERSION ); 62 62 #endif 63 63 fprintf( stdout, NVM_ONOS ); … … 77 77 78 78 // starting time 79 double dResult;80 longlBefore = clock();79 Double dResult; 80 clock_t lBefore = clock(); 81 81 82 82 // call decoding function … … 89 89 90 90 // ending time 91 dResult = ( double)(clock()-lBefore) / CLOCKS_PER_SEC;91 dResult = (Double)(clock()-lBefore) / CLOCKS_PER_SEC; 92 92 printf("\n Total Time: %12.3f sec.\n", dResult); 93 93
Note: See TracChangeset for help on using the changeset viewer.