Changeset 1351 in SHVCSoftware for branches/SHM-dev


Ignore:
Timestamp:
22 Jul 2015, 03:18:37 (9 years ago)
Author:
seregin
Message:

port rev 4429

Location:
branches/SHM-dev/source/Lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/SyntaxElementParser.cpp

    r1259 r1351  
    104104}
    105105
     106Void  xTraceAccessUnitDelimiter ()
     107{
     108  fprintf( g_hTrace, "=========== Access Unit Delimiter ===========\n");
     109}
     110
     111Void xTraceFillerData ()
     112{
     113  fprintf( g_hTrace, "=========== Filler Data ===========\n");
     114}
     115
    106116#if Q0096_OVERLAY_SEI
    107117Void  SyntaxElementParser::xReadStringTr        (UInt buSize, UChar *pValue, UInt& rLength, const Char *pSymbolName)
     
    223233  TComCodingStatistics::IncrementStatisticEP(pSymbolName, 1, Int(ruiCode));
    224234#endif
     235}
     236
     237Void SyntaxElementParser::xReadRbspTrailingBits()
     238{
     239  UInt bit;
     240  READ_FLAG( bit, "rbsp_stop_one_bit");
     241  assert (bit==1);
     242  Int cnt = 0;
     243  while (m_pcBitstream->getNumBitsUntilByteAligned())
     244  {
     245    READ_FLAG( bit, "rbsp_alignment_zero_bit");
     246    assert (bit==0);
     247    cnt++;
     248  }
     249  assert(cnt<8);
     250}
     251
     252Void AUDReader::parseAccessUnitDelimiter(TComInputBitstream* bs, UInt &picType)
     253{
     254  setBitstream(bs);
     255
     256#if ENC_DEC_TRACE
     257  xTraceAccessUnitDelimiter();
     258#endif
     259
     260  READ_CODE (3, picType, "pic_type");
     261  xReadRbspTrailingBits();
     262}
     263
     264Void FDReader::parseFillerData(TComInputBitstream* bs, UInt &fdSize)
     265{
     266  setBitstream(bs);
     267#if ENC_DEC_TRACE
     268  xTraceFillerData();
     269#endif
     270  UInt ffByte;
     271  fdSize = 0;
     272  while( m_pcBitstream->getNumBitsLeft() >8 )
     273  {
     274    READ_CODE (8, ffByte, "ff_byte");
     275    assert (ffByte==0xff);
     276    fdSize++;
     277  }
     278  xReadRbspTrailingBits();
    225279}
    226280
  • branches/SHM-dev/source/Lib/TLibDecoder/SyntaxElementParser.h

    r1259 r1351  
    126126  Void  setBitstream ( TComInputBitstream* p )   { m_pcBitstream = p; }
    127127  TComInputBitstream* getBitstream() { return m_pcBitstream; }
     128
     129protected:
     130  Void xReadRbspTrailingBits();
    128131};
     132
     133class AUDReader: public SyntaxElementParser
     134{
     135public:
     136  AUDReader() {};
     137  virtual ~AUDReader() {};
     138  Void parseAccessUnitDelimiter(TComInputBitstream* bs, UInt &picType);
     139};
     140
     141class FDReader: public SyntaxElementParser
     142{
     143public:
     144  FDReader() {};
     145  virtual ~FDReader() {};
     146  Void parseFillerData(TComInputBitstream* bs, UInt &fdSize);
     147};
     148
    129149
    130150//! \}
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1316 r1351  
    5252#if ENC_DEC_TRACE
    5353
    54 Void  xTraceSPSHeader (const TComSPS *pSPS)
    55 {
    56   fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() );
    57 }
    58 
    59 Void  xTracePPSHeader (const TComPPS *pPPS)
    60 {
    61   fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() );
    62 }
    63 
    64 Void  xTraceSliceHeader (const TComSlice *pSlice)
     54Void  xTraceVPSHeader ()
     55{
     56  fprintf( g_hTrace, "=========== Video Parameter Set     ===========\n" );
     57}
     58
     59Void  xTraceSPSHeader ()
     60{
     61  fprintf( g_hTrace, "=========== Sequence Parameter Set  ===========\n" );
     62}
     63
     64Void  xTracePPSHeader ()
     65{
     66  fprintf( g_hTrace, "=========== Picture Parameter Set  ===========\n");
     67}
     68
     69Void  xTraceSliceHeader ()
    6570{
    6671  fprintf( g_hTrace, "=========== Slice ===========\n");
     
    190195{
    191196#if ENC_DEC_TRACE
    192   xTracePPSHeader (pcPPS);
     197  xTracePPSHeader ();
    193198#endif
    194199  UInt  uiCode;
     
    678683{
    679684#if ENC_DEC_TRACE
    680   xTraceSPSHeader (pcSPS);
     685  xTraceSPSHeader ();
    681686#endif
    682687
     
    10251030Void TDecCavlc::parseVPS(TComVPS* pcVPS)
    10261031{
     1032#if ENC_DEC_TRACE
     1033  xTraceVPSHeader ();
     1034#endif
    10271035  UInt  uiCode;
    10281036
     
    11791187
    11801188#if ENC_DEC_TRACE
    1181   xTraceSliceHeader(pcSlice);
     1189  xTraceSliceHeader();
    11821190#endif
    11831191  TComPPS* pps = NULL;
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1321 r1351  
    20702070
    20712071    case NAL_UNIT_ACCESS_UNIT_DELIMITER:
    2072       // TODO: process AU delimiter
    2073       return false;
     2072      {
     2073        AUDReader audReader;
     2074        UInt picType;
     2075        audReader.parseAccessUnitDelimiter(&(nalu.getBitstream()),picType);
     2076        printf ("Note: found NAL_UNIT_ACCESS_UNIT_DELIMITER\n");
     2077        return false;
     2078      }
    20742079
    20752080    case NAL_UNIT_EOB:
     
    20842089
    20852090    case NAL_UNIT_FILLER_DATA:
    2086 #if SVC_EXTENSION
    2087       assert( m_isLastNALWasEos == false );
    2088 #endif
    2089       return false;
     2091      {
     2092        FDReader fdReader;
     2093        UInt size;
     2094        fdReader.parseFillerData(&(nalu.getBitstream()),size);
     2095        printf ("Note: found NAL_UNIT_FILLER_DATA with %u bytes payload.\n", size);
     2096#if SVC_EXTENSION
     2097        assert( m_isLastNALWasEos == false );
     2098#endif
     2099        return false;
     2100      }
    20902101
    20912102    case NAL_UNIT_RESERVED_VCL_N10:
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1316 r1351  
    4545#if ENC_DEC_TRACE
    4646
    47 Void  xTraceSPSHeader (const TComSPS *pSPS)
    48 {
    49   fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() );
    50 }
    51 
    52 Void  xTracePPSHeader (const TComPPS *pPPS)
    53 {
    54   fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() );
    55 }
    56 
    57 Void  xTraceSliceHeader (const TComSlice *pSlice)
     47Void  xTraceVPSHeader ()
     48{
     49  fprintf( g_hTrace, "=========== Video Parameter Set     ===========\n" );
     50}
     51
     52Void  xTraceSPSHeader ()
     53{
     54  fprintf( g_hTrace, "=========== Sequence Parameter Set  ===========\n" );
     55}
     56
     57Void  xTracePPSHeader ()
     58{
     59  fprintf( g_hTrace, "=========== Picture Parameter Set  ===========\n");
     60}
     61
     62Void  xTraceSliceHeader ()
    5863{
    5964  fprintf( g_hTrace, "=========== Slice ===========\n");
     
    151156{
    152157#if ENC_DEC_TRACE
    153   xTracePPSHeader (pcPPS);
     158  xTracePPSHeader ();
    154159#endif
    155160
     
    533538
    534539#if ENC_DEC_TRACE
    535   xTraceSPSHeader (pcSPS);
     540  xTraceSPSHeader ();
    536541#endif
    537542  WRITE_CODE( pcSPS->getVPSId (),          4,       "sps_video_parameter_set_id" );
     
    779784Void TEncCavlc::codeVPS( const TComVPS* pcVPS )
    780785{
     786#if ENC_DEC_TRACE
     787  xTraceVPSHeader();
     788#endif
    781789  WRITE_CODE( pcVPS->getVPSId(),                    4,        "vps_video_parameter_set_id" );
    782790#if SVC_EXTENSION
     
    892900{
    893901#if ENC_DEC_TRACE
    894   xTraceSliceHeader (pcSlice);
     902  xTraceSliceHeader ();
    895903#endif
    896904
Note: See TracChangeset for help on using the changeset viewer.