Changeset 1090 in SHVCSoftware for branches/SHM-dev/source/App


Ignore:
Timestamp:
1 Jul 2015, 00:53:31 (9 years ago)
Author:
seregin
Message:

cleanup macros: Q0120_PHASE_CALCULATION, P0312_VERT_PHASE_ADJ, Q0200_CONFORMANCE_BL_SIZE, R0220_REMOVE_EL_CLIP, MOVE_SCALED_OFFSET_TO_PPS, R0209_GENERIC_PHASE, REF_REGION_OFFSET, O0215_PHASE_ALIGNMENT_REMOVAL, O0215_PHASE_ALIGNMENT, RESAMPLING_FIX

Location:
branches/SHM-dev/source/App/TAppEncoder
Files:
5 edited

Legend:

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

    r1089 r1090  
    793793  string    cfg_scaledRefLayerBottomOffset [MAX_LAYERS];
    794794  Int*      cfg_numRefLayerLocationOffsets[MAX_LAYERS];
    795 #if REF_REGION_OFFSET
    796795  string    cfg_scaledRefLayerOffsetPresentFlag [MAX_LAYERS];
    797796  string    cfg_refRegionOffsetPresentFlag      [MAX_LAYERS];
     
    800799  string    cfg_refRegionRightOffset  [MAX_LAYERS];
    801800  string    cfg_refRegionBottomOffset [MAX_LAYERS];
    802 #endif
    803 #if R0209_GENERIC_PHASE
    804801  string    cfg_resamplePhaseSetPresentFlag [MAX_LAYERS];
    805802  string    cfg_phaseHorLuma   [MAX_LAYERS];
     
    807804  string    cfg_phaseHorChroma [MAX_LAYERS];
    808805  string    cfg_phaseVerChroma [MAX_LAYERS];
    809 #else
    810 #if P0312_VERT_PHASE_ADJ
    811   string    cfg_vertPhasePositionEnableFlag[MAX_LAYERS];
    812 #endif
    813 #endif
    814806
    815807#if O0098_SCALED_REF_LAYER_ID
     
    820812  string*    cfg_scaledRefLayerRightOffsetPtr  [MAX_LAYERS];
    821813  string*    cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS];
    822 #if REF_REGION_OFFSET
    823814  string*    cfg_scaledRefLayerOffsetPresentFlagPtr [MAX_LAYERS];
    824815  string*    cfg_refRegionOffsetPresentFlagPtr      [MAX_LAYERS];
     
    827818  string*    cfg_refRegionRightOffsetPtr  [MAX_LAYERS];
    828819  string*    cfg_refRegionBottomOffsetPtr [MAX_LAYERS];
    829 #endif
    830 #if R0209_GENERIC_PHASE
    831820  string*    cfg_resamplePhaseSetPresentFlagPtr [MAX_LAYERS];
    832821  string*    cfg_phaseHorLumaPtr   [MAX_LAYERS];
     
    834823  string*    cfg_phaseHorChromaPtr [MAX_LAYERS];
    835824  string*    cfg_phaseVerChromaPtr [MAX_LAYERS];
    836 #endif
    837 #if P0312_VERT_PHASE_ADJ
    838   string*    cfg_vertPhasePositionEnableFlagPtr[MAX_LAYERS];
    839 #endif
    840825
    841826#if RC_SHVC_HARMONIZATION
     
    927912      cfg_scaledRefLayerRightOffsetPtr [layer] = &cfg_scaledRefLayerRightOffset[layer];
    928913      cfg_scaledRefLayerBottomOffsetPtr[layer] = &cfg_scaledRefLayerBottomOffset[layer];
    929 #if P0312_VERT_PHASE_ADJ
    930       cfg_vertPhasePositionEnableFlagPtr[layer] = &cfg_vertPhasePositionEnableFlag[layer];
    931 #endif
    932 #if REF_REGION_OFFSET
    933914      cfg_scaledRefLayerOffsetPresentFlagPtr [layer] = &cfg_scaledRefLayerOffsetPresentFlag [layer];
    934915      cfg_refRegionOffsetPresentFlagPtr      [layer] = &cfg_refRegionOffsetPresentFlag      [layer];
     
    937918      cfg_refRegionRightOffsetPtr [layer] = &cfg_refRegionRightOffset [layer];
    938919      cfg_refRegionBottomOffsetPtr[layer] = &cfg_refRegionBottomOffset[layer];
    939 #endif
    940 #if R0209_GENERIC_PHASE
    941920      cfg_resamplePhaseSetPresentFlagPtr [layer] = &cfg_resamplePhaseSetPresentFlag [layer];
    942921      cfg_phaseHorLumaPtr   [layer] = &cfg_phaseHorLuma   [layer];
     
    944923      cfg_phaseHorChromaPtr [layer] = &cfg_phaseHorChroma [layer];
    945924      cfg_phaseVerChromaPtr [layer] = &cfg_phaseVerChroma [layer];
    946 #endif
    947925    }
    948926#if RC_SHVC_HARMONIZATION
     
    10881066  ("FrameRate%d,-fr%d",                             cfg_FrameRate,                               0, MAX_LAYERS, "Frame rate for layer %d")
    10891067  ("LambdaModifier%d,-LM%d",                        m_adLambdaModifier,                Double(1.0), MAX_TLAYER, "Lambda modifier for temporal layer %d")
    1090 #if O0215_PHASE_ALIGNMENT
    1091   ("PhaseAlignment",                                m_phaseAlignFlag,                                    false, "indicate the sample location alignment between layers (0: zero position aligned, 1: central position aligned)")
    1092 #endif
    10931068#if REPN_FORMAT_IN_VPS
    10941069  ("RepFormatIdx%d",                                cfg_repFormatIdx,                           -1, MAX_LAYERS, "Index to the representation format structure used from the VPS")
     
    11651140  ("ScaledRefLayerBottomOffset%d",                  cfg_scaledRefLayerBottomOffsetPtr,  string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to"
    11661141                                                                                                                "  bottom-right luma sample of the EL picture, in units of two luma samples")
    1167 #if REF_REGION_OFFSET
     1142#if SVC_EXTENSION
    11681143  ("ScaledRefLayerOffsetPresentFlag%d",         cfg_scaledRefLayerOffsetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of scaled reference layer offsets")
    11691144  ("RefRegionOffsetPresentFlag%d",                  cfg_refRegionOffsetPresentFlagPtr,  string(""), MAX_LAYERS, "presense flag of reference region offsets")
     
    11761151  ("RefRegionBottomOffset%d",                       cfg_refRegionBottomOffsetPtr,       string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of ref region with respect to"
    11771152                                                                                                                "  bottom-right luma sample of the BL picture, in units of two luma samples")
    1178 #endif
    1179 #if R0209_GENERIC_PHASE
    11801153  ("ResamplePhaseSetPresentFlag%d",                 cfg_resamplePhaseSetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of resample phase set")
    11811154  ("PhaseHorLuma%d",                                cfg_phaseHorLumaPtr,                string(""), MAX_LAYERS, "luma shift in the horizontal direction used in resampling proces")
     
    11831156  ("PhaseHorChroma%d",                              cfg_phaseHorChromaPtr,              string(""), MAX_LAYERS, "chroma shift in the horizontal direction used in resampling proces")
    11841157  ("PhaseVerChroma%d",                              cfg_phaseVerChromaPtr,              string(""), MAX_LAYERS, "chroma shift in the vertical   direction used in resampling proces")
    1185 #endif
    1186 #if P0312_VERT_PHASE_ADJ
    1187   ("VertPhasePositionEnableFlag%d",                 cfg _vertPhasePositionEnableFlagPtr,string(""), MAX_LAYERS, "VertPhasePositionEnableFlag for layer %d")
    11881158#endif
    11891159#if Q0074_COLOUR_REMAPPING_SEI
     
    21562126      assert( strcmp(cfg_refLocationOffsetLayerId[layer].c_str(),  ""));
    21572127#endif
    2158 #if REF_REGION_OFFSET
    21592128      Bool srloFlag =
    21602129        strcmp(cfg_scaledRefLayerLeftOffset   [layer].c_str(), "") ||
     
    21622131        strcmp(cfg_scaledRefLayerTopOffset    [layer].c_str(), "") ||
    21632132        strcmp(cfg_scaledRefLayerBottomOffset [layer].c_str(), "");
     2133
    21642134      Bool rroFlag =
    21652135        strcmp(cfg_refRegionLeftOffset   [layer].c_str(), "") ||
     
    21672137        strcmp(cfg_refRegionTopOffset    [layer].c_str(), "") ||
    21682138        strcmp(cfg_refRegionBottomOffset [layer].c_str(), "");
    2169 #if R0209_GENERIC_PHASE
     2139
    21702140      Bool phaseSetFlag =
    21712141        strcmp(cfg_phaseHorLuma   [layer].c_str(), "") ||
     
    21742144        strcmp(cfg_phaseVerChroma [layer].c_str(), "");
    21752145      assert( srloFlag || rroFlag || phaseSetFlag);
    2176 #else
    2177       assert( srloFlag || rroFlag );
    2178 #endif
    2179 #else
    2180 #if P0312_VERT_PHASE_ADJ
    2181       assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(),  "") ||
    2182               strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") ||
    2183               strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(),   "") ||
    2184               strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"") ||
    2185               strcmp(cfg_vertPhasePositionEnableFlag[layer].c_str(),"") );
    2186 #else
    2187       assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(),  "") ||
    2188               strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") ||
    2189               strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(),   "") ||
    2190               strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"") );
    2191 #endif
    2192 #endif
    21932146    }
    21942147
     
    22112164#endif
    22122165
    2213 #if REF_REGION_OFFSET
    22142166    // Presense Flag //
    22152167    if(strcmp(cfg_scaledRefLayerOffsetPresentFlag[layer].c_str(),  ""))
     
    22252177      }
    22262178    }
    2227 #endif
    22282179
    22292180    // Left offset //
     
    22822233      }
    22832234    }
    2284 #if P0312_VERT_PHASE_ADJ
    2285    // VertPhasePositionEnableFlag //
    2286     if(strcmp(cfg_vertPhasePositionEnableFlag[layer].c_str(),  ""))
    2287     {
    2288       cfgStringToArray( &tempArray, cfg_vertPhasePositionEnableFlag[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "VertPhasePositionEnableFlag");
    2289       if(tempArray)
    2290       {
    2291         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
    2292         {
    2293           m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] = tempArray[i];
    2294         }
    2295         delete [] tempArray; tempArray = NULL;
    2296       }
    2297     }
    2298 #endif
    2299 #if REF_REGION_OFFSET
     2235
    23002236    // Presense Flag //
    23012237    if(strcmp(cfg_refRegionOffsetPresentFlag[layer].c_str(),  ""))
     
    23672303      }
    23682304    }
    2369 #endif
    2370 #if R0209_GENERIC_PHASE
     2305
    23712306    Int numPhaseSet = m_acLayerCfg[layer].m_numRefLayerLocationOffsets;
    23722307
     
    24402375      }
    24412376    }
    2442 #endif
    24432377  }
    24442378
     
    46114545  printf("InterLayerWeightedPred            : %d\n", m_useInterLayerWeightedPred );
    46124546#endif
    4613 #if O0215_PHASE_ALIGNMENT 
    4614   printf("Cross-layer sample alignment      : %d\n", m_phaseAlignFlag);
    4615 #endif
    46164547  printf("\n");
    46174548  for(UInt layer=0; layer<m_numLayers; layer++)
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1089 r1090  
    496496  UInt      m_ilcIdc[1024];
    497497#endif
    498 #if O0215_PHASE_ALIGNMENT
    499   Bool      m_phaseAlignFlag;
    500 #endif
    501498#if O0223_PICTURE_TYPES_ALIGN_FLAG
    502499  Bool      m_crossLayerPictureTypeAlignFlag;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp

    r1089 r1090  
    7272  ::memset(m_scaledRefLayerRightOffset,  0, sizeof(m_scaledRefLayerRightOffset));
    7373  ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset));
    74 #if REF_REGION_OFFSET
    7574  ::memset(m_scaledRefLayerOffsetPresentFlag, 0, sizeof(m_scaledRefLayerOffsetPresentFlag));
    7675  ::memset(m_refRegionOffsetPresentFlag, 0, sizeof(m_refRegionOffsetPresentFlag));
     
    7978  ::memset(m_refRegionRightOffset,  0, sizeof(m_refRegionRightOffset));
    8079  ::memset(m_refRegionBottomOffset, 0, sizeof(m_refRegionBottomOffset));
    81 #endif
    82 #if R0209_GENERIC_PHASE
    8380  ::memset(m_resamplePhaseSetPresentFlag, 0, sizeof(m_resamplePhaseSetPresentFlag));
    8481  ::memset(m_phaseHorLuma,   0, sizeof(m_phaseHorLuma));
     
    8683  ::memset(m_phaseHorChroma, 0, sizeof(m_phaseHorChroma));
    8784  ::memset(m_phaseVerChroma, 0, sizeof(m_phaseVerChroma));
    88 #else
    89 #if P0312_VERT_PHASE_ADJ
    90   ::memset(m_vertPhasePositionEnableFlag, 0, sizeof(m_vertPhasePositionEnableFlag));
    91 #endif
    92 #endif
    9385}
    9486
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r1089 r1090  
    101101  Int       m_scaledRefLayerRightOffset [MAX_LAYERS];
    102102  Int       m_scaledRefLayerBottomOffset[MAX_LAYERS];
    103 #if REF_REGION_OFFSET
    104103  Bool      m_scaledRefLayerOffsetPresentFlag [MAX_LAYERS];
    105104  Bool      m_refRegionOffsetPresentFlag      [MAX_LAYERS];
     
    108107  Int       m_refRegionRightOffset [MAX_LAYERS];
    109108  Int       m_refRegionBottomOffset[MAX_LAYERS];
    110 #endif
    111 #if P0312_VERT_PHASE_ADJ
    112   Bool      m_vertPhasePositionEnableFlag[MAX_LAYERS];
    113 #endif
    114 #if R0209_GENERIC_PHASE
    115109  Int       m_phaseHorLuma  [MAX_LAYERS];
    116110  Int       m_phaseVerLuma  [MAX_LAYERS];
     
    118112  Int       m_phaseVerChroma[MAX_LAYERS];
    119113  Bool      m_resamplePhaseSetPresentFlag [MAX_LAYERS];
    120 #endif
    121114
    122115  Int       m_inputBitDepth   [MAX_NUM_CHANNEL_TYPE];         ///< bit-depth of input file
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1089 r1090  
    769769    if( layer > 0 )
    770770    {
    771 #if REF_REGION_OFFSET
    772771#if AUXILIARY_PICTURES
    773772      Int subWidthC  = ( m_acLayerCfg[layer].m_chromaFormatIDC == CHROMA_420 || m_acLayerCfg[layer].m_chromaFormatIDC == CHROMA_422 ) ? 2 : 1;
     
    777776      Int subHeightC = 2;
    778777#endif
    779 #endif
    780778      m_acTEncTop[layer].setNumRefLayerLocationOffsets          ( m_acLayerCfg[layer].m_numRefLayerLocationOffsets );
    781779      for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
     
    784782        m_acTEncTop[layer].setRefLocationOffsetLayerId          (i, m_acLayerCfg[layer].m_refLocationOffsetLayerId[i]);
    785783#endif
    786 #if REF_REGION_OFFSET
    787784        m_acTEncTop[layer].setScaledRefLayerOffsetPresentFlag   ( i, m_acLayerCfg[layer].m_scaledRefLayerOffsetPresentFlag[i] );
    788785        m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( subWidthC  * m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], subWidthC  * m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],
    789786                                                                  subHeightC * m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i],  subHeightC * m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]);
    790 #else
    791 #if P0312_VERT_PHASE_ADJ
    792         m_acTEncTop[layer].setVertPhasePositionEnableFlag       ( i, m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] );
    793         m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],
    794           2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i], m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] );
    795 #else
    796         m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],
    797           2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]);
    798 #endif
    799 #endif
     787
    800788        Int rlSubWidthC  = ( m_acLayerCfg[i].m_chromaFormatIDC == CHROMA_420 || m_acLayerCfg[i].m_chromaFormatIDC == CHROMA_422 ) ? 2 : 1;
    801789        Int rlSubHeightC = ( m_acLayerCfg[i].m_chromaFormatIDC == CHROMA_420 ) ? 2 : 1;
     
    804792        m_acTEncTop[layer].getRefLayerWindow(i).setWindow       ( rlSubWidthC  * m_acLayerCfg[layer].m_refRegionLeftOffset[i], rlSubWidthC  * m_acLayerCfg[layer].m_refRegionRightOffset[i],
    805793                                                                  rlSubHeightC * m_acLayerCfg[layer].m_refRegionTopOffset[i],  rlSubHeightC * m_acLayerCfg[layer].m_refRegionBottomOffset[i]);
    806 #if R0209_GENERIC_PHASE
    807794        m_acTEncTop[layer].setResamplePhaseSetPresentFlag       ( i, m_acLayerCfg[layer].m_resamplePhaseSetPresentFlag[i] );
    808795        m_acTEncTop[layer].setPhaseHorLuma                      ( i, m_acLayerCfg[layer].m_phaseHorLuma[i] );
     
    810797        m_acTEncTop[layer].setPhaseHorChroma                    ( i, m_acLayerCfg[layer].m_phaseHorChroma[i] );
    811798        m_acTEncTop[layer].setPhaseVerChroma                    ( i, m_acLayerCfg[layer].m_phaseVerChroma[i] );
    812 #endif
    813799      }
    814800    }
     
    18461832#endif
    18471833
    1848 #if O0215_PHASE_ALIGNMENT
    1849   vps->setPhaseAlignFlag( m_phaseAlignFlag );
    1850 #endif
    1851 
    18521834#if P0300_ALT_OUTPUT_LAYER_FLAG
    18531835  for (Int k = 0; k < MAX_VPS_LAYER_SETS_PLUS1; k++)
     
    18591841  vps->setAltOuputLayerFlag( m_altOutputLayerFlag );
    18601842#endif
    1861 #endif
    1862 
    1863 #if P0312_VERT_PHASE_ADJ
    1864   Bool vpsVuiVertPhaseInUseFlag = false;
    1865   for( UInt layerId = 1; layerId < m_numLayers; layerId++ )
    1866   {
    1867     for( i = 0; i < m_acLayerCfg[layerId].m_numScaledRefLayerOffsets; i++ )
    1868     {
    1869       if( m_acTEncTop[layerId].getVertPhasePositionEnableFlag(i) )
    1870       {
    1871         vpsVuiVertPhaseInUseFlag = true;
    1872         break;
    1873       }
    1874     }
    1875   }
    1876   vps->setVpsVuiVertPhaseInUseFlag( vpsVuiVertPhaseInUseFlag );
    18771843#endif
    18781844
Note: See TracChangeset for help on using the changeset viewer.