Changeset 1030 in SHVCSoftware


Ignore:
Timestamp:
26 Feb 2015, 23:22:07 (10 years ago)
Author:
seregin
Message:

fix for the ticket #70

Location:
branches/SHM-dev/source
Files:
11 edited

Legend:

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

    r1029 r1030  
    815815#endif
    816816#if O0098_SCALED_REF_LAYER_ID
    817   string    cfg_scaledRefLayerId [MAX_LAYERS];
     817  string    cfg_refLocationOffsetLayerId [MAX_LAYERS];
    818818#endif
    819819  string    cfg_scaledRefLayerLeftOffset [MAX_LAYERS];
     
    821821  string    cfg_scaledRefLayerRightOffset [MAX_LAYERS];
    822822  string    cfg_scaledRefLayerBottomOffset [MAX_LAYERS];
    823   Int*      cfg_numScaledRefLayerOffsets[MAX_LAYERS];
     823  Int*      cfg_numRefLayerLocationOffsets[MAX_LAYERS];
    824824#if REF_REGION_OFFSET
    825825  string    cfg_scaledRefLayerOffsetPresentFlag [MAX_LAYERS];
     
    843843
    844844#if O0098_SCALED_REF_LAYER_ID
    845   string*    cfg_scaledRefLayerIdPtr           [MAX_LAYERS];
     845  string*    cfg_refLocationOffsetLayerIdPtr   [MAX_LAYERS];
    846846#endif
    847847  string*    cfg_scaledRefLayerLeftOffsetPtr   [MAX_LAYERS];
     
    944944    cfg_predLayerIdsPtr     [layer]  = &cfg_predLayerIds[layer];
    945945#endif
    946     cfg_numScaledRefLayerOffsets [layer] = &m_acLayerCfg[layer].m_numScaledRefLayerOffsets;
     946    cfg_numRefLayerLocationOffsets [layer] = &m_acLayerCfg[layer].m_numRefLayerLocationOffsets;
    947947    cfg_waveFrontSynchro[layer]  = &m_acLayerCfg[layer].m_waveFrontSynchro;
    948948    for(Int i = 0; i < MAX_LAYERS; i++)
    949949    {
    950950#if O0098_SCALED_REF_LAYER_ID
    951       cfg_scaledRefLayerIdPtr          [layer] = &cfg_scaledRefLayerId[layer];
     951      cfg_refLocationOffsetLayerIdPtr  [layer] = &cfg_refLocationOffsetLayerId[layer];
    952952#endif
    953953      cfg_scaledRefLayerLeftOffsetPtr  [layer] = &cfg_scaledRefLayerLeftOffset[layer];
     
    11801180  ("InternalBitDepthC",                             m_internalBitDepthC,                                     0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
    11811181#endif
    1182   ("NumScaledRefLayerOffsets%d",                    cfg_numScaledRefLayerOffsets,                0, MAX_LAYERS,  "Number of scaled offset layer sets ")
     1182  ("NumRefLocationOffsets%d",                       cfg_numRefLayerLocationOffsets,              0, MAX_LAYERS,  "Number of reference layer offset sets ")
    11831183#if O0098_SCALED_REF_LAYER_ID
    1184   ("ScaledRefLayerId%d",                            cfg_scaledRefLayerIdPtr,            string(""), MAX_LAYERS, "Layer ID of scaled base layer picture")
     1184  ("RefLocationOffsetLayerId%d",                    cfg_refLocationOffsetLayerIdPtr,    string(""), MAX_LAYERS, "Layer ID of reference location offset")
    11851185#endif                                             
    11861186  ("ScaledRefLayerLeftOffset%d",                    cfg_scaledRefLayerLeftOffsetPtr,    string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to"
     
    21552155
    21562156    // If number of scaled ref. layer offsets is non-zero, at least one of the offsets should be specified
    2157     if(m_acLayerCfg[layer].m_numScaledRefLayerOffsets)
     2157    if(m_acLayerCfg[layer].m_numRefLayerLocationOffsets)
    21582158    {
    21592159#if O0098_SCALED_REF_LAYER_ID
    2160       assert( strcmp(cfg_scaledRefLayerId[layer].c_str(),  ""));
     2160      assert( strcmp(cfg_refLocationOffsetLayerId[layer].c_str(),  ""));
    21612161#endif
    21622162#if REF_REGION_OFFSET
     
    22012201#if O0098_SCALED_REF_LAYER_ID
    22022202    // ID //
    2203     if(strcmp(cfg_scaledRefLayerId[layer].c_str(),  ""))
    2204     {
    2205       cfgStringToArray( &tempArray, cfg_scaledRefLayerId[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "ScaledRefLayerId");
     2203    if(strcmp(cfg_refLocationOffsetLayerId[layer].c_str(),  ""))
     2204    {
     2205      cfgStringToArray( &tempArray, cfg_refLocationOffsetLayerId[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "RefLocationOffsetLayerId");
    22062206      if(tempArray)
    22072207      {
    2208         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2208        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    22092209        {
    2210           m_acLayerCfg[layer].m_scaledRefLayerId[i] = tempArray[i];
     2210          m_acLayerCfg[layer].m_refLocationOffsetLayerId[i] = tempArray[i];
    22112211        }
    22122212        delete [] tempArray; tempArray = NULL;
     
    22192219    if(strcmp(cfg_scaledRefLayerOffsetPresentFlag[layer].c_str(),  ""))
    22202220    {
    2221       cfgStringToArray( &tempArray, cfg_scaledRefLayerOffsetPresentFlag[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "ScaledRefLayerOffsetPresentFlag");
     2221      cfgStringToArray( &tempArray, cfg_scaledRefLayerOffsetPresentFlag[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "ScaledRefLayerOffsetPresentFlag");
    22222222      if(tempArray)
    22232223      {
    2224         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2224        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    22252225        {
    22262226          m_acLayerCfg[layer].m_scaledRefLayerOffsetPresentFlag[i] = tempArray[i];
     
    22342234    if(strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(),  ""))
    22352235    {
    2236       cfgStringToArray( &tempArray, cfg_scaledRefLayerLeftOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "LeftOffset");
     2236      cfgStringToArray( &tempArray, cfg_scaledRefLayerLeftOffset[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "LeftOffset");
    22372237      if(tempArray)
    22382238      {
    2239         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2239        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    22402240        {
    22412241          m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i] = tempArray[i];
     
    22482248    if(strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(),  ""))
    22492249    {
    2250       cfgStringToArray( &tempArray, cfg_scaledRefLayerTopOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "TopOffset");
     2250      cfgStringToArray( &tempArray, cfg_scaledRefLayerTopOffset[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "TopOffset");
    22512251      if(tempArray)
    22522252      {
    2253         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2253        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    22542254        {
    22552255          m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i] = tempArray[i];
     
    22622262    if(strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(),  ""))
    22632263    {
    2264       cfgStringToArray( &tempArray, cfg_scaledRefLayerRightOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RightOffset");
     2264      cfgStringToArray( &tempArray, cfg_scaledRefLayerRightOffset[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "RightOffset");
    22652265      if(tempArray)
    22662266      {
    2267         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2267        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    22682268        {
    22692269          m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i] = tempArray[i];
     
    22762276    if(strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),  ""))
    22772277    {
    2278       cfgStringToArray( &tempArray, cfg_scaledRefLayerBottomOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "BottomOffset");
     2278      cfgStringToArray( &tempArray, cfg_scaledRefLayerBottomOffset[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "BottomOffset");
    22792279      if(tempArray)
    22802280      {
    2281         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2281        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    22822282        {
    22832283          m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i] = tempArray[i];
     
    23052305    if(strcmp(cfg_refRegionOffsetPresentFlag[layer].c_str(),  ""))
    23062306    {
    2307       cfgStringToArray( &tempArray, cfg_refRegionOffsetPresentFlag[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RefRegionOffsetPresentFlag");
     2307      cfgStringToArray( &tempArray, cfg_refRegionOffsetPresentFlag[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "RefRegionOffsetPresentFlag");
    23082308      if(tempArray)
    23092309      {
    2310         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2310        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    23112311        {
    23122312          m_acLayerCfg[layer].m_refRegionOffsetPresentFlag[i] = tempArray[i];
     
    23192319    if(strcmp(cfg_refRegionLeftOffset[layer].c_str(),  ""))
    23202320    {
    2321       cfgStringToArray( &tempArray, cfg_refRegionLeftOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RefRegionLeftOffset");
     2321      cfgStringToArray( &tempArray, cfg_refRegionLeftOffset[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "RefRegionLeftOffset");
    23222322      if(tempArray)
    23232323      {
    2324         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2324        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    23252325        {
    23262326          m_acLayerCfg[layer].m_refRegionLeftOffset[i] = tempArray[i];
     
    23332333    if(strcmp(cfg_refRegionTopOffset[layer].c_str(),  ""))
    23342334    {
    2335       cfgStringToArray( &tempArray, cfg_refRegionTopOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RefRegionTopOffset");
     2335      cfgStringToArray( &tempArray, cfg_refRegionTopOffset[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "RefRegionTopOffset");
    23362336      if(tempArray)
    23372337      {
    2338         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2338        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    23392339        {
    23402340          m_acLayerCfg[layer].m_refRegionTopOffset[i] = tempArray[i];
     
    23472347    if(strcmp(cfg_refRegionRightOffset[layer].c_str(),  ""))
    23482348    {
    2349       cfgStringToArray( &tempArray, cfg_refRegionRightOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RefRegionRightOffset");
     2349      cfgStringToArray( &tempArray, cfg_refRegionRightOffset[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "RefRegionRightOffset");
    23502350      if(tempArray)
    23512351      {
    2352         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2352        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    23532353        {
    23542354          m_acLayerCfg[layer].m_refRegionRightOffset[i] = tempArray[i];
     
    23612361    if(strcmp(cfg_refRegionBottomOffset[layer].c_str(),  ""))
    23622362    {
    2363       cfgStringToArray( &tempArray, cfg_refRegionBottomOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RefRegionBottomOffset");
     2363      cfgStringToArray( &tempArray, cfg_refRegionBottomOffset[layer], m_acLayerCfg[layer].m_numRefLayerLocationOffsets, "RefRegionBottomOffset");
    23642364      if(tempArray)
    23652365      {
    2366         for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     2366        for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    23672367        {
    23682368          m_acLayerCfg[layer].m_refRegionBottomOffset[i] = tempArray[i];
     
    23732373#endif
    23742374#if R0209_GENERIC_PHASE
    2375     Int numPhaseSet = m_acLayerCfg[layer].m_numScaledRefLayerOffsets;
     2375    Int numPhaseSet = m_acLayerCfg[layer].m_numRefLayerLocationOffsets;
    23762376
    23772377    // Presense Flag //
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp

    r1029 r1030  
    6464  m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0;
    6565  m_aiPad[1] = m_aiPad[0] = 0;
    66   m_numScaledRefLayerOffsets = 0;
     66  m_numRefLayerLocationOffsets = 0;
    6767#if O0098_SCALED_REF_LAYER_ID
    68   ::memset(m_scaledRefLayerId,           0, sizeof(m_scaledRefLayerId));
     68  ::memset(m_refLocationOffsetLayerId,   0, sizeof(m_refLocationOffsetLayerId));
    6969#endif
    7070  ::memset(m_scaledRefLayerLeftOffset,   0, sizeof(m_scaledRefLayerLeftOffset));
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r1029 r1030  
    9393  Int*      m_aidQP;                                          ///< array of slice QP values
    9494  TAppEncCfg* m_cAppEncCfg;                                   ///< pointer to app encoder config
    95   Int       m_numScaledRefLayerOffsets;
     95  Int       m_numRefLayerLocationOffsets;
    9696#if O0098_SCALED_REF_LAYER_ID
    97   Int       m_scaledRefLayerId          [MAX_LAYERS];
     97  Int       m_refLocationOffsetLayerId  [MAX_LAYERS];
    9898#endif
    9999  Int       m_scaledRefLayerLeftOffset  [MAX_LAYERS];
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1029 r1030  
    421421        }
    422422      }
    423 #if REF_REGION_OFFSET
    424       for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
    425       {
    426 #if AUXILIARY_PICTURES
    427         Int cf = m_acLayerCfg[i].m_chromaFormatIDC;
    428         Int rlSubWidthC  = ( cf == CHROMA_420 || cf == CHROMA_422 ) ? 2 : 1;
    429         Int rlSubHeightC = ( cf == CHROMA_420 ) ? 2 : 1;
    430 #else
    431         Int rlSubWidthC  = 2;
    432         Int rlSubHeightC = 2;
    433 #endif
    434         m_acTEncTop[layer].setRefRegionOffsetPresentFlag                  ( i, m_acLayerCfg[layer].m_refRegionOffsetPresentFlag[i] );
    435         m_acTEncTop[layer].getRefLayerWindow(i).setWindow                 ( rlSubWidthC  * m_acLayerCfg[layer].m_refRegionLeftOffset[i], rlSubWidthC  * m_acLayerCfg[layer].m_refRegionRightOffset[i],
    436                                                                             rlSubHeightC * m_acLayerCfg[layer].m_refRegionTopOffset[i],  rlSubHeightC * m_acLayerCfg[layer].m_refRegionBottomOffset[i]);
    437       }
    438 #endif
    439423    }
    440424    else
     
    762746    m_acTEncTop[layer].setLog2MaxMvLengthVertical               ( m_log2MaxMvLengthVertical );
    763747    m_acTEncTop[layer].setElRapSliceTypeB                       (layer == 0? 0 : m_elRapSliceBEnabled);
     748
    764749    if( layer > 0 )
    765750    {
    766751#if REF_REGION_OFFSET
    767752#if AUXILIARY_PICTURES
    768       Int cf = m_acLayerCfg[layer].m_chromaFormatIDC;
    769       Int subWidthC  = ( cf == CHROMA_420 || cf == CHROMA_422 ) ? 2 : 1;
    770       Int subHeightC = ( cf == CHROMA_420 ) ? 2 : 1;
     753      Int subWidthC  = ( m_acLayerCfg[layer].m_chromaFormatIDC == CHROMA_420 || m_acLayerCfg[layer].m_chromaFormatIDC == CHROMA_422 ) ? 2 : 1;
     754      Int subHeightC = ( m_acLayerCfg[layer].m_chromaFormatIDC == CHROMA_420 ) ? 2 : 1;
    771755#else
    772756      Int subWidthC  = 2;
     
    774758#endif
    775759#endif
    776       m_acTEncTop[layer].setNumScaledRefLayerOffsets            ( m_acLayerCfg[layer].m_numScaledRefLayerOffsets );
    777       for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     760      m_acTEncTop[layer].setNumRefLayerLocationOffsets          ( m_acLayerCfg[layer].m_numRefLayerLocationOffsets );
     761      for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++)
    778762      {
    779763#if O0098_SCALED_REF_LAYER_ID
    780         m_acTEncTop[layer].setScaledRefLayerId                  (i, m_acLayerCfg[layer].m_scaledRefLayerId[i]);
     764        m_acTEncTop[layer].setRefLocationOffsetLayerId          (i, m_acLayerCfg[layer].m_refLocationOffsetLayerId[i]);
    781765#endif
    782766#if REF_REGION_OFFSET
     
    788772        m_acTEncTop[layer].setVertPhasePositionEnableFlag       ( i, m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] );
    789773        m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],
    790                                                                   2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i], m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] );
     774          2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i], m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] );
    791775#else
    792776        m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],
    793                                                                   2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]);
    794 #endif
    795 #endif
     777          2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]);
     778#endif
     779#endif
     780        Int rlSubWidthC  = ( m_acLayerCfg[i].m_chromaFormatIDC == CHROMA_420 || m_acLayerCfg[i].m_chromaFormatIDC == CHROMA_422 ) ? 2 : 1;
     781        Int rlSubHeightC = ( m_acLayerCfg[i].m_chromaFormatIDC == CHROMA_420 ) ? 2 : 1;
     782
     783        m_acTEncTop[layer].setRefRegionOffsetPresentFlag        ( i, m_acLayerCfg[layer].m_refRegionOffsetPresentFlag[i] );
     784        m_acTEncTop[layer].getRefLayerWindow(i).setWindow       ( rlSubWidthC  * m_acLayerCfg[layer].m_refRegionLeftOffset[i], rlSubWidthC  * m_acLayerCfg[layer].m_refRegionRightOffset[i],
     785                                                                  rlSubHeightC * m_acLayerCfg[layer].m_refRegionTopOffset[i],  rlSubHeightC * m_acLayerCfg[layer].m_refRegionBottomOffset[i]);
    796786#if R0209_GENERIC_PHASE
    797787        m_acTEncTop[layer].setResamplePhaseSetPresentFlag       ( i, m_acLayerCfg[layer].m_resamplePhaseSetPresentFlag[i] );
     
    803793      }
    804794    }
     795
    805796#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    806797    m_acTEncTop[layer].setAdaptiveResolutionChange               ( m_adaptiveResolutionChange );
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r1029 r1030  
    34303430#if MOVE_SCALED_OFFSET_TO_PPS
    34313431#if O0098_SCALED_REF_LAYER_ID
    3432   Int leftStartL = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset();
    3433   Int topStartL  = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowTopOffset();
     3432  Int leftStartL = m_pcSlice->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset();
     3433  Int topStartL  = m_pcSlice->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowTopOffset();
    34343434#else
    34353435  Int leftStartL = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset();
     
    34473447
    34483448#if REF_REGION_OFFSET
    3449   const Window &windowRL = baseColPic->getSlice(0)->getPPS()->getRefLayerWindow(refLayerIdc);
     3449  const Window &windowRL = m_pcSlice->getPPS()->getRefLayerWindow(refLayerIdc);
    34503450  Int iBX = (((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16) + windowRL.getWindowLeftOffset();
    34513451  Int iBY = (((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16) + windowRL.getWindowTopOffset();
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1029 r1030  
    25382538#endif
    25392539#if MOVE_SCALED_OFFSET_TO_PPS
    2540 , m_numScaledRefLayerOffsets  ( 0 )
     2540, m_numRefLayerLocationOffsets  ( 0 )
    25412541#endif
    25422542#if Q0048_CGS_3D_ASYMLUT
     
    32343234  static Window win;
    32353235
    3236   for (Int i = 0; i < m_numScaledRefLayerOffsets; i++)
    3237   {
    3238     if (layerId == m_scaledRefLayerId[i])
     3236  for (Int i = 0; i < m_numRefLayerLocationOffsets; i++)
     3237  {
     3238    if (layerId == m_refLocationOffsetLayerId[i])
    32393239    {
    32403240      return m_scaledRefLayerWindow[i];
     
    32513251  static Window win;
    32523252
    3253   for (Int i = 0; i < m_numScaledRefLayerOffsets; i++)
    3254   {
    3255     if (layerId == m_scaledRefLayerId[i])
     3253  for (Int i = 0; i < m_numRefLayerLocationOffsets; i++)
     3254  {
     3255    if (layerId == m_refLocationOffsetLayerId[i])
    32563256    {
    32573257      return m_refLayerWindow[i];
     
    42774277      pcIlpPic[refLayerIdc]->setIsLongTerm(1);
    42784278
     4279      // assign PPS to IRLP to be used for reference location offsets
     4280      pcIlpPic[refLayerIdc]->getSlice(0)->setPPS( m_pcPic->getSlice(0)->getPPS() );
     4281
    42794282#if REF_IDX_MFM
    42804283      if( m_bMFMEnabledFlag && !(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) )
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1029 r1030  
    20532053#endif
    20542054#if MOVE_SCALED_OFFSET_TO_PPS
    2055   UInt     m_numScaledRefLayerOffsets;
     2055  UInt     m_numRefLayerLocationOffsets;
    20562056#if O0098_SCALED_REF_LAYER_ID
    2057   UInt     m_scaledRefLayerId[MAX_LAYERS];
     2057  UInt     m_refLocationOffsetLayerId[MAX_LAYERS];
    20582058#endif
    20592059  Window   m_scaledRefLayerWindow[MAX_LAYERS];
     
    22212221#endif
    22222222#if MOVE_SCALED_OFFSET_TO_PPS
    2223   UInt     getNumScaledRefLayerOffsets()       { return m_numScaledRefLayerOffsets; }
    2224   Void     setNumScaledRefLayerOffsets(Int x)  { m_numScaledRefLayerOffsets = x;    }
     2223  UInt     getNumRefLayerLocationOffsets()       { return m_numRefLayerLocationOffsets; }
     2224  Void     setNumRefLayerLocationOffsets(Int x)  { m_numRefLayerLocationOffsets = x;    }
    22252225#if O0098_SCALED_REF_LAYER_ID
    2226   UInt     getScaledRefLayerId(Int x)          { return m_scaledRefLayerId[x]; }
    2227   Void     setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id;   }
     2226  UInt     getRefLocationOffsetLayerId(Int x)          { return m_refLocationOffsetLayerId[x]; }
     2227  Void     setRefLocationOffsetLayerId(Int x, UInt id) { m_refLocationOffsetLayerId[x] = id;   }
    22282228  Window&  getScaledRefLayerWindowForLayer( Int layerId );
    22292229#endif
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1029 r1030  
    412412
    413413#if REF_REGION_OFFSET
    414             READ_UVLC( uiCode,      "num_ref_loc_offsets" ); pcPPS->setNumScaledRefLayerOffsets(uiCode);
    415             for(Int k = 0; k < pcPPS->getNumScaledRefLayerOffsets(); k++)
     414            READ_UVLC( uiCode,      "num_ref_loc_offsets" ); pcPPS->setNumRefLayerLocationOffsets(uiCode);
     415            for(Int k = 0; k < pcPPS->getNumRefLayerLocationOffsets(); k++)
    416416            {
    417               READ_CODE( 6, uiCode,  "ref_loc_offset_layer_id" );  pcPPS->setScaledRefLayerId( k, uiCode );
     417              READ_CODE( 6, uiCode,  "ref_loc_offset_layer_id" );  pcPPS->setRefLocationOffsetLayerId( k, uiCode );
    418418              READ_FLAG( uiCode, "scaled_ref_layer_offset_present_flag" );   pcPPS->setScaledRefLayerOffsetPresentFlag( k, uiCode );
    419419              if (uiCode)
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1029 r1030  
    317317
    318318#if REF_REGION_OFFSET
    319             WRITE_UVLC( pcPPS->getNumScaledRefLayerOffsets(),      "num_ref_loc_offsets" );
    320             for(Int k = 0; k < pcPPS->getNumScaledRefLayerOffsets(); k++)
     319            WRITE_UVLC( pcPPS->getNumRefLayerLocationOffsets(),      "num_ref_loc_offsets" );
     320            for(Int k = 0; k < pcPPS->getNumRefLayerLocationOffsets(); k++)
    321321            {
    322               WRITE_CODE( pcPPS->getScaledRefLayerId(k), 6, "ref_loc_offset_layer_id" );
     322              WRITE_CODE( pcPPS->getRefLocationOffsetLayerId(k), 6, "ref_loc_offset_layer_id" );
    323323              WRITE_FLAG( pcPPS->getScaledRefLayerOffsetPresentFlag(k) ? 1 : 0, "scaled_ref_layer_offset_prsent_flag" );
    324324              if (pcPPS->getScaledRefLayerOffsetPresentFlag(k))
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1029 r1030  
    8484  m_bMFMEnabledFlag = false;
    8585#endif
    86   m_numScaledRefLayerOffsets = 0;
     86  m_numRefLayerLocationOffsets = 0;
    8787#if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
    8888  m_pocAdjustmentValue     = 0;
     
    11511151#endif
    11521152#if MOVE_SCALED_OFFSET_TO_PPS
    1153   m_cPPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets);
    1154   for(Int i = 0; i < m_cPPS.getNumScaledRefLayerOffsets(); i++)
     1153  m_cPPS.setNumRefLayerLocationOffsets(m_numRefLayerLocationOffsets);
     1154  for(Int i = 0; i < m_cPPS.getNumRefLayerLocationOffsets(); i++)
    11551155  {
    11561156#if O0098_SCALED_REF_LAYER_ID
    1157     m_cPPS.setScaledRefLayerId(i, m_scaledRefLayerId[i]);
     1157    m_cPPS.setRefLocationOffsetLayerId(i, m_refLocationOffsetLayerId[i]);
    11581158#endif
    11591159    m_cPPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i];
     
    11651165#if R0209_GENERIC_PHASE
    11661166    m_cPPS.setResamplePhaseSetPresentFlag( i, m_resamplePhaseSetPresentFlag[i] );
    1167     m_cPPS.setPhaseHorLuma( m_scaledRefLayerId[i], m_phaseHorLuma[i] );
    1168     m_cPPS.setPhaseVerLuma( m_scaledRefLayerId[i], m_phaseVerLuma[i] );
    1169     m_cPPS.setPhaseHorChroma( m_scaledRefLayerId[i], m_phaseHorChroma[i] );
    1170     m_cPPS.setPhaseVerChroma( m_scaledRefLayerId[i], m_phaseVerChroma[i] );
     1167    m_cPPS.setPhaseHorLuma( m_refLocationOffsetLayerId[i], m_phaseHorLuma[i] );
     1168    m_cPPS.setPhaseVerLuma( m_refLocationOffsetLayerId[i], m_phaseVerLuma[i] );
     1169    m_cPPS.setPhaseHorChroma( m_refLocationOffsetLayerId[i], m_phaseHorChroma[i] );
     1170    m_cPPS.setPhaseVerChroma( m_refLocationOffsetLayerId[i], m_phaseVerChroma[i] );
    11711171#endif
    11721172#if P0312_VERT_PHASE_ADJ
     
    16781678  static Window win;
    16791679
    1680   for (Int i = 0; i < m_numScaledRefLayerOffsets; i++)
    1681   {
    1682     if (layerId == m_scaledRefLayerId[i])
     1680  for (Int i = 0; i < m_numRefLayerLocationOffsets; i++)
     1681  {
     1682    if (layerId == m_refLocationOffsetLayerId[i])
    16831683    {
    16841684      return m_scaledRefLayerWindow[i];
     
    16941694  static Window win;
    16951695
    1696   for (Int i = 0; i < m_numScaledRefLayerOffsets; i++)
     1696  for (Int i = 0; i < m_numRefLayerLocationOffsets; i++)
    16971697  {
    16981698    if (layerId == m_refLayerId[i])
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h

    r1029 r1030  
    122122  Bool                    m_bMFMEnabledFlag;
    123123#endif
    124   UInt                    m_numScaledRefLayerOffsets;
     124  UInt                    m_numRefLayerLocationOffsets;
    125125#if O0098_SCALED_REF_LAYER_ID
    126   UInt                    m_scaledRefLayerId[MAX_LAYERS];
     126  UInt                    m_refLocationOffsetLayerId[MAX_LAYERS];
    127127#endif
    128128  Window                  m_scaledRefLayerWindow[MAX_LAYERS];
     
    224224  Int       getNumPicRcvd         ()            { return m_iNumPicRcvd;              }
    225225  Void      setNumPicRcvd         ( Int num )   { m_iNumPicRcvd = num;               }
    226   Void      setNumScaledRefLayerOffsets(Int x)  { m_numScaledRefLayerOffsets = x;    }
    227   UInt      getNumScaledRefLayerOffsets()       { return m_numScaledRefLayerOffsets; }
     226  Void      setNumRefLayerLocationOffsets(Int x)  { m_numRefLayerLocationOffsets = x;    }
     227  UInt      getNumRefLayerLocationOffsets()       { return m_numRefLayerLocationOffsets; }
    228228#if O0098_SCALED_REF_LAYER_ID
    229   Void      setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id;   }
    230   UInt      getScaledRefLayerId(Int x)          { return m_scaledRefLayerId[x]; }
     229  Void      setRefLocationOffsetLayerId(Int x, UInt id) { m_refLocationOffsetLayerId[x] = id;   }
     230  UInt      getRefLocationOffsetLayerId(Int x)          { return m_refLocationOffsetLayerId[x]; }
    231231  Window&   getScaledRefLayerWindowForLayer(Int layerId);
    232232#endif
Note: See TracChangeset for help on using the changeset viewer.