Changeset 630 in SHVCSoftware for branches/SHM-5.1-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
15 Mar 2014, 06:28:53 (12 years ago)
Author:
qualcomm
Message:

JCTVC-P0041: Include signalling of POC related syntax elements (Macro: POC_RESET_IDC_SIGNALLING)

Signalling and parsing of POC-related syntax elements. Decoding process and encoder assignment to be included in a subsequent patch.

From: Adarsh K. Ramasubramonian <aramasub@…>

File:
1 edited

Legend:

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

    r629 r630  
    28622862  }
    28632863
     2864#if POC_RESET_IDC_SIGNALlING
     2865  Int sliceHederExtensionLength = 0;
     2866  if(pps->getSliceHeaderExtensionPresentFlag())
     2867  {
     2868    READ_UVLC( uiCode, "slice_header_extension_length"); sliceHederExtensionLength = uiCode;
     2869  }
     2870  else
     2871  {
     2872    sliceHederExtensionLength = 0;
     2873  }
     2874  UInt startBits = m_pcBitstream->getNumBitsRead();     // Start counter of # SH Extn bits
     2875  if( sliceHederExtensionLength > 0 )
     2876  {
     2877    if( rpcSlice->getPPS()->getPocResetInfoPresentFlag() )
     2878    {
     2879      READ_CODE( 2, uiCode,       "poc_reset_idc"); rpcSlice->setPocResetIdc(uiCode);
     2880    }
     2881    else
     2882    {
     2883      rpcSlice->setPocResetIdc( 0 );
     2884    }
     2885    if( rpcSlice->getPocResetIdc() > 0 )
     2886    {
     2887      READ_CODE(6, uiCode,      "poc_reset_period_id"); rpcSlice->setPocResetPeriodId(uiCode);
     2888    }
     2889    else
     2890    {
     2891     
     2892      rpcSlice->setPocResetPeriodId( 0 );
     2893    }
     2894
     2895    if (rpcSlice->getPocResetIdc() == 3)
     2896    {
     2897      READ_FLAG( uiCode,        "full_poc_reset_flag"); rpcSlice->setFullPocResetFlag((uiCode == 1) ? true : false);
     2898      READ_CODE(rpcSlice->getSPS()->getBitsForPOC(), uiCode,"poc_lsb_val"); rpcSlice->setPocLsbVal(uiCode);
     2899    }
     2900
     2901    // Derive the value of PocMsbValRequiredFlag
     2902    rpcSlice->setPocMsbValRequiredFlag( rpcSlice->getCraPicFlag() || rpcSlice->getBlaPicFlag()
     2903                                          /* || related to vps_poc_lsb_aligned_flag */
     2904                                          );
     2905
     2906    if( rpcSlice->getPocMsbValRequiredFlag() /* vps_poc_lsb_aligned_flag */ )
     2907    {
     2908      READ_FLAG( uiCode,    "poc_msb_val_present_flag"); rpcSlice->setPocMsbValPresentFlag( uiCode ? true : false );
     2909    }
     2910    else
     2911    {
     2912      if( rpcSlice->getPocMsbValRequiredFlag() )
     2913      {
     2914        rpcSlice->setPocMsbValPresentFlag( true );
     2915      }
     2916      else
     2917      {
     2918        rpcSlice->setPocMsbValPresentFlag( false );
     2919      }
     2920    }
     2921
     2922    Int maxPocLsb  = 1 << rpcSlice->getSPS()->getBitsForPOC();
     2923    if( rpcSlice->getPocMsbValPresentFlag() )
     2924    {
     2925      READ_UVLC( uiCode,    "poc_msb_val");             rpcSlice->setPocMsbVal( uiCode );
     2926      // Update POC of the slice based on this MSB val
     2927      Int pocLsb     = rpcSlice->getPOC() % maxPocLsb;
     2928      rpcSlice->setPOC((rpcSlice->getPocMsbVal() * maxPocLsb) + pocLsb);
     2929    }
     2930    else
     2931    {
     2932      rpcSlice->setPocMsbVal( rpcSlice->getPOC() / maxPocLsb );
     2933    }
     2934
     2935    // Read remaining bits in the slice header extension.
     2936    UInt endBits = m_pcBitstream->getNumBitsRead();
     2937    Int counter = (endBits - startBits) % 8;
     2938    if( counter )
     2939    {
     2940      counter = 8 - counter;
     2941    }
     2942
     2943    while( counter )
     2944    {
     2945      READ_FLAG( uiCode, "slice_segment_header_extension_reserved_bit" ); assert( uiCode == 1 );
     2946      counter--;
     2947    }
     2948  }
     2949#else
    28642950  if(pps->getSliceHeaderExtensionPresentFlag())
    28652951  {
     
    28712957    }
    28722958  }
     2959#endif
    28732960  m_pcBitstream->readByteAlignment();
    28742961
Note: See TracChangeset for help on using the changeset viewer.