Changeset 1104 in SHVCSoftware


Ignore:
Timestamp:
6 Jul 2015, 20:36:06 (9 years ago)
Author:
seregin
Message:

macro cleanup: VPS_FIX_TO_MATCH_SPEC

Location:
branches/SHM-dev/source/Lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1103 r1104  
    255255#define R0157_RESTRICT_PPSID_FOR_CGS_LUT 1      ///< JCTVC-R0157: when pps_pic_parameter_set_id greater than or equal to 8, colour_mapping_enabled_flag shall be equal to 0
    256256
    257 #define VPS_FIX_TO_MATCH_SPEC            1
    258 
    259257/// scalability types
    260258enum ScalabilityType
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1102 r1104  
    30413041  for(i = 1; i < numOutputLayerSets; i++)
    30423042  {
    3043 #if VPS_FIX_TO_MATCH_SPEC
    30443043    if( vps->getNumLayerSets() > 2 && i >= vps->getNumLayerSets() )
    3045 #else
    3046     if( i > (vps->getNumLayerSets() - 1) )
    3047 #endif
    30483044    {
    30493045      Int numBits = 1;
     
    30603056    Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i);
    30613057#if Q0078_ADD_LAYER_SETS
    3062 #if VPS_FIX_TO_MATCH_SPEC
    30633058    if( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() == 2 )
    30643059#else
    3065     if( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() >= 2 )
    3066 #endif
    3067 #else
    3068 #if VPS_FIX_TO_MATCH_SPEC
    30693060    if( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() == 2 )
    3070 #else
    3071     if( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() >= 2 )
    3072 #endif
    30733061#endif
    30743062    {
     
    31133101    for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++)
    31143102    {
    3115 #if VPS_FIX_TO_MATCH_SPEC
    31163103      if( vps->getNecessaryLayerFlag(i, j) && (vps->getNumProfileTierLevel()-1) > 0 )
    3117 #else
    3118       if( vps->getNecessaryLayerFlag(i, j) )
    3119 #endif
    31203104      {
    31213105        READ_CODE( numBitsForPtlIdx, uiCode, "profile_tier_level_idx[i]" );
     
    33173301  if( vps->getRepFormatIdxPresentFlag() )
    33183302  {
    3319 #if VPS_FIX_TO_MATCH_SPEC
    33203303    for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ )
    3321 #else
    3322     for (i = 1; i < vps->getMaxLayers(); i++)
    3323 #endif
    33243304    {
    33253305      Int numBits = 1;
     
    34523432#endif
    34533433
    3454 #if VPS_FIX_TO_MATCH_SPEC
    34553434  for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ )
    3456 #else
    3457   for(i = 1; i < vps->getMaxLayers(); i++)
    3458 #endif
    3459   {
    3460 #if VPS_FIX_TO_MATCH_SPEC
     3435  {
    34613436    for( j = vps->getBaseLayerInternalFlag() ? 0 : 1; j < i; j++ )
    3462 #else
    3463     for(j = 0; j < i; j++)
    3464 #endif
    34653437    {
    34663438      if (vps->getDirectDependencyFlag(i, j))
     
    38203792            uiCode=0;
    38213793
    3822 #if VPS_FIX_TO_MATCH_SPEC
    38233794        if( vps->getNecessaryLayerFlag(i, k) && ( vps->getBaseLayerInternalFlag() || vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) ) )
    3824 #else
    3825         if(vps->getBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) !=  0 ) )
    3826 #endif
    38273795#endif
    38283796          READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1[i][k][j]" ); vps->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );
     
    40704038  if (!uiCode)
    40714039  {
    4072 #if VPS_FIX_TO_MATCH_SPEC
    40734040    for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ )
    4074 #else
    4075     for (i = 0; i < vps->getMaxLayers(); i++)
    4076 #endif
    40774041    {
    40784042      READ_FLAG( uiCode, "tiles_in_use_flag[ i ]" ); vps->setTilesInUseFlag(i, (uiCode == 1));
     
    40884052#endif
    40894053
    4090 #if VPS_FIX_TO_MATCH_SPEC
    40914054      for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ )
    4092 #else
    4093       for (i = 1; i < vps->getMaxLayers(); i++)
    4094 #endif
    40954055    {
    40964056      for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
     
    41134073  if (!uiCode)
    41144074  {
    4115 #if VPS_FIX_TO_MATCH_SPEC
    41164075      for (i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++)
    4117 #else
    4118       for (i = 0; i < vps->getMaxLayers(); i++)
    4119 #endif
    41204076    {
    41214077      READ_FLAG( uiCode, "wpp_in_use_flag[ i ]" ); vps->setWppInUseFlag(i, (uiCode == 1));
     
    41464102      for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
    41474103      {
    4148 #if VPS_FIX_TO_MATCH_SPEC
    41494104        if( vps->getBaseLayerInternalFlag() || vps->getRefLayerId(vps->getLayerIdInNuh(i), j) )
    41504105        {
    4151 #endif
    41524106          READ_UVLC( uiCode, "min_spatial_segment_offset_plus1[i][j]" ); vps->setMinSpatialSegmentOffsetPlus1( i, j, uiCode );
    41534107          if( vps->getMinSpatialSegmentOffsetPlus1(i,j ) > 0 )
     
    41594113            }
    41604114          }
    4161 #if VPS_FIX_TO_MATCH_SPEC
    4162         }
    4163 #endif
     4115        }
    41644116      }
    41654117    }
     
    45754527    }
    45764528  }
    4577 #if VPS_FIX_TO_MATCH_SPEC
    45784529  if( vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 0 )
    45794530  {
    4580 #endif
    45814531    for (Int h = 1; h < vps->getNumOutputLayerSets(); h++)
    45824532    {
    45834533      Int lsIdx = vps->getOutputLayerSetIdx(h);
    45844534      READ_UVLC(uiCode, "num_signalled_partitioning_schemes[h]"); vps->setNumSignalledPartitioningSchemes(h, uiCode);
    4585 #if VPS_FIX_TO_MATCH_SPEC
    45864535      for (Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h) + 1; j++)
    4587 #else
    4588       for (Int j = 0; j < vps->getNumSignalledPartitioningSchemes(h); j++)
    4589 #endif
    45904536      {
    45914537        READ_UVLC(uiCode, "num_partitions_in_scheme_minus1[h][j]"); vps->setNumPartitionsInSchemeMinus1(h, j, uiCode);
     
    46054551          for (Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++)
    46064552          {
    4607 #if VPS_FIX_TO_MATCH_SPEC
    46084553            for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++ )
    4609 #else
    4610             for (Int k = 0; k < vps->getNumPartitionsInSchemeMinus1(h, i); k++)
    4611 #endif
    46124554            {
    4613 #if VPS_FIX_TO_MATCH_SPEC
    46144555              if( vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 1 )
    46154556              {
     
    46214562                READ_CODE(numBits, uiCode, "bsp_comb_hrd_idx[h][i][t][j][k]");      vps->setBspHrdIdx(h, i, t, j, k, uiCode);
    46224563              }
    4623 #else
    4624               READ_UVLC(uiCode, "bsp_comb_hrd_idx[h][i][t][j][k]");      vps->setBspHrdIdx(h, i, t, j, k, uiCode);
    4625 #endif
    46264564              READ_UVLC(uiCode, "bsp_comb_sched_idx[h][i][t][j][k]");    vps->setBspSchedIdx(h, i, t, j, k, uiCode);
    46274565            }
     
    46344572
    46354573    }
    4636 #if VPS_FIX_TO_MATCH_SPEC
    4637   }
    4638 #endif
     4574  }
    46394575}
    46404576#endif
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1101 r1104  
    22482248  {
    22492249    Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i);
    2250 #if VPS_FIX_TO_MATCH_SPEC
    22512250    if( vps->getNumLayerSets() > 2 && i >= vps->getNumLayerSets() )
    2252 #else
    2253     if( i > (vps->getNumLayerSets() - 1) )
    2254 #endif
    22552251    {
    22562252      Int numBits = 1;
     
    22812277    for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++)
    22822278    {
    2283 #if VPS_FIX_TO_MATCH_SPEC
    22842279      if( vps->getNecessaryLayerFlag(i, j) && (vps->getNumProfileTierLevel() - 1) > 0 )
    2285 #else
    2286       if( vps->getNecessaryLayerFlag(i, j) )
    2287 #endif
    22882280      {
    22892281        WRITE_CODE( vps->getProfileLevelTierIdx(i, j), numBitsForPtlIdx, "profile_level_tier_idx[i]" );
     
    23542346  if( vps->getRepFormatIdxPresentFlag() )
    23552347  {
    2356 #if VPS_FIX_TO_MATCH_SPEC
    23572348    for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ )
    2358 #else
    2359     for(i = 1; i < vps->getMaxLayers(); i++)
    2360 #endif
    23612349    {
    23622350      Int numBits = 1;
     
    24472435  else
    24482436  {
    2449 #if VPS_FIX_TO_MATCH_SPEC
    24502437    for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ )
    2451 #else
    2452     for(i = 1; i < vps->getMaxLayers(); i++)
    2453 #endif
    2454     {
    2455 #if VPS_FIX_TO_MATCH_SPEC
     2438    {
    24562439      for( j = vps->getBaseLayerInternalFlag() ? 0 : 1; j < i; j++ )
    2457 #else
    2458       for(j = 0; j < i; j++)
    2459 #endif
    24602440      {
    24612441        if (vps->getDirectDependencyFlag(i, j))
     
    26662646        {
    26672647#if DPB_INTERNAL_BL_SIG
    2668 #if VPS_FIX_TO_MATCH_SPEC
    26692648        if( vps->getNecessaryLayerFlag(i, k) && (vps->getBaseLayerInternalFlag() || (vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) != 0)) )
    2670 #else
    2671         if(vps->getBaseLayerInternalFlag()  || ( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k)   !=  0 ) )
    2672 #endif
    26732649#endif
    26742650          WRITE_UVLC( vps->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1[i][k][j]" );
     
    27972773  if (!vps->getTilesNotInUseFlag())
    27982774  {
    2799 #if VPS_FIX_TO_MATCH_SPEC
    28002775    for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ )
    2801 #else
    2802     for(i = 0; i < vps->getMaxLayers(); i++)
    2803 #endif
    28042776    {
    28052777      WRITE_FLAG( vps->getTilesInUseFlag(i) ? 1 : 0 , "tiles_in_use_flag[ i ]" );
     
    28112783#endif
    28122784
    2813 #if VPS_FIX_TO_MATCH_SPEC
    28142785    for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ )
    2815 #else
    2816     for(i = 1; i < vps->getMaxLayers(); i++)
    2817 #endif
    28182786    {
    28192787      for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
     
    28362804  if (!vps->getWppNotInUseFlag())
    28372805  {
    2838 #if VPS_FIX_TO_MATCH_SPEC
    28392806    for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ )
    2840 #else
    2841     for(i = 0; i < vps->getMaxLayers(); i++)
    2842 #endif
    28432807    {
    28442808      WRITE_FLAG( vps->getWppInUseFlag(i) ? 1 : 0 , "wpp_in_use_flag[ i ]" );
     
    28692833      for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
    28702834      {
    2871 #if VPS_FIX_TO_MATCH_SPEC
    28722835        if (vps->getBaseLayerInternalFlag() || vps->getRefLayerId(vps->getLayerIdInNuh(i), j))
    28732836        {
    2874 #endif
    28752837          WRITE_UVLC(vps->getMinSpatialSegmentOffsetPlus1( i, j),    "min_spatial_segment_offset_plus1[i][j]");
    28762838
     
    28842846            }
    28852847          }
    2886 #if VPS_FIX_TO_MATCH_SPEC
    2887         }
    2888 #endif
     2848        }
    28892849      } 
    28902850    }
     
    32313191  }
    32323192
    3233 #if VPS_FIX_TO_MATCH_SPEC
    32343193  if( vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 0 )
    32353194  {
    3236 #endif
    3237   for( Int h = 1; h < vps->getNumOutputLayerSets(); h++ )
    3238   {
    3239     Int lsIdx = vps->getOutputLayerSetIdx( h );
    3240     WRITE_UVLC( vps->getNumSignalledPartitioningSchemes(h), "num_signalled_partitioning_schemes[h]");
    3241 
    3242 #if VPS_FIX_TO_MATCH_SPEC
    3243     for( Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h) + 1; j++ )
    3244 #else
    3245     for( Int j = 0; j < vps->getNumSignalledPartitioningSchemes(h); j++ )
    3246 #endif
    3247     {
    3248       WRITE_UVLC( vps->getNumPartitionsInSchemeMinus1(h, j), "num_partitions_in_scheme_minus1[h][j]" );
    3249       for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, j); k++ )
    3250       {
    3251         for( Int r = 0; r < vps->getNumLayersInIdList( lsIdx ); r++ )
    3252         {
    3253           WRITE_FLAG( vps->getLayerIncludedInPartitionFlag(h, j, k, r), "layer_included_in_partition_flag[h][j][k][r]" );
    3254         }
    3255       }
    3256     }
    3257 
    3258     for( Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++ )
    3259     {
    3260       for( Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1(lsIdx); t++ )
    3261       {
    3262         WRITE_UVLC(vps->getNumBspSchedulesMinus1(h, i, t), "num_bsp_schedules_minus1[h][i][t]");
    3263 
    3264         for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++ )
    3265         {
    3266 #if VPS_FIX_TO_MATCH_SPEC
    3267           for (Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++)
    3268 #else
    3269           for( Int k = 0; k < vps->getNumPartitionsInSchemeMinus1(h, i); k++ )
    3270 #endif
     3195    for( Int h = 1; h < vps->getNumOutputLayerSets(); h++ )
     3196    {
     3197      Int lsIdx = vps->getOutputLayerSetIdx( h );
     3198      WRITE_UVLC( vps->getNumSignalledPartitioningSchemes(h), "num_signalled_partitioning_schemes[h]");
     3199
     3200      for( Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h) + 1; j++ )
     3201      {
     3202        WRITE_UVLC( vps->getNumPartitionsInSchemeMinus1(h, j), "num_partitions_in_scheme_minus1[h][j]" );
     3203        for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, j); k++ )
     3204        {
     3205          for( Int r = 0; r < vps->getNumLayersInIdList( lsIdx ); r++ )
    32713206          {
    3272 #if VPS_FIX_TO_MATCH_SPEC
    3273             if (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 1)
     3207            WRITE_FLAG( vps->getLayerIncludedInPartitionFlag(h, j, k, r), "layer_included_in_partition_flag[h][j][k][r]" );
     3208          }
     3209        }
     3210      }
     3211
     3212      for( Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++ )
     3213      {
     3214        for( Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1(lsIdx); t++ )
     3215        {
     3216          WRITE_UVLC(vps->getNumBspSchedulesMinus1(h, i, t), "num_bsp_schedules_minus1[h][i][t]");
     3217
     3218          for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++ )
     3219          {
     3220            for (Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++)
    32743221            {
    3275               Int numBits = 1;
    3276               while ((1 << numBits) < (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams()))
     3222              if (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 1)
    32773223              {
    3278                 numBits++;
     3224                Int numBits = 1;
     3225                while ((1 << numBits) < (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams()))
     3226                {
     3227                  numBits++;
     3228                }
     3229                WRITE_CODE(vps->getBspHrdIdx(h, i, t, j, k), numBits, "bsp_comb_hrd_idx[h][i][t][j][k]");
    32793230              }
    3280               WRITE_CODE(vps->getBspHrdIdx(h, i, t, j, k), numBits, "bsp_comb_hrd_idx[h][i][t][j][k]");
     3231              WRITE_UVLC( vps->getBspSchedIdx(h, i, t, j, k), "bsp_comb_sched_idx[h][i][t][j][k]");
    32813232            }
    3282 #else
    3283             WRITE_UVLC( vps->getBspHrdIdx(h, i, t, j, k),   "bsp_comb_hrd_idx[h][i][t][j][k]");
    3284 #endif
    3285             WRITE_UVLC( vps->getBspSchedIdx(h, i, t, j, k), "bsp_comb_sched_idx[h][i][t][j][k]");
    32863233          }
    32873234        }
     
    32893236    }
    32903237  }
    3291 #if VPS_FIX_TO_MATCH_SPEC
    3292   }
    3293 #endif
    32943238}
    32953239#endif
Note: See TracChangeset for help on using the changeset viewer.