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


Ignore:
Timestamp:
8 Jul 2015, 00:39:40 (9 years ago)
Author:
seregin
Message:

macro cleanup: P0295_DEFAULT_OUT_LAYER_IDC

File:
1 edited

Legend:

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

    r1156 r1157  
    29132913  Int numOutputLayerSets = vps->getNumLayerSets() + vps->getNumAddOutputLayerSets();
    29142914
    2915 #if P0295_DEFAULT_OUT_LAYER_IDC
    29162915  vps->setNumOutputLayerSets( numOutputLayerSets );
    29172916
     
    30383037
    30393038  vps->checkNecessaryLayerFlagCondition(); 
    3040 
    3041 #else
    3042   if( numOutputLayerSets > 1 )
    3043   {
    3044 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC
    3045     READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" );   vps->setDefaultOneTargetOutputLayerIdc( uiCode );
    3046 #else
    3047     READ_FLAG( uiCode, "default_one_target_output_layer_flag" );   vps->setDefaultOneTargetOutputLayerFlag( uiCode ? true : false );
    3048 #endif
    3049   }
    3050   vps->setNumOutputLayerSets( numOutputLayerSets );
    3051 
    3052   for(i = 1; i < numOutputLayerSets; i++)
    3053   {
    3054     if( i > (vps->getNumLayerSets() - 1) )
    3055     {
    3056       Int numBits = 1;
    3057       while ((1 << numBits) < (vps->getNumLayerSets() - 1))
    3058       {
    3059         numBits++;
    3060       }
    3061       READ_CODE( numBits, uiCode, "output_layer_set_idx_minus1");   vps->setOutputLayerSetIdx( i, uiCode + 1);
    3062       Int lsIdx = vps->getOutputLayerSetIdx(i);
    3063 #if NUM_OL_FLAGS
    3064       for(j = 0; j < vps->getNumLayersInIdList(lsIdx) ; j++)
    3065 #else
    3066       for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++)
    3067 #endif
    3068       {
    3069         READ_FLAG( uiCode, "output_layer_flag[i][j]"); vps->setOutputLayerFlag(i, j, uiCode);
    3070       }
    3071     }
    3072     else
    3073     {
    3074 #if VPS_DPB_SIZE_TABLE
    3075       vps->setOutputLayerSetIdx( i, i );
    3076 #endif
    3077       // i <= (vps->getNumLayerSets() - 1)
    3078       // Assign OutputLayerFlag depending on default_one_target_output_layer_flag
    3079       Int lsIdx = i;
    3080 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC
    3081       if( vps->getDefaultOneTargetOutputLayerIdc() == 1 )
    3082       {
    3083         for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
    3084         {
    3085 #if O0135_DEFAULT_ONE_OUT_SEMANTIC
    3086 #if DEF_OPT_LAYER_IDC
    3087         vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)) );
    3088 #else
    3089           vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)) && (vps->getDimensionId(j,1)==0) );
    3090 #endif
    3091 #else
    3092           vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)));
    3093 #endif
    3094         }
    3095       }
    3096       else if ( vps->getDefaultOneTargetOutputLayerIdc() == 0 )
    3097       {
    3098         for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
    3099         {
    3100           vps->setOutputLayerFlag(i, j, 1);
    3101         }
    3102       }
    3103       else
    3104       {
    3105         // Other values of default_one_target_output_layer_idc than 0 and 1 are reserved for future use.
    3106       }
    3107 #else
    3108       if( vps->getDefaultOneTargetOutputLayerFlag() )
    3109       {
    3110         for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
    3111         {
    3112           vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1)));
    3113         }
    3114       }
    3115       else
    3116       {
    3117         for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++)
    3118         {
    3119           vps->setOutputLayerFlag(i, j, 1);
    3120         }
    3121       }
    3122 #endif
    3123     }
    3124     Int numBits = 1;
    3125     while ((1 << numBits) < (vps->getNumProfileTierLevel()))
    3126     {
    3127       numBits++;
    3128     }
    3129     READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" );     vps->setProfileLevelTierIdx(i, uiCode);
    3130   }
    3131 #endif
    31323039
    31333040#if REPN_FORMAT_IN_VPS
Note: See TracChangeset for help on using the changeset viewer.