Changeset 872 in 3DVCSoftware for trunk/source/App


Ignore:
Timestamp:
27 Mar 2014, 10:11:29 (11 years ago)
Author:
tech
Message:

Merged HTM-10.0-dev0@871. (MV-HEVC 7 HLS)

Location:
trunk/source/App
Files:
23 edited

Legend:

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

    r773 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/TAppDecoder/TAppDecCfg.h

    r773 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/TAppDecoder/TAppDecTop.cpp

    r773 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    140140    AOF( m_pScaleOffsetFile );
    141141  }
     142#if !FIX_CAM_PARS_COLLECTOR
    142143  m_cCamParsCollector.init( m_pScaleOffsetFile );
     144#endif
    143145#endif
    144146  InputByteStream bytestream(bitstreamFile);
     
    165167  Bool firstSlice        = true;
    166168#endif
    167  
     169  Bool loopFiltered      = false;
     170
    168171  while (!!bitstreamFile)
    169172  {
     
    206209      read(nalu, nalUnit);
    207210#if H_MV     
     211#if H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO
     212      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer)
     213          || !isNaluWithinTargetDecLayerIdSet(&nalu)
     214          || nalu.m_layerId > MAX_NUM_LAYER_IDS-1
     215          || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0)           
     216#if H_MV_HLS_7_MISC_P0130_EOS
     217          || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0)           
     218#endif
     219         )
     220#else
    208221      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 )
     222#endif
    209223      {
    210224        bNewPicture = false;
     
    234248          }
    235249
     250#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     251          if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() )
     252          {
     253            fprintf(stderr, "\ntarget output layer set index must be in the range of 0 to %d, inclusive \n", vps->getNumOutputLayerSets() - 1 );           
     254            exit(EXIT_FAILURE);
     255          }
     256#endif
    236257          m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx );
    237258        }
     259
     260#if FIX_CAM_PARS_COLLECTOR
     261#if H_3D
     262        if (nalu.m_nalUnitType == NAL_UNIT_VPS )
     263        {       
     264         
     265          m_cCamParsCollector.init( m_pScaleOffsetFile, m_tDecTop[decIdx]->getPrefetchedVPS() );
     266        }       
     267#endif
     268#endif
    238269        bNewPicture       = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag;
    239270        if ( nalu.isSlice() && firstSlice && !sliceSkippedFlag )       
     
    278309          bitstreamFile.seekg(location-streamoff(3));
    279310          bytestream.reset();
     311#if H_MV_ENC_DEC_TRAC
    280312#if ENC_DEC_TRACE
    281 #if H_MV_ENC_DEC_TRAC
    282313          const Bool resetCounter = false;
    283314          if ( resetCounter )
     
    287318          else
    288319          {
    289             g_disableHLSTrace = true;     // Trancing of second parsing of SH is not carried out
    290           }         
    291 #else
    292           g_nSymbolCounter = symCount;
    293 #endif
    294 #endif
    295         }
    296       }
    297     }
    298     if (bNewPicture || !bitstreamFile)
    299     {
    300 #if H_MV
    301       assert( decIdxLastPic != -1 );
    302       m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet );
    303 #else
    304       m_cTDecTop.executeLoopFilters(poc, pcListPic);
    305 #endif
     320            g_disableHLSTrace = true;     // Tracing of second parsing of SH is not carried out
     321          }     
     322#endif
     323#endif
     324        }
     325      }
     326    }
     327    if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS )
     328    {
     329      if (!loopFiltered || bitstreamFile)
     330      {
     331#if H_MV
     332        assert( decIdxLastPic != -1 );
     333        m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet );
     334#else
     335        m_cTDecTop.executeLoopFilters(poc, pcListPic);
     336#endif
     337      }
     338      loopFiltered = (nalu.m_nalUnitType == NAL_UNIT_EOS);
    306339    }
    307340#if H_3D
     
    351384#endif
    352385      }
     386      if (nalu.m_nalUnitType == NAL_UNIT_EOS)
     387      {
     388#if H_MV
     389        xFlushOutput( pcListPic, decIdxLastPic );
     390#else
     391        xFlushOutput( pcListPic );
     392#endif
     393      }
    353394      // write reconstruction to file
    354395      if(bNewPicture)
     
    462503#endif
    463504{
     505
     506  if (pcListPic->empty())
     507  {
     508    return;
     509  }
     510
    464511  TComList<TComPic*>::iterator iterPic   = pcListPic->begin();
    465512  Int numPicsNotYetDisplayed = 0;
     
    647694#endif
    648695{
    649   if(!pcListPic)
     696  if(!pcListPic || pcListPic->empty())
    650697  {
    651698    return;
  • trunk/source/App/TAppDecoder/TAppDecTop.h

    r773 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/TAppDecoder/decmain.cpp

    r608 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/TAppEncoder/TAppEncCfg.cpp

    r833 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    388388  ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")   
    389389  ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 
     390#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     391  ("DefaultTargetOutputLayerIdc"     , m_defaultTargetOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
     392#else
    390393  ("DefaultOneTargetOutputLayerFlag"  , m_defaultOneTargetOutputLayerIdc  , 0, "Output highest layer of layer sets by default")
     394#endif
    391395  ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 
     396
     397#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     398  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 
     399  ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 
     400#else
    392401  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") 
     402#endif
    393403  ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
    394404 
     
    444454  ("QuadtreeTUMaxDepthIntra", m_uiQuadtreeTUMaxDepthIntra, 1u, "Depth of TU tree for intra CUs")
    445455  ("QuadtreeTUMaxDepthInter", m_uiQuadtreeTUMaxDepthInter, 2u, "Depth of TU tree for inter CUs")
     456#if H_MV 
    446457  // Coding structure parameters
    447 #if H_MV 
    448458  ("IntraPeriod,-ip",         m_iIntraPeriod,std::vector<Int>(1,-1), "Intra period in frames, (-1: only first frame), per layer")
    449459#else
     460  // Coding structure paramters
    450461("IntraPeriod,-ip",         m_iIntraPeriod,              -1, "Intra period in frames, (-1: only first frame)")
    451462#endif
     
    492503  ("RDOQTS",                        m_useRDOQTS,                true )
    493504  ("RDpenalty",                     m_rdPenalty,                0,  "RD-penalty for 32x32 TU for intra in non-intra slices. 0:disbaled  1:RD-penalty  2:maximum RD-penalty")
    494   // Entropy coding parameters
    495   ("SBACRD",                         m_bUseSBACRD,                      true, "SBAC based RD estimation")
    496505 
    497506  // Deblocking filter parameters
     
    539548  ("MaxNumOffsetsPerPic",      m_maxNumOffsetsPerPic,       2048,  "Max number of SAO offset per picture (Default: 2048)")   
    540549  ("SAOLcuBoundary",           m_saoLcuBoundary,            false, "0: right/bottom LCU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas")
    541   ("SAOLcuBasedOptimization",  m_saoLcuBasedOptimization,   true,  "0: SAO picture-based optimization, 1: SAO LCU-based optimization ")
    542550  ("SliceMode",                m_sliceMode,                0,     "0: Disable all Recon slice limits, 1: Enforce max # of LCUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice")
    543551  ("SliceArgument",            m_sliceArgument,            0,     "Depending on SliceMode being:"
     
    559567  ("PCMInputBitDepthFlag",     m_bPCMInputBitDepthFlag,     true)
    560568  ("PCMFilterDisableFlag",     m_bPCMFilterDisableFlag,    false)
    561 
    562   ("LosslessCuEnabled",        m_useLossless, false)
    563569
    564570  ("WeightedPredP,-wpP",          m_useWeightedPred,               false,      "Use weighted prediction in P slices")
     
    590596  ("CFM", m_bUseCbfFastMode, false, "Cbf fast mode setting")
    591597  ("ESD", m_useEarlySkipDetection, false, "Early SKIP detection setting")
    592 #if RATE_CONTROL_LAMBDA_DOMAIN
    593598  ( "RateControl",         m_RCEnableRateControl,   false, "Rate control: enable rate control" )
    594599  ( "TargetBitrate",       m_RCTargetBitrate,           0, "Rate control: target bitrate" )
    595 #if M0036_RC_IMPROVEMENT
    596600  ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit,     0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" )
    597 #else
    598   ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, false, "Rate control: keep hierarchical bit allocation in rate control algorithm" )
    599 #endif
    600601  ( "LCULevelRateControl", m_RCLCULevelRC,           true, "Rate control: true: LCU level RC; false: picture level RC" )
    601602  ( "RCLCUSeparateModel",  m_RCUseLCUSeparateModel,  true, "Rate control: use LCU level separate R-lambda model" )
     
    610611  ("DepthMADPred, -dm", m_depthMADPred, (UInt)0, "Depth based MAD prediction on/off")
    611612#endif
    612 #else
    613   ("RateCtrl,-rc", m_enableRateCtrl, false, "Rate control on/off")
    614   ("TargetBitrate,-tbr", m_targetBitrate, 0, "Input target bitrate")
    615   ("NumLCUInUnit,-nu", m_numLCUInUnit, 0, "Number of LCUs in an Unit")
    616 
    617 #if KWU_RC_VIEWRC_E0227
    618   ("ViewWiseTargetBits, -vtbr" ,  m_viewTargetBits,  std::vector<Int>(1, 32), "View-wise target bit-rate setting")
    619   ("TargetBitAssign, -ta", m_viewWiseRateCtrl, false, "View-wise rate control on/off")
    620 #endif
    621 #if KWU_RC_MADPRED_E0227
    622   ("DepthMADPred, -dm", m_depthMADPred, (UInt)0, "Depth based MAD prediction on/off")
    623 #endif
    624 #endif
    625 
    626613#if H_MV
    627614
    628615  // DBP Size
     616#if !H_MV_HLS_7_FIX_SET_DPB_SIZE
    629617  ("SubLayerFlagInfoPresentFlag",  m_subLayerFlagInfoPresentFlag , false                                           , "SubLayerFlagInfoPresentFlag")
     618#endif
    630619  // VPS VUI
    631620  ("VpsVuiPresentFlag"           , m_vpsVuiPresentFlag           , false                                           , "VpsVuiPresentFlag           ")
    632621  ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false                                           , "CrossLayerPicTypeAlignedFlag")  // Could actually be derived by the encoder
    633622  ("CrossLayerIrapAlignedFlag"   , m_crossLayerIrapAlignedFlag   , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
     623#if H_MV_HLS_7_MISC_P0068_21
     624  ("AllLayersIdrAlignedFlag"     , m_allLayersIdrAlignedFlag     , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
     625#endif
    634626  ("BitRatePresentVpsFlag"       , m_bitRatePresentVpsFlag       , false                                           , "BitRatePresentVpsFlag       ")
    635627  ("PicRatePresentVpsFlag"       , m_picRatePresentVpsFlag       , false                                           , "PicRatePresentVpsFlag       ")
     
    653645
    654646  ("TransquantBypassEnableFlag", m_TransquantBypassEnableFlag, false, "transquant_bypass_enable_flag indicator in PPS")
    655   ("CUTransquantBypassFlagValue", m_CUTransquantBypassFlagValue, false, "Fixed cu_transquant_bypass_flag value, when transquant_bypass_enable_flag is enabled")
     647  ("CUTransquantBypassFlagForce", m_CUTransquantBypassFlagForce, false, "Force transquant bypass mode, when transquant_bypass_enable_flag is enabled")
    656648  ("RecalculateQPAccordingToLambda", m_recalculateQPAccordingToLambda, false, "Recalculate QP values according to lambda values. Do not suggest to be enabled in all intra case")
    657649  ("StrongIntraSmoothing,-sis",      m_useStrongIntraSmoothing,           true, "Enable strong intra smoothing for 32x32 blocks")
     
    745737  ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
    746738  ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
     739#if H_MV_HLS_7_SEI_P0204_26
     740  ("SubBitstreamPropSEIEnabled",              m_subBistreamPropSEIEnabled,    false                     ,"Enable signaling of sub-bitstream property SEI message")
     741  ("SEISubBitstreamNumAdditionalSubStreams",  m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled")
     742  ("SEISubBitstreamSubBitstreamMode",         m_sbPropSubBitstreamMode,       std::vector< Int  >(1,0)  ,"Specifies mode of generation of the i-th sub-bitstream (0 or 1)")
     743  ("SEISubBitstreamOutputLayerSetIdxToVps",   m_sbPropOutputLayerSetIdxToVps, std::vector< Int  >(1,0)  ,"Specifies output layer set index of the i-th sub-bitstream ")
     744  ("SEISubBitstreamHighestSublayerId",        m_sbPropHighestSublayerId,      std::vector< Int  >(1,0)  ,"Specifies highest TemporalId of the i-th sub-bitstream")
     745  ("SEISubBitstreamAvgBitRate",               m_sbPropAvgBitRate,             std::vector< Int  >(1,0)  ,"Specifies average bit rate of the i-th sub-bitstream")
     746  ("SEISubBitstreamMaxBitRate",               m_sbPropMaxBitRate,             std::vector< Int  >(1,0)  ,"Specifies maximum bit rate of the i-th sub-bitstream")
     747#endif
    747748#if H_3D
    748749  ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
     
    14311432  }
    14321433
     1434#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1435  xConfirmPara( m_defaultTargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." ); 
     1436
     1437  if( m_defaultTargetOutputLayerIdc != 2 )
     1438  {
     1439    Bool anyDefaultOutputFlag = false;   
     1440    for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++)
     1441    {
     1442      anyDefaultOutputFlag = anyDefaultOutputFlag || ( m_layerIdsInDefOutputLayerSet[lsIdx].size() != 0 );
     1443    }   
     1444    printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" );   
     1445  }
     1446  else 
     1447  { 
     1448    for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++)
     1449    {
     1450      for (Int i = 0; i < m_layerIdsInDefOutputLayerSet[ lsIdx ].size(); i++)
     1451      {
     1452        Bool inLayerSetFlag = false;
     1453        for (Int j = 0; j < m_layerIdsInSets[ lsIdx].size(); j++ )
     1454        {
     1455          if ( m_layerIdsInSets[ lsIdx ][ j ] == m_layerIdsInDefOutputLayerSet[ lsIdx ][ i ] )
     1456          {
     1457            inLayerSetFlag = true;
     1458            break;
     1459          }       
     1460        }
     1461        xConfirmPara( !inLayerSetFlag, "All output layers of a output layer set must be included in corresponding layer set.");
     1462      }
     1463    }
     1464  }
     1465#else
    14331466  xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" );
     1467#endif
    14341468  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" );
    14351469
     
    20212055      m_maxTempLayer = m_GOPList[i].m_temporalId+1;
    20222056    }
    2023     xConfirmPara(m_GOPList[i].m_sliceType!='B'&&m_GOPList[i].m_sliceType!='P', "Slice type must be equal to B or P");
     2057    xConfirmPara(m_GOPList[i].m_sliceType!='B'&&m_GOPList[i].m_sliceType!='P'&&m_GOPList[i].m_sliceType!='I', "Slice type must be equal to B or P or I");
    20242058  }
    20252059  for(Int i=0; i<MAX_TLAYER; i++)
     
    21722206  }
    21732207
    2174 #if RATE_CONTROL_LAMBDA_DOMAIN
    21752208  if ( m_RCEnableRateControl )
    21762209  {
     
    21852218    xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" );
    21862219  }
    2187 #else
    2188   if(m_enableRateCtrl)
    2189   {
    2190     Int numLCUInWidth  = (m_iSourceWidth  / m_uiMaxCUWidth) + (( m_iSourceWidth  %  m_uiMaxCUWidth ) ? 1 : 0);
    2191     Int numLCUInHeight = (m_iSourceHeight / m_uiMaxCUHeight)+ (( m_iSourceHeight %  m_uiMaxCUHeight) ? 1 : 0);
    2192     Int numLCUInPic    =  numLCUInWidth * numLCUInHeight;
    2193 
    2194     xConfirmPara( (numLCUInPic % m_numLCUInUnit) != 0, "total number of LCUs in a frame should be completely divided by NumLCUInUnit" );
    2195 
    2196 #if !KWU_FIX_URQ
    2197     m_iMaxDeltaQP       = MAX_DELTA_QP;
    2198 #endif
    2199     m_iMaxCuDQPDepth    = MAX_CUDQP_DEPTH;
    2200   }
    2201 #endif
    22022220#if H_MV
    22032221  // VPS VUI
     
    22232241#endif
    22242242
    2225   xConfirmPara(!m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagValue, "CUTransquantBypassFlagValue cannot be 1 when TransquantBypassEnableFlag is 0");
     2243  xConfirmPara(!m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagForce, "CUTransquantBypassFlagForce cannot be 1 when TransquantBypassEnableFlag is 0");
    22262244
    22272245  xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2");
     
    22332251#if H_MV
    22342252  }
     2253  }
     2254#endif
     2255#if H_MV_HLS_7_SEI_P0204_26
     2256  // Check input parameters for Sub-bitstream property SEI message
     2257  if( m_subBistreamPropSEIEnabled )
     2258  {
     2259    xConfirmPara(
     2260      (this->m_sbPropNumAdditionalSubStreams != m_sbPropAvgBitRate.size() )
     2261      || (this->m_sbPropNumAdditionalSubStreams != m_sbPropHighestSublayerId.size() )
     2262      || (this->m_sbPropNumAdditionalSubStreams != m_sbPropMaxBitRate.size() )
     2263      || (this->m_sbPropNumAdditionalSubStreams != m_sbPropOutputLayerSetIdxToVps.size() )
     2264      || (this->m_sbPropNumAdditionalSubStreams != m_sbPropSubBitstreamMode.size()), "Some parameters of some sub-bitstream not defined");
     2265
     2266    for( Int i = 0; i < m_sbPropNumAdditionalSubStreams; i++ )
     2267    {
     2268      xConfirmPara( m_sbPropSubBitstreamMode[i] < 0 || m_sbPropSubBitstreamMode[i] > 1, "Mode value should be 0 or 1" );
     2269      xConfirmPara( m_sbPropHighestSublayerId[i] < 0 || m_sbPropHighestSublayerId[i] > MAX_TLAYER-1, "Maximum sub-layer ID out of range" );
     2270      xConfirmPara( m_sbPropOutputLayerSetIdxToVps[i] < 0 || m_sbPropOutputLayerSetIdxToVps[i] >= MAX_VPS_OUTPUTLAYER_SETS, "OutputLayerSetIdxToVps should be within allowed range" );
     2271    }
    22352272  }
    22362273#endif
     
    23432380  printf("Internal bit depth           : (Y:%d, C:%d)\n", m_internalBitDepthY, m_internalBitDepthC );
    23442381  printf("PCM sample bit depth         : (Y:%d, C:%d)\n", g_uiPCMBitDepthLuma, g_uiPCMBitDepthChroma );
    2345 #if RATE_CONTROL_LAMBDA_DOMAIN
    23462382  printf("RateControl                  : %d\n", m_RCEnableRateControl );
    23472383  if(m_RCEnableRateControl)
     
    23732409#endif
    23742410  }
    2375 #else
    2376   printf("RateControl                  : %d\n", m_enableRateCtrl);
    2377   if(m_enableRateCtrl)
    2378   {
    2379     printf("TargetBitrate                : %d\n", m_targetBitrate);
    2380     printf("NumLCUInUnit                 : %d\n", m_numLCUInUnit);
    2381 
    2382 #if KWU_RC_MADPRED_E0227
    2383     printf("Depth based MAD prediction   : %d\n", m_depthMADPred);
    2384 #endif
    2385 #if KWU_RC_VIEWRC_E0227
    2386     printf("View-wise Rate control       : %d\n", m_viewWiseRateCtrl);
    2387     if(m_viewWiseRateCtrl)
    2388     {
    2389 
    2390       printf("ViewWiseTargetBits           : ");
    2391       for (Int i = 0 ; i < m_iNumberOfViews ; i++)
    2392         printf("%d ", m_viewTargetBits[i]);
    2393       printf("\n");
    2394     }
    2395     else
    2396     {
    2397       printf("TargetBitrate                : %d\n", m_targetBitrate );
    2398     }
    2399 #endif
    2400   }
    2401 #endif
    24022411  printf("Max Num Merge Candidates     : %d\n", m_maxNumMergeCand);
    24032412#if H_3D
     
    24292438  printf("IBD:%d ", g_bitDepthY > m_inputBitDepthY || g_bitDepthC > m_inputBitDepthC);
    24302439  printf("HAD:%d ", m_bUseHADME           );
    2431   printf("SRD:%d ", m_bUseSBACRD          );
    24322440  printf("RDQ:%d ", m_useRDOQ            );
    24332441  printf("RDQTS:%d ", m_useRDOQTS        );
     
    24582466#endif
    24592467  printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0);
    2460   printf("SAOLcuBasedOptimization:%d ", (m_saoLcuBasedOptimization)?(1):(0));
    2461 
    2462   printf("LosslessCuEnabled:%d ", (m_useLossless)? 1:0 );
     2468  if (m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagForce)
     2469  {
     2470    printf("TransQuantBypassEnabled: =1 ");
     2471  }
     2472  else
     2473  {
     2474    printf("TransQuantBypassEnabled:%d ", (m_TransquantBypassEnableFlag)? 1:0 );
     2475  }
    24632476  printf("WPP:%d ", (Int)m_useWeightedPred);
    24642477  printf("WPB:%d ", (Int)m_useWeightedBiPred);
  • trunk/source/App/TAppEncoder/TAppEncCfg.h

    r833 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    8989  Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
    9090  std::vector< std::vector<Int> > m_layerIdsInSets;           ///< LayerIds in vps of layer set
     91#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     92  Int                    m_defaultTargetOutputLayerIdc;       ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
     93#else
    9194  Int                    m_defaultOneTargetOutputLayerIdc;    ///< Output highest layer of layer sets by default when equal to 1
     95#endif
    9296  std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets 
    9397  std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers
     98#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     99  std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets
     100#endif
    94101  std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
    95102 
     
    99106
    100107  // DBP Size
     108#if !H_MV_HLS_7_FIX_SET_DPB_SIZE
    101109  Bool m_subLayerFlagInfoPresentFlag;
     110#endif
    102111
    103112  // VPS VUI
     
    105114  Bool m_crossLayerPicTypeAlignedFlag;
    106115  Bool m_crossLayerIrapAlignedFlag;
     116#if H_MV_HLS_7_MISC_P0068_21
     117  Bool m_allLayersIdrAlignedFlag;
     118#endif
    107119  Bool m_bitRatePresentVpsFlag;
    108120  Bool m_picRatePresentVpsFlag;
     
    259271  Bool      m_bPCMInputBitDepthFlag;                          ///< 0: PCM bit-depth is internal bit-depth. 1: PCM bit-depth is input bit-depth.
    260272
    261   // coding tool (lossless)
    262   Bool      m_useLossless;                                    ///< flag for using lossless coding
     273  // coding tool (SAO)
    263274#if H_MV
    264275  std::vector<Bool> m_bUseSAO;
     
    268279  Int       m_maxNumOffsetsPerPic;                            ///< SAO maximun number of offset per picture
    269280  Bool      m_saoLcuBoundary;                                 ///< SAO parameter estimation using non-deblocked pixels for LCU bottom and right boundary areas
    270   Bool      m_saoLcuBasedOptimization;                        ///< SAO LCU-based optimization
    271281  // coding tools (loop filter)
    272282#if H_MV
     
    288298
    289299  // coding tools (encoder-only parameters)
    290   Bool      m_bUseSBACRD;                                     ///< flag for using RD optimization based on SBAC
    291300  Bool      m_bUseASR;                                        ///< flag for using adaptive motion search range
    292301  Bool      m_bUseHADME;                                      ///< flag for using HAD in sub-pel ME
     
    372381  Int       m_TMVPModeId;
    373382  Int       m_signHideFlag;
    374 #if RATE_CONTROL_LAMBDA_DOMAIN
    375383  Bool      m_RCEnableRateControl;                ///< enable rate control or not
    376384  Int       m_RCTargetBitrate;                    ///< target bitrate when rate control is enabled
    377 #if M0036_RC_IMPROVEMENT
    378385  Int       m_RCKeepHierarchicalBit;              ///< 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation
    379 #else
    380   Bool      m_RCKeepHierarchicalBit;              ///< whether keeping hierarchical bit allocation structure or not
    381 #endif
    382386  Bool      m_RCLCULevelRC;                       ///< true: LCU level rate control; false: picture level rate control
    383387  Bool      m_RCUseLCUSeparateModel;              ///< use separate R-lambda model at LCU level
     
    392396  UInt       m_depthMADPred;
    393397#endif
    394 #else
    395   Bool      m_enableRateCtrl;                                   ///< Flag for using rate control algorithm
    396   Int       m_targetBitrate;                                 ///< target bitrate
    397   Int       m_numLCUInUnit;                                  ///< Total number of LCUs in a frame should be completely divided by the NumLCUInUnit
    398 
    399 #if KWU_RC_VIEWRC_E0227
    400   vector<Int>     m_viewTargetBits;
    401   Bool      m_viewWiseRateCtrl;                              ///< Flag for using view-wise rate control
    402 #endif
    403 #if KWU_RC_MADPRED_E0227
    404   UInt       m_depthMADPred;
    405 #endif
    406 #endif
    407398  Int       m_useScalingListId;                               ///< using quantization matrix
    408399  Char*     m_scalingListFile;                                ///< quantization matrix file name
    409400
    410401  Bool      m_TransquantBypassEnableFlag;                     ///< transquant_bypass_enable_flag setting in PPS.
    411   Bool      m_CUTransquantBypassFlagValue;                    ///< if transquant_bypass_enable_flag, the fixed value to use for the per-CU cu_transquant_bypass_flag.
     402  Bool      m_CUTransquantBypassFlagForce;                    ///< if transquant_bypass_enable_flag, then, if true, all CU transquant bypass flags will be set to true.
    412403
    413404  Bool      m_recalculateQPAccordingToLambda;                 ///< recalculate QP value according to the lambda value
     
    449440  Int       m_log2MaxMvLengthHorizontal;                      ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units
    450441  Int       m_log2MaxMvLengthVertical;                        ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units
    451 
     442#if H_MV_HLS_7_SEI_P0204_26
     443  Bool              m_subBistreamPropSEIEnabled;
     444  Int               m_sbPropNumAdditionalSubStreams;
     445  std::vector<Int>  m_sbPropSubBitstreamMode;
     446  std::vector<Int>  m_sbPropOutputLayerSetIdxToVps;
     447  std::vector<Int>  m_sbPropHighestSublayerId;
     448  std::vector<Int>  m_sbPropAvgBitRate;
     449  std::vector<Int>  m_sbPropMaxBitRate;
     450#endif
    452451#if H_3D
    453452  // Camera parameters
  • trunk/source/App/TAppEncoder/TAppEncTop.cpp

    r833 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    127127  xSetRepFormat            ( vps );
    128128  xSetLayerSets            ( vps );
     129#if H_MV_HLS_7_FIX_SET_DPB_SIZE
     130  xSetDpbSize              ( vps );
     131#endif
    129132  xSetVPSVUI               ( vps );
    130133#if H_3D
     
    309312#endif
    310313
    311   Int lowestQP;
    312   lowestQP =  - 6*(g_bitDepthY - 8); // XXX: check
    313 
    314 #if H_MV
    315   if ((m_iMaxDeltaQP == 0 ) && (m_iQP[layerIdInVps] == lowestQP) && (m_useLossless == true))
    316 #else
    317   if ((m_iMaxDeltaQP == 0 ) && (m_iQP == lowestQP) && (m_useLossless == true))
    318 #endif
    319   {
    320     m_bUseAdaptiveQP = false;
    321   }
    322314  m_cTEncTop.setUseAdaptiveQP                ( m_bUseAdaptiveQP  );
    323315  m_cTEncTop.setQPAdaptationRange            ( m_iQPAdaptationRange );
    324316 
    325317  //====== Tool list ========
    326   m_cTEncTop.setUseSBACRD                    ( m_bUseSBACRD   );
    327318  m_cTEncTop.setDeltaQpRD                    ( m_uiDeltaQpRD  );
    328319  m_cTEncTop.setUseASR                       ( m_bUseASR      );
    329320  m_cTEncTop.setUseHADME                     ( m_bUseHADME    );
    330   m_cTEncTop.setUseLossless                  ( m_useLossless );
    331321#if H_MV
    332322  m_cTEncTop.setdQPs                         ( m_aidQP[layerIdInVps]   );
     
    396386
    397387  m_cTEncTop.setSaoLcuBoundary (m_saoLcuBoundary);
    398   m_cTEncTop.setSaoLcuBasedOptimization (m_saoLcuBasedOptimization);
    399388  m_cTEncTop.setPCMInputBitDepthFlag  ( m_bPCMInputBitDepthFlag);
    400389  m_cTEncTop.setPCMFilterDisableFlag  ( m_bPCMFilterDisableFlag);
     
    440429  m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
    441430  m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
     431#if H_MV_HLS_7_SEI_P0204_26
     432  m_cTEncTop.setSubBitstreamPropSEIEnabled( m_subBistreamPropSEIEnabled );
     433  if( m_subBistreamPropSEIEnabled )
     434  {
     435    m_cTEncTop.setNumAdditionalSubStreams ( m_sbPropNumAdditionalSubStreams );
     436    m_cTEncTop.setSubBitstreamMode        ( m_sbPropSubBitstreamMode );
     437    m_cTEncTop.setOutputLayerSetIdxToVps  ( m_sbPropOutputLayerSetIdxToVps );
     438    m_cTEncTop.setHighestSublayerId       ( m_sbPropHighestSublayerId );
     439    m_cTEncTop.setAvgBitRate              ( m_sbPropAvgBitRate );
     440    m_cTEncTop.setMaxBitRate              ( m_sbPropMaxBitRate );
     441  }
     442#endif
    442443  m_cTEncTop.setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    443444  m_cTEncTop.setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
     
    461462  m_cTEncTop.setScalingListFile            ( m_scalingListFile   );
    462463  m_cTEncTop.setSignHideFlag(m_signHideFlag);
    463 #if RATE_CONTROL_LAMBDA_DOMAIN
    464464#if KWU_RC_VIEWRC_E0227 || KWU_RC_MADPRED_E0227
    465465  if(!m_cTEncTop.getIsDepth())    //only for texture
     
    482482  m_cTEncTop.setInitialQP           ( m_RCInitialQP );
    483483  m_cTEncTop.setForceIntraQP        ( m_RCForceIntraQP );
    484 
    485484#if KWU_RC_MADPRED_E0227
    486485  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
    487486  {
    488487    m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_depthMADPred       : 0);
    489 
    490488    if(m_cTEncTop.getUseDepthMADPred())
    491489    {
     
    498496  {
    499497    m_cTEncTop.setUseViewWiseRateCtrl(m_viewWiseRateCtrl);
    500 
    501498    if(m_iNumberOfViews == 1)
    502499    {
     
    552549  }
    553550#endif
    554 #else
    555 #if KWU_RC_VIEWRC_E0227 || KWU_RC_MADPRED_E0227
    556   if(!m_cTEncTop.getIsDepth())    //only for texture
    557   {
    558     m_cTEncTop.setUseRateCtrl         ( m_enableRateCtrl );
    559     m_cTEncTop.setTargetBitrate       ( m_targetBitrate );
    560     m_cTEncTop.setNumLCUInUnit        ( m_numLCUInUnit);
    561   }
    562   else
    563   {
    564     m_cTEncTop.setUseRateCtrl         ( 0 );
    565   }
    566 #else
    567   m_cTEncTop.setUseRateCtrl         ( m_enableRateCtrl );
    568   m_cTEncTop.setTargetBitrate       ( m_targetBitrate );
    569   m_cTEncTop.setNumLCUInUnit        ( m_numLCUInUnit);
    570 #endif
    571 
    572  
    573 #if KWU_RC_MADPRED_E0227
    574   if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
    575   {
    576     m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_depthMADPred       : 0);
    577 
    578     if(m_cTEncTop.getUseDepthMADPred())
    579     {
    580       m_cTEncTop.setCamParam(&m_cCameraData);
    581     }
    582   }
    583 #endif
    584 
    585 #if KWU_RC_VIEWRC_E0227
    586   if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
    587   {
    588     m_cTEncTop.setUseViewWiseRateCtrl(m_viewWiseRateCtrl);
    589     if(m_iNumberOfViews == 1)
    590     {
    591       if(m_viewWiseRateCtrl)
    592       {
    593         m_cTEncTop.setTargetBitrate(m_viewTargetBits[layerIdInVps>>1]);
    594       }
    595       else
    596       {
    597         m_cTEncTop.setTargetBitrate       ( m_targetBitrate );
    598       }
    599     }
    600     else
    601     {
    602       if(m_viewWiseRateCtrl)
    603       {
    604         m_cTEncTop.setTargetBitrate(m_viewTargetBits[layerIdInVps>>1]);
    605       }
    606       else
    607       {
    608         if(m_iNumberOfViews == 2)
    609         {
    610           if(m_cTEncTop.getViewId() == 0)
    611           {
    612             m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*80)/100 );
    613           }
    614           else if(m_cTEncTop.getViewId() == 1)
    615           {
    616             m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*20)/100 );
    617           }
    618         }
    619         else if(m_iNumberOfViews == 3)
    620         {
    621           if(m_cTEncTop.getViewId() == 0)
    622           {
    623             m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*66)/100 );
    624           }
    625           else if(m_cTEncTop.getViewId() == 1)
    626           {
    627             m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*17)/100 );
    628           }
    629           else if(m_cTEncTop.getViewId() == 2)
    630           {
    631             m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*17)/100 );
    632           }
    633         }
    634         else
    635         {
    636           m_cTEncTop.setTargetBitrate              ( m_targetBitrate );
    637         }
    638       }
    639     }
    640   }
    641 #endif
    642 #endif
    643551  m_cTEncTop.setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag);
    644   m_cTEncTop.setCUTransquantBypassFlagValue(m_CUTransquantBypassFlagValue);
     552  m_cTEncTop.setCUTransquantBypassFlagForceValue(m_CUTransquantBypassFlagForce);
    645553  m_cTEncTop.setUseRecalculateQPAccordingToLambda( m_recalculateQPAccordingToLambda );
    646554  m_cTEncTop.setUseStrongIntraSmoothing( m_useStrongIntraSmoothing );
     
    932840    }
    933841
    934 #if !RATE_CONTROL_LAMBDA_DOMAIN && KWU_FIX_URQ
    935     for(Int layer=0; layer < m_numberOfLayers; layer++ )
    936     {
    937       if(m_acTEncTopList[layer]->getUseRateCtrl()  && !m_acTEncTopList[layer]->getIsDepth())
    938       {
    939         m_acTEncTopList[layer]->getRateCtrl()->updateRCGOPStatus();
    940       }
    941     }
    942 #endif
    943 
    944842    gopSize = maxGopSize;
    945843  }
     
    12031101      rateStatsAccum(au, stats);   
    12041102    }
    1205 #endif   
     1103#endif
    12061104  }
    12071105}
     
    12211119    case NAL_UNIT_CODED_SLICE_TRAIL_R:
    12221120    case NAL_UNIT_CODED_SLICE_TRAIL_N:
    1223     case NAL_UNIT_CODED_SLICE_TLA_R:
     1121    case NAL_UNIT_CODED_SLICE_TSA_R:
    12241122    case NAL_UNIT_CODED_SLICE_TSA_N:
    12251123    case NAL_UNIT_CODED_SLICE_STSA_R:
     
    16081506}
    16091507
     1508#if H_MV_HLS_7_FIX_SET_DPB_SIZE
     1509Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
     1510{
     1511  // These settings need to be verified
     1512
     1513  TComDpbSize* dpbSize = vps.getDpbSize();
     1514
     1515  assert ( dpbSize != 0 );
     1516
     1517  for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )
     1518  { 
     1519    std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
     1520    Bool subLayerFlagInfoPresentFlag = false;
     1521
     1522#if H_MV_HLS_7_HRD_P0156_7
     1523    for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )
     1524#else
     1525    for( Int j = 0; j  <=  vps.getMaxTLayers() - 1 ; j++ )
     1526#endif
     1527    {   
     1528      Bool subLayerDpbInfoPresentFlag = false;
     1529#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1530      assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() );
     1531      for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ )   
     1532#else
     1533      assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() );
     1534      for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
     1535#endif
     1536      {
     1537        Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
     1538#if H_MV_HLS7_GEN
     1539        // TBD. Some derivation based on output layer set might be added here.
     1540#endif
     1541        dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 );
     1542        if ( j > 0 )
     1543        {
     1544          subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) != dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) );
     1545        }
     1546      }       
     1547
     1548      Int maxNumReorderPics = MIN_INT;
     1549      for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ )
     1550      {
     1551        Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] );
     1552        maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] );
     1553      }
     1554      assert( maxNumReorderPics != MIN_INT );
     1555
     1556      dpbSize->setMaxVpsNumReorderPics( i, j, maxNumReorderPics );
     1557      if ( j > 0 )
     1558      {
     1559        subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsNumReorderPics( i, j ) != dpbSize->getMaxVpsNumReorderPics( i, j - 1 ) );
     1560      }
     1561
     1562      // To Be Done !
     1563      // dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, xx );
     1564      if ( j > 0 )
     1565      {
     1566        subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsLatencyIncreasePlus1( i, j ) != dpbSize->getMaxVpsLatencyIncreasePlus1( i, j - 1  ) );
     1567      }
     1568
     1569      if( j > 0 ) 
     1570      {
     1571        dpbSize->setSubLayerDpbInfoPresentFlag( i, j, subLayerDpbInfoPresentFlag );
     1572        subLayerFlagInfoPresentFlag = subLayerFlagInfoPresentFlag || subLayerDpbInfoPresentFlag;
     1573      }       
     1574    } 
     1575    dpbSize->setSubLayerFlagInfoPresentFlag( i, subLayerFlagInfoPresentFlag );
     1576  } 
     1577}
     1578#else
    16101579Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
    16111580{
     
    16201589    std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
    16211590    dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag );
    1622 
    16231591    if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) )
    16241592    {
     
    16631631  } 
    16641632}
    1665 
     1633#endif
    16661634
    16671635Void TAppEncTop::xSetLayerSets( TComVPS& vps )
     
    16691637  // Layer sets
    16701638  vps.setVpsNumLayerSetsMinus1   ( m_vpsNumLayerSets - 1 );
     1639#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    16711640  vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() );
     1641#endif
    16721642   
    16731643  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ )
     
    16861656  Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size();
    16871657  // Additional output layer sets + profileLevelTierIdx
     1658#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1659  vps.setDefaultTargetOutputLayerIdc      ( m_defaultTargetOutputLayerIdc );   
     1660  vps.setNumAddOutputLayerSets            ( numAddOuputLayerSets          );
     1661  vps.initTargetLayerIdLists();
     1662#else
    16881663  vps.setDefaultOneTargetOutputLayerIdc   ( m_defaultOneTargetOutputLayerIdc );
    16891664  vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets       != 0 );   
    16901665  vps.setNumAddOutputLayerSetsMinus1       ( numAddOuputLayerSets - 1        );
    1691 
    1692 
    1693 
     1666#endif
     1667
     1668#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1669  for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++)
     1670  {
     1671    Int addOutLsIdx = olsIdx - m_vpsNumLayerSets;     
     1672   
     1673    vps.setOutputLayerSetIdxMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ?  olsIdx  : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 );
     1674
     1675    std::vector<Int>& layerIdList    = m_layerIdsInSets[ vps.getLayerSetIdxForOutputLayerSet( olsIdx ) ];
     1676
     1677    if (vps.getDefaultTargetOutputLayerIdc() == 2 || addOutLsIdx >= 0 )
     1678    {
     1679      for ( Int i = 0; i < layerIdList.size(); i++)
     1680      {
     1681        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 !
     1682      }
     1683
     1684      std::vector<Int>& outLayerIdList = ( addOutLsIdx >= 0 ) ? m_layerIdsInAddOutputLayerSet[addOutLsIdx] : m_layerIdsInDefOutputLayerSet[olsIdx];
     1685
     1686      Bool outputLayerInLayerSetFlag = false;
     1687      for (Int j = 0; j < outLayerIdList.size(); j++)
     1688      {   
     1689        for (Int i = 0; i < layerIdList.size(); i++ )
     1690        {
     1691          if ( layerIdList[ i ] == outLayerIdList[ j ] )
     1692          {
     1693            vps.setOutputLayerFlag( olsIdx, i, true );       
     1694            outputLayerInLayerSetFlag = true;
     1695            break;
     1696          }
     1697        }
     1698        assert( outputLayerInLayerSetFlag ); // The output layer is not not in the layer set.
     1699      }
     1700    }
     1701    else
     1702    {
     1703      for ( Int i = 0; i < layerIdList.size(); i++)
     1704      {
     1705        vps.setOutputLayerFlag( olsIdx, i, vps.inferOutputLayerFlag( olsIdx, i ) );       
     1706      }
     1707    }
     1708
     1709    vps.deriveTargetLayerIdList(  olsIdx );
     1710
     1711    if ( olsIdx > 0 )
     1712    {
     1713      vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] );
     1714    }
     1715
     1716    vps.setAltOutputLayerFlag( olsIdx , false);     
     1717  }
     1718#else
    16941719  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++)
    16951720  {
     
    17291754  }
    17301755  vps.deriveTargetLayerIdLists();
     1756#endif
    17311757}
    17321758
     
    17351761  vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag );
    17361762
     1763#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
     1764  TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  );
     1765  assert( pcVPSVUI );
     1766#endif
     1767
    17371768  if ( m_vpsVuiPresentFlag )
    17381769  {
     1770#if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    17391771    TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  );
    17401772
    17411773    assert( pcVPSVUI );
    1742 
     1774#endif
    17431775
    17441776    // All this stuff could actually be derived by the encoder,
     
    17471779    pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag );
    17481780    pcVPSVUI->setCrossLayerIrapAlignedFlag   ( m_crossLayerIrapAlignedFlag    );
    1749 
     1781#if H_MV_HLS_7_MISC_P0068_21
     1782    pcVPSVUI->setAllLayersIdrAlignedFlag     ( m_allLayersIdrAlignedFlag      );
     1783#endif
    17501784    pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag );
    17511785    pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag );
     
    17531787    if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    17541788    {
     1789#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1790      for( Int i = 0; i  <=  vps.getVpsNumLayerSetsMinus1(); i++ )
     1791#else
    17551792      for( Int i = 0; i  <=  vps.getVpsNumberLayerSetsMinus1(); i++ )
     1793#endif
    17561794      {
    17571795        for( Int j = 0; j  <=  vps.getMaxTLayers(); j++ )
     
    18711909    pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD
    18721910  }
     1911#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
     1912  else
     1913  {
     1914    pcVPSVUI->setCrossLayerIrapAlignedFlag   ( false   );
     1915  }
     1916#endif
    18731917}
    18741918#endif
     
    19632007}
    19642008#endif
    1965 
    19662009//! \}
  • trunk/source/App/TAppEncoder/TAppEncTop.h

    r773 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/TAppEncoder/encmain.cpp

    r608 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/utils/BitrateTargeting/ExtractBitrates.cpp

    r56 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/utils/BitrateTargeting/ExtractBitrates.h

    r56 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/utils/BitrateTargeting/ExtractBitratesMain.cpp

    r56 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiers.cpp

    r56 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiers.h

    r56 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiersMain.cpp

    r56 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/utils/BitrateTargeting/RuntimeError.h

    r56 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/utils/BitrateTargeting/encode.shl

    r56 r872  
    44# granted under this license. 
    55#
    6 # Copyright (c) 2010-2012, ITU/ISO/IEC
     6# Copyright (c) 2010-2014, ITU/ISO/IEC
    77# All rights reserved.
    88#
  • trunk/source/App/utils/BitrateTargeting/encodeCommand.sh

    r56 r872  
    66# granted under this license. 
    77#
    8 # Copyright (c) 2010-2012, ITU/ISO/IEC
     8# Copyright (c) 2010-2014, ITU/ISO/IEC
    99# All rights reserved.
    1010#
  • trunk/source/App/utils/BitrateTargeting/makefile

    r56 r872  
    44# granted under this license. 
    55#
    6 # Copyright (c) 2010-2012, ITU/ISO/IEC
     6# Copyright (c) 2010-2014, ITU/ISO/IEC
    77# All rights reserved.
    88#
  • trunk/source/App/utils/BitrateTargeting/targetBitrates.sh

    r56 r872  
    66# granted under this license. 
    77#
    8 # Copyright (c) 2010-2012, ITU/ISO/IEC
     8# Copyright (c) 2010-2014, ITU/ISO/IEC
    99# All rights reserved.
    1010#
  • trunk/source/App/utils/annexBbytecount.cpp

    r56 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/App/utils/convert_NtoMbit_YCbCr.cpp

    r608 r872  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
Note: See TracChangeset for help on using the changeset viewer.