Changeset 448 in SHVCSoftware


Ignore:
Timestamp:
8 Nov 2013, 06:17:03 (11 years ago)
Author:
seregin
Message:

remove SCALED_REF_LAYER_OFFSETS macro

Location:
branches/SHM-4.0-dev/source
Files:
19 edited

Legend:

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

    r445 r448  
    392392  string* cfg_predLayerIdsPtr    [MAX_LAYERS];
    393393#endif
    394 #if SCALED_REF_LAYER_OFFSETS
    395394  string    cfg_scaledRefLayerLeftOffset [MAX_LAYERS];
    396395  string    cfg_scaledRefLayerTopOffset [MAX_LAYERS];
     
    403402  string*    cfg_scaledRefLayerRightOffsetPtr  [MAX_LAYERS];
    404403  string*    cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS];
    405 #endif
    406404#if RC_SHVC_HARMONIZATION
    407405  Bool*   cfg_RCEnableRateControl  [MAX_LAYERS];
     
    455453    cfg_predLayerIdsPtr     [layer]  = &cfg_predLayerIds[layer];
    456454#endif
    457 #if SCALED_REF_LAYER_OFFSETS
    458455    cfg_numScaledRefLayerOffsets [layer] = &m_acLayerCfg[layer].m_numScaledRefLayerOffsets;
    459456    for(Int i = 0; i < MAX_LAYERS; i++)
     
    464461      cfg_scaledRefLayerBottomOffsetPtr[layer] = &cfg_scaledRefLayerBottomOffset[layer];
    465462    }
    466 #endif
    467463#if RC_SHVC_HARMONIZATION
    468464    cfg_RCEnableRateControl[layer]   = &m_acLayerCfg[layer].m_RCEnableRateControl;
     
    487483  string  cfg_tileSets;
    488484#endif
    489 #else
     485#else //SVC_EXTENSION
    490486  string cfg_InputFile;
    491487  string cfg_BitstreamFile;
    492488  string cfg_ReconFile;
    493489  string cfg_dQPFile;
    494 #endif
     490#endif //SVC_EXTENSION
    495491  string cfg_ColumnWidth;
    496492  string cfg_RowHeight;
     
    546542  ("OutputBitDepthC",         m_outputBitDepthC,   0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
    547543  ("InternalBitDepthC",       m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
    548 #if SCALED_REF_LAYER_OFFSETS
    549544  ("NumScaledRefLayerOffsets%d",    cfg_numScaledRefLayerOffsets,     0, MAX_LAYERS,  "Number of scaled offset layer sets ")
    550545  ("ScaledRefLayerLeftOffset%d",   cfg_scaledRefLayerLeftOffsetPtr,  string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to"
     
    556551  ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to"
    557552                                                                 " bottom-right luma sample of the EL picture, in units of two luma samples")
    558 #endif
    559553#if N0120_MAX_TID_REF_CFG
    560554  ("MaxTidRefPresentFlag", m_maxTidRefPresentFlag, true, "max_tid_ref_present_flag (0: not present, 1: present(default)) " )
     
    572566  ("IlSampleOnlyPred%d",       m_ilSampleOnlyPred, 0, MAX_LAYERS, "Set inter_layer_sample_pred_only_flag for all slices")
    573567#endif
    574 #else
     568#else //SVC_EXTENSION
    575569  ("InputFile,i",           cfg_InputFile,     string(""), "Original YUV input file name")
    576570  ("BitstreamFile,b",       cfg_BitstreamFile, string(""), "Bitstream output file name")
     
    593587  ("ConfBottom",            m_confBottom,          0, "Bottom offset for window conformance mode 3")
    594588  ("FrameRate,-fr",         m_iFrameRate,          0, "Frame rate")
    595 #endif
     589#endif //SVC_EXTENSION
    596590
    597591  //Field coding parameters
     
    978972  m_BLSyntaxFile = cfg_BLSyntaxFile.empty() ? NULL : strdup(cfg_BLSyntaxFile.c_str());
    979973#endif
    980 #else
     974#else //SVC_EXTENSION
    981975  m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str());
    982976  m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
    983977  m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());
    984978  m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str());
    985 #endif
     979#endif //SVC_EXTENSION
    986980
    987981  Char* pColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str());
     
    10421036    m_pRowHeight = NULL;
    10431037  }
    1044 #if SCALED_REF_LAYER_OFFSETS
     1038#if SVC_EXTENSION
    10451039  for(Int layer = 0; layer < MAX_LAYERS; layer++)
    10461040  {
     
    11121106    }
    11131107  }
    1114 #endif
    11151108#if VPS_EXTN_DIRECT_REF_LAYERS
    11161109#if M0457_PREDICTION_INDICATIONS
     
    12421235  }
    12431236#endif
     1237#endif //SVC_EXTENSION
    12441238  m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str());
    12451239
     
    25162510}
    25172511
    2518 #if SCALED_REF_LAYER_OFFSETS
     2512#if SVC_EXTENSION
    25192513Void TAppEncCfg::cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString)
    25202514{
     
    25492543  }
    25502544}
    2551 #endif
    25522545
    25532546#if FINAL_RPL_CHANGE_N0082
     
    27652758}
    27662759#endif
     2760#endif //SVC_EXTENSION
    27672761//! \}
  • branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncCfg.h

    r445 r448  
    407407  Char* getBLSyntaxFile()           { return m_BLSyntaxFile;      }
    408408#endif
    409 #if SCALED_REF_LAYER_OFFSETS
    410409  Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString);
    411 #endif
    412410#if REPN_FORMAT_IN_VPS
    413411  RepFormatCfg* getRepFormatCfg(Int i)  { return &m_repFormatCfg[i]; }
  • branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp

    r445 r448  
    3838  m_confLeft = m_confRight = m_confTop = m_confBottom = 0;
    3939  m_aiPad[1] = m_aiPad[0] = 0;
    40 #if SCALED_REF_LAYER_OFFSETS
    4140  m_numScaledRefLayerOffsets = 0;
    4241  ::memset(m_scaledRefLayerLeftOffset,   0, sizeof(m_scaledRefLayerLeftOffset));
     
    4443  ::memset(m_scaledRefLayerRightOffset,  0, sizeof(m_scaledRefLayerRightOffset));
    4544  ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset));
    46 #endif
    4745}
    4846
     
    332330}
    333331
    334 #endif
     332#endif //SVC_EXTENSION
    335333
    336334
  • branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r445 r448  
    4343  Int       m_iIntraPeriod;                                   ///< period of I-slice (random access period)
    4444  Double    m_fQP;                                            ///< QP value of key-picture (floating point)
     45#if SVC_EXTENSION
    4546#if VPS_EXTN_DIRECT_REF_LAYERS
    4647#if M0457_PREDICTION_INDICATIONS
     
    8485  Int       m_maxTidIlRefPicsPlus1;
    8586#endif
    86 #if SVC_EXTENSION
    8787  Int       m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles).
    88 #endif
     88#endif //SVC_EXTENSION
    8989
    9090  Int       m_iQP;                                            ///< QP value of key-picture (integer)
     
    9292  Int*      m_aidQP;                                          ///< array of slice QP values
    9393  TAppEncCfg* m_cAppEncCfg;                                   ///< pointer to app encoder config
    94 #if SCALED_REF_LAYER_OFFSETS
     94#if SVC_EXTENSION
    9595  Int       m_numScaledRefLayerOffsets  ;
    9696  Int       m_scaledRefLayerLeftOffset  [MAX_LAYERS];
     
    9898  Int       m_scaledRefLayerRightOffset [MAX_LAYERS];
    9999  Int       m_scaledRefLayerBottomOffset[MAX_LAYERS];
    100 #endif 
    101100#if FINAL_RPL_CHANGE_N0082
    102101  GOPEntry  m_GOPListLayer[MAX_GOP];                            ///< for layer
     
    105104  Int       m_repFormatIdx;
    106105#endif
     106#endif //SVC_EXTENSION
    107107public:
    108108  TAppEncLayerCfg();
     
    139139  Int     getIntQP()                  {return m_iQP;              }
    140140  Int*    getdQPs()                   {return m_aidQP;            }
     141#if SVC_EXTENSION
    141142#if VPS_EXTN_DIRECT_REF_LAYERS
    142143#if M0457_PREDICTION_INDICATIONS
     
    183184  UInt getMaxCUDepth()             {return m_uiMaxCUDepth;      }
    184185#endif
     186#endif //SVC_EXTENSION
    185187}; // END CLASS DEFINITION TAppEncLayerCfg
    186188
  • branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r445 r448  
    561561    m_acTEncTop[layer].setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical );
    562562    m_acTEncTop[layer].setElRapSliceTypeB(layer == 0? 0 : m_elRapSliceBEnabled);
    563 #if SCALED_REF_LAYER_OFFSETS
    564563    if( layer > 0 )
    565564    {
     
    571570      }
    572571    }
    573 #endif
    574572#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    575573    m_acTEncTop[layer].setAdaptiveResolutionChange( m_adaptiveResolutionChange );
     
    577575  }
    578576}
    579 #else
     577#else //SVC_EXTENSION
    580578Void TAppEncTop::xInitLibCfg()
    581579{
     
    851849  m_cTEncTop.setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical );
    852850}
    853 #endif
     851#endif //SVC_EXTENSION
    854852
    855853Void TAppEncTop::xCreateLib()
     
    878876    m_acTEncTop[layer].create();
    879877  }
    880 #else
     878#else //SVC_EXTENSION
    881879  m_cTVideoIOYuvInputFile.open( m_pchInputFile,     false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC );  // read  mode
    882880  m_cTVideoIOYuvInputFile.skipFrames(m_FrameSkip, m_iSourceWidth - m_aiPad[0], m_iSourceHeight - m_aiPad[1]);
     
    887885  // Neo Decoder
    888886  m_cTEncTop.create();
    889 #endif
     887#endif //SVC_EXTENSION
    890888}
    891889
     
    911909    m_acTEncTop[layer].destroy();
    912910  }
    913 #else
     911#else //SVC_EXTENSION
    914912  m_cTVideoIOYuvInputFile.close();
    915913  m_cTVideoIOYuvReconFile.close();
     
    917915  // Neo Decoder
    918916  m_cTEncTop.destroy();
    919 #endif
     917#endif //SVC_EXTENSION
    920918}
    921919
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r445 r448  
    40084008#endif
    40094009
    4010 #if SCALED_REF_LAYER_OFFSETS
    40114010  Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset();
    40124011  Int topStartL  = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset();
    40134012  Int iBX = ((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16;
    40144013  Int iBY = ((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16;
    4015 #else
    4016   Int iBX = (uiPelX*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16;
    4017   Int iBY = (uiPelY*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16;
    4018 #endif
    40194014
    40204015#if N0139_POSITION_ROUNDING_OFFSET
     
    40264021#endif
    40274022
    4028 #if SCALED_REF_LAYER_OFFSETS
    40294023  if ( iBX >= cBaseColPic->getPicYuvRec()->getWidth() || iBY >= cBaseColPic->getPicYuvRec()->getHeight() ||
    40304024       iBX < 0                                        || iBY < 0                                           )
    4031 #else
    4032   if ( iBX >= cBaseColPic->getPicYuvRec()->getWidth() || iBY >= cBaseColPic->getPicYuvRec()->getHeight())
    4033 #endif
    40344025  {
    40354026    return NULL;
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPrediction.cpp

    r442 r448  
    765765
    766766#if SVC_UPSAMPLING
    767 #if SCALED_REF_LAYER_OFFSETS
    768767Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window)
    769768{
    770769  m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window);
    771770}
    772 #else
    773 Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic)
    774 {
    775   m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic);
    776 }
    777 #endif
    778771#endif
    779772//! \}
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPrediction.h

    r442 r448  
    120120#if SVC_EXTENSION
    121121#if SVC_UPSAMPLING
    122 #if SCALED_REF_LAYER_OFFSETS
    123122  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
    124 #else
    125   Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic );
    126123#endif
    127 #endif
    128 #endif
     124#endif //SVC_EXTENSION
    129125};
    130126
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComSlice.cpp

    r446 r448  
    21672167, m_vuiParametersPresentFlag  (false)
    21682168, m_vuiParameters             ()
     2169#if SVC_EXTENSION
    21692170#if M0463_VUI_EXT_ILP_REF
    21702171, m_interViewMvVertConstraintFlag (false)
    21712172, m_numIlpRestrictedRefLayers ( 0 )
    21722173#endif
    2173 #if SVC_EXTENSION
    2174 , m_layerId(0)
    2175 #endif
    2176 #if SCALED_REF_LAYER_OFFSETS
    2177 , m_numScaledRefLayerOffsets  (0)
    2178 #endif
     2174, m_layerId                   ( 0 )
     2175, m_numScaledRefLayerOffsets  ( 0 )
    21792176#if REPN_FORMAT_IN_VPS
    21802177, m_updateRepFormatFlag       (false)
    21812178#endif
     2179#endif //SVC_EXTENSION
    21822180{
    21832181  for ( Int i = 0; i < MAX_TLAYER; i++ )
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComSlice.h

    r447 r448  
    11321132  TComPTL     m_pcPTL;
    11331133
     1134#if SVC_EXTENSION
    11341135#if M0463_VUI_EXT_ILP_REF
    11351136  Bool        m_interViewMvVertConstraintFlag;
     
    11401141#endif
    11411142
    1142 #if SVC_EXTENSION
    11431143  UInt m_layerId;
    11441144
     
    11501150#endif
    11511151
    1152 #endif
    11531152#if REF_IDX_MFM
    11541153#if !M0457_COL_PICTURE_SIGNALING
     
    11561155#endif
    11571156#endif
    1158 #if SCALED_REF_LAYER_OFFSETS
    11591157  UInt        m_numScaledRefLayerOffsets;
    11601158  Window      m_scaledRefLayerWindow[MAX_LAYERS];
    1161 #endif
    11621159#if REPN_FORMAT_IN_VPS
    11631160  Bool m_updateRepFormatFlag;
    11641161#endif
     1162#endif //SVC_EXTENSION
    11651163public:
    11661164  TComSPS();
     
    13231321  Void     setLayerId(UInt layerId) { m_layerId = layerId; }
    13241322  UInt     getLayerId() { return m_layerId; }
    1325 #endif
    13261323#if REF_IDX_MFM
    13271324#if !M0457_COL_PICTURE_SIGNALING
     
    13301327#endif
    13311328#endif
    1332 #if SCALED_REF_LAYER_OFFSETS
    13331329  UInt     getNumScaledRefLayerOffsets()  { return m_numScaledRefLayerOffsets; }
    13341330  Void     setNumScaledRefLayerOffsets(Int x)  { m_numScaledRefLayerOffsets = x; }
    13351331  Window&  getScaledRefLayerWindow( Int x )   { return m_scaledRefLayerWindow[x]; }
    1336 #endif
    13371332#if REPN_FORMAT_IN_VPS
    13381333  Bool     getUpdateRepFormatFlag()       { return m_updateRepFormatFlag; }
    13391334  Void     setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x;    }
    13401335#endif
     1336#endif //SVC_EXTENSION
    13411337};
    13421338
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r442 r448  
    9797}
    9898
    99 #if SCALED_REF_LAYER_OFFSETS
    10099Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window )
    101 #else
    102 Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic )
    103 #endif
    104100{
    105101  assert ( NTAPS_US_LUMA == 8 );
     
    109105
    110106  //========== Y component upsampling ===========
    111 #if SCALED_REF_LAYER_OFFSETS
    112107  const Window &scalEL = window;
    113108
     
    119114  Int heightEL  = pcUsPic->getHeight() - scalEL.getWindowTopOffset()  - scalEL.getWindowBottomOffset();
    120115  Int strideEL  = pcUsPic->getStride();
    121 #else
    122   const Window &confBL = pcBasePic->getConformanceWindow();
    123   const Window &confEL = pcUsPic->getConformanceWindow();
    124 
    125   Int widthBL   = pcBasePic->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();
    126   Int heightBL  = pcBasePic->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();
    127   Int strideBL  = pcBasePic->getStride();
    128 
    129   Int widthEL   = pcUsPic->getWidth () - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();
    130   Int heightEL  = pcUsPic->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();
    131   Int strideEL  = pcUsPic->getStride();
    132 #endif
     116
    133117  Pel* piTempBufY = pcTempPic->getLumaAddr();
    134118  Pel* piSrcBufY  = pcBasePic->getLumaAddr();
     
    238222    widthBL   = pcBasePic->getWidth ();
    239223    heightBL  = min<Int>( pcBasePic->getHeight(), heightEL );
    240 #if SCALED_REF_LAYER_OFFSETS
     224
    241225    Int leftStartL = scalEL.getWindowLeftOffset();
    242226    Int rightEndL  = pcUsPic->getWidth() - scalEL.getWindowRightOffset();
     
    246230    Int leftOffset = leftStartL > 0 ? leftStartL : 0;
    247231#endif
    248 #endif
    249232
    250233#if  N0214_INTERMEDIATE_BUFFER_16BITS
     
    255238    for( i = 0; i < widthEL; i++ )
    256239    {
    257 #if SCALED_REF_LAYER_OFFSETS
    258240      Int x = Clip3( leftStartL, rightEndL - 1, i );
    259241      refPos16 = (((x - leftStartL)*scaleX + addX) >> shiftXM4) - deltaX;
    260 #else
    261       refPos16 = ((i*scaleX + addX) >> shiftXM4) - deltaX;
    262 #endif
    263242      phase    = refPos16 & 15;
    264243      refPos   = refPos16 >> 4;
     
    293272    Int iOffset = 1 << (nShift - 1);
    294273
    295 #if SCALED_REF_LAYER_OFFSETS
    296274    for( j = 0; j < pcTempPic->getHeight(); j++ )
    297 #else
    298     for( j = 0; j < heightEL; j++ )
    299 #endif
    300     {
    301 #if SCALED_REF_LAYER_OFFSETS
     275    {
    302276      Int y = Clip3(topStartL, bottomEndL - 1, j);
    303277      refPos16 = ((( y - topStartL )*scaleY + addY) >> shiftYM4) - deltaY;
    304 #else
    305       refPos16 = ((j*scaleY + addY) >> shiftYM4) - deltaY;
    306 #endif
    307278      phase    = refPos16 & 15;
    308279      refPos   = refPos16 >> 4;
     
    310281
    311282      piSrcY = piTempBufY + (refPos -((NTAPS_US_LUMA>>1) - 1))*strideEL;
    312 #if SCALED_REF_LAYER_OFFSETS
    313283#if BUGFIX_RESAMPLE
    314284      Pel* piDstY0 = piDstBufY + j * strideEL;           
     
    376346#endif
    377347#endif
    378 #else
    379       piDstY = piDstBufY + j * strideEL;
    380 
    381       for( i = 0; i < widthEL; i++ )
    382       {
    383         *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift));
    384         piSrcY++;
    385         piDstY++;
    386       }
    387 #endif
    388     }
    389 
    390 #if SCALED_REF_LAYER_OFFSETS
     348    }
     349
    391350    widthBL   = pcBasePic->getWidth ();
    392351    heightBL  = pcBasePic->getHeight();
     
    394353    widthEL   = pcUsPic->getWidth () - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset();
    395354    heightEL  = pcUsPic->getHeight() - scalEL.getWindowTopOffset()  - scalEL.getWindowBottomOffset();
    396 #else
    397     widthBL   = pcBasePic->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();
    398     heightBL  = pcBasePic->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();
    399 
    400     widthEL   = pcUsPic->getWidth () - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();
    401     heightEL  = pcUsPic->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();
    402 #endif
    403355
    404356    //========== UV component upsampling ===========
     
    412364    strideBL  = pcBasePic->getCStride();
    413365    strideEL  = pcUsPic->getCStride();
    414 #if SCALED_REF_LAYER_OFFSETS
     366
    415367    Int leftStartC = scalEL.getWindowLeftOffset() >> 1;
    416368    Int rightEndC  = (pcUsPic->getWidth() >> 1) - (scalEL.getWindowRightOffset() >> 1);
     
    420372    leftOffset = leftStartC > 0 ? leftStartC : 0;
    421373#endif
    422 #endif
    423374
    424375    shiftX = 16;
     
    455406    for( i = 0; i < widthEL; i++ )
    456407    {
    457 #if SCALED_REF_LAYER_OFFSETS
    458408      Int x = Clip3(leftStartC, rightEndC - 1, i);
    459409      refPos16 = (((x - leftStartC)*scaleX + addX) >> shiftXM4) - deltaX;
    460 #else
    461       refPos16 = ((i*scaleX + addX) >> shiftXM4) - deltaX;
    462 #endif
    463410      phase    = refPos16 & 15;
    464411      refPos   = refPos16 >> 4;
     
    498445#endif
    499446
    500 #if SCALED_REF_LAYER_OFFSETS
    501447    for( j = 0; j < pcTempPic->getHeight() >> 1; j++ )
    502 #else
    503     for( j = 0; j < heightEL; j++ )
    504 #endif
    505     {
    506 #if SCALED_REF_LAYER_OFFSETS
     448    {
    507449      Int y = Clip3(topStartC, bottomEndC - 1, j);
    508450      refPos16 = (((y - topStartC)*scaleY + addY) >> shiftYM4) - deltaY;
    509 #else
    510       refPos16 = ((j*scaleY + addY) >> shiftYM4) - deltaY;
    511 #endif
    512451      phase    = refPos16 & 15;
    513452      refPos   = refPos16 >> 4;
     
    516455      piSrcU = piTempBufU  + (refPos -((NTAPS_US_CHROMA>>1) - 1))*strideEL;
    517456      piSrcV = piTempBufV  + (refPos -((NTAPS_US_CHROMA>>1) - 1))*strideEL;
    518 #if SCALED_REF_LAYER_OFFSETS
     457
    519458#if BUGFIX_RESAMPLE
    520459      Pel* piDstU0 = piDstBufU + j*strideEL;
     
    608547#endif
    609548#endif
    610 #else
    611       piDstU = piDstBufU + j*strideEL;
    612       piDstV = piDstBufV + j*strideEL;
    613 
    614       for( i = 0; i < widthEL; i++ )
    615       {
    616         *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift));
    617         *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift));
    618         piSrcU++;
    619         piSrcV++;
    620         piDstU++;
    621         piDstV++;
    622       }
    623 #endif
    624549    }
    625550  }
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.h

    r313 r448  
    4343  ~TComUpsampleFilter(void);
    4444
    45 #if SCALED_REF_LAYER_OFFSETS
    4645  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
    47 #else
    48  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic );
    49 #endif
    5046};
    5147
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h

    r447 r448  
    6060#define M0463_VUI_EXT_ILP_REF            0      ///< JCTVC-M0463: VUI extension inter-layer dependency offset signalling
    6161#define SPS_EXTENSION                    1      ///< Define sps_extension() syntax structure
    62 #define SCALED_REF_LAYER_OFFSETS         1      ///< JCTVC-M0309: Signal scaled reference layer offsets in SPS
    6362#define VERT_MV_CONSTRAINT               1      ///< Vertical MV component constraint flag
    6463#define SCALABILITY_MASK_E0104           1      ///< JCT3V-E0104: scalability mask for depth
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r447 r448  
    835835  assert( uiCode == 0 );
    836836#endif
    837 #if SCALED_REF_LAYER_OFFSETS
    838837  if( pcSPS->getLayerId() > 0 )
    839838  {
     
    849848    }
    850849  }
    851 #endif
    852850#if M0463_VUI_EXT_ILP_REF
    853851  ////   sps_extension_vui_parameters( )
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r446 r448  
    11591159#endif
    11601160
    1161 #if SCALED_REF_LAYER_OFFSETS
    11621161        const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);
    11631162
     
    11671166        Int widthEL   = pcPic->getPicYuvRec()->getWidth()  - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset();
    11681167        Int heightEL  = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset()  - scalEL.getWindowBottomOffset();
    1169 #else
    1170         const Window &confBL = pcSlice->getBaseColPic()->getPicYuvRec()->getConformanceWindow();
    1171         const Window &confEL = pcPic->getPicYuvRec()->getConformanceWindow();
    1172 
    1173         Int widthBL   = pcSlice->getBaseColPic()->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();
    1174         Int heightBL  = pcSlice->getBaseColPic()->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();
    1175 
    1176         Int widthEL   = pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();
    1177         Int heightEL  = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();
    1178 #endif
     1168
    11791169        g_mvScalingFactor[refLayerIdc][0] = widthEL  == widthBL  ? 4096 : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL);
    11801170        g_mvScalingFactor[refLayerIdc][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL);
     
    11861176        if( pcPic->isSpatialEnhLayer(refLayerIdc) )
    11871177        {   
    1188 #if SCALED_REF_LAYER_OFFSETS
    11891178          m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
    1190 #else
    1191           m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec() );
    1192 #endif
    11931179        }
    11941180        else
     
    12681254#endif
    12691255#endif
    1270 
    1271 #endif //SVC_EXTENSION
    1272 
     1256   
    12731257#if N0147_IRAP_ALIGN_FLAG
    12741258    if(  m_layerId > 0 && pcSlice->getVPS()->getCrossLayerIrapAlignFlag())
     
    12851269    }
    12861270#endif
     1271#endif //SVC_EXTENSION
    12871272   
    12881273    // For generalized B
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r447 r448  
    664664  WRITE_FLAG( 0, "inter_view_mv_vert_constraint_flag" );
    665665#endif
    666 #if SCALED_REF_LAYER_OFFSETS
    667666  if( pcSPS->getLayerId() > 0 )
    668667  {
     
    677676    }
    678677  }
    679 #endif
    680678#if M0463_VUI_EXT_ILP_REF
    681679  ////   sps_extension_vui_parameters( )
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r446 r448  
    782782#endif
    783783
    784 #if SCALED_REF_LAYER_OFFSETS
    785784        const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc);
    786785
     
    790789        Int widthEL   = pcPic->getPicYuvRec()->getWidth()  - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset();
    791790        Int heightEL  = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset()  - scalEL.getWindowBottomOffset();
    792 #else
    793         const Window &confBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getConformanceWindow();
    794         const Window &confEL = pcPic->getPicYuvRec()->getConformanceWindow();
    795 
    796         Int widthBL   = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();
    797         Int heightBL  = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();
    798 
    799         Int widthEL   = pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();
    800         Int heightEL  = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();
    801 #endif
     791
    802792        g_mvScalingFactor[refLayerIdc][0] = widthEL  == widthBL  ? 4096 : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL);
    803793        g_mvScalingFactor[refLayerIdc][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL);
     
    809799        if( pcPic->isSpatialEnhLayer(refLayerIdc))
    810800        {
    811 #if SCALED_REF_LAYER_OFFSETS
    812801          m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
    813 #else
    814           m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec() );
    815 #endif
    816802        }
    817803        else
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r445 r448  
    8888  m_bMFMEnabledFlag = false;
    8989#endif
    90 #if SCALED_REF_LAYER_OFFSETS
    9190  m_numScaledRefLayerOffsets = 0;
    92 #endif
    93 #endif
    9491#if POC_RESET_FLAG
    9592  m_pocAdjustmentValue     = 0;
    9693#endif
     94#endif //SVC_EXTENSION
    9795}
    9896
     
    878876#if SVC_EXTENSION
    879877  m_cSPS.setLayerId(m_layerId);
    880 #endif
    881878#if REF_IDX_MFM
    882879#if !M0457_COL_PICTURE_SIGNALING
     
    884881#endif
    885882#endif
    886 #if SCALED_REF_LAYER_OFFSETS
    887883  m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets);
    888884  for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++)
     
    890886    m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i];
    891887  }
    892 #endif
     888#endif //SVC_EXTENSION
    893889  ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL();
    894890  profileTierLevel.setLevelIdc(m_level);
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncTop.h

    r442 r448  
    140140  Int                     m_ilSampleOnlyPred;
    141141#endif
    142 #if SCALED_REF_LAYER_OFFSETS
    143142  UInt                    m_numScaledRefLayerOffsets;
    144143  Window                  m_scaledRefLayerWindow[MAX_LAYERS];
    145 #endif
    146144#if POC_RESET_FLAG
    147145  Int                     m_pocAdjustmentValue;
    148146#endif
    149 #endif
     147#endif //SVC_EXTENSION
    150148protected:
    151149  Void  xGetNewPicBuffer  ( TComPic*& rpcPic );           ///< get picture buffer which will be processed
     
    209207  Int                     getNumPicRcvd         () { return m_iNumPicRcvd;            }
    210208  Void                    setNumPicRcvd         ( Int num ) { m_iNumPicRcvd = num;      }
    211 #if SCALED_REF_LAYER_OFFSETS
    212209  Void                    setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; }
    213210  UInt                    getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; }
    214211  Window&  getScaledRefLayerWindow(Int x)            { return m_scaledRefLayerWindow[x]; }
    215 #endif
    216 #endif
     212#endif //SVC_EXTENSION
    217213
    218214  // -------------------------------------------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.