Changeset 489 in SHVCSoftware for branches


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
Files:
7 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
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r485 r489  
    21002100#if REPN_FORMAT_IN_VPS
    21012101#if O0194_DIFFERENT_BITDEPTH_EL_BL
    2102     g_bitDepthYLayer[rpcSlice->getLayerId()]     = rpcSlice->getBitDepthY();
    2103     g_bitDepthCLayer[rpcSlice->getLayerId()]     = rpcSlice->getBitDepthC();
     2102    g_bitDepthYLayer[rpcSlice->getLayerId()] = rpcSlice->getBitDepthY();
     2103    g_bitDepthCLayer[rpcSlice->getLayerId()] = rpcSlice->getBitDepthC();
    21042104#endif
    21052105    assert( rpcSlice->getSliceQp() >= -rpcSlice->getQpBDOffsetY() );
  • branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r485 r489  
    12121212        {   
    12131213#if O0215_PHASE_ALIGNMENT
     1214#if O0194_JOINT_US_BITSHIFT
     1215          m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );
     1216#else
    12141217          m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );
     1218#endif
     1219#else
     1220#if O0194_JOINT_US_BITSHIFT
     1221          m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
    12151222#else
    12161223          m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
     1224#endif
    12171225#endif
    12181226        }
  • branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r484 r489  
    801801        {
    802802#if O0215_PHASE_ALIGNMENT
     803#if O0194_JOINT_US_BITSHIFT
     804          m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );
     805#else
    803806          m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );
     807#endif
     808#else
     809#if O0194_JOINT_US_BITSHIFT
     810          m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
    804811#else
    805812          m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
     813#endif
    806814#endif
    807815        }
Note: See TracChangeset for help on using the changeset viewer.