Changeset 445 in SHVCSoftware for branches/SHM-4.0-dev/source/Lib


Ignore:
Timestamp:
7 Nov 2013, 08:07:50 (11 years ago)
Author:
seregin
Message:

enable layer-specific CTB structure

Location:
branches/SHM-4.0-dev/source/Lib
Files:
7 edited

Legend:

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

    r442 r445  
    40044004  uiPelY = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getHeight() - 1, uiPelY);
    40054005
     4006#if !LAYER_CTB
    40064007  UInt uiMinUnitSize = m_pcPic->getMinCUWidth();
     4008#endif
    40074009
    40084010#if SCALED_REF_LAYER_OFFSETS
     
    40344036  }
    40354037
     4038#if LAYER_CTB
     4039  UInt baseMaxCUHeight = cBaseColPic->getPicSym()->getMaxCUHeight();
     4040  UInt baseMaxCUWidth  = cBaseColPic->getPicSym()->getMaxCUWidth();
     4041  UInt baseMinUnitSize = cBaseColPic->getMinCUWidth();
     4042 
     4043  uiCUAddrBase = ( iBY / cBaseColPic->getPicSym()->getMaxCUHeight() ) * cBaseColPic->getFrameWidthInCU() + ( iBX / cBaseColPic->getPicSym()->getMaxCUWidth() );
     4044#else
    40364045  uiCUAddrBase = (iBY/g_uiMaxCUHeight)*cBaseColPic->getFrameWidthInCU() + (iBX/g_uiMaxCUWidth);
     4046#endif
    40374047
    40384048  assert(uiCUAddrBase < cBaseColPic->getNumCUsInFrame());
    40394049
     4050#if LAYER_CTB
     4051  UInt uiRasterAddrBase = ( iBY - (iBY/baseMaxCUHeight)*baseMaxCUHeight ) / baseMinUnitSize * cBaseColPic->getNumPartInWidth() + ( iBX - (iBX/baseMaxCUWidth)*baseMaxCUWidth ) / baseMinUnitSize;
     4052 
     4053  uiAbsPartIdxBase = g_auiLayerRasterToZscan[cBaseColPic->getLayerId()][uiRasterAddrBase];
     4054#else
    40404055  UInt uiRasterAddrBase = (iBY - (iBY/g_uiMaxCUHeight)*g_uiMaxCUHeight)/uiMinUnitSize*cBaseColPic->getNumPartInWidth()
    40414056    + (iBX - (iBX/g_uiMaxCUWidth)*g_uiMaxCUWidth)/uiMinUnitSize;
    40424057
    40434058  uiAbsPartIdxBase = g_auiRasterToZscan[uiRasterAddrBase];
     4059#endif
    40444060
    40454061  return cBaseColPic->getCU(uiCUAddrBase);
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPicSym.h

    r442 r445  
    126126  TComDataCU*&  getCU( UInt uiCUAddr )  { return m_apcTComDataCU[uiCUAddr];     }
    127127 
     128#if LAYER_CTB
     129  UInt        getMaxCUWidth()           { return m_uiMaxCUWidth;                }
     130  UInt        getMaxCUHeight()          { return m_uiMaxCUHeight;               }
     131#endif
     132
    128133#if AVC_SYNTAX
    129134  UInt        getMaxCUWidth()           { return m_uiMaxCUWidth;                }
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPicYuv.cpp

    r313 r445  
    9090  Int numCuInHeight = m_iPicHeight / m_iCuHeight + (m_iPicHeight % m_iCuHeight != 0);
    9191 
     92#if LAYER_CTB
     93  m_iLumaMarginX    = uiMaxCUWidth  + 16; // for 16-byte alignment
     94  m_iLumaMarginY    = uiMaxCUHeight + 16;  // margin for 8-tap filter and infinite padding
     95#else
    9296  m_iLumaMarginX    = g_uiMaxCUWidth  + 16; // for 16-byte alignment
    9397  m_iLumaMarginY    = g_uiMaxCUHeight + 16;  // margin for 8-tap filter and infinite padding
     98#endif
    9499 
    95100  m_iChromaMarginX  = m_iLumaMarginX>>1;
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComRom.cpp

    r442 r445  
    8686// Data structure related table & variable
    8787// ====================================================================================================================
    88 
     88#if LAYER_CTB
     89UInt g_auiLayerMaxCUWidth[MAX_LAYERS];
     90UInt g_auiLayerMaxCUHeight[MAX_LAYERS];
     91UInt g_auiLayerMaxCUDepth[MAX_LAYERS];
     92UInt g_auiLayerAddCUDepth[MAX_LAYERS];
     93UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
     94UInt g_auiLayerRasterToZscan[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
     95UInt g_auiLayerRasterToPelX[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
     96UInt g_auiLayerRasterToPelY[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
     97#endif
    8998UInt g_uiMaxCUWidth  = MAX_CU_SIZE;
    9099UInt g_uiMaxCUHeight = MAX_CU_SIZE;
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComRom.h

    r442 r445  
    8181
    8282// global variable (LCU width/height, max. CU depth)
     83#if LAYER_CTB
     84extern       UInt g_auiLayerMaxCUWidth[MAX_LAYERS];
     85extern       UInt g_auiLayerMaxCUHeight[MAX_LAYERS];
     86extern       UInt g_auiLayerMaxCUDepth[MAX_LAYERS];
     87extern       UInt g_auiLayerAddCUDepth[MAX_LAYERS];
     88extern       UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
     89extern       UInt g_auiLayerRasterToZscan[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
     90extern       UInt g_auiLayerRasterToPelX[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
     91extern       UInt g_auiLayerRasterToPelY[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
     92#endif
    8393extern       UInt g_uiMaxCUWidth;
    8494extern       UInt g_uiMaxCUHeight;
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h

    r442 r445  
    6464#define VERT_MV_CONSTRAINT               1      ///< Vertical MV component constraint flag
    6565#define SCALABILITY_MASK_E0104           1      ///< JCT3V-E0104: scalability mask for depth
     66#define LAYER_CTB                        0      ///< enable layer-specific CTB structure
    6667
    6768#define ILP_SSH_SIG                      1      ///< JCTVC-N0195 proposal 2, JCTVC-N0118: add presence flag in VPS ext to condition inter-layer prediction signaling in slice segment header
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r442 r445  
    175175    }
    176176  }
     177
     178#if LAYER_CTB
     179  memcpy(g_auiLayerZscanToRaster[m_layerId], g_auiZscanToRaster, sizeof( g_auiZscanToRaster ) );
     180  memcpy(g_auiLayerRasterToZscan[m_layerId], g_auiRasterToZscan, sizeof( g_auiRasterToZscan ) );
     181  memcpy(g_auiLayerRasterToPelX[m_layerId],  g_auiRasterToPelX,  sizeof( g_auiRasterToPelX ) );
     182  memcpy(g_auiLayerRasterToPelY[m_layerId],  g_auiRasterToPelY,  sizeof( g_auiRasterToPelY ) );
     183#endif
    177184}
    178185
Note: See TracChangeset for help on using the changeset viewer.