Changeset 1119 in SHVCSoftware for branches


Ignore:
Timestamp:
7 Jul 2015, 01:55:11 (9 years ago)
Author:
seregin
Message:

macro cleanup: O0096_REP_FORMAT_INDEX

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1117 r1119  
    22192219#if REPN_FORMAT_IN_VPS
    22202220, m_updateRepFormatFlag       (false)
    2221 #if O0096_REP_FORMAT_INDEX
    22222221, m_updateRepFormatIndex      (0)
    2223 #endif
    22242222#endif
    22252223#if SCALINGLIST_INFERRING
     
    37043702  TComVPS *vps = getVPS();
    37053703  UInt retVal, layerId = getLayerId();
    3706 #if O0096_REP_FORMAT_INDEX
     3704
    37073705#if R0279_REP_FORMAT_INBL
    37083706  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
     
    37263724    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getPicWidthVpsInLumaSamples();
    37273725  }
    3728 #else
    3729   if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() )
    3730   {
    3731     retVal = sps->getPicWidthInLumaSamples();
    3732   }
    3733   else
    3734   {
    3735     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getPicWidthVpsInLumaSamples();
    3736   }
    3737 #endif
     3726
    37383727  return retVal;
    37393728}
     3729
    37403730UInt TComSlice::getPicHeightInLumaSamples()
    37413731{
     
    37433733  TComVPS *vps = getVPS();
    37443734  UInt retVal, layerId = getLayerId();
    3745 #if O0096_REP_FORMAT_INDEX
     3735
    37463736#if R0279_REP_FORMAT_INBL
    37473737  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
     
    37653755    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getPicHeightVpsInLumaSamples();
    37663756  }
    3767 #else
    3768   if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() )
    3769   {
    3770     retVal = sps->getPicHeightInLumaSamples();
    3771   }
    3772   else
    3773   {
    3774     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getPicHeightVpsInLumaSamples();
    3775   }
    3776 #endif
     3757
    37773758  return retVal;
    37783759}
     3760
    37793761#if AUXILIARY_PICTURES
    37803762ChromaFormat TComSlice::getChromaFormatIdc()
     
    37913773  UInt retVal, layerId = getLayerId();
    37923774#endif
    3793 #if O0096_REP_FORMAT_INDEX
     3775
    37943776#if R0279_REP_FORMAT_INBL
    37953777  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
     
    38133795    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getChromaFormatVpsIdc();
    38143796  }
    3815 #else
    3816   if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() )
    3817   {
    3818     retVal = sps->getChromaFormatIdc();
    3819   }
    3820   else
    3821   {
    3822     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getChromaFormatVpsIdc();
    3823   }
    3824 #endif
     3797
    38253798  return retVal;
    38263799}
     3800
    38273801UInt TComSlice::getBitDepthY()
    38283802{
     
    38303804  TComVPS *vps = getVPS();
    38313805  UInt retVal, layerId = getLayerId();
    3832 #if O0096_REP_FORMAT_INDEX
     3806
    38333807#if R0279_REP_FORMAT_INBL
    38343808  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
     
    38513825    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getBitDepthVpsLuma();
    38523826  }
    3853 #else
    3854   if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() )
    3855   {
    3856     retVal = sps->getBitDepthY();
    3857   }
    3858   else
    3859   {
    3860     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getBitDepthVpsLuma();
    3861   }
    3862 #endif
     3827
    38633828  return retVal;
    38643829}
     3830
    38653831UInt TComSlice::getBitDepthC()
    38663832{
     
    38683834  TComVPS *vps = getVPS();
    38693835  UInt retVal, layerId = getLayerId();
    3870 #if O0096_REP_FORMAT_INDEX
     3836
    38713837#if R0279_REP_FORMAT_INBL
    38723838  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
     
    38893855    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getBitDepthVpsChroma();
    38903856  }
    3891 #else
    3892   if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() )
    3893   {
    3894     retVal = sps->getBitDepth(CHANNEL_TYPE_CHROMA);
    3895   }
    3896   else
    3897   {
    3898     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getBitDepthVpsChroma();
    3899   }
    3900 #endif
     3857
    39013858  return retVal;
    39023859}
     3860
    39033861Int TComSlice::getQpBDOffsetY()
    39043862{
    39053863  return (getBitDepthY() - 8) * 6;
    39063864}
     3865
    39073866Int TComSlice::getQpBDOffsetC()
    39083867{
     
    39153874  TComVPS *vps = getVPS();
    39163875  UInt layerId = getLayerId();
    3917 #if O0096_REP_FORMAT_INDEX
     3876
    39183877#if R0279_REP_FORMAT_INBL
    39193878  if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 )
     
    39373896    return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getConformanceWindowVps();
    39383897  }
    3939 #else
    3940   if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() )
    3941   {
    3942     return sps->getConformanceWindow();
    3943   }
    3944   else
    3945   {
    3946     return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(vps->getLayerIdxInVps(layerId))) )->getConformanceWindowVps();
    3947   }
    3948 #endif
    39493898}
    39503899
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1118 r1119  
    16181618#endif
    16191619#if REPN_FORMAT_IN_VPS
    1620   Bool m_updateRepFormatFlag;
    1621 #if O0096_REP_FORMAT_INDEX
     1620  Bool        m_updateRepFormatFlag;
    16221621  UInt        m_updateRepFormatIndex;
    1623 #endif
    16241622#endif
    16251623#if SCALINGLIST_INFERRING
     
    17941792#endif
    17951793#if REPN_FORMAT_IN_VPS
    1796   Bool     getUpdateRepFormatFlag()       { return m_updateRepFormatFlag; }
    1797   Void     setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x;    }
    1798 #if O0096_REP_FORMAT_INDEX
    1799   Int      getUpdateRepFormatIndex()      { return m_updateRepFormatIndex; }
    1800   Void     setUpdateRepFormatIndex(UInt index)  { m_updateRepFormatIndex = index; }
    1801 #endif
     1794  Bool     getUpdateRepFormatFlag()                 { return m_updateRepFormatFlag;   }
     1795  Void     setUpdateRepFormatFlag(Bool x)           { m_updateRepFormatFlag = x;      }
     1796  Int      getUpdateRepFormatIndex()                { return m_updateRepFormatIndex;  }
     1797  Void     setUpdateRepFormatIndex(UInt index)      { m_updateRepFormatIndex = index; }
    18021798#endif
    18031799#if SCALINGLIST_INFERRING
    1804   Bool     getInferScalingListFlag()  { return m_inferScalingListFlag;  }
    1805   UInt     getScalingListRefLayerId() { return m_scalingListRefLayerId; }
     1800  Bool     getInferScalingListFlag()                { return m_inferScalingListFlag;  }
     1801  UInt     getScalingListRefLayerId()               { return m_scalingListRefLayerId; }
    18061802  Void     setInferScalingListFlag( Bool flag )     { m_inferScalingListFlag = flag;     }
    18071803  Void     setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1118 r1119  
    187187#define MAX_REF_LAYERS                   7
    188188#endif
    189 #define O0096_REP_FORMAT_INDEX           1      ///< JCTVC-O0096: identify SPS rep_format() with an index into the lists of formats in VPS extension.
    190189#define O0096_DEFAULT_DEPENDENCY_TYPE    1      ///< JCTVC-O0096: specify default dependency type for all direct reference layers
    191190
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1118 r1119  
    32773277  if( vps->getRepFormatIdxPresentFlag() )
    32783278  {
    3279 #if O0096_REP_FORMAT_INDEX
    32803279#if !VPS_EXTN_UEV_CODING
    32813280    READ_CODE( 8, uiCode, "vps_num_rep_formats_minus1" );
     
    32833282    READ_UVLC( uiCode, "vps_num_rep_formats_minus1" );
    32843283#endif
    3285 #else
    3286     READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" );
    3287 #endif
     3284
    32883285    vps->setVpsNumRepFormats( uiCode + 1 );
    32893286  }
     
    33123309      if( vps->getVpsNumRepFormats() > 1 )
    33133310      {
    3314 #if O0096_REP_FORMAT_INDEX
    33153311#if !VPS_EXTN_UEV_CODING
    33163312        READ_CODE( 8, uiCode, "vps_rep_format_idx[i]" );
     
    33233319        READ_CODE( numBits, uiCode, "vps_rep_format_idx[i]" );
    33243320#endif
    3325 #else
    3326         READ_CODE( 4, uiCode, "vps_rep_format_idx[i]" );
    3327 #endif
     3321
    33283322        vps->setVpsRepFormatIdx( i, uiCode );
    33293323      }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1118 r1119  
    23212321    assert( vps->getVpsNumRepFormats() > 0 && vps->getVpsNumRepFormats() <= 256 );
    23222322
    2323 #if O0096_REP_FORMAT_INDEX
    23242323#if !VPS_EXTN_UEV_CODING
    23252324    WRITE_CODE( vps->getVpsNumRepFormats() - 1, 8, "vps_num_rep_formats_minus1" );
     
    23272326    WRITE_UVLC( vps->getVpsNumRepFormats() - 1, "vps_num_rep_formats_minus1" );
    23282327#endif
    2329 #else
    2330     WRITE_CODE( vps->getVpsNumRepFormats() - 1, 4, "vps_num_rep_formats_minus1" );
    2331 #endif
     2328
    23322329  }
    23332330  for(i = 0; i < vps->getVpsNumRepFormats(); i++)
     
    23432340      if( vps->getVpsNumRepFormats() > 1 )
    23442341      {
    2345 #if O0096_REP_FORMAT_INDEX
    23462342#if !VPS_EXTN_UEV_CODING
    23472343        WRITE_CODE( vps->getVpsRepFormatIdx(i), 8, "vps_rep_format_idx[i]" );
     
    23542350        WRITE_CODE( vps->getVpsRepFormatIdx(i), numBits, "vps_rep_format_idx[i]" );
    23552351#endif
    2356 #else
    2357         WRITE_CODE( vps->getVpsRepFormatIdx(i), 4, "vps_rep_format_idx[i]" );
    2358 #endif
    2359       }
    2360     }
    2361   }
    2362 #endif
    2363 #endif
     2352
     2353      }
     2354    }
     2355  }
     2356#endif
     2357#endif //REPN_FORMAT_IN_VPS
    23642358
    23652359  WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag");
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1117 r1119  
    14911491Void TEncTop::xInitILRP()
    14921492{
    1493 #if O0096_REP_FORMAT_INDEX
    14941493  RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps(m_layerId) ) );
    1495 #else
    1496   RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps(m_layerId) ) );
    1497 #endif
    14981494  Int bitDepthY,bitDepthC,picWidth,picHeight;
    14991495
    1500 #if O0096_REP_FORMAT_INDEX
    15011496  bitDepthY   = repFormat->getBitDepthVpsLuma();
    15021497  bitDepthC   = repFormat->getBitDepthVpsChroma();
    15031498  picWidth    = repFormat->getPicWidthVpsInLumaSamples();
    15041499  picHeight   = repFormat->getPicHeightVpsInLumaSamples();
    1505 #else
    1506   if( m_cSPS.getUpdateRepFormatFlag() )
    1507   {
    1508     bitDepthY   = m_cSPS.getBitDepthY();
    1509     bitDepthC   = m_cSPS.getBitDepthC();
    1510     picWidth    = m_cSPS.getPicWidthInLumaSamples();
    1511     picHeight   = m_cSPS.getPicHeightInLumaSamples();
    1512   }
    1513   else
    1514   {
    1515     bitDepthY   = repFormat->getBitDepthVpsLuma();
    1516     bitDepthC   = repFormat->getBitDepthVpsChroma();
    1517     picWidth    = repFormat->getPicWidthVpsInLumaSamples();
    1518     picHeight   = repFormat->getPicHeightVpsInLumaSamples();
    1519   }
    1520 #endif
    15211500 
    15221501  if(m_layerId > 0)
Note: See TracChangeset for help on using the changeset viewer.