MCPcopy Create free account
hub / github.com/MPEGGroup/mpeg-pcc-tmc2 / decompressVideo

Function decompressVideo

source/app/PccAppDecoder/PccAppDecoder.cpp:278–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278int decompressVideo( PCCDecoderParameters& decoderParams,
279 const PCCMetricsParameters& metricsParams,
280 PCCConformanceParameters& conformanceParams,
281 StopwatchUserTime& clock ) {
282 PCCBitstream bitstream;
283 PCCBitstreamStat bitstreamStat;
284 PCCLogger logger;
285 logger.initilalize( removeFileExtension( decoderParams.compressedStreamPath_ ), false );
286#if defined( BITSTREAM_TRACE ) || defined( CONFORMANCE_TRACE )
287 bitstream.setLogger( logger );
288 bitstream.setTrace( true );
289#endif
290 if ( !bitstream.initialize( decoderParams.compressedStreamPath_ ) ) { return -1; }
291 bitstream.computeMD5();
292 bitstreamStat.setHeader( bitstream.size() );
293 size_t frameNumber = decoderParams.startFrameNumber_;
294 PCCMetrics metrics;
295 PCCChecksum checksum;
296 PCCConformance conformance;
297 metrics.setParameters( metricsParams );
298 checksum.setParameters( metricsParams );
299 if ( metricsParams.computeChecksum_ ) { checksum.read( decoderParams.compressedStreamPath_ ); }
300 PCCDecoder decoder;
301 decoder.setLogger( logger );
302 decoder.setParameters( decoderParams );
303
304 SampleStreamV3CUnit ssvu;
305 size_t headerSize = pcc::PCCBitstreamReader::read( bitstream, ssvu );
306 bitstreamStat.incrHeader( headerSize );
307 bool bMoreData = true;
308 while ( bMoreData ) {
309 PCCGroupOfFrames reconstructs;
310 PCCContext context;
311 context.setBitstreamStat( bitstreamStat );
312 clock.start();
313 PCCBitstreamReader bitstreamReader;
314#ifdef BITSTREAM_TRACE
315 bitstreamReader.setLogger( logger );
316#endif
317 if ( bitstreamReader.decode( ssvu, context ) == 0 ) { return 0; }
318#if 1
319 if ( context.checkProfile() != 0 ) {
320 printf( "Profile not correct... \n" );
321 return 0;
322 }
323 decoderParams.setReconstructionParameters( context.getVps().getProfileTierLevel().getProfileReconstructionIdc() );
324 decoder.setReconstructionParameters( decoderParams );
325#endif
326
327 // allocate atlas structure
328 context.resizeAtlas( context.getVps().getAtlasCountMinus1() + 1 );
329 for ( uint32_t atlId = 0; atlId < context.getVps().getAtlasCountMinus1() + 1; atlId++ ) {
330 context.getAtlas( atlId ).allocateVideoFrames( context, 0 );
331 // first allocating the structures, frames will be added as the V3C
332 // units are being decoded ???
333 context.setAtlasIndex( atlId );
334 int retDecoding = decoder.decode( context, reconstructs, atlId );
335 clock.stop();

Callers 1

mainFunction · 0.85

Calls 15

removeFileExtensionFunction · 0.85
initilalizeMethod · 0.80
setTraceMethod · 0.80
incrHeaderMethod · 0.80
setBitstreamStatMethod · 0.80
checkProfileMethod · 0.80
resizeAtlasMethod · 0.80
getAtlasCountMinus1Method · 0.80
allocateVideoFramesMethod · 0.80
computeDecodedMethod · 0.80
getV3CUnitCountMethod · 0.80

Tested by

no test coverage detected