Changeset 461 in SHVCSoftware for branches


Ignore:
Timestamp:
12 Nov 2013, 16:01:31 (11 years ago)
Author:
qualcomm
Message:

Calculation of VPS extension offset (MACRO: VPS_EXTN_OFFSET_CALC)

From: Adarsh K. Ramasubramonian <aramasub@…>

Location:
branches/SHM-4.0-dev/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r458 r461  
    11331133  vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false);
    11341134#endif
     1135#if !VPS_EXTN_OFFSET_CALC
    11351136#if VPS_EXTN_OFFSET
    11361137  // to be updated according to the current semantics
    11371138  vps->setExtensionOffset( 0xffff );
     1139#endif
    11381140#endif
    11391141#else //SVC_EXTENSION
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h

    r459 r461  
    9292
    9393#define VPS_EXTN_OFFSET                  1      ///< implementation of vps_extension_offset syntax element
     94#define VPS_EXTN_OFFSET_CALC             1      ///< Calculation of VPS extension offset
    9495#define SPS_PTL_FIX                      1      ///< remove profile_tier_level from enhancement layer SPS
    9596
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r458 r461  
    700700Void TEncCavlc::codeVPS( TComVPS* pcVPS )
    701701{
     702#if VPS_EXTN_OFFSET_CALC
     703  UInt numBytesInVps = this->m_pcBitIf->getNumberOfWrittenBits();
     704#endif
    702705  WRITE_CODE( pcVPS->getVPSId(),                    4,        "vps_video_parameter_set_id" );
    703706  WRITE_CODE( 3,                                    2,        "vps_reserved_three_2bits" );
     
    803806      WRITE_FLAG(1,                  "vps_extension_alignment_bit_equal_to_one");
    804807    }
     808#if VPS_EXTN_OFFSET_CALC
     809    Int vpsExntOffsetValueInBits = this->m_pcBitIf->getNumberOfWrittenBits() - numBytesInVps + 16; // 2 bytes for NUH
     810    assert( vpsExntOffsetValueInBits % 8 == 0 );
     811    pcVPS->setExtensionOffset( vpsExntOffsetValueInBits >> 3 );
     812#endif
    805813    codeVPSExtension(pcVPS);
    806814    WRITE_FLAG( 0,                     "vps_extension2_flag" );   // Flag value of 1 reserved
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r460 r461  
    16831683      OutputNALUnit nalu(NAL_UNIT_VPS);
    16841684#endif
     1685#if VPS_EXTN_OFFSET_CALC
     1686      OutputNALUnit tempNalu(NAL_UNIT_VPS, 0, 0        ); // The value of nuh_layer_id of VPS NAL unit shall be equal to 0.
     1687      m_pcEntropyCoder->setBitstream(&tempNalu.m_Bitstream);
     1688      m_pcEntropyCoder->encodeVPS(m_pcEncTop->getVPS());  // Use to calculate the VPS extension offset
     1689#endif
    16851690      m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
    16861691      m_pcEntropyCoder->encodeVPS(m_pcEncTop->getVPS());
Note: See TracChangeset for help on using the changeset viewer.