Ignore:
Timestamp:
18 Feb 2015, 17:39:40 (10 years ago)
Author:
tech
Message:

Cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-13.0-dev0/source/Lib/TLibCommon/TComSlice.cpp

    r1124 r1131  
    179179  }
    180180#endif
    181 #if LGE_DEFAULT_DV_J0046
    182181  m_iDefaultRefViewIdx = -1;
    183182  m_bDefaultRefViewIdxAvailableFlag = false;
    184 #endif
    185183}
    186184
     
    18791877  m_vpsBaseLayerAvailableFlag = true;
    18801878
    1881 #if  H_MV_FIX_NUM_VIEWS
    18821879  m_numViews = 0;
    1883 #endif
    18841880
    18851881#endif
     
    19181914  m_repFormatIdxPresentFlag = false;
    19191915  m_maxOneActiveRefLayerFlag = false;
    1920 #if H_MV_HLS_FIX
    19211916  m_vpsPocLsbAlignedFlag  = false;
    1922 #endif
    19231917  m_directDepTypeLenMinus2   = 0;         
    19241918 
     
    19561950    m_layerIdInNuh      [i] = ( i == 0 ) ? 0 : -1;
    19571951    m_numDirectRefLayers[i] = 0;
    1958 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    19591952#if H_3D
    19601953    m_numRefListLayers[i] = 0;
    1961 #endif
    19621954#endif
    19631955    m_vpsRepFormatIdx    [i] = 0;
     
    19681960#if H_3D
    19691961    m_viewIndex         [i] = -1;
    1970 #if !HHI_TOOL_PARAMETERS_I2_J0107
    1971     m_vpsDepthModesFlag [i] = false;
    1972     m_ivMvScalingFlag[i] = true;
    1973     m_bIVPFlag [i]      = false;
    1974 #if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
    1975     m_singleDepthModeFlag[ i ] = false;
    1976 #endif
    1977 #endif
    19781962#endif
    19791963
     
    19841968      m_dependencyFlag  [i][j]    = false;
    19851969      m_idDirectRefLayer[i][j]    = -1;
    1986 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    19871970#if H_3D
    19881971      m_idRefListLayer[i][j]    = -1;
    1989 #endif
    19901972#endif
    19911973      m_idPredictedLayer[i][j]    = -1;
     
    19991981    }
    20001982#if H_3D_ARP
    2001 #if !HHI_TOOL_PARAMETERS_I2_J0107
    2002     m_uiUseAdvResPred[i]  = 0;
    2003     m_uiARPStepNum[i]     = 1;
    2004 #endif
    20051983#endif
    20061984  }
     
    20081986  m_dpbSize = new TComDpbSize;
    20091987
    2010 #if !HHI_TOOL_PARAMETERS_I2_J0107
    2011 #if H_3D
    2012   for( Int i = 0; i < MAX_NUM_LAYERS; i++ )
    2013   {
    2014 #if H_3D_IV_MERGE
    2015     m_ivMvPredFlag         [ i ] = false;
    2016 #if H_3D_SPIVMP
    2017     m_iSubPULog2Size       [ i ] = 0;
    2018 #endif
    2019 #endif
    2020 #if H_3D_QTLPC
    2021     m_bLimQtPredFlag       [ i ] = false;
    2022 #endif
    2023 #if H_3D_VSP
    2024     m_viewSynthesisPredFlag[ i ] = false;
    2025 #endif
    2026 #if H_3D_NBDV_REF
    2027     m_depthRefinementFlag  [ i ] = false;
    2028 #endif
    2029 #if H_3D_INTER_SDC
    2030     m_bInterSDCFlag        [ i ] = false;
    2031 #endif
    2032 #if H_3D
    2033     m_bIVPFlag             [ i ] = false;
    2034 #endif
    2035 #if H_3D_DBBP
    2036     m_dbbpFlag             [ i ] = false;
    2037 #endif
    2038 #if H_3D_IV_MERGE
    2039     m_bMPIFlag             [ i ] = false;
    2040 #endif
    2041   } 
    2042 #endif
    2043 #endif
    20441988
    20451989#endif
     
    21322076    Int iNuhLId = getLayerIdInNuh( i );
    21332077    Int d = 0;
    2134 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    21352078#if H_3D
    21362079    Int l = 0;
    21372080#endif
    2138 #endif
    21392081    Int r = 0;
    21402082    Int p = 0;
     
    21472089        m_idDirectRefLayer[iNuhLId][d++] = jNuhLid;
    21482090      }
    2149 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    21502091#if H_3D
    21512092      if( getDirectDependencyFlag( i , j ) && ( getDepthId( iNuhLId ) == getDepthId( jNuhLid ) ))
     
    21542095      }
    21552096#endif
    2156 #endif
    21572097
    21582098      if( getDependencyFlag( i , j ) )
     
    21662106    }
    21672107    m_numDirectRefLayers[ iNuhLId ] = d;
    2168 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    21692108#if H_3D
    21702109    m_numRefListLayers[ iNuhLId ] = l;
    2171 #endif
    21722110#endif
    21732111
     
    22062144
    22072145
    2208 #if H_MV_FIX_NUM_VIEWS
    22092146Void     TComVPS::initNumViews( )
    22102147{
     
    22422179  }
    22432180}
    2244 #endif
    22452181
    22462182
     
    24032339}
    24042340
    2405 #if !H_MV_FIX_NUM_VIEWS
    2406 Int TComVPS::getNumViews()
    2407 {
    2408   Int numViews = 1;
    2409   for( Int i = 0; i <=  getMaxLayersMinus1(); i++ )
    2410   {
    2411     Int lId = getLayerIdInNuh( i );
    2412     if ( i > 0 && ( getViewIndex( lId ) != getScalabilityId( i - 1, VIEW_ORDER_INDEX ) ) )
    2413     {
    2414       numViews++;
    2415     }   
    2416   }
    2417   return numViews;
    2418 }
    2419 #endif
    24202341
    24212342
     
    26562577  xPrintArray( "IdRefLayer"      , getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numRefLayers, m_idRefLayer, true );
    26572578  xPrintArray( "IdDirectRefLayer", getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numDirectRefLayers, m_idDirectRefLayer, true );
    2658 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    26592579#if H_3D
    26602580  xPrintArray( "IdRefListLayer", getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numRefListLayers, m_idRefListLayer, true );
    2661 #endif
    26622581#endif
    26632582
     
    30843003      i++;
    30853004    }
    3086 #if SHARP_DLT_SIMP_J0029
    30873005    iIdxUp = bFound ?  iIdxDown + 1 : iNumDepthValues-1;
    3088 #else
    3089     // iterate over indices to find upper closest depth
    3090     i = iNumDepthValues-2;
    3091     bFound = false;
    3092     while(!bFound && i>=0)
    3093     {
    3094       if( m_iIdx2DepthValue[layerIdInVps][i] < p )
    3095       {
    3096         iIdxUp  = i+1;
    3097         bFound    = true;
    3098       }
    3099 
    3100       i--;
    3101     }
    3102 
    3103     // assert monotony
    3104     assert(iIdxDown<=iIdxUp);
    3105 #endif
    31063006
    31073007    // assign closer depth value/idx
     
    36843584{
    36853585  TComVPS* vps = getVPS();
    3686 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    36873586#if H_3D
    36883587  Int refLayerIdx = vps->getLayerIdInVps( vps->getIdRefListLayer( getLayerId(), i ) );
     
    36903589  Int refLayerIdx = vps->getLayerIdInVps( vps->getIdDirectRefLayer( getLayerId(), i ) );
    36913590#endif
    3692 #else
    3693   Int refLayerIdx = vps->getLayerIdInVps( vps->getIdDirectRefLayer( getLayerId(), i ) );
    3694 #endif
    3695 
    3696 #if H_MV_FIX_REF_LAYER_PIC_FLAG
     3591
    36973592  Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer()  && ( getTLayer() == 0   ||
    36983593    vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() ));
    3699 #else
    3700   Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  && ( getTLayer() == 0  ) &&
    3701     ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() );
    3702 #endif
    37033594  return refLayerPicFlag;       
    37043595}   
     
    37083599  Int refLayerPicIdc = -1;
    37093600  Int curj = 0;
    3710 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    37113601#if H_3D
    37123602  for( Int i = 0;  i < getVPS()->getNumRefListLayers( getLayerId()) ; i++ )
     
    37143604  for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
    37153605#endif
    3716 #else
    3717   for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
    3718 #endif
    37193606  {
    37203607    if( getRefLayerPicFlag( i ) )
     
    37373624
    37383625  Int numRefLayerPics = 0;
    3739 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    37403626#if H_3D
    37413627  for( Int i = 0;  i < getVPS()->getNumRefListLayers( getLayerId()) ; i++ )
     
    37433629  for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
    37443630#endif
    3745 #else
    3746   for( Int i = 0;  i < getVPS()->getNumDirectRefLayers( getLayerId()) ; i++ )
    3747 #endif
    37483631  {
    37493632    numRefLayerPics += getRefLayerPicFlag( i );
     
    37703653    numActiveRefLayerPics = 0;
    37713654  }
    3772 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    37733655#if H_3D
    37743656  else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumRefListLayers( getLayerId() ) == 1 )
     
    37763658  else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 )
    37773659#endif
    3778 #else
    3779   else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 )
    3780 #endif 
    37813660  {
    37823661    numActiveRefLayerPics = 1;
     
    37913670Int TComSlice::getRefPicLayerId( Int i )
    37923671{
    3793 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107
    37943672#if H_3D
    37953673  return getVPS()->getIdRefListLayer( getLayerId(), getInterLayerPredLayerIdc( i ) );
     
    37973675  return getVPS()->getIdDirectRefLayer( getLayerId(), getInterLayerPredLayerIdc( i ) );
    37983676#endif
    3799 #else
    3800   return getVPS()->getIdDirectRefLayer( getLayerId(), getInterLayerPredLayerIdc( i ) );
    3801 #endif
    3802 }
    3803 
    3804 #if SEC_ARP_VIEW_REF_CHECK_J0037 || SEC_DBBP_VIEW_REF_CHECK_J0037
     3677}
     3678#if H_3D
    38053679Void TComSlice::setDefaultRefView( )
    38063680{
     
    38393713{
    38403714  Bool tempRefPicInListsFlag = false;
    3841 #if HHI_TOOL_PARAMETERS_I2_J0107
    38423715  if( !getIvResPredFlag() || this->isIRAP())
    3843 #else
    3844   if(!getVPS()->getUseAdvRP(getLayerId()) || this->isIRAP())
    3845 #endif
    38463716  {
    38473717    m_nARPStepNum = 0;
     
    38713741      }
    38723742    }
    3873 #if SEC_ARP_VIEW_REF_CHECK_J0037
    38743743    tempRefPicInListsFlag = (getFirstTRefIdx(REF_PIC_LIST_0) >= 0 || getFirstTRefIdx(REF_PIC_LIST_1) >= 0) && getDefaultRefViewIdxAvailableFlag();
    3875 #else
    3876     tempRefPicInListsFlag = getFirstTRefIdx(REF_PIC_LIST_0) >= 0 || getFirstTRefIdx(REF_PIC_LIST_1) >= 0;
    3877 #endif
    3878 #if HHI_TOOL_PARAMETERS_I2_J0107
    38793744    m_nARPStepNum = tempRefPicInListsFlag ?  H_3D_ARP_WFNR : 0;
    3880 #else
    3881     m_nARPStepNum = tempRefPicInListsFlag ? getVPS()->getARPStepNum(getLayerId()) : 0;
    3882 #endif
    38833745  }
    38843746
     
    40633925  Bool setupLUT = false;
    40643926 
    4065 #if HHI_TOOL_PARAMETERS_I2_J0107
    40663927  setupLUT = setupLUT || getViewSynthesisPredFlag( );
    4067 #else
    4068   Int layerIdInVPS = getVPS()->getLayerIdInNuh( m_layerId );
    4069 #if H_3D_VSP
    4070   setupLUT = setupLUT || getVPS()->getViewSynthesisPredFlag( layerIdInVPS);
    4071 #endif
    4072 #endif
    40733928
    40743929#if H_3D_NBDV_REF
    4075 #if HHI_TOOL_PARAMETERS_I2_J0107
    40763930  setupLUT = setupLUT || getDepthRefinementFlag( );
    4077 #else
    4078   setupLUT = setupLUT || getVPS()->getDepthRefinementFlag( layerIdInVPS );
    4079 #endif
    40803931#endif
    40813932
    40823933#if H_3D_IV_MERGE
    4083 #if HHI_TOOL_PARAMETERS_I2_J0107
    40843934  setupLUT = setupLUT || ( getIvMvPredFlag() && getIsDepth() );
    4085 #else
    4086   setupLUT = setupLUT || ( getVPS()->getIvMvPredFlag(layerIdInVPS ) && getIsDepth() );
    4087 #endif
    4088 #endif
    4089 
    4090 #if !LGE_DDD_REMOVAL_J0042_J0030
    4091 #if H_3D_DDD
    4092 #if H_3D_FCO
    4093   if( getIsDepth() && getViewIndex() > 0 && getVPS()->getMPIFlag(layerIdInVPS))
    4094 #else
    4095   if( getIsDepth() && getViewIndex() > 0 )
    4096 #endif
    4097   {
    4098       TComSlice *pcTextSlice = getTexturePic()->getSlice( 0 );
    4099       memcpy( m_aiDDDInvScale, pcTextSlice->m_aiDDDInvScale, sizeof( Int ) * getViewIndex() );
    4100       memcpy( m_aiDDDInvOffset, pcTextSlice->m_aiDDDInvOffset, sizeof( Int ) * getViewIndex() );
    4101       memcpy( m_aiDDDShift, pcTextSlice->m_aiDDDShift, sizeof( Int ) * getViewIndex() );             
    4102   } 
    4103 #endif
    4104 #endif
     3935#endif
     3936
    41053937
    41063938  if( !setupLUT )
     
    41513983      m_depthToDisparityF[ i ][ d ] = ( invCodScale[ i ] * d + invOffset ) >> log2Div;
    41523984    }
    4153 #if !LGE_DDD_REMOVAL_J0042_J0030
    4154 #if H_3D_DDD
    4155     initializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i );
    4156 #endif
    4157 #endif
    4158   }
    4159 }
    4160 #endif
    4161 #endif
    4162 
    4163 #if !LGE_DDD_REMOVAL_J0042_J0030
    4164 #if H_3D_DDD
    4165 Void TComSlice::initializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx )
    4166 {
    4167     UInt uiViewId     = getViewIndex();
    4168 
    4169     if( uiViewId == 0 )
    4170     {
    4171         m_aiDDDInvScale[ iBaseViewIdx ] = m_aiDDDInvOffset[ iBaseViewIdx ] = m_aiDDDShift[ iBaseViewIdx ] = 0;
    4172         return;
    4173     }
    4174 
    4175 
    4176     Int iSign = iCodedScale >= 0 ? 1 : -1;
    4177     iCodedScale = abs( iCodedScale );
    4178 
    4179     Int iBitWidth = 0;
    4180 
    4181     const Int iInvPres = 9;
    4182 
    4183     while( ((( 1 << iBitWidth ) << 1 ) <= iCodedScale ) )
    4184     {
    4185         iBitWidth ++;
    4186     }
    4187     iBitWidth += iInvPres;
    4188     Int iTargetValue =  1 << iBitWidth;
    4189 
    4190     Int iMinError = MAX_INT;
    4191     Int iBestD = 1 << ( iInvPres - 1 );
    4192     for( Int d = 1 << ( iInvPres - 1 ); d < ( 1 << iInvPres ); d++ )
    4193     {
    4194         Int iError = abs( iCodedScale * d - iTargetValue );
    4195         if( iError < iMinError )
    4196         {
    4197             iMinError = iError;
    4198             iBestD = d;
    4199         }
    4200         if( iMinError == 0 )
    4201         {
    4202             break;
    4203         }
    4204     }
    4205     Int iRoundingDir = 0;
    4206     if( iCodedScale * iBestD > iTargetValue )
    4207     {
    4208         iRoundingDir = -1;
    4209     }
    4210     else if( iCodedScale * iBestD < iTargetValue )
    4211     {
    4212         iRoundingDir = 1;
    4213     }
    4214     Int iCamPres = uiCamParsCodedPrecision - 1;
    4215     m_aiDDDInvScale [ iBaseViewIdx ] = ( iBestD << ( iCamPres + g_bitDepthY )) * iSign;
    4216     m_aiDDDInvOffset[ iBaseViewIdx ] = -iSign * iBestD * ( iCodedOffset << g_bitDepthY );
    4217     m_aiDDDShift    [ iBaseViewIdx ] = iBitWidth;
    4218     m_aiDDDInvOffset[ iBaseViewIdx ] += 1 << ( m_aiDDDShift[ iBaseViewIdx ] - 1 );
    4219     m_aiDDDInvOffset[ iBaseViewIdx ] += ( 1 << ( m_aiDDDShift[ iBaseViewIdx ] - 4 ) ) * iRoundingDir;
    4220 
    4221     return;
    4222 }
    4223 
    4224 
    4225 #endif
    4226 #endif
     3985  }
     3986}
     3987#endif
     3988#endif
     3989
    42273990
    42283991#if H_MV
     
    42584021#endif
    42594022
    4260 #if !LGE_DDD_REMOVAL_J0042_J0030
    4261 #if H_3D_DBBP
    4262 Int TComSlice::getDepthFromDV( Int iDV, Int iBaseViewIdx )
    4263 {
    4264   return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]);
    4265 }
    4266 #endif
    4267 #endif
    4268 
    4269 #if HHI_TOOL_PARAMETERS_I2_J0107
     4023
    42704024#if H_3D
    42714025
     
    43644118}
    43654119#endif
    4366 #endif
    43674120
    43684121
Note: See TracChangeset for help on using the changeset viewer.