Changeset 815 in SHVCSoftware for trunk/source/Lib/TLibCommon


Ignore:
Timestamp:
30 Jun 2014, 06:13:06 (11 years ago)
Author:
seregin
Message:

merge with SHM-6-dev branch

Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/source

  • trunk/source/Lib/TLibCommon/CommonDef.h

    r713 r815  
    5858#if SVC_EXTENSION
    5959#include <vector>
    60 #define NV_VERSION        "6.0 (HM-14.0)"                 ///< Current software version
     60#define NV_VERSION        "6.1 (HM-14.0)"                 ///< Current software version
    6161#else
    6262#define NV_VERSION        "14.0"                ///< Current software version
  • trunk/source/Lib/TLibCommon/SEI.h

    r713 r815  
    3737#include <cstring>
    3838
     39#if Q0078_ADD_LAYER_SETS
     40#include "TLibCommon/NAL.h"
     41#endif
     42
    3943//! \ingroup TLibCommon
    4044//! \{
     
    6670    POST_FILTER_HINT                     = 22,
    6771    TONE_MAPPING_INFO                    = 23,
     72#if P0050_KNEE_FUNCTION_SEI
     73    KNEE_FUNCTION_INFO                   = 24,
     74#endif
    6875    FRAME_PACKING                        = 45,
    6976    DISPLAY_ORIENTATION                  = 47,
     
    9198#if Q0074_SEI_COLOR_MAPPING
    9299    COLOR_MAPPING_INFO                   = 143,
     100#endif
     101#if Q0078_ADD_LAYER_SETS
     102    OUTPUT_LAYER_SET_NESTING             = 144,
     103    VPS_REWRITING                        = 145,
     104#endif
     105#if Q0189_TMVP_CONSTRAINTS
     106    TMVP_CONSTRAINTS                     = 146,
     107#endif
     108#if Q0247_FRAME_FIELD_INFO
     109    FRAME_FIELD_INFO                     = 147,
    93110#endif
    94111  };
     
    407424  Int    m_extendedWhiteLevelLumaCodeValue;
    408425};
    409 
     426#if P0050_KNEE_FUNCTION_SEI
     427class SEIKneeFunctionInfo : public SEI
     428{
     429public:
     430  PayloadType payloadType() const { return KNEE_FUNCTION_INFO; }
     431  SEIKneeFunctionInfo() {}
     432  virtual ~SEIKneeFunctionInfo() {}
     433
     434  Int   m_kneeId;
     435  Bool  m_kneeCancelFlag;
     436  Bool  m_kneePersistenceFlag;
     437  Bool  m_kneeMappingFlag;
     438  Int   m_kneeInputDrange;
     439  Int   m_kneeInputDispLuminance;
     440  Int   m_kneeOutputDrange;
     441  Int   m_kneeOutputDispLuminance;
     442  Int   m_kneeNumKneePointsMinus1;
     443  std::vector<Int> m_kneeInputKneePoint;
     444  std::vector<Int> m_kneeOutputKneePoint;
     445};
     446#endif
    410447#if Q0074_SEI_COLOR_MAPPING
    411448class SEIColorMappingInfo : public SEI
     
    486523#endif
    487524
     525#if Q0189_TMVP_CONSTRAINTS
     526class SEITMVPConstrains : public SEI
     527{
     528public:
     529  PayloadType payloadType() const { return TMVP_CONSTRAINTS; }
     530
     531  SEITMVPConstrains()
     532    : prev_pics_not_used_flag(0),no_intra_layer_col_pic_flag(0)
     533    {}
     534
     535  virtual ~SEITMVPConstrains()
     536  {
     537  }
     538
     539  UInt prev_pics_not_used_flag;
     540  UInt no_intra_layer_col_pic_flag;
     541};
     542#endif
     543
     544#if Q0247_FRAME_FIELD_INFO
     545class SEIFrameFieldInfo: public SEI
     546{
     547public:
     548  PayloadType payloadType() const { return FRAME_FIELD_INFO; }
     549
     550  SEIFrameFieldInfo()
     551    : m_ffinfo_picStruct(0),m_ffinfo_sourceScanType(0), m_ffinfo_duplicateFlag(false)
     552    {}
     553
     554  virtual ~SEIFrameFieldInfo()
     555  {
     556  }
     557
     558  UInt  m_ffinfo_picStruct;
     559  UInt  m_ffinfo_sourceScanType;
     560  Bool  m_ffinfo_duplicateFlag;
     561};
     562
     563#endif
     564
    488565typedef std::list<SEI*> SEIMessages;
    489566
     
    583660};
    584661
     662#if Q0078_ADD_LAYER_SETS
     663class SEIOutputLayerSetNesting : public SEI
     664{
     665public:
     666  PayloadType payloadType() const { return OUTPUT_LAYER_SET_NESTING; }
     667
     668  SEIOutputLayerSetNesting() {}
     669  virtual ~SEIOutputLayerSetNesting()
     670  {
     671    if (!m_callerOwnsSEIs)
     672    {
     673      deleteSEIs(m_nestedSEIs);
     674    }
     675  }
     676
     677  Bool m_olsFlag;
     678  UInt m_numOlsIndicesMinus1;
     679  UInt m_olsIdx[1024];
     680  Bool  m_callerOwnsSEIs;
     681  SEIMessages m_nestedSEIs;
     682};
     683
     684class SEIVPSRewriting : public SEI
     685{
     686public:
     687  PayloadType payloadType() const { return VPS_REWRITING; }
     688
     689  SEIVPSRewriting() {}
     690  virtual ~SEIVPSRewriting() {}
     691
     692  NALUnit* nalu;
     693};
     694#endif
     695
    585696//! \}
  • trunk/source/Lib/TLibCommon/TCom3DAsymLUT.cpp

    r713 r815  
    4444
    4545  if( m_pCuboid != NULL )
     46  {
    4647    destroy();
     48  }
    4749  xAllocate3DArray( m_pCuboid , m_nYSize , m_nUSize , m_nVSize );
    4850}
     
    8890
    8991  // alignment padding
    90   pU += (nWidth>>1);
    91   pV += (nWidth>>1);
    92   for( Int y = 0 ; y < (nHeight>>1) ; y ++ )
    93   {
    94     *pU = pU[-1];
    95     *pV = pV[-1];
    96     pU += nStrideC;
    97     pV += nStrideC;
    98   }
    99   memcpy(pU-(nWidth>>1), pU-(nWidth>>1)-nStrideC, ((nWidth>>1)+1)*sizeof(Pel));
    100   memcpy(pV-(nWidth>>1), pV-(nWidth>>1)-nStrideC, ((nWidth>>1)+1)*sizeof(Pel));
    101   pU = pcPic->getCbAddr();
    102   pV = pcPic->getCrAddr();
     92  pcPic->setBorderExtension( false );
     93  pcPic->extendPicBorder();
    10394
    10495  Pel iMaxValY = (1<<getOutputBitDepthY())-1;
  • trunk/source/Lib/TLibCommon/TCom3DAsymLUT.h

    r713 r815  
    100100  p[0] = new T*[xSize*ySize];
    101101  for( Int x = 1 ; x < xSize ; x++ )
     102  {
    102103    p[x] = p[x-1] + ySize;
     104  }
    103105  p[0][0] = new T[xSize*ySize*zSize];
    104106  for( Int x = 0 ; x < xSize ; x++ )
    105107  {
    106108    for( Int y = 0 ; y < ySize ; y++ )
     109    {
    107110      p[x][y] = p[0][0] + x * ySize * zSize + y * zSize;
     111    }
    108112  }
    109113}
     
    117121    {
    118122      if( p[0][0] != NULL )
     123      {
    119124        delete [] p[0][0];
     125      }
    120126      delete [] p[0];
    121127    }
  • trunk/source/Lib/TLibCommon/TComDataCU.cpp

    r713 r815  
    35173517#endif
    35183518
    3519 #if N0139_POSITION_ROUNDING_OFFSET
     3519#if REF_IDX_MFM
     3520  // offset for collocated block in the motion mapping
    35203521  if( iMotionMapping == 1 )
    35213522  {
     3523    Bool unequalPictureSizeFlag = g_posScalingFactor[refLayerIdc][0] != 65536 || g_posScalingFactor[refLayerIdc][1] != 65536; //the condition should be updated according to the WD.
     3524
    35223525    // actually, motion field compression is performed in the Void TComPic::compressMotion() function, but with (+4) the rounding may have effect on the picture boundary check.
    3523     iBX = ( ( iBX + 4 ) >> 4 ) << 4;
    3524     iBY = ( ( iBY + 4 ) >> 4 ) << 4;
     3526    if( unequalPictureSizeFlag )
     3527    {
     3528      iBX = ( ( iBX + 4 ) >> 4 ) << 4;
     3529      iBY = ( ( iBY + 4 ) >> 4 ) << 4;
     3530    }
     3531    else
     3532    {
     3533      iBX += 4;
     3534      iBY += 4;
     3535    }
    35253536  }
    35263537#endif
     
    36373648  {
    36383649    Int refIdxL0 = cMvFieldL0.getRefIdx();
    3639     if(getSlice()->getRefPic(REF_PIC_LIST_0, refIdxL0)->isILR(m_layerId))
     3650    TComPic* refPic = m_pcSlice->getRefPic(REF_PIC_LIST_0, refIdxL0);
     3651
     3652    if(refPic->isILR(m_layerId))
    36403653    {
    36413654      checkZeroMVILR &= (cMvFieldL0.getHor() == 0 && cMvFieldL0.getVer() == 0);
     3655
     3656      // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture,
     3657      // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture
     3658      checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_layerId, refPic->getLayerId() );
    36423659    }
    36433660  }
     
    36453662  {
    36463663    Int refIdxL1  = cMvFieldL1.getRefIdx();
    3647     if(getSlice()->getRefPic(REF_PIC_LIST_1, refIdxL1)->isILR(m_layerId))
     3664    TComPic* refPic = m_pcSlice->getRefPic(REF_PIC_LIST_1, refIdxL1);
     3665
     3666    if(refPic->isILR(m_layerId))
    36483667    {
    36493668      checkZeroMVILR &= (cMvFieldL1.getHor() == 0 && cMvFieldL1.getVer() == 0);
     3669
     3670      // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture,
     3671      // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture
     3672      checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_layerId, refPic->getLayerId() );
    36503673    }
    36513674  }
  • trunk/source/Lib/TLibCommon/TComPic.cpp

    r595 r815  
    7272{
    7373}
    74 #if SVC_UPSAMPLING
     74#if SVC_EXTENSION
    7575#if AUXILIARY_PICTURES
    7676Void TComPic::create( Int iWidth, Int iHeight, ChromaFormat chromaFormatIDC, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow,
     
    184184 
    185185  deleteSEIs(m_SEIs);
    186 #if SVC_EXTENSION && SVC_UPSAMPLING
     186#if SVC_EXTENSION
    187187  for( Int i = 0; i < MAX_LAYERS; i++ )
    188188  {
  • trunk/source/Lib/TLibCommon/TComPic.h

    r713 r815  
    9292  Int                   m_nFrameBit;
    9393#endif
    94 
     94#if POC_RESET_IDC_DECODER
     95  Bool                  m_currAuFlag;
     96#endif
    9597public:
    9698  TComPic();
    9799  virtual ~TComPic();
    98100 
     101#if SVC_EXTENSION
    99102#if AUXILIARY_PICTURES
    100 #if SVC_UPSAMPLING
    101103  Void          create( Int iWidth, Int iHeight, ChromaFormat chromaFormatIDC, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow,
    102104                        Int *numReorderPics, TComSPS* pcSps = NULL, Bool bIsVirtual = false );
    103105#else
    104   Void          create( Int iWidth, Int iHeight, ChromaFormat chromaFormatIDC, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow,
    105                         Int *numReorderPics, Bool bIsVirtual = false );                       
    106 #endif
    107 #else
    108 #if SVC_UPSAMPLING
    109106  Void          create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow,
    110107                        Int *numReorderPics, TComSPS* pcSps = NULL, Bool bIsVirtual = false );
     108#endif
    111109#else
    112110  Void          create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow,
    113                         Int *numReorderPics, Bool bIsVirtual = false );                        
    114 #endif
    115 #endif
     111                        Int *numReorderPics, Bool bIsVirtual = false );
     112#endif //SVC_EXTENSION
     113
    116114  virtual Void  destroy();
    117115 
     
    202200  TComPicYuv*   getFullPelBaseRec   (UInt refLayerIdc)  { return  m_pcFullPelBaseRec[refLayerIdc];  }
    203201#if REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
    204   Bool          isILR( UInt currLayerId )   { return ( getIsLongTerm() && m_layerId < currLayerId ); }
     202  Bool          isILR( UInt currLayerId )   { return ( m_bIsLongTerm && m_layerId < currLayerId ); }
    205203#endif
    206204#if REF_IDX_MFM
     
    227225  Int   getFrameBit()         { return m_nFrameBit; }
    228226#endif
     227#if POC_RESET_IDC_DECODER
     228  Bool isCurrAu() { return m_currAuFlag; }
     229  Void setCurrAuFlag(Bool x) {m_currAuFlag = x; }
     230#endif
    229231};// END CLASS DEFINITION TComPic
    230232
  • trunk/source/Lib/TLibCommon/TComPicYuv.cpp

    r713 r815  
    6767{
    6868}
     69
     70#if SVC_EXTENSION
    6971#if AUXILIARY_PICTURES
    70 #if SVC_UPSAMPLING
    7172Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, TComSPS* pcSps )
    7273#else
    73 Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth )
    74 #endif
    75 #else
    76 #if SVC_UPSAMPLING
    7774Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, TComSPS* pcSps )
     75#endif
    7876#else
    7977Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth )
    8078#endif
    81 #endif
    8279{
    8380  m_iPicWidth       = iPicWidth;
    8481  m_iPicHeight      = iPicHeight;
    8582 
    86 #if SVC_UPSAMPLING
     83#if SVC_EXTENSION
    8784  if(pcSps != NULL)
    8885  {
     
    369366}
    370367
     368#if SVC_EXTENSION
     369Void TComPicYuv::dump( Char* pFileName, Bool bAdd, Int bitDepth )
     370{
     371  FILE* pFile;
     372  if (!bAdd)
     373  {
     374    pFile = fopen (pFileName, "wb");
     375  }
     376  else
     377  {
     378    pFile = fopen (pFileName, "ab");
     379  }
     380
     381  if( bitDepth == 8 )
     382  {
     383    dump( pFileName, bAdd );
     384    return;
     385  }
     386 
     387  Int   x, y;
     388  UChar uc;
     389 
     390  Pel*  piY   = getLumaAddr();
     391  Pel*  piCb  = getCbAddr();
     392  Pel*  piCr  = getCrAddr();
     393 
     394  for ( y = 0; y < m_iPicHeight; y++ )
     395  {
     396    for ( x = 0; x < m_iPicWidth; x++ )
     397    {
     398      uc = piY[x] & 0xff;     
     399      fwrite( &uc, sizeof(UChar), 1, pFile );
     400      uc = (piY[x] >> 8) & 0xff;     
     401      fwrite( &uc, sizeof(UChar), 1, pFile );
     402    }
     403    piY += getStride();
     404  }
     405 
     406  for ( y = 0; y < m_iPicHeight >> 1; y++ )
     407  {
     408    for ( x = 0; x < m_iPicWidth >> 1; x++ )
     409    {
     410      uc = piCb[x] & 0xff;
     411      fwrite( &uc, sizeof(UChar), 1, pFile );
     412      uc = (piCb[x] >> 8) & 0xff;
     413      fwrite( &uc, sizeof(UChar), 1, pFile );
     414    }
     415    piCb += getCStride();
     416  }
     417 
     418  for ( y = 0; y < m_iPicHeight >> 1; y++ )
     419  {
     420    for ( x = 0; x < m_iPicWidth >> 1; x++ )
     421    {
     422      uc = piCr[x] & 0xff;
     423      fwrite( &uc, sizeof(UChar), 1, pFile );
     424      uc = (piCr[x] >> 8) & 0xff;
     425      fwrite( &uc, sizeof(UChar), 1, pFile );
     426    }
     427    piCr += getCStride();
     428  }
     429 
     430  fclose(pFile);
     431}
     432
     433#endif
    371434
    372435//! \}
  • trunk/source/Lib/TLibCommon/TComPicYuv.h

    r595 r815  
    4242#include "CommonDef.h"
    4343#include "TComRom.h"
    44 #if SVC_UPSAMPLING
     44#if SVC_EXTENSION
    4545#include "TComSlice.h"
    4646#endif
     
    9494  ChromaFormat m_chromaFormatIDC; ////< Chroma Format
    9595#endif
    96 #if SVC_UPSAMPLING
    9796  Window  m_conformanceWindow;
    98 #endif
    9997#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    10098  Bool    m_isReconstructed;
     
    112110  //  Memory management
    113111  // ------------------------------------------------------------------------------------------------
     112#if SVC_EXTENSION
    114113#if AUXILIARY_PICTURES
    115 #if SVC_UPSAMPLING
    116114  Void  create      ( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, TComSPS* pcSps = NULL);
    117115#else
    118   Void  create      ( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth );
    119 #endif 
    120 #else
    121 #if SVC_UPSAMPLING
    122116  Void  create      ( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, TComSPS* pcSps = NULL);
     117#endif
    123118#else
    124119  Void  create      ( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth );
    125 #endif 
    126 #endif
     120#endif //SVC_EXTENSION
    127121 
    128122  Void  destroy     ();
     
    187181#if SVC_EXTENSION
    188182  Void   setHeight   ( Int iPicHeight )     { m_iPicHeight = iPicHeight; }
    189 #if SVC_UPSAMPLING
    190183  Window& getConformanceWindow()                           { return  m_conformanceWindow;             }
    191184  Void    setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; }
    192 #endif
    193185#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    194186  Void  setReconstructed(Bool x) { m_isReconstructed = x;    }
     
    199191  Void convertToMonochrome();
    200192#endif
     193  Void dump( Char* pFileName, Bool bAdd, Int bitDepth );
    201194#endif //SVC_EXTENSION
    202195
  • trunk/source/Lib/TLibCommon/TComPrediction.cpp

    r713 r815  
    487487  pcCU->clipMv(cMv);
    488488
     489#if SVC_EXTENSION
     490  if( pcCU->getLayerId() > 0 )
     491  {
     492    TComPic* refPic = pcCU->getSlice()->getRefPic(eRefPicList, iRefIdx);
     493
     494    if( refPic->isILR(pcCU->getLayerId()) )
     495    {
     496      // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture,
     497      // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture
     498      assert( pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerId(), refPic->getLayerId() ) );
     499
    489500#if REF_IDX_ME_ZEROMV
    490   assert( ( pcCU->getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR(pcCU->getLayerId()) && cMv.getHor() == 0 && cMv.getVer() == 0 ) || pcCU->getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR(pcCU->getLayerId()) == false );
     501      // It is a requirement of bitstream conformance that the variables mvLX[ 0 ] and mvLX[ 1 ] shall be equal to 0 if the value of refIdxLX corresponds to an inter-layer reference picture.
     502      assert( cMv.getHor() == 0 && cMv.getVer() == 0 );
     503#endif
     504    }
     505
     506  }
    491507#endif
    492508
     
    765781}
    766782
    767 #if SVC_UPSAMPLING
     783#if SVC_EXTENSION
    768784#if O0215_PHASE_ALIGNMENT
    769785#if O0194_JOINT_US_BITSHIFT
     
    791807#endif
    792808#endif
    793 #endif
     809#endif //SVC_EXTENSION
    794810//! \}
  • trunk/source/Lib/TLibCommon/TComPrediction.h

    r713 r815  
    4848#include "TComWeightPrediction.h"
    4949
    50 #if SVC_UPSAMPLING
     50#if SVC_EXTENSION
    5151#include "TComUpsampleFilter.h"
    5252#endif
     
    7272 
    7373  TComInterpolationFilter m_if;
    74  
    75 #if SVC_UPSAMPLING
    76   TComUpsampleFilter      m_cUsf;
    77 #endif
    7874
    7975  Pel*   m_pLumaRecBuffer;       ///< array for downsampled reconstructed luma sample
     
    9490  Void xDCPredFiltering( Int* pSrc, Int iSrcStride, Pel*& rpDst, Int iDstStride, Int iWidth, Int iHeight );
    9591  Bool xCheckIdenticalMotion    ( TComDataCU* pcCU, UInt PartAddr);
     92 
     93#if SVC_EXTENSION
     94  TComUpsampleFilter      m_cUsf;
     95#endif
    9696
    9797public:
     
    118118
    119119#if SVC_EXTENSION
    120 #if SVC_UPSAMPLING
    121120#if O0215_PHASE_ALIGNMENT
    122121#if O0194_JOINT_US_BITSHIFT
     
    132131#endif
    133132#endif
    134 #endif
    135133#endif //SVC_EXTENSION
    136134};
  • trunk/source/Lib/TLibCommon/TComRom.cpp

    r595 r815  
    527527  {
    528528  case NAL_UNIT_CODED_SLICE_TRAIL_N:
     529    return "TRAIL_N";
    529530  case NAL_UNIT_CODED_SLICE_TRAIL_R:
    530     return "TRAIL";
     531    return "TRAIL_R";
    531532 
    532533  case NAL_UNIT_CODED_SLICE_TSA_N:
     534    return "  TSA_N";
    533535  case NAL_UNIT_CODED_SLICE_TSA_R:
    534     return "  TSA";
     536    return "  TSA_R";
    535537 
    536538  case NAL_UNIT_CODED_SLICE_STSA_N:
     539    return " STSA_N";
    537540  case NAL_UNIT_CODED_SLICE_STSA_R:
    538     return " STSA";
     541    return " STSA_R";
    539542
    540543  case NAL_UNIT_CODED_SLICE_RADL_N:
     544    return " RADL_N";
    541545  case NAL_UNIT_CODED_SLICE_RADL_R:
    542     return " RADL";
     546    return " RADL_R";
    543547 
    544548  case NAL_UNIT_CODED_SLICE_RASL_N:
     549    return " RASL_N";
    545550  case NAL_UNIT_CODED_SLICE_RASL_R:
    546     return " RASL";
     551    return " RASL_R";
    547552
    548553  case NAL_UNIT_CODED_SLICE_BLA_W_LP:
    549554  case NAL_UNIT_CODED_SLICE_BLA_W_RADL:
    550555  case NAL_UNIT_CODED_SLICE_BLA_N_LP:
    551     return "  BLA";
     556    return "    BLA";
    552557
    553558  case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
    554559  case NAL_UNIT_CODED_SLICE_IDR_N_LP:
    555     return "  IDR";
     560    return "    IDR";
    556561 
    557562  case NAL_UNIT_CODED_SLICE_CRA:
    558     return "  CRA";
     563    return "    CRA";
    559564
    560565  default:
    561     return "     ";
     566    return "       ";
    562567  };
    563568}
  • trunk/source/Lib/TLibCommon/TComSlice.cpp

    r713 r815  
    125125, m_pocMsbValPresentFlag          ( false )
    126126#endif
     127#if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER
     128, m_picOrderCntLsb (0)
     129#endif
    127130#endif //SVC_EXTENSION
    128131{
     
    200203  m_numEntryPointOffsets = 0;
    201204  m_enableTMVPFlag = true;
     205#if POC_RESET_IDC_SIGNALLING
     206  m_pocResetIdc                   = 0;
     207  m_pocResetPeriodId              = 0;
     208  m_fullPocResetFlag              = false;
     209  m_pocLsbVal                     = 0;
     210  m_pocMsbVal                     = 0;
     211  m_pocMsbValRequiredFlag         = false;
     212  m_pocMsbValPresentFlag          = false;
     213#endif
     214#if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER
     215  m_picOrderCntLsb = 0;
     216#endif
    202217}
    203218
     
    223238}
    224239#endif
    225 
     240#if POC_RESET_IDC_DECODER
     241Bool TComSlice::getRaslPicFlag      ()
     242{
     243  return  getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R
     244  || getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N;
     245}
     246Bool TComSlice::getRadlPicFlag      ()
     247{
     248  return  getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_R
     249  || getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N;
     250}
     251#endif
     252#if POC_RESET_IDC_ENCODER
     253Void TComSlice::decrementRefPocValues(Int const decrementValue)
     254{
     255  for(Int listNum = 0; listNum < 2; listNum++)
     256  {
     257    RefPicList dpbPicSliceList = (listNum == 1) ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
     258    for(Int listIdx = 0; listIdx < getNumRefIdx( dpbPicSliceList ); listIdx++)
     259    {
     260      setRefPOC( getRefPOC(dpbPicSliceList, listIdx) - decrementValue,
     261                  dpbPicSliceList,
     262                  listIdx
     263                  );
     264    }
     265  }
     266}
     267Int TComSlice::getCurrMsb( Int currLsb, Int prevLsb, Int prevMsb, Int maxLsbVal )
     268{
     269  if( prevLsb - currLsb >= (maxLsbVal >> 1) )
     270  {
     271    return prevMsb + maxLsbVal;
     272  }
     273  else if( currLsb - prevLsb > (maxLsbVal >> 1) )
     274  {
     275    return prevMsb - maxLsbVal;
     276  }
     277  else
     278  {
     279    return prevMsb;
     280  }
     281}
     282#endif
    226283/**
    227284 - allocate table to contain substream sizes to be written to the slice header.
     
    279336  while ( iterPic != rcListPic.end() )
    280337  {
     338#if POC_RESET_IDC_ENCODER
     339    if( (pcPic->getPOC() == poc) && (pcPic->getSlice(0)->isReferenced()) )
     340#else
    281341    if(pcPic->getPOC() == poc)
     342#endif
    282343    {
    283344      break;
     
    293354    pcPic = *(iterPic);
    294355  }
    295 #if POC_RESET_FLAG
     356#if POC_RESET_FLAG || POC_RESET_IDC_DECODER
    296357  assert( pcPic->getSlice(0)->isReferenced() );
    297358#endif
     
    512573    }
    513574#if MAX_ONE_RESAMPLING_DIRECT_LAYERS
    514 #if SCALABILITY_MASK_E0104
    515     if( m_pcVPS->getScalabilityMask(2) )
    516 #else
    517     if( m_pcVPS->getScalabilityMask(1) )
    518 #endif
     575    if( m_pcVPS->getScalabilityMask( SCALABILITY_ID ) )
    519576    {
    520577      Int numResampler = 0;
     
    550607#endif
    551608#if O0194_DIFFERENT_BITDEPTH_EL_BL
    552         Int sameBitDepth = g_bitDepthYLayer[m_layerId] - g_bitDepthYLayer[refLayerId] + g_bitDepthCLayer[m_layerId] - g_bitDepthCLayer[refLayerId];
    553 
    554         if( !( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) || !scalingOffset || !sameBitDepth
     609        Bool sameBitDepths = ( g_bitDepthYLayer[m_layerId] == g_bitDepthYLayer[refLayerId] ) && ( g_bitDepthCLayer[m_layerId] == g_bitDepthCLayer[refLayerId] );
     610
     611        if( !( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) || !scalingOffset || !sameBitDepths
    555612#if Q0048_CGS_3D_ASYMLUT
    556613          || getPPS()->getCGSFlag()
     
    775832#endif
    776833
    777 #if N0147_IRAP_ALIGN_FLAG
    778834  assert(m_aiNumRefIdx[REF_PIC_LIST_0] > 0);
    779835  assert(m_aiNumRefIdx[REF_PIC_LIST_1] > 0);
    780 #else
    781   assert(m_aiNumRefIdx[REF_PIC_LIST_0] > 1);
    782   assert(m_aiNumRefIdx[REF_PIC_LIST_1] > 1);
    783 #endif
    784836
    785837  //set L0 inter-layer reference picture modification
    786838#if RPL_INIT_N0316_N0082
    787839  Bool hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == (numberOfPocBeforeCurr + m_activeNumILRRefIdx)) ? false : true;
     840
     841  if( m_activeNumILRRefIdx > 1 )
     842  {
     843    hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] >= (numberOfPocBeforeCurr + m_activeNumILRRefIdx)) ? false : true;
     844  }
    788845#else
    789846  Bool hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == numberOfRpsCurrTempList) ? false : true;
    790847#endif
    791 #if N0147_IRAP_ALIGN_FLAG
    792848  hasModification = hasModification && ( m_aiNumRefIdx[REF_PIC_LIST_0] > 1 );
    793 #endif
    794849  refPicListModification->setRefPicListModificationFlagL0(hasModification);
    795850  if(hasModification)
     
    799854      refPicListModification->setRefPicSetIdxL0(i, i);
    800855    }
     856
    801857    if(m_aiNumRefIdx[REF_PIC_LIST_0] > numberOfRpsCurrTempList)
    802858    {
    803         // repeat last ref pic when the number of active ref idx are more than RPS entries
     859      // repeat last ref pic when the number of active ref idx are more than RPS entries
    804860      for (Int i = numberOfRpsCurrTempList; i < m_aiNumRefIdx[REF_PIC_LIST_0]; i ++)
    805861      {
     
    809865    else
    810866    {
    811       for(Int i = m_activeNumILRRefIdx; i > 0; i-- )
     867      // number of ILRPs included into the reference picture list with the list modification
     868      Int includeNumILRP = min( max(1, m_aiNumRefIdx[REF_PIC_LIST_0]-numberOfPocBeforeCurr), m_activeNumILRRefIdx);
     869
     870      for(Int i = includeNumILRP; i > 0; i-- )
    812871      {
    813872#if RPL_INIT_N0316_N0082
    814873        if((numberOfPocBeforeCurr) >= m_aiNumRefIdx[REF_PIC_LIST_0])
    815874        {
    816           refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr);
     875          refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr + includeNumILRP - i);
    817876        }
    818877        else
    819878        {
    820           refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr);
     879          refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr + includeNumILRP - i);
    821880          for (Int j = numberOfPocBeforeCurr; j < (m_aiNumRefIdx[REF_PIC_LIST_0] - i); j++)
    822881          {
    823             refPicListModification->setRefPicSetIdxL0(j, j + m_activeNumILRRefIdx);
     882            assert( j + includeNumILRP < numberOfRpsCurrTempList );
     883            refPicListModification->setRefPicSetIdxL0(j, j + includeNumILRP);
    824884          }
    825885        }
     
    832892
    833893  //set L1 inter-layer reference picture modification
    834   hasModification = (m_aiNumRefIdx[REF_PIC_LIST_1] == numberOfRpsCurrTempList) ? false : true;
    835 #if N0147_IRAP_ALIGN_FLAG
     894  hasModification = (m_aiNumRefIdx[REF_PIC_LIST_1] >= numberOfRpsCurrTempList) ? false : true;
    836895  hasModification = hasModification && ( m_aiNumRefIdx[REF_PIC_LIST_1] > 1 );
    837 #endif
    838896
    839897  refPicListModification->setRefPicListModificationFlagL1(hasModification);
     
    854912    else
    855913    {
    856       for(Int i = m_activeNumILRRefIdx; i > 0; i-- )
     914      Int includeNumILRP = min(m_aiNumRefIdx[REF_PIC_LIST_1], m_activeNumILRRefIdx);
     915
     916      for(Int i = includeNumILRP; i > 0; i-- )
    857917      {
    858918        refPicListModification->setRefPicSetIdxL1(m_aiNumRefIdx[REF_PIC_LIST_1] - i, numberOfRpsCurrTempList - i);
     
    10881148      rpcPic->setCurrSliceIdx(0);
    10891149#if NO_CLRAS_OUTPUT_FLAG
     1150#if POC_RESET_IDC_ENCODER
    10901151      if (noClrasOutputFlag)
    10911152      {
     1153        rpcPic->getSlice(0)->setReferenced(false);  // all layers // TODO. This does not mark all layers
     1154      }
     1155      else
     1156      {
     1157        if (rpcPic->getLayerId() == m_layerId) rpcPic->getSlice(0)->setReferenced(false);  // only current layer
     1158      }
     1159#else
     1160      if (noClrasOutputFlag)
     1161      {
    10921162        if (rpcPic->getPOC() != pocCurr) rpcPic->getSlice(0)->setReferenced(false);  // all layers
    10931163      }
     
    10961166        if (rpcPic->getPOC() != pocCurr && rpcPic->getLayerId() == m_layerId) rpcPic->getSlice(0)->setReferenced(false);  // only current layer
    10971167      }
     1168#endif
    10981169#else
    10991170      if (rpcPic->getPOC() != pocCurr) rpcPic->getSlice(0)->setReferenced(false);
     
    11011172      iterPic++;
    11021173    }
     1174#if POC_RESET_IDC_ENCODER
     1175    this->getPic()->getSlice(0)->setReferenced(true);   // Mark the current picture back as refererced.
     1176#endif
    11031177    if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    11041178      || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     
    13291403}
    13301404
    1331 
     1405#if POC_RESET_IDC_ENCODER
     1406Void TComSlice::checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic, Bool usePocBeforeReset)
     1407#else
    13321408Void TComSlice::checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic)
     1409#endif
    13331410{
    13341411  TComPic* rpcPic;
     
    14191496         nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL)
    14201497      {
     1498#if POC_RESET_IDC_ENCODER
     1499        if( usePocBeforeReset )
     1500        {
     1501          assert(rpcPic->getSlice(0)->getPocValueBeforeReset() < this->getPocValueBeforeReset());
     1502        }
     1503        else
     1504        {
     1505          assert(rpcPic->getPOC() < this->getPOC());
     1506        }
     1507#else
    14211508        assert(rpcPic->getPOC() < this->getPOC());
     1509#endif
    14221510      }
    14231511    }
     
    14371525          if(this->getAssociatedIRAPPOC() != rpcPic->getPOC())
    14381526          {
     1527#if POC_RESET_IDC_ENCODER
     1528            if( usePocBeforeReset )
     1529            {
     1530              assert(rpcPic->getSlice(0)->getPocValueBeforeReset() < this->getPocValueBeforeReset());
     1531            }
     1532            else
     1533            {
     1534              assert(rpcPic->getPOC() < this->getPOC());
     1535            }
     1536#else
    14391537            assert(rpcPic->getPOC() < this->getPOC());
     1538#endif
    14401539          }
    14411540        }
     
    14541553        // rpcPic is a picture that preceded the leading in decoding order since it exist in the DPB
    14551554        // rpcPic would violate the constraint if it was a trailing picture
     1555#if POC_RESET_IDC_ENCODER
     1556        if( usePocBeforeReset )
     1557        {
     1558          assert(rpcPic->getPOC() <= this->getAssociatedIrapPocBeforeReset());
     1559        }
     1560        else
     1561        {
     1562          assert(rpcPic->getPOC() <= this->getAssociatedIRAPPOC());
     1563        }
     1564#else
    14561565        assert(rpcPic->getPOC() <= this->getAssociatedIRAPPOC());
     1566#endif
    14571567      }
    14581568    }
     
    17601870    if(isAvailable == 0)   
    17611871    {           
     1872#if !UNAVAILABLE_PIC_BUGFIX
    17621873      if (this->getPOC() + pReferencePictureSet->getDeltaPOC(i) >= pocRandomAccess)
     1874#endif
    17631875      {
    17641876        if(!pReferencePictureSet->getUsed(i) )
     
    17811893      }
    17821894#if ALLOW_RECOVERY_POINT_AS_RAP
     1895#if UNAVAILABLE_PIC_BUGFIX
     1896      if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess)
     1897#else
    17831898      else if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess)
     1899#endif
    17841900      {
    17851901        atLeastOneUnabledByRecoveryPoint = 1;
     
    20252141  if ( layerId == 0 )
    20262142  {
    2027     retVal = sps->getPicWidthInLumaSamples();
     2143    if( vps->getAvcBaseLayerFlag() )
     2144    {
     2145      retVal = vps->getVpsRepFormat(layerId)->getPicWidthVpsInLumaSamples();
     2146    }
     2147    else
     2148    {
     2149      retVal = sps->getPicWidthInLumaSamples();
     2150    }
    20282151  }
    20292152  else
     
    20512174  if( layerId == 0 )
    20522175  {
    2053     retVal = sps->getPicHeightInLumaSamples();
     2176    if( vps->getAvcBaseLayerFlag() )
     2177    {
     2178      retVal = vps->getVpsRepFormat(layerId)->getPicHeightVpsInLumaSamples();
     2179    }
     2180    else
     2181    {
     2182      retVal = sps->getPicHeightInLumaSamples();
     2183    }
    20542184  }
    20552185  else
     
    22072337, m_bTemporalIdNestingFlag    (false)
    22082338, m_numHrdParameters          (  0)
    2209 #if !VPS_RENAME
    2210 , m_maxNuhReservedZeroLayerId (  0)
    2211 #endif
    22122339, m_hrdParameters             (NULL)
    22132340, m_hrdOpSetIdx               (NULL)
    22142341, m_cprmsPresentFlag          (NULL)
    2215 #if VPS_RENAME
    22162342, m_maxLayerId                (0)
    22172343, m_numLayerSets              (0)
    2218 #endif
    22192344#if VPS_EXTN_OP_LAYER_SETS
    22202345, m_numOutputLayerSets        (0) 
     
    22342359#endif
    22352360#endif
    2236 #if VPS_VUI_BITRATE_PICRATE
    22372361, m_bitRatePresentVpsFlag     (false)
    22382362, m_picRatePresentVpsFlag     (false)
    2239 #endif
    22402363#if REPN_FORMAT_IN_VPS
    22412364#if Q0195_REP_FORMAT_CLEANUP
     
    23112434  m_crossLayerPictureTypeAlignFlag = true;
    23122435#endif
    2313 #if N0147_IRAP_ALIGN_FLAG
    23142436  m_crossLayerIrapAlignFlag = true;
    2315 #endif
    23162437#if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    23172438  m_crossLayerAlignedIdrOnlyFlag = false;
    23182439#endif
    2319 #if N0120_MAX_TID_REF_PRESENT_FLAG
    23202440  m_maxTidRefPresentFlag = true;
    2321 #endif
    23222441  for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++)
    23232442  {
     
    23362455  ::memset(m_loopFilterNotAcrossTilesFlag,  0, sizeof(m_loopFilterNotAcrossTilesFlag));
    23372456#endif
    2338 #if TILE_BOUNDARY_ALIGNED_FLAG
    23392457  ::memset(m_tileBoundariesAlignedFlag,  0, sizeof(m_tileBoundariesAlignedFlag));
    2340 #endif
    23412458#if VPS_VUI_WPP_NOT_IN_USE__FLAG
    23422459  m_wppNotInUseFlag = true;
     
    23632480  }
    23642481#endif
    2365 #if VPS_VUI_BITRATE_PICRATE 
    23662482  ::memset(m_bitRatePresentFlag, 0, sizeof(m_bitRatePresentFlag));
    23672483  ::memset(m_picRatePresentFlag, 0, sizeof(m_picRatePresentFlag));
     
    23702486  ::memset(m_constPicRateIdc   , 0, sizeof(m_constPicRateIdc)   );
    23712487  ::memset(m_avgPicRate        , 0, sizeof(m_avgPicRate)        );
    2372 #endif
    23732488#if REPN_FORMAT_IN_VPS
    23742489  ::memset( m_vpsRepFormatIdx, 0, sizeof(m_vpsRepFormatIdx) );
     
    24852600    }
    24862601  }
    2487 #if TILE_BOUNDARY_ALIGNED_FLAG 
     2602
    24882603  if (m_tilesNotInUseFlag)
    24892604  {
     
    24962611    }
    24972612  }
    2498 #endif
    2499 }
    2500 #endif
     2613}
     2614#endif
     2615
    25012616#if VPS_VUI_WPP_NOT_IN_USE__FLAG
    25022617Void TComVPS::setWppNotInUseFlag(Bool x)
     
    25262641}
    25272642
    2528 Void TComVPS::setNumRefLayers(Int currLayerId)
    2529 {
     2643Void TComVPS::setNumRefLayers()
     2644{
     2645  memset( m_numberRefLayers, 0, sizeof( m_numberRefLayers ) );
     2646
    25302647  for (Int i = 0; i < m_uiMaxLayers; i++)
    25312648  {
     
    25382655  }
    25392656}
     2657#endif
     2658
     2659#if Q0078_ADD_LAYER_SETS
     2660Void TComVPS::setPredictedLayerIds()
     2661{
     2662  for (UInt i = 0; i < getMaxLayers() - 1; i++)
     2663  {
     2664    UInt iNuhLId = getLayerIdInNuh(i);
     2665    UInt predIdx = 0;
     2666    for (UInt j = iNuhLId + 1; j < MAX_NUM_LAYER_IDS; j++)
     2667    {
     2668      if (getRecursiveRefLayerFlag(j, iNuhLId))
     2669      {
     2670        setPredictedLayerId(i, predIdx, j);
     2671        predIdx++;
     2672      }
     2673    }
     2674    setNumPredictedLayers(iNuhLId, predIdx);
     2675  }
     2676}
     2677
     2678Void TComVPS::setTreePartitionLayerIdList()
     2679{
     2680  Bool countedLayerIdxFlag[MAX_NUM_LAYER_IDS];
     2681
     2682  for (UInt i = 0; i <= getMaxLayers() - 1; i++)
     2683  {
     2684    countedLayerIdxFlag[i] = false;
     2685  }
     2686
     2687  Int numIndependentLayers = 0;
     2688
     2689  for (UInt i = 0; i <= getMaxLayers() - 1; i++)
     2690  {
     2691    UInt iNuhLId = getLayerIdInNuh(i);
     2692    if (getNumDirectRefLayers(iNuhLId) == 0)
     2693    {
     2694      setTreePartitionLayerId(numIndependentLayers, 0, iNuhLId);
     2695      setNumLayersInTreePartition(numIndependentLayers, 1);
     2696      for (UInt j = 0; j < getNumPredictedLayers(iNuhLId); j++)
     2697      {
     2698        if (!countedLayerIdxFlag[getLayerIdInVps(iNuhLId)])
     2699        {
     2700          setTreePartitionLayerId(numIndependentLayers, getNumLayersInTreePartition(numIndependentLayers), getPredictedLayerId(iNuhLId, j));
     2701          setNumLayersInTreePartition(numIndependentLayers, getNumLayersInTreePartition(numIndependentLayers) + 1);
     2702          countedLayerIdxFlag[getLayerIdInVps(getPredictedLayerId(iNuhLId, j))] = true;
     2703        }
     2704      }
     2705      numIndependentLayers++;
     2706    }
     2707  }
     2708
     2709  setNumIndependentLayers(numIndependentLayers);
     2710}
     2711
     2712void TComVPS::setLayerIdIncludedFlagsForAddLayerSets()
     2713{
     2714  for (UInt i = 0; i < getNumAddLayerSets(); i++)
     2715  {
     2716    for (UInt j = 1; j < getNumIndependentLayers(); j++)
     2717    {
     2718      Int layerNum = 0;
     2719      Int lsIdx = getVpsNumLayerSetsMinus1() + 1 + i;
     2720      for (Int layerId = 0; layerId < MAX_VPS_LAYER_ID_PLUS1; layerId++)
     2721      {
     2722        setLayerIdIncludedFlag(false, lsIdx, layerId);
     2723      }
     2724      for (Int treeIdx = 1; treeIdx < getNumIndependentLayers(); treeIdx++)
     2725      {
     2726        for (Int layerCnt = 0; layerCnt < getHighestLayerIdxPlus1(i, j); layerCnt++)
     2727        {
     2728          setLayerSetLayerIdList(lsIdx, layerNum, getTreePartitionLayerId(treeIdx, layerCnt));
     2729          setLayerIdIncludedFlag(true, lsIdx, getTreePartitionLayerId(treeIdx, layerCnt));
     2730          layerNum++;
     2731        }
     2732      }
     2733      setNumLayersInIdList(lsIdx, layerNum);
     2734    }
     2735  }
     2736}
     2737
    25402738#endif
    25412739
     
    27012899  return -1;  // Layer not found
    27022900}
     2901#endif
    27032902#if O0164_MULTI_LAYER_HRD
    27042903Void TComVPS::setBspHrdParameters( UInt hrdIdx, UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess )
     
    27802979}
    27812980#endif
     2981#if RESOLUTION_BASED_DPB
    27822982// RepFormat Assignment operator
    27832983RepFormat& RepFormat::operator= (const RepFormat &other)
     
    28513051#if SVC_EXTENSION
    28523052, m_layerId                   ( 0 )
     3053, m_extensionFlag             ( false )
    28533054, m_numScaledRefLayerOffsets  ( 0 )
    28543055#if REPN_FORMAT_IN_VPS
     
    29053106
    29063107  TimingInfo *timingInfo = vui->getTimingInfo();
    2907 #if TIMING_INFO_NONZERO_LAYERID_SPS
    2908   if( getLayerId() > 0 )
     3108#if SVC_EXTENSION
     3109  if( m_layerId > 0 )
    29093110  {
    29103111    timingInfo->setTimingInfoPresentFlag( false );
     3112    return;
     3113  }
     3114#endif
     3115
     3116  timingInfo->setTimingInfoPresentFlag( true );
     3117  switch( frameRate )
     3118  {
     3119  case 24:
     3120    timingInfo->setNumUnitsInTick( 1125000 );    timingInfo->setTimeScale    ( 27000000 );
     3121    break;
     3122  case 25:
     3123    timingInfo->setNumUnitsInTick( 1080000 );    timingInfo->setTimeScale    ( 27000000 );
     3124    break;
     3125  case 30:
     3126    timingInfo->setNumUnitsInTick( 900900 );     timingInfo->setTimeScale    ( 27000000 );
     3127    break;
     3128  case 50:
     3129    timingInfo->setNumUnitsInTick( 540000 );     timingInfo->setTimeScale    ( 27000000 );
     3130    break;
     3131  case 60:
     3132    timingInfo->setNumUnitsInTick( 450450 );     timingInfo->setTimeScale    ( 27000000 );
     3133    break;
     3134  default:
     3135    timingInfo->setNumUnitsInTick( 1001 );       timingInfo->setTimeScale    ( 60000 );
     3136    break;
     3137  }
     3138
     3139  Bool rateCnt = ( bitRate > 0 );
     3140  hrd->setNalHrdParametersPresentFlag( rateCnt );
     3141  hrd->setVclHrdParametersPresentFlag( rateCnt );
     3142
     3143  hrd->setSubPicCpbParamsPresentFlag( ( numDU > 1 ) );
     3144
     3145  if( hrd->getSubPicCpbParamsPresentFlag() )
     3146  {
     3147    hrd->setTickDivisorMinus2( 100 - 2 );                          //
     3148    hrd->setDuCpbRemovalDelayLengthMinus1( 7 );                    // 8-bit precision ( plus 1 for last DU in AU )
     3149    hrd->setSubPicCpbParamsInPicTimingSEIFlag( true );
     3150    hrd->setDpbOutputDelayDuLengthMinus1( 5 + 7 );                 // With sub-clock tick factor of 100, at least 7 bits to have the same value as AU dpb delay
    29113151  }
    29123152  else
    29133153  {
    2914 #endif
    2915     timingInfo->setTimingInfoPresentFlag( true );
    2916     switch( frameRate )
    2917     {
    2918     case 24:
    2919       timingInfo->setNumUnitsInTick( 1125000 );    timingInfo->setTimeScale    ( 27000000 );
    2920       break;
    2921     case 25:
    2922       timingInfo->setNumUnitsInTick( 1080000 );    timingInfo->setTimeScale    ( 27000000 );
    2923       break;
    2924     case 30:
    2925       timingInfo->setNumUnitsInTick( 900900 );     timingInfo->setTimeScale    ( 27000000 );
    2926       break;
    2927     case 50:
    2928       timingInfo->setNumUnitsInTick( 540000 );     timingInfo->setTimeScale    ( 27000000 );
    2929       break;
    2930     case 60:
    2931       timingInfo->setNumUnitsInTick( 450450 );     timingInfo->setTimeScale    ( 27000000 );
    2932       break;
    2933     default:
    2934       timingInfo->setNumUnitsInTick( 1001 );       timingInfo->setTimeScale    ( 60000 );
    2935       break;
    2936     }
    2937 
    2938     Bool rateCnt = ( bitRate > 0 );
    2939     hrd->setNalHrdParametersPresentFlag( rateCnt );
    2940     hrd->setVclHrdParametersPresentFlag( rateCnt );
    2941 
    2942     hrd->setSubPicCpbParamsPresentFlag( ( numDU > 1 ) );
    2943 
    2944     if( hrd->getSubPicCpbParamsPresentFlag() )
    2945     {
    2946       hrd->setTickDivisorMinus2( 100 - 2 );                          //
    2947       hrd->setDuCpbRemovalDelayLengthMinus1( 7 );                    // 8-bit precision ( plus 1 for last DU in AU )
    2948       hrd->setSubPicCpbParamsInPicTimingSEIFlag( true );
    2949       hrd->setDpbOutputDelayDuLengthMinus1( 5 + 7 );                 // With sub-clock tick factor of 100, at least 7 bits to have the same value as AU dpb delay
    2950     }
    2951     else
    2952     {
    2953       hrd->setSubPicCpbParamsInPicTimingSEIFlag( false ); 
    2954     }
    2955 
    2956     hrd->setBitRateScale( 4 );                                       // in units of 2~( 6 + 4 ) = 1,024 bps
    2957     hrd->setCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
    2958     hrd->setDuCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
    2959  
    2960     hrd->setInitialCpbRemovalDelayLengthMinus1(15);                  // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit
    2961     if( randomAccess )
    2962     {
    2963       hrd->setCpbRemovalDelayLengthMinus1(5);                        // 32 = 2^5 (plus 1)
    2964       hrd->setDpbOutputDelayLengthMinus1 (5);                        // 32 + 3 = 2^6
    2965     }
    2966     else
    2967     {
    2968       hrd->setCpbRemovalDelayLengthMinus1(9);                        // max. 2^10
    2969       hrd->setDpbOutputDelayLengthMinus1 (9);                        // max. 2^10
    2970     }
    2971 
    2972 /*
    2973      Note: only the case of "vps_max_temporal_layers_minus1 = 0" is supported.
    2974 */
    2975     Int i, j;
    2976     UInt birateValue, cpbSizeValue;
    2977     UInt ducpbSizeValue;
    2978     UInt duBitRateValue = 0;
    2979 
    2980     for( i = 0; i < MAX_TLAYER; i ++ )
    2981     {
    2982       hrd->setFixedPicRateFlag( i, 1 );
    2983       hrd->setPicDurationInTcMinus1( i, 0 );
    2984       hrd->setLowDelayHrdFlag( i, 0 );
    2985       hrd->setCpbCntMinus1( i, 0 );
    2986 
    2987       birateValue  = bitRate;
    2988       cpbSizeValue = bitRate;                                     // 1 second
    2989       ducpbSizeValue = bitRate/numDU;
    2990       duBitRateValue = bitRate;
    2991       for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ )
    2992       {
    2993         hrd->setBitRateValueMinus1( i, j, 0, ( birateValue  - 1 ) );
    2994         hrd->setCpbSizeValueMinus1( i, j, 0, ( cpbSizeValue - 1 ) );
    2995         hrd->setDuCpbSizeValueMinus1( i, j, 0, ( ducpbSizeValue - 1 ) );
    2996         hrd->setCbrFlag( i, j, 0, ( j == 0 ) );
    2997 
    2998         hrd->setBitRateValueMinus1( i, j, 1, ( birateValue  - 1) );
    2999         hrd->setCpbSizeValueMinus1( i, j, 1, ( cpbSizeValue - 1 ) );
    3000         hrd->setDuCpbSizeValueMinus1( i, j, 1, ( ducpbSizeValue - 1 ) );
    3001         hrd->setDuBitRateValueMinus1( i, j, 1, ( duBitRateValue - 1 ) );
    3002         hrd->setCbrFlag( i, j, 1, ( j == 0 ) );
    3003       }
    3004     }
    3005 #if TIMING_INFO_NONZERO_LAYERID_SPS
    3006   }
    3007 #endif
     3154    hrd->setSubPicCpbParamsInPicTimingSEIFlag( false ); 
     3155  }
     3156
     3157  hrd->setBitRateScale( 4 );                                       // in units of 2~( 6 + 4 ) = 1,024 bps
     3158  hrd->setCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
     3159  hrd->setDuCpbSizeScale( 6 );                                       // in units of 2~( 4 + 4 ) = 1,024 bit
     3160
     3161  hrd->setInitialCpbRemovalDelayLengthMinus1(15);                  // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit
     3162  if( randomAccess )
     3163  {
     3164    hrd->setCpbRemovalDelayLengthMinus1(5);                        // 32 = 2^5 (plus 1)
     3165    hrd->setDpbOutputDelayLengthMinus1 (5);                        // 32 + 3 = 2^6
     3166  }
     3167  else
     3168  {
     3169    hrd->setCpbRemovalDelayLengthMinus1(9);                        // max. 2^10
     3170    hrd->setDpbOutputDelayLengthMinus1 (9);                        // max. 2^10
     3171  }
     3172
     3173  /*
     3174  Note: only the case of "vps_max_temporal_layers_minus1 = 0" is supported.
     3175  */
     3176  Int i, j;
     3177  UInt birateValue, cpbSizeValue;
     3178  UInt ducpbSizeValue;
     3179  UInt duBitRateValue = 0;
     3180
     3181  for( i = 0; i < MAX_TLAYER; i ++ )
     3182  {
     3183    hrd->setFixedPicRateFlag( i, 1 );
     3184    hrd->setPicDurationInTcMinus1( i, 0 );
     3185    hrd->setLowDelayHrdFlag( i, 0 );
     3186    hrd->setCpbCntMinus1( i, 0 );
     3187
     3188    birateValue  = bitRate;
     3189    cpbSizeValue = bitRate;                                     // 1 second
     3190    ducpbSizeValue = bitRate/numDU;
     3191    duBitRateValue = bitRate;
     3192    for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ )
     3193    {
     3194      hrd->setBitRateValueMinus1( i, j, 0, ( birateValue  - 1 ) );
     3195      hrd->setCpbSizeValueMinus1( i, j, 0, ( cpbSizeValue - 1 ) );
     3196      hrd->setDuCpbSizeValueMinus1( i, j, 0, ( ducpbSizeValue - 1 ) );
     3197      hrd->setCbrFlag( i, j, 0, ( j == 0 ) );
     3198
     3199      hrd->setBitRateValueMinus1( i, j, 1, ( birateValue  - 1) );
     3200      hrd->setCpbSizeValueMinus1( i, j, 1, ( cpbSizeValue - 1 ) );
     3201      hrd->setDuCpbSizeValueMinus1( i, j, 1, ( ducpbSizeValue - 1 ) );
     3202      hrd->setDuBitRateValueMinus1( i, j, 1, ( duBitRateValue - 1 ) );
     3203      hrd->setCbrFlag( i, j, 1, ( j == 0 ) );
     3204    }
     3205  }
    30083206}
    30093207const Int TComSPS::m_winUnitX[]={1,2,2,1};
     
    30613259, m_listsModificationPresentFlag(  0)
    30623260, m_numExtraSliceHeaderBits(0)
     3261#if SVC_EXTENSION
     3262, m_extensionFlag(false)
    30633263#if SCALINGLIST_INFERRING
     3264, m_layerId(0)
    30643265, m_inferScalingListFlag ( false )
    30653266, m_scalingListRefLayerId ( 0 )
     
    30683269, m_pocResetInfoPresentFlag   (false)
    30693270#endif
     3271#if Q0048_CGS_3D_ASYMLUT
     3272, m_nCGSFlag(0)
     3273, m_nCGSOutputBitDepthY(0)
     3274, m_nCGSOutputBitDepthC(0)
     3275#endif
     3276#endif //SVC_EXTENSION
    30703277{
    30713278  m_scalingList = new TComScalingList;
     
    36983905    return false;
    36993906  }       
    3700 #if POC_RESET_FLAG
     3907#if POC_RESET_FLAG || POC_RESET_IDC_DECODER
     3908#if POC_RESET_IDC_DECODER
     3909  TComPic* pic = xGetRefPic( rcListPic, getPOC() );
     3910#else
    37013911  TComPic* pic = xGetRefPic( rcListPic, m_bPocResetFlag ? 0 : m_iPOC );
     3912#endif
    37023913
    37033914  if( pic )
     
    37123923  return true;
    37133924#else
    3714   setBaseColPic(refLayerIdc, xGetRefPic(rcListPic, getPOC()));
     3925  setBaseColPic(refLayerIdc, xGetRefPic(rcListPic, getPOC()));
     3926  return true;
    37153927#endif
    37163928}
  • trunk/source/Lib/TLibCommon/TComSlice.h

    r713 r815  
    140140 
    141141  Void  create  (Int numberOfEntries);
    142   Void  destroy ();
     142  Void  destroy();
    143143
    144144
     
    469469
    470470  UInt        m_numHrdParameters;
    471 #if !VPS_RENAME
     471#if !SVC_EXTENSION
    472472  UInt        m_maxNuhReservedZeroLayerId;
    473473#endif
     
    484484#if SVC_EXTENSION
    485485#if DERIVE_LAYER_ID_LIST_VARIABLES
     486#if Q0078_ADD_LAYER_SETS
     487  Int         m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_ID_PLUS1];
     488  Int         m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS];
     489#else
    486490  Int         m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
    487491  Int         m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1];
     492#endif
    488493#endif
    489494#if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED
     
    492497#endif
    493498#endif
    494 #if VPS_RENAME
    495499  UInt        m_maxLayerId;
    496500  UInt        m_numLayerSets;
     501#if Q0078_ADD_LAYER_SETS
     502  UInt        m_vpsNumLayerSetsMinus1;
     503  Bool        m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_ID_PLUS1];
     504#else
    497505  Bool        m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
    498506#endif
     
    514522  UInt       m_layerIdInVps[MAX_VPS_LAYER_ID_PLUS1];            // Maps layer_id_in_nuh with the layer ID in the VPS
    515523#endif
    516 #if ILP_SSH_SIG
     524#if BITRATE_PICRATE_SIGNALLING
     525#if Q0078_ADD_LAYER_SETS
     526  UInt       m_maxSLInLayerSetMinus1[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS];
     527#else
     528  UInt       m_maxSLInLayerSetMinus1[MAX_VPS_LAYER_SETS_PLUS1];
     529#endif
     530#endif
     531   
    517532  Bool       m_ilpSshSignalingEnabledFlag;
    518 #endif
    519533#if VPS_EXTN_PROFILE_INFO
    520534  // Profile-tier-level signalling related
     
    529543  // Target output layer signalling related
    530544  UInt       m_numOutputLayerSets;
     545#if Q0078_ADD_LAYER_SETS
     546  UInt       m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS];
     547  Bool       m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_ID_PLUS1];
     548#else
    531549  UInt       m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1];
    532550  Bool       m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
     551#endif
    533552#endif
    534553#if VPS_EXTN_DIRECT_REF_LAYERS
     
    565584  Bool       m_crossLayerPictureTypeAlignFlag;
    566585#endif
    567 #if N0147_IRAP_ALIGN_FLAG
    568586  Bool       m_crossLayerIrapAlignFlag;
    569 #endif
    570587#if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    571588  Bool       m_crossLayerAlignedIdrOnlyFlag;
     
    576593  UInt       m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1];
    577594#endif
    578 #if N0120_MAX_TID_REF_PRESENT_FLAG
    579595  Bool       m_maxTidRefPresentFlag;
    580 #endif
    581596#if VPS_TSLAYERS
    582597  Bool       m_maxTSLayersPresentFlag;
     
    594609  Bool       m_loopFilterNotAcrossTilesFlag[MAX_VPS_LAYER_ID_PLUS1];
    595610#endif
    596 #if TILE_BOUNDARY_ALIGNED_FLAG
    597611  Bool       m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
    598 #endif
    599612#if VPS_VUI_WPP_NOT_IN_USE__FLAG
    600613  Bool       m_wppNotInUseFlag;
     
    616629  Int        m_vpsTransChar[16];
    617630  Int        m_vpsMatCoeff[16];
    618 #endif 
    619 #if VPS_VUI_BITRATE_PICRATE
     631#endif
     632
    620633  Bool       m_bitRatePresentVpsFlag;
    621634  Bool       m_picRatePresentVpsFlag;
     
    626639  Int        m_constPicRateIdc     [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER];
    627640  Int        m_avgPicRate          [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER];
    628 #endif
    629641 
    630642#if P0312_VERT_PHASE_ADJ
     
    633645
    634646#if P0300_ALT_OUTPUT_LAYER_FLAG
     647#if Q0078_ADD_LAYER_SETS
     648  Bool       m_altOutputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS];
     649#else
    635650  Bool       m_altOutputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1];
     651#endif
    636652#else
    637653#if O0153_ALT_OUTPUT_LAYER_FLAG
     
    661677  Int        m_numberRefLayers[MAX_NUM_LAYER_IDS];  // number of direct and indirect reference layers of a coding layer
    662678  Bool       m_recursiveRefLayerFlag[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS];  // flag to indicate if j-th layer is a direct or indirect reference layer of i-th layer
     679#endif
     680#if Q0078_ADD_LAYER_SETS
     681  Int        m_numAddLayerSets;
     682  UInt       m_highestLayerIdxPlus1[MAX_NUM_ADD_LAYER_SETS][MAX_NUM_LAYER_IDS];
     683  UInt       m_predictedLayerId[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS];
     684  UInt       m_numPredictedLayers[MAX_NUM_LAYER_IDS];
     685  Int        m_numIndependentLayers;
     686  Int        m_numLayersInTreePartition[MAX_NUM_LAYER_IDS];
     687  UInt       m_treePartitionLayerIdList[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS];
    663688#endif
    664689#if SPS_DPB_PARAMS
     
    675700  Int        m_maxVpsLatencyIncreasePlus1  [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS];
    676701#if CHANGE_NUMSUBDPB_IDX
     702#if Q0078_ADD_LAYER_SETS
     703  Int        m_numSubDpbs                  [MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS];
     704#else
    677705  Int        m_numSubDpbs                  [MAX_VPS_LAYER_SETS_PLUS1];
     706#endif
    678707#else
    679708  Int        m_numSubDpbs                  [MAX_VPS_OP_LAYER_SETS_PLUS1];
     
    735764  }
    736765#endif
     766#if HRD_BPB
     767  Int getBspHrdParamBufferCpbCntMinus1(UInt i, UInt sl)
     768  {
     769    return m_bspHrd->getCpbCntMinus1(sl);
     770  }
     771#endif
    737772
    738773  TComHRD* getHrdParameters   ( UInt i )             { return &m_hrdParameters[ i ]; }
     
    798833  Void    setRecursiveRefLayerFlag(Int currLayerId, Int refLayerId, Bool x)      { m_recursiveRefLayerFlag[currLayerId][refLayerId] = x;   }
    799834  Int     getNumRefLayers(Int currLayerId)                                       { return m_numberRefLayers[currLayerId];                  }
    800   Void    setNumRefLayers(Int currLayerId);
    801 #endif
    802 #if VPS_RENAME
    803   UInt    getMaxLayerId()                                       { return m_maxLayerId; }
    804   Void    setMaxLayerId(UInt v)                                 { m_maxLayerId = v;    }
    805 
     835  Void    setNumRefLayers();
     836#endif
     837#if Q0078_ADD_LAYER_SETS
     838  void    setLayerIdIncludedFlagsForAddLayerSets();
     839  UInt    getVpsNumLayerSetsMinus1()                                             { return m_vpsNumLayerSetsMinus1; }
     840  Void    setVpsNumLayerSetsMinus1(UInt x)                                       { m_vpsNumLayerSetsMinus1 = x; }
     841  UInt    getNumAddLayerSets()                                                   { return m_numAddLayerSets; }
     842  Void    setNumAddLayerSets(UInt x)                                             { m_numAddLayerSets = x; }
     843  UInt    getHighestLayerIdxPlus1(UInt set, UInt idx)                            { return m_highestLayerIdxPlus1[set][idx]; }
     844  Void    setHighestLayerIdxPlus1(UInt set, UInt idx, UInt layerIdx)             { m_highestLayerIdxPlus1[set][idx] = layerIdx; }
     845  Void    setPredictedLayerIds();
     846  UInt    getPredictedLayerId(UInt layerIdx, UInt predIdx)                       { return m_predictedLayerId[layerIdx][predIdx]; }
     847  Void    setPredictedLayerId(UInt layerIdx, UInt predIdx, UInt x)               { m_predictedLayerId[layerIdx][predIdx] = x; }
     848  UInt    getNumPredictedLayers(UInt layerId)                                    { return m_numPredictedLayers[layerId]; }
     849  Void    setNumPredictedLayers(UInt layerId, UInt x)                            { m_numPredictedLayers[layerId] = x; }
     850  Void    setTreePartitionLayerIdList();
     851  Int     getNumIndependentLayers()                                              { return m_numIndependentLayers; }
     852  Void    setNumIndependentLayers(Int x)                                         { m_numIndependentLayers = x; }
     853  Int     getNumLayersInTreePartition(Int idx)                                   { return m_numLayersInTreePartition[idx]; }
     854  Void    setNumLayersInTreePartition(Int idx, Int x)                            { m_numLayersInTreePartition[idx] = x; }
     855  UInt    getTreePartitionLayerId(Int idx, Int layerIdx)                         { return m_treePartitionLayerIdList[idx][layerIdx]; }
     856  Void    setTreePartitionLayerId(Int idx, Int layerIdx, UInt layerId)           { m_treePartitionLayerIdList[idx][layerIdx] = layerId; }
     857#endif
     858  UInt    getMaxLayerId()                                       { return m_maxLayerId;   }
     859  Void    setMaxLayerId(UInt v)                                 { m_maxLayerId = v;      }
    806860  UInt    getNumLayerSets()                                     { return m_numLayerSets; }
    807861  Void    setNumLayerSets(UInt v)                               { m_numLayerSets = v;    }
    808 #endif
    809862#if VPS_EXTN_MASK_AND_DIM_INFO
    810863  Bool   getAvcBaseLayerFlag()                                  { return m_avcBaseLayerFlag;       }
     
    835888  Void   setLayerIdInVps(Int id, UInt x)                        { m_layerIdInVps[id] = x;          }
    836889#endif
    837 #if ILP_SSH_SIG
    838     Bool   getIlpSshSignalingEnabledFlag()                      { return m_ilpSshSignalingEnabledFlag;}
    839     Void   setIlpSshSignalingEnabledFlag(Bool x)                { m_ilpSshSignalingEnabledFlag = x;}
    840 #endif
     890#if BITRATE_PICRATE_SIGNALLING
     891  UInt   getMaxSLayersInLayerSetMinus1(Int ls)                  { return m_maxSLInLayerSetMinus1[ls]; }
     892  Void   setMaxSLayersInLayerSetMinus1(Int ls, Int x)           { m_maxSLInLayerSetMinus1[ls] = x;    }
     893#endif
     894  Bool   getIlpSshSignalingEnabledFlag()                        { return m_ilpSshSignalingEnabledFlag;}
     895  Void   setIlpSshSignalingEnabledFlag(Bool x)                  { m_ilpSshSignalingEnabledFlag = x;}
    841896#if VPS_EXTN_PROFILE_INFO
    842897  Bool   getProfilePresentFlag(Int id)                          { return m_profilePresentFlag[id]; }
     
    883938  UInt   getDirectDependencyType(Int currLayerId, Int refLayerId)               { return m_directDependencyType[currLayerId][refLayerId]; }
    884939  Void   setDirectDependencyType(Int currLayerId, Int refLayerId, UInt x)       { m_directDependencyType[currLayerId][refLayerId] = x;    }
     940  Bool   isSamplePredictionType(Int currLayerId, Int refLayerId)                { assert(currLayerId != refLayerId); return ( ( m_directDependencyType[currLayerId][refLayerId] + 1 ) & 1 ) ? true : false; }
     941  Bool   isMotionPredictionType(Int currLayerId, Int refLayerId)                { assert(currLayerId != refLayerId); return ( ( ( m_directDependencyType[currLayerId][refLayerId] + 1 ) & 2 ) >> 1 ) ? true : false; }
    885942#endif
    886943  UInt   getNumProfileTierLevel()                                { return m_numProfileTierLevel; }
     
    923980  Void   setCrossLayerAlignedIdrOnlyFlag(Bool x)                              { m_crossLayerAlignedIdrOnlyFlag = x;                         }
    924981#endif
    925 #if N0147_IRAP_ALIGN_FLAG
    926982  Bool   getCrossLayerIrapAlignFlag()                                           { return m_crossLayerIrapAlignFlag;                      }
    927983  Void   setCrossLayerIrapAlignFlag(Bool x)                                     { m_crossLayerIrapAlignFlag = x;                         }
    928 #endif
    929984#if O0225_MAX_TID_FOR_REF_LAYERS
    930985  UInt   getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId)                     { return m_maxTidIlRefPicsPlus1[layerId][refLayerId];           }
     
    934989  Void   setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer)   { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer;            }
    935990#endif
    936 #if N0120_MAX_TID_REF_PRESENT_FLAG
    937991  Bool   getMaxTidRefPresentFlag()                                  { return m_maxTidRefPresentFlag ;}
    938992  Void   setMaxTidRefPresentFlag(Bool x)                            { m_maxTidRefPresentFlag = x;}
    939 #endif
    940993#if VPS_TSLAYERS
    941994  Bool   getMaxTSLayersPresentFlag()                                  { return m_maxTSLayersPresentFlag ;}
     
    9601013  Void   setLoopFilterNotAcrossTilesFlag(Int currLayerId, Bool x)    { m_loopFilterNotAcrossTilesFlag[currLayerId] = x; }
    9611014#endif
    962 #if TILE_BOUNDARY_ALIGNED_FLAG 
    9631015  Bool   getTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId)           { return m_tileBoundariesAlignedFlag[currLayerId][refLayerId]; }
    9641016  Void   setTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId, Bool x)   { m_tileBoundariesAlignedFlag[currLayerId][refLayerId] = x; }
    965 #endif
    9661017#if VPS_VUI_WPP_NOT_IN_USE__FLAG 
    9671018  Bool   getWppNotInUseFlag()         { return m_wppNotInUseFlag; }
     
    10011052  Void   setMaxtrixCoeff(Int idx, Int x)       { m_vpsMatCoeff[idx] = x;        }
    10021053#endif
    1003 #if VPS_VUI_BITRATE_PICRATE
    10041054  Bool   getBitRatePresentVpsFlag()       { return m_bitRatePresentVpsFlag; }
    10051055  Void   setBitRatePresentVpsFlag(Bool x) { m_bitRatePresentVpsFlag = x;    }
     
    10211071  Int    getAvgPicRate(Int i, Int j)          { return m_avgPicRate[i][j]; }
    10221072  Void   setAvgPicRate(Int i, Int j, Int x)   { m_avgPicRate[i][j] = x;    }
    1023 #endif
    10241073#if O0164_MULTI_LAYER_HRD
    10251074  Bool     getVpsVuiBspHrdPresentFlag()                         { return m_vpsVuiBspHrdPresentFlag;      }
     
    14631512#if SVC_EXTENSION
    14641513  UInt        m_layerId;
     1514  Bool        m_extensionFlag;
    14651515  UInt        m_numScaledRefLayerOffsets;
    14661516#if P0312_VERT_PHASE_ADJ
     
    16211671  Void     setLayerId(UInt layerId)            { m_layerId = layerId; }
    16221672  UInt     getLayerId()                        { return m_layerId;    }
     1673  Int      getExtensionFlag()                  { return m_extensionFlag;  }
     1674  Void     setExtensionFlag(Int n)             { m_extensionFlag = n;     }
    16231675  UInt     getNumScaledRefLayerOffsets()       { return m_numScaledRefLayerOffsets; }
    16241676  Void     setNumScaledRefLayerOffsets(Int x)  { m_numScaledRefLayerOffsets = x;    }
     
    17361788
    17371789#if SVC_EXTENSION
     1790  Bool     m_extensionFlag;
    17381791#if SCALINGLIST_INFERRING
    17391792  UInt     m_layerId;
     
    18621915
    18631916#if SCALINGLIST_INFERRING
    1864   UInt     getLayerId() { return m_layerId; }
    1865   Void     setLayerId( UInt layerId ) { m_layerId = layerId;            }
    1866   Bool     getInferScalingListFlag()  { return m_inferScalingListFlag;  }
    1867   UInt     getScalingListRefLayerId() { return m_scalingListRefLayerId; }
    1868   Void     setInferScalingListFlag( Bool flag )     { m_inferScalingListFlag = flag;     }
    1869   Void     setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; }
    1870 #endif
    1871 
    1872 #if SCALINGLIST_INFERRING
    18731917  Void     setScalingList( TComScalingList *scalingList ) { m_scalingList = scalingList; }
    18741918#else
     
    18861930  Bool getSliceHeaderExtensionPresentFlag   ()                    { return m_sliceHeaderExtensionPresentFlag; }
    18871931  Void setSliceHeaderExtensionPresentFlag   (Bool val)            { m_sliceHeaderExtensionPresentFlag = val; }
     1932#if SVC_EXTENSION
     1933  Int     getExtensionFlag()                { return m_extensionFlag;  }
     1934  Void    setExtensionFlag(Int n)           { m_extensionFlag = n;     }
     1935#if SCALINGLIST_INFERRING
     1936  UInt     getLayerId() { return m_layerId; }
     1937  Void     setLayerId( UInt layerId ) { m_layerId = layerId;            }
     1938  Bool     getInferScalingListFlag()  { return m_inferScalingListFlag;  }
     1939  UInt     getScalingListRefLayerId() { return m_scalingListRefLayerId; }
     1940  Void     setInferScalingListFlag( Bool flag )     { m_inferScalingListFlag = flag;     }
     1941  Void     setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; }
     1942#endif
    18881943#if POC_RESET_IDC
    18891944  Bool getPocResetInfoPresentFlag   ()                    { return m_pocResetInfoPresentFlag; }
     
    18981953  Void    setCGSOutputBitDepthC(Int n){ m_nCGSOutputBitDepthC = n;     }
    18991954#endif
     1955#endif //SVC_EXTENSION
    19001956};
    19011957
     
    19351991  Int         m_iLastIDR;
    19361992  Int         m_iAssociatedIRAP;
     1993#if POC_RESET_IDC_ENCODER
     1994  Int         m_associatedIrapPocBeforeReset;
     1995#endif
     1996
    19371997  NalUnitType m_iAssociatedIRAPType;
    19381998  static Int  m_prevTid0POC;
     
    20612121  Bool        m_pocMsbValPresentFlag;
    20622122#endif
     2123#if POC_RESET_IDC_ENCODER
     2124  Int         m_pocValueBeforeReset;
     2125#endif
     2126#if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER
     2127  Int         m_picOrderCntLsb;
     2128#endif
    20632129#if Q0048_CGS_3D_ASYMLUT
    20642130  Int        m_nCGSOverWritePPS;  // for optimization, not output to bitstream
     
    21062172    Void     adjustPrevTid0POC      (Int adj)             { m_prevTid0POC=m_prevTid0POC-adj; }
    21072173#endif
     2174#if POC_RESET_IDC_DECODER
     2175  Void      setPrevTid0POC( Int x ) { m_prevTid0POC = x; }
     2176#endif
     2177
    21082178  TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; }
    21092179  Void      setLastIDR(Int iIDRPOC)                       { m_iLastIDR = iIDRPOC; }
     
    21112181  Void      setAssociatedIRAPPOC(Int iAssociatedIRAPPOC)             { m_iAssociatedIRAP = iAssociatedIRAPPOC; }
    21122182  Int       getAssociatedIRAPPOC()                        { return m_iAssociatedIRAP; }
     2183#if POC_RESET_IDC_ENCODER
     2184  Void setAssociatedIrapPocBeforeReset(Int x) { m_associatedIrapPocBeforeReset = x; }
     2185  Int  getAssociatedIrapPocBeforeReset(     ) { return m_associatedIrapPocBeforeReset; }
     2186#endif
     2187
    21132188  Void      setAssociatedIRAPType(NalUnitType associatedIRAPType)    { m_iAssociatedIRAPType = associatedIRAPType; }
    21142189  NalUnitType getAssociatedIRAPType()                        { return m_iAssociatedIRAPType; }
     
    22202295  Void setTLayerInfo( UInt uiTLayer );
    22212296  Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum );
     2297#if POC_RESET_IDC_ENCODER
     2298  Void checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic, Bool usePocBeforeReset = false);
     2299#else
    22222300  Void checkLeadingPictureRestrictions( TComList<TComPic*>& rcListPic );
     2301#endif
    22232302  Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList);
    22242303  Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic );
     
    24182497  Bool      getCraPicFlag       ();
    24192498#endif
     2499#if POC_RESET_IDC_DECODER
     2500  Bool      getRaslPicFlag      ();
     2501  Bool      getRadlPicFlag      ();
     2502#endif
     2503#if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER
     2504  Int       getPicOrderCntLsb() { return m_picOrderCntLsb; }
     2505  Void      setPicOrderCntLsb(Int x) { m_picOrderCntLsb = x; }
     2506#endif
     2507
     2508#if POC_RESET_IDC_ENCODER
     2509  Int       getPocValueBeforeReset ()                        { return m_pocValueBeforeReset; }
     2510  Void      setPocValueBeforeReset (Int x)                   { m_pocValueBeforeReset = x ;   }
     2511  Void      decrementRefPocValues(Int const decrementValue);
     2512  Int       getCurrMsb( Int currLsb, Int prevLsb, Int prevMsb, Int maxLsbVal );
     2513#endif
     2514
    24202515
    24212516#endif //SVC_EXTENSION
     
    24722567  }
    24732568
     2569#if Q0078_ADD_LAYER_SETS
     2570  Void removePS(Int psId)
     2571  {
     2572    assert(psId < m_maxId);
     2573    if (m_paramsetMap.find(psId) != m_paramsetMap.end())
     2574    {
     2575      m_paramsetMap.erase(psId);
     2576    }
     2577  }
     2578#endif
     2579
     2580
    24742581private:
    24752582  std::map<Int,T *> m_paramsetMap;
     
    24942601  TComSPS* getSPS(Int spsId)  { return m_spsMap.getPS(spsId); };
    24952602  TComSPS* getFirstSPS()      { return m_spsMap.getFirstPS(); };
     2603#if Q0078_ADD_LAYER_SETS
     2604  Void     removeSPS(Int spsId) { m_spsMap.removePS(spsId); };
     2605#endif
    24962606
    24972607  //! store picture parameter set and take ownership of it
     
    25002610  TComPPS* getPPS(Int ppsId)  { return m_ppsMap.getPS(ppsId); };
    25012611  TComPPS* getFirstPPS()      { return m_ppsMap.getFirstPS(); };
     2612#if Q0078_ADD_LAYER_SETS
     2613  Void     removePPS(Int ppsId) { m_ppsMap.removePS(ppsId); };
     2614#endif
    25022615
    25032616  //! activate a SPS from a active parameter sets SEI message
  • trunk/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r713 r815  
    1 
     1#include "TypeDef.h"
     2#if SVC_EXTENSION
    23#include "TComUpsampleFilter.h"
    3 #include "TypeDef.h"
    4 
    5 #if SVC_UPSAMPLING
    6 #define CNU -1 ///< Coefficients Not Used
    74
    85const Int TComUpsampleFilter::m_lumaFixedFilter[16][NTAPS_US_LUMA] =
    96{
    10   {  0,  0,  0, 64,  0,  0,  0,  0}, //
    11 #if ARBITRARY_SPATIAL_RATIO
    12   {  0,  1, -3, 63,  4, -2,  1,  0},
    13   { -1,  2, -5, 62,  8, -3,  1,  0},
    14   { -1,  3, -8, 60, 13, -4,  1,  0},
    15   { -1,  4,-10, 58, 17, -5,  1,  0},
    16 #else
    17   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    18   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    19   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    20   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    21 #endif
    22   { -1, 4, -11, 52, 26,  -8,  3, -1}, // <-> actual phase shift 1/3, used for spatial scalability x1.5
    23 #if ARBITRARY_SPATIAL_RATIO
    24   { -1, 3,  -9, 47, 31, -10,  4, -1},
    25   { -1, 4, -11, 45, 34, -10,  4, -1},
    26 #else
    27   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    28   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    29 #endif
    30   { -1, 4, -11, 40, 40, -11,  4, -1}, // <-> actual phase shift 1/2, equal to HEVC MC, used for spatial scalability x2
    31 #if ARBITRARY_SPATIAL_RATIO
    32   { -1,  4, -10, 34, 45, -11,  4, -1},
    33   { -1,  4, -10, 31, 47,  -9,  3, -1},
    34 #else
    35   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    36   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    37 #endif
    38   { -1, 3,  -8, 26, 52, -11, 4, -1}, // <-> actual phase shift 2/3, used for spatial scalability x1.5
    39 #if ARBITRARY_SPATIAL_RATIO
    40   { 0,  1,  -5, 17, 58, -10,  4, -1},
    41   { 0,  1,  -4, 13, 60,  -8,  3, -1},
    42   { 0,  1,  -3,  8, 62,  -5,  2, -1},
    43   { 0,  1,  -2,  4, 63,  -3,  1,  0}
    44 #else
    45   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    46   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    47   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    48   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}  //
    49 #endif
     7  {  0, 0,   0, 64,  0,   0,  0,  0 },
     8  {  0, 1,  -3, 63,  4,  -2,  1,  0 },
     9  { -1, 2,  -5, 62,  8,  -3,  1,  0 },
     10  { -1, 3,  -8, 60, 13,  -4,  1,  0 },
     11  { -1, 4, -10, 58, 17,  -5,  1,  0 },
     12  { -1, 4, -11, 52, 26,  -8,  3, -1 }, // <-> actual phase shift 1/3, used for spatial scalability x1.5
     13  { -1, 3,  -9, 47, 31, -10,  4, -1 },
     14  { -1, 4, -11, 45, 34, -10,  4, -1 },
     15  { -1, 4, -11, 40, 40, -11,  4, -1 }, // <-> actual phase shift 1/2, equal to HEVC MC, used for spatial scalability x2
     16  { -1, 4, -10, 34, 45, -11,  4, -1 },
     17  { -1, 4, -10, 31, 47,  -9,  3, -1 },
     18  { -1, 3,  -8, 26, 52, -11,  4, -1 }, // <-> actual phase shift 2/3, used for spatial scalability x1.5
     19  {  0, 1,  -5, 17, 58, -10,  4, -1 },
     20  {  0, 1,  -4, 13, 60,  -8,  3, -1 },
     21  {  0, 1,  -3,  8, 62,  -5,  2, -1 },
     22  {  0, 1,  -2,  4, 63,  -3,  1,  0 }
    5023};
    5124
    5225const Int TComUpsampleFilter::m_chromaFixedFilter[16][NTAPS_US_CHROMA] =
    5326{
    54   {  0, 64,  0,  0},//
    55 #if ARBITRARY_SPATIAL_RATIO
    56   { -2, 62,  4,  0},
    57   { -2, 58, 10, -2},
    58   { -4, 56, 14, -2},
    59 #else
    60   {CNU,CNU,CNU,CNU},//
    61   {CNU,CNU,CNU,CNU},//
    62   {CNU,CNU,CNU,CNU},//
    63 #endif
    64   { -4, 54, 16, -2},// <-> actual phase shift 1/4,equal to HEVC MC, used for spatial scalability x1.5 (only for accurate Chroma alignement)
    65   { -6, 52, 20, -2},// <-> actual phase shift 1/3, used for spatial scalability x1.5
    66   { -6, 46, 28, -4},// <-> actual phase shift 3/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement)
    67 #if ARBITRARY_SPATIAL_RATIO
    68   { -4, 42, 30, -4},
    69 #else
    70   {CNU,CNU,CNU,CNU},//
    71 #endif
    72   { -4, 36, 36, -4},// <-> actual phase shift 1/2,equal to HEVC MC, used for spatial scalability x2
    73   { -4, 30, 42, -4},// <-> actual phase shift 7/12, used for spatial scalability x1.5 (only for accurate Chroma alignement)
    74 #if ARBITRARY_SPATIAL_RATIO
    75   { -4, 28, 46, -6},
    76 #else
    77   {CNU,CNU,CNU,CNU},//
    78 #endif
    79   { -2, 20, 52, -6},// <-> actual phase shift 2/3, used for spatial scalability x1.5
    80 #if ARBITRARY_SPATIAL_RATIO
    81   {-2, 16, 54, -4},
    82   {-2, 14, 56, -4},
    83 #else
    84   {CNU,CNU,CNU,CNU},//
    85   {CNU,CNU,CNU,CNU},//
    86 #endif
    87   { -2, 10, 58, -2},// <-> actual phase shift 7/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement)
    88   {  0,  4, 62, -2} // <-> actual phase shift 11/12, used for spatial scalability x1.5 (only for accurate Chroma alignement)
     27  {  0, 64,  0,  0 },
     28  { -2, 62,  4,  0 },
     29  { -2, 58, 10, -2 },
     30  { -4, 56, 14, -2 },
     31  { -4, 54, 16, -2 }, // <-> actual phase shift 1/4,equal to HEVC MC, used for spatial scalability x1.5 (only for accurate Chroma alignement)
     32  { -6, 52, 20, -2 }, // <-> actual phase shift 1/3, used for spatial scalability x1.5
     33  { -6, 46, 28, -4 }, // <-> actual phase shift 3/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement)
     34  { -4, 42, 30, -4 },
     35  { -4, 36, 36, -4 }, // <-> actual phase shift 1/2,equal to HEVC MC, used for spatial scalability x2
     36  { -4, 30, 42, -4 }, // <-> actual phase shift 7/12, used for spatial scalability x1.5 (only for accurate Chroma alignement)
     37  { -4, 28, 46, -6 },
     38  { -2, 20, 52, -6 }, // <-> actual phase shift 2/3, used for spatial scalability x1.5
     39  { -2, 16, 54, -4 },
     40  { -2, 14, 56, -4 },
     41  { -2, 10, 58, -2 }, // <-> actual phase shift 7/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement)
     42  {  0,  4, 62, -2 }  // <-> actual phase shift 11/12, used for spatial scalability x1.5 (only for accurate Chroma alignement)
    8943};
    9044
     
    260214    }
    261215
    262 #if ARBITRARY_SPATIAL_RATIO
    263216    assert ( widthEL >= widthBL );
    264217    assert ( heightEL >= heightBL );
    265 #else
    266     assert ( widthEL == widthBL || widthEL == 2*widthBL || 2*widthEL == 3*widthBL );
    267     assert ( heightEL == heightBL || heightEL == 2*heightBL || 2*heightEL == 3*heightBL );
    268 #endif
    269218
    270219    pcBasePic->setBorderExtension(false);
     
    298247#endif
    299248 
    300 #if ROUNDING_OFFSET
    301249    Int   addX = ( ( phaseX * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) );
    302250    Int   addY = ( ( phaseY * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) );
    303 #else
    304     Int   addX = ( ( ( widthBL * phaseX ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) );
    305     Int   addY = ( ( ( heightBL * phaseY ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) );
    306 #endif
    307251
    308252#if Q0120_PHASE_CALCULATION
     
    333277    Int bottomEndL = pcUsPic->getHeight() - scalEL.getWindowBottomOffset();
    334278    Int leftOffset = leftStartL > 0 ? leftStartL : 0;
    335 #if N0214_INTERMEDIATE_BUFFER_16BITS
    336279#if O0194_JOINT_US_BITSHIFT
    337280    // g_bitDepthY was set to EL bit-depth, but shift1 should be calculated using BL bit-depth
     
    345288#else
    346289    Int shift1 = g_bitDepthY - 8;
    347 #endif
    348290#endif
    349291
     
    362304      for( j = 0; j < heightBL ; j++ )
    363305      {
    364 #if N0214_INTERMEDIATE_BUFFER_16BITS
    365306        *piDstY = sumLumaHor(piSrcY, coeff) >> shift1;
    366 #else
    367         *piDstY = sumLumaHor(piSrcY, coeff);
    368 #endif
    369307        piSrcY += strideBL;
    370308        piDstY += strideEL;
     
    378316    pcTempPic->setHeight(heightEL);
    379317
    380 #if N0214_INTERMEDIATE_BUFFER_16BITS
    381318#if O0194_JOINT_US_BITSHIFT
    382319    Int nShift = 20 - g_bitDepthYLayer[currLayerId];
    383320#else
    384321    Int nShift = US_FILTER_PREC*2 - shift1;
    385 #endif
    386 #else
    387     const Int nShift = US_FILTER_PREC*2;
    388322#endif
    389323    Int iOffset = 1 << (nShift - 1);
     
    472406#endif
    473407   
    474 #if ROUNDING_OFFSET
    475408    addX       = ( ( phaseXC * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) );
    476409    addY       = ( ( phaseYC * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) );
    477 #else
    478     addX       = ( ( ( widthBL * (phaseXC) ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) );
    479     addY       = ( ( ( heightBL * (phaseYC) ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) );
    480 #endif
    481410
    482411#if Q0120_PHASE_CALCULATION
     
    502431    heightBL  = min<Int>( pcBasePic->getHeight() >> 1, heightEL );
    503432
    504 #if N0214_INTERMEDIATE_BUFFER_16BITS
    505433#if O0194_JOINT_US_BITSHIFT
    506434    // g_bitDepthC was set to EL bit-depth, but shift1 should be calculated using BL bit-depth
     
    514442#else
    515443    shift1 = g_bitDepthC - 8;
    516 #endif
    517444#endif
    518445
     
    533460      for( j = 0; j < heightBL ; j++ )
    534461      {
    535 #if N0214_INTERMEDIATE_BUFFER_16BITS
    536462        *piDstU = sumChromaHor(piSrcU, coeff) >> shift1;
    537463        *piDstV = sumChromaHor(piSrcV, coeff) >> shift1;
    538 #else
    539         *piDstU = sumChromaHor(piSrcU, coeff);
    540         *piDstV = sumChromaHor(piSrcV, coeff);
    541 #endif
    542464
    543465        piSrcU += strideBL;
     
    554476    pcTempPic->setHeight(heightEL << 1);
    555477
    556 #if N0214_INTERMEDIATE_BUFFER_16BITS
    557478#if O0194_JOINT_US_BITSHIFT
    558479    nShift = 20 - g_bitDepthCLayer[currLayerId];
     
    561482#endif
    562483    iOffset = 1 << (nShift - 1);
    563 #endif
    564484
    565485    for( j = 0; j < pcTempPic->getHeight() >> 1; j++ )
  • trunk/source/Lib/TLibCommon/TypeDef.h

    r713 r815  
    4141#define SVC_EXTENSION                    1
    4242
    43 #define SYNTAX_BYTES                     10      ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)]
     43#define SYNTAX_BYTES                     10     ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)]
    4444#if SVC_EXTENSION
    4545#define MAX_LAYERS                       8      ///< max number of layers the codec is supposed to handle
    4646
    4747#define VPS_VUI_OFFSET                   1      ///< N0085: Signal VPS VUI offset in the VPS extension
    48 #define RANDOM_ACCESS_SEI_FIX            1
    4948#define O0137_MAX_LAYERID                1      ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1
    5049
    51 #define Q0200_CONFORMANCE_BL_SIZE        1       ///< JCTVC-Q0200; use conformance picture size in re-sampling processs
     50#define Q0108_TSA_STSA                   0      ///< JCTVC-Q0108, Remove cross-layer alignment constraints of TSA and STSA pictures, enable to have different prediction structures in different layers
     51#define Q0177_SPS_TEMP_NESTING_FIX       1      ///< JCTVC-Q0177; Fix the inference value of sps_temporal_id_nesting_flag when it is not present
     52#define Q0177_EOS_CHECKS                 1      ///< JCTVC-Q0177; Put checks on handling EOS
     53#define Q0142_POC_LSB_NOT_PRESENT        1      ///< JCTVC-Q0142; Add constraint checking on the value of poc_reset_idc and poc_lsb_val
     54#define Q0146_SSH_EXT_DATA_BIT           1      ///< JCTVC-Q0146; Bug-fix -- the SSH_EXT_DATA_BIT can have any value -- not required to be 1
     55
     56#define Q0200_CONFORMANCE_BL_SIZE        1      ///< JCTVC-Q0200; use conformance picture size in re-sampling processs
    5257#define P0312_VERT_PHASE_ADJ             1      ///< JCTVC-P0312: vertical phase adjustment in re-sampling process (BoG report)
    5358#if P0312_VERT_PHASE_ADJ
     
    6267#define VPS_EXTN_UEV_CODING              1      ///< JCTVC-P0306: Code some syntax elements as ue(v), and remove some syntax elements that duplicate behaviour
    6368#define CHANGE_NUMSUBDPB_IDX             1      ///< Change index of NumSubDpb from output layer set to layer set, to be more aligned with the Spec
    64 #define RESOLUTION_BASED_DPB             1      ///< JCTVC-P0192: Assign layers to sub-DPBs based on the rep_format() signaled in the VPS
     69#define RESOLUTION_BASED_DPB             0      ///< JCTVC-Q0154 - remove sharing of sub-DPB across layers
     70                                                ///< JCTVC-P0192: Assign layers to sub-DPBs based on the rep_format() signaled in the VPS
    6571#define ALIGNED_BUMPING                  1      ///< JCTVC-P0192: Align bumping of pictures in an AU
    66 #define MAX_SUBDPBS                      MAX_LAYERS
    67 #define SUB_BITSTREAM_PROPERTY_SEI       1      ///< JCTVC-P0204: Sub-bitstream property SEI message
    68 #if SUB_BITSTREAM_PROPERTY_SEI
    69 #define MAX_SUB_STREAMS                  1024
    70 #endif
    7172#define O0109_O0199_FLAGS_TO_VUI         1      ///< JCTVC-O0109, O0199: move single_layer_for_non_irap_flag and higher_layer_flag to vps_vui
    7273#define O0109_VIEW_ID_LEN                1      ///< JCTVC-O0109: view_id_len_minus1 to view_id_len, and add constraint (1<<view_id_len) is greater than or equal to NumViews
     
    7778#endif
    7879
    79 #define P0295_DEFAULT_OUT_LAYER_IDC      1      ///< JCTVC-P0295: modifify default_one_target_output_layer_idc to default_target_output_layer_idc
     80#define P0295_DEFAULT_OUT_LAYER_IDC      1      ///< JCTVC-P0295: modifify default_one_target_output_layer_idc to default_output_layer_idc
    8081#define O0109_DEFAULT_ONE_OUT_LAYER_IDC  1      ///< JCTVC-O0109: default_one_target_output_layer_flag to default_one_target_output_layer_idc
    8182#define O0109_MOVE_VPS_VUI_FLAG          1      ///< JCTVC-O0109: move vps_vui_present_flag before vps_vui_offset
     
    8485
    8586#define O0164_MULTI_LAYER_HRD            1      ///< JCTVC-O0164: Multi-layer HRD operation
    86 #define Q0074_SEI_COLOR_MAPPING          1      ///< JCTVC-Q0074, SEI Color Mapping
     87#define Q0182_MULTI_LAYER_HRD_UPDATE     1      ///< JCTVC-Q0182: On bitstream partition buffering
    8788
    8889#define O0194_DIFFERENT_BITDEPTH_EL_BL   1      ///< JCTVC-O0194: Support for different bitdepth values for BL and EL, add required configuration parameters (and Some bugfixes when REPN_FORMAT_IN_VPS (JCTVC-N0092) is enabled)
     
    9293#define Q0048_CGS_3D_ASYMLUT             1      ///< JCTVC-Q0048: Colour gamut scalability with look-up table
    9394#if Q0048_CGS_3D_ASYMLUT
     95#define CGS_GCC_NO_VECTORIZATION         1
    9496#define O0194_WEIGHTED_PREDICTION_CGS    0
    9597#else
    9698#define O0194_WEIGHTED_PREDICTION_CGS    1      ///< JCTVC-O0194: Weighted prediciton for color gamut scalability
    9799#endif
    98 #define MFM_ENCCONSTRAINT                1      ///< JCTVC-O0216: Encoder constraint for motion field mapping
    99 #define VPS_NUH_LAYER_ID                 1      ///< JCTVC-N0085: Assert that the nuh_layer_id of VPS NAL unit should be 0
    100 #define POC_RESET_FLAG                   1      ///< JCTVC-N0244: POC reset flag for  layer pictures.
     100#define POC_RESET_FLAG                   0      ///< JCTVC-N0244: POC reset flag for  layer pictures.
    101101#define POC_RESET_IDC                    1      ///< JCTVC-P0041: Include poc_reset_idc and related derivation - eventually will replace POC_RESET_FLAG
    102102#if POC_RESET_IDC
    103103#define POC_RESET_IDC_SIGNALLING         1      ///< JCTVC-P0041: Include signalling for poc_reset related syntax elements
    104 #endif
     104#define POC_RESET_IDC_ENCODER            1      ///< JCTVC-P0041: Include support of enabling POC reset at the encoder
     105#define POC_RESET_IDC_DECODER            1      ///< JCTVC-P0041: Include support of enabling POC reset at the decoder
     106#define ALIGN_IRAP_BUGFIX                1
     107#define UNAVAILABLE_PIC_BUGFIX           1
     108#endif
     109#define POC_MSB_VAL_PRESENT_FLAG_SEM     1      ///< JCTVC-Q0146: Inference of poc_msb_val_present_flag
     110#define POC_RESET_INFO_INFERENCE         1      ///< JCTVC-Q0146: Infer the value of poc_reset_info_present_flag when not present
    105111#define NO_OUTPUT_OF_PRIOR_PICS          1      ///< Use no_output_of_prior_pics_flag
    106 #define ALIGN_TSA_STSA_PICS              1      ///< JCTVC-N0084: Alignment of TSA and STSA pictures across AU.
    107112#define REPN_FORMAT_IN_VPS               1      ///< JCTVC-N0092: Signal represenation format (spatial resolution, bit depth, colour format) in the VPS
    108113#if REPN_FORMAT_IN_VPS
    109114#define REPN_FORMAT_CONTROL_FLAG         1      ///< JCTVC-O0179: Add control flag in representation format to control sending of chroma and bitdepth parameters
    110115#endif
    111 #define TIMING_INFO_NONZERO_LAYERID_SPS  1      ///< JCTVC-N0085: Semantics of vui_timing_info_present_flag to always set that flag to zero for non-zero layer ID SPS
    112116#define RPL_INIT_N0316_N0082             1      ///< JCTVC-N0316, JCTVC-N0082: initial reference picture list construction
    113117
    114118#define SCALINGLIST_INFERRING            1      ///< JCTVC-N0371: inter-layer scaling list
    115 #define SPS_EXTENSION                    1      ///< Define sps_extension() syntax structure
    116 #if SPS_EXTENSION
    117119#define O0142_CONDITIONAL_SPS_EXTENSION  1      ///< JCTVC-O0142: Conditional SPS extension
    118 #endif
    119 #define SCALABILITY_MASK_E0104           1      ///< JCT3V-E0104: scalability mask for depth
    120 #define LAYER_CTB                        0      ///< enable layer-specific CTB structure
    121120#if POC_RESET_FLAG
    122121#define PREVTID0_POC_RESET               1      ///< JCTVC-O0117 Modification of the PicOrderCntVal of prevTid0Pic
     
    124123#endif
    125124
    126 #define ILP_SSH_SIG                      1      ///< JCTVC-N0195 proposal 2, JCTVC-N0118: add presence flag in VPS ext to condition inter-layer prediction signaling in slice segment header
    127 #if ILP_SSH_SIG
    128 #define ILP_SSH_SIG_FIX                  1      ///< fix for SHM ticket #5
    129 #endif
    130 #define SPL_FLG_CHK                      1      ///< JCTVC-N0195 proposal 5, JCTVC-N0085: constrain sum of lengths to be less than or equal to 6
    131 #define ILP_NUM_REF_CHK                  1      ///< JCTVC-N0195 proposal 1, JCTVC-N0081, JCTVC-N0154, JCTVC-N0217: a condition on signaling inter_layer_pred_layer_idc[ i ], to avoid sending when NumDirectRefLayers equals NumActiveRefLayerPics, and instead infer values
    132 
    133 #define VPS_RENAME                       1      ///< Rename variables max_layer_id and num_layer_sets_minus1 in VPS
    134 #define VPS_EXTNS                        1      ///< Include function structure for VPS extensions
    135 #if VPS_EXTNS
    136125#define VPS_EXTN_MASK_AND_DIM_INFO       1      ///< Include avc_base_layer_flag, splitting_flag, scalability mask and dimension related info
    137126#if VPS_EXTN_MASK_AND_DIM_INFO
     
    142131#define VPS_EXTN_DIRECT_REF_LAYERS       1      ///< Include indication of direct dependency of layers in VPS extension
    143132#define M0040_ADAPTIVE_RESOLUTION_CHANGE 1
    144 #define VPS_VUI                          1      ///< Include function structure for VPS VUI
    145 
    146 #if VPS_VUI
     133
    147134#define VPS_VUI_TILES_NOT_IN_USE__FLAG   1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
    148135#define VPS_VUI_WPP_NOT_IN_USE__FLAG     1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
    149 #define TILE_BOUNDARY_ALIGNED_FLAG       1      ///< JCTVC-N0160/JCTVC-N0199 proposal 2 variant 2: VPS VUI flag to indicate tile boundary alignment
    150136#define N0160_VUI_EXT_ILP_REF            1      ///< VUI extension inter-layer dependency offset signalling
    151 #define VPS_VUI_BITRATE_PICRATE          1      ///< JCTVC-N0085: Signal bit rate and picture in VPS VUI
    152137#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    153138#define HIGHER_LAYER_IRAP_SKIP_FLAG      1      ///< JCTVC-O0199: Indication that higher layer IRAP picture uses skip blocks only
     
    158143#endif
    159144#define P0182_VPS_VUI_PS_FLAG            1      ///< JCTVC-P0182, add base_layer_parameter_set_compatibility_flag
    160 #endif //VPS_VUI
    161 
    162 #endif
    163145
    164146#define P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED        1   ///< JCTVC-P0125 -- Keep it as a reserved FFFF value --- The following two macros (VPS_EXTN_OFFSET & VPS_EXTN_OFFSET_CALC) will have no effect when this macro is set to 1.
     
    169151#define DERIVE_LAYER_ID_LIST_VARIABLES   1      ///< Derived variables based on the variables in VPS - for use in syntax table parsing
    170152
    171 #define SVC_UPSAMPLING                   1      ///< upsampling filters
    172 #define ROUNDING_OFFSET                  1      ///< JCTVC-N0111: upsampling rounding offset using scalling factors
    173 #define N0214_INTERMEDIATE_BUFFER_16BITS 1      ///< JCTVC-N0214: support base layer input more than 8 bits
    174 #define ARBITRARY_SPATIAL_RATIO          1      ///< JCTVC-N0219, JCTVC-N0273: Support arbitrary spatial ratio
    175 
    176 #define JCTVC_M0259_LAMBDAREFINEMENT     1      ///< JCTVC-M0259: lambda refinement (encoder only optimization)
    177 
    178153#define AVC_BASE                         1      ///< YUV BL reading for AVC base SVC
    179154#if AVC_BASE
     
    181156#endif
    182157
    183 #define REF_IDX_ME_ZEROMV                1      ///< JCTVC-L0051: use zero motion for inter-layer reference picture (without fractional ME)
    184 #define ENCODER_FAST_MODE                1      ///< JCTVC-L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1.
    185158#define REF_IDX_MFM                      1      ///< JCTVC-L0336: motion vector mapping of inter-layer reference picture
    186159#define MAX_ONE_RESAMPLING_DIRECT_LAYERS 1      ///< Allow maximum of one resampling process for direct reference layers
    187160#define MOTION_RESAMPLING_CONSTRAINT     1      ///< JCTVC-N0108: Allow maximum of one motion resampling process for direct reference layers, and use motion inter-layer prediction from the same layer as texture inter-layer prediction.
    188 #define EARLY_REF_PIC_MARKING            1      ///< Decoded picture marking of sub-layer non-reference pictures
    189 #define N0120_MAX_TID_REF_PRESENT_FLAG   1      ///< JCTVC-N0120: max_tid_ref_pics_plus1_present_flag
    190 #define N0120_MAX_TID_REF_CFG            1      ///< set max_tid_il_ref_pics_plus1 and max_tid_ref_present_flag in the config. file (configuration setting)
     161#define EARLY_REF_PIC_MARKING            0      ///< Valencia meeting - remove early marking of inter-layer reference pictures
     162                                                ///< Decoded picture marking of sub-layer non-reference pictures
    191163#define O0225_MAX_TID_FOR_REF_LAYERS     1
    192164#define O0225_TID_BASED_IL_RPS_DERIV     1
     
    195167#define P0079_DERIVE_NUMACTIVE_REF_PICS  1      ///< JCTVC-P0079 Modification of derivation of variable NumActiveRefLayerPics
    196168#define Q0060_MAX_TID_REF_EQUAL_TO_ZERO  1      ///< JCTVC-Q0060 handling the case max_tid_il_ref_pics_plus1 is equal to 0.
    197 #if REF_IDX_MFM
    198 #define N0139_POSITION_ROUNDING_OFFSET   1      ///< JCTVC-N0139: offset for collocated block in motion mapping
    199 #endif
    200 
    201 #define O0223_PICTURE_TYPES_ALIGN_FLAG   1  ///< a flag to indicatate whether picture types are aligned across layers.
     169
     170#define O0223_PICTURE_TYPES_ALIGN_FLAG   1      ///< a flag to indicatate whether picture types are aligned across layers.
    202171
    203172#define P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG   1  ///< a flag to indicatate whether picture types for IRAP are IDR across layers.
    204173
    205 #define N0147_IRAP_ALIGN_FLAG            1      ///< a flag to indicatate whether IRAPs are aligned across layers
    206 #if N0147_IRAP_ALIGN_FLAG
    207 #define O0223_O0139_IRAP_ALIGN_NO_CONTRAINTS  1  ///< Remove IRAP align depedency constraints on poc_Reset_flag.
    208 #define IRAP_ALIGN_FLAG_IN_VPS_VUI       1       ///< Move IRAP align flag to VPS VUI
    209 #endif
    210 #if !N0147_IRAP_ALIGN_FLAG
    211 #define IDR_ALIGNMENT                    1      ///< align IDR picures across layers : As per JCTVC-N0373, IDR are not required to be aligned.
    212 #endif
    213 #define FAST_INTRA_SHVC                  1      ///< JCTVC-M0115: reduction number of intra modes in the EL (encoder only)
    214 #if FAST_INTRA_SHVC
    215 #define NB_REMAIN_MODES                  2      ///< JCTVC-M0115: nb of remaining modes
    216 #endif
    217 
    218 #define RC_SHVC_HARMONIZATION            1      ///< JCTVC-M0037: rate control for SHVC
     174#define IRAP_ALIGN_FLAG_IN_VPS_VUI       1      ///< Move IRAP align flag to VPS VUI
    219175
    220176#define VIEW_ID_RELATED_SIGNALING        1      ///< Introduce syntax elements view_id and view_id_val
    221 #define LAYERS_NOT_PRESENT_SEI           1      ///< JCTVC-M0043: add layers not present SEI.
    222 #define N0383_IL_CONSTRAINED_TILE_SETS_SEI  1
    223177#define N0065_LAYER_POC_ALIGNMENT        1
    224178
     
    246200
    247201#define Q0165_OUTPUT_LAYER_SET           1      ///< JCTVC-Q0165: add a constraint to disallow an empty output layer set
    248 #define Q0165_NUM_ADD_OUTPUT_LAYER_SETS  1      ///< JCTVC-Q0165: signal num_add_output_layer_set and default_target_output_layer_idc when vps_num_layer_sets_minus1 is greater than 0
     202#define Q0165_NUM_ADD_OUTPUT_LAYER_SETS  1      ///< JCTVC-Q0165: signal num_add_olss and default_target_output_layer_idc when vps_num_layer_sets_minus1 is greater than 0
     203
     204#define Q0078_ADD_LAYER_SETS             1      ///< JCTVC-Q0078: additional layer sets and layer set config
     205#if Q0078_ADD_LAYER_SETS
     206#define MAX_NUM_ADD_LAYER_SETS           1023
     207#endif
    249208
    250209#define VPS_DPB_SIZE_TABLE               1      ///< JCTVC-O0217: DPB operations: signaling DPB-related parameters
     
    263222#define P0138_USE_ALT_CPB_PARAMS_FLAG    1      ///< JCTVC-P0138: use_alt_cpb_params_flag syntax in buffering period SEI message extension
    264223#define P0166_MODIFIED_PPS_EXTENSION     1      ///< JCTVC-P0166: add pps_extension_type_flag
    265 
    266 #if VIEW_ID_RELATED_SIGNALING
     224#define BITRATE_PICRATE_SIGNALLING       1      ///< JCTVC-Q0102 Proposal 3 signal bitrate, picrate only up to the maximum temporal sub-layers in the corresponding layer set
     225#define LAYER_DECPICBUFF_PARAM           1      ///< JCTVC-Q0102 Proposal 2 infer value from layer DPB param
     226#define HRD_BPB                          1      ///< JCTVC-Q0101 Bitstream Partition Buffering Proposals
     227#define DPB_CONSTRAINTS                  1      ///< JCTVC-Q0100 RPS DPB constraints
     228
    267229/// scalability types
    268230enum ScalabilityType
    269231{
    270232  VIEW_ORDER_INDEX  = 1,
    271   SCALABILITY_ID = 2,
    272 };
    273 #endif
     233  SCALABILITY_ID    = 2,
     234  AUX_ID            = 3,
     235};
     236
     237/// normative encoder constraints --------
     238#define MFM_ENCCONSTRAINT                1      ///< JCTVC-O0216: Encoder constraint for motion field mapping
     239#define REF_IDX_ME_ZEROMV                1      ///< JCTVC-L0051: use zero motion for inter-layer reference picture (without fractional ME)
     240
     241/// encoder settings ---------------------
     242#define FAST_INTRA_SHVC                  1      ///< JCTVC-M0115: reduction number of intra modes in the EL (encoder only)
     243#if FAST_INTRA_SHVC
     244#define NB_REMAIN_MODES                  2      ///< JCTVC-M0115: nb of remaining modes
     245#endif
     246#define RC_SHVC_HARMONIZATION            1      ///< JCTVC-M0037: rate control for SHVC
     247#define JCTVC_M0259_LAMBDAREFINEMENT     1      ///< JCTVC-M0259: lambda refinement (encoder only optimization)
     248#define ENCODER_FAST_MODE                1      ///< JCTVC-L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1.
     249#define LAYER_CTB                        0      ///< enable layer-specific CTB structure
     250
     251/// SEI messages -------------------------
     252#define P0050_KNEE_FUNCTION_SEI          1      ///< JCTVC-P0050: Knee function SEI
     253#define SUB_BITSTREAM_PROPERTY_SEI       1      ///< JCTVC-P0204: Sub-bitstream property SEI message
     254#if SUB_BITSTREAM_PROPERTY_SEI
     255#define MAX_SUB_STREAMS                  1024
     256#endif
     257#define Q0074_SEI_COLOR_MAPPING          1      ///< JCTVC-Q0074, SEI Color Mapping
     258#define LAYERS_NOT_PRESENT_SEI           1      ///< JCTVC-M0043: add layers not present SEI.
     259#define N0383_IL_CONSTRAINED_TILE_SETS_SEI  1
     260#define Q0189_TMVP_CONSTRAINTS           1      ///< JCTVC-Q0189: indicate constraints on TMVP
     261#define Q0247_FRAME_FIELD_INFO           1      ///< JCTVC-Q0247: field_frame_info SEI message
     262
    274263
    275264#else
     
    304293#define MAX_NESTING_NUM_LAYER       64
    305294
    306 #if VPS_RENAME
    307 #define MAX_VPS_OP_LAYER_SETS_PLUS1               3
     295#if SVC_EXTENSION
     296#define MAX_VPS_OP_LAYER_SETS_PLUS1               (MAX_LAYERS+1)
    308297#define MAX_VPS_LAYER_SETS_PLUS1                  1024
    309298#define MAX_VPS_LAYER_ID_PLUS1                    MAX_LAYERS
Note: See TracChangeset for help on using the changeset viewer.