Changeset 1084 in 3DVCSoftware for trunk/source


Ignore:
Timestamp:
24 Oct 2014, 11:44:58 (10 years ago)
Author:
tech
Message:

Merged branches/HTM-12.1-dev0@1083.

Location:
trunk/source
Files:
52 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/App/TAppDecoder/TAppDecCfg.cpp

    r1066 r1084  
    9595  ("RespectDefDispWindow,w", m_respectDefDispWindow, 0, "Only output content inside the default display window\n")
    9696#if H_MV
    97 #if H_MV_HLS10_GEN_FIX
    9897  ("OutputVpsInfo,v", m_outputVpsInfo, false, "Output information about the layer dependencies and layer sets")
    99 #endif
    10098#endif
    10199  ;
  • trunk/source/App/TAppDecoder/TAppDecCfg.h

    r1066 r1084  
    8080
    8181#if H_MV
    82 #if H_MV_HLS10_GEN_FIX
    8382  Bool          m_outputVpsInfo;                     ///< Output VPS information
    84 #endif
    8583  Void xAppendToFileNameEnd( Char* pchInputFileName, const Char* pchStringToAppend, Char*& rpchOutputFileName); ///< create filenames
    8684#endif
  • trunk/source/App/TAppDecoder/TAppDecTop.cpp

    r1066 r1084  
    257257            m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx );
    258258          }
    259 #if H_MV_HLS10_GEN_FIX
    260259          if (m_outputVpsInfo )
    261260          {
    262 #if H_MV_HLS10_AUX
    263261            m_vps->printScalabilityId();
    264 #endif
    265262            m_vps->printLayerDependencies();
    266263            m_vps->printLayerSets();
    267264            m_vps->printPTL();
    268265          }
    269 #endif
    270266        }
    271267#if H_3D
     
    580576  Int dpbFullness = 0;
    581577#if H_MV
    582 #if H_MV_HLS10_ADD_LAYERSETS
    583578  TComSPS* activeSPS = m_tDecTop[ decIdx ]->getActiveSPS();
    584 #else
    585   // preliminary fix
    586   TComSPS* activeSPS = m_tDecTop[0]->getActiveSPS();
    587 #endif
    588579#else
    589580  TComSPS* activeSPS = m_cTDecTop.getActiveSPS();
     
    11551146    Int curLayerId = m_tDecTop[dIdx]->getLayerId();
    11561147    Int curLayerIdxInVps = m_vps->getLayerIdInNuh( curLayerId  );
    1157 #if H_MV_HLS10_REF_PRED_LAYERS
    11581148    if ( m_vps->getDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) )
    1159 #else
    1160     if ( m_vps->getInDirectDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) )
    1161 #endif
    11621149    {
    11631150      TComPic* curPic = m_ivPicLists.getPic( curLayerId, pocLastPic );
  • trunk/source/App/TAppEncoder/TAppEncCfg.cpp

    r1066 r1084  
    7272#endif
    7373, m_pchdQPFile()
    74 , m_pColumnWidth()
    75 , m_pRowHeight()
    7674, m_scalingListFile()
    7775{
     
    139137#endif
    140138  free(m_pchdQPFile);
    141   free(m_pColumnWidth);
    142   free(m_pRowHeight);
    143139  free(m_scalingListFile);
    144140#if H_MV
     
    241237  {"main-still-picture", Profile::MAINSTILLPICTURE},
    242238#if H_MV
    243 #if H_MV_HLS10_PTL
    244239  {"multiview-main", Profile::MULTIVIEWMAIN},
    245240#if H_3D
     
    247242#endif
    248243
    249 #else
    250   {"main-stereo",    Profile::MAINSTEREO},
    251   {"main-multiview", Profile::MAINMULTIVIEW},
    252 #if H_3D
    253   {"main-3d"    , Profile::MAIN3D},
    254 #endif
    255 #endif
    256244#endif
    257245};
     
    341329#if H_MV
    342330  vector<Int>   cfg_dimensionLength;
    343 #if H_MV_HLS10_PTL
    344331  string        cfg_profiles;
    345332  string        cfg_levels;
    346333  string        cfg_tiers;
    347 #endif
    348334#if H_3D
    349335  cfg_dimensionLength.push_back( 2  );  // depth
     
    354340#endif
    355341  string cfg_dQPFile;
    356   string cfg_ColumnWidth;
    357   string cfg_RowHeight;
     342  string cfgColumnWidth;
     343  string cfgRowHeight;
    358344  string cfg_ScalingListFile;
    359345  string cfg_startOfCodedInterval;
     
    380366  ("NumberOfLayers",        m_numberOfLayers     , 1,                     "Number of layers")
    381367#if !H_3D
    382 #if H_MV_HLS10_AUX
    383368  ("ScalabilityMask",       m_scalabilityMask    , 2                    , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary")   
    384 #else
    385   ("ScalabilityMask",       m_scalabilityMask    , 2                    , "Scalability Mask")   
    386 #endif
    387369#else
    388370  ("ScalabilityMask",       m_scalabilityMask    , 3                    , "Scalability Mask, 1: Texture 3: Texture + Depth ")   
     
    391373  ("ViewOrderIndex",        m_viewOrderIndex     , std::vector<Int>(1,0), "View Order Index per layer")
    392374  ("ViewId",                m_viewId             , std::vector<Int>(1,0), "View Id per View Order Index")
    393 #if H_MV_HLS10_AUX
    394375  ("AuxId",                 m_auxId              , std::vector<Int>(1,0), "AuxId per layer")
    395 #endif
    396376#if H_3D
    397377  ("DepthFlag",             m_depthFlag          , std::vector<Int>(1,0), "Depth Flag")
    398378#if H_3D_DIM
    399379  ("DMM",                   m_useDMM,           true,  "Depth intra model modes")
    400 #if SEPARATE_FLAG_I0085
    401380  ("IVP",                   m_useIVP,           true,  "intra-view prediction")
    402 #endif
    403381  ("SDC",                   m_useSDC,           true,  "Simplified depth coding")
    404382  ("DLT",                   m_useDLT,           true,  "Depth lookup table")
    405383#endif
    406 #if MTK_SINGLE_DEPTH_MODE_I0095
     384#if H_3D
    407385  ("SingleDepthMode",    m_useSingleDepthMode, true, "Single depth mode")                         
    408386#endif
    409387#endif
    410 #if H_MV_HLS10_GEN_FIX
    411388  ("TargetEncLayerIdList",  m_targetEncLayerIdList, std::vector<Int>(0,0), "LayerIds in Nuh to be encoded") 
    412 #endif
    413389  ("LayerIdInNuh",          m_layerIdInNuh       , std::vector<Int>(1,0), "LayerId in Nuh") 
    414390  ("SplittingFlag",         m_splittingFlag      , false                , "Splitting Flag")   
     
    417393  ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")   
    418394  ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 
    419 #if H_MV_HLS10_ADD_LAYERSETS
    420395  ("NumAddLayerSets"     , m_numAddLayerSets     , 0                                              , "NumAddLayerSets     ")
    421396  ("HighestLayerIdxPlus1_%d", m_highestLayerIdxPlus1, std::vector< Int  >(0,0)  ,MAX_VPS_NUM_ADD_LAYER_SETS, "HighestLayerIdxPlus1")
    422 #endif
    423397  ("DefaultTargetOutputLayerIdc"     , m_defaultOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
    424398  ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 
     
    428402  ("AltOutputLayerFlag",    m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag")
    429403 
    430 #if H_MV_HLS10_PTL
    431404  ("ProfileTierLevelIdx_%d",  m_profileTierLevelIdx, std::vector<Int>(0), MAX_NUM_LAYERS, "Indices to profile level tier for ols")
    432 #else
    433   ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
    434 #endif
    435405  // Layer dependencies
    436406  ("DirectRefLayers_%d",    m_directRefLayers    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIds of direct reference layers")
     
    446416  ("OutputBitDepthC",       m_outputBitDepthC,   0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
    447417  ("InternalBitDepthC",     m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
    448   ("ConformanceMode",       m_conformanceMode,     0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance")
     418  ("ConformanceMode",       m_conformanceWindowMode,  0, "Deprecated alias of ConformanceWindowMode")
     419  ("ConformanceWindowMode", m_conformanceWindowMode,  0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance")
    449420  ("HorizontalPadding,-pdx",m_aiPad[0],            0, "Horizontal source padding for conformance window mode 2")
    450421  ("VerticalPadding,-pdy",  m_aiPad[1],            0, "Vertical source padding for conformance window mode 2")
    451   ("ConfLeft",              m_confLeft,            0, "Left offset for window conformance mode 3")
    452   ("ConfRight",             m_confRight,           0, "Right offset for window conformance mode 3")
    453   ("ConfTop",               m_confTop,             0, "Top offset for window conformance mode 3")
    454   ("ConfBottom",            m_confBottom,          0, "Bottom offset for window conformance mode 3")
     422  ("ConfLeft",              m_confWinLeft,            0, "Deprecated alias of ConfWinLeft")
     423  ("ConfRight",             m_confWinRight,           0, "Deprecated alias of ConfWinRight")
     424  ("ConfTop",               m_confWinTop,             0, "Deprecated alias of ConfWinTop")
     425  ("ConfBottom",            m_confWinBottom,          0, "Deprecated alias of ConfWinBottom")
     426  ("ConfWinLeft",           m_confWinLeft,            0, "Left offset for window conformance mode 3")
     427  ("ConfWinRight",          m_confWinRight,           0, "Right offset for window conformance mode 3")
     428  ("ConfWinTop",            m_confWinTop,             0, "Top offset for window conformance mode 3")
     429  ("ConfWinBottom",         m_confWinBottom,          0, "Bottom offset for window conformance mode 3")
    455430  ("FrameRate,-fr",         m_iFrameRate,          0, "Frame rate")
    456431  ("FrameSkip,-fs",         m_FrameSkip,          0u, "Number of frames to skip at start of input YUV")
     
    462437 
    463438  // Profile and level
    464 #if H_MV_HLS10_PTL
     439#if H_MV
    465440  ("Profile", cfg_profiles,   string(""),           "Profile in VpsProfileTierLevel (Indication only)")
    466441  ("Level",   cfg_levels ,    string(""),           "Level indication in VpsProfileTierLevel (Indication only)")
     
    609584  ("WeightedPredB,-wpB",          m_useWeightedBiPred,             false,      "Use weighted (bidirectional) prediction in B slices")
    610585  ("Log2ParallelMergeLevel",      m_log2ParallelMergeLevel,     2u,          "Parallel merge estimation region")
    611   ("UniformSpacingIdc",           m_iUniformSpacingIdr,            0,          "Indicates if the column and row boundaries are distributed uniformly")
    612   ("NumTileColumnsMinus1",        m_iNumColumnsMinus1,             0,          "Number of columns in a picture minus 1")
    613   ("ColumnWidthArray",            cfg_ColumnWidth,                 string(""), "Array containing ColumnWidth values in units of LCU")
    614   ("NumTileRowsMinus1",           m_iNumRowsMinus1,                0,          "Number of rows in a picture minus 1")
    615   ("RowHeightArray",              cfg_RowHeight,                   string(""), "Array containing RowHeight values in units of LCU")
     586
     587  //deprecated copies of renamed tile parameters
     588  ("UniformSpacingIdc",           m_tileUniformSpacingFlag,        false,      "deprecated alias of TileUniformSpacing")
     589  ("ColumnWidthArray",            cfgColumnWidth,                  string(""), "deprecated alias of TileColumnWidthArray")
     590  ("RowHeightArray",              cfgRowHeight,                    string(""), "deprecated alias of TileRowHeightArray")
     591
     592  ("TileUniformSpacing",          m_tileUniformSpacingFlag,        false,      "Indicates that tile columns and rows are distributed uniformly")
     593  ("NumTileColumnsMinus1",        m_numTileColumnsMinus1,          0,          "Number of tile columns in a picture minus 1")
     594  ("NumTileRowsMinus1",           m_numTileRowsMinus1,             0,          "Number of rows in a picture minus 1")
     595  ("TileColumnWidthArray",        cfgColumnWidth,                  string(""), "Array containing tile column width values in units of LCU")
     596  ("TileRowHeightArray",          cfgRowHeight,                    string(""), "Array containing tile row height values in units of LCU")
    616597  ("LFCrossTileBoundaryFlag",      m_bLFCrossTileBoundaryFlag,             true,          "1: cross-tile-boundary loop filtering. 0:non-cross-tile-boundary loop filtering")
    617598  ("WaveFrontSynchro",            m_iWaveFrontSynchro,             0,          "0: no synchro; 1 synchro with TR; 2 TRR etc")
     
    650631#endif
    651632#if H_MV
    652 #if H_MV_HLS10_GEN_FIX
    653633// A lot of this stuff could should actually be derived by the encoder.
    654 #endif // H_MV_HLS10_GEN
    655634  // VPS VUI
    656635  ("VpsVuiPresentFlag"           , m_vpsVuiPresentFlag           , false                                           , "VpsVuiPresentFlag           ")
     
    676655  ("CtuBasedOffsetEnabledFlag"   , m_ctuBasedOffsetEnabledFlag   , std::vector< Bool >(1,0)  ,MAX_NUM_LAYERS       , "CtuBasedOffsetEnabledFlag    per direct reference for the N-th layer")
    677656  ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , std::vector< Int  >(1,0)  ,MAX_NUM_LAYERS       , "MinHorizontalCtuOffsetPlus1  per direct reference for the N-th layer")
    678 #if H_MV_HLS10_VPS_VUI
    679657  ("SingleLayerForNonIrapFlag", m_singleLayerForNonIrapFlag, false                                          , "SingleLayerForNonIrapFlag")
    680658  ("HigherLayerIrapSkipFlag"  , m_higherLayerIrapSkipFlag  , false                                          , "HigherLayerIrapSkipFlag  ")
    681 #endif
    682659#endif
    683660
     
    699676  ("ColourDescriptionPresent",       m_colourDescriptionPresentFlag,       false, "Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present")
    700677  ("ColourPrimaries",                m_colourPrimaries,                        2, "Indicates chromaticity coordinates of the source primaries")
    701   ("TransferCharateristics",         m_transferCharacteristics,                2, "Indicates the opto-electronic transfer characteristics of the source")
     678  ("TransferCharacteristics",        m_transferCharacteristics,                2, "Indicates the opto-electronic transfer characteristics of the source")
    702679  ("MatrixCoefficients",             m_matrixCoefficients,                     2, "Describes the matrix coefficients used in deriving luma and chroma from RGB primaries")
    703680  ("ChromaLocInfoPresent",           m_chromaLocInfoPresentFlag,           false, "Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present")
     
    786763  ("SEISubBitstreamMaxBitRate",               m_sbPropMaxBitRate,             std::vector< Int  >(1,0)  ,"Specifies maximum bit rate of the i-th sub-bitstream")
    787764
    788 #if H_MV_HLS10_GEN_FIX
    789765  ("OutputVpsInfo",                           m_outputVpsInfo,                false                     ,"Output information about the layer dependencies and layer sets")
    790 #endif
    791766#endif
    792767#if H_3D
     
    814789
    815790#endif //HHI_VSO
    816 #if MTK_I0099_VPS_EX2
     791#if H_3D_QTLPC
    817792  ("LimQtPredFlag",                   m_bLimQtPredFlag          , true          , "Use Predictive Coding with QTL" )
    818 #endif
    819 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX
    820 #if H_3D_QTLPC
    821793  ("QTL",                             m_bUseQTL                 , true          , "Use depth Quadtree Limitation" )
    822 #if !MTK_I0099_VPS_EX2
    823   ("PC",                              m_bUsePC                  , true          , "Use Predictive Coding with QTL" )
    824 #endif
    825 #endif
    826794#endif
    827795#if H_3D_IV_MERGE
     
    928896  m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str());
    929897 
    930   Char* pColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str());
    931   Char* pRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str());
    932   if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 )
    933   {
    934     char *columnWidth;
     898  Char* pColumnWidth = cfgColumnWidth.empty() ? NULL: strdup(cfgColumnWidth.c_str());
     899  Char* pRowHeight = cfgRowHeight.empty() ? NULL : strdup(cfgRowHeight.c_str());
     900
     901  if( !m_tileUniformSpacingFlag && m_numTileColumnsMinus1 > 0 )
     902  {
     903    char *str;
    935904    int  i=0;
    936     m_pColumnWidth = new UInt[m_iNumColumnsMinus1];
    937     columnWidth = strtok(pColumnWidth, " ,-");
    938     while(columnWidth!=NULL)
    939     {
    940       if( i>=m_iNumColumnsMinus1 )
     905    m_tileColumnWidth.resize( m_numTileColumnsMinus1 );
     906    str = strtok(pColumnWidth, " ,-");
     907    while(str!=NULL)
     908    {
     909      if( i >= m_numTileColumnsMinus1 )
    941910      {
    942911        printf( "The number of columns whose width are defined is larger than the allowed number of columns.\n" );
    943912        exit( EXIT_FAILURE );
    944913      }
    945       *( m_pColumnWidth + i ) = atoi( columnWidth );
    946       columnWidth = strtok(NULL, " ,-");
     914      m_tileColumnWidth[i] = atoi( str );
     915      str = strtok(NULL, " ,-");
    947916      i++;
    948917    }
    949     if( i<m_iNumColumnsMinus1 )
     918    if( i < m_numTileColumnsMinus1 )
    950919    {
    951920      printf( "The width of some columns is not defined.\n" );
     
    955924  else
    956925  {
    957     m_pColumnWidth = NULL;
    958   }
    959 
    960   if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 )
    961   {
    962     char *rowHeight;
     926    m_tileColumnWidth.clear();
     927  }
     928
     929  if( !m_tileUniformSpacingFlag && m_numTileRowsMinus1 > 0 )
     930  {
     931    char *str;
    963932    int  i=0;
    964     m_pRowHeight = new UInt[m_iNumRowsMinus1];
    965     rowHeight = strtok(pRowHeight, " ,-");
    966     while(rowHeight!=NULL)
    967     {
    968       if( i>=m_iNumRowsMinus1 )
     933    m_tileRowHeight.resize(m_numTileRowsMinus1);
     934    str = strtok(pRowHeight, " ,-");
     935    while(str!=NULL)
     936    {
     937      if( i>=m_numTileRowsMinus1 )
    969938      {
    970939        printf( "The number of rows whose height are defined is larger than the allowed number of rows.\n" );
    971940        exit( EXIT_FAILURE );
    972941      }
    973       *( m_pRowHeight + i ) = atoi( rowHeight );
    974       rowHeight = strtok(NULL, " ,-");
     942      m_tileRowHeight[i] = atoi( str );
     943      str = strtok(NULL, " ,-");
    975944      i++;
    976945    }
    977     if( i<m_iNumRowsMinus1 )
     946    if( i < m_numTileRowsMinus1 )
    978947    {
    979948      printf( "The height of some rows is not defined.\n" );
     
    983952  else
    984953  {
    985     m_pRowHeight = NULL;
     954    m_tileRowHeight.clear();
    986955  }
    987956#if H_MV
     
    999968
    1000969  // TODO:ChromaFmt assumes 4:2:0 below
    1001   switch (m_conformanceMode)
     970  switch (m_conformanceWindowMode)
    1002971  {
    1003972  case 0:
    1004973    {
    1005974      // no conformance or padding
    1006       m_confLeft = m_confRight = m_confTop = m_confBottom = 0;
     975      m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0;
    1007976      m_aiPad[1] = m_aiPad[0] = 0;
    1008977      break;
     
    1014983      if (m_iSourceWidth % minCuSize)
    1015984      {
    1016         m_aiPad[0] = m_confRight  = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;
    1017         m_iSourceWidth  += m_confRight;
     985        m_aiPad[0] = m_confWinRight  = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;
     986        m_iSourceWidth  += m_confWinRight;
    1018987      }
    1019988      if (m_iSourceHeight % minCuSize)
    1020989      {
    1021         m_aiPad[1] = m_confBottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight;
    1022         m_iSourceHeight += m_confBottom;
     990        m_aiPad[1] = m_confWinBottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight;
     991        m_iSourceHeight += m_confWinBottom;
    1023992        if ( m_isField )
    1024993        {
    1025           m_iSourceHeightOrg += m_confBottom << 1;
    1026           m_aiPad[1] = m_confBottom << 1;
     994          m_iSourceHeightOrg += m_confWinBottom << 1;
     995          m_aiPad[1] = m_confWinBottom << 1;
    1027996        }
    1028997      }
     
    10441013      m_iSourceWidth  += m_aiPad[0];
    10451014      m_iSourceHeight += m_aiPad[1];
    1046       m_confRight  = m_aiPad[0];
    1047       m_confBottom = m_aiPad[1];
     1015      m_confWinRight  = m_aiPad[0];
     1016      m_confWinBottom = m_aiPad[1];
    10481017      break;
    10491018    }
     
    10511020    {
    10521021      // conformance
    1053       if ((m_confLeft == 0) && (m_confRight == 0) && (m_confTop == 0) && (m_confBottom == 0))
     1022      if ((m_confWinLeft == 0) && (m_confWinRight == 0) && (m_confWinTop == 0) && (m_confWinBottom == 0))
    10541023      {
    10551024        fprintf(stderr, "Warning: Conformance window enabled, but all conformance window parameters set to zero\n");
     
    10821051  }
    10831052  m_iNumberOfViews = (Int) uniqueViewOrderIndices.size();
    1084 #if H_MV_HLS10_AUX
    10851053  xResizeVector( m_auxId );
    1086 #endif
    10871054
    10881055#if H_3D
     
    11181085  xResizeVector( m_wppInUseFlag );
    11191086
    1120 #if H_MV_HLS10_ADD_LAYERSETS
    11211087  for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + m_numAddLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++)
    1122 #else
    1123   for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++)
    1124 #endif
    11251088  {   
    11261089    m_altOutputLayerFlag.push_back( false );     
     
    12341197
    12351198#if H_MV
    1236 #if H_MV_HLS10_PTL
    12371199  // parse PTL
    12381200  Bool anyEmpty = false;
     
    12811243  xReadStrToEnum( cfg_levels,   m_level     );
    12821244  xReadStrToEnum( cfg_tiers ,   m_levelTier );
    1283 #endif
    12841245#endif
    12851246#if H_3D
     
    13991360
    14001361
    1401 #if !H_MV_HLS10_PTL
     1362#if !H_MV
    14021363  if( m_profile==Profile::NONE )
    14031364  {
     
    14311392  xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 3, "Scalability Mask must be equal to 2 or 3. ");
    14321393#else
    1433 #if H_MV_HLS10_AUX
    14341394  xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 8 && m_scalabilityMask != 10, "Scalability Mask must be equal to 2, 8 or 10");
    1435 #else
    1436   xConfirmPara( m_scalabilityMask != 2 , "Scalability Mask must be equal to 2. ");
    1437 #endif
    14381395#endif
    14391396
     
    14461403
    14471404  m_dimIds.push_back( m_viewOrderIndex );   
    1448 #if H_MV_HLS10_AUX
    14491405  for (Int i = 0; i < m_auxId.size(); i++)
    14501406  {
     
    14551411    m_dimIds.push_back ( m_auxId );
    14561412  }
    1457 #endif 
    14581413  xConfirmPara(  m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. "   );
    14591414  Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1];
     
    15401495    for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++ )
    15411496    {
    1542 #if FIX_TICKET_61
    15431497      xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx][i] >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than 0 and less than MAX_NUM_LAYER_IDS" );
    1544 #else
    1545       xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than MAX_NUM_LAYER_IDS" );
    1546 #endif
    15471498    }
    15481499  }
     
    15531504  {   
    15541505    Int refLayerSetIdx = m_outputLayerSetIdx[ lsIdx ];
    1555 #if H_MV_HLS10_ADD_LAYERSETS
    15561506    xConfirmPara(  refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets + m_numAddLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets plus NumAddLayerSets." );
    1557 #else
    1558     xConfirmPara(  refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets." );
    1559 #endif
    1560 #if !H_MV_HLS10_ADD_LAYERSETS
    1561     for (Int i = 0; i < m_layerIdsInAddOutputLayerSet[ lsIdx ].size(); i++)
    1562     {
    1563       Bool isAlsoInLayerSet = false;
    1564       for (Int j = 0; j < m_layerIdsInSets[ refLayerSetIdx ].size(); j++ )
    1565       {
    1566         if ( m_layerIdsInSets[ refLayerSetIdx ][ j ] == m_layerIdsInAddOutputLayerSet[ lsIdx ][ i ] )
    1567         {
    1568           isAlsoInLayerSet = true;
    1569           break;
    1570         }       
    1571       }
    1572       xConfirmPara( !isAlsoInLayerSet, "All output layers of a output layer set be included in corresponding layer set.");
    1573     }
    1574 #endif
    15751507  }
    15761508
     
    15841516      anyDefaultOutputFlag = anyDefaultOutputFlag || ( m_layerIdsInDefOutputLayerSet[lsIdx].size() != 0 );
    15851517    }   
    1586 #if H_MV_HLS10_ADD_LAYERSETS
    15871518    if ( anyDefaultOutputFlag )
    15881519    {   
    15891520      printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" );   
    15901521    }
    1591 #else
    1592     printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" );   
    1593 #endif
    15941522  }
    15951523  else 
     
    16131541  }
    16141542
    1615 #if H_MV_HLS10_ADD_LAYERSETS
    16161543  xConfirmPara( m_altOutputLayerFlag.size() < m_vpsNumLayerSets + m_numAddLayerSets + m_outputLayerSetIdx.size(), "The number of alt output layer flags must be equal to the number of layer set additional output layer sets plus the number of output layer set indices" );
    1617 #else
    1618   xConfirmPara( m_altOutputLayerFlag.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
    1619 #endif
    16201544
    16211545  // PTL
    1622 #if H_MV_HLS10_PTL
    16231546    xConfirmPara( ( m_profile.size() != m_inblFlag.size() || m_profile.size() != m_level.size()  ||  m_profile.size() != m_levelTier.size() ), "The number of Profiles, Levels, Tiers and InblFlags must be equal." );
    16241547
     
    16331556      }
    16341557    }
    1635 #else
    1636     xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
    1637 #endif
    16381558
    16391559    // Layer Dependencies 
     
    17681688  }
    17691689 
    1770   Bool tileFlag = (m_iNumColumnsMinus1 > 0 || m_iNumRowsMinus1 > 0 );
     1690  Bool tileFlag = (m_numTileColumnsMinus1 > 0 || m_numTileRowsMinus1 > 0 );
    17711691  xConfirmPara( tileFlag && m_iWaveFrontSynchro,            "Tile and Wavefront can not be applied together");
    17721692
     
    17781698  xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling");
    17791699
    1780   xConfirmPara( m_confLeft   % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling");
    1781   xConfirmPara( m_confRight  % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling");
    1782   xConfirmPara( m_confTop    % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling");
    1783   xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling");
     1700  xConfirmPara( m_confWinLeft   % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling");
     1701  xConfirmPara( m_confWinRight  % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling");
     1702  xConfirmPara( m_confWinTop    % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling");
     1703  xConfirmPara( m_confWinBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling");
     1704
     1705  xConfirmPara( m_defaultDisplayWindowFlag && !m_vuiParametersPresentFlag, "VUI needs to be enabled for default display window");
     1706
     1707  if (m_defaultDisplayWindowFlag)
     1708  {
     1709    xConfirmPara( m_defDispWinLeftOffset   % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left default display window offset must be an integer multiple of the specified chroma subsampling");
     1710    xConfirmPara( m_defDispWinRightOffset  % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right default display window offset must be an integer multiple of the specified chroma subsampling");
     1711    xConfirmPara( m_defDispWinTopOffset    % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top default display window offset must be an integer multiple of the specified chroma subsampling");
     1712    xConfirmPara( m_defDispWinBottomOffset % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom default display window offset must be an integer multiple of the specified chroma subsampling");
     1713  }
    17841714
    17851715#if H_3D
     
    23012231      Int widthInCU = (m_iSourceWidth % m_uiMaxCUWidth) ? m_iSourceWidth/m_uiMaxCUWidth + 1: m_iSourceWidth/m_uiMaxCUWidth;
    23022232      Int heightInCU = (m_iSourceHeight % m_uiMaxCUHeight) ? m_iSourceHeight/m_uiMaxCUHeight + 1: m_iSourceHeight/m_uiMaxCUHeight;
    2303       if(m_iUniformSpacingIdr)
    2304       {
    2305         maxTileWidth = m_uiMaxCUWidth*((widthInCU+m_iNumColumnsMinus1)/(m_iNumColumnsMinus1+1));
    2306         maxTileHeight = m_uiMaxCUHeight*((heightInCU+m_iNumRowsMinus1)/(m_iNumRowsMinus1+1));
     2233      if(m_tileUniformSpacingFlag)
     2234      {
     2235        maxTileWidth = m_uiMaxCUWidth*((widthInCU+m_numTileColumnsMinus1)/(m_numTileColumnsMinus1+1));
     2236        maxTileHeight = m_uiMaxCUHeight*((heightInCU+m_numTileRowsMinus1)/(m_numTileRowsMinus1+1));
    23072237        // if only the last tile-row is one treeblock higher than the others
    23082238        // the maxTileHeight becomes smaller if the last row of treeblocks has lower height than the others
    2309         if(!((heightInCU-1)%(m_iNumRowsMinus1+1)))
     2239        if(!((heightInCU-1)%(m_numTileRowsMinus1+1)))
    23102240        {
    23112241          maxTileHeight = maxTileHeight - m_uiMaxCUHeight + (m_iSourceHeight % m_uiMaxCUHeight);
     
    23132243        // if only the last tile-column is one treeblock wider than the others
    23142244        // the maxTileWidth becomes smaller if the last column of treeblocks has lower width than the others   
    2315         if(!((widthInCU-1)%(m_iNumColumnsMinus1+1)))
     2245        if(!((widthInCU-1)%(m_numTileColumnsMinus1+1)))
    23162246        {
    23172247          maxTileWidth = maxTileWidth - m_uiMaxCUWidth + (m_iSourceWidth % m_uiMaxCUWidth);
     
    23202250      else // not uniform spacing
    23212251      {
    2322         if(m_iNumColumnsMinus1<1)
     2252        if(m_numTileColumnsMinus1<1)
    23232253        {
    23242254          maxTileWidth = m_iSourceWidth;
     
    23272257        {
    23282258          Int accColumnWidth = 0;
    2329           for(Int col=0; col<(m_iNumColumnsMinus1); col++)
     2259          for(Int col=0; col<(m_numTileColumnsMinus1); col++)
    23302260          {
    2331             maxTileWidth = m_pColumnWidth[col]>maxTileWidth ? m_pColumnWidth[col]:maxTileWidth;
    2332             accColumnWidth += m_pColumnWidth[col];
     2261            maxTileWidth = m_tileColumnWidth[col]>maxTileWidth ? m_tileColumnWidth[col]:maxTileWidth;
     2262            accColumnWidth += m_tileColumnWidth[col];
    23332263          }
    23342264          maxTileWidth = (widthInCU-accColumnWidth)>maxTileWidth ? m_uiMaxCUWidth*(widthInCU-accColumnWidth):m_uiMaxCUWidth*maxTileWidth;
    23352265        }
    2336         if(m_iNumRowsMinus1<1)
     2266        if(m_numTileRowsMinus1<1)
    23372267        {
    23382268          maxTileHeight = m_iSourceHeight;
     
    23412271        {
    23422272          Int accRowHeight = 0;
    2343           for(Int row=0; row<(m_iNumRowsMinus1); row++)
     2273          for(Int row=0; row<(m_numTileRowsMinus1); row++)
    23442274          {
    2345             maxTileHeight = m_pRowHeight[row]>maxTileHeight ? m_pRowHeight[row]:maxTileHeight;
    2346             accRowHeight += m_pRowHeight[row];
     2275            maxTileHeight = m_tileRowHeight[row]>maxTileHeight ? m_tileRowHeight[row]:maxTileHeight;
     2276            accRowHeight += m_tileRowHeight[row];
    23472277          }
    23482278          maxTileHeight = (heightInCU-accRowHeight)>maxTileHeight ? m_uiMaxCUHeight*(heightInCU-accRowHeight):m_uiMaxCUHeight*maxTileHeight;
     
    24992429#endif
    25002430#if H_MV
    2501 #if H_MV_HLS10_GEN_FIX
    25022431  xPrintParaVector( "NuhLayerId"     , m_layerIdInNuh );
    25032432  if ( m_targetEncLayerIdList.size() > 0)
     
    25052434    xPrintParaVector( "TargetEncLayerIdList"     , m_targetEncLayerIdList );
    25062435  }
    2507 #endif
    25082436  xPrintParaVector( "ViewIdVal"     , m_viewId );
    25092437  xPrintParaVector( "ViewOrderIndex", m_viewOrderIndex );
    2510 #if H_MV_HLS10_AUX
    25112438  xPrintParaVector( "AuxId", m_auxId );
    2512 #endif
    25132439#endif
    25142440#if H_3D
     
    25212447  xPrintParaVector( "SAO"              , m_bUseSAO            );
    25222448#endif
    2523   printf("Real     Format              : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate );
     2449  printf("Real     Format              : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate );
    25242450  printf("Internal Format              : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );
    25252451  if (m_isField)
     
    26762602  printf("WVSO:%d ", m_bUseWVSO ); 
    26772603#endif
    2678 #if MTK_I0099_VPS_EX2
     2604#if H_3D_QTLPC
    26792605  printf("LimQtPredFlag:%d ", m_bLimQtPredFlag ? 1 : 0);
    2680 #endif
    2681 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX
    2682 #if H_3D_QTLPC
    26832606  printf("QTL:%d ", m_bUseQTL);
    2684 #if !MTK_I0099_VPS_EX2
    2685   printf("PC:%d " , m_bUsePC );
    2686 #endif
    2687 #endif
    26882607#endif
    26892608#if H_3D_IV_MERGE
     
    27122631#if H_3D_DIM
    27132632  printf("DMM:%d ", m_useDMM );
    2714 #if SEPARATE_FLAG_I0085
    27152633  printf("IVP:%d ", m_useIVP );
    2716 #endif
    27172634  printf("SDC:%d ", m_useSDC );
    27182635  printf("DLT:%d ", m_useDLT );
    27192636#endif
    2720 #if MTK_SINGLE_DEPTH_MODE_I0095
     2637#if H_3D
    27212638  printf("SingleDepthMode:%d ",    m_useSingleDepthMode);
    27222639#endif
  • trunk/source/App/TAppEncoder/TAppEncCfg.h

    r1066 r1084  
    4343#include "TLibEncoder/TEncCfg.h"
    4444#include <sstream>
     45#include <vector>
    4546#if H_3D
    4647#include "TAppCommon/TAppComCamPara.h"
     
    7879  std::vector<Int>       m_viewId;                            ///< view id
    7980  std::vector<Int>       m_viewOrderIndex;                    ///< view order index 
    80 #if H_MV_HLS10_AUX
    8181  std::vector<Int>       m_auxId;                             ///< auxiliary id
    82 #endif
    8382#if H_3D
    8483  std::vector<Int>       m_depthFlag;                         ///< depth flag
    8584#endif
    86 #if H_MV_HLS10_GEN_FIX
    8785  std::vector<Int>       m_targetEncLayerIdList;              ///< layer Ids in Nuh to be encoded
    88 #endif
    8986  std::vector<Int>       m_layerIdInNuh;                      ///< layer Id in Nuh for each layer
    9087  Bool                   m_splittingFlag;                     ///< Splitting Flag
     
    9592  Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
    9693  std::vector< std::vector<Int> > m_layerIdsInSets;           ///< LayerIds in vps of layer set
    97 #if H_MV_HLS10_ADD_LAYERSETS
    9894  Int                    m_numAddLayerSets;                    ///< Number of additional layer sets
    9995  std::vector< std::vector<Int> > m_highestLayerIdxPlus1;      ///< HighestLayerIdxPlus1 for each additional layer set and each independent layer (value with index 0 will be ignored)
    100 #endif
    10196  Int                    m_defaultOutputLayerIdc;             ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
    10297  std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets 
    10398  std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers
    10499  std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets
    105 #if H_MV_HLS10_ADD_LAYERSETS
    106100  std::vector< std::vector< Int > > m_profileTierLevelIdx;      ///< Indices of of profile, per layer in layer set
    107 #else
    108   std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
    109 #endif
    110101  std::vector<Bool>      m_altOutputLayerFlag;                ///< Alt output layer flag
    111102
     
    138129  std::vector< std::vector<Bool > > m_ctuBasedOffsetEnabledFlag;
    139130  std::vector< std::vector<Int  > > m_minHorizontalCtuOffsetPlus1;
    140 #if H_MV_HLS10_VPS_VUI
    141131  Bool m_singleLayerForNonIrapFlag;
    142132  Bool m_higherLayerIrapSkipFlag;
    143 #endif // H_MV_HLS10_VPS_VUI
    144133
    145134
     
    151140#endif
    152141#endif
    153 #if MTK_I0099_VPS_EX2
     142#if H_3D_QTLPC
    154143  Bool                   m_bLimQtPredFlag;
    155144#endif
     
    184173  bool      m_isTopFieldFirst;
    185174 
    186   Int       m_conformanceMode;
    187   Int       m_confLeft;
    188   Int       m_confRight;
    189   Int       m_confTop;
    190   Int       m_confBottom;
     175  Int       m_conformanceWindowMode;
     176  Int       m_confWinLeft;
     177  Int       m_confWinRight;
     178  Int       m_confWinTop;
     179  Int       m_confWinBottom;
    191180  Int       m_framesToBeEncoded;                              ///< number of encoded frames
    192181  Int       m_aiPad[2];                                       ///< number of padded pixels for width and height
    193182 
    194183  // profile/level
    195 #if H_MV_HLS10_PTL
    196184#if H_MV
    197185  std::vector< Profile::Name > m_profile;
     
    203191  Level::Tier   m_levelTier;
    204192  Level::Name   m_level;
    205 #endif
    206193#endif
    207194
     
    338325  Bool      m_bLFCrossSliceBoundaryFlag;  ///< 1: filter across slice boundaries 0: do not filter across slice boundaries
    339326  Bool      m_bLFCrossTileBoundaryFlag;   ///< 1: filter across tile boundaries  0: do not filter across tile boundaries
    340   Int       m_iUniformSpacingIdr;
    341   Int       m_iNumColumnsMinus1;
    342   Char*     m_pchColumnWidth;
    343   Int       m_iNumRowsMinus1;
    344   Char*     m_pchRowHeight;
    345   UInt*     m_pColumnWidth;
    346   UInt*     m_pRowHeight;
     327  Bool      m_tileUniformSpacingFlag;
     328  Int       m_numTileColumnsMinus1;
     329  Int       m_numTileRowsMinus1;
     330  std::vector<Int> m_tileColumnWidth;
     331  std::vector<Int> m_tileRowHeight;
    347332  Int       m_iWaveFrontSynchro; //< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current.
    348333  Int       m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles).
     
    468453  std::vector<Int>  m_sbPropAvgBitRate;
    469454  std::vector<Int>  m_sbPropMaxBitRate;
    470 #if H_MV_HLS10_GEN_FIX
    471455  Bool              m_outputVpsInfo;
    472 #endif
    473456#endif
    474457#if H_3D
     
    504487#if H_3D_DIM
    505488  Bool      m_useDMM;                                        ///< flag for using DMM
    506 #if SEPARATE_FLAG_I0085
    507489  Bool      m_useIVP;
    508 #endif
    509490  Bool      m_useSDC;                                        ///< flag for using SDC
    510491  Bool      m_useDLT;                                        ///< flag for using DLT
    511492#endif
    512 #if MTK_SINGLE_DEPTH_MODE_I0095
     493#if H_3D_SINGLE_DEPTH
    513494  Bool     m_useSingleDepthMode;                          ///< flag for using single depth mode
    514495#endif
    515 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX
    516496#if H_3D_QTLPC
    517497  Bool      m_bUseQTL;                                        ///< flag for using depth QuadTree Limitation
    518 #if !MTK_I0099_VPS_EX2
    519   Bool      m_bUsePC;                                         ///< flag for using Predictive Coding with QTL
    520 #endif
    521 #endif
    522498#endif
    523499#if H_3D_INTER_SDC
     
    538514#if H_MV
    539515
    540 #if H_MV_HLS10_PTL
    541516  template<typename T>
    542517  Void xReadStrToEnum(string in, std::vector<T> &val)
     
    559534    delete[] cString;
    560535  }
    561 #endif
    562536
    563537
  • trunk/source/App/TAppEncoder/TAppEncTop.cpp

    r1066 r1084  
    144144  xDeriveDltArray          ( vps, dlt );
    145145#endif
    146 #if H_MV_HLS10_GEN_FIX
    147146  if ( m_targetEncLayerIdList.size() == 0 )
    148147  {
     
    166165    }
    167166  }
    168 #endif
    169 
    170 #if H_MV_HLS10_ADD_LAYERSETS
     167
    171168  if ( m_outputVpsInfo )
    172169  { 
    173 #if H_MV_HLS10_AUX
    174170    vps.printScalabilityId();
    175 #endif
    176171    vps.printLayerDependencies();
    177172    vps.printLayerSets();
    178173    vps.printPTL();
    179174  }
    180 #endif
    181175
    182176  for(Int layerIdInVps = 0; layerIdInVps < m_numberOfLayers; layerIdInVps++)
     
    233227#if H_3D_DIM
    234228    m_cTEncTop.setUseDMM                       ( isDepth ? m_useDMM               : false );
    235 #if SEPARATE_FLAG_I0085
    236 #if LGE_FCO_I0116
     229#if H_3D_FCO
    237230    m_cTEncTop.setUseIVP                       ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_useIVP               : false );
    238231#else
    239232    m_cTEncTop.setUseIVP                       ( isDepth ? m_useIVP               : false );
    240 #endif
    241233#endif
    242234    m_cTEncTop.setUseSDC                       ( isDepth ? m_useSDC               : false );
    243235    m_cTEncTop.setUseDLT                       ( isDepth ? m_useDLT               : false );
    244236#endif
    245 #if MTK_SINGLE_DEPTH_MODE_I0095
     237#if H_3D_SINGLE_DEPTH
    246238    m_cTEncTop.setUseSingleDepthMode           ( isDepth ? m_useSingleDepthMode   : false );
    247239#endif
    248 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX
    249240#if H_3D_QTLPC
    250 #if LGE_FCO_I0116
    251     m_cTEncTop.setUseQTL                       ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_bUseQTL               : false );
    252 #else
    253241    m_cTEncTop.setUseQTL                       ( isDepth ? m_bUseQTL               : false );
    254 #endif
    255 #if !MTK_I0099_VPS_EX2   
    256     m_cTEncTop.setUsePC                        ( isDepth ? m_bUsePC                : false );
    257 #endif
    258 #endif
    259242#endif
    260243    //====== Depth Inter SDC =========
     
    266249#endif
    267250#if H_3D_IV_MERGE
    268 #if LGE_FCO_I0116
     251#if H_3D_FCO
    269252    m_cTEncTop.setUseMPI                       ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_bMPIFlag    : false );
    270253#else
     
    298281  m_cTEncTop.setSourceWidth                  ( m_iSourceWidth );
    299282  m_cTEncTop.setSourceHeight                 ( m_iSourceHeight );
    300   m_cTEncTop.setConformanceWindow            ( m_confLeft, m_confRight, m_confTop, m_confBottom );
     283  m_cTEncTop.setConformanceWindow            ( m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom );
    301284  m_cTEncTop.setFramesToBeEncoded            ( m_framesToBeEncoded );
    302285 
     
    506489  }
    507490#endif
    508   m_cTEncTop.setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    509   m_cTEncTop.setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
    510   m_cTEncTop.setNumRowsMinus1              ( m_iNumRowsMinus1 );
    511   if(m_iUniformSpacingIdr==0)
    512   {
    513     m_cTEncTop.setColumnWidth              ( m_pColumnWidth );
    514     m_cTEncTop.setRowHeight                ( m_pRowHeight );
     491  m_cTEncTop.setTileUniformSpacingFlag     ( m_tileUniformSpacingFlag );
     492  m_cTEncTop.setNumColumnsMinus1           ( m_numTileColumnsMinus1 );
     493  m_cTEncTop.setNumRowsMinus1              ( m_numTileRowsMinus1 );
     494  if(!m_tileUniformSpacingFlag)
     495  {
     496    m_cTEncTop.setColumnWidth              ( m_tileColumnWidth );
     497    m_cTEncTop.setRowHeight                ( m_tileRowHeight );
    515498  }
    516499  m_cTEncTop.xCheckGSParameters();
    517   Int uiTilesCount          = (m_iNumRowsMinus1+1) * (m_iNumColumnsMinus1+1);
     500  Int uiTilesCount          = (m_numTileRowsMinus1+1) * (m_numTileColumnsMinus1+1);
    518501  if(uiTilesCount == 1)
    519502  {
     
    620603  m_cTEncTop.setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled );
    621604  m_cTEncTop.setVuiParametersPresentFlag( m_vuiParametersPresentFlag );
     605  m_cTEncTop.setAspectRatioInfoPresentFlag( m_aspectRatioInfoPresentFlag);
    622606  m_cTEncTop.setAspectRatioIdc( m_aspectRatioIdc );
    623607  m_cTEncTop.setSarWidth( m_sarWidth );
     
    840824 
    841825#if H_MV
    842 #if H_MV_HLS10_GEN_FIX
    843826  while ( (m_targetEncLayerIdList.size() != 0 ) && !allEos )
    844 #else
    845   while ( !allEos )
    846 #endif
    847827  {
    848828    for(Int layer=0; layer < m_numberOfLayers; layer++ )
    849829    {
    850 #if H_MV_HLS10_GEN_FIX
    851830      if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) ))
    852831      {
    853832        continue;
    854833      }
    855 #endif
    856834
    857835      Int frmCnt = 0;
     
    894872      for(Int layer=0; layer < m_numberOfLayers; layer++ )
    895873      {
    896 #if H_MV_HLS10_GEN_FIX
    897874        if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) ))
    898875        {
    899876          continue;
    900877        }
    901 #endif
    902878
    903879#if H_3D_VSO       
     
    927903  for(Int layer=0; layer < m_numberOfLayers; layer++ )
    928904  {
    929 #if H_MV_HLS10_GEN_FIX
    930905    if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) ))
    931906    {
    932907      continue;
    933908    }
    934 #endif
    935909    m_acTEncTopList[layer]->printSummary( m_acTEncTopList[layer]->getNumAllPicCoded(), m_isField );
    936910  }
     
    11141088      if (m_pchReconFileList[layerId])
    11151089      {
     1090#if H_MV_ALIGN_HM_15
     1091        m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_isTopFieldFirst );
     1092#else
    11161093        m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confLeft, m_confRight, m_confTop, m_confBottom, m_isTopFieldFirst );
     1094#endif
    11171095      }
    11181096    }
     
    11311109      if (m_pchReconFile)
    11321110      {
    1133         m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confLeft, m_confRight, m_confTop, m_confBottom, m_isTopFieldFirst );
     1111        m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_isTopFieldFirst );
    11341112      }
    11351113
     
    11671145      if (m_pchReconFileList[layerId])
    11681146      {
     1147#if H_MV_ALIGN_HM_15
     1148        m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRec, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom );
     1149#else
    11691150        m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom );
     1151#endif
    11701152      }   
    11711153    }
     
    11831165      if (m_pchReconFile)
    11841166      {
    1185         m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom );
     1167        m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom );
    11861168      }
    11871169
     
    13961378  // Max sub layers, + presence flag
    13971379  Bool subLayersMaxMinus1PresentFlag = false;
    1398 #if !H_MV_FIX_SUB_LAYERS_MAX_MINUS1
    1399   Int  subLayersMaxMinus1 = -1;
    1400 #endif
    14011380  for (Int curLayerIdInVps = 0; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++ )
    14021381  {   
     
    14091388
    14101389    vps.setSubLayersVpsMaxMinus1( curLayerIdInVps, curSubLayersMaxMinus1 );
    1411 #if !H_MV_FIX_SUB_LAYERS_MAX_MINUS1
    1412     if ( subLayersMaxMinus1 == -1 )
    1413     {
    1414       subLayersMaxMinus1 = curSubLayersMaxMinus1;
    1415     }
    1416     else
    1417     {
    1418       subLayersMaxMinus1PresentFlag = subLayersMaxMinus1PresentFlag || ( curSubLayersMaxMinus1 != subLayersMaxMinus1 );
    1419     }
    1420 #else
    14211390    subLayersMaxMinus1PresentFlag = subLayersMaxMinus1PresentFlag || ( curSubLayersMaxMinus1 != vps.getMaxSubLayersMinus1() );
    1422 #endif
    14231391  }
    14241392
     
    14331401    {
    14341402      Int maxTid = -1;
    1435 #if H_MV_FIX_LOOP_GOPSIZE
    14361403      for( Int i = 0; i < ( getGOPSize() + 1); i++ )
    14371404      {       
    14381405        GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
    14391406        GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
    1440 #else
    1441       for( Int i = 0; i < getGOPSize(); i++ )
    1442       {       
    1443         GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][i];
    1444         GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][i];     
    1445 #endif
    14461407        for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++)
    14471408        {       
    14481409          if ( m_directRefLayers[ curLayerIdInVps ][ geCur.m_interLayerPredLayerIdc[ j ]] == refLayerIdInVps )
    14491410          {
    1450 #if H_MV_FIX_LOOP_GOPSIZE
    14511411            Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 );
    14521412            Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
    14531413            maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId );
    1454 #else
    1455             maxTid = std::max( maxTid, geRef.m_temporalId );
    1456 #endif
    14571414          }
    14581415        }
     
    15801537Void TAppEncTop::xSetProfileTierLevel( TComVPS& vps )
    15811538{
    1582 #if H_MV_HLS10_PTL
    15831539
    15841540  // SET PTL
     
    15981554      m_nonPackedConstraintFlag, m_frameOnlyConstraintFlag,  m_inblFlag[ptlIdx] );     
    15991555  } 
    1600 #else
    1601   const Int vpsNumProfileTierLevelMinus1 = 0; //TBD
    1602   vps.setVpsNumProfileTierLevelMinus1( vpsNumProfileTierLevelMinus1 );
    1603  
    1604   for (Int i = 0; i <= vps.getVpsNumProfileTierLevelMinus1(); i++ )
    1605   {
    1606     vps.setVpsProfilePresentFlag( i, true );
    1607   }
    1608 #endif
    1609 }
    1610 
    1611 #if H_MV_HLS10_PTL
     1556}
     1557
    16121558Void TAppEncTop::xSetProfileTierLevel(TComVPS& vps, Int profileTierLevelIdx, Int subLayer, Profile::Name profile, Level::Name level, Level::Tier tier, Bool progressiveSourceFlag, Bool interlacedSourceFlag, Bool nonPackedConstraintFlag, Bool frameOnlyConstraintFlag, Bool inbldFlag)
    16131559{
     
    16311577  ptl->setLevelIdc  ( level   );
    16321578  ptl->setProfileCompatibilityFlag( profile, true );
    1633 #if H_MV_HLS10_PTL_INBL_FIX
    16341579  ptl->setInbldFlag( inbldFlag );
    1635 #endif
    16361580
    16371581  switch ( profile )
     
    16591603  }
    16601604}
    1661 #endif
    16621605
    16631606Void TAppEncTop::xSetRepFormat( TComVPS& vps )
     
    16771620  //repFormat->setSeparateColourPlaneVpsFlag( );
    16781621
    1679 #if H_MV_HLS10_GEN_VSP_CONF_WIN
    16801622  repFormat->setConformanceWindowVpsFlag( true );
     1623#if H_MV_ALIGN_HM_15
     1624  repFormat->setConfWinVpsLeftOffset    ( m_confWinLeft   / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );
     1625  repFormat->setConfWinVpsRightOffset   ( m_confWinRight  / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() )  );
     1626  repFormat->setConfWinVpsTopOffset     ( m_confWinTop    / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() )  );
     1627  repFormat->setConfWinVpsBottomOffset  ( m_confWinBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );
     1628#else
    16811629  repFormat->setConfWinVpsLeftOffset    ( m_confLeft   / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );
    16821630  repFormat->setConfWinVpsRightOffset   ( m_confRight  / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() )  );
     
    16841632  repFormat->setConfWinVpsBottomOffset  ( m_confBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );
    16851633#endif
    1686 
    16871634  assert( vps.getRepFormat( 0 ) == NULL );
    16881635  vps.setRepFormat( 0 , repFormat );
     
    17001647  { 
    17011648    Int currLsIdx = vps.olsIdxToLsIdx( i );
    1702 #if !H_MV_HLS10_ADD_LAYERSETS
    1703     std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
    1704 #endif
    17051649    Bool subLayerFlagInfoPresentFlag = false;
    17061650
     
    17081652    {   
    17091653      Bool subLayerDpbInfoPresentFlag = false;
    1710 #if !H_MV_HLS10_ADD_LAYERSETS
    1711       assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() );
    1712 #endif
    17131654      for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ )   
    17141655      {
    1715 #if H_MV_HLS10_DBP_SIZE
    17161656        Int layerIdInVps = vps.getLayerIdInVps( vps.getLayerSetLayerIdList( currLsIdx, k ) );
    17171657        if ( vps.getNecessaryLayerFlag( i,k ) && ( vps.getVpsBaseLayerInternalFlag() || vps.getLayerSetLayerIdList( currLsIdx, k ) != 0 ) )
     
    17301670          }
    17311671        }
    1732 #else
    1733         Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
    1734         dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 );
    1735 
    1736         if ( j > 0 )
    1737         {
    1738           subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) != dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) );
    1739         }
    1740 #endif
    17411672      }       
    17421673
    17431674      Int maxNumReorderPics = MIN_INT;
    1744 #if H_MV_HLS10_DBP_SIZE
    17451675      for ( Int idx = 0; idx < vps.getNumLayersInIdList( currLsIdx ); idx++ )
    17461676      {
     
    17511681        }
    17521682      }
    1753 #else
    1754       for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ )
    1755       {
    1756         Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] );
    1757         maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] );
    1758       }
    1759 #endif
    17601683      assert( maxNumReorderPics != MIN_INT );
    17611684
     
    18041727  // Additional output layer sets + profileLevelTierIdx
    18051728  vps.setDefaultOutputLayerIdc      ( m_defaultOutputLayerIdc );   
    1806 #if H_MV_HLS10_ADD_LAYERSETS
    18071729  if( vps.getNumIndependentLayers() == 0 && m_numAddLayerSets > 0  )
    18081730  {
     
    18381760    }       
    18391761  } 
    1840 #else
    1841   vps.setNumAddLayerSets            ( 0                             ); 
    1842 #endif
    18431762  vps.setNumAddOlss                 ( numAddOuputLayerSets          );
    18441763  vps.initTargetLayerIdLists();
    18451764
    1846 #if H_MV_HLS10_ADD_LAYERSETS
    18471765  for (Int olsIdx = 0; olsIdx < vps.getNumLayerSets() + numAddOuputLayerSets; olsIdx++)
    18481766  {
    18491767    Int addOutLsIdx = olsIdx - vps.getNumLayerSets();     
    1850 #else
    1851   for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++)
    1852   {
    1853     Int addOutLsIdx = olsIdx - m_vpsNumLayerSets;     
    1854 #endif   
    18551768    vps.setLayerSetIdxForOlsMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ?  olsIdx  : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 );
    18561769
    1857 #if H_MV_HLS10_ADD_LAYERSETS
    18581770    Int lsIdx = vps.olsIdxToLsIdx( olsIdx );
    1859 #else
    1860     std::vector<Int>& layerIdList    = m_layerIdsInSets[ vps.olsIdxToLsIdx( olsIdx ) ];
    1861 #endif
    18621771    if (vps.getDefaultOutputLayerIdc() == 2 || addOutLsIdx >= 0 )
    18631772    {
    1864 #if H_MV_HLS10_ADD_LAYERSETS
    18651773      for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++)
    1866 #else
    1867       for ( Int i = 0; i < layerIdList.size(); i++)
    1868 #endif
    18691774      {
    18701775        vps.setOutputLayerFlag( olsIdx, i, ( olsIdx == 0 && i == 0 ) ? vps.inferOutputLayerFlag(olsIdx, i ) : false ); // This is a software only fix for a bug in the spec. In spec outputLayerFlag neither present nor inferred for this case !
     
    18761781      for (Int j = 0; j < outLayerIdList.size(); j++)
    18771782      {   
    1878 #if H_MV_HLS10_ADD_LAYERSETS
    18791783        for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++)
    18801784        {
    18811785          if ( vps.getLayerSetLayerIdList( lsIdx, i ) == outLayerIdList[ j ] )
    1882 #else
    1883         for (Int i = 0; i < layerIdList.size(); i++ )
    1884         {
    1885           if ( layerIdList[ i ] == outLayerIdList[ j ] )
    1886 #endif
    18871786          {
    18881787            vps.setOutputLayerFlag( olsIdx, i, true );       
     
    18911790          }
    18921791        }
    1893 #if H_MV_HLS10_ADD_LAYERSETS
    18941792        if ( !outputLayerInLayerSetFlag )
    18951793        {
     
    18971795          exit(EXIT_FAILURE);
    18981796        }
    1899 #else
    1900         assert( outputLayerInLayerSetFlag ); // The output layer is not in the layer set.
    1901 #endif
    19021797      }
    19031798    }
    19041799    else
    19051800    {
    1906 #if H_MV_HLS10_ADD_LAYERSETS
    19071801      for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++)
    1908 #else
    1909       for ( Int i = 0; i < layerIdList.size(); i++)
    1910 #endif
    19111802      {
    19121803        vps.setOutputLayerFlag( olsIdx, i, vps.inferOutputLayerFlag( olsIdx, i ) );       
     
    19141805    }
    19151806
    1916 #if H_MV_HLS10_NESSECARY_LAYER
    19171807    vps.deriveNecessaryLayerFlags( olsIdx );
    1918 #endif
    19191808    vps.deriveTargetLayerIdList(  olsIdx );
    19201809
    1921 #if H_MV_HLS10_PTL
    19221810    // SET profile_tier_level_index.
    19231811    if ( olsIdx == 0 )
     
    19361824        {
    19371825          vps.setProfileTierLevelIdx(olsIdx, j, m_profileTierLevelIdx[olsIdx][j] );
    1938 #if H_MV_HLS10_PTL_FIX
    19391826          if( !vps.getNecessaryLayerFlag(olsIdx,j) && m_profileTierLevelIdx[ olsIdx ][ j ] != -1 )
    19401827          {
     
    19431830        }
    19441831        else if ( vps.getNecessaryLayerFlag(olsIdx,j) )
    1945 #else
    1946         }
    1947         else
    1948 #endif
    19491832        {
    19501833          // setting default values
     
    19621845      }
    19631846    }
    1964 #else
    1965     if ( olsIdx > 0 )
    1966     {
    1967       vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] );
    1968     }
    1969 #endif
    19701847   
    19711848    if ( vps.getNumOutputLayersInOutputLayerSet( olsIdx ) == 1 &&
     
    20051882    if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    20061883    {
    2007 #if H_MV_HLS10_VPS_VUI
    20081884      for( Int i = 0; i  <  vps.getNumLayerSets(); i++ )
    2009 #else
    2010       for( Int i = 0; i  <=  vps.getVpsNumLayerSetsMinus1(); i++ )
    2011 #endif
    20121885      {
    20131886        for( Int j = 0; j  <=  vps.getMaxTLayers(); j++ )
     
    20581931        for( Int j = 0; j < vps.getNumDirectRefLayers( vps.getLayerIdInNuh( i ) ) ; j++ )
    20591932        { 
    2060 #if H_MV_HLS10_REF_PRED_LAYERS
    20611933          Int layerIdx = vps.getLayerIdInVps( vps.getIdDirectRefLayer(vps.getLayerIdInNuh( i ) , j  )); 
    2062 #else
    2063           Int layerIdx = vps.getLayerIdInVps( vps.getRefLayerId(vps.getLayerIdInNuh( i ) , j  )); 
    2064 #endif
    20651934          if( pcVPSVUI->getTilesInUseFlag( i )  &&  pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 
    20661935          {
     
    20811950    }
    20821951
    2083 #if H_MV_HLS10_VPS_VUI
    20841952  pcVPSVUI->setSingleLayerForNonIrapFlag( m_singleLayerForNonIrapFlag );
    20851953  pcVPSVUI->setHigherLayerIrapSkipFlag( m_higherLayerIrapSkipFlag );
    2086 #endif
    20871954
    20881955    pcVPSVUI->setIlpRestrictedRefLayersFlag( m_ilpRestrictedRefLayersFlag );
     
    21412008  }
    21422009}
    2143 #if H_MV_HLS10_GEN_FIX
    21442010Bool TAppEncTop::xLayerIdInTargetEncLayerIdList(Int nuhLayerId)
    21452011{
    21462012  return  ( std::find(m_targetEncLayerIdList.begin(), m_targetEncLayerIdList.end(), nuhLayerId) != m_targetEncLayerIdList.end()) ;
    21472013}
    2148 #endif
    21492014
    21502015
     
    21592024    Bool isDepth      = ( vps.getDepthId( layer ) == 1 ) ;
    21602025    Bool isLayerZero  = ( layer == 0 );
    2161 #if LGE_FCO_I0116
     2026#if H_3D_FCO
    21622027    Bool isDepthFirst = (layer > 1 ? true : false);
    21632028#endif
     
    21712036    {
    21722037      vps.setSubPULog2Size         ( layer, (layer != 1) ? 6: 0 );
    2173 #if MTK_I0099_VPS_EX2
    21742038      vps.setSubPUMPILog2Size      ( layer, (!isLayerZero) ? m_iSubPUMPILog2Size: 0 );
    2175 #endif
    21762039    }
    21772040    else
     
    21832046#if H_3D_DIM
    21842047    vps.setVpsDepthModesFlag( layer, isDepth && !isLayerZero && (m_useDMM || m_useSDC || m_useDLT ) );
    2185 #if SEPARATE_FLAG_I0085
    2186 #if LGE_FCO_I0116
     2048#if H_3D_FCO
    21872049    vps.setIVPFlag          ( layer, isDepth && !isLayerZero && m_useIVP && !isDepthFirst );
    21882050#else
    21892051    vps.setIVPFlag          ( layer, isDepth && !isLayerZero && m_useIVP );
    2190 #endif
    21912052#endif
    21922053#endif
     
    21962057    {
    21972058      vps.setIvMvPredFlag    (layer, false);
    2198 #if SEC_HLS_CLEANUP_I0100
    21992059      vps.setIvMvScalingFlag (layer, false);
    2200 #endif
    22012060    }
    22022061    else
     
    22102069        vps.setIvMvPredFlag         ( layer, !isLayerZero && m_ivMvPredFlag[0] );
    22112070      }
    2212 #if SEC_HLS_CLEANUP_I0100
    22132071      vps.setIvMvScalingFlag (layer, m_ivMvScalingFlag);
    2214 #endif
    2215     }
    2216 #endif
    2217 #if MTK_I0099_VPS_EX2
    2218 #if LGE_FCO_I0116
     2072    }
     2073#endif
     2074#if H_3D_QTLPC
     2075#if H_3D_FCO
    22192076    vps.setLimQtPredFlag         ( layer, isDepth && m_bLimQtPredFlag && !isDepthFirst );
    22202077#else
     
    22352092#endif
    22362093#if H_3D_IV_MERGE
    2237 #if LGE_FCO_I0116
     2094#if H_3D_FCO
    22382095    vps.setMPIFlag( layer, !isLayerZero && isDepth && m_bMPIFlag && !isDepthFirst );
    22392096#else
     
    22422099#endif
    22432100  } 
    2244 #if !MTK_I0099_VPS_EX2
    2245 #if H_3D_SPIVMP
    2246   vps.setSubPUMPILog2Size( m_iSubPUMPILog2Size );
    2247 #endif
    2248 #endif
    2249 #if H_3D
    2250 #if !SEC_HLS_CLEANUP_I0100
    2251   vps.setIvMvScalingFlag( m_ivMvScalingFlag );   
    2252 #endif
    2253 #endif
    22542101}
    22552102
     
    22732120      xAnalyzeInputBaseDepth(layer, max(m_iIntraPeriod[layer], 24), &vps, &dlt);
    22742121      bDltPresentFlag = bDltPresentFlag || dlt.getUseDLTFlag(layer);
    2275 #if H_3D_DELTA_DLT
    22762122      dlt.setInterViewDltPredEnableFlag(layer, (dlt.getUseDLTFlag(layer) && (layer>1)));
    2277 #endif
    22782123    }
    22792124  }
  • trunk/source/App/TAppEncoder/TAppEncTop.h

    r1066 r1084  
    133133  Void xSetProfileTierLevel       ( TComVPS& vps );
    134134
    135 #if H_MV_HLS10_PTL
    136135  Void xSetProfileTierLevel( TComVPS& vps, Int profileTierLevelIdx, Int subLayer,                             
    137136                             Profile::Name profile, Level::Name level, Level::Tier tier,
     
    139138                             Bool nonPackedConstraintFlag, Bool frameOnlyConstraintFlag,
    140139                             Bool inbldFlag );
    141 #endif
    142140  Void xSetRepFormat              ( TComVPS& vps );
    143141  Void xSetDpbSize                ( TComVPS& vps );
     
    145143  GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc );
    146144  Int  xGetMax( std::vector<Int>& vec);
    147 #if H_MV_HLS10_GEN_FIX
    148145  Bool xLayerIdInTargetEncLayerIdList( Int nuhLayerId );
    149 #endif
    150146#endif
    151147#if H_3D
  • trunk/source/Lib/TAppCommon/program_options_lite.h

    r1039 r1084  
    378378        std::string cDescBuffer;
    379379
    380 #if !FIX_TICKET_62
    381         cNameBuffer       .resize( name.size() + 10 );
    382         cDescBuffer.resize( desc.size() + 10 );
    383 #endif
    384 
    385380        storage.resize(uiMaxNum);
    386381        for ( unsigned int uiK = 0; uiK < uiMaxNum; uiK++ )
    387382        {
    388 
    389 #if FIX_TICKET_62
    390383          cNameBuffer       .resize( name.size() + 10 );
    391384          cDescBuffer.resize( desc.size() + 10 );
    392 #endif
    393385
    394386          Bool duplicate = (uiK != 0);
  • trunk/source/Lib/TLibCommon/CommonDef.h

    r1067 r1084  
    6161#if H_MV
    6262#define NV_VERSION        "12.1"                ///< Current software version
    63 #define HM_VERSION        "14.0"                ///<
     63#define HM_VERSION        "15.0"                ///<
    6464#else
    6565#define NV_VERSION        "14.0"                 ///< Current software version
  • trunk/source/Lib/TLibCommon/ContextTables.h

    r1039 r1084  
    5151#define NUM_SPLIT_FLAG_CTX            3       ///< number of context models for split flag
    5252#define NUM_SKIP_FLAG_CTX             3       ///< number of context models for skip flag
    53 #if MTK_SINGLE_DEPTH_MODE_I0095
     53#if H_3D_SINGLE_DEPTH
    5454#define NUM_SINGLEDEPTH_FLAG_CTX                     1
    5555#define NUM_SINGLE_DEPTH_VALUE_DATA_CTX              1       
     
    153153  { CNU,  CNU,  CNU, },
    154154};
    155 #if MTK_SINGLE_DEPTH_MODE_I0095
     155#if H_3D_SINGLE_DEPTH
    156156static const UChar
    157157INIT_SINGLEDEPTH_FLAG[3][NUM_SINGLEDEPTH_FLAG_CTX] = 
     
    450450static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] =
    451451{
    452 #if SEC_DBBP_EXPLICIT_SIG_I0077
    453   { CNU },
    454   { CNU },
    455   { CNU },
    456 #else
    457   { 161 },
    458   { 161 },
    459   { 161 },
    460 #endif
    461 };
    462 #endif
    463 
    464 #endif
     452  { CNU },
     453  { CNU },
     454  { CNU },
     455};
     456#endif
     457
     458#endif
  • trunk/source/Lib/TLibCommon/SEI.h

    r964 r1084  
    161161  UInt m_bpSeqParameterSetId;
    162162  Bool m_rapCpbParamsPresentFlag;
    163   Bool m_cpbDelayOffset;
    164   Bool m_dpbDelayOffset;
     163  UInt m_cpbDelayOffset;
     164  UInt m_dpbDelayOffset;
    165165  UInt m_initialCpbRemovalDelay         [MAX_CPB_CNT][2];
    166166  UInt m_initialCpbRemovalDelayOffset   [MAX_CPB_CNT][2];
  • trunk/source/Lib/TLibCommon/TComDataCU.cpp

    r1066 r1084  
    6060 
    6161  m_skipFlag           = NULL;
    62 #if MTK_SINGLE_DEPTH_MODE_I0095
     62#if H_3D_SINGLE_DEPTH
    6363  m_singleDepthFlag     = NULL;
    6464  m_apSingleDepthValue  = NULL;
     
    185185
    186186    m_skipFlag           = new Bool[ uiNumPartition ];
    187 #if MTK_SINGLE_DEPTH_MODE_I0095
     187#if H_3D_SINGLE_DEPTH
    188188    m_singleDepthFlag     = new Bool[ uiNumPartition ];
    189189    m_apSingleDepthValue  = (Pel*)xMalloc(Pel, uiNumPartition);
     
    335335
    336336    if ( m_skipFlag           ) { delete[] m_skipFlag;          m_skipFlag          = NULL; }
    337 #if MTK_SINGLE_DEPTH_MODE_I0095
     337#if H_3D_SINGLE_DEPTH
    338338    if ( m_singleDepthFlag    ) { delete[] m_singleDepthFlag;   m_singleDepthFlag     = NULL; }
    339339    if ( m_apSingleDepthValue ) { xFree(m_apSingleDepthValue);  m_apSingleDepthValue  = NULL; }
     
    503503    TComDataCU * pcFrom = pcPic->getCU(getAddr());
    504504    m_skipFlag[ui]   = pcFrom->getSkipFlag(ui);
    505 #if MTK_SINGLE_DEPTH_MODE_I0095
     505#if H_3D_SINGLE_DEPTH
    506506    m_singleDepthFlag[ui]    = pcFrom->getSingleDepthFlag(ui);
    507507    m_apSingleDepthValue[ui] = pcFrom->getSingleDepthValue(ui);
     
    563563  {
    564564    memset( m_skipFlag          + firstElement, false,                    numElements * sizeof( *m_skipFlag ) );
    565 #if MTK_SINGLE_DEPTH_MODE_I0095
     565#if H_3D_SINGLE_DEPTH
    566566    memset( m_singleDepthFlag     + firstElement, false,                  numElements * sizeof( *m_singleDepthFlag ) );
    567567    memset( m_apSingleDepthValue  + firstElement,     0,                  numElements * sizeof( *m_apSingleDepthValue ) );
     
    754754      m_puhTransformSkip[2][ui] = 0;
    755755      m_skipFlag[ui]   = false;
    756 #if MTK_SINGLE_DEPTH_MODE_I0095
     756#if H_3D_SINGLE_DEPTH
    757757      m_singleDepthFlag[ui]     = false;
    758758      m_apSingleDepthValue[ui]  = 0;
     
    933933  {
    934934    m_skipFlag[ui]   = false;
    935 #if MTK_SINGLE_DEPTH_MODE_I0095
     935#if H_3D_SINGLE_DEPTH
    936936    m_singleDepthFlag[ui]   = false;
    937937    m_apSingleDepthValue[ui]= 0;
     
    958958      m_puhTransformSkip[2][ui] = pcCU->getTransformSkip(uiPartOffset+ui,TEXT_CHROMA_V);
    959959      m_skipFlag[ui]   = pcCU->getSkipFlag(uiPartOffset+ui);
    960 #if MTK_SINGLE_DEPTH_MODE_I0095
     960#if H_3D_SINGLE_DEPTH
    961961      m_singleDepthFlag[ui]    = pcCU->getSingleDepthFlag(uiPartOffset+ui);
    962962      m_apSingleDepthValue[ui] = pcCU->getSingleDepthValue(uiPartOffset+ui);
     
    11111111 
    11121112  m_skipFlag=pcCU->getSkipFlag()          + uiPart;
    1113 #if MTK_SINGLE_DEPTH_MODE_I0095
     1113#if H_3D_SINGLE_DEPTH
    11141114  m_singleDepthFlag     = pcCU->getSingleDepthFlag()   + uiPart;
    11151115  m_apSingleDepthValue  = pcCU->getSingleDepthValue()  + uiPart;
     
    12521252 
    12531253  m_skipFlag           = pcCU->getSkipFlag ()             + uiAbsPartIdx;
    1254 #if MTK_SINGLE_DEPTH_MODE_I0095
     1254#if H_3D_SINGLE_DEPTH
    12551255  m_singleDepthFlag     = pcCU->getSingleDepthFlag ()             + uiAbsPartIdx;
    12561256  m_apSingleDepthValue  = pcCU->getSingleDepthValue ()            + uiAbsPartIdx;
     
    13311331  Int sizeInChar  = sizeof( Char ) * uiNumPartition;
    13321332  memcpy( m_skipFlag   + uiOffset, pcCU->getSkipFlag(),       sizeof( *m_skipFlag )   * uiNumPartition );
    1333 #if MTK_SINGLE_DEPTH_MODE_I0095
     1333#if H_3D_SINGLE_DEPTH
    13341334  memcpy( m_singleDepthFlag     + uiOffset, pcCU->getSingleDepthFlag(),       sizeof( *m_singleDepthFlag )   * uiNumPartition );
    13351335  memcpy( m_apSingleDepthValue  + uiOffset, pcCU->getSingleDepthValue(),      sizeof( *m_apSingleDepthValue ) * uiNumPartition);
     
    14551455
    14561456  memcpy( rpcCU->getSkipFlag() + m_uiAbsIdxInLCU, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition );
    1457 #if MTK_SINGLE_DEPTH_MODE_I0095
     1457#if H_3D_SINGLE_DEPTH
    14581458  memcpy( rpcCU->getSingleDepthFlag()  + m_uiAbsIdxInLCU, m_singleDepthFlag,    sizeof( *m_singleDepthFlag ) * m_uiNumPartition );
    14591459  memcpy( rpcCU->getSingleDepthValue() + m_uiAbsIdxInLCU, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * m_uiNumPartition);
     
    15741574  Int sizeInChar  = sizeof( Char ) * uiQNumPart;
    15751575  memcpy( rpcCU->getSkipFlag()       + uiPartOffset, m_skipFlag,   sizeof( *m_skipFlag )   * uiQNumPart );
    1576 #if MTK_SINGLE_DEPTH_MODE_I0095
     1576#if H_3D_SINGLE_DEPTH
    15771577  memcpy( rpcCU->getSingleDepthFlag()  + uiPartOffset, m_singleDepthFlag,    sizeof( *m_singleDepthFlag )   * uiQNumPart );
    15781578  memcpy( rpcCU->getSingleDepthValue() + uiPartOffset, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * uiQNumPart);
     
    24972497  memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) );
    24982498}
    2499 #if MTK_SINGLE_DEPTH_MODE_I0095
     2499#if H_3D_SINGLE_DEPTH
    25002500Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth )
    25012501{
     
    26772677  }
    26782678
    2679 #if HS_DMM_SIGNALLING_I0120
    26802679  if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) )
    2681 #else
    2682   if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) && !isDimDeltaDC( getLumaIntraDir( uiAbsPartIdx ) ) )
    2683 #endif
    26842680  {
    26852681    return true;
     
    26942690  // check prediction mode
    26952691  UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); 
    2696 #if HS_DMM_SIGNALLING_I0120
    26972692  if( uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX  ) )
    2698 #else
    2699   if( uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) )
    2700 #endif
    27012693    return true;
    27022694 
     
    33733365  for(Int iLoop = 0; iLoop < 2; iLoop ++ )
    33743366  {
    3375 #if !SEC_SIMP_SHIFTED_DV_I0086
    3376     // IvDcShift (Derived from spatial Iv neighboring blocks)
    3377     if( iLoop == 1 )
    3378     {
    3379       Int iFirDispCand = -1;
    3380       TComMvField mvIvDcShift[2];
    3381       UChar dirIvDcShift;
    3382 
    3383       if (xGetPosFirstAvailDmvCand(MRG_IVSHIFT, iFirDispCand))
    3384       {
    3385         TComMv cMv;
    3386         cMv = m_mergCands[iFirDispCand].m_cMvField[0].getMv();
    3387         cMv.setHor(cMv.getHor()+4);
    3388         if(m_pcSlice->getVPS()->getViewSynthesisPredFlag(m_pcSlice->getLayerIdInVps()))
    3389         {
    3390           cMv.setVer(0);
    3391         }
    3392 #if !(NTT_BUG_FIX_TK54)
    3393         clipMv( cMv );
    3394 #endif
    3395 
    3396         dirIvDcShift = m_mergCands[iFirDispCand].m_uDir;
    3397         mvIvDcShift[0].setMvField(cMv, m_mergCands[iFirDispCand].m_cMvField[0].getRefIdx() );
    3398         mvIvDcShift[1].setMvField(m_mergCands[iFirDispCand].m_cMvField[1].getMv(), m_mergCands[iFirDispCand].m_cMvField[1].getRefIdx() );
    3399         m_mergCands[MRG_IVSHIFT].setCand(mvIvDcShift, dirIvDcShift, false, false);
    3400        
    3401         if( mrgCandIdx == iCount )
    3402         {
    3403           return true;
    3404         }
    3405         iCount++;
    3406         break;
    3407       }
    3408     }
    3409 #endif
    3410 
    34113367    /// iLoop = 0 --> IvMCShift
    34123368    /// iLoop = 1 --> IvDCShift  (Derived from IvDC)
     
    34553411}
    34563412
    3457 #if !SEC_SIMP_SHIFTED_DV_I0086
    3458 inline Bool TComDataCU::xGetPosFirstAvailDmvCand(Int iCount, Int& posFirstAvailDmvCand )
    3459 {
    3460   for ( Int currListPos = 0; currListPos < iCount; currListPos++ )
    3461   {
    3462     if ( !m_mergCands[currListPos].m_bAvailable || ( currListPos == MRG_IVMC ) || ( currListPos == MRG_IVDC ) || ( m_mergCands[currListPos].m_iVspFlag != 0 ))
    3463     {
    3464       continue;
    3465     }
    3466     else if((m_mergCands[currListPos].m_bAvailable) && (m_mergCands[currListPos].m_cMvField[0].getRefIdx() != -1 ) && (getSlice()->getViewIndex() != getSlice()->getRefPic(RefPicList(0), m_mergCands[currListPos].m_cMvField[0].getRefIdx())->getViewIndex()))
    3467     {
    3468       posFirstAvailDmvCand = currListPos;
    3469       return true;
    3470     }
    3471   }
    3472   return false; 
    3473 }
    3474 #endif
    3475                                      
    34763413#endif
    34773414
     
    39213858Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
    39223859#endif
    3923 #if H_3D_VSP && !FIX_TICKET_79
    3924       , InheritedVSPDisInfo*  inheritedVSPDisInfo
    3925 #endif
    39263860#if H_3D_SPIVMP
    39273861      , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
     
    39513885  //////////////////////////////////
    39523886  DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
    3953 #if !FIX_TICKET_79
    3954   for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++)
    3955   {
    3956     inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo;   // To prevent run-time error, this code must be executed always for merging process.
    3957   }
    3958 #endif
    39593887  m_cDefaultDisInfo = cDisInfo;
    39603888
     
    41774105    TComPic * pcTexPic = m_pcSlice->getTexturePic();
    41784106#if H_3D_FCO
    4179 #if LGE_FCO_I0116
     4107#if H_3D_FCO
    41804108    if (pcTexPic && pcTexPic->getReconMark())
    41814109#else
     
    42514179                TComMv cMv = cDefaultMvField.getMv() + cMvRounding;
    42524180                cMv >>= 2;
    4253 #if !FIX_TICKET_68
    4254                 clipMv( cMv );
    4255 #endif
    42564181                cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ;
    42574182                break;
     
    53255250#endif
    53265251
    5327 #if !FIX_TICKET_76
    5328 #if H_3D_VSP
    5329 inline Void TComDataCU::xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount, InheritedVSPDisInfo*  inheritedVSPDisInfo)
    5330 {
    5331   inheritedVSPDisInfo[iCount].m_acDvInfo.m_acNBDV   = pcCURef->getDvInfo(uiAbsPartIdx).m_acNBDV;
    5332   inheritedVSPDisInfo[iCount].m_acDvInfo.m_aVIdxCan = pcCURef->getDvInfo(uiAbsPartIdx).m_aVIdxCan;
    5333 }
    5334 #endif
    5335 #endif
    53365252/** Check whether the current PU and a spatial neighboring PU are in a same ME region.
    53375253 * \param xN, xN   location of the upper-left corner pixel of a neighboring PU
     
    59765892    Int iColRefViewId  = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewIndex();
    59775893    iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId );
    5978 #if SEC_HLS_CLEANUP_I0100
     5894
    59795895    if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag(getSlice()->getLayerIdInVps()) )
    5980 #else
    5981     if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag() )
    5982 #endif
    59835896    {
    59845897      rcMv = cColMv.scaleMv( iScale );
     
    61646077  TComMv cMv;
    61656078#if MTK_I0093
    6166 #if H_3D_FIX_64BIT_SHIFT
    61676079  Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ];
    6168 #else
    6169   Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[  1 << ( getSlice()->getSPS()->getBitDepthY() - 1 ) ];
    6170 #endif
    61716080#else
    61726081  Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ 128 ];
     
    61816090#endif
    61826091
    6183 #if MTK_SINGLE_DEPTH_MODE_I0095
     6092#if H_3D_SINGLE_DEPTH
    61846093Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index)
    61856094{
     
    67956704  if( getSlice()->getIsDepth() )
    67966705  {
    6797 #if MTK_I0099_VPS_EX2
    67986706    iSubPUSize = 1<<getSlice()->getVPS()->getSubPUMPILog2Size(getSlice()->getLayerId());
    6799 #else
    6800     iSubPUSize = 1 << getSlice()->getVPS()->getSubPUMPILog2Size();
    6801 #endif
    68026707  }
    68036708
  • trunk/source/Lib/TLibCommon/TComDataCU.h

    r1039 r1084  
    110110  // -------------------------------------------------------------------------------------------------------------------
    111111  Bool*         m_skipFlag;           ///< array of skip flags
    112 #if MTK_SINGLE_DEPTH_MODE_I0095
     112#if H_3D_SINGLE_DEPTH
    113113  Bool*         m_singleDepthFlag;           ///< array of single depth flags
    114114  Pel*          m_apSingleDepthValue;
     
    250250#if H_3D_IV_MERGE
    251251  Bool          xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int*   ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx );
    252 #if! SEC_SIMP_SHIFTED_DV_I0086
    253   Bool          xGetPosFirstAvailDmvCand( Int iCount, Int& iFirDispCand );
    254 #endif
    255252#endif
    256253
     
    353350  Void         setSkipFlag           ( UInt idx, Bool skip)     { m_skipFlag[idx] = skip;   }
    354351  Void         setSkipFlagSubParts   ( Bool skip, UInt absPartIdx, UInt depth );
    355 #if MTK_SINGLE_DEPTH_MODE_I0095
     352#if H_3D_SINGLE_DEPTH
    356353  Bool*        getSingleDepthFlag            ()                        { return m_singleDepthFlag;          }
    357354  Bool         getSingleDepthFlag            (UInt idx)                { return m_singleDepthFlag[idx];     }
     
    505502  Bool          getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm );
    506503#endif
    507 #if MTK_SINGLE_DEPTH_MODE_I0095
     504#if H_3D_SINGLE_DEPTH
    508505   Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
    509506#endif
     
    670667  Void          getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
    671668#endif
    672 #if H_3D_VSP && !FIX_TICKET_79
    673                                             , InheritedVSPDisInfo*  inheritedVSPDisInfo
    674 #endif
    675669#if H_3D_SPIVMP
    676670                                            , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
     
    680674
    681675#if H_3D_VSP
    682 #if !FIX_TICKET_76
    683   inline Void   xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount,  InheritedVSPDisInfo*  inheritedVSPDisInfo);
    684 #endif
    685 
    686676#if H_3D_SPIVMP
    687677  Bool*         getSPIVMPFlag        ()                        { return m_pbSPIVMPFlag;          }
     
    771761#endif
    772762
    773 #if SHARP_DMM1_I0110
     763#if H_3D_DIM
    774764  Bool         isDMM1UpscaleMode       ( UInt uiWidth ){ Bool bDMM1UpsampleModeFlag = true; UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ bDMM1UpsampleModeFlag = false; } return bDMM1UpsampleModeFlag; };
    775765  UInt         getDMM1BasePatternWidth ( UInt uiWidth ){ UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ uiBaseWidth =  uiWidth; } return uiBaseWidth; }
  • trunk/source/Lib/TLibCommon/TComMotionInfo.h

    r1039 r1084  
    7979} IDVInfo;
    8080#endif
    81 #if H_3D_VSP && !FIX_TICKET_79
    82 typedef struct _InheritedVSPDisCand
    83 {
    84   DisInfo m_acDvInfo;
    85 } InheritedVSPDisInfo;
    86 #endif
     81
    8782// ====================================================================================================================
    8883// Class definition
  • trunk/source/Lib/TLibCommon/TComPicSym.cpp

    r872 r1084  
    3838#include "TComPicSym.h"
    3939#include "TComSampleAdaptiveOffset.h"
     40#include "TComSlice.h"
    4041
    4142//! \ingroup TLibCommon
     
    6364,m_iNumColumnsMinus1 (0)
    6465,m_iNumRowsMinus1(0)
    65 ,m_apcTComTile(NULL)
    6666,m_puiCUOrderMap(0)
    6767,m_puiTileIdxMap(NULL)
     
    101101    delete [] m_apcTComSlice;
    102102  }
    103   m_apcTComSlice      = new TComSlice*[m_uiNumCUsInFrame*m_uiNumPartitions]; 
     103  m_apcTComSlice      = new TComSlice*[m_uiNumCUsInFrame];
    104104  m_apcTComSlice[0]   = new TComSlice;
    105105  m_uiNumAllocatedSlice = 1;
     
    148148  m_apcTComDataCU = NULL;
    149149
    150   for(Int i = 0; i < (m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1); i++ )
    151   {
    152     delete m_apcTComTile[i];
    153   }
    154   delete [] m_apcTComTile;
    155 
    156   m_apcTComTile = NULL;
    157 
    158150  delete [] m_puiCUOrderMap;
    159151  m_puiCUOrderMap = NULL;
     
    173165Void TComPicSym::allocateNewSlice()
    174166{
     167  assert ((m_uiNumAllocatedSlice + 1) <= m_uiNumCUsInFrame);
    175168  m_apcTComSlice[m_uiNumAllocatedSlice ++] = new TComSlice;
    176169  if (m_uiNumAllocatedSlice>=2)
     
    201194}
    202195
    203 Void TComPicSym::xCreateTComTileArray()
    204 {
    205   m_apcTComTile = new TComTile*[(m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1)];
    206   for( UInt i=0; i<(m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1); i++ )
    207   {
    208     m_apcTComTile[i] = new TComTile;
    209   }
    210 }
    211 
    212 Void TComPicSym::xInitTiles()
    213 {
    214   UInt  uiTileIdx;
    215   UInt  uiColumnIdx = 0;
    216   UInt  uiRowIdx = 0;
    217   UInt  uiRightEdgePosInCU;
    218   UInt  uiBottomEdgePosInCU;
    219   Int   i, j;
     196Void TComPicSym::initTiles(TComPPS *pps)
     197{
     198  //set NumColumnsMinus1 and NumRowsMinus1
     199  setNumColumnsMinus1( pps->getNumTileColumnsMinus1() );
     200  setNumRowsMinus1( pps->getTileNumRowsMinus1() );
     201
     202  const Int numCols = pps->getNumTileColumnsMinus1() + 1;
     203  const Int numRows = pps->getTileNumRowsMinus1() + 1;
     204  const Int numTiles = numRows * numCols;
     205
     206  // allocate memory for tile parameters
     207  m_tileParameters.resize(numTiles);
     208
     209  if( pps->getTileUniformSpacingFlag() )
     210  {
     211    //set width and height for each (uniform) tile
     212    for(Int row=0; row < numRows; row++)
     213    {
     214      for(Int col=0; col < numCols; col++)
     215      {
     216        const Int tileIdx = row * numCols + col;
     217        m_tileParameters[tileIdx].setTileWidth( (col+1)*getFrameWidthInCU()/numCols
     218                                              - (col*getFrameWidthInCU())/numCols );
     219        m_tileParameters[tileIdx].setTileHeight( (row+1)*getFrameHeightInCU()/numRows
     220                                               - (row*getFrameHeightInCU())/numRows );
     221      }
     222    }
     223  }
     224  else
     225  {
     226    //set the width for each tile
     227    for(Int row=0; row < numRows; row++)
     228    {
     229      Int cumulativeTileWidth = 0;
     230      for(Int col=0; col < getNumColumnsMinus1(); col++)
     231  {
     232        m_tileParameters[row * numCols + col].setTileWidth( pps->getTileColumnWidth(col) );
     233        cumulativeTileWidth += pps->getTileColumnWidth(col);
     234  }
     235      m_tileParameters[row * numCols + getNumColumnsMinus1()].setTileWidth( getFrameWidthInCU()-cumulativeTileWidth );
     236}
     237
     238    //set the height for each tile
     239    for(Int col=0; col < numCols; col++)
     240{
     241      Int cumulativeTileHeight = 0;
     242      for(Int row=0; row < getNumRowsMinus1(); row++)
     243      {
     244        m_tileParameters[row * numCols + col].setTileHeight( pps->getTileRowHeight(row) );
     245        cumulativeTileHeight += pps->getTileRowHeight(row);
     246      }
     247      m_tileParameters[getNumRowsMinus1() * numCols + col].setTileHeight( getFrameHeightInCU()-cumulativeTileHeight );
     248    }
     249  }
     250
     251#if TILE_SIZE_CHECK
     252  Int minWidth  = 1;
     253  Int minHeight = 1;
     254  const Int profileIdc = pps->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc();
     255  if (  profileIdc == Profile::MAIN || profileIdc == Profile::MAIN10)
     256  {
     257    if (pps->getTilesEnabledFlag())
     258    {
     259      minHeight = 64  / g_uiMaxCUHeight;
     260      minWidth  = 256 / g_uiMaxCUWidth;
     261    }
     262  }
     263  for(Int row=0; row < numRows; row++)
     264  {
     265    for(Int col=0; col < numCols; col++)
     266    {
     267      const Int tileIdx = row * numCols + col;
     268      assert (m_tileParameters[tileIdx].getTileWidth() >= minWidth);
     269      assert (m_tileParameters[tileIdx].getTileHeight() >= minHeight);
     270    }
     271  }
     272#endif
    220273
    221274  //initialize each tile of the current picture
    222   for( uiRowIdx=0; uiRowIdx < m_iNumRowsMinus1+1; uiRowIdx++ )
    223   {
    224     for( uiColumnIdx=0; uiColumnIdx < m_iNumColumnsMinus1+1; uiColumnIdx++ )
    225     {
    226       uiTileIdx = uiRowIdx * (m_iNumColumnsMinus1+1) + uiColumnIdx;
     275  for( Int row=0; row < numRows; row++ )
     276  {
     277    for( Int col=0; col < numCols; col++ )
     278    {
     279      const Int tileIdx = row * numCols + col;
    227280
    228281      //initialize the RightEdgePosInCU for each tile
    229       uiRightEdgePosInCU = 0;
    230       for( i=0; i <= uiColumnIdx; i++ )
    231       {
    232         uiRightEdgePosInCU += this->getTComTile(uiRowIdx * (m_iNumColumnsMinus1+1) + i)->getTileWidth();
    233       }
    234       this->getTComTile(uiTileIdx)->setRightEdgePosInCU(uiRightEdgePosInCU-1);
     282      Int rightEdgePosInCTU = 0;
     283      for( Int i=0; i <= col; i++ )
     284      {
     285        rightEdgePosInCTU += m_tileParameters[row * numCols + i].getTileWidth();
     286      }
     287      m_tileParameters[tileIdx].setRightEdgePosInCU(rightEdgePosInCTU-1);
    235288
    236289      //initialize the BottomEdgePosInCU for each tile
    237       uiBottomEdgePosInCU = 0;
    238       for( i=0; i <= uiRowIdx; i++ )
    239       {
    240         uiBottomEdgePosInCU += this->getTComTile(i * (m_iNumColumnsMinus1+1) + uiColumnIdx)->getTileHeight();
    241       }
    242       this->getTComTile(uiTileIdx)->setBottomEdgePosInCU(uiBottomEdgePosInCU-1);
     290      Int bottomEdgePosInCTU = 0;
     291      for( Int i=0; i <= row; i++ )
     292      {
     293        bottomEdgePosInCTU += m_tileParameters[i * numCols + col].getTileHeight();
     294      }
     295      m_tileParameters[tileIdx].setBottomEdgePosInCU(bottomEdgePosInCTU-1);
    243296
    244297      //initialize the FirstCUAddr for each tile
    245       this->getTComTile(uiTileIdx)->setFirstCUAddr( (this->getTComTile(uiTileIdx)->getBottomEdgePosInCU() - this->getTComTile(uiTileIdx)->getTileHeight() +1)*m_uiWidthInCU +
    246         this->getTComTile(uiTileIdx)->getRightEdgePosInCU() - this->getTComTile(uiTileIdx)->getTileWidth() + 1);
    247     }
    248   }
     298      m_tileParameters[tileIdx].setFirstCUAddr( (m_tileParameters[tileIdx].getBottomEdgePosInCU() - m_tileParameters[tileIdx].getTileHeight() + 1) * getFrameWidthInCU() +
     299                                                 m_tileParameters[tileIdx].getRightEdgePosInCU() - m_tileParameters[tileIdx].getTileWidth() + 1);
     300    }
     301  }
     302
     303  Int  columnIdx = 0;
     304  Int  rowIdx = 0;
    249305
    250306  //initialize the TileIdxMap
    251   for( i=0; i<m_uiNumCUsInFrame; i++)
    252   {
    253     for(j=0; j < m_iNumColumnsMinus1+1; j++)
    254     {
    255       if(i % m_uiWidthInCU <= this->getTComTile(j)->getRightEdgePosInCU())
    256       {
    257         uiColumnIdx = j;
    258         j = m_iNumColumnsMinus1+1;
    259       }
    260     }
    261     for(j=0; j < m_iNumRowsMinus1+1; j++)
    262     {
    263       if(i/m_uiWidthInCU <= this->getTComTile(j*(m_iNumColumnsMinus1 + 1))->getBottomEdgePosInCU())
    264       {
    265         uiRowIdx = j;
    266         j = m_iNumRowsMinus1 + 1;
    267       }
    268     }
    269     m_puiTileIdxMap[i] = uiRowIdx * (m_iNumColumnsMinus1 + 1) + uiColumnIdx;
     307  for( Int i=0; i<m_uiNumCUsInFrame; i++)
     308  {
     309    for( Int col=0; col < numCols; col++)
     310    {
     311      if(i % getFrameWidthInCU() <= m_tileParameters[col].getRightEdgePosInCU())
     312      {
     313        columnIdx = col;
     314        break;
     315      }
     316    }
     317    for(Int row=0; row < numRows; row++)
     318    {
     319      if(i / getFrameWidthInCU() <= m_tileParameters[row*numCols].getBottomEdgePosInCU())
     320      {
     321        rowIdx = row;
     322        break;
     323      }
     324    }
     325    m_puiTileIdxMap[i] = rowIdx * numCols + columnIdx;
    270326  }
    271327
     
    417473
    418474TComTile::TComTile()
     475: m_uiTileWidth         (0)
     476, m_uiTileHeight        (0)
     477, m_uiRightEdgePosInCU  (0)
     478, m_uiBottomEdgePosInCU (0)
     479, m_uiFirstCUAddr       (0)
     480
    419481{
    420482}
  • trunk/source/Lib/TLibCommon/TComPicSym.h

    r872 r1084  
    4545#include "TComDataCU.h"
    4646class TComSampleAdaptiveOffset;
     47class TComPPS;
    4748
    4849//! \ingroup TLibCommon
     
    102103  Int           m_iNumColumnsMinus1;
    103104  Int           m_iNumRowsMinus1;
    104   TComTile**    m_apcTComTile;
     105  std::vector<TComTile> m_tileParameters;
    105106  UInt*         m_puiCUOrderMap;       //the map of LCU raster scan address relative to LCU encoding order
    106107  UInt*         m_puiTileIdxMap;       //the map of the tile index relative to LCU raster scan address
     
    133134  Int          getNumRowsMinus1()                                    { return m_iNumRowsMinus1; }
    134135  Int          getNumTiles()                                         { return (m_iNumRowsMinus1+1)*(m_iNumColumnsMinus1+1); }
    135   TComTile*    getTComTile  ( UInt tileIdx )                         { return *(m_apcTComTile + tileIdx); }
     136  TComTile*    getTComTile  ( UInt tileIdx )                         { return &(m_tileParameters[tileIdx]); }
    136137  Void         setCUOrderMap( Int encCUOrder, Int cuAddr )           { *(m_puiCUOrderMap + encCUOrder) = cuAddr; }
    137138  UInt         getCUOrderMap( Int encCUOrder )                       { return *(m_puiCUOrderMap + (encCUOrder>=m_uiNumCUsInFrame ? m_uiNumCUsInFrame : encCUOrder)); }
     
    141142  UInt         getPicSCUEncOrder( UInt SCUAddr );
    142143  UInt         getPicSCUAddr( UInt SCUEncOrder );
    143   Void         xCreateTComTileArray();
    144   Void         xInitTiles();
     144  Void         initTiles(TComPPS *pps);
    145145  UInt         xCalculateNxtCUAddr( UInt uiCurrCUAddr );
    146146  SAOBlkParam* getSAOBlkParam() { return m_saoBlkParams;}
  • trunk/source/Lib/TLibCommon/TComPrediction.cpp

    r1039 r1084  
    423423
    424424  UInt dimType    = getDimType  ( uiIntraMode );
    425 #if !HS_DMM_SIGNALLING_I0120
    426   Bool dimDeltaDC = isDimDeltaDC( uiIntraMode );
    427 #endif
    428425  Bool isDmmMode  = (dimType <  DMM_NUM_TYPE);
    429426
     
    440437    case( DMM1_IDX ):
    441438      {
    442 #if SHARP_DMM1_I0110
    443439        dmmSegmentation = pcCU->isDMM1UpscaleMode((UInt)iWidth) ?
    444440            &(g_dmmWedgeLists[ g_aucConvertToBit[pcCU->getDMM1BasePatternWidth((UInt)iWidth)] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]) :
    445441            &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]);
    446 #else
    447         dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]);
    448 #endif
    449442      } break;
    450443    case( DMM4_IDX ):
     
    464457    }
    465458    assert( dmmSegmentation );
    466 #if SHARP_DMM1_I0110
    467459    if( dimType == DMM1_IDX && pcCU->isDMM1UpscaleMode((UInt)iWidth) )
    468460    {
     
    475467        patternStride = dmmSegmentation->getStride ();
    476468    }
    477 #else
    478     biSegPattern  = dmmSegmentation->getPattern();
    479     patternStride = dmmSegmentation->getStride ();
    480 #endif
    481469  }
    482470#endif
     
    495483  Pel segDC1 = 0;
    496484  Pel segDC2 = 0;
    497 #if HS_DMM_SIGNALLING_I0120
    498485  if( !pcCU->getSDCFlag( uiAbsPartIdx ) )
    499 #else
    500   if( dimDeltaDC )
    501 #endif
    502486  {
    503487    Pel deltaDC1 = pcCU->getDimDeltaDC( dimType, 0, uiAbsPartIdx );
     
    568552    pcCU->getSPAbsPartIdx(uiPartAddr, iSPWidth, iSPHeight, i, iNumSPInOneLine, uiSPAddr[i]);
    569553  }
    570 #if SHARP_ARP_CHROMA_I0104
    571554  if( pcCU->getARPW( uiPartAddr ) != 0 )
    572555  {
    573556    return;
    574557  }
    575 #endif
     558
    576559  // horizontal sub-PU merge
    577560  for (Int i=0; i<iNumSP; i++)
     
    745728  Int uiMinDepth = MAX_INT;
    746729  Int uiMaxDepth = 0;
    747 #if SEC_DBBP_DMM4_THRESHOLD_I0076
     730
    748731  iSumDepth  = pDepthPels[ 0 ];
    749732  iSumDepth += pDepthPels[ uiWidth - 1 ];
     
    760743  uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);
    761744  uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);
    762 #else
    763   for (Int y=0; y<uiHeight; y++)
    764   {
    765     for (Int x=0; x<uiWidth; x++)
    766     {
    767       Int depthPel = pDepthPels[x];
    768       iSumDepth += depthPel;
    769      
    770       if( depthPel > uiMaxDepth )
    771       {
    772         uiMaxDepth = depthPel;
    773       }
    774       if( depthPel < uiMinDepth )
    775       {
    776         uiMinDepth = depthPel;
    777       }
    778     }
    779    
    780     // next row
    781     pDepthPels += uiDepthStride;
    782   }
    783 #endif
     745
    784746 
    785747  // don't generate mask for blocks with small depth range (encoder decision)
     
    790752 
    791753  AOF(uiWidth==uiHeight);
    792 #if SEC_DBBP_DMM4_THRESHOLD_I0076
    793754  Int iMean = iSumDepth >> 2;
    794 #else
    795   Int iSizeInBits = g_aucConvertToBit[uiWidth]+2;
    796   Int iMean = iSumDepth >> iSizeInBits*2;       // iMean /= (uiWidth*uiHeight);
    797 #endif
    798755 
    799756  // start again for segmentation
     
    842799}
    843800
    844 #if SHARP_DBBP_SIMPLE_FLTER_I0109
    845801Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize )
    846 #else
    847 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr )
    848 #endif
    849802{
    850803  Pel*  piSrc[2]    = {pInYuv[0]->getLumaAddr(uiPartAddr), pInYuv[1]->getLumaAddr(uiPartAddr)};
     
    854807 
    855808  UInt  uiMaskStride= MAX_CU_SIZE;
    856 #if !SHARP_DBBP_SIMPLE_FLTER_I0109
    857   Pel  filSrc = 0;
    858 #endif
    859809  Pel* tmpTar = 0;
    860810  tmpTar = (Pel *)xMalloc(Pel, uiWidth*uiHeight);
     
    880830  }
    881831 
    882 #if SHARP_DBBP_SIMPLE_FLTER_I0109
    883832  if (partSize == SIZE_Nx2N)
    884833  {
     
    917866    }
    918867  }
    919 #else
    920   for (Int y=0; y<uiHeight; y++)
    921   {
    922     for (Int x=0; x<uiWidth; x++)
    923     {
    924       Bool t = (y==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x];
    925       Bool l = (x==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x-1];
    926       Bool b = (y==uiHeight-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x];
    927       Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x+1];
    928       Bool c =pMaskStart[y*uiMaskStride+x];
    929 
    930       Pel left, right, top, bottom;
    931       left   = (x==0)          ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x-1];
    932       right  = (x==uiWidth-1)  ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x+1];
    933       top    = (y==0)          ? tmpTar[y*uiWidth+x] : tmpTar[(y-1)*uiWidth+x];
    934       bottom = (y==uiHeight-1) ? tmpTar[y*uiWidth+x] : tmpTar[(y+1)*uiWidth+x];
    935 
    936       if(!((l&&r&&c) || (!l&&!r&&!c)))
    937       {
    938         filSrc = Clip3( Pel( 0 ), Pel( 255 ), Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 ));
    939       }
    940       else
    941       {
    942         filSrc = tmpTar[y*uiWidth+x];
    943       }
    944 
    945       if(!((t&&b&&c) || (!t&&!b&&!c)))
    946       {
    947         filSrc = Clip3( Pel( 0 ), Pel( 255 ), Pel(( top + (filSrc << 1) + bottom ) >> 2 ));
    948       }
    949       piDst[x] = filSrc;
    950     }
    951     piDst     += uiDstStride;
    952   }
    953 #endif
    954868
    955869  if ( tmpTar    ) { xFree(tmpTar);             tmpTar        = NULL; }
     
    989903  }
    990904
    991 #if SHARP_DBBP_SIMPLE_FLTER_I0109
    992905  if (partSize == SIZE_Nx2N)
    993906  {
     
    1056969    }
    1057970  }
    1058 #else
    1059   for (Int y=0; y<uiHeightC; y++)
    1060   {
    1061     for (Int x=0; x<uiWidthC; x++)
    1062     {
    1063       Bool t = (y==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2];
    1064       Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2];
    1065       Bool b = (y==uiHeightC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2];
    1066       Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2];
    1067       Bool c =pMaskStart[y*2*uiMaskStride+x*2];
    1068 
    1069       Pel leftU, rightU, topU, bottomU;
    1070       leftU   = (x==0)           ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x-1];
    1071       rightU  = (x==uiWidthC-1)  ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x+1];
    1072       topU    = (y==0)           ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y-1)*uiWidthC+x];
    1073       bottomU = (y==uiHeightC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y+1)*uiWidthC+x];
    1074 
    1075       Pel leftV, rightV, topV, bottomV;
    1076       leftV   = (x==0)           ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x-1];
    1077       rightV  = (x==uiWidthC-1)  ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x+1];
    1078       topV    = (y==0)           ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y-1)*uiWidthC+x];
    1079       bottomV = (y==uiHeightC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y+1)*uiWidthC+x];
    1080 
    1081       if(!((l&&r&&c) || (!l&&!r&&!c)))
    1082       {
    1083         filSrcU = Clip3( Pel( 0 ), Pel( 255 ), Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 ));
    1084         filSrcV = Clip3( Pel( 0 ), Pel( 255 ), Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 ));
    1085       }
    1086       else
    1087       {
    1088         filSrcU = tmpTarU[y*uiWidthC+x];
    1089         filSrcV = tmpTarV[y*uiWidthC+x];
    1090       }
    1091 
    1092       if(!((t&&b&&c) || (!t&&!b&&!c)))
    1093       {
    1094         filSrcU = Clip3( Pel( 0 ), Pel( 255 ), Pel(( topU + (filSrcU << 1) + bottomU ) >> 2 ));
    1095         filSrcV = Clip3( Pel( 0 ), Pel( 255 ), Pel(( topV + (filSrcV << 1) + bottomV ) >> 2 ));
    1096       }
    1097 
    1098       piDstU[x] = filSrcU;
    1099       piDstV[x] = filSrcV;
    1100     }
    1101     piDstU      += uiDstStrideC;
    1102     piDstV      += uiDstStrideC;
    1103   }
    1104 #endif
     971
    1105972  if ( tmpTarU    ) { xFree(tmpTarU);             tmpTarU        = NULL; }
    1106973  if ( tmpTarV    ) { xFree(tmpTarV);             tmpTarV        = NULL; }
     
    14751342  pcCU->clipMv(cMv);
    14761343  TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec();
    1477 #if QC_I0129_ARP_FIX
    14781344  xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true );
    14791345  xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true );
    1480 #else
    1481   xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, true );
    1482   xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, true );
    1483 #endif
     1346
    14841347  if( dW > 0 )
    14851348  {
     
    14891352    TComMv cMVwithDisparity = cMv + cDistparity.m_acNBDV;
    14901353    pcCU->clipMv(cMVwithDisparity);
    1491 #if SHARP_ARP_CHROMA_I0104
    14921354    if (iWidth <= 8)
    14931355    {
    14941356      pYuvB0->clear(); pYuvB1->clear();
    14951357    }
    1496 #endif
    14971358
    14981359    assert ( cDistparity.bDV );
    14991360   
    1500 #if NTT_BUG_FIX_TK54
    15011361    TComMv cNBDV = cDistparity.m_acNBDV;
    15021362    pcCU->clipMv( cNBDV );
    15031363   
    15041364    pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec();
    1505 #if QC_I0129_ARP_FIX
    15061365    xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true );
    1507 #if SHARP_ARP_CHROMA_I0104
    15081366    if (iWidth > 8)
    1509 #endif
    1510     xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true );
    1511 #else
    1512     xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, bi, true );
    1513     xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, bi, true );
    1514 #endif
    1515 #else
    1516     pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec();
    1517     xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acNBDV, iWidth, iHeight, pYuvB0, bi, true );
    1518     xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acNBDV, iWidth, iHeight, pYuvB0, bi, true );
    1519 #endif
     1367      xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true );
    15201368   
    15211369    pcPicYuvRef = pcPicYuvBaseRef->getPicYuvRec();
    1522 #if QC_I0129_ARP_FIX
    15231370    xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true );
    1524 #if SHARP_ARP_CHROMA_I0104
     1371 
    15251372    if (iWidth > 8)
    1526 #endif
    1527     xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true );
    1528 #else
    1529     xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, bi, true );
    1530     xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, bi, true );
    1531 #endif
     1373      xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true );
     1374   
    15321375    pYuvB0->subtractARP( pYuvB0 , pYuvB1 , uiPartAddr , iWidth , iHeight );
    15331376
     
    15401383}
    15411384
    1542 #if QC_I0051_ARP_SIMP
    15431385Bool TComPrediction::xCheckBiInterviewARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc )
    15441386{
     
    15721414        Int  iCurrRefPOC = pcPicYuvBaseTRef->getPOC();
    15731415        Int  iCurrRef    = pcCU->getSlice()->getFirstTRefIdx(eRefPicListCurr);
    1574 #if MTK_I0072_IVARP_SCALING_FIX
     1416
    15751417        if( iCurrRef >= 0 && iCurrPOC != iCurrRefPOC)
    1576 #else
    1577         if( iCurrRef >= 0)
    1578 #endif
    15791418        {
    15801419          pcPicYuvCurrTRef =  pcCU->getSlice()->getRefPic(eRefPicListCurr,iCurrRef); 
     
    16081447  return false;
    16091448}
    1610 #endif
    16111449
    16121450Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled )
     
    16431481  pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr);
    16441482  TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr );
    1645 #if QC_I0051_ARP_SIMP
    16461483  if( pcCU->getSlice()->isInterB() && !pcCU->getSlice()->getIsDepth() )
    16471484  {
     
    17081545
    17091546  if( !pColCU->isIntra( uiAbsPartAddr ) && !bTMVAvai )
    1710 #else
    1711   if(!pColCU->isIntra(uiAbsPartAddr))
    1712 #endif
    17131547  {
    17141548    TComMvField puMVField;
     
    17231557        Int  iCurrRefPOC = pcPicYuvBaseTRef->getPOC();
    17241558        Int  iCurrRef    = pcCU->getSlice()->getFirstTRefIdx(eRefPicListCurr);
    1725 #if MTK_I0072_IVARP_SCALING_FIX
    17261559        if (iCurrRef >= 0 && iCurrRefPOC != iCurrPOC)
    1727 #else
    1728         if( iCurrRef >= 0)
    1729 #endif
    17301560        {
    17311561          pcPicYuvCurrTRef =  pcCU->getSlice()->getRefPic(eRefPicListCurr,iCurrRef); 
     
    17541584    pcPicYuvCurrTRef =  pcCU->getSlice()->getRefPic  (eRefPicList,  pcCU->getSlice()->getFirstTRefIdx(eRefPicList));     
    17551585  }
    1756 #if QC_I0129_ARP_FIX
     1586
    17571587  xPredInterLumaBlk  ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ),        bTMVAvai);
    17581588  xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ),        bTMVAvai);
    1759 #else
    1760   xPredInterLumaBlk  ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi,        bTMVAvai);
    1761   xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi,        bTMVAvai);
    1762 #endif
     1589
    17631590  if( dW > 0 && bTMVAvai )
    17641591  {
     
    17711598    pcCU->clipMv(cBaseTMV);
    17721599    pcCU->clipMv(cTempMv);
    1773 #if SHARP_ARP_CHROMA_I0104
     1600
    17741601    if (iWidth <= 8)
    17751602    {
    17761603      pYuvCurrTRef->clear(); pYuvBaseTRef->clear();
    17771604    }
    1778 #endif
    1779 #if QC_I0129_ARP_FIX
    17801605    xPredInterLumaBlk  ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true,   true);
    1781 #if SHARP_ARP_CHROMA_I0104
     1606
    17821607    if (iWidth > 8)
    1783 #endif
    1784     xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true,   true);
     1608      xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true,   true);
     1609
    17851610    xPredInterLumaBlk  ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, true,   true);
    1786 #if SHARP_ARP_CHROMA_I0104
     1611
    17871612    if (iWidth > 8)
    1788 #endif
    1789     xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, true,   true);
    1790 #else
    1791     xPredInterLumaBlk  ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi,   true);
    1792     xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi,   true);
    1793     xPredInterLumaBlk  ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, bi,   true);
    1794     xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, bi,   true);
    1795 
    1796 #endif
     1613      xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, true,   true);
     1614
    17971615    pYuvCurrTRef->subtractARP( pYuvCurrTRef , pYuvBaseTRef , uiPartAddr , iWidth , iHeight ); 
    17981616    if(dW == 2)
     
    18031621  }
    18041622}
    1805 
    18061623#endif
    18071624
     
    23282145  Int iRecStride = ( eType == TEXT_LUMA ) ? pRecPic->getStride() : pRecPic->getCStride();
    23292146  Int iRefStride = ( eType == TEXT_LUMA ) ? pRefPic->getStride() : pRefPic->getCStride();
    2330 #if SEC_IC_NEIGHBOR_CLIP_I0080
    23312147  Int iRefOffset, iHor, iVer;
    2332 #else
    2333   Int iCUPelX, iCUPelY, iRefX, iRefY, iRefOffset, iHor, iVer;
    2334 
    2335   iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
    2336   iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
    2337 #endif
    23382148  iHor = pcCU->getSlice()->getIsDepth() ? pMv->getHor() : ( ( pMv->getHor() + 2 ) >> 2 );
    23392149  iVer = pcCU->getSlice()->getIsDepth() ? pMv->getVer() : ( ( pMv->getVer() + 2 ) >> 2 );
    2340 #if !SEC_IC_NEIGHBOR_CLIP_I0080
    2341   iRefX   = iCUPelX + iHor;
    2342   iRefY   = iCUPelY + iVer;
    2343 #endif
    23442150  if( eType != TEXT_LUMA )
    23452151  {
     
    23572163  Int precShift = std::max(0, (( eType == TEXT_LUMA ) ? g_bitDepthY : g_bitDepthC) - 12);
    23582164
    2359 #if SEC_IC_NEIGHBOR_CLIP_I0080
    23602165  if( pcCU->getPUAbove( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) )
    2361 #else
    2362   if( pcCU->getPUAbove( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) && iCUPelY > 0 && iRefY > 0 )
    2363 #endif
    23642166  {
    23652167    iRefOffset = iHor + iVer * iRefStride - iRefStride;
     
    23912193  }
    23922194
    2393 #if SEC_IC_NEIGHBOR_CLIP_I0080
    23942195  if( pcCU->getPULeft( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) )
    2395 #else
    2396   if( pcCU->getPULeft( uiTmpPartIdx, pcCU->getZorderIdxInCU() ) && iCUPelX > 0 && iRefX > 0 )
    2397 #endif
    23982196  {
    23992197    iRefOffset = iHor + iVer * iRefStride - 1;
     
    24292227  }
    24302228
    2431 #if FIX_TICKET_71
    24322229  if( iCountShift == 0 )
    24332230  {
     
    24362233    return;
    24372234  }
    2438 #endif
    24392235
    24402236  xy += xx >> IC_REG_COST_SHIFT;
     
    25532349  // find contour for texture luma block
    25542350  UInt iDC = 0;
    2555 #if SEC_DBBP_DMM4_THRESHOLD_I0076
     2351
    25562352  iDC  = piRefBlkY[ 0 ];
    25572353  iDC += piRefBlkY[ uiWidth - 1 ];
     
    25592355  iDC += piRefBlkY[ uiWidth * (uiHeight - 1) + uiWidth - 1 ];
    25602356  iDC = iDC >> 2;
    2561 #else
    2562   for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
    2563   {
    2564     iDC += piRefBlkY[k];
    2565   }
    2566 
    2567   Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2;   //
    2568   iDC = iDC >> (cuMaxLog2Size - pcCU->getDepth(0))*2;        //  iDC /= (uiWidth*uiHeight);
    2569 #endif
    25702357
    25712358  piRefBlkY = cTempYuv.getLumaAddr();
  • trunk/source/Lib/TLibCommon/TComPrediction.h

    r1039 r1084  
    9090#if H_3D_ARP
    9191  Void xPredInterUniARP         ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL );
    92 #if QC_I0051_ARP_SIMP
    9392  Bool xCheckBiInterviewARP     ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc );
    94 #endif
    9593  Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL );
    9694#endif
     
    179177  PartSize      getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize);
    180178  Bool          getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask );
    181 #if SHARP_DBBP_SIMPLE_FLTER_I0109
    182179  Void          combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize );
    183 #else
    184   Void          combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr = 0 );
    185 #endif
    186180#endif
    187181
  • trunk/source/Lib/TLibCommon/TComRom.cpp

    r1066 r1084  
    355355  HALF_PEL,    //   8x8
    356356  FULL_PEL,    //  16x16
    357 #if SHARP_DMM1_I0110
    358357  FULL_PEL,    //  32x32
    359358  FULL_PEL,    //  64x64
    360359  FULL_PEL     // 128x128
    361 #else
    362   DOUBLE_PEL,  //  32x32
    363   DOUBLE_PEL,  //  64x64
    364   DOUBLE_PEL   // 128x128
    365 #endif
    366360};
    367361
     
    374368     0,    4,    7,    8,    8,    0 };
    375369
    376 #if SHARP_DMM1_I0110
    377370Bool g_wedgePattern[32*32];
    378 #endif
    379371
    380372extern std::vector< std::vector<TComWedgelet> >   g_dmmWedgeLists;
     
    388380
    389381Char  g_aucConvertToBit  [ MAX_CU_SIZE+1 ];
    390 #if !MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
    391 #if H_3D_IC
    392 UInt g_aICEnableCANDIDATE[10] = { 0, };
    393 UInt g_aICEnableNUM[ 10 ] = { 0, };
    394 Int g_lastlayer=0;
    395 #endif
    396 #endif
    397382#if ENC_DEC_TRACE
    398383FILE*  g_hTrace = NULL;
     
    676661  if( !g_dmmWedgeLists.empty() ) return;
    677662
    678 #if SHARP_DMM1_I0110
    679663  for( UInt ui = g_aucConvertToBit[DIM_MIN_SIZE]; ui < (g_aucConvertToBit[DIM_MAX_SIZE]); ui++ )
    680 #else
    681   for( UInt ui = g_aucConvertToBit[DIM_MIN_SIZE]; ui < (g_aucConvertToBit[DIM_MAX_SIZE]+1); ui++ )
    682 #endif
    683664  {
    684665    UInt uiWedgeBlockSize = ((UInt)DIM_MIN_SIZE)<<ui;
     
    764745  switch( eWedgeRes )
    765746  {
    766 #if !SHARP_DMM1_I0110
    767   case( DOUBLE_PEL ): { uiBlockSize = (uiWidth>>1); break; }
    768 #endif
    769747  case(   FULL_PEL ): { uiBlockSize =  uiWidth;     break; }
    770748  case(   HALF_PEL ): { uiBlockSize = (uiWidth<<1); break; }
  • trunk/source/Lib/TLibCommon/TComRom.h

    r1066 r1084  
    166166extern const UChar                                           g_dmm3IntraTabIdxBits[6];
    167167
    168 #if SHARP_DMM1_I0110
    169168extern Bool                                                  g_wedgePattern[32*32];
    170 #endif
    171169
    172170extern       std::vector< std::vector<TComWedgelet> >        g_dmmWedgeLists;
     
    230228
    231229extern       Char   g_aucConvertToBit  [ MAX_CU_SIZE+1 ];   // from width to log2(width)-2
    232 #if !MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
    233 #if H_3D_IC
    234 extern UInt g_aICEnableCANDIDATE[10];
    235 extern UInt g_aICEnableNUM[ 10 ]; //10 layers
    236 extern Int  g_lastlayer;
    237 #endif
    238 #endif
    239230
    240231#ifndef ENC_DEC_TRACE
  • trunk/source/Lib/TLibCommon/TComSlice.cpp

    r1066 r1084  
    103103, m_temporalLayerNonReferenceFlag ( false )
    104104, m_enableTMVPFlag                ( true )
    105 #if I0044_SLICE_TMVP
     105#if H_MV
    106106, m_availableForTMVPRefFlag       ( true )
    107 #endif
    108 #if H_MV
    109107, m_refPicSetInterLayer0           ( NULL )
    110108, m_refPicSetInterLayer1           ( NULL )
     
    142140, m_depthToDisparityF             ( NULL )
    143141#endif
    144 #if MTK_SINGLE_DEPTH_MODE_I0095
     142#if H_3D_SINGLE_DEPTH
    145143, m_bApplySingleDepthMode         (false)
    146144#endif
     
    650648 
    651649  TComPic**             refPicSetStCurr    [2] = { RefPicSetStCurr0, RefPicSetStCurr1 };
    652 #if FIX_WARNING
    653650  Int numPocStCurr[2] = { (Int)NumPocStCurr0, (Int)NumPocStCurr1 };
    654 #else
    655   Int numPocStCurr[2] = { NumPocStCurr0, NumPocStCurr1 };
    656 #endif
    657651
    658652  for (Int li = 0; li < ((m_eSliceType==B_SLICE) ? 2 : 1); li++)
     
    728722
    729723        assert( rpsCurrList[li][ orgIdx ] != NULL );
    730 #if DISCARDABLE_PIC_RPS
    731724        assert( rpsCurrList[li][ orgIdx ]->getSlice(0)->getDiscardableFlag() == 0 );    // Inter-layer RPS shall not contain picture with discardable_flag = 1.
    732 #endif
    733725        m_apcRefPicList    [li][rIdx] = rpsCurrList    [li][ orgIdx ];
    734726        m_bIsUsedAsLongTerm[li][rIdx] = usedAsLongTerm [li][ orgIdx ] ;
     
    11051097  }
    11061098#endif
    1107 #if MTK_SINGLE_DEPTH_MODE_I0095
     1099#if H_3D_SINGLE_DEPTH
    11081100  m_bApplySingleDepthMode = pSrc->m_bApplySingleDepthMode;
    11091101#endif
     
    18811873#if H_MV
    18821874  m_vpsBaseLayerInternalFlag = true;
    1883 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL
    18841875  m_vpsBaseLayerAvailableFlag = true;
    1885 #endif
    18861876#endif
    18871877
     
    19091899  {
    19101900    m_layerSetIdxForOlsMinus1[i]  = -1;
    1911 #if !H_MV_HLS10_PTL
    1912     m_profileLevelTierIdx[i]      = 0;
    1913 #endif
    19141901    for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++)
    19151902    {
    1916 #if H_MV_HLS10_PTL
    1917 #if H_MV_HLS10_PTL_FIX
    19181903      m_profileTierLevelIdx[i][j] = -1;
    1919 #else
    1920       m_profileTierLevelIdx[i][j] = false;
    1921 #endif
    1922 #endif
    19231904      m_outputLayerFlag[i][j] = false;
    19241905    }
     
    19701951    m_viewIndex         [i] = -1;
    19711952    m_vpsDepthModesFlag [i] = false;
    1972 #if SEC_HLS_CLEANUP_I0100
    19731953    m_ivMvScalingFlag[i] = true;
    1974 #else
    1975     m_ivMvScalingFlag = true;
    1976 #endif
    1977 #if SEPARATE_FLAG_I0085
    19781954    m_bIVPFlag [i]      = false;
    1979 #endif
    19801955#endif
    19811956
     
    19841959      m_directDependencyFlag[i][j] = false;
    19851960      m_directDependencyType[i][j] = -1;
    1986 #if H_MV_HLS10_REF_PRED_LAYERS
    19871961      m_dependencyFlag  [i][j]    = false;
    19881962      m_idDirectRefLayer[i][j]    = -1;
    19891963      m_idPredictedLayer[i][j]    = -1;
    19901964      m_idRefLayer      [i][j]    = -1;
    1991 #else
    1992       m_refLayerId[i][j]           = -1;
    1993 #endif
    19941965      m_maxTidIlRefPicsPlus1[i][j]  = 7;
    19951966    }
     
    20161987#endif
    20171988#endif
    2018 #if MTK_I0099_VPS_EX2
     1989#if H_3D_QTLPC
    20191990    m_bLimQtPredFlag       [ i ] = false;
    20201991#endif
     
    20281999    m_bInterSDCFlag        [ i ] = false;
    20292000#endif
    2030 #if SEPARATE_FLAG_I0085
     2001#if H_3D
    20312002    m_bIVPFlag             [ i ] = false;
    20322003#endif
     
    20752046  assert( getVpsNumRepFormatsMinus1() <= 255 );
    20762047
    2077 #if H_MV_HLS10_ADD_LAYERSETS
    20782048  // The value of num_add_layer_sets shall be in the range of 0 to 1023, inclusive.
    20792049  assert( getNumAddLayerSets() >= 0 && getNumAddLayerSets() <= 1023 );
    2080 #endif
    20812050  return true;
    20822051}
     
    21112080{
    21122081
    2113 #if H_MV_HLS10_REF_PRED_LAYERS
    21142082  for( Int i = 0; i  <=  getMaxLayersMinus1(); i++ )
    21152083  {
     
    21812149  }
    21822150  m_numIndependentLayers = k;
    2183 #else // H_MV_HLS10_GEN
    2184 
    2185   for( Int i = 0; i  <= getMaxLayersMinus1(); i++ )
    2186   {
    2187     Int iNuhLId = getLayerIdInNuh( i );
    2188     m_numDirectRefLayers[ iNuhLId ] = 0;
    2189     for( Int j = 0; j < i; j++ )
    2190     {
    2191       if( getDirectDependencyFlag(i , j) )
    2192       {
    2193         m_refLayerId[ iNuhLId ][m_numDirectRefLayers[ iNuhLId ]++ ] = getLayerIdInNuh( j );
    2194       }
    2195     }
    2196   }
    2197 
    2198   for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ )
    2199   {
    2200     m_numRefLayers[i] = 0;
    2201   }
    2202 
    2203   for (Int currLayerId = 0; currLayerId <= 62; currLayerId++ )
    2204   {
    2205     for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ )
    2206     {
    2207       m_recursiveRefLayerFlag[currLayerId][i] = 0;
    2208     }
    2209   }
    2210 
    2211   for( Int i = 0; i  <=  getMaxLayersMinus1(); i++ )
    2212   {
    2213     Int iNuhLId = getLayerIdInNuh( i );
    2214     xSetRefLayerFlags( iNuhLId );
    2215     for( Int j = 0; j < 63; j++ )
    2216     {
    2217       m_numRefLayers[ iNuhLId ]  +=  m_recursiveRefLayerFlag[ iNuhLId ][ j ];
    2218     }
    2219   }
    2220  
    2221   for( Int i = 0; i <= getMaxLayersMinus1(); i++ )  // Bug in spec "<" instead of "<="
    2222   {
    2223     Int iNuhLId = getLayerIdInNuh( i );
    2224     Int predIdx = 0;
    2225     for( Int j = iNuhLId + 1; j < 63; j++ )
    2226     {
    2227       if( m_recursiveRefLayerFlag[ j ][ iNuhLId ] )
    2228       {
    2229         m_predictedLayerId[ iNuhLId ][ predIdx++ ] = j;
    2230       }
    2231     }
    2232     m_numPredictedLayers[ iNuhLId ] = predIdx;
    2233   }
    2234  
    2235   Bool countedLayerIdxFlag[ MAX_NUM_LAYERS ];
    2236   for( Int i = 0; i  <=  getMaxLayersMinus1(); i++ )
    2237   {
    2238     countedLayerIdxFlag[ i ] = 0;
    2239   }
    2240   for( Int i = 0, k = 0; i  <=  getMaxLayersMinus1(); i++ )
    2241   {
    2242     Int iNuhLId = getLayerIdInNuh( i );
    2243     if( m_numDirectRefLayers[ iNuhLId ]  ==  0 )
    2244     {
    2245       m_treePartitionLayerIdList[ k ][ 0 ] = iNuhLId;
    2246       m_numLayersInTreePartition[ k ]      = 1;
    2247 
    2248       for( Int j = 0; j < m_numPredictedLayers[ iNuhLId ]; j++ ) 
    2249       {
    2250         if( !countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] )   
    2251         {
    2252           m_treePartitionLayerIdList[ k ][ m_numLayersInTreePartition[ k ] ] = m_predictedLayerId[ iNuhLId ][ j ];
    2253           m_numLayersInTreePartition[ k ]++;
    2254           countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] = 1;
    2255         }
    2256       }
    2257       k++;
    2258 
    2259       m_numIndependentLayers = k;
    2260     }
    2261   }
    2262 #endif // H_MV_HLS10_GEN
    2263 }
    2264 
    2265 #if !H_MV_HLS10_REF_PRED_LAYERS
    2266 Int TComVPS::getRefLayerId( Int layerIdInNuh, Int idx )
    2267 {
    2268   assert( idx >= 0 && idx < m_numDirectRefLayers[layerIdInNuh] );     
    2269   Int refLayerIdInNuh = m_refLayerId[ layerIdInNuh ][ idx ];   
    2270   assert ( refLayerIdInNuh >= 0 );
    2271   return refLayerIdInNuh;
    2272 }
    2273 #endif
     2151}
     2152
    22742153
    22752154Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType )
     
    23092188  for ( i = 0; i < iNumViews ; i++ )
    23102189  {
    2311 #if H_3D_FIX_UNINIT
    23122190    m_bCamParPresent[i] = false;
    2313 #endif
    23142191    m_bCamParInSliceHeader[i] = false;
    23152192    m_aaaiCodedScale[i] = new Int*[ 2 ];
     
    24242301{
    24252302  assert( lsIdx >= 0 );
    2426 #if H_MV_HLS10_ADD_LAYERSETS
    24272303  assert( lsIdx <= getNumLayerSets() );
    2428 #else
    2429   assert( lsIdx <= getVpsNumLayerSetsMinus1() );
    2430 #endif
    24312304  return (Int) m_layerSetLayerIdList[ lsIdx ].size();
    24322305}
     
    24522325}
    24532326
    2454 #if !H_MV_HLS10_REF_PRED_LAYERS
    2455 Bool TComVPS::getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth /*= 0 */ )
    2456 {
    2457 #if H_MV_HLS10_REF_PRED_LAYERS
    2458   // TBD: Remove getInDirectDependencyFlag entirely.
    2459   return getDependencyFlag( depLayeridInVps, refLayeridInVps );
    2460 #else
    2461   assert( depth < 65 );
    2462   Bool dependentFlag = getDirectDependencyFlag( depLayeridInVps, refLayeridInVps );
    2463 
    2464   for( Int i = 0; i < depLayeridInVps && !dependentFlag; i++ )
    2465   {
    2466     if ( getDirectDependencyFlag( depLayeridInVps, i ) )
    2467     {
    2468       dependentFlag = getInDirectDependencyFlag( i, refLayeridInVps, depth++ );
    2469     }
    2470   }
    2471   return dependentFlag;
    2472 #endif
    2473 }
    2474 #endif
    24752327
    24762328Void TComVPS::deriveLayerSetLayerIdList()
     
    25012353  for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ )
    25022354  {
    2503 #if H_MV_HLS10_NESSECARY_LAYER
    25042355    if ( getNecessaryLayerFlag( i , j ))
    25052356    {
    2506 #endif
    25072357      m_targetDecLayerIdLists[i].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] );
    2508 #if H_MV_HLS10_NESSECARY_LAYER
    2509     }
    2510 #endif
     2358    }
    25112359
    25122360    if( getOutputLayerFlag( i, j  ))
     
    25572405}
    25582406
    2559 #if !H_MV_HLS10_ADD_LAYERSETS
    2560 Void TComVPS::inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder )
    2561 {
    2562   for( Int j = 0; j <= getMaxSubLayersInLayerSetMinus1( 0 ); j++ )
    2563   {
    2564     Int maxDecPicBufferingMinus1 = sps->getMaxDecPicBuffering( j ) - 1;
    2565     Int numReorderPics           = sps->getNumReorderPics    ( j );
    2566     Int maxLatencyIncreasePlus1  = sps->getMaxLatencyIncrease( j );
    2567 
    2568     if ( encoder )
    2569     {
    2570       assert( getDpbSize()->getMaxVpsDecPicBufferingMinus1(0, 0, j ) == maxDecPicBufferingMinus1 );
    2571       assert( getDpbSize()->getMaxVpsNumReorderPics       (0,    j ) == numReorderPics           );
    2572       assert( getDpbSize()->getMaxVpsLatencyIncreasePlus1 (0,    j ) == maxLatencyIncreasePlus1  );
    2573     }
    2574     else
    2575     {
    2576       getDpbSize()->setMaxVpsDecPicBufferingMinus1(0, 0, j, maxDecPicBufferingMinus1 );
    2577       getDpbSize()->setMaxVpsNumReorderPics       (0,    j, numReorderPics           );
    2578       getDpbSize()->setMaxVpsLatencyIncreasePlus1 (0,    j, maxLatencyIncreasePlus1  );       
    2579     }     
    2580   }
    2581 }
    2582 #endif
    25832407Bool TComVPS::getAltOutputLayerFlagVar( Int i )
    25842408{
     
    25942418}
    25952419
    2596 #if !H_MV_HLS10_MAXNUMPICS
    2597 Int TComVPS::getMaxNumPics( Int layerId )
    2598 {
    2599   Int maxNumPics = MAX_INT;
    2600   for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++)
    2601   {
    2602     Int lsIdx = olsIdxToLsIdx( olsIdx );
    2603     for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ )
    2604     {
    2605       if( getLayerSetLayerIdList(lsIdx, j ) ==  layerId )
    2606       {
    2607         Int maxSL = getMaxSubLayersInLayerSetMinus1( lsIdx );
    2608         maxNumPics = std::min( maxNumPics, getDpbSize()->getMaxVpsDecPicBufferingMinus1( olsIdx , j,  maxSL ) );
    2609       }
    2610     }
    2611   }
    2612   assert( maxNumPics != MAX_INT );
    2613   return maxNumPics;
    2614 }
    2615 #endif
    2616 
    2617 #if !H_MV_HLS10_REF_PRED_LAYERS
    2618 Void TComVPS::xSetRefLayerFlags( Int currLayerId )
    2619 {
    2620   for( Int j = 0; j < getNumDirectRefLayers( currLayerId ); j++ )
    2621   {
    2622     Int refLayerId = m_refLayerId[ currLayerId ][ j ];
    2623     m_recursiveRefLayerFlag[ currLayerId ][ refLayerId ] = 1;
    2624     for( Int k = 0; k < MAX_NUM_LAYER_IDS; k++ )
    2625     {
    2626       m_recursiveRefLayerFlag[ currLayerId ][ k ] = m_recursiveRefLayerFlag[ currLayerId ][ k ]  ||  m_recursiveRefLayerFlag[ refLayerId ][ k ];
    2627     }
    2628   }
    2629 }
    2630 
    2631 #endif
    2632 
    2633 #if H_MV_HLS10_PTL_FIX
     2420
     2421
    26342422Int TComVPS::inferProfileTierLevelIdx(Int i, Int j)
    26352423{
     
    26512439  return ptlIdx;
    26522440}
    2653 #endif
    2654 
    2655 #if H_MV_HLS10_ADD_LAYERSETS
     2441
    26562442Void TComVPS::deriveAddLayerSetLayerIdList(Int i)
    26572443{
     
    26762462}
    26772463
    2678 #endif
    2679 
    2680 #if H_MV_HLS10_NESSECARY_LAYER
     2464
    26812465Void TComVPS::deriveNecessaryLayerFlags(Int olsIdx)
    26822466{
     
    27092493  }
    27102494}
    2711 #endif
    2712 
    2713 #if H_MV_HLS10_ADD_LAYERSETS
     2495
    27142496Void TComVPS::printPTL()
    27152497{
     
    27572539#endif
    27582540
    2759 #if H_MV_HLS10_AUX
    27602541  vector<Int> viewOrderIndex;
    27612542  vector<Int> auxId;
    27622543  vector<Int> dependencyId;
    27632544  vector<Int> viewId;
    2764 #endif
    27652545  for (Int i = 0; i <= getMaxLayersMinus1(); i++ )
    27662546  {
    27672547    fullArray.push_back( getMaxLayersMinus1() + 1 );
    27682548    range.push_back( i );
    2769 #if H_MV_HLS10_AUX     
    27702549    viewOrderIndex.push_back( getViewIndex   ( i ) );
    27712550    dependencyId  .push_back( getDependencyId( i ) );
     
    27742553#if H_3D 
    27752554    depthId.push_back( getDepthId( i ) );
    2776 #endif
    27772555#endif
    27782556  }
     
    27872565}
    27882566
    2789 #if H_MV_HLS10_AUX
    27902567Void TComVPS::printScalabilityId()
    27912568{
     
    28252602  std::cout << std::endl;
    28262603}
    2827 #endif
    28282604
    28292605Void TComVPS::printLayerSets()
     
    28802656}
    28812657
    2882 #endif
    28832658
    28842659#endif // H_MV
     
    29102685, m_pcmLog2MaxSize            (  5)
    29112686, m_uiPCMLog2MinSize          (  7)
    2912 #if !MTK_I0099_VPS_EX2
    2913 #if H_3D_QTLPC
    2914 , m_bUseQTL                   (false)
    2915 , m_bUsePC                    (false)
    2916 #endif
    2917 #endif
    29182687, m_bitDepthY                 (  8)
    29192688, m_bitDepthC                 (  8)
     
    29642733#endif
    29652734
    2966 #if !H_MV_HLS10_PPS
    2967   m_numScaledRefLayerOffsets = 0;
    2968 
    2969   for (Int i = 0; i < MAX_NUM_SCALED_REF_LAYERS; i++ )
    2970   {
    2971     m_scaledRefLayerId             [i] = -1;
    2972   }
    2973 
    2974   for (Int i = 0; i < MAX_NUM_LAYERS; i++ )
    2975   {
    2976     m_scaledRefLayerLeftOffset     [i] = 0;
    2977     m_scaledRefLayerTopOffset      [i] = 0;
    2978     m_scaledRefLayerRiFghtOffset    [i] = 0;
    2979     m_scaledRefLayerBottomOffset   [i] = 0;
    2980   }
    2981 #endif
    29822735#endif
    29832736}
     
    31202873, m_entropyCodingSyncEnabledFlag   (false)
    31212874, m_loopFilterAcrossTilesEnabledFlag  (true)
    3122 , m_uniformSpacingFlag           (0)
    3123 , m_iNumColumnsMinus1            (0)
    3124 , m_puiColumnWidth               (NULL)
    3125 , m_iNumRowsMinus1               (0)
    3126 , m_puiRowHeight                 (NULL)
    3127 , m_iNumSubstreams             (1)
     2875, m_uniformSpacingFlag           (false)
     2876, m_numTileColumnsMinus1         (0)
     2877, m_numTileRowsMinus1            (0)
     2878, m_numSubstreams               (1)
    31282879, m_signHideFlag(0)
    31292880, m_cabacInitPresentFlag        (false)
     
    31582909TComPPS::~TComPPS()
    31592910{
    3160   if( m_iNumColumnsMinus1 > 0 && m_uniformSpacingFlag == 0 )
    3161   {
    3162     if (m_puiColumnWidth) delete [] m_puiColumnWidth;
    3163     m_puiColumnWidth = NULL;
    3164   }
    3165   if( m_iNumRowsMinus1 > 0 && m_uniformSpacingFlag == 0 )
    3166   {
    3167     if (m_puiRowHeight) delete [] m_puiRowHeight;
    3168     m_puiRowHeight = NULL;
    3169   }
    31702911  delete m_scalingList;
    31712912}
     
    31862927    // allocate some memory and initialize with default mapping
    31872928    m_iNumDepthmapValues[i] = ((1 << m_uiDepthViewBitDepth)-1)+1;
    3188 #if !FIX_TICKET_77
    3189     m_iBitsPerDepthValue[i] = numBitsForValue(m_iNumDepthmapValues[i]);
    3190 #endif
    31912929    m_iDepthValue2Idx[i]    = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);
    31922930    m_iIdx2DepthValue[i]    = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);
     
    32773015  // update DLT variables
    32783016  m_iNumDepthmapValues[layerIdInVps] = iNumDepthValues;
    3279 #if !FIX_TICKET_77
    3280   m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]);
    3281 #endif
    3282 }
    3283 
    3284 #if H_3D_DELTA_DLT
     3017}
     3018
    32853019Void TComDLT::getDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTOut, UInt *puiDeltaDLTOutNum )
    32863020{
     
    33473081  setDepthLUTs(layerIdInVps, aiIdx2DepthValue, uiNumDepthValues);
    33483082}
    3349 #endif
    33503083
    33513084#endif
     
    33543087Void TComSPS::inferRepFormat( TComVPS* vps, Int layerIdCurr )
    33553088{
    3356 #if H_MV_HLS10_MULTILAYERSPS
    33573089  if ( getMultiLayerExtSpsFlag() )
    3358 #else
    3359   if ( layerIdCurr > 0 )
    3360 #endif
    33613090  {
    33623091    Int            repFormatIdx = getUpdateRepFormatFlag() ?  getSpsRepFormatIdx() : vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) ;
     
    33743103    setBitDepthC             ( repFormat->getBitDepthVpsChromaMinus8() + 8 );
    33753104    setQpBDOffsetC           ( (Int) (6* ( getBitDepthC() -8 ) ) );
    3376  #if H_MV_HLS10_GEN_VSP_CONF_WIN
    33773105    Window &spsConf    = getConformanceWindow();   
    33783106
     
    33833111    spsConf.setWindowTopOffset   ( repFormat->getConfWinVpsTopOffset()     );
    33843112    spsConf.setWindowBottomOffset( repFormat->getConfWinVpsBottomOffset()  );   
    3385 #endif
    3386 
    3387 #if H_MV_HLS10_MULTILAYERSPS
     3113
    33883114   if ( getMultiLayerExtSpsFlag() && getUpdateRepFormatFlag() )
    3389 #else
    3390    if ( getLayerId() > 0 && getUpdateRepFormatFlag() )
    3391 #endif
    33923115    {
    33933116      assert( getChromaFormatIdc()      <=  repFormat->getChromaFormatVpsIdc()         );
     
    34233146  const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx ));
    34243147
    3425 #if H_MV_HLS10_MULTILAYERSPS
    34263148  if ( getMultiLayerExtSpsFlag() )
    3427 #else
    3428   if (getLayerId() > 0 )
    3429 #endif
    34303149  {
    34313150    Int layerIdx = 0;         
     
    34453164      Int maxDecPicBufferingMinus1 = vps->getDpbSize()->getMaxVpsDecPicBufferingMinus1( targetOptLayerSetIdx, layerIdx, i ) ;
    34463165
    3447 #if H_MV_HLS10_MULTILAYERSPS
    34483166      // This preliminary fix needs to be checked.
    34493167      Int maxNumReorderPics       = vps->getDpbSize()->getMaxVpsNumReorderPics( targetOptLayerSetIdx, i );
    34503168      Int maxLatencyIncreasePlus1 = vps->getDpbSize()->getMaxVpsLatencyIncreasePlus1( targetOptLayerSetIdx, i );
    3451 #endif
    34523169      if ( encoder )     
    34533170      {
    34543171        assert( getMaxDecPicBuffering( i ) - 1 == maxDecPicBufferingMinus1 );
    3455 #if H_MV_HLS10_MULTILAYERSPS
    34563172        // This preliminary fix needs to be checked.
    34573173        assert( getNumReorderPics( i )     == maxNumReorderPics       );
    34583174        assert( getMaxLatencyIncrease( i ) == maxLatencyIncreasePlus1 );
    3459 #endif   
    34603175
    34613176      }
    34623177      else
    34633178      {
    3464 #if !H_MV_HLS10_MULTILAYERSPS
    3465         setMaxDecPicBuffering(i, maxDecPicBufferingMinus1 + 1 );
    3466 #else
    34673179        // This preliminary fix needs to be checked.
    34683180        setMaxDecPicBuffering( maxDecPicBufferingMinus1 + 1 , i);
    34693181        setNumReorderPics    ( maxNumReorderPics, i );
    34703182        setMaxLatencyIncrease( maxLatencyIncreasePlus1 - 1 , i);
    3471 #endif
    34723183      }
    34733184    }   
     
    34773188Void TComSPS::checkRpsMaxNumPics( TComVPS* vps, Int currLayerId )
    34783189{
    3479 #if !H_MV_HLS10_MAXNUMPICS
    3480   // In spec, when rps is in SPS, nuh_layer_id of SPS is used instead
    3481   // of nuh_layer_id of slice (currLayerId), this seems to be a bug.
    3482 #endif
    34833190  for (Int i = 0; i < getRPSList()->getNumberOfReferencePictureSets(); i++ )
    34843191  {
     
    34863193    if ( !rps->getInterRPSPrediction() )
    34873194    {
    3488 #if H_MV_HLS10_MAXNUMPICS
    34893195      rps->checkMaxNumPics( vps->getVpsExtensionFlag(), MAX_INT, getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 );   // INT_MAX to be replaced by DpbSize
    3490 #else
    3491       rps->checkMaxNumPics( vps->getVpsExtensionFlag(), vps->getMaxNumPics( currLayerId ),
    3492         getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); 
    3493 #endif
    3494     }
    3495   }
    3496 }
    3497 
    3498 #if H_MV_HLS10_MULTILAYERSPS
     3196    }
     3197  }
     3198}
     3199
    34993200Void TComSPS::inferSpsMaxSubLayersMinus1(Bool atPsActivation, TComVPS* vps)
    35003201{
     
    35173218  }
    35183219}
    3519 #endif
    35203220#endif
    35213221
     
    38803580{
    38813581  TComVPS* vps = getVPS();
    3882 #if H_MV_HLS10_REF_PRED_LAYERS
    38833582  Int refLayerIdx = vps->getLayerIdInVps( vps->getIdDirectRefLayer( getLayerId(), i ) );
    3884 #else
    3885   Int refLayerIdx = vps->getLayerIdInVps( vps->getRefLayerId( getLayerId(), i ) );
    3886 #endif
    38873583
    38883584  Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >=  getTLayer() )  && ( getTLayer() == 0  ) &&
     
    39553651Int TComSlice::getRefPicLayerId( Int i )
    39563652{
    3957 #if H_MV_HLS10_REF_PRED_LAYERS
    39583653  return getVPS()->getIdDirectRefLayer( getLayerId(), getInterLayerPredLayerIdc( i ) );
    3959 #else
    3960   return getVPS()->getRefLayerId( getLayerId(), getInterLayerPredLayerIdc( i ) );
    3961 #endif
    39623654}
    39633655
     
    40653757      m_bApplyIC = true;
    40663758      Int refLayer = curLayer-1;
    4067 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     3759
    40683760      Int ICEnableCandidate = getICEnableCandidate(refLayer);
    40693761      Int ICEnableNum = getICEnableNum(refLayer);
     
    40833775      setICEnableCandidate(curLayer, 0);
    40843776      setICEnableNum(curLayer, 0);
    4085 #else
    4086       if( (refLayer>=0) && (g_aICEnableCANDIDATE[refLayer]>0) )
    4087       {   
    4088         Double ratio=Double(g_aICEnableNUM[refLayer])/Double(g_aICEnableCANDIDATE[refLayer]);
    4089 
    4090         if( ratio > IC_LOW_LATENCY_ENCODING_THRESHOLD)
    4091 {
    4092           m_bApplyIC=true;
    4093         }
    4094         else
    4095         {
    4096           m_bApplyIC=false;
    4097         }
    4098       }
    4099       g_aICEnableNUM[curLayer]=0;
    4100       g_aICEnableCANDIDATE[curLayer]=0;
    4101       g_lastlayer=getDepth();
    4102 #endif
    41033777    }
    41043778  }
     
    42103884
    42113885#if H_3D_DDD
    4212 #if LGE_FCO_I0116
     3886#if H_3D_FCO
    42133887  if( getIsDepth() && getViewIndex() > 0 && getVPS()->getMPIFlag(layerIdInVPS))
    42143888#else
     
    46964370, m_nonPackedConstraintFlag(false)
    46974371, m_frameOnlyConstraintFlag(false)
    4698 #if H_MV_HLS10_PTL
     4372#if H_MV
    46994373  , m_max12bitConstraintFlag      ( false )
    47004374  , m_max10bitConstraintFlag      ( false )
     
    47124386}
    47134387
    4714 #if H_MV_HLS10_PTL_INFER_FIX
     4388#if H_MV
    47154389Bool ProfileTierLevel::getV2ConstraintsPresentFlag()
    47164390{
     
    47574431  copyV2ConstraintFlags      ( ptlRef );
    47584432}
    4759 
    47604433#endif
    47614434
     
    47674440
    47684441#if H_MV
    4769 #if !H_MV_HLS10_PTL_INFER_FIX
    4770 Void TComPTL::copyLevelFrom( TComPTL* source )
    4771 {
    4772   getGeneralPTL()->setLevelIdc( source->getGeneralPTL()->getLevelIdc() );
    4773   for( Int subLayer = 0; subLayer < 6; subLayer++ )
    4774   {
    4775     setSubLayerLevelPresentFlag( subLayer, source->getSubLayerLevelPresentFlag( subLayer ) );
    4776     getSubLayerPTL( subLayer )->setLevelIdc( source->getSubLayerPTL( subLayer )->getLevelIdc() );
    4777   }
    4778 }
    4779 #else
    47804442Void TComPTL::inferGeneralValues(Bool profilePresentFlag, Int k, TComPTL* refPTL)
    47814443{
     
    48654527}
    48664528
    4867 #endif
    48684529#endif
    48694530//! \}
     
    49084569
    49094570  m_vpsVuiBspHrdPresentFlag = false;
    4910 #if H_MV_HLS10_VPS_VUI_BSP
    49114571  m_vpsVuiBspHrdParameters  = NULL;
    4912 #else
    4913   m_vpsVuiBspHrdParameters  = new TComVpsVuiBspHrdParameters();
    4914 #endif
    49154572}
    49164573
     
    49584615}
    49594616
    4960 #if !H_MV_HLS10_VPS_VUI_BSP
    4961 Void TComVpsVuiBspHrdParameters::checkLayerInBspFlag( TComVPS* vps, Int h )
    4962 {
    4963   // It is a requirement of bitstream conformance that bitstream partition with index j shall not include
    4964   // direct or indirect reference layers of any layers in bitstream partition i for any values of i and j
    4965   // in the range of 0 to num_bitstream_partitions[ h ] ?1, inclusive, such that i is less than j.
    4966 
    4967   for ( Int partJ = 0; partJ < getNumBitstreamPartitions( h ); partJ++ )
    4968   {       
    4969     for ( Int partI = 0; partI < partJ; partI++ )
    4970     {
    4971       for ( Int layerJ = 0; layerJ < vps->getMaxLayersMinus1(); layerJ++ )
    4972       {
    4973         if ( m_layerInBspFlag[ h ][partJ][layerJ ] )
    4974         {
    4975           for ( Int layerI = 0; layerI < vps->getMaxLayersMinus1(); layerI++ )
    4976           {
    4977             if ( m_layerInBspFlag[ h ][partI][layerI] )
    4978             {
    4979               assert( !vps->getInDirectDependencyFlag( layerI, layerJ ) );
    4980             }
    4981           }
    4982         }
    4983       }
    4984     }
    4985   }
    4986 
    4987   // ---------------
    4988   // To be added:
    4989   // When vps_base_layer_internal_flag is equal to 0 and layer_in_bsp_flag[ h ][ i ][ 0 ] is equal to 1 for any value of h in the
    4990   // range of 1 to vps_num_layer_sets_minus1, inclusive, and any value of i in the range of 0 to num_bitstream_partitions[ h ] - 1,
    4991   // inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ] for at least one value of j in the range of 1 to
    4992   // NumLayersInIdList[ h ] - 1, inclusive, shall be equal to 1.
    4993   // ---------------
    4994 
    4995 
    4996   // When num_bitstream_partitions[ h ] is equal to 1 for any value of h in the range 1 to vps_num_layer_set_minus1, inclusive,
    4997   // the value of layer_in_bsp_flag[ h ][ 0 ][ j ] should be equal to 0 for at least one value of j in the range 0 to
    4998   // NumLayersInIdList[ h ] ? 1, inclusive.
    4999 
    5000 
    5001   if ( getNumBitstreamPartitions( h ) == 1 )
    5002   {
    5003     Bool atLeastOneZero = false;
    5004     for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ )
    5005     {
    5006       atLeastOneZero = atLeastOneZero || !getLayerInBspFlag( h, 0, j );
    5007     }   
    5008     assert( atLeastOneZero );
    5009   }
    5010 
    5011  
    5012   // For any value of h in the range 1 to vps_num_layer_set_minus1, inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ]
    5013   // shall be equal to 1 for at most one value of i in the range of 0 to num_bitstream_partitions[ h ] ? 1, inclusive.
    5014 
    5015   for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ )
    5016   {
    5017     Int numLayerInBsp = 0;
    5018     for ( Int i = 0; i <= getNumBitstreamPartitions( h ) - 1; i++ )
    5019     {
    5020       numLayerInBsp += ( getLayerInBspFlag( h, i, j ) ? 1 : 0 ); 
    5021     }   
    5022     assert( numLayerInBsp <= 1 );
    5023   }
    5024 
    5025 }
    5026 
    5027 Void TComVpsVuiBspHrdParameters::checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j )
    5028 {
    5029   // bsp_comb_hrd_idx
    5030   assert( getBspCombSchedIdx(h, i, j ) >= 0 );
    5031   assert( getBspCombSchedIdx(h, i, j ) <= getVpsNumBspHrdParametersMinus1() );
    5032 
    5033   // bsp_comb_sched_idx
    5034   assert( getBspCombSchedIdx(h, i, j ) >= 0 );
    5035 
    5036   //* This check needs to activated,  when HighestTid is available here   
    5037   //  assert(  getBspCombSchedIdx(h, i, j ) <= vps->getHrdParameters( getBspCombHrdIdx( h, i, j ) )->getCpbCntMinus1( highestTid ) );
    5038 }
    5039 #endif
    5040 
    5041 #if H_MV_HLS10_VPS_VUI_BSP
     4617
    50424618
    50434619TComVpsVuiBspHrdParameters::~TComVpsVuiBspHrdParameters()
     
    51374713}
    51384714
    5139 #endif
    51404715
    51414716Void TComVUI::inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr )
     
    51734748      for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ )
    51744749      {
    5175 #if H_MV_HLS10_ADD_LAYERSETS
    51764750        m_maxVpsDecPicBufferingMinus1[i][k][j] = MIN_INT;
    5177 #else
    5178         m_maxVpsDecPicBufferingMinus1[i][k][j] = 0;
    5179 #endif
    51804751      }
    51814752    }
  • trunk/source/Lib/TLibCommon/TComSlice.h

    r1066 r1084  
    4545#include "TComRom.h"
    4646#include "TComList.h"
    47 #if H_MV_HLS10_GEN_FIX
    4847#if H_MV
    4948#include <ios>
    5049#include <iostream>
    5150#include <iomanip>
    52 #endif
    5351#endif
    5452//! \ingroup TLibCommon
     
    207205  Bool m_frameOnlyConstraintFlag;
    208206 
    209 #if H_MV_HLS10_PTL
    210207#if H_MV
    211208  Bool m_max12bitConstraintFlag;
     
    220217  Bool m_inbldFlag;
    221218#endif
    222 #endif
    223219public:
    224220  ProfileTierLevel();
     
    252248
    253249#if H_MV
    254 #if H_MV_HLS10_PTL
    255250  Void setMax12bitConstraintFlag( Bool flag ) { m_max12bitConstraintFlag = flag; }
    256251  Bool getMax12bitConstraintFlag(  ) { return m_max12bitConstraintFlag; }
     
    281276  Void setInbldFlag( Bool flag ) { m_inbldFlag = flag; }
    282277  Bool getInbldFlag(  ) { return m_inbldFlag; }
    283 #endif
    284 #if H_MV_HLS10_PTL_INFER_FIX
    285278  Bool getV2ConstraintsPresentFlag(); 
    286279  Bool getInbldPresentFlag();
    287280  Void copyV2ConstraintFlags( ProfileTierLevel* ptlRef );
    288281  Void copyProfile( ProfileTierLevel* ptlRef );
    289 #endif
    290282#endif
    291283};
     
    310302  ProfileTierLevel* getSubLayerPTL(Int i)  { return &m_subLayerPTL[i]; }
    311303#if H_MV
    312 #if H_MV_HLS10_PTL_INFER_FIX
    313304  Void inferGeneralValues ( Bool profilePresentFlag  , Int k, TComPTL* refPTL );;
    314305  Void inferSubLayerValues( Int maxNumSubLayersMinus1, Int k, TComPTL* refPTL );;
    315 #else
    316   Void copyLevelFrom( TComPTL* source );
    317 #endif
    318306#endif
    319307};
     
    501489class TComVpsVuiBspHrdParameters
    502490{
    503 #if H_MV_HLS10_VPS_VUI_BSP
    504491
    505492  /* Not yet tested */
     
    563550  Void setHrdParametermeters( Int k, TComHRD* val  ) {  *(m_hrdParameters + k ) = *val; };
    564551  TComHRD* getHrdParametermeters( Int k ) {  return m_hrdParameters + k; };
    565 #else
    566 private:
    567   Int  m_vpsNumBspHrdParametersMinus1;
    568   Bool m_bspCprmsPresentFlag[MAX_NUM_BSP_HRD_PARAMETERS];
    569   Int  m_numBitstreamPartitions[MAX_VPS_OP_SETS_PLUS1];
    570   Bool m_layerInBspFlag[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_LAYERS];
    571   Int  m_numBspSchedCombinationsMinus1[MAX_VPS_OP_SETS_PLUS1];
    572   Int  m_bspCombHrdIdx[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_BSP_SCHED_COMBINATION];
    573   Int  m_bspCombSchedIdx[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_BSP_SCHED_COMBINATION];
    574   TComHRD* m_hrdParameters[MAX_NUM_BSP_HRD_PARAMETERS];
    575 public:
    576 
    577   Void setVpsNumBspHrdParametersMinus1( Int  val ) { m_vpsNumBspHrdParametersMinus1 = val; }
    578   Int  getVpsNumBspHrdParametersMinus1(  ) { return m_vpsNumBspHrdParametersMinus1; }
    579 
    580   Void setBspCprmsPresentFlag( Int i, Bool flag ) { m_bspCprmsPresentFlag[i] = flag; }
    581   Bool getBspCprmsPresentFlag( Int i ) { return m_bspCprmsPresentFlag[i]; }
    582 
    583   Void setNumBitstreamPartitions( Int h, Int  val ) { m_numBitstreamPartitions[h] = val; }
    584   Int  getNumBitstreamPartitions( Int h ) { return m_numBitstreamPartitions[h]; }
    585 
    586   Void setLayerInBspFlag( Int h, Int i, Int j, Bool flag ) { m_layerInBspFlag[h][i][j] = flag; }
    587   Bool getLayerInBspFlag( Int h, Int i, Int j ) { return m_layerInBspFlag[h][i][j]; }
    588   Void checkLayerInBspFlag ( TComVPS* vps, Int h ); 
    589 
    590   Void setNumBspSchedCombinationsMinus1( Int h, Int  val ) { m_numBspSchedCombinationsMinus1[h] = val; }
    591   Int  getNumBspSchedCombinationsMinus1( Int h ) { return m_numBspSchedCombinationsMinus1[h]; }
    592 
    593   Void setBspCombHrdIdx( Int h, Int i, Int j, Int  val ) { m_bspCombHrdIdx[h][i][j] = val; }
    594   Int  getBspCombHrdIdx( Int h, Int i, Int j ) { return m_bspCombHrdIdx[h][i][j]; }
    595   Int  getBspCombHrdIdxLen() { return gCeilLog2( getVpsNumBspHrdParametersMinus1() + 1);  };
    596 
    597 
    598   Void setBspCombSchedIdx( Int h, Int i, Int j, Int  val ) { m_bspCombSchedIdx[h][i][j] = val; }
    599   Int  getBspCombSchedIdx( Int h, Int i, Int j ) { return m_bspCombSchedIdx[h][i][j]; }
    600 
    601   Void checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j );
    602 
    603   Void setHrdParametermeters( Int k, TComHRD* val  ) {  m_hrdParameters[k] = val; };
    604   TComHRD* getHrdParametermeters( Int k ) {  return m_hrdParameters[k]; };
    605 #endif
    606552};
    607553
     
    630576  Bool m_wppNotInUseFlag;
    631577  Bool m_wppInUseFlag                [MAX_NUM_LAYERS];
    632 #if H_MV_HLS10_VPS_VUI
    633578  Bool m_singleLayerForNonIrapFlag;
    634579  Bool m_higherLayerIrapSkipFlag;
    635 #endif
    636580  Bool m_ilpRestrictedRefLayersFlag;
    637581  Int  m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS][MAX_NUM_LAYERS];
     
    708652  Bool getWppInUseFlag( Int i ) { return m_wppInUseFlag[i]; }
    709653
    710 #if H_MV_HLS10_VPS_VUI
    711654  Void setSingleLayerForNonIrapFlag( Bool flag ) { m_singleLayerForNonIrapFlag = flag; }
    712655  Bool getSingleLayerForNonIrapFlag(  ) { return m_singleLayerForNonIrapFlag; }
     
    714657  Void setHigherLayerIrapSkipFlag( Bool flag ) { m_higherLayerIrapSkipFlag = flag; }
    715658  Bool getHigherLayerIrapSkipFlag(  ) { return m_higherLayerIrapSkipFlag; }
    716 #endif
    717659
    718660  Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; }
     
    750692  Int  m_bitDepthVpsLumaMinus8;
    751693  Int  m_bitDepthVpsChromaMinus8;
    752 #if H_MV_HLS10_GEN_VSP_CONF_WIN
    753694  Bool m_conformanceWindowVpsFlag;
    754695  Int  m_confWinVpsLeftOffset;
     
    756697  Int  m_confWinVpsTopOffset;
    757698  Int  m_confWinVpsBottomOffset;
    758 #endif
    759699
    760700public:
    761701
    762 #if H_MV_HLS10_GEN_VSP_CONF_WIN
    763702  TComRepFormat()
    764703  {
     
    769708  m_confWinVpsBottomOffset   = 0;
    770709  }; 
    771 #else
    772   TComRepFormat() { }; 
    773 #endif
    774710
    775711  Void setChromaAndBitDepthVpsPresentFlag( Bool flag ) { m_chromaAndBitDepthVpsPresentFlag = flag; }
     
    796732  Int  getBitDepthVpsChromaMinus8(  ) { return m_bitDepthVpsChromaMinus8; }
    797733
    798 #if H_MV_HLS10_GEN_VSP_CONF_WIN
    799734  Void setConformanceWindowVpsFlag( Bool flag ) { m_conformanceWindowVpsFlag = flag; }
    800735  Bool getConformanceWindowVpsFlag(  ) { return m_conformanceWindowVpsFlag; }
     
    811746  Void setConfWinVpsBottomOffset( Int  val ) { m_confWinVpsBottomOffset = val; }
    812747  Int  getConfWinVpsBottomOffset(  ) { return m_confWinVpsBottomOffset; }
    813 #endif
    814748};
    815749
     
    834768
    835769  Void setMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j, Int  val ) { m_maxVpsDecPicBufferingMinus1[i][k][j] = val; }
    836   #if H_MV_HLS10_ADD_LAYERSETS
    837770  Int  getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) { assert( m_maxVpsDecPicBufferingMinus1[i][k][j] >= 0 ); return m_maxVpsDecPicBufferingMinus1[i][k][j]; }     
    838   #else
    839   Int  getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) { return m_maxVpsDecPicBufferingMinus1[i][k][j]; }
    840   #endif
    841771
    842772  Void setMaxVpsNumReorderPics( Int i, Int j, Int  val ) { m_maxVpsNumReorderPics[i][j] = val; }
     
    853783#if H_MV
    854784  Bool        m_vpsBaseLayerInternalFlag;
    855 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL
    856785  Bool        m_vpsBaseLayerAvailableFlag;
    857 #endif // H_MV_HLS10_GEN
    858786#endif
    859787
     
    925853  Int         m_layerSetIdxForOlsMinus1  [MAX_VPS_OUTPUTLAYER_SETS]; 
    926854  Bool        m_outputLayerFlag          [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1];
    927 #if H_MV_HLS10_PTL
    928855  Int         m_profileTierLevelIdx      [MAX_VPS_OUTPUTLAYER_SETS ][MAX_NUM_LAYERS];
    929 #else 
    930   Int         m_profileLevelTierIdx      [MAX_VPS_OUTPUTLAYER_SETS ];
    931 #endif
    932856  Bool        m_altOutputLayerFlag       [MAX_VPS_OUTPUTLAYER_SETS];
    933857  Bool        m_repFormatIdxPresentFlag;
     
    958882  // VPS EXTENSION SEMANTICS VARIABLES
    959883  Int         m_layerIdInVps             [MAX_NUM_LAYERS   ];
    960 #if H_MV_HLS10_REF_PRED_LAYERS
    961884  Int         m_dependencyFlag           [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    962 #endif
    963885
    964886  Int         m_numDirectRefLayers       [MAX_NUM_LAYERS];
    965 #if H_MV_HLS10_REF_PRED_LAYERS
    966887  Int         m_idDirectRefLayer         [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 
    967 #else
    968   Int         m_refLayerId               [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 
    969 #endif
    970888
    971889  Int         m_numRefLayers             [MAX_NUM_LAYER_IDS];
    972 #if H_MV_HLS10_REF_PRED_LAYERS
    973890  Int         m_idRefLayer               [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 
    974 #endif
    975891
    976892
    977893  Int         m_numPredictedLayers       [MAX_NUM_LAYERS ];
    978 #if !H_MV_HLS10_REF_PRED_LAYERS
    979   Int         m_predictedLayerId         [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS];
    980 #else
    981894  Int         m_idPredictedLayer         [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS];
    982 #endif
    983895  Int         m_numIndependentLayers;
    984896  Int         m_numLayersInTreePartition [MAX_NUM_LAYER_IDS];
    985897  Int         m_treePartitionLayerIdList [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS];
    986 #if H_MV_HLS10_REF_PRED_LAYERS
    987898  Bool        m_recursiveRefLayerFlag    [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS];
    988   #endif
    989899  Int         m_viewIndex                [MAX_NUM_LAYERS   ];
    990900 
     
    993903  std::vector< std::vector< Int> >       m_layerSetLayerIdList;
    994904
    995 #if H_MV_HLS10_NESSECARY_LAYER
    996905  Int        m_numNecessaryLayers        [MAX_VPS_OUTPUTLAYER_SETS];
    997906  Bool       m_necessaryLayerFlag        [MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYERS];
    998 #endif
    999907
    1000908  Int         xGetDimBitOffset( Int j );
    1001 #if H_MV_HLS10_REF_PRED_LAYERS
    1002909  Void        xSetRefLayerFlags( Int currLayerId );
    1003 #endif
    1004910  // VPS EXTENSION 2 SYNTAX ELEMENTS
    1005911#if H_3D_ARP
     
    1009915#if H_3D_IV_MERGE
    1010916  Bool        m_ivMvPredFlag             [ MAX_NUM_LAYERS ];
    1011 #if SEC_HLS_CLEANUP_I0100
    1012917  Bool        m_ivMvScalingFlag          [ MAX_NUM_LAYERS ];
    1013 #endif
    1014918#if H_3D_SPIVMP
    1015919  Int         m_iSubPULog2Size           [MAX_NUM_LAYERS   ];
    1016 #if MTK_I0099_VPS_EX2
    1017920  Int         m_iSubPUMPILog2Size        [MAX_NUM_LAYERS   ];
    1018 #else
    1019   Int         m_iSubPUMPILog2Size;
    1020 #endif
    1021 #endif
    1022 #endif
    1023 #if MTK_I0099_VPS_EX2
     921#endif
     922#endif
     923#if H_3D_QTLPC
    1024924  Bool        m_bLimQtPredFlag           [ MAX_NUM_LAYERS ];
    1025925#endif
     
    1031931#endif
    1032932  Bool        m_vpsDepthModesFlag        [MAX_NUM_LAYERS   ];
    1033 #if SEPARATE_FLAG_I0085
     933#if H_3D
    1034934  Bool        m_bIVPFlag                 [MAX_NUM_LAYERS   ];
    1035935#endif
    1036 
    1037936#if H_3D
    1038937  UInt        m_uiCamParPrecision;
     
    1041940  Int         ***m_aaaiCodedScale ;
    1042941  Int         ***m_aaaiCodedOffset;
    1043 
    1044 #if !SEC_HLS_CLEANUP_I0100
    1045   Bool        m_ivMvScalingFlag;
    1046 #endif
    1047 
    1048942#endif
    1049943#if H_3D_INTER_SDC
     
    1081975  Void    setVpsBaseLayerInternalFlag( Bool flag ) { m_vpsBaseLayerInternalFlag = flag; }
    1082976  Bool    getVpsBaseLayerInternalFlag(  )          { return m_vpsBaseLayerInternalFlag; }
    1083 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL
    1084977  Void    setVpsBaseLayerAvailableFlag( Bool flag ) { m_vpsBaseLayerAvailableFlag = flag; }
    1085978  Bool    getVpsBaseLayerAvailableFlag(  )          { return m_vpsBaseLayerAvailableFlag; }
    1086979#endif
    1087 #endif
    1088980
    1089981  UInt    getMaxTLayers  ()                   { return m_uiMaxTLayers;   }
     
    1092984#if H_MV   
    1093985  UInt    getMaxSubLayersMinus1()             { return m_uiMaxTLayers - 1;  }  // For consistency with draft spec
    1094 #if H_MV_HLS10_GEN_FIX
    1095986  Void    setMaxSubLayersMinus1(UInt val)     { m_uiMaxTLayers = (val + 1); };
    1096 #endif
    1097987  UInt    getMaxLayersMinus1()                { return m_uiMaxLayersMinus1;  };
    1098988  Void    setMaxLayersMinus1(UInt l)          { m_uiMaxLayersMinus1 = l; }
     
    11341024
    11351025#if H_MV
    1136 #if H_MV_HLS10_PTL
    11371026  TComPTL* getPTL( Int idx = 0 ) { return &m_pcPTL[idx]; }
    1138 #else
    1139   TComPTL* getPTL( Int layerSet = 0 ) { return &m_pcPTL[layerSet]; }
    1140 #endif
    11411027#else
    11421028  TComPTL* getPTL() { return &m_pcPTL; }
     
    12181104  Void    setLayerSetIdxForOlsMinus1( Int outLayerSetIdx, Int val )        { m_layerSetIdxForOlsMinus1[ outLayerSetIdx ]  = val; }
    12191105  Int     getLayerSetIdxForOlsMinus1( Int outLayerSetIdx )                 { return m_layerSetIdxForOlsMinus1[ outLayerSetIdx ]; }
    1220 #if VPS_MISC_UPDATES
    12211106  Int     getLayerSetIdxForOlsMinus1Len( Int outLayerSetIdx )              { return gCeilLog2( getNumLayerSets() ); }
    1222 #endif
    12231107
    12241108  Void    setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag )       { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; }
     
    12271111  Bool    inferOutputLayerFlag( Int i, Int j );
    12281112
    1229 #if H_MV_HLS10_PTL
    12301113  Void    setProfileTierLevelIdx( Int i, Int j, Int val )                  { m_profileTierLevelIdx[ i ][ j ] = val; }
    12311114  Int     getProfileTierLevelIdx( Int i, Int j )                           { return m_profileTierLevelIdx[ i ][ j ]; }
    1232 #if H_MV_HLS10_PTL_FIX
    12331115  Int     inferProfileTierLevelIdx( Int i, Int j );
    1234 #endif
    1235 #else
    1236   Void    setProfileLevelTierIdx( Int outLayerSetIdx, Int val )            { m_profileLevelTierIdx[ outLayerSetIdx ] = val; }
    1237   Int     getProfileLevelTierIdx( Int outLayerSetIdx )                     { return m_profileLevelTierIdx[ outLayerSetIdx ]; }
    1238 #endif
    12391116 
    12401117  Void    setAltOutputLayerFlag( Int i, Bool flag )                        { m_altOutputLayerFlag[i] = flag; }
     
    12661143  TComDpbSize* getDpbSize( )                                               { return m_dpbSize;}
    12671144 
    1268 #if !H_MV_HLS10_ADD_LAYERSETS 
    1269   Void    inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder );
    1270 #endif
    12711145
    12721146  Void    setPocLsbNotPresentFlag( Int i, Bool flag )                      { m_pocLsbNotPresentFlag[i] = flag; }
     
    12991173
    13001174  Int     getViewIndex    ( Int layerIdInNuh )                             { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX  ); }   
    1301 #if H_MV_HLS10_AUX
    13021175  Int     getAuxId        ( Int layerIdInNuh )                             { return getScalabilityId( getLayerIdInVps(layerIdInNuh), AUX_ID  ); }   
    13031176  Int     getDependencyId ( Int layerIdInNuh )                             { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPENDENCY_ID  ); }   
    1304 #endif
    13051177  Int     getNumViews();
    13061178
    1307 #if H_MV_HLS10_REF_PRED_LAYERS
    13081179  Bool    getDependencyFlag( Int i, Int j )                                { return m_dependencyFlag[i][j]; }
    1309 #endif
    13101180  Int     getNumDirectRefLayers( Int layerIdInNuh )                        { return m_numDirectRefLayers[ layerIdInNuh ];  };                               
    1311 #if !H_MV_HLS10_REF_PRED_LAYERS
    1312   Int     getRefLayerId        ( Int layerIdInNuh, Int idx );;
    1313 #endif
    13141181  Int     getNumRefLayers            ( Int i )        { return m_numRefLayers[i]; }
    13151182  Int     getNumPredictedLayers      ( Int i )        { return m_numPredictedLayers[i]; }
    13161183
    1317 #if !H_MV_HLS10_REF_PRED_LAYERS 
    1318   Int     getPredictedLayerId        ( Int i, Int j ) { return m_predictedLayerId[i][j]; }
    1319 #else
    13201184  Int     getIdRefLayer              ( Int i, Int j ) { assert( j >= 0 && j < getNumRefLayers      ( i )); return m_idRefLayer      [i][j]; }
    13211185  Int     getIdPredictedLayer        ( Int i, Int j ) { assert( j >= 0 && j < getNumPredictedLayers( i )); return m_idPredictedLayer[i][j]; }
    13221186  Int     getIdDirectRefLayer        ( Int i, Int j ) { assert( j >= 0 && j < getNumDirectRefLayers( i )); return m_idDirectRefLayer[i][j]; }
    1323 #endif
    13241187  Int     getNumIndependentLayers    (  )             { return m_numIndependentLayers; }
    13251188  Int     getNumLayersInTreePartition( Int i )        { return m_numLayersInTreePartition[i]; }
     
    13281191  Int     getNumLayerSets( )                                               { return getVpsNumLayerSetsMinus1() + 1 + getNumAddLayerSets();  }; 
    13291192 
    1330 #if H_MV_HLS10_ADD_LAYERSETS
    13311193  Int     getFirstAddLayerSetIdx()                    { return getVpsNumLayerSetsMinus1() + 1; }
    13321194  Int     getLastAddLayerSetIdx()                     { return getFirstAddLayerSetIdx() + getNumAddLayerSets() - 1; }
    1333 #endif
    13341195  Bool    checkVPSExtensionSyntax();
    13351196  Int     scalTypeToScalIdx   ( ScalabilityType scalType );
    13361197
    1337 #if H_MV_HLS10_PTL
    13381198  Int     getProfileTierLevelIdxLen()                                      { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); };       
    1339 #else
    1340   Int     getProfileLevelTierIdxLen()                                      { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); };       
    1341 #endif
    13421199  Int     getVpsRepFormatIdxLen()                                          { return gCeilLog2( getVpsNumRepFormatsMinus1() + 1 ); };       
    13431200
     
    13501207  Void    deriveLayerSetLayerIdList();
    13511208
    1352 #if H_MV_HLS10_ADD_LAYERSETS
    13531209  Int     olsIdxToLsIdx( Int i )                                           { return ( i < getNumLayerSets() ) ? i  : getLayerSetIdxForOlsMinus1( i ) + 1 ; };
    1354 #else
    1355   Int     olsIdxToLsIdx( Int i )                                           { return ( i <= getVpsNumLayerSetsMinus1() ) ? i  : getLayerSetIdxForOlsMinus1( i ) + 1 ; };
    1356 #endif
    13571210  Void    initTargetLayerIdLists  ( );
    13581211  Void    deriveTargetLayerIdList ( Int i );
     
    13631216  Int     getOlsHighestOutputLayerId( Int i )                              { return getTargetOptLayerIdList( i ).back(); }; 
    13641217
    1365 #if H_MV_HLS10_ADD_LAYERSETS
    13661218  Void    deriveAddLayerSetLayerIdList( Int i );
    1367 #endif
    1368 #if H_MV_HLS10_NESSECARY_LAYER
    13691219  Void    deriveNecessaryLayerFlags( Int olsIdx );;
    13701220  Int     getNecessaryLayerFlag( Int i, Int j )                            { AOF( i >= 0 && i < getNumOutputLayerSets() ); AOF( j >= 0 && j < getNumLayersInIdList( olsIdxToLsIdx( i ) )  );  return m_necessaryLayerFlag[i][j]; }; 
    1371 #endif
    13721221
    13731222  Int     getMaxSubLayersInLayerSetMinus1( Int i );
     
    13801229
    13811230  // helpers
    1382 #if !H_MV_HLS10_REF_PRED_LAYERS
    1383   Bool    getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 );
    1384 #endif
    1385 #if !H_MV_HLS10_MAXNUMPICS
    1386   Int     getMaxNumPics( Int layerId );
    1387 #endif
    1388 #if H_MV_HLS10_ADD_LAYERSETS
    13891231  Void    printPTL();
    13901232  Void    printLayerDependencies();
    1391 #if H_MV_HLS10_AUX
    13921233  Void    printScalabilityId();;
    1393 #endif
    13941234  Void    printLayerSets();;
    13951235
     
    14361276    xPrintArray( name, 1, idx2, numElemDim2, vec2, printNumber, false );
    14371277  }
    1438 #endif
    14391278
    14401279
     
    14701309  Int     getSubPULog2Size(Int layerIdInVps)           { return m_iSubPULog2Size[layerIdInVps]; }
    14711310  Void    setSubPULog2Size(Int layerIdInVps, Int u)    { m_iSubPULog2Size[layerIdInVps] = u;}
    1472 #if MTK_I0099_VPS_EX2
    14731311  Int     getSubPUMPILog2Size(Int layerIdInVps)           { return m_iSubPUMPILog2Size[layerIdInVps]; }
    14741312  Void    setSubPUMPILog2Size(Int layerIdInVps, Int u)    { m_iSubPUMPILog2Size[layerIdInVps] = u;}
    1475 #else
    1476   Int     getSubPUMPILog2Size( )           { return m_iSubPUMPILog2Size; }
    1477   Void    setSubPUMPILog2Size( Int u )     { m_iSubPUMPILog2Size = u;    }
    1478 #endif
    1479 #endif
    1480 #endif
    1481 #if MTK_I0099_VPS_EX2
     1313#endif
     1314#endif
     1315#if H_3D_QTLPC
    14821316  Void    setLimQtPredFlag    ( Int layerIdInVps, Bool val )  { m_bLimQtPredFlag[ layerIdInVps ] = val; }
    14831317  Bool    getLimQtPredFlag    ( Int layerIdInVps ) { return m_bLimQtPredFlag[layerIdInVps];}
     
    14931327  Void    setVpsDepthModesFlag( Int layerIdInVps, Bool val )               { m_vpsDepthModesFlag[ layerIdInVps ] = val; }
    14941328  Bool    getVpsDepthModesFlag( Int layerIdInVps )                         { return m_vpsDepthModesFlag[ layerIdInVps ]; }
    1495 #if SEPARATE_FLAG_I0085
     1329
    14961330  Void    setIVPFlag( Int layerIdInVps, Bool val )                    { m_bIVPFlag[ layerIdInVps ] = val; }
    14971331  Bool    getIVPFlag( Int layerIdInVps )                              { return m_bIVPFlag[ layerIdInVps ]; }
    1498 #endif
    1499 
    1500 #if SEC_HLS_CLEANUP_I0100
     1332
    15011333  Bool    getIvMvScalingFlag   ( Int layerIdInVps )                        { return m_ivMvScalingFlag[ layerIdInVps ]; }
    15021334  Void    setIvMvScalingFlag   (Int layerIdInVps, Bool b )                 { m_ivMvScalingFlag[ layerIdInVps ] = b;    } 
    1503 #else
    1504   Bool    getIvMvScalingFlag   (  )                       { return m_ivMvScalingFlag; }
    1505   Void    setIvMvScalingFlag   ( Bool b )                 { m_ivMvScalingFlag = b;    } 
    1506 #endif
    15071335
    15081336#if H_3D_INTER_SDC
     
    15301358  Bool        m_bInterViewDltPredEnableFlag[ MAX_NUM_LAYERS ];
    15311359
    1532 #if !FIX_TICKET_77
    1533   Int         m_iBitsPerDepthValue       [ MAX_NUM_LAYERS ];
    1534 #endif
    15351360  Int         m_iNumDepthmapValues       [ MAX_NUM_LAYERS ];
    15361361  Int*        m_iDepthValue2Idx          [ MAX_NUM_LAYERS ];
     
    15591384  UInt    getDepthViewBitDepth()                          { return m_uiDepthViewBitDepth; }
    15601385
    1561 #if !FIX_TICKET_77
    1562   Int     getBitsPerDepthValue( Int layerIdInVps )        { return getUseDLTFlag(layerIdInVps)?m_iBitsPerDepthValue[layerIdInVps]:g_bitDepthY; }
    1563 #endif
    15641386  Int     getNumDepthValues( Int layerIdInVps )           { return getUseDLTFlag(layerIdInVps)?m_iNumDepthmapValues[layerIdInVps]:((1 << g_bitDepthY)-1); }
    15651387  Int     depthValue2idx( Int layerIdInVps, Pel value )   { return getUseDLTFlag(layerIdInVps)?m_iDepthValue2Idx[layerIdInVps][value]:value; }
    1566 #if RWTH_DLT_CLIP_I0057
    15671388  Pel     idx2DepthValue( Int layerIdInVps, UInt uiIdx )  { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][ClipY(uiIdx)]:uiIdx; }
    1568 #else
    1569   Pel     idx2DepthValue( Int layerIdInVps, UInt uiIdx )  { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][uiIdx]:uiIdx; }
    1570 #endif
    15711389  Void    setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 );
    1572 #if H_3D_DELTA_DLT
    15731390  Int*    idx2DepthValue( Int layerIdInVps )  { return m_iIdx2DepthValue[layerIdInVps]; }
    15741391  Void    getDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTOut, UInt *puiDeltaDLTOutNum );
    15751392  Void    setDeltaDLT( Int layerIdInVps, Int* piDLTInRef, UInt uiDLTInRefNum, Int* piDeltaDLTIn, UInt uiDeltaDLTInNum );
    1576 #endif
    15771393};
    15781394#endif
     
    18331649  Bool        m_useAMP;
    18341650
    1835 #if !MTK_I0099_VPS_EX2
    1836 #if H_3D_QTLPC
    1837   Bool        m_bUseQTL;
    1838   Bool        m_bUsePC;
    1839 #endif
    1840 #endif
    18411651  // Parameter
    18421652  Int         m_bitDepthY;
     
    18801690  TComVPS*    m_pcVPS;
    18811691  // SPS
    1882 #if H_MV_HLS10_MULTILAYERSPS
    18831692  Int         m_spsMaxSubLayersMinus1;
    18841693  Int         m_spsExtOrMaxSubLayersMinus1;
    1885 #endif
    18861694  Bool        m_spsExtensionPresentFlag;
    18871695
     
    19011709  // SPS Extension
    19021710  Bool        m_interViewMvVertConstraintFlag;
    1903 #if !H_MV_HLS10_PPS
    1904   Int         m_numScaledRefLayerOffsets;
    1905   Int         m_scaledRefLayerId          [MAX_NUM_SCALED_REF_LAYERS];
    1906   Int         m_scaledRefLayerLeftOffset  [MAX_NUM_LAYERS];
    1907   Int         m_scaledRefLayerTopOffset   [MAX_NUM_LAYERS];
    1908   Int         m_scaledRefLayerRightOffset [MAX_NUM_LAYERS];
    1909   Int         m_scaledRefLayerBottomOffset[MAX_NUM_LAYERS];
    1910 #endif
    19111711#endif
    19121712#if H_3D
     
    20121812#if H_MV
    20131813  UInt      getSpsMaxSubLayersMinus1()                { return ( m_uiMaxTLayers - 1); }
    2014 #if H_MV_HLS10_MULTILAYERSPS
    20151814  Void      setSpsMaxSubLayersMinus1( UInt val )       { setMaxTLayers( val + 1 ); }
    2016 #endif
    20171815#endif
    20181816
     
    20471845  TComPTL* getPTL()     { return &m_pcPTL; }
    20481846#if H_MV
    2049 #if H_MV_HLS10_MULTILAYERSPS
    20501847  Void setSpsExtOrMaxSubLayersMinus1( Int  val ) { m_spsExtOrMaxSubLayersMinus1 = val; }
    20511848  Int  getSpsExtOrMaxSubLayersMinus1(  ) { return m_spsExtOrMaxSubLayersMinus1; }
     
    20531850
    20541851  Bool getMultiLayerExtSpsFlag()            { return ( getLayerId() != 0  &&  getSpsExtOrMaxSubLayersMinus1() == 7 ); }
    2055 #endif
    20561852  Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder );
    20571853
     
    20921888  Bool getInterViewMvVertConstraintFlag()         { return m_interViewMvVertConstraintFlag;}
    20931889
    2094 #if !H_MV_HLS10_PPS
    2095   Void setNumScaledRefLayerOffsets( Int  val )    { m_numScaledRefLayerOffsets = val; }
    2096   Int  getNumScaledRefLayerOffsets(  )            { return m_numScaledRefLayerOffsets; }
    2097 
    2098   Void setScaledRefLayerId( Int i, Int  val )     { m_scaledRefLayerId[i] = val; }
    2099   Int  getScaledRefLayerId( Int i )               { return m_scaledRefLayerId[i]; }
    2100 
    2101   Void setScaledRefLayerLeftOffset( Int j, Int  val ) { m_scaledRefLayerLeftOffset[j] = val; }
    2102   Int  getScaledRefLayerLeftOffset( Int j )           { return m_scaledRefLayerLeftOffset[j]; }
    2103 
    2104   Void setScaledRefLayerTopOffset( Int j, Int  val )  { m_scaledRefLayerTopOffset[j] = val; }
    2105   Int  getScaledRefLayerTopOffset( Int j )            { return m_scaledRefLayerTopOffset[j]; }
    2106 
    2107   Void setScaledRefLayerRightOffset( Int j, Int  val ) { m_scaledRefLayerRightOffset[j] = val; }
    2108   Int  getScaledRefLayerRightOffset( Int j )           { return m_scaledRefLayerRightOffset[j]; }
    2109 
    2110   Void setScaledRefLayerBottomOffset( Int j, Int  val ) { m_scaledRefLayerBottomOffset[j] = val; }
    2111   Int  getScaledRefLayerBottomOffset( Int j )           { return m_scaledRefLayerBottomOffset[j]; }
    2112 #endif
    21131890  // Inference
    21141891
     
    21191896  Void checkRpsMaxNumPics( TComVPS* vps, Int currLayerId );
    21201897
    2121 #endif
    2122 #if !MTK_I0099_VPS_EX2
    2123 #if H_3D_QTLPC
    2124   Void setUseQTL( Bool b ) { m_bUseQTL = b;    }
    2125   Bool getUseQTL()         { return m_bUseQTL; }
    2126   Void setUsePC ( Bool b ) { m_bUsePC  = b;    }
    2127   Bool getUsePC ()         { return m_bUsePC;  }
    2128 #endif
    21291898#endif
    21301899#if H_MV
     
    22011970 
    22021971  Bool     m_loopFilterAcrossTilesEnabledFlag;
    2203   Int      m_uniformSpacingFlag;
    2204   Int      m_iNumColumnsMinus1;
    2205   UInt*    m_puiColumnWidth;
    2206   Int      m_iNumRowsMinus1;
    2207   UInt*    m_puiRowHeight;
    2208 
    2209   Int      m_iNumSubstreams;
     1972  Bool             m_uniformSpacingFlag;
     1973  Int              m_numTileColumnsMinus1;
     1974  Int              m_numTileRowsMinus1;
     1975  std::vector<Int> m_tileColumnWidth;
     1976  std::vector<Int> m_tileRowHeight;
     1977
     1978  Int      m_numSubstreams;
    22101979
    22111980  Int      m_signHideFlag;
     
    23042073  Bool    getDependentSliceSegmentsEnabledFlag() const     { return m_dependentSliceSegmentsEnabledFlag; }
    23052074  Void    setDependentSliceSegmentsEnabledFlag(Bool val)   { m_dependentSliceSegmentsEnabledFlag = val; }
    2306   Bool    getTilesEnabledFlag() const                      { return m_tilesEnabledFlag; }
    2307   Void    setTilesEnabledFlag(Bool val)                    { m_tilesEnabledFlag = val; }
    23082075  Bool    getEntropyCodingSyncEnabledFlag() const          { return m_entropyCodingSyncEnabledFlag; }
    23092076  Void    setEntropyCodingSyncEnabledFlag(Bool val)        { m_entropyCodingSyncEnabledFlag = val; }
    2310   Void     setUniformSpacingFlag            ( Bool b )          { m_uniformSpacingFlag = b; }
    2311   Bool     getUniformSpacingFlag            ()                  { return m_uniformSpacingFlag; }
    2312   Void     setNumColumnsMinus1              ( Int i )           { m_iNumColumnsMinus1 = i; }
    2313   Int      getNumColumnsMinus1              ()                  { return m_iNumColumnsMinus1; }
    2314   Void     setColumnWidth ( UInt* columnWidth )
    2315   {
    2316     if( m_uniformSpacingFlag == 0 && m_iNumColumnsMinus1 > 0 )
    2317     {
    2318       m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ];
    2319 
    2320       for(Int i=0; i<m_iNumColumnsMinus1; i++)
    2321       {
    2322         m_puiColumnWidth[i] = columnWidth[i];
    2323       }
    2324     }
    2325   }
    2326   UInt     getColumnWidth  (UInt columnIdx) { return *( m_puiColumnWidth + columnIdx ); }
    2327   Void     setNumRowsMinus1( Int i )        { m_iNumRowsMinus1 = i; }
    2328   Int      getNumRowsMinus1()               { return m_iNumRowsMinus1; }
    2329   Void     setRowHeight    ( UInt* rowHeight )
    2330   {
    2331     if( m_uniformSpacingFlag == 0 && m_iNumRowsMinus1 > 0 )
    2332     {
    2333       m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ];
    2334 
    2335       for(Int i=0; i<m_iNumRowsMinus1; i++)
    2336       {
    2337         m_puiRowHeight[i] = rowHeight[i];
    2338       }
    2339     }
    2340   }
    2341   UInt     getRowHeight           (UInt rowIdx)    { return *( m_puiRowHeight + rowIdx ); }
    2342   Void     setNumSubstreams(Int iNumSubstreams)               { m_iNumSubstreams = iNumSubstreams; }
    2343   Int      getNumSubstreams()                                 { return m_iNumSubstreams; }
     2077
     2078  Void     setTilesEnabledFlag       (Bool val)                             { m_tilesEnabledFlag = val; }
     2079  Bool     getTilesEnabledFlag       () const                               { return m_tilesEnabledFlag; }
     2080  Void     setTileUniformSpacingFlag (Bool b)                               { m_uniformSpacingFlag = b; }
     2081  Bool     getTileUniformSpacingFlag () const                               { return m_uniformSpacingFlag; }
     2082  Void     setNumTileColumnsMinus1   (Int i)                                { m_numTileColumnsMinus1 = i; }
     2083  Int      getNumTileColumnsMinus1   () const                               { return m_numTileColumnsMinus1; }
     2084  Void     setTileColumnWidth        (const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; }
     2085  UInt     getTileColumnWidth        (UInt columnIdx) const                 { return  m_tileColumnWidth[columnIdx]; }
     2086  Void     setNumTileRowsMinus1      (Int i)                                { m_numTileRowsMinus1 = i; }
     2087  Int      getTileNumRowsMinus1      () const                               { return m_numTileRowsMinus1; }
     2088  Void     setTileRowHeight          (const std::vector<Int>& rowHeight)    { m_tileRowHeight = rowHeight;  }
     2089  UInt     getTileRowHeight          (UInt rowIdx) const                    { return m_tileRowHeight[rowIdx]; }
     2090
     2091  Void     setNumSubstreams    (Int numSubstreams)                     { m_numSubstreams = numSubstreams; }
     2092  Int      getNumSubstreams    ()                                      { return m_numSubstreams; }
    23442093
    23452094  Void      setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; }
     
    25372286
    25382287  Bool       m_enableTMVPFlag;
    2539 #if I0044_SLICE_TMVP
     2288#if H_MV
    25402289  Bool       m_availableForTMVPRefFlag;
    25412290#endif
     
    25992348  UInt         m_aiDDDShift    [MAX_NUM_LAYERS];
    26002349#endif
    2601 #if MTK_SINGLE_DEPTH_MODE_I0095
     2350#if H_3D_SINGLE_DEPTH
    26022351  Bool      m_bApplySingleDepthMode;
    26032352#endif
    2604 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     2353#if H_3D_IC
    26052354  Int *m_aICEnableCandidate;
    26062355  Int *m_aICEnableNum;
     
    26762425  TComPic*  getTexturePic       ()                              { return  m_ivPicsCurrPoc[0][ m_viewIndex ]; }
    26772426#endif
    2678 #if MTK_SINGLE_DEPTH_MODE_I0095
     2427#if H_3D_SINGLE_DEPTH
    26792428  Void      setApplySingleDepthMode( Bool b )                                { m_bApplySingleDepthMode = b; }
    26802429  Bool      getApplySingleDepthMode()                                        { return m_bApplySingleDepthMode; }
     
    28772626  Void      setEnableTMVPFlag     ( Bool   b )    { m_enableTMVPFlag = b; }
    28782627  Bool      getEnableTMVPFlag     ()              { return m_enableTMVPFlag;}
    2879 #if I0044_SLICE_TMVP
     2628#if H_MV
    28802629  Void      setAvailableForTMVPRefFlag     ( Bool   b )    { m_availableForTMVPRefFlag = b; }
    28812630  Bool      getAvailableForTMVPRefFlag     ()              { return m_availableForTMVPRefFlag;}
     
    29172666  Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; };
    29182667  Bool getVpsDepthModesFlag  ()  { return getVPS()->getVpsDepthModesFlag( getVPS()->getLayerIdInVps( m_layerId ) ); }
    2919 #if SEPARATE_FLAG_I0085
    29202668  Bool getIVPFlag       ()  { return getVPS()->getIVPFlag( getVPS()->getLayerIdInVps( m_layerId ) ); }
    29212669#endif
    2922 #endif
    2923 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX
     2670#if H_3D_IC
    29242671  Void    setICEnableCandidate( Int* ICEnableCandidate)   { m_aICEnableCandidate = ICEnableCandidate; };
    29252672  Void    setICEnableNum( Int* ICEnableNum)   { m_aICEnableNum = ICEnableNum; };
  • trunk/source/Lib/TLibCommon/TComWedgelet.cpp

    r1039 r1084  
    6868                                                            m_uiHeight ( rcWedge.m_uiHeight  ),
    6969                                                            m_pbPattern( (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) ) )
    70 #if SHARP_DMM1_I0110
    7170                                                            ,m_pbScaledPattern( g_wedgePattern )
    72 #endif
    7371{
    7472  ::memcpy( m_pbPattern, rcWedge.m_pbPattern, sizeof(Bool) * (m_uiWidth * m_uiHeight));
     
    8886
    8987  m_pbPattern = (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) );
    90 #if SHARP_DMM1_I0110
    9188  m_pbScaledPattern = g_wedgePattern;
    92 #endif
    9389}
    9490
     
    187183  switch( m_eWedgeRes )
    188184  {
    189 #if !SHARP_DMM1_I0110
    190   case( DOUBLE_PEL ): { uiTempBlockSize =  m_uiWidth;     uhXs = (m_uhXs<<1); uhYs = (m_uhYs<<1); uhXe = (m_uhXe<<1); uhYe = (m_uhYe<<1); } break;
    191 #endif
    192185  case(   FULL_PEL ): { uiTempBlockSize =  m_uiWidth;     uhXs =  m_uhXs;     uhYs =  m_uhYs;     uhXe =  m_uhXe;     uhYe =  m_uhYe;     } break;
    193186  case(   HALF_PEL ): { uiTempBlockSize = (m_uiWidth<<1); uhXs =  m_uhXs;     uhYs =  m_uhYs;     uhXe =  m_uhXe;     uhYe =  m_uhYe;     } break;
    194187  }
    195 
    196 #if !SHARP_DMM1_I0110
    197   if( m_eWedgeRes == DOUBLE_PEL) // adjust line-end for DOUBLE_PEL resolution
    198   {
    199     if( m_uhOri == 1 ) { uhXs = uiTempBlockSize-1; }
    200     if( m_uhOri == 2 ) { uhXe = uiTempBlockSize-1; uhYs = uiTempBlockSize-1; }
    201     if( m_uhOri == 3 ) { uhYe = uiTempBlockSize-1; }
    202     if( m_uhOri == 4 ) { uhYe = uiTempBlockSize-1; }
    203     if( m_uhOri == 5 ) { uhXs = uiTempBlockSize-1; }
    204   }
    205 #endif
    206188
    207189  Bool* pbTempPattern = new Bool[ (uiTempBlockSize * uiTempBlockSize) ];
     
    233215  switch( m_eWedgeRes )
    234216  {
    235 #if !SHARP_DMM1_I0110
    236   case( DOUBLE_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break;
    237 #endif
    238217  case(   FULL_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break;
    239218  case(   HALF_PEL ): // sub-sampling by factor 2
     
    327306}
    328307
    329 #if SHARP_DMM1_I0110
    330308Bool* TComWedgelet::getScaledPattern(UInt uiDstSize)
    331309{
    332     Bool *pbSrcPat = this->getPattern();
    333     UInt uiSrcSize = this->getStride();
    334 
    335     Int scale = (g_aucConvertToBit[uiDstSize] - g_aucConvertToBit[uiSrcSize]);
    336     assert(scale>=0);
    337     for (Int y=0; y<uiDstSize; y++)
    338     {
    339        for (Int x=0; x<uiDstSize; x++)
    340        {
    341            Int srcX = x>>scale;
    342            Int srcY = y>>scale;
    343            m_pbScaledPattern[y*uiDstSize + x] = pbSrcPat[ srcY*uiSrcSize + srcX ];
    344        }
    345    }
    346    return m_pbScaledPattern;
    347 }
    348 #endif
     310  Bool *pbSrcPat = this->getPattern();
     311  UInt uiSrcSize = this->getStride();
     312
     313  Int scale = (g_aucConvertToBit[uiDstSize] - g_aucConvertToBit[uiSrcSize]);
     314  assert(scale>=0);
     315  for (Int y=0; y<uiDstSize; y++)
     316  {
     317    for (Int x=0; x<uiDstSize; x++)
     318    {
     319      Int srcX = x>>scale;
     320      Int srcY = y>>scale;
     321      m_pbScaledPattern[y*uiDstSize + x] = pbSrcPat[ srcY*uiSrcSize + srcX ];
     322    }
     323  }
     324  return m_pbScaledPattern;
     325}
    349326
    350327TComWedgeNode::TComWedgeNode()
  • trunk/source/Lib/TLibCommon/TComWedgelet.h

    r1039 r1084  
    5858#define DIM_NO_IDX     MAX_UINT
    5959
    60 #if HS_DMM_SIGNALLING_I0120
    6160__inline UInt getDimType  ( Int intraMode )
    6261{
     
    6463    return (dimType >= 0 && dimType < DIM_NUM_TYPE) ? (UInt)dimType : DIM_NO_IDX;
    6564}
    66 #else
    67 __inline UInt getDimType  ( Int intraMode ) { Int dimType = (intraMode-DIM_OFFSET)/2; return (dimType >= 0 && dimType < DIM_NUM_TYPE) ? (UInt)dimType : DIM_NO_IDX; }
    68 #endif
    6965__inline Bool isDimMode   ( Int intraMode ) { return (getDimType( intraMode ) < DIM_NUM_TYPE); }
    70 #if !HS_DMM_SIGNALLING_I0120
    71 __inline Bool isDimDeltaDC( Int intraMode ) { return (isDimMode( intraMode ) && ((intraMode-DIM_OFFSET)%2) == 1); }
    72 #endif
    7366#endif
    7467
     
    7972enum WedgeResolution
    8073{
    81 #if !SHARP_DMM1_I0110
    82   DOUBLE_PEL,
    83 #endif
    8474  FULL_PEL,
    8575  HALF_PEL
     
    10696
    10797  Bool* m_pbPattern;
    108 #if SHARP_DMM1_I0110
    10998  Bool* m_pbScaledPattern;
    110 #endif
    11199
    112100  Void  xGenerateWedgePattern();
     
    134122  Bool            getIsCoarse() { return m_bIsCoarse; }
    135123  UInt            getAng     () { return m_uiAng; }
    136 #if SHARP_DMM1_I0110
    137124  Bool*           getScaledPattern(UInt uiWidth);
    138 #endif
    139125
    140126  Void  setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false );
  • trunk/source/Lib/TLibCommon/TComYuv.cpp

    r1039 r1084  
    689689  UInt iSrc1Stride = pcYuvSrc1->getStride();
    690690  UInt iDstStride  = getStride();
    691 #if QC_I0129_ARP_FIX
    692691  Int iIFshift = IF_INTERNAL_PREC - g_bitDepthY;
    693692  Int iOffSet  = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS;
    694 #endif
    695693  for ( y = uiHeight-1; y >= 0; y-- )
    696694  {
     
    700698      if( bClip )
    701699      {
    702 #if QC_I0129_ARP_FIX
    703700        pDst[x] = ClipY( ( pDst[x] + iOffSet ) >> iIFshift );
    704 #else
    705         pDst[x] = ClipY( pDst[x] );
    706 #endif
    707701      }
    708702    }
     
    727721  UInt  iSrc1Stride = pcYuvSrc1->getCStride();
    728722  UInt  iDstStride  = getCStride();
    729 #if QC_I0129_ARP_FIX
     723
    730724  Int iIFshift = IF_INTERNAL_PREC - g_bitDepthC;
    731725  Int iOffSet  = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS;
    732 #endif
     726
    733727  for ( y = uiHeight-1; y >= 0; y-- )
    734728  {
     
    739733      if( bClip )
    740734      {
    741 #if QC_I0129_ARP_FIX
    742735        pDstU[x] = ClipC( ( pDstU[x] + iOffSet ) >> iIFshift );
    743736        pDstV[x] = ClipC( ( pDstV[x] + iOffSet ) >> iIFshift );
    744 #else
    745         pDstU[x] = ClipC( pDstU[x] );
    746         pDstV[x] = ClipC( pDstV[x] );
    747 #endif
    748737      }
    749738    }
     
    761750{
    762751  subtractARPLuma  ( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth    , uiHeight    );
    763 #if SHARP_ARP_CHROMA_I0104
     752
    764753  if (uiWidth > 8)
    765 #endif
    766   subtractARPChroma( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 );
     754    subtractARPChroma( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 );
    767755}
    768756
     
    823811{
    824812  multiplyARPLuma( uiAbsPartIdx , uiWidth , uiHeight , dW );
    825 #if SHARP_ARP_CHROMA_I0104
     813
    826814  if (uiWidth > 8)
    827 #endif
    828   multiplyARPChroma( uiAbsPartIdx , uiWidth >> 1 , uiHeight >> 1 , dW );
     815    multiplyARPChroma( uiAbsPartIdx , uiWidth >> 1 , uiHeight >> 1 , dW );
    829816}
    830817
  • trunk/source/Lib/TLibCommon/TypeDef.h

    r1066 r1084  
    111111                                              // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053
    112112                                              // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085  Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085
    113 
     113                                              // QC_I0051_ARP_SIMP         
     114                                              // SHARP_ARP_CHROMA_I0104     
     115                                              // MTK_I0072_IVARP_SCALING_FIX
    114116
    115117#define H_3D_IC                           1   // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060
     
    123125                                              // SEC_IC_ARP_SIG_G0072, Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121
    124126                                              // MTK_LOW_LATENCY_IC_ENCODING_H0086  Low-latency IC encoding in JCT3V-H0086
    125 
    126 #define MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX  1  // Remove the global variables used in JCT3V-H0086
    127 
    128 
    129 #define SEC_IC_NEIGHBOR_CLIP_I0080        1   // Clipping of neighboring sample position, JCT3V-I0080
    130 
     127                                              // MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX  1  // Remove the global variables used in JCT3V-H0086
     128                                              // SEC_IC_NEIGHBOR_CLIP_I0080    // Clipping of neighboring sample position, JCT3V-I0080
    131129
    132130#if H_3D_NBDV
     
    177175                                              // SHARP_SIMPLE_MERGE_H0062      Restrict 3D-HEVC merge cand in small PUs
    178176                                              // MTK_DIS_SPBIP8X4_H0205        Disable bi-prediction for 8x4 and 4x8 sub PU and remove the SPIVMP 2Nx2N restriction
    179                                               // SEC_ADAPT_DISABLE_IVMP        Disalbing IVMP merge candidates when IC is enabled, JCT3V-H0070
    180 
    181 #define SEC_SIMP_SHIFTED_DV_I0086         1   // Simplification of Shifted DV candidate, JCT3V-I0086
     177                                              // SEC_ADAPT_DISABLE_IVMP        Disabling IVMP merge candidates when IC is enabled, JCT3V-H0070
     178                                              // SEC_SIMP_SHIFTED_DV_I0086     Simplification of Shifted DV candidate, JCT3V-I0086
     179
     180
    182181
    183182#define H_3D_TMVP                         1   // QC_TMVP_C0047
     
    222221                                              // SEC_NO_RESI_DLT_H0105   
    223222                                              // MTK_DLT_CODING_FIX_H0091
    224 
    225 #define MTK_SINGLE_DEPTH_MODE_I0095       1   // Single depth mode proposed in JCT3V-I0095
    226 #if MTK_SINGLE_DEPTH_MODE_I0095
    227 #define MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE            2 // size of the sample candidate list
    228 #endif
    229 
    230 #define H_3D_FIX_UNINIT                   1   // Fix uninitialized flag
     223                                              // HS_DMM_SIGNALLING_I0120
     224                                              // SHARP_DMM1_I0110 // LUT size reduction for DMM1 proposed in JCT3V-I0110
     225                                              // FAST_SDC_OFFSET_DECISION_I0084
     226                                              // SEPARATE_FLAG_I0085
     227                                              // H_3D_DELTA_DLT
     228                                              // RWTH_DLT_CLIP_I0057               1
     229
     230
     231
     232#define H_3D_SINGLE_DEPTH                 1   // Single depth mode proposed in JCT3V-I0095
     233
     234
    231235#define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
    232236                                              // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding
     
    245249                                              // MTK_DBBP_SIGNALING_H0094   
    246250                                              // H_3D_FIX_DBBP_IVMP        Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself.
    247 
    248 #define SEC_DBBP_EXPLICIT_SIG_I0077       1   // Remove the partition derivation and signal dbbp_flag only when the partion mode is 2NxN/Nx2N, JCT3V-I0077
    249 #define SEC_DBBP_DISALLOW_8x8_I0078       1   // Disallow DBBP in 8x8 CU, JCT3V-I0078
    250 #define SHARP_DBBP_SIMPLE_FLTER_I0109     1   // Simple condition and one dimensional dilter for DBBP
    251 #define SEC_DBBP_DMM4_THRESHOLD_I0076     1   // Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076
     251                                              // SEC_DBBP_EXPLICIT_SIG_I0077       1   // Remove the partition derivation and signal dbbp_flag only when the partition mode is 2NxN/Nx2N, JCT3V-I0077
     252                                              // Disallow DBBP in 8x8 CU, JCT3V-I0078
     253                                              // SHARP_DBBP_SIMPLE_FLTER_I0109     1   // Simple condition and one dimensional filter for DBBP
     254                                              // SEC_DBBP_DMM4_THRESHOLD_I0076     Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076
    252255
    253256
     
    256259#define H_3D_FCO                          0   // Flexible coding order for 3D
    257260#if H_3D_FCO
    258 #define LGE_FCO_I0116                     1
    259 #endif
    260 
    261 #define SCU_HS_FAST_INTRA_SDC_I0123       1
     261#define H_3D_FCO                     1
     262#endif
     263
     264#define H_3D_FAST_INTRA_SDC               1   // I0123
    262265
    263266// OTHERS
     
    271274#endif
    272275
    273 #define MTK_I0099_VPS_EX2                 1  ///< JCT3V-I0099, sub-PU size signaling and lim_qt_pred_flag in VPS extension 2
    274 #define MTK_I0099_FIX                     1  ///< Fix the problem of removing encoder only QTL
    275 
    276276// Rate Control
    277277#define KWU_FIX_URQ                       1
    278278#define KWU_RC_VIEWRC_E0227               0  ///< JCT3V-E0227, view-wise target bitrate allocation
    279279#define KWU_RC_MADPRED_E0227              0  ///< JCT3V-E0227, inter-view MAD prediction
    280 
    281 #define SEC_VPS_CLEANUP_I0090             1
    282 #define SEC_HLS_CLEANUP_I0100             1
    283 
    284 #define H_3D_FIX_64BIT_SHIFT              1
    285280#endif // H_3D
    286281
     
    292287
    293288// Fixes
    294 #define FIX_TICKET_79                     1    // Unused VSP code
    295 #define FIX_TICKET_75                     1    // Bi-pred restriction bug in VSP
    296 #define FIX_TICKET_68                     1    // MV clipping bug in the sub-PU MPI default MV generation
    297 #define FIX_TICKET_71                     1    // IC parameters is meaningless in HTM when no training samples are available
    298 #define FIX_TICKET_77                     1    // Unused variable m_iBitsPerDepthValue
    299 #define FIX_TICKET_76                     1    // unused functions
    300 #define FIX_TICKET_62                     1    // buffer overflow for print
    301 #define FIX_TICKET_61                     1    // layerIdsInSets size check
     289
     290///// ***** SINGLE DEPTH MODE *********
     291#if H_3D_SINGLE_DEPTH
     292#define SINGLE_DEPTH_MODE_CAND_LIST_SIZE            2 // size of the sample candidate list
     293#endif
    302294
    303295///// ***** VIEW SYNTHESIS OPTIMIZAION *********
     
    308300#define H_3D_VSO_RM_ASSERTIONS            0   // Output VSO assertions
    309301#define H_3D_VSO_SYNTH_DIST_OUT           0   // Output of synthesized view distortion instead of depth distortion in encoder output
    310 #define H_3D_VSO_FIX                      1   // This fix should be enabled after verification
    311302#endif
    312303
     
    321312#if H_3D_ARP
    322313#define H_3D_ARP_WFNR                     3
    323 #define QC_I0129_ARP_FIX                  1
    324 #define QC_I0051_ARP_SIMP                 1
    325 #define SHARP_ARP_CHROMA_I0104            1
    326 #define MTK_I0072_IVARP_SCALING_FIX       1
    327314#endif
    328315
    329316///// ***** DEPTH INTRA MODES *********
    330317#if H_3D_DIM
     318                                              // HHI_DMM4_ENC_I0066
    331319#define H_3D_DIM_DMM                      1   // Depth Modeling Modes
    332320#define H_3D_DIM_SDC                      1   // Simplified Depth Coding method
    333321#define H_3D_DIM_DLT                      1   // Depth Lookup Table
    334 #define HS_DMM_SIGNALLING_I0120  1   
    335 #define SHARP_DMM1_I0110                  1   // LUT size reduction for DMM1 proposed in JCT3V-I0110
    336 #define FIX_WARNING                       1   // fix narrowing conversion of NumPocStCurr0,NumPocStCurr1 at TComSlice.cpp
    337 #define FAST_SDC_OFFSET_DECISION_I0084    1
    338 #define SEPARATE_FLAG_I0085               1
    339 
    340 #if H_3D_DIM_DLT
    341 #define H_3D_DELTA_DLT                    1
    342 #define RWTH_DLT_CLIP_I0057               1
    343 #endif
     322
    344323#define H_3D_DIM_ENC                      1   // Depth Intra encoder optimizations, includes:
    345324                                              // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
    346325                                              // LG_ZEROINTRADEPTHRESI_A0087
    347 #define HHI_DMM4_ENC_I0066                1
    348326#endif
    349327///// ***** VIEW SYNTHESIS PREDICTION *********
     
    370348#if H_3D_DBBP
    371349#define DBBP_INVALID_SHORT                (-4)
    372 #define RWTH_DBBP_PACK_MODE               SIZE_2NxN
     350#define DBBP_PACK_MODE               SIZE_2NxN
    373351#endif
    374352
     
    389367/////////////////////////////////////////////////////////////////////////////////
    390368// TBD: Check if integration is necessary.
    391 
    392 
    393 
    394 //Added by Qualcomm for HLS
    395 #define DISCARDABLE_PIC_RPS              1      ///< JCT3V-G0131: Inter-layer RPS and temporal RPS should not contain picture with discardable_flag equal to 1
    396 #define VPS_MISC_UPDATES                 1      ///< Misc updates:JCT3V-0240,
    397 #define NON_REF_NAL_TYPE_DISCARDABLE     1      ///< JCT3V-G0031: If discardable picture is a non-IRAP, it must be a non-referenced sub-layer picture
    398 #define INFERENCE_POC_MSB_VAL_PRESENT    1      ///< JCT3V-H0042: poc_msb_val_present_flag shall be equal to 0 when slice_header_extension_length is (inferred to be ) equal to 0
    399 #define INFERENCE_POC_RESET_INFO_PRESENT 1      ///< JCT3V-H0042: Infer the value of poc_reset_info_present_flag to be equal to 0 when no pps extension / pps extension for multilayer.
    400 #define I0044_SLICE_TMVP                 1      ///< JCT3V-I0044: Regarding slice_temporal_mvp_enabled_flag
    401 #define I0045_BR_PR_ADD_LAYER_SET        1      ///< JCT3V-I0045: Signalling of bit-rate and picture rate for additional layer set
    402 #define I0045_VPS_VUI_VST_PARAMS         1      ///< JCT3V-I0045: Related to signalling of VST parameters of the base layer.
    403 
    404 
    405 #define H_MV_HLS10_GEN                       0  // General changes (not tested)
    406 
    407 #define H_MV_HLS10_AUX                       1 // Auxiliary pictures
    408 #define H_MV_HLS10_GEN_FIX                   1
    409 #define H_MV_FIX_LOOP_GOPSIZE                1
    410 #define H_MV_FIX_SUB_LAYERS_MAX_MINUS1       1
    411 
    412 #define H_MV_HLS10_GEN_VSP_CONF_WIN          1  // VPS conformance window
    413 #define H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL  1  // vps_base_layer_available
    414 #define H_MV_HLS10_REF_PRED_LAYERS           1  // reference and predicted layer derivation
    415 #define H_MV_HLS10_NESSECARY_LAYER           1  // necessary layers
    416 #define H_MV_HLS10_ADD_LAYERSETS             1  // additional layer sets
    417 #define H_MV_HLS10_DBP_SIZE                  1  // dpb size syntax structure
    418 #define H_MV_HLS10_MAXNUMPICS                1  // constraint on number of pictures in rps 
    419 #define H_MV_HLS10_PTL                       1  // profile tier level
    420 #define H_MV_HLS10_PTL_FIX                   1  // profile tier level fix
    421 #define H_MV_HLS10_PTL_INBL_FIX              1  // profile tier level fix
    422 #define H_MV_HLS10_PTL_INFER_FIX             1  // fix inference ptl
    423 #define H_MV_HLS10_MULTILAYERSPS             1  // multilayer SPS extension
    424 #define H_MV_HLS10_VPS_VUI                   1  // vsp vui
    425 #define H_MV_HLS10_VPS_VUI_BSP               1  // vsp vui bsp
    426 #define H_MV_HLS10_PPS                       1  // PPS modifications
    427 
    428 #define H_MV_HLS10_VPS_VUI_BSP_STORE         0  // Currently bsp vui bsp hrd parameters are not stored, some dynamic memory allocation with upper bounds is required.
    429 
    430 
     369#define H_MV_HLS_PTL_LIMITS                  0
    431370#define H_MV_HLS7_GEN                        0  // General changes (not tested)
    432 
     371#define H_MV_ALIGN_HM_15                     1 
    433372
    434373// POC
     
    452391//#define H_MV_HLS_7_SEI_P0123_25  0 // (SEI/P0123/Alpha channel info) #25 Add alpha channel information SEI message Decision: Adopt. Constrain the bit depth indicated to be equal to the coded bit depth of the aux picture.
    453392
    454 // Auxiliary picture related
    455 //#define H_MV_HLS_8_AUX_NODOC_40  0 // #40 (AUX    /NODOC/primary pic) Clarify that an auxiliary picture can be associated with more than one primary picture. Consider if the language associating an alpha auxiliary picture with a primary picture in the semantics of dimension_id[ ][ ] near the AuxId derivation could be moved to the alpha SEI message.
    456 //#define H_MV_HLS_8_AUX_Q0081_2   0 // #2  (AUX    /Q0081/primary) Decision: Remove the constraint that an alpha picture must be accompanied by a primary picture.
    457 //#define H_MV_HLS_8_AUX_Q0078_44  0 // #44 (AUX    /Q0078/concepts Auxiliary picture concepts:
    458 //#define H_MV_HLS_8_AUX_Q0078_39  0 // #39 (AUX    /Q0078/conformance): mechanism for signaling a profile/tier/level conformance point for auxiliary pictures
    459 
    460 // Profiles
    461 //#define H_MV_HLS_8_PRO_NODOC_50  0 // #50 (PROF   /NODOC/Monochrome) Add Monochrome 8-bit profile
    462 //#define H_MV_HLS_8_PRO_NODOC_31  0 // #31 (PROF   /NODOC/Profile constraint) Add a profile constraint to the Scalable Main, Scalable Main 10, and Stereo Main profiles against allowing layers with duplicate values of DependencyId (or ViewOrderIdx) when AuxId equal to 0.
    463 //#define H_MV_HLS_8_PRO_H0126_45  0 // #45 (PROF   /H0126/Stereo main) Phrasing used in specifying the Stereo Main profile.
    464 //#define H_MV_HLS_8_PRO_Q0160_33  0 // #33 (PROF   /Q0160/alt_output_flag) v2: Add constraint to stereo main profile that it must contain exactly two texture views, and add a note to state that the constraint implies a restriction that alt_output_flag equal to 0.
    465 
    466393// DPB
    467394//#define H_MV_HLS_8_HRD_Q0102_09  0 // #9  (HRD    /Q0102/NoOutputOfPriorPicsFlag) It was suggested that also the separate_colour_plane_flag should affect inference of NoOutputOfPriorPicsFlag. Decision (Ed.): Agreed (affects RExt text).
     
    491418#define SAO_SGN_FUNC 1
    492419
     420#define TILE_SIZE_CHECK 1
     421
    493422#define FIX1172 1 ///< fix ticket #1172
    494423
     
    506435#define MAX_NESTING_NUM_LAYER       64
    507436
    508 #if H_MV_HLS10_VPS_VUI_BSP
     437#if H_MV
    509438#define MAX_VPS_NUM_HRD_PARAMETERS                1024
     439#else
     440#define MAX_VPS_NUM_HRD_PARAMETERS                1
     441#endif
     442#if H_MV
    510443#define MAX_NUM_SUB_LAYERS                        7
    511444#define MAX_NUM_SIGNALLED_PARTITIONING_SCHEMES    16
    512 #else
    513 #define MAX_VPS_NUM_HRD_PARAMETERS                1
    514 #endif
    515 
     445#endif
    516446#define MAX_VPS_OP_SETS_PLUS1                     1024
    517447#if H_MV
    518 #if H_MV_HLS10_ADD_LAYERSETS
    519448#define MAX_VPS_NUM_ADD_LAYER_SETS                1024
    520 #endif
    521449#define MAX_VPS_NUH_LAYER_ID_PLUS1  63
    522450#define MAX_NUM_SCALABILITY_TYPES   16
     
    533461#define MAX_VPS_PROFILE_TIER_LEVEL      64
    534462#define MAX_VPS_ADD_OUTPUT_LAYER_SETS   1024
    535 #if H_MV_HLS10_ADD_LAYERSETS
    536463#define MAX_VPS_OUTPUTLAYER_SETS        ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 + MAX_VPS_OP_SETS_PLUS1 )
    537 #else
    538 #define MAX_VPS_OUTPUTLAYER_SETS        ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 )
    539 #endif
    540464#define  MAX_NUM_VIDEO_SIGNAL_INFO      16
    541465#define MAX_NUM_SCALED_REF_LAYERS       MAX_NUM_LAYERS-1
    542 #if !H_MV_HLS10_VPS_VUI_BSP
    543 #define MAX_NUM_BSP_HRD_PARAMETERS      100 ///< Maximum value is actually not specified
    544 #define MAX_NUM_BITSTREAM_PARTITIONS    100 ///< Maximum value is actually not specified
    545 #define MAX_NUM_BSP_SCHED_COMBINATION   100 ///< Maximum value is actually not specified
    546 #define MAX_SUB_STREAMS                 1024
    547 #endif
    548466#else
    549467#define MAX_NUM_LAYER_IDS                64
     
    1016934    MAINSTILLPICTURE = 3,
    1017935#if H_MV
    1018 #if H_MV_HLS10_PTL
    1019936    MULTIVIEWMAIN = 6,
    1020937#if H_3D
    1021938    MAIN3D = 8,
    1022 #endif
    1023 #else
    1024     MAINSTEREO = 4,
    1025     MAINMULTIVIEW = 5,
    1026 #if H_3D
    1027     MAIN3D = 6,
    1028 #endif
    1029939#endif
    1030940#endif
     
    1069979#endif   
    1070980    VIEW_ORDER_INDEX  = 1,
    1071 #if H_MV_HLS10_AUX
    1072981    DEPENDENCY_ID = 2,
    1073982    AUX_ID = 3,
    1074 #endif   
    1075983  };
    1076984#endif
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1066 r1084  
    5353  }
    5454  // To avoid mismatches
    55 #if H_MV_HLS10_GEN_FIX
    5655  fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() );
    5756#else
    58   fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" );
    59 #endif
    60 #else
    6157  fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() );
    6258#endif
     
    7066    return;
    7167  }
    72 #if H_MV_HLS10_GEN_FIX
    7368  fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() );
    74 #else
    75   fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" );
    76 #endif
    7769#else
    7870  fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() );
     
    300292  if( pcPPS->getTilesEnabledFlag() )
    301293  {
    302     READ_UVLC ( uiCode, "num_tile_columns_minus1" );                pcPPS->setNumColumnsMinus1( uiCode ); 
    303     READ_UVLC ( uiCode, "num_tile_rows_minus1" );                   pcPPS->setNumRowsMinus1( uiCode ); 
    304     READ_FLAG ( uiCode, "uniform_spacing_flag" );                   pcPPS->setUniformSpacingFlag( uiCode );
    305 
    306     if( !pcPPS->getUniformSpacingFlag())
    307     {
    308       UInt* columnWidth = (UInt*)malloc(pcPPS->getNumColumnsMinus1()*sizeof(UInt));
    309       for(UInt i=0; i<pcPPS->getNumColumnsMinus1(); i++)
     294    READ_UVLC ( uiCode, "num_tile_columns_minus1" );                pcPPS->setNumTileColumnsMinus1( uiCode ); 
     295    READ_UVLC ( uiCode, "num_tile_rows_minus1" );                   pcPPS->setNumTileRowsMinus1( uiCode ); 
     296    READ_FLAG ( uiCode, "uniform_spacing_flag" );                   pcPPS->setTileUniformSpacingFlag( uiCode == 1 );
     297
     298    if( !pcPPS->getTileUniformSpacingFlag())
     299    {
     300      std::vector<Int> columnWidth(pcPPS->getNumTileColumnsMinus1());
     301      for(UInt i=0; i<pcPPS->getNumTileColumnsMinus1(); i++)
    310302      {
    311303        READ_UVLC( uiCode, "column_width_minus1" ); 
    312304        columnWidth[i] = uiCode+1;
    313305      }
    314       pcPPS->setColumnWidth(columnWidth);
    315       free(columnWidth);
    316 
    317       UInt* rowHeight = (UInt*)malloc(pcPPS->getNumRowsMinus1()*sizeof(UInt));
    318       for(UInt i=0; i<pcPPS->getNumRowsMinus1(); i++)
     306      pcPPS->setTileColumnWidth(columnWidth);
     307
     308      std::vector<Int> rowHeight (pcPPS->getTileNumRowsMinus1());
     309      for(UInt i=0; i<pcPPS->getTileNumRowsMinus1(); i++)
    319310      {
    320311        READ_UVLC( uiCode, "row_height_minus1" );
    321312        rowHeight[i] = uiCode + 1;
    322313      }
    323       pcPPS->setRowHeight(rowHeight);
    324       free(rowHeight); 
    325     }
    326 
    327     if(pcPPS->getNumColumnsMinus1() !=0 || pcPPS->getNumRowsMinus1() !=0)
     314      pcPPS->setTileRowHeight(rowHeight);
     315    }
     316
     317    if(pcPPS->getNumTileColumnsMinus1() !=0 || pcPPS->getTileNumRowsMinus1() !=0)
    328318    {
    329319      READ_FLAG ( uiCode, "loop_filter_across_tiles_enabled_flag" );   pcPPS->setLoopFilterAcrossTilesEnabledFlag( uiCode ? true : false );
     
    342332    }
    343333  }
    344 #if !H_MV_HLS10_PPS
    345 #if H_MV
    346   if ( pcPPS->getLayerId() > 0 )
    347   {
    348     READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 );   
    349   }
    350 
    351   if( pcPPS->getPpsInferScalingListFlag( ) )
    352   {
    353     READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
    354   }
    355   else
    356   { 
    357 #endif
    358 #endif
    359334  READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" );           pcPPS->setScalingListPresentFlag( uiCode ? true : false );
    360335  if(pcPPS->getScalingListPresentFlag ())
     
    362337    parseScalingList( pcPPS->getScalingList() );
    363338  }
    364 #if !H_MV_HLS10_PPS
    365 #if H_MV
    366   }
    367 #endif
    368 #endif
    369339  READ_FLAG( uiCode, "lists_modification_present_flag");
    370340  pcPPS->setListsModificationPresentFlag(uiCode);
     
    400370    if ( pcPPS->getPpsMultilayerExtensionFlag() )
    401371    {
    402 #if H_MV_HLS10_PPS
    403372      parsePPSMultilayerExtension( pcPPS );
    404 #else
    405       READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
    406       READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" );
    407 #endif
    408373    }
    409374#if !H_3D
     
    505470              READ_CODE(8, uiNumDepthValues, "num_depth_values_in_dlt[i]");   // num_entry
    506471
    507 #if !H_3D_DELTA_DLT
    508               if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false )       // Single-view DLT Diff Coding
    509 #endif