Changeset 1170 in 3DVCSoftware for branches/HTM-13.1-dev0/source/Lib/TLibEncoder


Ignore:
Timestamp:
5 Apr 2015, 22:49:22 (10 years ago)
Author:
tech
Message:

K0050: Signaling of inter-component prediction.

Location:
branches/HTM-13.1-dev0/source/Lib/TLibEncoder
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1169 r1170  
    4040#include "SEIwrite.h"
    4141#include "../TLibCommon/TypeDef.h"
    42 
     42#if H_3D_ANNEX_SELECTION_FIX
     43#include "TEncTop.h"
     44#endif
    4345//! \ingroup TLibEncoder
    4446//! \{
     47
    4548
    4649#if ENC_DEC_TRACE
     
    899902      WRITE_FLAG( sps3dExt->getInterSdcFlag( d ) ? 1 : 0 , "inter_sdc_flag" );
    900903#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
    901       WRITE_FLAG( sps3dExt->getDepthIntraSkipFlag( d ) ? 1 : 0 , "depth_intra_skip_flag" );
     904      WRITE_FLAG( sps3dExt->getDepthIntraSkipFlag( d ) ? 1 : 0 , "intra_skip_flag" );
    902905#else
    903906      WRITE_FLAG( sps3dExt->getIntraSingleFlag( d ) ? 1 : 0 , "intra_single_flag" );
     
    19131916    }
    19141917#endif
     1918
     1919#if HHI_INTER_COMP_PRED_K0052
     1920#if H_3D     
     1921  if( getEncTop()->decProcAnnexI() )
     1922  {
     1923      if ( pcSlice->getInCmpPredAvailFlag() )
     1924      {
     1925        WRITE_FLAG( pcSlice->getInCompPredFlag(), "in_comp_pred_flag" );
     1926      }
     1927  }
     1928#endif
     1929#endif
    19151930    if(pcSlice->getSPS()->getUseSAO())
    19161931    {
     
    20432058    }
    20442059#if H_3D_IC
     2060#if H_3D_ANNEX_SELECTION_FIX
     2061    else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE )
     2062      && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0
     2063      && getEncTop()->decProcAnnexI()       
     2064      )
     2065#else
    20452066    else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
     2067#endif
    20462068    {
    20472069      WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "slice_ic_enable_flag" );
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.h

    r1163 r1170  
    6868  TComSlice*    m_pcSlice;
    6969  UInt          m_uiCoeffCost;
    70 
     70#if H_3D_ANNEX_SELECTION_FIX
     71  TEncTop*      m_encTop;
     72#endif
    7173  Void codeShortTermRefPicSet              ( TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Bool calledFromSliceHeader, Int idx );
    7274  Bool findMatchingLTRP ( TComSlice* pcSlice, UInt *ltrpsIndex, Int ltrpPOC, Bool usedFlag );
     
    185187  Void codeDFFlag       ( UInt uiCode, const Char *pSymbolName );
    186188  Void codeDFSvlc       ( Int   iCode, const Char *pSymbolName );
    187 
     189#if H_3D_ANNEX_SELECTION_FIX
     190  TEncTop* getEncTop()               { return m_encTop; };
     191  Void     setEncTop( TEncTop* et )  {  m_encTop = et; };
     192#endif
    188193};
    189194
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCfg.h

    r1166 r1170  
    7878  Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; 
    7979#endif
     80#if HHI_INTER_COMP_PRED_K0052
     81  Bool m_interCompPredFlag;
     82#endif
    8083  GOPEntry()
    8184  : m_POC(-1)
     
    9497#if H_MV
    9598  , m_numActiveRefLayerPics(0)
     99#endif
     100#if HHI_INTER_COMP_PRED_K0052
     101#if H_3D
     102  , m_interCompPredFlag(false)
     103#endif
    96104#endif
    97105  {
     
    408416  Bool      m_bUseQTL;
    409417#endif
     418#if H_3D_ANNEX_SELECTION_FIX
     419  Int m_profileIdc;
     420#endif
     421
    410422#endif
    411423public:
     
    421433  , m_isDepth(false)
    422434  , m_bUseVSO(false)
     435#if H_3D_ANNEX_SELECTION_FIX
     436  , m_profileIdc( -1 )
     437#endif
    423438#endif
    424439#endif
     
    957972  Bool      getUseQTL                       ()         { return m_bUseQTL; }
    958973#endif
     974#if H_3D_ANNEX_SELECTION_FIX
     975  Void                    setProfileIdc( Int a )    { assert( a == 1 || a == 6 || a == 8 ); m_profileIdc = a;  }
     976  Bool                    decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); }   
     977#endif
     978
    959979#endif // H_3D
    960980};
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1169 r1170  
    306306
    307307#if H_MV_ENC_DEC_TRAC
     308#if ENC_DEC_TRACE
    308309  UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
    309310  UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
     
    314315  DTRACE_TU("log2TrafoSize", g_uiMaxCUWidth>>uiDepth)
    315316  DTRACE_TU("trafoDepth"  , uiDepth)
     317#endif
    316318#endif
    317319
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp

    r1169 r1170  
    885885    Int numDirectRefLayers = vps    ->getNumDirectRefLayers( getLayerId() );
    886886#endif
     887#if HHI_INTER_COMP_PRED_K0052
     888    pcSlice->setIvPicLists( m_ivPicLists );         
     889
     890    Int gopNum = (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid;
     891    GOPEntry gopEntry      = m_pcCfg->getGOPEntry( gopNum );     
     892#else
    887893    GOPEntry gopEntry      = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid );     
     894#endif
    888895   
    889896    Bool interLayerPredLayerIdcPresentFlag = false;
     
    922929    assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics );
    923930   
     931#if HHI_INTER_COMP_PRED_K0052
     932#if H_3D
     933    if ( m_pcEncTop->decProcAnnexI() )
     934    {   
     935      pcSlice->deriveInCmpPredAndCpAvailFlag();
     936      if ( pcSlice->getInCmpPredAvailFlag() )
     937      {     
     938        pcSlice->setInCompPredFlag( gopEntry.m_interCompPredFlag );
     939      }
     940      else
     941      {
     942        if (gopEntry.m_interCompPredFlag )
     943        {
     944          if ( gopNum == MAX_GOP)
     945          {
     946            printf( "\nError: FrameI_l%d cannot enable inter-component prediction.\n", pcSlice->getVPS()->getLayerIdInVps( getLayerId() ) );
     947          }
     948          else
     949          {
     950            printf( "\nError: Frame%d_l%d cannot enable inter-component prediction.\n", gopNum, pcSlice->getVPS()->getLayerIdInVps( getLayerId() ) );
     951          }
     952         
     953          exit(EXIT_FAILURE);
     954        }
     955      }
     956      pcSlice->init3dToolParameters();
     957      pcSlice->checkInCompPredRefLayers();
     958    }
     959   
     960
     961    // This needs to be done after initilizaiton of 3D tool parameters.
     962    pcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( )   ) ? 1 : 0 ));
     963#endif
     964#endif
     965
    924966    pcSlice->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 );
    925967    pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer0.size() + (Int) m_refPicSetInterLayer1.size()) ) );
     
    9681010    }
    9691011#endif
     1012#if !HHI_INTER_COMP_PRED_K0052
    9701013#if H_3D
    9711014    pcSlice->setIvPicLists( m_ivPicLists );         
     
    9731016    assert( !m_pcEncTop->getIsDepth() || ( pcSlice->getTexturePic() != 0 ) );
    9741017#endif   
     1018#endif
    9751019#endif
    9761020#if H_3D_IC
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp

    r1133 r1170  
    215215  rpcSlice->setPicOutputFlag( true );
    216216  rpcSlice->setPOC( pocCurr );
     217#if !HHI_INTER_COMP_PRED_K0052
    217218#if H_3D
    218   rpcSlice->init3dToolParameters();
     219    rpcSlice->init3dToolParameters();
     220#endif
    219221#endif
    220222#if H_3D_IC
     
    610612  rpcSlice->setSliceSegmentMode     ( m_pcCfg->getSliceSegmentMode()     );
    611613  rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
     614#if !HHI_INTER_COMP_PRED_K0052
    612615#if H_3D_IV_MERGE
    613616  rpcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( ( rpcSlice->getMpiFlag( ) || rpcSlice->getIvMvPredFlag( ) || rpcSlice->getViewSynthesisPredFlag( )   ) ? 1 : 0 ));
    614617#else
    615618  rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
     619#endif
     620#else
     621#if !H_3D
     622  rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
     623#endif
    616624#endif
    617625  xStoreWPparam( pPPS->getUseWP(), pPPS->getWPBiPred() );
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp

    r1169 r1170  
    9191  m_aICEnableNum = NULL;
    9292#endif
     93#if H_3D_ANNEX_SELECTION_FIX
     94  m_cCavlcCoder.setEncTop(this);
     95#endif
    9396}
    9497
     
    364367  }
    365368#endif
     369
    366370  // initialize processing unit classes
    367371  m_cGOPEncoder.  init( this );
Note: See TracChangeset for help on using the changeset viewer.