Changeset 42 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 26 Mar 2012, 18:05:40 (13 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r5 r42 82 82 // ==================================================================================================================== 83 83 84 #if BITSTREAM_EXTRACTION 85 Void TDecCavlc::parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId ) 86 { 87 UInt uiCode; 88 89 xReadCode ( 1, uiCode ); assert( 0 == uiCode); // forbidden_zero_bit 90 xReadCode ( 1, uiCode ); // nal_ref_flag 91 xReadCode ( 6, uiCode ); // nal_unit_type 92 eNalUnitType = (NalUnitType) uiCode; 93 94 xReadCode(3, uiCode); // temporal_id 95 TemporalId = uiCode; 96 xReadCode(5, uiCode); // layer_id_plus1 97 assert( 1 <= uiCode ); 98 uiLayerId = uiCode - 1; 99 } 100 #else 84 101 Void TDecCavlc::parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ) 85 102 { … … 105 122 } 106 123 } 124 #endif 107 125 108 126 /** -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r5 r42 182 182 #endif 183 183 184 #if BITSTREAM_EXTRACTION 185 Void parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId ); 186 #else 184 187 Void parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ); 188 #endif 189 185 190 186 191 Void parseSPS ( TComSPS* pcSPS ); -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r5 r42 67 67 virtual Void setBitstream ( TComBitstream* p ) = 0; 68 68 69 #if BITSTREAM_EXTRACTION 70 virtual Void parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId ) = 0; 71 #else 69 72 virtual Void parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ) = 0; 73 #endif 70 74 71 75 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; … … 147 151 Void resetEntropy ( TComSlice* p) { m_pcEntropyDecoderIf->resetEntropy(p); } 148 152 153 #if BITSTREAM_EXTRACTION 154 Void decodeNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId ) 155 { m_pcEntropyDecoderIf->parseNalUnitHeader( eNalUnitType, TemporalId, uiLayerId ); } 156 #else 149 157 Void decodeNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ) 150 158 { m_pcEntropyDecoderIf->parseNalUnitHeader(eNalUnitType, TemporalId, bOutputFlag ); } 151 159 #endif 152 160 153 161 Void decodeSPS ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); } -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r5 r42 75 75 Void setMaxAlfCtrlDepth ( UInt uiMaxAlfCtrlDepth ) { m_uiMaxAlfCtrlDepth = uiMaxAlfCtrlDepth; } 76 76 77 #if BITSTREAM_EXTRACTION 78 Void parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId ) {} 79 #else 77 80 Void parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ) {} 81 #endif 78 82 79 83 Void parseSPS ( TComSPS* pcSPS ) {} -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r21 r42 513 513 514 514 #if DCM_SKIP_DECODING_FRAMES 515 #if FLEX_CODING_ORDER 516 Bool TDecTop::decode (Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS, Int& iSkipFrame, Int& iPOCLastDisplay, Bool& bNewPictureType) 517 #else 515 518 Bool TDecTop::decode (Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS, Int& iSkipFrame, Int& iPOCLastDisplay) 519 520 #endif 516 521 #else 517 522 Void TDecTop::decode (Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS ) … … 530 535 NalUnitType eNalUnitType; 531 536 UInt TemporalId; 537 538 #if BITSTREAM_EXTRACTION 539 UInt uiLayerId; 540 541 m_cEntropyDecoder.decodeNalUnitHeader(eNalUnitType, TemporalId, uiLayerId); 542 #else 532 543 Bool OutputFlag; 533 544 534 545 m_cEntropyDecoder.decodeNalUnitHeader(eNalUnitType, TemporalId, OutputFlag); 546 #endif 547 535 548 reNalUnitType = eNalUnitType; 536 549 … … 541 554 TComSPS cTempSPS; 542 555 m_cEntropyDecoder.decodeSPS( &cTempSPS ); 556 #if FLEX_CODING_ORDER 557 m_cNewSPS = cTempSPS; 558 #endif 543 559 544 560 if( (m_iViewIdx == cTempSPS.getViewId()) && ( m_bIsDepth == cTempSPS.isDepth() ) ) … … 615 631 { 616 632 m_uiPrevPOC = m_apcSlicePilot->getPOC(); 633 #if FLEX_CODING_ORDER 634 bNewPictureType = m_cNewSPS.isDepth(); 635 #endif 617 636 return true; 618 637 } … … 697 716 std::vector<TComPic*> apcSpatRefPics = getDecTop()->getSpatialRefPics( pcPic->getViewIdx(), pcSlice->getPOC(), m_cSPS.isDepth() ); 698 717 TComPic * const pcTexturePic = m_cSPS.isDepth() ? getDecTop()->getPicFromView( pcPic->getViewIdx(), pcSlice->getPOC(), false ) : NULL; 718 719 #if FLEX_CODING_ORDER 720 if (pcTexturePic != NULL) 721 { 722 assert( ! m_cSPS.isDepth() || pcTexturePic != NULL ); 723 pcSlice->setTexturePic( pcTexturePic ); 724 } 725 #else 699 726 assert( ! m_cSPS.isDepth() || pcTexturePic != NULL ); 700 727 pcSlice->setTexturePic( pcTexturePic ); 701 728 pcSlice->setViewIdx( pcPic->getViewIdx() ); 729 #endif 702 730 #if SONY_COLPIC_AVAILABILITY 703 731 pcSlice->setViewOrderIdx( pcPic->getViewOrderIdx() ); -
trunk/source/Lib/TLibDecoder/TDecTop.h
r21 r42 111 111 TComList<TComPic*> m_cListPic; // Dynamic buffer 112 112 TComSPS m_cSPS; 113 #if FLEX_CODING_ORDER 114 TComSPS m_cNewSPS; 115 #endif 113 116 TComPPS m_cPPS; 114 117 TComSlice* m_apcSlicePilot; … … 167 170 Void init( TAppDecTop* pcTAppDecTop, Bool bFirstInstance = true ); 168 171 #if DCM_SKIP_DECODING_FRAMES 172 #if FLEX_CODING_ORDER 173 Bool decode (Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS, Int& iSkipFrame, Int& iPOCLastDisplay, Bool& bNewPictureType); 174 #else 169 175 Bool decode (Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS, Int& iSkipFrame, Int& iPOCLastDisplay); 176 177 #endif 170 178 #else 171 179 Void decode ( Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS );
Note: See TracChangeset for help on using the changeset viewer.