Changeset 945 in SHVCSoftware


Ignore:
Timestamp:
31 Dec 2014, 07:37:45 (10 years ago)
Author:
seregin
Message:

temporal improvement for profile/level signalling

Location:
branches/SHM-upgrade/source
Files:
9 edited

Legend:

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

    r929 r945  
    8888  MAIN_444_12_INTRA = 2312,
    8989  MAIN_444_16_INTRA = 2316,
    90 #if SVC_EXTENSION
    91   SCALABLE          = 6,
    92   SCALABLE10        = 7,
    93 #endif
     90
    9491};
    9592
     
    341338  {"main-RExt",            Profile::MAINREXT           },
    342339  {"high-throughput-RExt", Profile::HIGHTHROUGHPUTREXT },
    343 #if SVC_EXTENSION
    344   {"scalable",             Profile::SCALABLE           },
    345   {"scalable10",           Profile::SCALABLE10         },
    346 #endif
    347340};
    348341
     
    379372    {"main_444_12_intra",  MAIN_444_12_INTRA},
    380373    {"main_444_16_intra",  MAIN_444_16_INTRA},
    381 #if SVC_EXTENSION
    382     {"scalable",           SCALABLE         },
    383     {"scalable10",         SCALABLE10       },
    384 #endif
    385374};
    386375
     
    786775  UInt*      cfg_uiQuadtreeTUMaxDepthIntra[MAX_LAYERS];
    787776#endif
    788   Int      cfg_tmpChromaFormatIDC  [MAX_LAYERS];
    789   Int      cfg_tmpInputChromaFormat[MAX_LAYERS];
    790777#if AUXILIARY_PICTURES
    791778  Int*     cfg_auxId               [MAX_LAYERS];
     
    875862#endif
    876863  Int*    cfg_waveFrontSynchro[MAX_LAYERS];
     864
     865#if MULTIPLE_PTL_SUPPORT
     866  Bool    tmpIntraConstraintFlag;
     867  Bool    tmpLowerBitRateConstraintFlag;
     868  UInt    tmpBitDepthConstraint;
     869  Int*    cfg_layerPTLIdx[MAX_VPS_LAYER_ID_PLUS1];
     870#endif
    877871
    878872  for(UInt layer = 0; layer < MAX_LAYERS; layer++)
     
    971965    cfg_auxId[layer]                = &m_acLayerCfg[layer].m_auxId;
    972966#endif
     967#if MULTIPLE_PTL_SUPPORT
     968    cfg_layerPTLIdx[layer]          = &m_acLayerCfg[layer].m_layerPTLIdx;
     969#endif
    973970  }
    974971#if Q0078_ADD_LAYER_SETS
     
    992989  string* cfg_outputLayerSetIdx      = new string;
    993990#endif
     991#if MULTIPLE_PTL_SUPPORT
     992  string* cfg_listOfLayerPTLOfOlss   = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1];
     993#endif
    994994#if AVC_BASE
    995995  string  cfg_BLInputFile;
     
    10131013  Int tmpConstraintChromaFormat;
    10141014  string inputColourSpaceConvert;
     1015#if MULTIPLE_PTL_SUPPORT
     1016  ExtendedProfileName extendedProfile[NUM_POSSIBLE_LEVEL];
     1017#else
    10151018  ExtendedProfileName extendedProfile;
     1019#endif
    10161020  Int saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];
    10171021
     
    11121116  ("OutputLayerSetIdx",                             cfg_outputLayerSetIdx,                       string(""), 1, "Corresponding layer set index, only for non-default output layer sets")
    11131117#endif
    1114   ("InputChromaFormat%d",                           cfg_tmpInputChromaFormat,                  420, MAX_LAYERS, "InputChromaFormatIDC for layer %d")
    1115   ("ChromaFormatIDC%d,-cf",                         cfg_tmpChromaFormatIDC,                    420, MAX_LAYERS, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat) for layer %d")
    11161118#if AUXILIARY_PICTURES
    11171119  ("AuxId%d",                                       cfg_auxId,                                   0, MAX_LAYERS, "Auxilary picture ID for layer %d (0: Not aux pic, 1: Alpha plane, 2: Depth picture, 3: Cb enh, 4: Cr enh")
     
    12631265
    12641266  // Profile and level
     1267#if MULTIPLE_PTL_SUPPORT
     1268  ("NumProfileTierLevel",                             m_numPTLInfo,                                         2, "Number of Profile, Tier and Level information")
     1269  ("Profile%d",                                       extendedProfile,               NONE, NUM_POSSIBLE_LEVEL,  "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none")
     1270  ("Level%d",                                         m_levelList,            Level::NONE, NUM_POSSIBLE_LEVEL, "Level limit to be used, eg 5.1, or none")
     1271  ("Tier%d",                                          m_levelTierList,        Level::MAIN, NUM_POSSIBLE_LEVEL, "Tier to use for interpretation of --Level (main or high only)")
     1272  ("MaxBitDepthConstraint",                           tmpBitDepthConstraint,                               0u, "Bit depth to use for profile-constraint for RExt profiles. 0=automatically choose based upon other parameters")
     1273  ("MaxChromaFormatConstraint",                       tmpConstraintChromaFormat,                            0, "Chroma-format to use for the profile-constraint for RExt profiles. 0=automatically choose based upon other parameters")
     1274  ("IntraConstraintFlag",                             tmpIntraConstraintFlag,                           false, "Value of general_intra_constraint_flag to use for RExt profiles (not used if an explicit RExt sub-profile is specified)")
     1275  ("LowerBitRateConstraintFlag",                      tmpLowerBitRateConstraintFlag,                     true, "Value of general_lower_bit_rate_constraint_flag to use for RExt profiles")
     1276 
     1277  ("ProgressiveSource%d",                             m_progressiveSourceFlagList,   false, NUM_POSSIBLE_LEVEL, "Indicate that source is progressive")
     1278  ("InterlacedSource%d",                              m_interlacedSourceFlagList,    false, NUM_POSSIBLE_LEVEL, "Indicate that source is interlaced")
     1279  ("NonPackedSource%d",                               m_nonPackedConstraintFlagList, false, NUM_POSSIBLE_LEVEL, "Indicate that source does not contain frame packing")
     1280  ("FrameOnly%d",                                     m_frameOnlyConstraintFlagList, false, NUM_POSSIBLE_LEVEL, "Indicate that the bitstream contains only frames")
     1281 
     1282  ("LayerPTLIndex%d",                                 cfg_layerPTLIdx,               0, MAX_VPS_LAYER_ID_PLUS1, "Index of PTL for each layer")
     1283  ("ListOfProfileTierLevelOls%d",                     cfg_listOfLayerPTLOfOlss, string(""), MAX_VPS_LAYER_ID_PLUS1, "PTL Index for each layer in each OLS except the first OLS. The PTL index for layer in the first OLS is set to 1")
     1284#else
    12651285  ("Profile",                                         extendedProfile,                                   NONE, "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none")
    12661286  ("Level",                                           m_level,                                    Level::NONE, "Level limit to be used, eg 5.1, or none")
     
    12751295  ("NonPackedSource",                                 m_nonPackedConstraintFlag,                        false, "Indicate that source does not contain frame packing")
    12761296  ("FrameOnly",                                       m_frameOnlyConstraintFlag,                        false, "Indicate that the bitstream contains only frames")
     1297#endif
    12771298
    12781299#if LAYER_CTB
     
    18741895  for(Int layer = 0; layer < MAX_LAYERS; layer++)
    18751896  {
    1876     if (m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ] == 0) { m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ] = m_acLayerCfg[layer].m_inputBitDepth      [CHANNEL_TYPE_LUMA  ]; }
    1877     if (m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] == 0) { m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ]; }
     1897    m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ] = m_acLayerCfg[layer].m_inputBitDepth      [CHANNEL_TYPE_LUMA  ];
     1898    m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ];
     1899
    18781900    if (m_acLayerCfg[layer].m_internalBitDepth   [CHANNEL_TYPE_LUMA  ] == 0) { m_acLayerCfg[layer].m_internalBitDepth   [CHANNEL_TYPE_LUMA  ] = m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ]; }
    18791901    if (m_acLayerCfg[layer].m_internalBitDepth   [CHANNEL_TYPE_CHROMA] == 0) { m_acLayerCfg[layer].m_internalBitDepth   [CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_internalBitDepth   [CHANNEL_TYPE_LUMA  ]; }
     
    18831905
    18841906    m_acLayerCfg[layer].m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat);
    1885     m_acLayerCfg[layer].m_chromaFormatIDC      = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));   
     1907    m_acLayerCfg[layer].m_chromaFormatIDC      = ((tmpChromaFormat == 0) ? (m_acLayerCfg[layer].m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));
     1908
     1909    m_acLayerCfg[layer].m_useHighPrecisionPredictionWeighting = false;
     1910    m_acLayerCfg[layer].m_useExtendedPrecision = false;
    18861911  }
    18871912#else
     
    18991924#endif
    19001925
    1901   if (extendedProfile >= 1000 && extendedProfile <= 2316)
    1902   {
    1903     m_profile = Profile::MAINREXT;
    1904     if (m_bitDepthConstraint != 0 || tmpConstraintChromaFormat != 0)
    1905     {
    1906       fprintf(stderr, "Error: The bit depth and chroma format constraints are not used when an explicit RExt profile is specified\n");
    1907       exit(EXIT_FAILURE);
    1908     }
    1909     m_bitDepthConstraint     = (extendedProfile%100);
    1910     m_intraConstraintFlag    = (extendedProfile>=2000);
    1911     switch ((extendedProfile/100)%10)
    1912     {
     1926#if MULTIPLE_PTL_SUPPORT
     1927  for( Int layer = 0; layer < MAX_LAYERS; layer++ )
     1928  {
     1929    m_acLayerCfg[layer].m_bitDepthConstraint = tmpBitDepthConstraint;
     1930    m_acLayerCfg[layer].m_intraConstraintFlag = tmpIntraConstraintFlag;
     1931    m_acLayerCfg[layer].m_lowerBitRateConstraintFlag = tmpLowerBitRateConstraintFlag;   
     1932
     1933    for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++)
     1934    {
     1935      m_acLayerCfg[layer].m_saoOffsetBitShift[channelType] = 0;
     1936    }
     1937       
     1938    Int layerPTLIdx = m_acLayerCfg[layer].m_layerPTLIdx;
     1939
     1940    if( extendedProfile[layerPTLIdx] >= 1000 && extendedProfile[layerPTLIdx] <= 2316 )
     1941    {
     1942      m_profileList[layerPTLIdx] = Profile::MAINREXT;           
     1943
     1944      if( m_acLayerCfg[layer].m_bitDepthConstraint != 0 || tmpConstraintChromaFormat != 0)
     1945      {
     1946        fprintf(stderr, "Error: The bit depth and chroma format constraints are not used when an explicit RExt profile is specified\n");
     1947        exit(EXIT_FAILURE);
     1948      }
     1949      m_acLayerCfg[layer].m_bitDepthConstraint  = (extendedProfile[layerPTLIdx]%100);
     1950      m_acLayerCfg[layer].m_intraConstraintFlag = (extendedProfile[layerPTLIdx]>=2000);
     1951      switch ((extendedProfile[layerPTLIdx]/100)%10)
     1952      {
    19131953      case 0:  tmpConstraintChromaFormat=400; break;
    19141954      case 1:  tmpConstraintChromaFormat=420; break;
    19151955      case 2:  tmpConstraintChromaFormat=422; break;
    19161956      default: tmpConstraintChromaFormat=444; break;
     1957      }
     1958    }
     1959    else
     1960    {
     1961      m_profileList[layerPTLIdx] = Profile::Name(extendedProfile[layerPTLIdx]);
     1962    }
     1963
     1964    if( m_profileList[layerPTLIdx] == Profile::HIGHTHROUGHPUTREXT )
     1965    {
     1966      if( m_acLayerCfg[layer].m_bitDepthConstraint == 0 ) m_acLayerCfg[layer].m_bitDepthConstraint = 16;
     1967      m_acLayerCfg[layer].m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? CHROMA_444 : numberToChromaFormat(tmpConstraintChromaFormat);
     1968    }
     1969    else if( m_profileList[layerPTLIdx] == Profile::MAINREXT )
     1970    {
     1971      if( m_acLayerCfg[layer].m_bitDepthConstraint == 0 && tmpConstraintChromaFormat == 0 )
     1972      {
     1973        // produce a valid combination, if possible.
     1974        const Bool bUsingGeneralRExtTools  = m_useResidualRotation                    ||
     1975          m_useSingleSignificanceMapContext        ||
     1976          m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] ||
     1977          m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] ||
     1978          !m_enableIntraReferenceSmoothing         ||
     1979          m_useGolombRiceParameterAdaptation       ||
     1980          m_transformSkipLog2MaxSize!=2;
     1981        const Bool bUsingChromaQPAdjustment= m_maxCUChromaQpAdjustmentDepth >= 0;
     1982        const Bool bUsingExtendedPrecision = m_acLayerCfg[layer].m_useExtendedPrecision;
     1983        m_acLayerCfg[layer].m_chromaFormatConstraint = NUM_CHROMA_FORMAT;
     1984        automaticallySelectRExtProfile(bUsingGeneralRExtTools,
     1985          bUsingChromaQPAdjustment,
     1986          bUsingExtendedPrecision,
     1987          m_acLayerCfg[layer].m_intraConstraintFlag,
     1988          m_acLayerCfg[layer].m_bitDepthConstraint,
     1989          m_acLayerCfg[layer].m_chromaFormatConstraint,
     1990          m_acLayerCfg[layer].m_chromaFormatIDC==CHROMA_400 ? m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA] : std::max(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]),
     1991          m_acLayerCfg[layer].m_chromaFormatIDC);
     1992      }
     1993      else if( m_acLayerCfg[layer].m_bitDepthConstraint == 0 || tmpConstraintChromaFormat == 0)
     1994      {
     1995        fprintf(stderr, "Error: The bit depth and chroma format constraints must either both be specified or both be configured automatically\n");
     1996        exit(EXIT_FAILURE);
     1997      }
     1998      else
     1999      {
     2000        m_acLayerCfg[layer].m_chromaFormatConstraint = numberToChromaFormat(tmpConstraintChromaFormat);
     2001      }
     2002    }
     2003    else
     2004    {
     2005      m_acLayerCfg[layer].m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? m_acLayerCfg[layer].m_chromaFormatIDC : numberToChromaFormat(tmpConstraintChromaFormat);
     2006      m_acLayerCfg[layer].m_bitDepthConstraint = (m_profileList[layerPTLIdx] == Profile::MAIN10?10:8);
     2007    }
     2008  }
     2009#else
     2010  if (extendedProfile >= 1000 && extendedProfile <= 2316)
     2011  {
     2012    m_profile = Profile::MAINREXT;
     2013    if (m_bitDepthConstraint != 0 || tmpConstraintChromaFormat != 0)
     2014    {
     2015      fprintf(stderr, "Error: The bit depth and chroma format constraints are not used when an explicit RExt profile is specified\n");
     2016      exit(EXIT_FAILURE);
     2017    }
     2018    m_bitDepthConstraint     = (extendedProfile%100);
     2019    m_intraConstraintFlag    = (extendedProfile>=2000);
     2020    switch ((extendedProfile/100)%10)
     2021    {
     2022      case 0:  tmpConstraintChromaFormat=400; break;
     2023      case 1:  tmpConstraintChromaFormat=420; break;
     2024      case 2:  tmpConstraintChromaFormat=422; break;
     2025      default: tmpConstraintChromaFormat=444; break;
    19172026    }
    19182027  }
     
    19212030    m_profile = Profile::Name(extendedProfile);
    19222031  }
     2032
     2033#if SVC_EXTENSION
     2034  ChromaFormat m_chromaFormatIDC = m_acLayerCfg[0].m_chromaFormatIDC;
     2035#endif
    19232036
    19242037  if (m_profile == Profile::HIGHTHROUGHPUTREXT )
     
    19322045    {
    19332046#if SVC_EXTENSION
    1934       Bool m_useExtendedPrecision = m_acLayerCfg[0].m_useExtendedPrecision;
    1935       Int  m_internalBitDepth[]   = {m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_CHROMA]};
     2047      Bool m_useExtendedPrecision    = m_acLayerCfg[0].m_useExtendedPrecision;
     2048      Int  m_internalBitDepth[]      = {m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_CHROMA]};
     2049      ChromaFormat m_chromaFormatIDC = m_acLayerCfg[0].m_chromaFormatIDC;
    19362050#endif
    19372051      // produce a valid combination, if possible.
     
    19652079    }
    19662080  }
    1967 #if SVC_EXTENSION
    1968   else if( m_profile == Profile::SCALABLE || m_profile == Profile::SCALABLE10 )
    1969   {
    1970     for(Int layer = 0; layer < m_numLayers; layer++)
    1971     {
    1972       m_acLayerCfg[layer].m_bitDepthConstraint     = (m_profile == Profile::SCALABLE10 ? 10 : 8);
    1973       m_acLayerCfg[layer].m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? CHROMA_420 : numberToChromaFormat(tmpConstraintChromaFormat);
    1974 
    1975       for(UInt ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++)
    1976       {
    1977         m_acLayerCfg[layer].m_MSBExtendedBitDepth[ch] = m_acLayerCfg[layer].m_inputBitDepth[ch];
    1978 
    1979         if (saoOffsetBitShift[ch]<0)
    1980         {
    1981           if (m_acLayerCfg[layer].m_internalBitDepth[ch]>10)
    1982           {
    1983             m_acLayerCfg[layer].m_saoOffsetBitShift[ch]=UInt(Clip3<Int>(0, m_acLayerCfg[layer].m_internalBitDepth[ch]-10, Int(m_acLayerCfg[layer].m_internalBitDepth[ch]-10 + 0.165*m_acLayerCfg[layer].m_iQP - 3.22 + 0.5) ) );
    1984           }
    1985           else
    1986           {
    1987             m_acLayerCfg[layer].m_saoOffsetBitShift[ch]=0;
    1988           }
    1989         }
    1990         else
    1991         {
    1992           m_acLayerCfg[layer].m_saoOffsetBitShift[ch]=UInt(saoOffsetBitShift[ch]);
    1993         }
    1994       }
    1995     }
    1996   }
    1997 #endif
    19982081  else
    19992082  {
     
    20012084    m_bitDepthConstraint = (m_profile == Profile::MAIN10?10:8);
    20022085  }
    2003 
     2086#endif
    20042087
    20052088  m_inputColourSpaceConvert = stringToInputColourSpaceConvert(inputColourSpaceConvert, true);
     
    20082091  for(Int layer = 0; layer < MAX_LAYERS; layer++)
    20092092  {
     2093#if !MULTIPLE_PTL_SUPPORT
     2094    m_acLayerCfg[layer].m_chromaFormatConstraint = m_chromaFormatConstraint;
     2095    m_acLayerCfg[layer].m_bitDepthConstraint = m_bitDepthConstraint;
     2096#endif
     2097
    20102098    // If number of scaled ref. layer offsets is non-zero, at least one of the offsets should be specified
    20112099    if(m_acLayerCfg[layer].m_numScaledRefLayerOffsets)
     
    23772465  }
    23782466
    2379 #if AUXILIARY_PICTURES
    2380   for(UInt layer = 0; layer < MAX_LAYERS; layer++)
    2381   {
    2382     m_acLayerCfg[layer].m_InputChromaFormatIDC =  numberToChromaFormat(cfg_tmpChromaFormatIDC[layer]);
    2383     m_acLayerCfg[layer].m_chromaFormatIDC = ((cfg_tmpChromaFormatIDC[layer] == 0) ? (m_acLayerCfg[layer].m_InputChromaFormatIDC ) : (numberToChromaFormat(cfg_tmpChromaFormatIDC[layer])));
    2384   }
    2385 #endif
    23862467  for(Int layer = 0; layer < MAX_LAYERS; layer++)
    23872468  {
     
    25162597  // Layers in the output layer set
    25172598  m_listOfOutputLayers.resize(m_numOutputLayerSets);
     2599
     2600#if MULTIPLE_PTL_SUPPORT
     2601  m_listOfLayerPTLofOlss.resize(m_numOutputLayerSets);
     2602#endif
     2603
    25182604  Int startOlsCtr = 1;
    25192605  if( m_defaultTargetOutputLayerIdc == 0 || m_defaultTargetOutputLayerIdc == 1 )
     
    25352621      assert( scanStringToArray( cfg_listOfOutputLayers[olsCtr], m_numLayersInOutputLayerSet[olsCtr], "ListOfOutputLayers", m_listOfOutputLayers[olsCtr] ) );
    25362622    }
    2537   }
     2623#if MULTIPLE_PTL_SUPPORT
     2624    if( olsCtr > m_numLayerSets )
     2625    {
     2626      scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[m_outputLayerSetIdx[olsCtr - m_numLayerSets]], "ListOfOutputLayers", m_listOfLayerPTLofOlss[olsCtr] );
     2627    }
     2628    else
     2629    {
     2630      scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsCtr], "List of PTL for each layer in OLS", m_listOfLayerPTLofOlss[olsCtr] );
     2631    }
     2632#endif
     2633  }
     2634#if MULTIPLE_PTL_SUPPORT
     2635  m_listOfLayerPTLofOlss[0].push_back(*cfg_layerPTLIdx[0]);
     2636  delete [] cfg_listOfLayerPTLOfOlss;
     2637#endif
    25382638  delete cfg_numLayersInOutputLayerSet;
    25392639  delete [] cfg_listOfOutputLayers;
     
    30623162  Bool m_useExtendedPrecision                = m_acLayerCfg[layerId].m_useExtendedPrecision;
    30633163  Bool m_useHighPrecisionPredictionWeighting = m_acLayerCfg[layerId].m_useHighPrecisionPredictionWeighting;
    3064   m_chromaFormatIDC                          = m_acLayerCfg[layerId].m_chromaFormatIDC;
    3065   m_chromaFormatConstraint                   = m_acLayerCfg[layerId].m_chromaFormatConstraint;
    3066   m_bitDepthConstraint                       = m_acLayerCfg[layerId].m_bitDepthConstraint;
     3164  ChromaFormat m_chromaFormatIDC             = m_acLayerCfg[layerId].m_chromaFormatIDC;
     3165  ChromaFormat m_chromaFormatConstraint      = m_acLayerCfg[layerId].m_chromaFormatConstraint;
     3166  ChromaFormat m_InputChromaFormatIDC        = m_acLayerCfg[layerId].m_InputChromaFormatIDC;
    30673167
    30683168  Int m_inputBitDepth[]       = {m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_LUMA],       m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_CHROMA]};
     
    30723172  m_saoOffsetBitShift[CHANNEL_TYPE_LUMA]   = m_acLayerCfg[layerId].m_saoOffsetBitShift[CHANNEL_TYPE_LUMA];
    30733173  m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerId].m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA];
     3174
     3175#if MULTIPLE_PTL_SUPPORT
     3176  Int layerPTLIdx = m_acLayerCfg[layerId].m_layerPTLIdx;
     3177  Profile::Name m_profile           = m_profileList[layerPTLIdx];
     3178  Level::Name m_level               = m_levelList[layerPTLIdx];
     3179  UInt m_bitDepthConstraint         = m_acLayerCfg[layerId].m_bitDepthConstraint;
     3180  Bool m_intraConstraintFlag        = m_acLayerCfg[layerId].m_intraConstraintFlag;
     3181  Bool m_lowerBitRateConstraintFlag = m_acLayerCfg[layerId].m_lowerBitRateConstraintFlag;
     3182#endif
    30743183#else
    30753184Void TAppEncCfg::xCheckParameter()
     
    30853194    fprintf(stderr, "******************************************************************\n");
    30863195  }
     3196#if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT
     3197  Int ii = 0;
     3198  while( ii < m_numPTLInfo )
     3199  {
     3200    if( m_profileList[ii] == Profile::NONE )
     3201    {
     3202      fprintf(stderr, "***************************************************************************\n");
     3203      fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n");
     3204      fprintf(stderr, "***************************************************************************\n");
     3205    }
     3206    if( m_levelList[ii] == Level::NONE )
     3207    {
     3208      fprintf(stderr, "***************************************************************************\n");
     3209      fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set!   **\n");
     3210      fprintf(stderr, "***************************************************************************\n");
     3211    }
     3212    ii++;
     3213  }
     3214#else
    30873215  if( m_profile==Profile::NONE )
    30883216  {
     
    30973225    fprintf(stderr, "***************************************************************************\n");
    30983226  }
     3227#endif
    30993228
    31003229  Bool check_failed = false; /* abort if there is a fatal configuration problem */
     
    31463275    }
    31473276  }
    3148 #if SVC_EXTENSION
    3149   else if( m_profile==Profile::SCALABLE || m_profile==Profile::SCALABLE10 )
    3150   {
    3151     xConfirmPara(m_bitDepthConstraint!=((m_profile==Profile::SCALABLE10)?10:8), "BitDepthConstraint must be 8 for MAIN profile and 10 for MAIN10 profile.");
    3152     xConfirmPara(m_chromaFormatConstraint!=CHROMA_420, "ChromaFormatConstraint must be 420 for non main-RExt profiles.");
    3153     xConfirmPara(m_intraConstraintFlag==true, "IntraConstraintFlag must be false for non main_RExt profiles.");
    3154     xConfirmPara(m_lowerBitRateConstraintFlag==false, "LowerBitrateConstraintFlag must be true for non main-RExt profiles.");
    3155 
    3156     xConfirmPara(m_useCrossComponentPrediction==true, "CrossComponentPrediction must not be used for non main-RExt profiles.");
    3157     xConfirmPara(m_transformSkipLog2MaxSize!=2, "Transform Skip Log2 Max Size must be 2 for V1 profiles.");
    3158     xConfirmPara(m_useResidualRotation==true, "UseResidualRotation must not be enabled for non main-RExt profiles.");
    3159     xConfirmPara(m_useSingleSignificanceMapContext==true, "UseSingleSignificanceMapContext must not be enabled for non main-RExt profiles.");
    3160     xConfirmPara(m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT]==true, "ImplicitResidualDPCM must not be enabled for non main-RExt profiles.");
    3161     xConfirmPara(m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT]==true, "ExplicitResidualDPCM must not be enabled for non main-RExt profiles.");
    3162     xConfirmPara(m_useGolombRiceParameterAdaptation==true, "GolombRiceParameterAdaption must not be enabled for non main-RExt profiles.");
    3163     xConfirmPara(m_useExtendedPrecision==true, "UseExtendedPrecision must not be enabled for non main-RExt profiles.");
    3164     xConfirmPara(m_useHighPrecisionPredictionWeighting==true, "UseHighPrecisionPredictionWeighting must not be enabled for non main-RExt profiles.");
    3165     xConfirmPara(m_enableIntraReferenceSmoothing==false, "EnableIntraReferenceSmoothing must be enabled for non main-RExt profiles.");
    3166     xConfirmPara(m_alignCABACBeforeBypass, "AlignCABACBeforeBypass cannot be enabled for non main-RExt profiles.");
    3167   }
    3168 #endif
    31693277  else
    31703278  {
     
    45084616  Int m_internalBitDepth[]    = {m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA]};
    45094617  Int m_MSBExtendedBitDepth[] = {m_acLayerCfg[layerId].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerId].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA]};
     4618  ChromaFormat m_chromaFormatIDC = m_acLayerCfg[layerId].m_chromaFormatIDC;
    45104619#endif
    45114620
     
    46264735    printf("Frame index                       : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded );
    46274736  }
     4737#if !MULTIPLE_PTL_SUPPORT
    46284738  if (m_profile == Profile::MAINREXT)
    46294739  {
     
    46414751    printf("Profile                           : %s\n", profileToString(m_profile) );
    46424752  }
     4753#endif
    46434754#if !LAYER_CTB
    46444755  printf("CU size / depth                   : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth );
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.h

    r916 r945  
    120120  Bool      m_snrInternalColourSpace;                       ///< if true, then no colour space conversion is applied for snr calculation, otherwise inverse of input is applied.
    121121  Bool      m_outputInternalColourSpace;                    ///< if true, then no colour space conversion is applied for reconstructed video, otherwise inverse of input is applied.
     122#if !SVC_EXTENSION
    122123  ChromaFormat m_InputChromaFormatIDC;
     124#endif
    123125
    124126  Bool      m_printMSEBasedSequencePSNR;
     
    127129  Bool      m_cabacZeroWordPaddingEnabled;
    128130
     131#if MULTIPLE_PTL_SUPPORT
     132  Int           m_numPTLInfo;
     133  Profile::Name m_profileList[NUM_POSSIBLE_LEVEL];
     134  Level::Tier   m_levelTierList[NUM_POSSIBLE_LEVEL];
     135  Level::Name   m_levelList[NUM_POSSIBLE_LEVEL];
     136  Bool          m_progressiveSourceFlagList[NUM_POSSIBLE_LEVEL];
     137  Bool          m_interlacedSourceFlagList[NUM_POSSIBLE_LEVEL];
     138  Bool          m_nonPackedConstraintFlagList[NUM_POSSIBLE_LEVEL];
     139  Bool          m_frameOnlyConstraintFlagList[NUM_POSSIBLE_LEVEL];
     140
     141  std::vector< std::vector<Int> > m_listOfLayerPTLofOlss;
     142#else
    129143  // profile/level
    130144  Profile::Name m_profile;
     
    139153  Bool m_nonPackedConstraintFlag;
    140154  Bool m_frameOnlyConstraintFlag;
     155#endif
    141156
    142157  // coding structure
     
    227242#endif
    228243  //coding tools (chroma format)
     244#if !SVC_EXTENSION
    229245  ChromaFormat m_chromaFormatIDC;
     246#endif
    230247
    231248  // coding tools (PCM bit-depth)
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncLayerCfg.cpp

    r929 r945  
    308308#endif
    309309  printf("Internal Format                   : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );
     310#if MULTIPLE_PTL_SUPPORT
     311  printf("PTL index                         : %d", m_layerPTLIdx );
     312#endif
    310313#if O0194_DIFFERENT_BITDEPTH_EL_BL
    311314  printf("Input bit depth                   : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] );
     
    313316  printf("PCM sample bit depth              : (Y:%d, C:%d)\n", m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA], m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] );
    314317#endif
    315 #if SVC_EXTENSION
    316318  std::cout << "Input ChromaFormatIDC             :";
    317 #else
    318   std::cout << std::setw(43) << "Input ChromaFormatIDC = ";
    319 #endif
     319
    320320  switch (m_InputChromaFormatIDC)
    321321  {
    322   case CHROMA_400:  std::cout << "  4:0:0"; break;
    323   case CHROMA_420:  std::cout << "  4:2:0"; break;
    324   case CHROMA_422:  std::cout << "  4:2:2"; break;
    325   case CHROMA_444:  std::cout << "  4:4:4"; break;
     322  case CHROMA_400:  std::cout << " 4:0:0"; break;
     323  case CHROMA_420:  std::cout << " 4:2:0"; break;
     324  case CHROMA_422:  std::cout << " 4:2:2"; break;
     325  case CHROMA_444:  std::cout << " 4:4:4"; break;
    326326  default:
    327327    std::cerr << "Invalid";
     
    330330  std::cout << std::endl;
    331331
    332 #if SVC_EXTENSION
    333332  std::cout << "Output (internal) ChromaFormatIDC :";
    334 #else
    335   std::cout << std::setw(43) << "Output (internal) ChromaFormatIDC = ";
    336 #endif
    337333  switch (m_chromaFormatIDC)
    338334  {
    339   case CHROMA_400:  std::cout << "  4:0:0"; break;
    340   case CHROMA_420:  std::cout << "  4:2:0"; break;
    341   case CHROMA_422:  std::cout << "  4:2:2"; break;
    342   case CHROMA_444:  std::cout << "  4:4:4"; break;
     335  case CHROMA_400:  std::cout << " 4:0:0"; break;
     336  case CHROMA_420:  std::cout << " 4:2:0"; break;
     337  case CHROMA_422:  std::cout << " 4:2:2"; break;
     338  case CHROMA_444:  std::cout << " 4:4:4"; break;
    343339  default:
    344340    std::cerr << "Invalid";
    345341    exit(1);
    346342  }
    347 #if SVC_EXTENSION
    348343  printf("\n");
    349 #else
    350   std::cout << "\n" << std::endl;
    351 #endif
    352344#if LAYER_CTB
    353345  printf("CU size / depth                   : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth );
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncLayerCfg.h

    r916 r945  
    4747  ChromaFormat m_chromaFormatConstraint;
    4848  UInt      m_bitDepthConstraint;
     49  Bool      m_intraConstraintFlag;
     50  Bool      m_lowerBitRateConstraintFlag;
    4951#if AUXILIARY_PICTURES
    5052  Int       m_auxId;
     
    152154#endif
    153155
     156#if MULTIPLE_PTL_SUPPORT
     157  // profile/level
     158  Int       m_layerPTLIdx;
     159#endif
     160
    154161public:
    155162  TAppEncLayerCfg();
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncTop.cpp

    r928 r945  
    202202#endif
    203203
     204#if MULTIPLE_PTL_SUPPORT
     205  //Populate PTL in VPS
     206  TComVPS *pVPS = m_acTEncTop[0].getVPS();
     207  ProfileTierLevel& profileTierLevel = *(pVPS->getPTL(0)->getGeneralPTL());
     208  for( Int ii = 0; ii < m_numPTLInfo; ii++ )
     209  {
     210    profileTierLevel = *(pVPS->getPTL(ii)->getGeneralPTL());
     211
     212    profileTierLevel.setLevelIdc(m_levelList[ii]);
     213    profileTierLevel.setTierFlag(m_levelTierList[ii]);
     214    profileTierLevel.setProfileIdc(m_profileList[ii]);
     215    profileTierLevel.setProfileCompatibilityFlag(m_profileList[ii], 1);
     216    profileTierLevel.setProgressiveSourceFlag(m_progressiveSourceFlagList[ii]);
     217    profileTierLevel.setInterlacedSourceFlag(m_interlacedSourceFlagList[ii]);
     218    profileTierLevel.setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[ii]);
     219    profileTierLevel.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[ii]);
     220  }
     221  pVPS->setNumProfileTierLevel(m_numPTLInfo);
     222
     223  std::vector<int> myvector;
     224  vps->getProfileLevelTierIdx()->resize(m_numOutputLayerSets);
     225  for (int ii = 0; ii < m_numOutputLayerSets; ii++)
     226  {
     227    myvector =  m_listOfLayerPTLofOlss[ii];
     228    vps->getProfileLevelTierIdx()->resize(myvector.size());
     229    for (std::vector<int>::iterator it = myvector.begin() ; it != myvector.end(); ++it)
     230    {
     231      pVPS->addProfileLevelTierIdx(ii, it[0]);
     232    }
     233  }
     234#endif
     235
    204236  assert( m_numLayers <= MAX_LAYERS );
    205237
     
    222254#endif
    223255#endif
    224     //m_acTEncTop[layer].setVPS(&vps);
     256   
     257#if MULTIPLE_PTL_SUPPORT
     258    Int layerPTLIdx = m_acLayerCfg[layer].m_layerPTLIdx;
     259    m_acTEncTop[layer].setProfile                                         ( m_profileList[layerPTLIdx] );
     260    m_acTEncTop[layer].setLevel                                           ( m_levelTierList[layerPTLIdx], m_levelList[layerPTLIdx] );
     261    m_acTEncTop[layer].setProgressiveSourceFlag                           ( m_progressiveSourceFlagList[layerPTLIdx] );
     262    m_acTEncTop[layer].setInterlacedSourceFlag                            ( m_interlacedSourceFlagList[layerPTLIdx] );
     263    m_acTEncTop[layer].setNonPackedConstraintFlag                         ( m_nonPackedConstraintFlagList[layerPTLIdx] );
     264    m_acTEncTop[layer].setFrameOnlyConstraintFlag                         ( m_frameOnlyConstraintFlagList[layerPTLIdx] );
     265    m_acTEncTop[layer].setBitDepthConstraintValue                         ( m_acLayerCfg[layer].m_bitDepthConstraint );
     266    m_acTEncTop[layer].setChromaFormatConstraintValue                     ( m_acLayerCfg[layer].m_chromaFormatConstraint );
     267    m_acTEncTop[layer].setIntraConstraintFlag                             ( m_acLayerCfg[layer].m_intraConstraintFlag );
     268    m_acTEncTop[layer].setLowerBitRateConstraintFlag                      ( m_acLayerCfg[layer].m_lowerBitRateConstraintFlag );
     269#else
    225270    m_acTEncTop[layer].setProfile                                         ( m_profile );
    226271    m_acTEncTop[layer].setLevel                                           ( m_levelTier, m_level );
     
    233278    m_acTEncTop[layer].setIntraConstraintFlag                             ( m_intraConstraintFlag );
    234279    m_acTEncTop[layer].setLowerBitRateConstraintFlag                      ( m_lowerBitRateConstraintFlag );
     280#endif
    235281
    236282    m_acTEncTop[layer].setPrintMSEBasedSequencePSNR                       ( m_printMSEBasedSequencePSNR);
     
    423469    m_acTEncTop[layer].setChromaCrQpOffset                                 ( m_crQpOffset  );
    424470
    425     m_acTEncTop[layer].setChromaFormatIdc                                  ( m_chromaFormatIDC  );
     471    m_acTEncTop[layer].setChromaFormatIdc                                  ( m_acLayerCfg[layer].m_chromaFormatIDC  );
    426472
    427473#if ADAPTIVE_QP_SELECTION
     
    14381484    vps->setIlpSshSignalingEnabledFlag(false);
    14391485#if VPS_EXTN_PROFILE_INFO
    1440 
     1486#if !MULTIPLE_PTL_SUPPORT
    14411487#if LIST_OF_PTL
    14421488  vps->getPTLForExtnPtr()->resize(1);   // Dummy object - unused.
     
    14671513    *(vps->getPTLForExtn(setId)) = *(m_acTEncTop[setId].getSPS()->getPTL());
    14681514  }
     1515#endif
    14691516#endif
    14701517#endif
     
    15771624#endif
    15781625  // Target output layer
     1626#if !MULTIPLE_PTL_SUPPORT
    15791627#if LIST_OF_PTL
    15801628  vps->setNumProfileTierLevel( vps->getPTLForExtnPtr()->size() ); // +1 for the base VPS PTL()
     
    15821630  vps->setNumOutputLayerSets(vps->getNumLayerSets());
    15831631  vps->setNumProfileTierLevel(vps->getNumLayerSets());
     1632#endif
    15841633#endif
    15851634#if !OUTPUT_LAYER_SETS_CONFIG // Taken care by configuration file parameter
     
    16731722  vps->checkNecessaryLayerFlagCondition();
    16741723#endif
     1724#if !MULTIPLE_PTL_SUPPORT
    16751725#if PER_LAYER_PTL
    16761726  vps->getProfileLevelTierIdx()->resize(vps->getNumOutputLayerSets());
     
    16931743    }
    16941744  }
     1745#endif
    16951746#endif
    16961747#if SUB_LAYERS_IN_LAYER_SET
  • branches/SHM-upgrade/source/Lib/TLibCommon/TComSlice.h

    r916 r945  
    621621  Bool        m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1];
    622622#endif
    623 
     623#if !MULTIPLE_PTL_SUPPORT
    624624  TComPTL     m_pcPTL;
     625#endif
    625626  TimingInfo  m_timingInfo;
    626627
    627628#if SVC_EXTENSION
     629#if MULTIPLE_PTL_SUPPORT
     630  TComPTL     m_pcPTLList[NUM_POSSIBLE_LEVEL];
     631#endif
    628632#if DERIVE_LAYER_ID_LIST_VARIABLES
    629633#if Q0078_ADD_LAYER_SETS
     
    689693  UInt       m_profileLayerSetRef[MAX_VPS_LAYER_SETS_PLUS1];    // The value with index 0 will not be used.
    690694#endif
     695#if !MULTIPLE_PTL_SUPPORT
    691696  std::vector<TComPTL>    m_pcPTLForExtn; 
     697#endif
    692698#endif
    693699#if VPS_EXTN_OP_LAYER_SETS
     
    10041010  Void    setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id)  { m_layerIdIncludedFlag[opsIdx][id] = v;    }
    10051011
     1012#if !MULTIPLE_PTL_SUPPORT
    10061013  TComPTL* getPTL() { return &m_pcPTL; }
     1014#endif
     1015
    10071016  TimingInfo* getTimingInfo() { return &m_timingInfo; }
    10081017
    10091018#if SVC_EXTENSION
     1019#if MULTIPLE_PTL_SUPPORT
     1020  TComPTL* getPTL() { return &m_pcPTLList[0]; }
     1021  TComPTL* getPTL(UInt idx) { return &m_pcPTLList[idx]; }
     1022#endif
    10101023#if DERIVE_LAYER_ID_LIST_VARIABLES
    10111024  Int     getLayerSetLayerIdList(Int set, Int layerId)          { return m_layerSetLayerIdList[set][layerId]; }
     
    11051118#endif
    11061119
     1120#if !MULTIPLE_PTL_SUPPORT
    11071121  std::vector<TComPTL>* getPTLForExtnPtr()                      { return &m_pcPTLForExtn;          }
    11081122  TComPTL* getPTLForExtn(Int id)                                { return &m_pcPTLForExtn[id];      }
     1123#endif
    11091124#endif
    11101125#if VPS_EXTN_OP_LAYER_SETS
     
    11721187  Int    getProfileLevelTierIdx(Int const olsIdx, Int const layerIdx)     { return m_profileLevelTierIdx[olsIdx][layerIdx]; }
    11731188  Void   setProfileLevelTierIdx(Int const olsIdx, Int const layerIdx, Int const ptlIdx)     { m_profileLevelTierIdx[olsIdx][layerIdx] = ptlIdx; }
    1174   Int calculateLenOfSyntaxElement( Int const numVal );
     1189#if MULTIPLE_PTL_SUPPORT
     1190  Void   addProfileLevelTierIdx(Int const olsIdx, Int const ptlIdx)     { m_profileLevelTierIdx[olsIdx].push_back(ptlIdx); }
     1191#endif
     1192  Int    calculateLenOfSyntaxElement( Int const numVal );
    11751193#else
    11761194  Int    getProfileLevelTierIdx(Int i)                        { return m_profileLevelTierIdx[i]; }
  • branches/SHM-upgrade/source/Lib/TLibCommon/TypeDef.h

    r928 r945  
    245245#define MAX_NUM_ADD_LAYER_SETS           1023
    246246#endif
     247#define MULTIPLE_PTL_SUPPORT             1      ///< Profile, tier and level signalling
     248#define NUM_POSSIBLE_LEVEL               13
    247249
    248250#define VPS_DPB_SIZE_TABLE               1      ///< JCTVC-O0217: DPB operations: signaling DPB-related parameters
     
    927929    MAINREXT = 4,
    928930    HIGHTHROUGHPUTREXT = 5,
    929 #if SVC_EXTENSION
    930     SCALABLE = 6,
    931     SCALABLE10 = 7,
    932 #endif
    933931  };
    934932}
  • branches/SHM-upgrade/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r938 r945  
    22342234  for (Int i = 0; i < maxNumSubLayersMinus1; i++)
    22352235  {
     2236#if MULTIPLE_PTL_SUPPORT
     2237    READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode);
     2238#else
    22362239    if(profilePresentFlag)
    22372240    {
    22382241      READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode);
    22392242    }
     2243#endif
    22402244    READ_FLAG( uiCode, "sub_layer_level_present_flag[i]"   ); rpcPTL->setSubLayerLevelPresentFlag  (i, uiCode);
    22412245  }
     
    22522256  for(Int i = 0; i < maxNumSubLayersMinus1; i++)
    22532257  {
     2258#if MULTIPLE_PTL_SUPPORT
     2259    if( rpcPTL->getSubLayerProfilePresentFlag(i) )
     2260#else
    22542261    if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )
     2262#endif
    22552263    {
    22562264      parseProfileTier(rpcPTL->getSubLayerPTL(i));
     
    27442752  {
    27452753    vps->setProfilePresentFlag(1, false);
     2754#if MULTIPLE_PTL_SUPPORT
     2755    parsePTL( vps->getPTL(1), vps->getProfilePresentFlag(1), vps->getMaxTLayers() - 1 );
     2756#else
    27462757    vps->getPTLForExtnPtr()->empty();
    27472758    vps->getPTLForExtnPtr()->resize(2);
    27482759    vps->getPTLForExtn(1)->copyProfileInfo( vps->getPTL() );
    27492760    parsePTL( vps->getPTLForExtn(1), vps->getProfilePresentFlag(1), vps->getMaxTLayers() - 1 );
     2761#endif
    27502762  }
    27512763#endif
     
    29742986  Int const numBitsForPtlIdx = vps->calculateLenOfSyntaxElement( vps->getNumProfileTierLevel() );
    29752987#endif
     2988#if !MULTIPLE_PTL_SUPPORT
    29762989  vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel());
     2990#endif
    29772991#if LIST_OF_PTL
    29782992  for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
     
    29863000#if P0048_REMOVE_PROFILE_REF
    29873001      // Copy profile information from previous one
     3002#if MULTIPLE_PTL_SUPPORT
     3003      vps->getPTL(idx)->copyProfileInfo( vps->getPTL( idx - 1 ) );
     3004#else
    29883005      vps->getPTLForExtn(idx)->copyProfileInfo( (idx==1) ? vps->getPTL() : vps->getPTLForExtn( idx - 1 ) );
     3006#endif
    29893007#else
    29903008      READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1);
     
    29983016#endif
    29993017    }
     3018#if MULTIPLE_PTL_SUPPORT
     3019    parsePTL( vps->getPTL(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
     3020#else
    30003021    parsePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
     3022#endif
    30013023  }
    30023024#endif
  • branches/SHM-upgrade/source/Lib/TLibEncoder/TEncCavlc.cpp

    r938 r945  
    14551455  for (Int i = 0; i < maxNumSubLayersMinus1; i++)
    14561456  {
     1457#if MULTIPLE_PTL_SUPPORT
     1458    WRITE_FLAG( pcPTL->getSubLayerProfilePresentFlag(i), "sub_layer_profile_present_flag[i]" );
     1459#else
    14571460    if(profilePresentFlag)
    14581461    {
    14591462      WRITE_FLAG( pcPTL->getSubLayerProfilePresentFlag(i), "sub_layer_profile_present_flag[i]" );
    14601463    }
     1464#endif
    14611465
    14621466    WRITE_FLAG( pcPTL->getSubLayerLevelPresentFlag(i),   "sub_layer_level_present_flag[i]" );
     
    14731477  for(Int i = 0; i < maxNumSubLayersMinus1; i++)
    14741478  {
     1479#if MULTIPLE_PTL_SUPPORT
     1480    if( pcPTL->getSubLayerProfilePresentFlag(i) )
     1481#else
    14751482    if( profilePresentFlag && pcPTL->getSubLayerProfilePresentFlag(i) )
     1483#endif
    14761484    {
    14771485      codeProfileTier(pcPTL->getSubLayerPTL(i));  // sub_layer_...
     
    20602068  if( vps->getMaxLayers() > 1 && vps->getBaseLayerInternalFlag() )
    20612069  {
     2070#if MULTIPLE_PTL_SUPPORT
     2071    codePTL( vps->getPTL(1), false, vps->getMaxTLayers() - 1 );
     2072#else
    20622073    codePTL( vps->getPTLForExtn(1), false, vps->getMaxTLayers() - 1 );
     2074#endif
    20632075  }
    20642076#endif
     
    22262238#endif
    22272239#if LIST_OF_PTL
     2240#if MULTIPLE_PTL_SUPPORT
     2241  //Do something here to make sure the loop is correct to consider base layer internal stuff
     2242#else
    22282243  assert( vps->getNumProfileTierLevel() == vps->getPTLForExtnPtr()->size());
     2244#endif
    22292245  for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
    22302246#else
     
    22322248#endif
    22332249  {
     2250#if MULTIPLE_PTL_SUPPORT
     2251    vps->setProfilePresentFlag(idx, true);
     2252#endif
    22342253    WRITE_FLAG( vps->getProfilePresentFlag(idx),       "vps_profile_present_flag[i]" );
    22352254#if !P0048_REMOVE_PROFILE_REF
     
    22392258    }
    22402259#endif
     2260#if MULTIPLE_PTL_SUPPORT
     2261    codePTL( vps->getPTL(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
     2262#else
    22412263    codePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
     2264#endif
    22422265  }
    22432266#endif
Note: See TracChangeset for help on using the changeset viewer.