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


Ignore:
Timestamp:
7 Jul 2015, 02:05:04 (10 years ago)
Author:
seregin
Message:

macro cleanup: Q0195_REP_FORMAT_CLEANUP

File:
1 edited

Legend:

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

    r1119 r1121  
    16391639      {
    16401640        format = pcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : pcSlice->getVPS()->getVpsRepFormatIdx( pcSlice->getVPS()->getLayerIdxInVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc();
    1641 #if Q0195_REP_FORMAT_CLEANUP
    1642         assert( (sps->getUpdateRepFormatFlag()==false && pcSlice->getVPS()->getVpsNumRepFormats()==1) || pcSlice->getVPS()->getVpsNumRepFormats() > 1 ); //conformance check
    1643 #endif
     1641
     1642        // conformance check
     1643        assert( (sps->getUpdateRepFormatFlag()==false && pcSlice->getVPS()->getVpsNumRepFormats()==1) || pcSlice->getVPS()->getVpsNumRepFormats() > 1 );
    16441644      }
    16451645      if (format != CHROMA_400)
     
    32233223
    32243224#if REPN_FORMAT_IN_VPS
    3225 #if Q0195_REP_FORMAT_CLEANUP
    32263225  READ_UVLC( uiCode, "vps_num_rep_formats_minus1" );
    32273226  vps->setVpsNumRepFormats( uiCode + 1 );
     
    32713270    }
    32723271  }
    3273 #else
    3274   READ_FLAG( uiCode, "rep_format_idx_present_flag");
    3275   vps->setRepFormatIdxPresentFlag( uiCode ? true : false );
    3276 
    3277   if( vps->getRepFormatIdxPresentFlag() )
    3278   {
    3279 #if !VPS_EXTN_UEV_CODING
    3280     READ_CODE( 8, uiCode, "vps_num_rep_formats_minus1" );
    3281 #else
    3282     READ_UVLC( uiCode, "vps_num_rep_formats_minus1" );
    3283 #endif
    3284 
    3285     vps->setVpsNumRepFormats( uiCode + 1 );
    3286   }
    3287   else
    3288   {
    3289     // default assignment
    3290     assert (vps->getMaxLayers() <= 16);       // If max_layers_is more than 15, num_rep_formats has to be signaled
    3291     vps->setVpsNumRepFormats( vps->getMaxLayers() );
    3292   }
    3293 
    3294   // The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive.
    3295   assert( vps->getVpsNumRepFormats() > 0 && vps->getVpsNumRepFormats() <= 256 );
    3296 
    3297   for(i = 0; i < vps->getVpsNumRepFormats(); i++)
    3298   {
    3299     // Read rep_format_structures
    3300     parseRepFormat( vps->getVpsRepFormat(i), i > 0 ? vps->getVpsRepFormat(i-1) : 0 );
    3301   }
    3302 
    3303   // Default assignment for layer 0
    3304   vps->setVpsRepFormatIdx( 0, 0 );
    3305   if( vps->getRepFormatIdxPresentFlag() )
    3306   {
    3307     for(i = 1; i < vps->getMaxLayers(); i++)
    3308     {
    3309       if( vps->getVpsNumRepFormats() > 1 )
    3310       {
    3311 #if !VPS_EXTN_UEV_CODING
    3312         READ_CODE( 8, uiCode, "vps_rep_format_idx[i]" );
    3313 #else
    3314         Int numBits = 1;
    3315         while ((1 << numBits) < (vps->getVpsNumRepFormats()))
    3316         {
    3317           numBits++;
    3318         }
    3319         READ_CODE( numBits, uiCode, "vps_rep_format_idx[i]" );
    3320 #endif
    3321 
    3322         vps->setVpsRepFormatIdx( i, uiCode );
    3323       }
    3324       else
    3325       {
    3326         // default assignment - only one rep_format() structure
    3327         vps->setVpsRepFormatIdx( i, 0 );
    3328       }
    3329     }
    3330   }
    3331   else
    3332   {
    3333     // default assignment - each layer assigned each rep_format() structure in the order signaled
    3334     for(i = 1; i < vps->getMaxLayers(); i++)
    3335     {
    3336       vps->setVpsRepFormatIdx( i, i );
    3337     }
    3338   }
    3339 #endif
    3340 #endif
     3272#endif
     3273
    33413274  READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );
    33423275  vps->setMaxOneActiveRefLayerFlag(uiCode);
Note: See TracChangeset for help on using the changeset viewer.