Changeset 41 in 3DVCSoftware for branches/0.3-poznan-univ/source/Lib/TLibEncoder


Ignore:
Timestamp:
26 Mar 2012, 09:03:21 (13 years ago)
Author:
poznan-univ
Message:

Adjustment for FlexCO, and high-level syntax improvement.

Location:
branches/0.3-poznan-univ/source/Lib/TLibEncoder
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncCavlc.cpp

    r28 r41  
    348348#endif
    349349#if POZNAN_NONLINEAR_DEPTH
    350       // Depth power coefficient
    351 #if POZNAN_NONLINEAR_DEPTH_SEND_AS_BYTE
    352       UInt  uiCode = quantizeDepthPower(pcSPS->getDepthPower()); 
    353       xWriteCode(uiCode, 8);
    354 #else
    355       float fCode  = pcSPS->getDepthPower();
    356       UInt  uiCode = *((UInt*)&fCode);
    357       //uiCode &= ~0x80000000;
    358       xWriteCode(uiCode, sizeof(float)*8); // we do not send sign?;
    359 #endif
     350      if( pcSPS->getUseNonlinearDepth() )
     351      {
     352        xWriteFlag( 1 ); //Nonlinear Depth Representation
     353        // Nonlinear Depth Model coefficient
     354        xWriteUvlc(pcSPS->getNonlinearDepthModel().m_iNum);
     355        for (int i=1; i<=pcSPS->getNonlinearDepthModel().m_iNum; ++i)
     356          xWriteUvlc(pcSPS->getNonlinearDepthModel().m_aiPoints[i]);
     357      }
     358      else
     359      {
     360        xWriteFlag( 0 ); // Don't use Nonlinear Depth Representation
     361      }
    360362#endif
    361363    }
  • branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncCfg.h

    r28 r41  
    159159  Bool m_bUseDMM;
    160160#endif
     161#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER
     162  Bool m_bUseDMM34;
     163#endif
    161164#if HHI_MPI
    162165  Bool m_bUseMVI;
     
    232235#endif
    233236#if POZNAN_NONLINEAR_DEPTH
    234   Float         m_fDepthPower;
     237  TComNonlinearDepthModel  m_cNonlinearDepthModel;
     238  Bool        m_bUseNonlinearDepth;
    235239#endif
    236240
     
    335339
    336340#if POZNAN_NONLINEAR_DEPTH
    337   inline Float   getDepthPower()               { return m_fDepthPower; }
    338   inline Void    setDepthPower(Float p)        { m_fDepthPower = p; }
    339 #else
    340  inline Float    getDepthPower()               { return 1.0f; }
     341  inline TComNonlinearDepthModel&   getNonlinearDepthModel()                                    { return m_cNonlinearDepthModel; }
     342  inline Void                       setNonlinearDepthModel( TComNonlinearDepthModel &rp )       { m_cNonlinearDepthModel = rp; }
     343
     344  Void                              setUseNonlinearDepth  ( Bool bVal )                         { m_bUseNonlinearDepth = bVal; }
     345  bool                              getUseNonlinearDepth  ()                                    { return m_bUseNonlinearDepth; }
    341346#endif
    342347
     
    457462  Bool getUseDMM()        { return m_bUseDMM; }
    458463#endif
    459 
     464#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER
     465  Void setUseDMM34( Bool b) { m_bUseDMM34 = b;    }
     466  Bool getUseDMM34()        { return m_bUseDMM34; }
     467#endif
    460468#if LM_CHROMA
    461469  Bool getUseLMChroma                       ()      { return m_bUseLMChroma;        }
  • branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncGOP.cpp

    r28 r41  
    175175// GT FIX
    176176  std::vector<TComPic*> apcSpatRefPics = m_pcEncTop->getEncTop()->getSpatialRefPics( pcPic->getViewIdx(), pcSlice->getPOC(), m_pcEncTop->isDepthCoder() );
    177   TComPic * const pcTexturePic = m_pcEncTop->isDepthCoder() ? m_pcEncTop->getEncTop()->getPicFromView( pcPic->getViewIdx(), pcSlice->getPOC(), false ) : NULL;
     177  TComPic * const pcTexturePic = ( m_pcEncTop->isDepthCoder()) ? m_pcEncTop->getEncTop()->getPicFromView( pcPic->getViewIdx(), pcSlice->getPOC(), false ) : NULL;
     178  TComPic * const pcDepthPic   = (!m_pcEncTop->isDepthCoder()) ? m_pcEncTop->getEncTop()->getPicFromView( pcPic->getViewIdx(), pcSlice->getPOC(), true  ) : NULL;
    178179  assert( ! m_pcEncTop->isDepthCoder() || pcTexturePic != NULL );
     180  assert(   m_pcEncTop->isDepthCoder() || pcDepthPic   != NULL );
    179181  pcSlice->setTexturePic( pcTexturePic );
     182  pcSlice->setDepthPic  ( pcDepthPic   );
    180183
    181184  pcSlice->setRefPicListFromGOPSTring( rcListPic, apcSpatRefPics );
  • branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncSbac.cpp

    r28 r41  
    11781178#endif
    11791179#if HHI_DMM_PRED_TEX
     1180#if FLEX_CODING_ORDER
     1181    if ( !pcCU->getSlice()->getSPS()->getUseDMM34() )
     1182    {
     1183      assert( uiDir != DMM_WEDGE_PREDTEX_D_IDX );
     1184      assert( uiDir != DMM_CONTOUR_PREDTEX_D_IDX );
     1185    }
     1186#endif
    11801187    if( uiDir == DMM_WEDGE_PREDTEX_D_IDX )     { xCodeWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx ); }
    11811188    if( uiDir == DMM_CONTOUR_PREDTEX_D_IDX )   { xCodeContourPredTexDeltaInfo( pcCU, uiAbsPartIdx ); }
  • branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncSearch.cpp

    r28 r41  
    19341934#endif
    19351935#if HHI_DMM_PRED_TEX
     1936#if FLEX_CODING_ORDER
     1937      if ( pcCU->getSlice()->getSPS()->getUseDMM34() )
     1938      {
     1939#endif
    19361940      TComYuv cTempYuv; cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear();
    19371941      Pel* piTempY      = cTempYuv.getLumaAddr();
     
    19681972
    19691973      cTempYuv.destroy();
     1974#if FLEX_CODING_ORDER
     1975      }
     1976#endif
    19701977#endif
    19711978    }
     
    19962003#else
    19972004#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     2005#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER
     2006      if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getUseDMM34() ) )
     2007#else
    19982008      if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight ) )
     2009#endif
    19992010        continue;
    20002011#endif
     
    20842095#else
    20852096#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     2097#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER
     2098      if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getUseDMM34() ) )
     2099#else
    20862100      if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight ) )
     2101#endif
    20872102        continue;
    20882103#endif
     
    27272742}
    27282743
     2744#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER
     2745Bool TEncSearch::predIntraLumaDMMAvailable( UInt uiMode, UInt uiWidth, UInt uiHeight, Bool bDMMAvailable34 )
     2746#else
    27292747Bool TEncSearch::predIntraLumaDMMAvailable( UInt uiMode, UInt uiWidth, UInt uiHeight )
     2748#endif
    27302749{
    27312750  if( uiMode <= MAX_MODE_ID_INTRA_DIR ) return true;
     
    27552774      bDMMAvailable = false;
    27562775    }
     2776#if FLEX_CODING_ORDER
     2777    if ( !bDMMAvailable34 )
     2778    {
     2779      bDMMAvailable = false;
     2780    }
     2781#endif
    27572782  }
    27582783
  • branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncSearch.h

    r28 r41  
    210210  Bool predIntraLumaDMMAvailable( UInt         uiMode,
    211211                                  UInt         uiWidth,
     212#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER
     213                                  UInt         uiHeight,
     214                                  Bool         bDMMAvailable34 );
     215#else
    212216                                  UInt         uiHeight );
     217#endif
    213218#endif
    214219#if HHI_DMM_WEDGE_INTRA
  • branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncTop.cpp

    r28 r41  
    304304
    305305  bool bSomethingCoded = false ;
    306 
     306#if FLEX_CODING_ORDER 
     307  if (TEncTop::m_bPicWaitingForCoding )
     308#else
    307309  if (m_bPicWaitingForCoding )
     310#endif
    308311  {
    309312    std::map<Int, TComPic*>::iterator cIter = m_acInputPicMap.find( (Int)m_cSeqIter.getPoc() );
     
    659662#endif
    660663
    661 #if POZNAN_NONLINEAR_DEPTH
    662   m_cSPS.setDepthPower  ( m_fDepthPower );
    663   // OLGIERD: ToDo - QP-Tex should not use getDepthPower() from texture SPS.
     664#if POZNAN_NONLINEAR_DEPTH
     665  m_cSPS.setNonlinearDepthModel  ( m_cNonlinearDepthModel );
     666  m_cSPS.setUseNonlinearDepth    ( m_bUseNonlinearDepth );
     667  // OLGIERD: ToDo - QP-Tex should not use getNonlinearDepthModel() from texture SPS.
    664668#endif
    665669
Note: See TracChangeset for help on using the changeset viewer.