Changeset 397 in 3DVCSoftware


Ignore:
Timestamp:
12 May 2013, 16:24:39 (12 years ago)
Author:
rwth
Message:
  • added D0032
Location:
branches/HTM-6.2-dev3-RWTH/source/Lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-6.2-dev3-RWTH/source/Lib/TLibCommon/ContextTables.h

    r382 r397  
    135135#endif
    136136#define SDC_NUM_RESIDUAL_FLAG_CTX        1
     137#if !RWTH_SDC_CTX_SIMPL_D0032
    137138#define SDC_NUM_SIGN_FLAG_CTX            1
     139#endif
     140#if RWTH_SDC_CTX_SIMPL_D0032
     141#define SDC_NUM_RESIDUAL_CTX             8
     142#else
    138143#define SDC_NUM_RESIDUAL_CTX             10
     144#endif
    139145
    140146#define SDC_NUM_PRED_MODE_CTX            5
     
    556562#endif
    557563
     564#if RWTH_SDC_CTX_SIMPL_D0032
     565static const UChar INIT_SDC_RESIDUAL_FLAG[3][SDC_NUM_RESIDUAL_FLAG_CTX] =
     566{
     567  {
     568    CNU
     569   
     570  },
     571  {
     572    CNU
     573  },
     574  {
     575    CNU
     576  }
     577};
     578
     579static const UChar INIT_SDC_RESIDUAL[3][SDC_NUM_RESIDUAL_CTX] =
     580{
     581  {
     582    CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
     583  },
     584  {
     585    CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
     586  },
     587  {
     588    CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
     589  }
     590};
     591
     592static const UChar INIT_SDC_PRED_MODE[3][3*SDC_NUM_PRED_MODE_CTX] =
     593{
     594  {
     595    CNU,    CNU
     596    ,CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
     597  },
     598  {
     599    CNU,    CNU
     600    ,CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
     601  },
     602  {
     603    CNU,    CNU
     604    ,CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
     605  }
     606};
     607#else
    558608static const Short INIT_SDC_RESIDUAL_FLAG[3][3*SDC_NUM_RESIDUAL_FLAG_CTX][2] =
    559609{
     
    633683};
    634684#endif
     685#endif
    635686
    636687//! \}
  • branches/HTM-6.2-dev3-RWTH/source/Lib/TLibCommon/TypeDef.h

    r387 r397  
    7373#define HHI_DELTADC_DLT_D0035             1   // JCT3V-D0035: DLT for DMM deltaDC coding
    7474#define INTEL_SDC64_D0193                 1   // JCT3V-D0193: SDC binary clean up (use a 1 bit binary code to signal sdc_pred_mode when CU size is 64x64)
     75#define RWTH_SDC_CTX_SIMPL_D0032          1   // JCT3V-D0032: CABAC Context Reduction for Simplified Depth Coding
    7576#endif
    7677#define FIX_SDC_ENC_RD_WVSO_D0163         1   // JCT3V-D0163: fix for SDC encoder rd-cost (VSO -> WVSO)
  • branches/HTM-6.2-dev3-RWTH/source/Lib/TLibDecoder/TDecSbac.cpp

    r382 r397  
    114114, m_cDmmDeltaFlagModel             ( 1,             1,                 DMM_DELTA_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
    115115#endif
     116#if RWTH_SDC_CTX_SIMPL_D0032
     117, m_cSDCResidualFlagSCModel     ( 1,             1,  SDC_NUM_RESIDUAL_FLAG_CTX  , m_contextModels + m_numContextModels, m_numContextModels)
     118, m_cSDCResidualSCModel         ( 1,             1,  SDC_NUM_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
     119, m_cSDCPredModeSCModel             ( 1,             3,                 SDC_NUM_PRED_MODE_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
     120#else
    116121, m_cSDCResidualFlagSCModel     ( 1,             2,  SDC_NUM_RESIDUAL_FLAG_CTX  , m_contextModels + m_numContextModels, m_numContextModels)
    117122, m_cSDCResidualSignFlagSCModel ( 1,             2,  SDC_NUM_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
    118123, m_cSDCResidualSCModel         ( 1,             2,  SDC_NUM_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
    119124, m_cSDCPredModeSCModel             ( 1,             3,                 SDC_NUM_PRED_MODE_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
     125#endif
    120126#endif
    121127{
     
    222228  m_cSDCResidualFlagSCModel.initBuffer      ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
    223229  m_cSDCResidualSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL );
     230#if !RWTH_SDC_CTX_SIMPL_D0032
    224231  m_cSDCResidualSignFlagSCModel.initBuffer  ( sliceType, qp, (UChar*)INIT_SDC_SIGN_FLAG );
     232#endif
    225233  m_cSDCPredModeSCModel.initBuffer              ( sliceType, qp, (UChar*)INIT_SDC_PRED_MODE );
    226234#endif
     
    308316  m_cSDCResidualFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
    309317  m_cSDCResidualSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
     318#if !RWTH_SDC_CTX_SIMPL_D0032
    310319  m_cSDCResidualSignFlagSCModel.initBuffer  ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG );
     320#endif
    311321  m_cSDCPredModeSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE );
    312322#endif
     
    26472657  assert( uiMaxResidualBits <= g_uiBitDepth );
    26482658 
     2659#if RWTH_SDC_CTX_SIMPL_D0032
     2660  m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) );
     2661#else
    26492662  m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) );
     2663#endif
    26502664 
    26512665  if (uiResidual)
    26522666  {
    26532667    // decode residual sign bit
     2668#if RWTH_SDC_CTX_SIMPL_D0032
     2669    m_pcTDecBinIf->decodeBinEP(uiSign);
     2670#else
    26542671    m_pcTDecBinIf->decodeBin(uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) );
     2672#endif
    26552673   
    26562674    // decode residual magnitude
    26572675    for (Int i=0; i<uiMaxResidualBits; i++)
    26582676    {
     2677#if RWTH_SDC_CTX_SIMPL_D0032
     2678      m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, 0, i ) );
     2679#else
    26592680      m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) );
     2681#endif
    26602682      uiAbsIdx |= uiBit << i;
    26612683    }
  • branches/HTM-6.2-dev3-RWTH/source/Lib/TLibDecoder/TDecSbac.h

    r382 r397  
    280280 
    281281  ContextModel3DBuffer m_cSDCResidualFlagSCModel;
     282#if !RWTH_SDC_CTX_SIMPL_D0032
    282283  ContextModel3DBuffer m_cSDCResidualSignFlagSCModel;
     284#endif
    283285  ContextModel3DBuffer m_cSDCResidualSCModel;
    284286 
  • branches/HTM-6.2-dev3-RWTH/source/Lib/TLibEncoder/TEncSbac.cpp

    r382 r397  
    122122, m_cDmmDeltaFlagModel             ( 1,             1,                 DMM_DELTA_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
    123123#endif
     124#if RWTH_SDC_CTX_SIMPL_D0032
     125, m_cSDCResidualFlagSCModel     ( 1,             1,  SDC_NUM_RESIDUAL_FLAG_CTX  , m_contextModels + m_numContextModels, m_numContextModels)
     126, m_cSDCResidualSCModel         ( 1,             1,  SDC_NUM_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
     127, m_cSDCPredModeSCModel             ( 1,             3,                 SDC_NUM_PRED_MODE_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
     128#else
    124129, m_cSDCResidualFlagSCModel     ( 1,             2,  SDC_NUM_RESIDUAL_FLAG_CTX  , m_contextModels + m_numContextModels, m_numContextModels)
    125130, m_cSDCResidualSignFlagSCModel ( 1,             2,  SDC_NUM_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
    126131, m_cSDCResidualSCModel         ( 1,             2,  SDC_NUM_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
    127132, m_cSDCPredModeSCModel             ( 1,             3,                 SDC_NUM_PRED_MODE_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
     133#endif
    128134#endif
    129135{
     
    215221  m_cSDCResidualFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
    216222  m_cSDCResidualSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
     223#if !RWTH_SDC_CTX_SIMPL_D0032
    217224  m_cSDCResidualSignFlagSCModel.initBuffer  ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG );
     225#endif
    218226  m_cSDCPredModeSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE );
    219227#endif
     
    369377  m_cSDCResidualFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
    370378  m_cSDCResidualSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
     379#if !RWTH_SDC_CTX_SIMPL_D0032
    371380  m_cSDCResidualSignFlagSCModel.initBuffer  ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG );
     381#endif
    372382  m_cSDCPredModeSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE );
    373383#endif
     
    26452655 
    26462656  // residual flag
     2657#if RWTH_SDC_CTX_SIMPL_D0032
     2658  m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) );
     2659#else
    26472660  m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) ); //TODO depthmap: more sophisticated context selection
     2661#endif
    26482662 
    26492663  if (uiResidual)
    26502664  {
    26512665    // encode sign bit of residual
     2666#if RWTH_SDC_CTX_SIMPL_D0032
     2667    m_pcBinIf->encodeBinEP( uiSign );
     2668#else
    26522669    m_pcBinIf->encodeBin( uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) ); //TODO depthmap: more sophisticated context selection
     2670#endif
    26532671       
    26542672    assert(uiAbsIdx < GetNumDepthValues());
     
    26602678      uiBit = (uiAbsIdx & (1<<i))>>i;
    26612679     
     2680#if RWTH_SDC_CTX_SIMPL_D0032
     2681      m_pcBinIf->encodeBin( uiBit, m_cSDCResidualSCModel.get( 0, 0, i ) );
     2682#else
    26622683      m_pcBinIf->encodeBin( uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) ); //TODO depthmap: more sophisticated context selection
     2684#endif
    26632685    }
    26642686   
  • branches/HTM-6.2-dev3-RWTH/source/Lib/TLibEncoder/TEncSbac.h

    r382 r397  
    336336 
    337337  ContextModel3DBuffer m_cSDCResidualFlagSCModel;
     338#if !RWTH_SDC_CTX_SIMPL_D0032
    338339  ContextModel3DBuffer m_cSDCResidualSignFlagSCModel;
     340#endif
    339341  ContextModel3DBuffer m_cSDCResidualSCModel;
    340342 
Note: See TracChangeset for help on using the changeset viewer.