Changeset 40 in 3DVCSoftware


Ignore:
Timestamp:
25 Mar 2012, 13:04:30 (12 years ago)
Author:
ericsson
Message:

Ericsson integration: integrated bitstream extractor; implemented NALu header according to HEVC CD, using reserved_one_5bit as layer_id_plus1

Location:
branches/0.3-ericsson
Files:
21 added
25 edited

Legend:

Unmodified
Added
Removed
  • branches/0.3-ericsson/build/HM_vc10.sln

    r2 r40  
    55EndProject
    66Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppEncoder", "vc10\TAppEncoder_vc10.vcxproj", "{D759E4E1-D33A-4483-B57B-0FD248E022FE}"
    7         ProjectSection(ProjectDependencies) = postProject
    8                 {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4} = {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}
    9         EndProjectSection
    107EndProject
    118Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppCommon", "vc10\TAppCommon_vc10.vcxproj", "{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}"
     
    2017EndProject
    2118Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppRenderer", "vc10\TAppRenderer_vc10.vcxproj", "{3A5A8B26-8CA4-4690-944E-AB78559DE848}"
    22         ProjectSection(ProjectDependencies) = postProject
    23                 {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4} = {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}
    24         EndProjectSection
    2519EndProject
    2620Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibRenderer", "vc10\TLibRenderer_vc10.vcxproj", "{2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}"
     21EndProject
     22Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibExtractor", "vc10\TLibExtractor_vc10.vcxproj", "{27E2C758-E3CE-44CA-A226-83491EC7F798}"
     23EndProject
     24Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppExtractor", "vc10\TAppExtractor_vc10.vcxproj", "{F46F95E9-7174-4328-90DD-092450E4DCF6}"
    2725EndProject
    2826Global
     
    106104                {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}.Release|x64.ActiveCfg = Release|x64
    107105                {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}.Release|x64.Build.0 = Release|x64
     106                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.ActiveCfg = Debug|Win32
     107                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.Build.0 = Debug|Win32
     108                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|x64.ActiveCfg = Debug|Win32
     109                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.ActiveCfg = Release|Win32
     110                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.Build.0 = Release|Win32
     111                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|x64.ActiveCfg = Release|Win32
     112                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.ActiveCfg = Debug|Win32
     113                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.Build.0 = Debug|Win32
     114                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|x64.ActiveCfg = Debug|Win32
     115                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.ActiveCfg = Release|Win32
     116                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.Build.0 = Release|Win32
     117                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.ActiveCfg = Release|Win32
    108118        EndGlobalSection
    109119        GlobalSection(SolutionProperties) = preSolution
  • branches/0.3-ericsson/build/HM_vc8.sln

    r2 r40  
    3838EndProject
    3939Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibRenderer", "vc8\TLibRenderer_vc8.vcproj", "{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}"
     40EndProject
     41Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibExtractor", "vc8\TLibExtractor_vc8.vcproj", "{27E2C758-E3CE-44CA-A226-83491EC7F798}"
     42EndProject
     43Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppExtractor", "vc8\TAppExtractor_vc8.vcproj", "{F46F95E9-7174-4328-90DD-092450E4DCF6}"
     44        ProjectSection(ProjectDependencies) = postProject
     45                {F8B77A48-AF6C-4746-A89F-B706ABA6AD94} = {F8B77A48-AF6C-4746-A89F-B706ABA6AD94}
     46                {27E2C758-E3CE-44CA-A226-83491EC7F798} = {27E2C758-E3CE-44CA-A226-83491EC7F798}
     47                {5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
     48                {78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
     49                {8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684}
     50        EndProjectSection
    4051EndProject
    4152Global
     
    119130                {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Release|x64.ActiveCfg = Release|x64
    120131                {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Release|x64.Build.0 = Release|x64
     132                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.ActiveCfg = Debug|Win32
     133                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.Build.0 = Debug|Win32
     134                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|x64.ActiveCfg = Debug|Win32
     135                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.ActiveCfg = Release|Win32
     136                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.Build.0 = Release|Win32
     137                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|x64.ActiveCfg = Release|Win32
     138                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.ActiveCfg = Debug|Win32
     139                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.Build.0 = Debug|Win32
     140                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|x64.ActiveCfg = Debug|Win32
     141                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.ActiveCfg = Release|Win32
     142                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.Build.0 = Release|Win32
     143                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.ActiveCfg = Release|Win32
    121144        EndGlobalSection
    122145        GlobalSection(SolutionProperties) = preSolution
  • branches/0.3-ericsson/build/HM_vc9.sln

    r2 r40  
    3838EndProject
    3939Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibRenderer", "vc9\TLibRenderer_vc9.vcproj", "{457993C6-AE2C-4B9B-B5F9-71033279A0B9}"
     40EndProject
     41Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibExtractor", "vc9\TLibExtractor_vc9.vcproj", "{27E2C758-E3CE-44CA-A226-83491EC7F798}"
     42EndProject
     43Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppExtractor", "vc9\TAppExtractor_vc9.vcproj", "{F46F95E9-7174-4328-90DD-092450E4DCF6}"
     44        ProjectSection(ProjectDependencies) = postProject
     45                {F8B77A48-AF6C-4746-A89F-B706ABA6AD94} = {F8B77A48-AF6C-4746-A89F-B706ABA6AD94}
     46                {27E2C758-E3CE-44CA-A226-83491EC7F798} = {27E2C758-E3CE-44CA-A226-83491EC7F798}
     47                {5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
     48                {78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
     49                {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} = {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}
     50        EndProjectSection
    4051EndProject
    4152Global
     
    119130                {457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Release|x64.ActiveCfg = Release|x64
    120131                {457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Release|x64.Build.0 = Release|x64
     132                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.ActiveCfg = Debug|Win32
     133                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.Build.0 = Debug|Win32
     134                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|x64.ActiveCfg = Debug|Win32
     135                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.ActiveCfg = Release|Win32
     136                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.Build.0 = Release|Win32
     137                {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|x64.ActiveCfg = Release|Win32
     138                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.ActiveCfg = Debug|Win32
     139                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.Build.0 = Debug|Win32
     140                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|x64.ActiveCfg = Debug|Win32
     141                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.ActiveCfg = Release|Win32
     142                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.Build.0 = Release|Win32
     143                {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.ActiveCfg = Release|Win32
    121144        EndGlobalSection
    122145        GlobalSection(SolutionProperties) = preSolution
  • branches/0.3-ericsson/build/linux/makefile

    r2 r40  
    88        $(MAKE) -C lib/TLibCommon       MM32=$(M32)
    99        $(MAKE) -C lib/TLibRenderer  MM32=$(M32)
     10        $(MAKE) -C lib/TLibExtractor  MM32=$(M32)
    1011        $(MAKE) -C lib/TLibDecoder      MM32=$(M32)
    1112        $(MAKE) -C lib/TLibEncoder      MM32=$(M32)
     
    1415        $(MAKE) -C test/TAppEncoder MM32=$(M32)
    1516        $(MAKE) -C test/TAppRenderer MM32=$(M32)
     17        $(MAKE) -C test/TAppExtractor MM32=$(M32)
    1618
    1719debug:
     
    1921        $(MAKE) -C lib/TLibCommon       debug   MM32=$(M32)
    2022        $(MAKE) -C lib/TLibRenderer  debug      MM32=$(M32)
     23        $(MAKE) -C lib/TLibExtractor  debug     MM32=$(M32)
    2124        $(MAKE) -C lib/TLibDecoder      debug   MM32=$(M32)
    2225        $(MAKE) -C lib/TLibEncoder      debug   MM32=$(M32)
     
    2528        $(MAKE) -C test/TAppEncoder debug MM32=$(M32)
    2629        $(MAKE) -C test/TAppRenderer debug MM32=$(M32)
     30        $(MAKE) -C test/TAppExtractor debug MM32=$(M32)
    2731
    2832release:
     
    3034        $(MAKE) -C lib/TLibCommon       release MM32=$(M32)
    3135        $(MAKE) -C lib/TLibRenderer  release MM32=$(M32)
     36        $(MAKE) -C lib/TLibExtractor  release MM32=$(M32)
    3237        $(MAKE) -C lib/TLibDecoder      release MM32=$(M32)
    3338        $(MAKE) -C lib/TLibEncoder      release MM32=$(M32)
     
    3641        $(MAKE) -C test/TAppEncoder release MM32=$(M32)
    3742        $(MAKE) -C test/TAppRenderer release MM32=$(M32)
     43        $(MAKE) -C test/TAppExtractor release MM32=$(M32)
    3844
    3945clean:
     
    4147        $(MAKE) -C lib/TLibCommon       clean MM32=$(M32)
    4248        $(MAKE) -C lib/TLibRenderer  clean MM32=$(M32)
     49        $(MAKE) -C lib/TLibExtractor  clean MM32=$(M32)
    4350        $(MAKE) -C lib/TLibDecoder      clean MM32=$(M32)
    4451        $(MAKE) -C lib/TLibEncoder      clean MM32=$(M32)
     
    4754        $(MAKE) -C test/TAppEncoder clean MM32=$(M32)
    4855        $(MAKE) -C test/TAppRenderer clean MM32=$(M32)
    49        
    50        
     56        $(MAKE) -C test/TAppExtractor clean MM32=$(M32)
  • branches/0.3-ericsson/source/App/TAppEncoder/TAppEncTop.cpp

    r34 r40  
    145145#endif
    146146
     147#if BITSTREAM_EXTRACTION
     148    m_acTEncTopList[iViewIdx]->setLayerId                      ( ( (UInt)iViewIdx ) << 1 );
     149#endif
    147150    m_acTEncTopList[iViewIdx]->setViewId                       ( (UInt)iViewIdx );
    148151    m_acTEncTopList[iViewIdx]->setViewOrderIdx                 ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] );
     
    337340#endif
    338341
     342#if BITSTREAM_EXTRACTION
     343      m_acTEncDepthTopList[iViewIdx]->setLayerId                      ( ( ( (UInt)iViewIdx ) << 1 ) + 1 );
     344#endif
    339345      m_acTEncDepthTopList[iViewIdx]->setViewId                       ( (UInt)iViewIdx );
    340346      m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx                 ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] );
  • branches/0.3-ericsson/source/Lib/TLibCommon/SEI.h

    r5 r40  
    4141class SEI
    4242{
     43#if BITSTREAM_EXTRACTION
     44protected:
     45  UInt m_uiLayerId;
     46#endif
     47
    4348public:
    4449  enum PayloadType {
     
    5156 
    5257  virtual PayloadType payloadType() const = 0;
     58
     59#if BITSTREAM_EXTRACTION
     60  Void      setLayerId              ( UInt u )       { m_uiLayerId = u; }
     61  UInt      getLayerId              ()         const { return m_uiLayerId; }
     62#endif
    5363};
    5464
  • branches/0.3-ericsson/source/Lib/TLibCommon/TComBitStream.cpp

    r5 r40  
    6161  m_auiSliceByteLocation = NULL;
    6262  m_uiSliceCount         = 0;
     63#if BITSTREAM_EXTRACTION
     64  m_apulPacketPayloadBuffer = new UInt[uiSize];
     65  m_uiPacketPayloadSize = 0;
     66#endif 
    6367}
    6468
     
    6670{
    6771  delete [] m_apulStreamPacketBegin;     m_apulStreamPacketBegin = NULL;
     72#if BITSTREAM_EXTRACTION
     73  delete [] m_apulPacketPayloadBuffer;   m_apulPacketPayloadBuffer = NULL;
     74#endif
    6875}
    6976
     
    148155  xReadNextWord();
    149156}
     157
     158#if BITSTREAM_EXTRACTION
     159UInt TComBitstream::reinitParsing()
     160{
     161  rewindStreamPacket();
     162  memcpy( m_apulStreamPacketBegin, m_apulPacketPayloadBuffer, m_uiPacketPayloadSize );
     163  initParsing( m_uiPacketPayloadSize );
     164  return m_uiPacketPayloadSize;
     165}
     166#endif
    150167
    151168#if LCEC_INTRA_MODE || QC_LCEC_INTER_MODE
     
    319336  UChar* pucWrite      = reinterpret_cast<UChar*> (getBuffer());
    320337 
     338#if BITSTREAM_EXTRACTION
     339  memcpy( m_apulPacketPayloadBuffer, m_apulStreamPacketBegin, uiBytesRead );
     340  m_uiPacketPayloadSize = uiBytesRead;
     341#endif
     342
    321343  for( ; uiReadOffset < uiBytesRead; uiReadOffset++ )
    322344  {
  • branches/0.3-ericsson/source/Lib/TLibCommon/TComBitStream.h

    r5 r40  
    8585  UInt        m_uiSliceProcessed;
    8686
     87#if BITSTREAM_EXTRACTION
     88  UInt*       m_apulPacketPayloadBuffer;
     89  UInt        m_uiPacketPayloadSize;
     90#endif 
     91
    8792  UInt xSwap ( UInt ui )
    8893  {
     
    164169
    165170  void insertAt(const TComBitstream& src, unsigned pos);
     171
     172#if BITSTREAM_EXTRACTION
     173  UInt        reinitParsing();
     174#endif 
    166175};
    167176
  • branches/0.3-ericsson/source/Lib/TLibCommon/TComSlice.cpp

    r34 r40  
    6666  m_iViewIdx = 0 ;
    6767
     68#if BITSTREAM_EXTRACTION
     69  m_uiLayerId = 0;
     70#endif
     71
    6872#if SONY_COLPIC_AVAILABILITY
    6973  m_iViewOrderIdx = 0;
     
    659663  m_bUseMVI = false;
    660664#endif
    661  
     665
     666#if BITSTREAM_EXTRACTION
     667  m_uiLayerId             = 0;
     668#endif
    662669  m_uiViewId              = 0;
    663670  m_iViewOrderIdx         = 0;
     
    698705TComPPS::TComPPS()
    699706{
     707#if BITSTREAM_EXTRACTION
     708  m_uiLayerId             = 0;
     709#endif
    700710#if CONSTRAINED_INTRA_PRED
    701711  m_bConstrainedIntraPred = false;
  • branches/0.3-ericsson/source/Lib/TLibCommon/TComSlice.h

    r34 r40  
    7676  UInt        m_uiMaxTrDepth;
    7777
     78#if BITSTREAM_EXTRACTION
     79  UInt        m_uiLayerId;
     80#endif
    7881  UInt        m_uiViewId;
    7982  Int         m_iViewOrderIdx;
     
    311314  TComResidualGenerator*  getResidualGenerator()                                              { return m_pcResidualGenerator; }
    312315#endif
     316
     317#if BITSTREAM_EXTRACTION
     318  Void      setLayerId              ( UInt u ) { m_uiLayerId = u; }
     319  UInt      getLayerId              ()         { return m_uiLayerId; }
     320#endif
    313321};
    314322
     
    326334  UInt        m_uiPPSId;
    327335  UInt        m_uiSPSId;
     336#if BITSTREAM_EXTRACTION
     337  UInt        m_uiLayerId;
     338#endif
    328339
    329340public:
     
    346357  Void setUseWP                     ( Bool b )  { m_bUseWeightPred = b;       }
    347358  Void setWPBiPredIdc               ( UInt u )  { m_uiBiPredIdc = u;          }
     359#endif
     360
     361#if BITSTREAM_EXTRACTION
     362  Void      setLayerId              ( UInt u ) { m_uiLayerId = u; }
     363  UInt      getLayerId              ()         { return m_uiLayerId; }
    348364#endif
    349365};
     
    376392  UInt        m_uiPPSId;
    377393  Int         m_iPOC;
     394#if BITSTREAM_EXTRACTION
     395  UInt        m_uiLayerId;
     396#endif
    378397#if SONY_COLPIC_AVAILABILITY
    379398  Int         m_iViewOrderIdx;
     
    540559  Void      setLambda( Double d ) { m_dLambda = d; }
    541560  Double    getLambda() { return m_dLambda;        }
     561
     562#if BITSTREAM_EXTRACTION
     563  Void      setLayerId( UInt u )                        { m_uiLayerId = u; }
     564  UInt      getLayerId()                                { return m_uiLayerId; }
     565#endif
    542566
    543567  Void      setViewIdx(Int i)                           { m_iViewIdx = i; }
  • branches/0.3-ericsson/source/Lib/TLibCommon/TypeDef.h

    r34 r40  
    4040
    4141
     42#define BITSTREAM_EXTRACTION            1
     43
    4244#define FLEX_CODING_ORDER                                       1
    4345
  • branches/0.3-ericsson/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r5 r40  
    8282// ====================================================================================================================
    8383
     84#if BITSTREAM_EXTRACTION
     85Void  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
    84101Void  TDecCavlc::parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )
    85102{
     
    105122  }
    106123}
     124#endif
    107125
    108126/**
  • branches/0.3-ericsson/source/Lib/TLibDecoder/TDecCAVLC.h

    r5 r40  
    182182#endif
    183183 
     184#if BITSTREAM_EXTRACTION
     185  Void  parseNalUnitHeader  ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId );
     186#else
    184187  Void  parseNalUnitHeader  ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag );
     188#endif
     189
    185190 
    186191  Void  parseSPS            ( TComSPS* pcSPS );
  • branches/0.3-ericsson/source/Lib/TLibDecoder/TDecEntropy.h

    r5 r40  
    6767  virtual Void  setBitstream          ( TComBitstream* p )  = 0;
    6868
     69#if BITSTREAM_EXTRACTION
     70  virtual Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId )  = 0;
     71#else
    6972  virtual Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )  = 0;
     73#endif
    7074
    7175  virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
     
    147151  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
    148152
     153#if BITSTREAM_EXTRACTION
     154  Void    decodeNalUnitHeader         ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId )
     155                                                                { m_pcEntropyDecoderIf->parseNalUnitHeader( eNalUnitType, TemporalId, uiLayerId ); }
     156#else
    149157  Void    decodeNalUnitHeader         ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )
    150158                                                                { m_pcEntropyDecoderIf->parseNalUnitHeader(eNalUnitType, TemporalId, bOutputFlag ); }
    151 
     159#endif
    152160
    153161  Void    decodeSPS                   ( TComSPS* pcSPS     )    { m_pcEntropyDecoderIf->parseSPS(pcSPS);                    }
  • branches/0.3-ericsson/source/Lib/TLibDecoder/TDecSbac.h

    r5 r40  
    7575  Void  setMaxAlfCtrlDepth        ( UInt uiMaxAlfCtrlDepth ) { m_uiMaxAlfCtrlDepth = uiMaxAlfCtrlDepth; }
    7676 
     77#if BITSTREAM_EXTRACTION
     78  Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId ) {}
     79#else
    7780  Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ) {}
     81#endif
    7882 
    7983  Void  parseSPS                  ( TComSPS* pcSPS         ) {}
  • branches/0.3-ericsson/source/Lib/TLibDecoder/TDecTop.cpp

    r34 r40  
    535535  NalUnitType eNalUnitType;
    536536  UInt        TemporalId;
     537
     538#if BITSTREAM_EXTRACTION
     539  UInt        uiLayerId;
     540
     541  m_cEntropyDecoder.decodeNalUnitHeader(eNalUnitType, TemporalId, uiLayerId);
     542#else
    537543  Bool        OutputFlag;
    538544
    539545  m_cEntropyDecoder.decodeNalUnitHeader(eNalUnitType, TemporalId, OutputFlag);
     546#endif
     547
    540548  reNalUnitType = eNalUnitType;
    541549
  • branches/0.3-ericsson/source/Lib/TLibEncoder/TEncCavlc.cpp

    r5 r40  
    3939
    4040#include "TEncCavlc.h"
     41#include "../TLibCommon/SEI.h"
    4142#include "SEIwrite.h"
    4243
     
    228229void TEncCavlc::codeSEI(const SEI& sei)
    229230{
     231#if BITSTREAM_EXTRACTION
     232  codeNALUnitHeader( NAL_UNIT_SEI, NAL_REF_IDC_PRIORITY_LOWEST, 0, sei.getLayerId() );
     233#else
    230234  codeNALUnitHeader(NAL_UNIT_SEI, NAL_REF_IDC_PRIORITY_LOWEST);
     235#endif
    231236  writeSEImessage(*m_pcBitIf, sei);
    232237}
     
    235240{
    236241  // uiFirstByte
     242#if BITSTREAM_EXTRACTION
     243  codeNALUnitHeader( NAL_UNIT_PPS, NAL_REF_IDC_PRIORITY_HIGHEST, 0, pcPPS->getLayerId() );
     244#else
    237245  codeNALUnitHeader( NAL_UNIT_PPS, NAL_REF_IDC_PRIORITY_HIGHEST );
     246#endif
    238247
    239248  xWriteUvlc( pcPPS->getPPSId() );
     
    249258}
    250259
     260#if BITSTREAM_EXTRACTION
     261Void TEncCavlc::codeNALUnitHeader( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId, UInt uiLayerId )
     262{
     263  // uiFirstByte
     264  xWriteCode( 0, 1);                    // forbidden_zero_flag
     265  xWriteCode( eNalRefIdc==0 ? 0:1, 1);  // nal_ref_flag
     266  xWriteCode( eNalUnitType, 6);         // nal_unit_type
     267
     268  xWriteCode( TemporalId, 3);           // temporal_id
     269  xWriteCode( uiLayerId+1, 5);          // layer_id_plus1
     270}
     271#else
    251272Void TEncCavlc::codeNALUnitHeader( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId, Bool bOutputFlag )
    252273{
     
    263284  }
    264285}
     286#endif
    265287
    266288Void TEncCavlc::codeSPS( TComSPS* pcSPS )
    267289{
    268290  // uiFirstByte
     291#if BITSTREAM_EXTRACTION
     292  codeNALUnitHeader( NAL_UNIT_SPS, NAL_REF_IDC_PRIORITY_HIGHEST, 0, pcSPS->getLayerId() );
     293#else
    269294  codeNALUnitHeader( NAL_UNIT_SPS, NAL_REF_IDC_PRIORITY_HIGHEST );
     295#endif
    270296
    271297  // Structure
     
    385411  // here someone can add an appropriated NalRefIdc type
    386412#if DCM_DECODING_REFRESH
     413#if BITSTREAM_EXTRACTION
     414  codeNALUnitHeader (pcSlice->getNalUnitType(), NAL_REF_IDC_PRIORITY_HIGHEST, 1, pcSlice->getLayerId());
     415#else
    387416  codeNALUnitHeader (pcSlice->getNalUnitType(), NAL_REF_IDC_PRIORITY_HIGHEST, 1, true);
     417#endif
     418#else
     419#if BITSTREAM_EXTRACTION
     420  codeNALUnitHeader (NAL_UNIT_CODED_SLICE, NAL_REF_IDC_PRIORITY_HIGHEST, 0, pcSlice->getLayerId());
    388421#else
    389422  codeNALUnitHeader (NAL_UNIT_CODED_SLICE, NAL_REF_IDC_PRIORITY_HIGHEST);
     423#endif
    390424#endif
    391425
  • branches/0.3-ericsson/source/Lib/TLibEncoder/TEncCavlc.h

    r5 r40  
    206206  UInt  getCoeffCost          ()                { return  m_uiCoeffCost;  }
    207207 
     208#if BITSTREAM_EXTRACTION
     209  Void  codeNALUnitHeader       ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, UInt uiLayerId = 0 );
     210#else
    208211  Void  codeNALUnitHeader       ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, Bool bOutputFlag = true );
     212#endif
    209213 
    210214  Void  codeSPS                 ( TComSPS* pcSPS );
  • branches/0.3-ericsson/source/Lib/TLibEncoder/TEncCfg.h

    r34 r40  
    187187  //std::vector<int>  m_aiLayerQPOffset;
    188188
     189#if BITSTREAM_EXTRACTION
     190  UInt        m_uiLayerId;
     191#endif
    189192  UInt        m_uiViewId;
    190193  Int         m_iViewOrderIdx;
     
    238241  Void      setRateGOPSize                  ( Int   i )      { m_iRateGOPSize = i; }
    239242
     243#if BITSTREAM_EXTRACTION
     244  Void      setLayerId                      ( UInt  u )      { m_uiLayerId              = u; }
     245  UInt      getLayerId                      ( )              { return m_uiLayerId; }
     246#endif
    240247  Void      setViewId                       ( UInt  u )      { m_uiViewId               = u; }
    241248  Void      setViewOrderIdx                 ( Int   i )      { m_iViewOrderIdx          = i; }
  • branches/0.3-ericsson/source/Lib/TLibEncoder/TEncEntropy.h

    r5 r40  
    7272  virtual UInt  getCoeffCost          ()                = 0;
    7373 
     74#if BITSTREAM_EXTRACTION
     75  virtual Void  codeNALUnitHeader       ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, UInt uiLayerId = 0 ) = 0;
     76#else
    7477  virtual Void  codeNALUnitHeader       ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, Bool bOutputFlag = true ) = 0;
     78#endif
    7579
    7680  virtual Void  codeSPS                 ( TComSPS* pcSPS )                                      = 0;
  • branches/0.3-ericsson/source/Lib/TLibEncoder/TEncGOP.cpp

    r5 r40  
    639639        seiBs.create(1024);
    640640        /* write the SEI messages */
     641#if BITSTREAM_EXTRACTION
     642        sei_recon_picture_digest.setLayerId( pcSlice->getLayerId() );
     643#endif
    641644        m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);
    642645        m_pcEntropyCoder->setBitstream(&seiBs);
  • branches/0.3-ericsson/source/Lib/TLibEncoder/TEncSbac.cpp

    r34 r40  
    177177}
    178178
     179#if BITSTREAM_EXTRACTION
     180Void TEncSbac::codeNALUnitHeader( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId, UInt uiLayerId )
     181#else
    179182Void TEncSbac::codeNALUnitHeader( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId, Bool bOutputFlag )
     183#endif
    180184{
    181185  assert (0);
  • branches/0.3-ericsson/source/Lib/TLibEncoder/TEncSbac.h

    r5 r40  
    8989  //--SBAC RD
    9090 
     91#if BITSTREAM_EXTRACTION
     92  Void  codeNALUnitHeader       ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, UInt uiLayerId = 0 );
     93#else
    9194  Void  codeNALUnitHeader       ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, Bool bOutputFlag = true );
     95#endif
    9296
    9397  Void  codeSPS                 ( TComSPS* pcSPS     );
  • branches/0.3-ericsson/source/Lib/TLibEncoder/TEncSlice.cpp

    r21 r40  
    149149  rpcSlice->initSlice();
    150150  rpcSlice->setPOC( pcPic->getPOC() );
     151#if BITSTREAM_EXTRACTION
     152  rpcSlice->setLayerId( m_pcCfg->getLayerId() );
     153#endif
    151154#if SONY_COLPIC_AVAILABILITY
    152155  rpcSlice->setViewOrderIdx(m_pcCfg->getViewOrderIdx());
  • branches/0.3-ericsson/source/Lib/TLibEncoder/TEncTop.cpp

    r34 r40  
    546546  m_cSPS.setMaxTrSize   ( 1 << m_uiQuadtreeTULog2MaxSize );
    547547
     548#if BITSTREAM_EXTRACTION
     549  m_cSPS.setLayerId( m_uiLayerId );
     550#endif
     551
    548552  if( m_bIsDepth )
    549553  {
     
    632636Void TEncTop::xInitPPS()
    633637{
     638#if BITSTREAM_EXTRACTION
     639  m_cPPS.setLayerId( m_uiLayerId );
     640#endif
     641
    634642  m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred );
    635643  m_cPPS.setPPSId( ( m_uiViewId << 1 ) + ( m_bIsDepth ? 1 : 0 ) );
Note: See TracChangeset for help on using the changeset viewer.