Changeset 288 in SHVCSoftware for branches/SHM-2.1-dev/source


Ignore:
Timestamp:
12 Jun 2013, 03:37:28 (12 years ago)
Author:
qualcomm
Message:

Changes made to signaling of scaled reference layer offsets.

Patch incorporating changes made to signaling of scaled reference layer offsets during SHVC editing. The number of sets of scaled reference layer offsets is signaled. Changes to configuration files also included.

From: Adarsh K. Ramasubramonian <aramasub@…>

Location:
branches/SHM-2.1-dev/source
Files:
15 edited

Legend:

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

    r282 r288  
    345345#endif
    346346#if SCALED_REF_LAYER_OFFSETS
    347   Int*    cfg_scaledRefLayerLeftOffset [MAX_LAYERS];
    348   Int*    cfg_scaledRefLayerTopOffset [MAX_LAYERS];
    349   Int*    cfg_scaledRefLayerRightOffset [MAX_LAYERS];
    350   Int*    cfg_scaledRefLayerBottomOffset [MAX_LAYERS];
     347  string    cfg_scaledRefLayerLeftOffset [MAX_LAYERS];
     348  string    cfg_scaledRefLayerTopOffset [MAX_LAYERS];
     349  string    cfg_scaledRefLayerRightOffset [MAX_LAYERS];
     350  string    cfg_scaledRefLayerBottomOffset [MAX_LAYERS];
     351  Int*      cfg_numScaledRefLayerOffsets[MAX_LAYERS];
     352
     353  string*    cfg_scaledRefLayerLeftOffsetPtr   [MAX_LAYERS];
     354  string*    cfg_scaledRefLayerTopOffsetPtr    [MAX_LAYERS];
     355  string*    cfg_scaledRefLayerRightOffsetPtr  [MAX_LAYERS];
     356  string*    cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS];
    351357#endif
    352358#if RC_SHVC_HARMONIZATION
     
    376382#endif
    377383#if SCALED_REF_LAYER_OFFSETS
    378     cfg_scaledRefLayerLeftOffset  [layer] = &m_acLayerCfg[layer].m_scaledRefLayerLeftOffset;
    379     cfg_scaledRefLayerTopOffset   [layer] = &m_acLayerCfg[layer].m_scaledRefLayerTopOffset;
    380     cfg_scaledRefLayerRightOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerRightOffset;
    381     cfg_scaledRefLayerBottomOffset[layer] = &m_acLayerCfg[layer].m_scaledRefLayerBottomOffset;
     384    cfg_numScaledRefLayerOffsets [layer] = &m_acLayerCfg[layer].m_numScaledRefLayerOffsets;
     385    for(Int i = 0; i < MAX_LAYERS; i++)
     386    {
     387      cfg_scaledRefLayerLeftOffsetPtr  [layer] = &cfg_scaledRefLayerLeftOffset[layer]  ;
     388      cfg_scaledRefLayerTopOffsetPtr   [layer] = &cfg_scaledRefLayerTopOffset[layer]   ;
     389      cfg_scaledRefLayerRightOffsetPtr [layer] = &cfg_scaledRefLayerRightOffset[layer] ;
     390      cfg_scaledRefLayerBottomOffsetPtr[layer] = &cfg_scaledRefLayerBottomOffset[layer];
     391    }
    382392#endif
    383393#if RC_SHVC_HARMONIZATION
     
    452462  ("InternalBitDepthC",       m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
    453463#if SCALED_REF_LAYER_OFFSETS
    454   ("ScaledRefLayerLeftOffset%d",   cfg_scaledRefLayerLeftOffset,  0, MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to"
     464  ("NumScaledRefLayerOffsets%d",    cfg_numScaledRefLayerOffsets,     0, MAX_LAYERS,  "Number of scaled offset layer sets ")
     465  ("ScaledRefLayerLeftOffset%d",   cfg_scaledRefLayerLeftOffsetPtr,  string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to"
    455466                                                                 " top-left luma sample of the EL picture, in units of two luma samples")
    456   ("ScaledRefLayerTopOffset%d",    cfg_scaledRefLayerTopOffset,   0, MAX_LAYERS,   "Vertical offset of top-left luma sample of scaled base layer picture with respect to"
     467  ("ScaledRefLayerTopOffset%d",    cfg_scaledRefLayerTopOffsetPtr,   string(""), MAX_LAYERS,   "Vertical offset of top-left luma sample of scaled base layer picture with respect to"
    457468                                                                 " top-left luma sample of the EL picture, in units of two luma samples")
    458   ("ScaledRefLayerRightOffset%d",  cfg_scaledRefLayerRightOffset, 0, MAX_LAYERS, "Horizontal offset of bottom-right luma sample of scaled base layer picture with respect to"
     469  ("ScaledRefLayerRightOffset%d",  cfg_scaledRefLayerRightOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of bottom-right luma sample of scaled base layer picture with respect to"
    459470                                                                 " bottom-right luma sample of the EL picture, in units of two luma samples")
    460   ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffset,0, MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to"
     471  ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to"
    461472                                                                 " bottom-right luma sample of the EL picture, in units of two luma samples")
    462473#endif
     
    892903    m_pRowHeight = NULL;
    893904  }
     905#if SCALED_REF_LAYER_OFFSETS
     906  for(Int layer = 0; layer < MAX_LAYERS; layer++)
     907  {
     908    // If number of scaled ref. layer offsets is non-zero, at least one of the offsets should be specified
     909    if(m_acLayerCfg[layer].m_numScaledRefLayerOffsets)
     910    {
     911      assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(),  "") ||
     912              strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") ||
     913              strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(),   "") ||
     914              strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"")
     915            );
     916    }
     917
     918    Int *tempArray = NULL;   // Contain the value
     919    // Left offset //
     920    if(strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(),  ""))
     921    {
     922      cfgStringToArray( &tempArray, cfg_scaledRefLayerLeftOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "LeftOffset");
     923      if(tempArray)
     924      {
     925        for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     926        {
     927          m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i] = tempArray[i];
     928        }
     929        delete [] tempArray; tempArray = NULL;
     930      }
     931    }
     932
     933    // Top offset //
     934    if(strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(),  ""))
     935    {
     936      cfgStringToArray( &tempArray, cfg_scaledRefLayerTopOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "TopOffset");
     937      if(tempArray)
     938      {
     939        for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     940        {
     941          m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i] = tempArray[i];
     942        }
     943        delete [] tempArray; tempArray = NULL;
     944      }
     945    }
     946
     947    // Right offset //
     948    if(strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(),  ""))
     949    {
     950      cfgStringToArray( &tempArray, cfg_scaledRefLayerRightOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RightOffset");
     951      if(tempArray)
     952      {
     953        for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     954        {
     955          m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i] = tempArray[i];
     956        }
     957        delete [] tempArray; tempArray = NULL;
     958      }
     959    }
     960
     961    // Bottom offset //
     962    if(strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),  ""))
     963    {
     964      cfgStringToArray( &tempArray, cfg_scaledRefLayerBottomOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "BottomOffset");
     965      if(tempArray)
     966      {
     967        for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     968        {
     969          m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i] = tempArray[i];
     970        }
     971        delete [] tempArray; tempArray = NULL;
     972      }
     973    }
     974  }
     975#endif
    894976#if VPS_EXTN_DIRECT_REF_LAYERS
    895977  for(Int layer = 0; layer < MAX_LAYERS; layer++)
     
    20962178}
    20972179
     2180#if SCALED_REF_LAYER_OFFSETS
     2181Void TAppEncCfg::cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString)
     2182{
     2183  Char *tempChar = cfgString.empty() ? NULL : strdup(cfgString.c_str());
     2184  if( numEntries > 0 )
     2185  {
     2186    Char *arrayEntry;
     2187    Int i = 0;
     2188    *arr = new Int[numEntries];
     2189
     2190    arrayEntry = strtok( tempChar, " ,");
     2191    while(arrayEntry != NULL)
     2192    {
     2193      if( i >= numEntries )
     2194      {
     2195        printf( "%c: The number of entries specified is larger than the allowed number.\n", logString );
     2196        exit( EXIT_FAILURE );
     2197      }
     2198      *( *arr + i ) = atoi( arrayEntry );
     2199      arrayEntry = strtok(NULL, " ,");
     2200      i++;
     2201    }
     2202    if( i < numEntries )
     2203    {
     2204      printf( "%c: Some entries are not specified.\n", logString );
     2205      exit( EXIT_FAILURE );
     2206    }
     2207  }
     2208  else
     2209  {
     2210    *arr = NULL;
     2211  }
     2212}
     2213#endif
    20982214//! \}
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.h

    r245 r288  
    390390  Char* getBLSyntaxFile()           { return m_BLSyntaxFile;      }
    391391#endif
     392#if SCALED_REF_LAYER_OFFSETS
     393  Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString);
     394#endif
    392395#endif
    393396};// END CLASS DEFINITION TAppEncCfg
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp

    r211 r288  
    3535  m_confLeft = m_confRight = m_confTop = m_confBottom = 0;
    3636  m_aiPad[1] = m_aiPad[0] = 0;
     37#if SCALED_REF_LAYER_OFFSETS
     38  m_numScaledRefLayerOffsets = 0;
     39  ::memset(m_scaledRefLayerLeftOffset,   0, sizeof(m_scaledRefLayerLeftOffset));
     40  ::memset(m_scaledRefLayerTopOffset,    0, sizeof(m_scaledRefLayerTopOffset));
     41  ::memset(m_scaledRefLayerRightOffset,  0, sizeof(m_scaledRefLayerRightOffset));
     42  ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset));
     43#endif
    3744}
    3845
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r282 r288  
    6868  TAppEncCfg* m_cAppEncCfg;                                   ///< pointer to app encoder config
    6969#if SCALED_REF_LAYER_OFFSETS
    70   Int       m_scaledRefLayerLeftOffset;
    71   Int       m_scaledRefLayerTopOffset;
    72   Int       m_scaledRefLayerRightOffset;
    73   Int       m_scaledRefLayerBottomOffset;
     70  Int       m_numScaledRefLayerOffsets  ;
     71  Int       m_scaledRefLayerLeftOffset  [MAX_LAYERS];
     72  Int       m_scaledRefLayerTopOffset   [MAX_LAYERS];
     73  Int       m_scaledRefLayerRightOffset [MAX_LAYERS];
     74  Int       m_scaledRefLayerBottomOffset[MAX_LAYERS];
    7475#endif 
    7576public:
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r282 r288  
    451451    if( layer > 0 )
    452452    {
    453       m_acTEncTop[layer].getScaledRefLayerWindow().setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset, 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset,
    454                                                   2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset, 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset); 
     453      m_acTEncTop[layer].setNumScaledRefLayerOffsets( m_acLayerCfg[layer].m_numScaledRefLayerOffsets );
     454      for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     455      {
     456        m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],
     457                                                  2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 
     458      }
    455459    }
    456460#endif
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r282 r288  
    42704270#if SIMPLIFIED_MV_POS_SCALING
    42714271#if SCALED_REF_LAYER_OFFSETS
    4272   Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow().getWindowLeftOffset();
    4273   Int topStartL  = this->getSlice()->getSPS()->getScaledRefLayerWindow().getWindowTopOffset();
     4272  Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset();
     4273  Int topStartL  = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset();
    42744274  Int iBX = ((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16;
    42754275  Int iBY = ((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16;
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp

    r282 r288  
    580580    {
    581581      Int numResampler = 0;
    582       const Window &scalEL = getSPS()->getScaledRefLayerWindow();
     582      const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]);
    583583      Int scalingOffset = ((scalEL.getWindowLeftOffset()   == 0 ) &&
    584584                           (scalEL.getWindowRightOffset()  == 0 ) &&
     
    17651765#if SVC_EXTENSION
    17661766, m_layerId(0)
     1767#endif
     1768#if SCALED_REF_LAYER_OFFSETS
     1769, m_numScaledRefLayerOffsets  (0)
    17671770#endif
    17681771{
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h

    r282 r288  
    10291029#endif
    10301030#if SCALED_REF_LAYER_OFFSETS
    1031   Window      m_scaledRefLayerWindow;
     1031  UInt        m_numScaledRefLayerOffsets;
     1032  Window      m_scaledRefLayerWindow[MAX_LAYERS];
    10321033#endif
    10331034public:
     
    11711172#endif
    11721173#if SCALED_REF_LAYER_OFFSETS
    1173   Window&  getScaledRefLayerWindow(     )   { return m_scaledRefLayerWindow; }
     1174  UInt     getNumScaledRefLayerOffsets()  { return m_numScaledRefLayerOffsets; }
     1175  Void     setNumScaledRefLayerOffsets(Int x)  { m_numScaledRefLayerOffsets = x; }
     1176  Window&  getScaledRefLayerWindow( Int x )   { return m_scaledRefLayerWindow[x]; }
    11741177#endif
    11751178};
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h

    r285 r288  
    4545#if SVC_EXTENSION
    4646#define SPS_EXTENSION                    1      ///< Define sps_extension() syntax structure
    47 #define SCALED_REF_LAYER_OFFSET_FLAG     1      ///< M0309: Signal scaled reference layer offsets in SPS
     47#define SCALED_REF_LAYER_OFFSET_FLAG     0      ///< M0309: Signal scaled reference layer offsets in SPS
    4848#define SCALED_REF_LAYER_OFFSETS         1      ///< M0309: Signal scaled reference layer offsets in SPS
    4949#define MAX_LAYERS                       2      ///< max number of layers the codec is supposed to handle
  • branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r245 r288  
    764764#endif
    765765  {
    766     Int iCode;
    767     Window& scaledWindow = pcSPS->getScaledRefLayerWindow();
    768     READ_SVLC( iCode, "scaled_ref_layer_left_offset" );    scaledWindow.setWindowLeftOffset  (iCode << 1);
    769     READ_SVLC( iCode, "scaled_ref_layer_top_offset" );     scaledWindow.setWindowTopOffset   (iCode << 1);
    770     READ_SVLC( iCode, "scaled_ref_layer_right_offset" );   scaledWindow.setWindowRightOffset (iCode << 1);
    771     READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" );  scaledWindow.setWindowBottomOffset(iCode << 1);
     766    Int iCode;
     767    READ_UVLC( uiCode,      "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets(uiCode);
     768    for(Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets(); i++)
     769    {
     770      Window& scaledWindow = pcSPS->getScaledRefLayerWindow(i);
     771      READ_SVLC( iCode, "scaled_ref_layer_left_offset" );    scaledWindow.setWindowLeftOffset  (iCode << 1);
     772      READ_SVLC( iCode, "scaled_ref_layer_top_offset" );     scaledWindow.setWindowTopOffset   (iCode << 1);
     773      READ_SVLC( iCode, "scaled_ref_layer_right_offset" );   scaledWindow.setWindowRightOffset (iCode << 1);
     774      READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" );  scaledWindow.setWindowBottomOffset(iCode << 1);
     775    }
    772776  }
    773777#endif
  • branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r282 r288  
    255255      for(UInt i = 0; i < pcSlice->getVPS()->getNumDirectRefLayers( m_layerId ); i++ )
    256256      {
    257         const Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow();
     257        const Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(i);
    258258        Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 );
    259259
     
    865865#if SIMPLIFIED_MV_POS_SCALING
    866866#if SCALED_REF_LAYER_OFFSETS
    867         const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow();
     867        const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);
    868868
    869869        Int widthBL   = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth();
     
    893893        {   
    894894#if SCALED_REF_LAYER_OFFSETS
    895           m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow() );
     895          m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
    896896#else
    897897          m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec() );
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r282 r288  
    584584#endif
    585585  {
    586     Window scaledWindow = pcSPS->getScaledRefLayerWindow();
    587     WRITE_SVLC( scaledWindow.getWindowLeftOffset()   >> 1, "scaled_ref_layer_left_offset" );
    588     WRITE_SVLC( scaledWindow.getWindowTopOffset()    >> 1, "scaled_ref_layer_top_offset" );
    589     WRITE_SVLC( scaledWindow.getWindowRightOffset()  >> 1, "scaled_ref_layer_right_offset" );
    590     WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" );
     586    WRITE_UVLC( pcSPS->getNumScaledRefLayerOffsets(),      "num_scaled_ref_layer_offsets" );
     587    for(Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets(); i++)
     588    {
     589      Window scaledWindow = pcSPS->getScaledRefLayerWindow(i);
     590      WRITE_SVLC( scaledWindow.getWindowLeftOffset()   >> 1, "scaled_ref_layer_left_offset" );
     591      WRITE_SVLC( scaledWindow.getWindowTopOffset()    >> 1, "scaled_ref_layer_top_offset" );
     592      WRITE_SVLC( scaledWindow.getWindowRightOffset()  >> 1, "scaled_ref_layer_right_offset" );
     593      WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" );
     594    }
    591595  }
    592596#endif
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r282 r288  
    547547#if SIMPLIFIED_MV_POS_SCALING
    548548#if SCALED_REF_LAYER_OFFSETS
    549         const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow();
     549        const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc);
    550550
    551551        Int widthBL   = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth();
     
    575575        {
    576576#if SCALED_REF_LAYER_OFFSETS
    577           m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow() );
     577          m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
    578578#else
    579579          m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec() );
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r282 r288  
    8989  m_bMFMEnabledFlag = false;
    9090#endif
     91#if SCALED_REF_LAYER_OFFSETS
     92  m_numScaledRefLayerOffsets = 0;
     93#endif
    9194}
    9295
     
    509512        for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )
    510513        {
    511           const Window scalEL = getSPS()->getScaledRefLayerWindow();
     514          const Window scalEL = getSPS()->getScaledRefLayerWindow(i);
    512515          Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 );
    513516
     
    546549        for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )
    547550        {
    548           const Window scalEL = getSPS()->getScaledRefLayerWindow();
     551          const Window scalEL = getSPS()->getScaledRefLayerWindow(i);
    549552          Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 );
    550553
     
    599602#endif
    600603#if SCALED_REF_LAYER_OFFSETS
    601   m_cSPS.getScaledRefLayerWindow() = m_scaledRefLayerWindow;
     604  m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets);
     605  for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++)
     606  {
     607    m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i];
     608  }
    602609#endif
    603610  ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL();
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.h

    r250 r288  
    140140#endif
    141141#if SCALED_REF_LAYER_OFFSETS
    142   Window                  m_scaledRefLayerWindow;
     142  UInt                    m_numScaledRefLayerOffsets;
     143  Window                  m_scaledRefLayerWindow[MAX_LAYERS];
    143144#endif
    144145protected:
     
    207208#endif
    208209#if SCALED_REF_LAYER_OFFSETS
    209   Window&  getScaledRefLayerWindow()            { return m_scaledRefLayerWindow; }
     210  Void                    setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; }
     211  UInt                    getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; }
     212  Window&  getScaledRefLayerWindow(Int x)            { return m_scaledRefLayerWindow[x]; }
    210213#endif
    211214
Note: See TracChangeset for help on using the changeset viewer.