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


Ignore:
Timestamp:
16 Nov 2013, 04:03:11 (11 years ago)
Author:
seregin
Message:

fix setting layerId and refLayerId for upsampling

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

Legend:

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

    r464 r489  
    766766#if SVC_UPSAMPLING
    767767#if O0215_PHASE_ALIGNMENT
     768#if O0194_JOINT_US_BITSHIFT
     769Void TComPrediction::upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag )
     770{
     771  m_cUsf.upsampleBasePic( currSlice, refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window, phaseAlignFlag );
     772}
     773#else
    768774Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag )
    769775{
    770776  m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window, phaseAlignFlag );
     777}
     778#endif
     779#else
     780#if O0194_JOINT_US_BITSHIFT
     781Void TComPrediction::upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window)
     782{
     783  m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window);
    771784}
    772785#else
     
    775788  m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window);
    776789}
     790#endif
    777791#endif
    778792#endif
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComPrediction.h

    r464 r489  
    121121#if SVC_UPSAMPLING
    122122#if O0215_PHASE_ALIGNMENT
     123#if O0194_JOINT_US_BITSHIFT
     124  Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag );
     125#else
    123126  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag );
     127#endif
     128#else
     129#if O0194_JOINT_US_BITSHIFT
     130  Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
    124131#else
    125132  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
     133#endif
    126134#endif
    127135#endif
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r468 r489  
    9898
    9999#if O0215_PHASE_ALIGNMENT
     100#if O0194_JOINT_US_BITSHIFT
     101Void TComUpsampleFilter::upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag )
     102#else
    100103Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag )
     104#endif
     105#else
     106#if O0194_JOINT_US_BITSHIFT
     107Void TComUpsampleFilter::upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window )
    101108#else
    102109Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window )
     110#endif
    103111#endif
    104112{
     
    141149  Int scaleX = g_posScalingFactor[refLayerIdc][0];
    142150  Int scaleY = g_posScalingFactor[refLayerIdc][1];
     151
     152#if O0194_JOINT_US_BITSHIFT
     153  UInt currLayerId = currSlice->getLayerId();
     154  UInt refLayerId  = currSlice->getVPS()->getRefLayerId( currLayerId, refLayerIdc );
     155  currLayerId = 1;
     156  refLayerId = 0;
     157#endif
    143158
    144159  if( scaleX == 65536 && scaleY == 65536 ) // ratio 1x
     
    241256#if O0194_JOINT_US_BITSHIFT
    242257    // g_bitDepthY was set to EL bit-depth, but shift1 should be calculated using BL bit-depth
    243     Int shift1 = g_bitDepthYLayer[0] - 8;
     258    Int shift1 = g_bitDepthYLayer[refLayerId] - 8;
    244259#else
    245260    Int shift1 = g_bitDepthY - 8;
     
    279294#if  N0214_INTERMEDIATE_BUFFER_16BITS
    280295#if O0194_JOINT_US_BITSHIFT
    281     Int nShift = 20 - g_bitDepthYLayer[1];
     296    Int nShift = 20 - g_bitDepthYLayer[currLayerId];
    282297#else
    283298    Int nShift = US_FILTER_PREC*2 - shift1;
     
    391406#if O0194_JOINT_US_BITSHIFT
    392407    // g_bitDepthC was set to EL bit-depth, but shift1 should be calculated using BL bit-depth
    393     shift1 = g_bitDepthCLayer[0] - 8;
     408    shift1 = g_bitDepthCLayer[refLayerId] - 8;
    394409#else
    395410    shift1 = g_bitDepthC - 8;
     
    436451#if  N0214_INTERMEDIATE_BUFFER_16BITS
    437452#if O0194_JOINT_US_BITSHIFT
    438     nShift = 20 - g_bitDepthCLayer[1];
     453    nShift = 20 - g_bitDepthCLayer[refLayerId];
    439454#else
    440455    nShift = US_FILTER_PREC*2 - shift1;
  • branches/SHM-4.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.h

    r464 r489  
    4444
    4545#if O0215_PHASE_ALIGNMENT
     46#if O0194_JOINT_US_BITSHIFT
     47  Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag );
     48#else
    4649  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, bool phaseAlignFlag );
     50#endif
     51#else
     52#if O0194_JOINT_US_BITSHIFT
     53  Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
    4754#else
    4855  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
     56#endif
    4957#endif
    5058
Note: See TracChangeset for help on using the changeset viewer.