Changeset 1502 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
- Timestamp:
- 11 Dec 2015, 00:05:48 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1499 r1502 524 524 // it is needed where the VPS is accessed through the slice 525 525 pBLPic->getSlice(0)->setVPS( vps ); 526 pBLPic->getPicSym()->inferSpsForNonHEVCBL(); 527 pBLPic->getSlice(0)->setSPS( &pBLPic->getPicSym()->getSPS() ); 526 528 } 527 529 } … … 596 598 assert( vps->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma()); 597 599 } 600 601 updateSPS->inferSPS( m_layerId, vps ); 598 602 #endif //SVC_EXTENSION 599 603 … … 627 631 628 632 // Initialise the various objects for the new set of settings 629 #if SVC_EXTENSION630 m_cSAO.create( pSlice->getPicWidthInLumaSamples(), pSlice->getPicHeightInLumaSamples(), pSlice->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) );631 #else632 633 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) ); 633 #endif634 634 m_cLoopFilter.create( sps->getMaxTotalCUDepth() ); 635 #if SCALABLE_REXT636 m_cPrediction.initTempBuff(pSlice->getChromaFormatIdc());637 #else638 635 m_cPrediction.initTempBuff(sps->getChromaFormatIdc()); 639 #endif640 636 641 637 … … 692 688 693 689 // Recursive structure 694 #if SVC_EXTENSION 695 m_cCuDecoder.create ( sps->getMaxTotalCUDepth(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), pSlice->getChromaFormatIdc() ); 690 m_cCuDecoder.create ( sps->getMaxTotalCUDepth(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getChromaFormatIdc() ); 691 #if SVC_EXTENSION 696 692 m_cCuDecoder.init ( m_ppcTDecTop, &m_cEntropyDecoder, &m_cTrQuant, &m_cPrediction, m_layerId ); 697 693 #else 698 m_cCuDecoder.create ( sps->getMaxTotalCUDepth(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getChromaFormatIdc() );699 694 m_cCuDecoder.init ( &m_cEntropyDecoder, &m_cTrQuant, &m_cPrediction ); 700 695 #endif … … 1399 1394 if( pFile->good() ) 1400 1395 { 1401 Bool is16bit = pBLPic->getSlice(0)->get BitDepth(CHANNEL_TYPE_LUMA) > 8 || pBLPic->getSlice(0)->getBitDepth(CHANNEL_TYPE_CHROMA) > 8;1396 Bool is16bit = pBLPic->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) > 8 || pBLPic->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) > 8; 1402 1397 UInt uiWidth = pBLPic->getPicYuvRec()->getWidth(COMPONENT_Y); 1403 1398 UInt uiHeight = pBLPic->getPicYuvRec()->getHeight(COMPONENT_Y); … … 1701 1696 if( pcSlice->getPPS()->getCGSFlag() && m_c3DAsymLUTPPS.isRefLayer( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ) ) 1702 1697 { 1703 assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->get BitDepth(CHANNEL_TYPE_LUMA) == m_c3DAsymLUTPPS.getInputBitDepthY() );1704 assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->get BitDepth(CHANNEL_TYPE_CHROMA) == m_c3DAsymLUTPPS.getInputBitDepthC() );1705 assert( pcSlice->get BitDepth(CHANNEL_TYPE_LUMA) >= m_c3DAsymLUTPPS.getOutputBitDepthY() );1706 assert( pcSlice->get BitDepth(CHANNEL_TYPE_LUMA) >= m_c3DAsymLUTPPS.getOutputBitDepthC() );1698 assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) == m_c3DAsymLUTPPS.getInputBitDepthY() ); 1699 assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) == m_c3DAsymLUTPPS.getInputBitDepthC() ); 1700 assert( pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) >= m_c3DAsymLUTPPS.getOutputBitDepthY() ); 1701 assert( pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) >= m_c3DAsymLUTPPS.getOutputBitDepthC() ); 1707 1702 1708 1703 if( !m_pColorMappedPic ) … … 1721 1716 if( pcSlice->getVPS()->isSamplePredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), pcSlice->getVPS()->getLayerIdxInVps(refLayerId) ) ) 1722 1717 { 1723 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->get BitDepth(CHANNEL_TYPE_LUMA), pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0)->getBitDepth(CHANNEL_TYPE_CHROMA));1718 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)); 1724 1719 } 1725 1720 } … … 1896 1891 pcSlice->getSPS()->getMaxLog2TrDynamicRange(CHANNEL_TYPE_CHROMA) 1897 1892 }; 1898 #if SVC_EXTENSION1899 m_cTrQuant.setFlatScalingList(maxLog2TrDynamicRange, pcSlice->getBitDepths());1900 #else1901 1893 m_cTrQuant.setFlatScalingList(maxLog2TrDynamicRange, pcSlice->getSPS()->getBitDepths()); 1902 #endif1903 1894 m_cTrQuant.setUseScalingList(false); 1904 1895 } … … 2459 2450 { 2460 2451 m_pColorMappedPic = new TComPicYuv; 2461 m_pColorMappedPic->create( pcSlice->get PicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), pcSlice->getChromaFormatIdc()/*CHROMA_420*/, pcSlice->getSPS()->getMaxCUWidth(), pcSlice->getSPS()->getMaxCUHeight(), pcSlice->getSPS()->getMaxTotalCUDepth(), true, NULL );2452 m_pColorMappedPic->create( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), pcSlice->getSPS()->getChromaFormatIdc(), pcSlice->getSPS()->getMaxCUWidth(), pcSlice->getSPS()->getMaxCUHeight(), pcSlice->getSPS()->getMaxTotalCUDepth(), true, NULL ); 2462 2453 } 2463 2454 } … … 2614 2605 TComPicYuv* pcPicYuvRecBase = (*(pcTDecTopBase->getListPic()->begin()))->getPicYuvRec(); 2615 2606 2616 const Int bitDepthLuma = vps.getBitDepth(CHANNEL_TYPE_LUMA, &sps, m_layerId);2617 const Int bitDepthChroma = vps.getBitDepth(CHANNEL_TYPE_CHROMA, &sps, m_layerId);2618 const Int refBitDepthLuma = (*(pcTDecTopBase->getListPic()->begin()))->getSlice(0)->get BitDepth(CHANNEL_TYPE_LUMA);2619 const Int refBitDepthChroma = (*(pcTDecTopBase->getListPic()->begin()))->getSlice(0)->get BitDepth(CHANNEL_TYPE_CHROMA);2607 const Int bitDepthLuma = sps.getBitDepth(CHANNEL_TYPE_LUMA); 2608 const Int bitDepthChroma = sps.getBitDepth(CHANNEL_TYPE_CHROMA); 2609 const Int refBitDepthLuma = (*(pcTDecTopBase->getListPic()->begin()))->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 2610 const Int refBitDepthChroma = (*(pcTDecTopBase->getListPic()->begin()))->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA); 2620 2611 2621 2612 Bool sameBitDepths = ( bitDepthLuma == refBitDepthLuma ) && ( bitDepthChroma == refBitDepthChroma ); 2622 2613 2623 if( pcPicYuvRecBase->getWidth(COMPONENT_Y) == vps.getPicWidthInLumaSamples(&sps, m_layerId) && pcPicYuvRecBase->getHeight(COMPONENT_Y) == vps.getPicHeightInLumaSamples(&sps, m_layerId) && equalOffsets && zeroPhase )2614 if( pcPicYuvRecBase->getWidth(COMPONENT_Y) == sps.getPicWidthInLumaSamples() && pcPicYuvRecBase->getHeight(COMPONENT_Y) == sps.getPicHeightInLumaSamples() && equalOffsets && zeroPhase ) 2624 2615 { 2625 2616 pic->setEqualPictureSizeAndOffsetFlag( i, true );
Note: See TracChangeset for help on using the changeset viewer.