Changeset 46 in 3DVCSoftware for branches/0.3-poznan-univ/source
- Timestamp:
- 29 Mar 2012, 09:41:45 (13 years ago)
- Location:
- branches/0.3-poznan-univ/source/Lib
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.3-poznan-univ/source/Lib/TLibCommon/TComBitStream.cpp
r5 r46 61 61 m_auiSliceByteLocation = NULL; 62 62 m_uiSliceCount = 0; 63 #if BITSTREAM_EXTRACTION 64 m_apulPacketPayloadBuffer = new UInt[uiSize]; 65 m_uiPacketPayloadSize = 0; 66 #endif 63 67 } 64 68 … … 66 70 { 67 71 delete [] m_apulStreamPacketBegin; m_apulStreamPacketBegin = NULL; 72 #if BITSTREAM_EXTRACTION 73 delete [] m_apulPacketPayloadBuffer; m_apulPacketPayloadBuffer = NULL; 74 #endif 68 75 } 69 76 … … 148 155 xReadNextWord(); 149 156 } 157 158 #if BITSTREAM_EXTRACTION 159 UInt TComBitstream::reinitParsing() 160 { 161 rewindStreamPacket(); 162 memcpy( m_apulStreamPacketBegin, m_apulPacketPayloadBuffer, m_uiPacketPayloadSize ); 163 initParsing( m_uiPacketPayloadSize ); 164 return m_uiPacketPayloadSize; 165 } 166 #endif 150 167 151 168 #if LCEC_INTRA_MODE || QC_LCEC_INTER_MODE … … 319 336 UChar* pucWrite = reinterpret_cast<UChar*> (getBuffer()); 320 337 338 #if BITSTREAM_EXTRACTION 339 memcpy( m_apulPacketPayloadBuffer, m_apulStreamPacketBegin, uiBytesRead ); 340 m_uiPacketPayloadSize = uiBytesRead; 341 #endif 342 321 343 for( ; uiReadOffset < uiBytesRead; uiReadOffset++ ) 322 344 { -
branches/0.3-poznan-univ/source/Lib/TLibCommon/TComBitStream.h
r5 r46 85 85 UInt m_uiSliceProcessed; 86 86 87 #if BITSTREAM_EXTRACTION 88 UInt* m_apulPacketPayloadBuffer; 89 UInt m_uiPacketPayloadSize; 90 #endif 91 87 92 UInt xSwap ( UInt ui ) 88 93 { … … 164 169 165 170 void insertAt(const TComBitstream& src, unsigned pos); 171 172 #if BITSTREAM_EXTRACTION 173 UInt reinitParsing(); 174 #endif 166 175 }; 167 176 -
branches/0.3-poznan-univ/source/Lib/TLibCommon/TComSlice.cpp
r41 r46 66 66 m_iViewIdx = 0 ; 67 67 68 #if BITSTREAM_EXTRACTION 69 m_uiLayerId = 0; 70 #endif 71 68 72 #if SONY_COLPIC_AVAILABILITY 69 73 m_iViewOrderIdx = 0; … … 669 673 #endif 670 674 675 #if BITSTREAM_EXTRACTION 676 m_uiLayerId = 0; 677 #endif 671 678 m_uiViewId = 0; 672 679 m_iViewOrderIdx = 0; … … 716 723 TComPPS::TComPPS() 717 724 { 725 #if BITSTREAM_EXTRACTION 726 m_uiLayerId = 0; 727 #endif 718 728 #if CONSTRAINED_INTRA_PRED 719 729 m_bConstrainedIntraPred = false; -
branches/0.3-poznan-univ/source/Lib/TLibCommon/TComSlice.h
r41 r46 81 81 UInt m_uiMaxTrDepth; 82 82 83 #if BITSTREAM_EXTRACTION 84 UInt m_uiLayerId; 85 #endif 83 86 UInt m_uiViewId; 84 87 Int m_iViewOrderIdx; … … 370 373 Bool getUseTexDqpAccordingToDepth () {return m_bUseTexDqpAccordingToDepth;} 371 374 #endif 375 #if BITSTREAM_EXTRACTION 376 Void setLayerId ( UInt u ) { m_uiLayerId = u; } 377 UInt getLayerId () { return m_uiLayerId; } 378 #endif 372 379 }; 373 380 … … 385 392 UInt m_uiPPSId; 386 393 UInt m_uiSPSId; 394 #if BITSTREAM_EXTRACTION 395 UInt m_uiLayerId; 396 #endif 387 397 388 398 public: … … 405 415 Void setUseWP ( Bool b ) { m_bUseWeightPred = b; } 406 416 Void setWPBiPredIdc ( UInt u ) { m_uiBiPredIdc = u; } 417 #endif 418 419 #if BITSTREAM_EXTRACTION 420 Void setLayerId ( UInt u ) { m_uiLayerId = u; } 421 UInt getLayerId () { return m_uiLayerId; } 407 422 #endif 408 423 }; … … 435 450 UInt m_uiPPSId; 436 451 Int m_iPOC; 452 #if BITSTREAM_EXTRACTION 453 UInt m_uiLayerId; 454 #endif 437 455 #if SONY_COLPIC_AVAILABILITY 438 456 Int m_iViewOrderIdx; … … 608 626 Void setLambda( Double d ) { m_dLambda = d; } 609 627 Double getLambda() { return m_dLambda; } 628 629 #if BITSTREAM_EXTRACTION 630 Void setLayerId( UInt u ) { m_uiLayerId = u; } 631 UInt getLayerId() { return m_uiLayerId; } 632 #endif 610 633 611 634 Void setViewIdx(Int i) { m_iViewIdx = i; } -
branches/0.3-poznan-univ/source/Lib/TLibCommon/TypeDef.h
r41 r46 40 40 41 41 42 #define BITSTREAM_EXTRACTION 1 43 42 44 #define FLEX_CODING_ORDER 1 43 45 -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.cpp
r41 r46 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 /** -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.h
r28 r46 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 ); -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecEntropy.h
r5 r46 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); } -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecSbac.h
r28 r46 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 ) {} -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecTop.cpp
r41 r46 709 709 NalUnitType eNalUnitType; 710 710 UInt TemporalId; 711 712 #if BITSTREAM_EXTRACTION 713 UInt uiLayerId; 714 715 m_cEntropyDecoder.decodeNalUnitHeader(eNalUnitType, TemporalId, uiLayerId); 716 #else 711 717 Bool OutputFlag; 712 718 713 719 m_cEntropyDecoder.decodeNalUnitHeader(eNalUnitType, TemporalId, OutputFlag); 720 #endif 721 714 722 reNalUnitType = eNalUnitType; 715 723
Note: See TracChangeset for help on using the changeset viewer.