Changeset 1055 in 3DVCSoftware


Ignore:
Timestamp:
26 Sep 2014, 19:29:56 (10 years ago)
Author:
tech
Message:

Merged 12.0_dev0@1053.

Location:
branches/HTM-12.0-dev1/source/Lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComSlice.cpp

    r1054 r1055  
    103103, m_temporalLayerNonReferenceFlag ( false )
    104104, m_enableTMVPFlag                ( true )
     105#if I0044_SLICE_TMVP
     106, m_availableForTMVPRefFlag       ( true )
     107#endif
    105108#if H_MV
    106109, m_refPicSetInterLayer0           ( NULL )
     
    725728
    726729        assert( rpsCurrList[li][ orgIdx ] != NULL );
     730#if DISCARDABLE_PIC_RPS
     731        assert( rpsCurrList[li][ orgIdx ]->getSlice(0)->getDiscardableFlag() == 0 );    // Inter-layer RPS shall not contain picture with discardable_flag = 1.
     732#endif
    727733        m_apcRefPicList    [li][rIdx] = rpsCurrList    [li][ orgIdx ];
    728734        m_bIsUsedAsLongTerm[li][rIdx] = usedAsLongTerm [li][ orgIdx ] ;
  • branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComSlice.h

    r1054 r1055  
    589589  Void setHrdParametermeters( Int k, TComHRD* val  ) {  m_hrdParameters[k] = val; };
    590590  TComHRD* getHrdParametermeters( Int k ) {  return m_hrdParameters[k]; };
    591 #endif;
     591#endif
    592592};
    593593
     
    12041204  Void    setLayerSetIdxForOlsMinus1( Int outLayerSetIdx, Int val )        { m_layerSetIdxForOlsMinus1[ outLayerSetIdx ]  = val; }
    12051205  Int     getLayerSetIdxForOlsMinus1( Int outLayerSetIdx )                 { return m_layerSetIdxForOlsMinus1[ outLayerSetIdx ]; }
     1206#if VPS_MISC_UPDATES
     1207  Int     getLayerSetIdxForOlsMinus1Len( Int outLayerSetIdx )              { return gCeilLog2( getNumLayerSets() ); }
     1208#endif
    12061209
    12071210  Void    setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag )       { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; }
     
    14211424    std::vector<Int> idx;
    14221425    std::vector<Int> num;
    1423     std::vector<std::vector<Int>> ptlInfo;
     1426    std::vector< std::vector<Int> > ptlInfo;
    14241427
    14251428    std::cout << std::right << std::setw(60) << std::setfill('-') << " " << std::setfill(' ') << std::endl << "PTLI" << std::endl;
     
    26882691
    26892692  Bool       m_enableTMVPFlag;
     2693#if I0044_SLICE_TMVP
     2694  Bool       m_availableForTMVPRefFlag;
     2695#endif
     2696
    26902697#if H_MV
    26912698  std::vector<TComPic*>* m_refPicSetInterLayer0;
     
    30243031  Void      setEnableTMVPFlag     ( Bool   b )    { m_enableTMVPFlag = b; }
    30253032  Bool      getEnableTMVPFlag     ()              { return m_enableTMVPFlag;}
     3033#if I0044_SLICE_TMVP
     3034  Void      setAvailableForTMVPRefFlag     ( Bool   b )    { m_availableForTMVPRefFlag = b; }
     3035  Bool      getAvailableForTMVPRefFlag     ()              { return m_availableForTMVPRefFlag;}
     3036#endif
    30263037
    30273038#if H_MV
  • branches/HTM-12.0-dev1/source/Lib/TLibCommon/TypeDef.h

    r1054 r1055  
    388388// TBD: Check if integration is necessary.
    389389
     390
     391
     392//Added by Qualcomm for HLS
     393#define DISCARDABLE_PIC_RPS              1      ///< JCT3V-G0131: Inter-layer RPS and temporal RPS should not contain picture with discardable_flag equal to 1
     394#define VPS_MISC_UPDATES                 1      ///< Misc updates:JCT3V-0240,
     395#define NON_REF_NAL_TYPE_DISCARDABLE     1      ///< JCT3V-G0031: If discardable picture is a non-IRAP, it must be a non-referenced sub-layer picture
     396#define INFERENCE_POC_MSB_VAL_PRESENT    1      ///< JCT3V-H0042: poc_msb_val_present_flag shall be equal to 0 when slice_header_extension_length is (inferred to be ) equal to 0
     397#define INFERENCE_POC_RESET_INFO_PRESENT 1      ///< JCT3V-H0042: Infer the value of poc_reset_info_present_flag to be equal to 0 when no pps extension / pps extension for multilayer.
     398#define I0044_SLICE_TMVP                 1      ///< JCT3V-I0044: Regarding slice_temporal_mvp_enabled_flag
     399#define I0045_BR_PR_ADD_LAYER_SET        1      ///< JCT3V-I0045: Signalling of bit-rate and picture rate for additional layer set
     400#define I0045_VPS_VUI_VST_PARAMS         1      ///< JCT3V-I0045: Related to signalling of VST parameters of the base layer.
    390401
    391402
  • branches/HTM-12.0-dev1/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1054 r1055  
    14381438    }
    14391439  }
    1440 #endif // H_MV_HLS10_GEN
     1440#endif
    14411441
    14421442  if (pcVPS->getNumLayerSets() > 1)
     
    14611461    if( i >= pcVPS->getNumLayerSets( ) )   
    14621462    {       
     1463#if !VPS_MISC_UPDATES
    14631464      READ_UVLC( uiCode,      "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );
     1465#else
     1466      READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );
     1467#endif
    14641468    }
    14651469
     
    17091713  }
    17101714
     1715#if I0045_VPS_VUI_VST_PARAMS
    17111716  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    17121717  {
    1713 #if H_MV_HLS10_VPS_VUI
    17141718    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1715 #else
     1719    {
     1720      READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );
     1721    }
     1722  }
     1723  else if ( !pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     1724  {
     1725    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1726    {
     1727      pcVPSVUI->setVpsVideoSignalInfoIdx( i, i );
     1728    }
     1729  }
     1730  else
     1731  {
     1732    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1733    {
     1734      pcVPSVUI->setVpsVideoSignalInfoIdx( i, 0 );
     1735    }
     1736  }
     1737#else
     1738  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
     1739  {
    17161740    for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1717 #endif
    17181741    {
    17191742      READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );
     
    17281751    }
    17291752  }
     1753#endif
    17301754  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
    17311755  if( !pcVPSVUI->getTilesNotInUseFlag() )
     
    18021826  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
    18031827  {
     1828#if VPS_MISC_UPDATES
     1829    assert(pcVPS->getTimingInfo()->getTimingInfoPresentFlag() == 1);
     1830#endif
    18041831    parseVpsVuiBspHrdParameters( pcVPS );
    18051832  }
     
    22872314      esb++;
    22882315      READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
     2316#if NON_REF_NAL_TYPE_DISCARDABLE
     2317      if ( uiCode == 1 )
     2318      {
     2319        assert(rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R &&
     2320          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R &&
     2321          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R &&
     2322          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R &&
     2323          rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R);
     2324      }
     2325#endif
    22892326    }
    22902327
     
    25742611      if (rpcSlice->getSPS()->getTMVPFlagsPresent())
    25752612      {
     2613#if I0044_SLICE_TMVP
     2614        READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" );
     2615#else
    25762616        READ_FLAG( uiCode, "slice_temporal_mvp_enable_flag" );
     2617#endif
    25772618        rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false );
    25782619      }
     
    30143055#endif
    30153056  }
     3057#if INFERENCE_POC_MSB_VAL_PRESENT
     3058  else
     3059  {
     3060    rpcSlice->setSliceSegmentHeaderExtensionLength( 0 );
     3061    rpcSlice->setPocMsbValPresentFlag( false );
     3062  }
     3063#endif
    30163064
    30173065
  • branches/HTM-12.0-dev1/source/Lib/TLibDecoder/TDecTop.cpp

    r1054 r1055  
    938938   }
    939939#endif
     940   
     941#if I0044_SLICE_TMVP
     942  if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 )
     943  {
     944    //update all pics in the DPB such that they cannot be used for TMPV ref
     945    TComList<TComPic*>::iterator  iterRefPic = m_cListPic.begin(); 
     946    while( iterRefPic != m_cListPic.end() )
     947    {
     948      TComPic *refPic = *iterRefPic;
     949      if( ( refPic->getLayerId() == m_apcSlicePilot->getLayerId() ) && refPic->getReconMark() )
     950      {
     951        for(Int i = refPic->getNumAllocatedSlice()-1; i >= 0; i--)
     952        {
     953
     954          TComSlice *refSlice = refPic->getSlice(i);
     955          refSlice->setAvailableForTMVPRefFlag( false );
     956        }
     957      }
     958      iterRefPic++;
     959    }
     960  }
     961  m_apcSlicePilot->setAvailableForTMVPRefFlag( true );
     962#endif
     963
    940964  xActivateParameterSets();
    941965
     
    11611185#endif   
    11621186#endif
     1187    // For generalized B
     1188#if I0044_SLICE_TMVP
     1189    if( m_layerId > 0 && !pcSlice->isIntra() && pcSlice->getEnableTMVPFlag() )
     1190    {
     1191      TComPic* refPic = pcSlice->getRefPic(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
     1192
     1193      assert ( refPic );
     1194      assert ( refPic->getPicSym()->getSlice(0)->getAvailableForTMVPRefFlag() == true );
     1195    }
     1196#endif
     1197
    11631198    // For generalized B
    11641199    // note: maybe not existed case (always L0 is copied to L1 if L1 is empty)
  • branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1054 r1055  
    12291229    }
    12301230  }
    1231 #endif // H_MV_HLS10_GEN
     1231#endif
    12321232
    12331233  if (pcVPS->getNumLayerSets() > 1)
     
    12471247    if( i >= pcVPS->getNumLayerSets( ) )   
    12481248    {     
     1249#if !VPS_MISC_UPDATES
    12491250      WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ),      "layer_set_idx_for_ols_minus1[i]" );
     1251#else
     1252      WRITE_CODE( pcVPS->getLayerSetIdxForOlsMinus1( i ), pcVPS->getLayerSetIdxForOlsMinus1Len( i ) ,      "layer_set_idx_for_ols_minus1[i]" );
     1253#endif
    12501254    }
    12511255
     
    15621566  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    15631567  {
    1564 #if H_MV_HLS10_VPS_VUI
     1568#if I0045_VPS_VUI_VST_PARAMS
    15651569    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
     1570    {
     1571      WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" );
     1572    }
    15661573#else
    15671574    for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1568 #endif
    15691575    {
    15701576      WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" );
     
    15781584      assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i  ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) );
    15791585    }
     1586#endif
    15801587  }
    15811588  WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" );
     
    19411948      esb++;
    19421949      WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" );
     1950#if NON_REF_NAL_TYPE_DISCARDABLE
     1951      if (pcSlice->getDiscardableFlag( ))
     1952      {
     1953        assert(pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R &&
     1954          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R &&
     1955          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R &&
     1956          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R &&
     1957          pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R);
     1958      }
     1959#endif
    19431960    }
    19441961
     
    21012118      if (pcSlice->getSPS()->getTMVPFlagsPresent())
    21022119      {
     2120#if I0044_SLICE_TMVP
     2121        WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enabled_flag" );
     2122#else
    21032123        WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enable_flag" );
     2124#endif
    21042125      }
    21052126    }
Note: See TracChangeset for help on using the changeset viewer.