Changeset 670 in SHVCSoftware for branches/SHM-6-dev


Ignore:
Timestamp:
11 Apr 2014, 20:17:11 (11 years ago)
Author:
seregin
Message:

fix for the ticket #23, patch was provided by Danny Hong <danny@…>

Location:
branches/SHM-6-dev/source/Lib/TLibDecoder
Files:
2 edited

Legend:

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

    r665 r670  
    14691469  {
    14701470    // Read rep_format_structures
    1471     parseRepFormat( vps->getVpsRepFormat(i) );
     1471    parseRepFormat( vps->getVpsRepFormat(i), i > 0 ? vps->getVpsRepFormat(i-1) : 0 );
    14721472  }
    14731473
     
    15371537  {
    15381538    // Read rep_format_structures
    1539     parseRepFormat( vps->getVpsRepFormat(i) );
     1539    parseRepFormat( vps->getVpsRepFormat(i), i > 0 ? vps->getVpsRepFormat(i-1) : 0 );
    15401540  }
    15411541
     
    17051705#endif
    17061706#if REPN_FORMAT_IN_VPS
    1707 Void  TDecCavlc::parseRepFormat( RepFormat *repFormat )
     1707Void  TDecCavlc::parseRepFormat( RepFormat *repFormat, RepFormat *repFormatPrev )
    17081708{
    17091709  UInt uiCode;
     
    17131713  READ_FLAG( uiCode, "chroma_and_bit_depth_vps_present_flag" );    repFormat->setChromaAndBitDepthVpsPresentFlag( uiCode ? true : false );
    17141714
     1715  if( !repFormatPrev )
     1716  {
     1717    // The value of chroma_and_bit_depth_vps_present_flag of the first rep_format( ) syntax structure in the VPS shall be equal to 1
     1718    assert( repFormat->getChromaAndBitDepthVpsPresentFlag() );
     1719  }
     1720
    17151721  if( repFormat->getChromaAndBitDepthVpsPresentFlag() )
    17161722  {
     
    17291735    READ_CODE( 4, uiCode, "bit_depth_vps_luma_minus8" );           repFormat->setBitDepthVpsLuma  ( uiCode + 8 );
    17301736    READ_CODE( 4, uiCode, "bit_depth_vps_chroma_minus8" );         repFormat->setBitDepthVpsChroma( uiCode + 8 );
     1737  }
     1738  else if( repFormatPrev )
     1739  {
     1740    // chroma_and_bit_depth_vps_present_flag equal to 0 specifies that the syntax elements, chroma_format_vps_idc, separate_colour_plane_vps_flag, bit_depth_vps_luma_minus8, and
     1741    // bit_depth_vps_chroma_minus8 are not present and inferred from the previous rep_format( ) syntax structure in the VPS.
     1742
     1743    repFormat->setChromaFormatVpsIdc        ( repFormatPrev->getChromaFormatVpsIdc() );
     1744    repFormat->setSeparateColourPlaneVpsFlag( repFormatPrev->getSeparateColourPlaneVpsFlag() );
     1745    repFormat->setBitDepthVpsLuma           ( repFormatPrev->getBitDepthVpsLuma() );
     1746    repFormat->setBitDepthVpsChroma         ( repFormatPrev->getBitDepthVpsChroma() );
    17311747  }
    17321748#else
  • branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.h

    r644 r670  
    8181#endif
    8282#if REPN_FORMAT_IN_VPS
    83   Void  parseRepFormat      ( RepFormat *repFormat );
     83  Void  parseRepFormat      ( RepFormat *repFormat, RepFormat *repFormatPrev );
    8484#endif
    8585#if VPS_DPB_SIZE_TABLE
Note: See TracChangeset for help on using the changeset viewer.