Changeset 663 in SHVCSoftware for branches/SHM-6-dev/source/App


Ignore:
Timestamp:
10 Apr 2014, 02:39:09 (11 years ago)
Author:
seregin
Message:

fix encoder setting for rep_format_idx_present_flag and add check for vps_num_rep_formats_minus1

File:
1 edited

Legend:

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

    r658 r663  
    9191  }
    9292
    93 #if REPN_FORMAT_IN_VPS
    94   vps->setRepFormatIdxPresentFlag( true );   // Could be disabled to optimize in some cases.
     93#if REPN_FORMAT_IN_VPS 
    9594  Int maxRepFormatIdx = -1;
    9695  Int formatIdx = -1;
     
    125124
    126125    assert( m_acLayerCfg[layer].getRepFormatIdx() != -1 && "RepFormatIdx not assigned for a layer" );
     126
    127127    vps->setVpsRepFormatIdx( layer, m_acLayerCfg[layer].getRepFormatIdx() );
     128
    128129    maxRepFormatIdx = std::max( m_acLayerCfg[layer].getRepFormatIdx(), maxRepFormatIdx );
    129130  }
     131
    130132  assert( vps->getVpsRepFormatIdx( 0 ) == 0 );  // Base layer should point to the first one.
     133
    131134  Int* mapIdxToLayer = new Int[maxRepFormatIdx + 1];
     135
    132136  // Check that all the indices from 0 to maxRepFormatIdx are used in the VPS
    133137  for(Int i = 0; i <= maxRepFormatIdx; i++)
     
    145149    assert( layer != m_numLayers );   // One of the VPS Rep format indices not set
    146150  }
     151
    147152  vps->setVpsNumRepFormats( maxRepFormatIdx + 1 );
     153
     154#if Q0195_REP_FORMAT_CLEANUP
     155  // When not present, the value of rep_format_idx_present_flag is inferred to be equal to 0
     156  vps->setRepFormatIdxPresentFlag( vps->getVpsNumRepFormats() > 1 ? true : false );
     157#else
     158  vps->setRepFormatIdxPresentFlag( true );
     159#endif
     160
    148161  for(UInt idx=0; idx < vps->getVpsNumRepFormats(); idx++)
    149162  {
Note: See TracChangeset for help on using the changeset viewer.