Changeset 601 in 3DVCSoftware


Ignore:
Timestamp:
29 Aug 2013, 15:10:30 (11 years ago)
Author:
tech
Message:

Merged dev3: DEV-2.0-DEV3-KWU@589

Location:
branches/HTM-DEV-2.0-dev0/source/Lib
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/ContextTables.h

    r598 r601  
    112112#if H_3D_DIM_DMM
    113113#define NUM_DMM1_DATA_CTX             1       ///< number of context models for DMM1 data
     114#if !SEC_DMM2_E0146
    114115#define NUM_DMM2_DATA_CTX             1       ///< number of context models for DMM2 data
     116#endif
    115117#define NUM_DMM3_DATA_CTX             1       ///< number of context models for DMM3 data
    116118#endif
     
    388390#endif
    389391#if H_3D_DIM
     392#if ZJU_DEPTH_INTRA_MODE_E0204
     393static const UChar
     394INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] =
     395{
     396    {0,  0,  64, 168, 168, 124, CNU, 0},
     397    {0, 64,   0, 183, CNU, 108,   0, 0},
     398    {64, 0, CNU, CNU, 168, 109,   0, 0}
     399};
     400#else
    390401static const UChar
    391402INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] =
     
    395406  {64, 0, CNU,   0, CNU,   0,   0, 0}
    396407};
     408#endif
    397409static const UChar
    398410INIT_DDC_FLAG[3][NUM_DDC_FLAG_CTX] =
     
    417429  { CNU },
    418430};
     431#if !SEC_DMM2_E0146
    419432static const UChar
    420433INIT_DMM2_DATA[3][NUM_DMM2_DATA_CTX] =
     
    424437  { CNU },
    425438};
     439#endif
    426440static const UChar
    427441INIT_DMM3_DATA[3][NUM_DMM3_DATA_CTX] =
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp

    r600 r601  
    120120    m_dmmWedgeTabIdx[i] = NULL;
    121121  }
     122#if !SEC_DMM2_E0146
    122123  m_dmm2DeltaEnd    = NULL;
     124#endif
    123125  m_dmm3IntraTabIdx = NULL;
    124126#endif
     
    278280      m_dmmWedgeTabIdx[i]    = (UInt*)xMalloc(UInt, uiNumPartition);
    279281    }
     282#if !SEC_DMM2_E0146
    280283    m_dmm2DeltaEnd    = (Int* )xMalloc(Int,  uiNumPartition);
     284#endif
    281285    m_dmm3IntraTabIdx = (UInt*)xMalloc(UInt, uiNumPartition);
    282286#endif
     
    415419      if ( m_dmmWedgeTabIdx[i] ) { xFree( m_dmmWedgeTabIdx[i] ); m_dmmWedgeTabIdx[i] = NULL; }
    416420    }
     421#if !SEC_DMM2_E0146
    417422    if ( m_dmm2DeltaEnd    ) { xFree( m_dmm2DeltaEnd    ); m_dmm2DeltaEnd    = NULL; }
     423#endif
    418424    if ( m_dmm3IntraTabIdx ) { xFree( m_dmm3IntraTabIdx ); m_dmm3IntraTabIdx = NULL; }
    419425#endif
     
    640646      memset( m_dmmWedgeTabIdx[i] + firstElement, 0,                      numElements * sizeof( *m_dmmWedgeTabIdx[i] ) );
    641647    }
     648#if !SEC_DMM2_E0146
    642649    memset( m_dmm2DeltaEnd      + firstElement, 0,                        numElements * sizeof( *m_dmm2DeltaEnd    ) );
     650#endif
    643651    memset( m_dmm3IntraTabIdx   + firstElement, 0,                        numElements * sizeof( *m_dmm3IntraTabIdx ) );
    644652#endif
     
    821829        m_dmmWedgeTabIdx[i] [ui] = 0;
    822830      }
     831#if !SEC_DMM2_E0146
    823832      m_dmm2DeltaEnd    [ui] = 0;
     833#endif
    824834      m_dmm3IntraTabIdx [ui] = 0;
    825835#endif
     
    936946    memset( m_dmmWedgeTabIdx[i], 0, sizeof(UInt) * m_uiNumPartition );
    937947  }
     948#if !SEC_DMM2_E0146
    938949  memset( m_dmm2DeltaEnd   , 0, sizeof(Int ) * m_uiNumPartition );
     950#endif
    939951  memset( m_dmm3IntraTabIdx, 0, sizeof(UInt) * m_uiNumPartition );
    940952#endif
     
    10241036        m_dmmWedgeTabIdx[i] [ui] = pcCU->m_dmmWedgeTabIdx[i] [uiPartOffset+ui];
    10251037      }
     1038#if !SEC_DMM2_E0146
    10261039      m_dmm2DeltaEnd    [ui] = pcCU->m_dmm2DeltaEnd   [uiPartOffset+ui];
     1040#endif
    10271041      m_dmm3IntraTabIdx [ui] = pcCU->m_dmm3IntraTabIdx[uiPartOffset+ui];
    10281042#endif
     
    11821196    m_dmmWedgeTabIdx[i] = pcCU->getDmmWedgeTabIdx( i ) + uiPart;
    11831197  }
     1198#if !SEC_DMM2_E0146
    11841199  m_dmm2DeltaEnd    = pcCU->getDmm2DeltaEnd()    + uiPart;
     1200#endif
    11851201  m_dmm3IntraTabIdx = pcCU->getDmm3IntraTabIdx() + uiPart;
    11861202#endif
     
    13881404    memcpy( m_dmmWedgeTabIdx[i] + uiOffset, pcCU->getDmmWedgeTabIdx( i ), sizeof(UInt) * uiNumPartition );
    13891405  }
     1406#if !SEC_DMM2_E0146
    13901407  memcpy( m_dmm2DeltaEnd    + uiOffset, pcCU->getDmm2DeltaEnd()   , sizeof(Int ) * uiNumPartition );
     1408#endif
    13911409  memcpy( m_dmm3IntraTabIdx + uiOffset, pcCU->getDmm3IntraTabIdx(), sizeof(UInt) * uiNumPartition );
    13921410#endif
     
    15211539    memcpy( rpcCU->getDmmWedgeTabIdx( i ) + m_uiAbsIdxInLCU, m_dmmWedgeTabIdx[i], sizeof(UInt) * m_uiNumPartition );
    15221540  }
     1541#if !SEC_DMM2_E0146
    15231542  memcpy( rpcCU->getDmm2DeltaEnd()    + m_uiAbsIdxInLCU, m_dmm2DeltaEnd   , sizeof(Int ) * m_uiNumPartition );
     1543#endif
    15241544  memcpy( rpcCU->getDmm3IntraTabIdx() + m_uiAbsIdxInLCU, m_dmm3IntraTabIdx, sizeof(UInt) * m_uiNumPartition );
    15251545#endif
     
    16381658    memcpy( rpcCU->getDmmWedgeTabIdx( i ) + uiPartOffset, m_dmmWedgeTabIdx[i], sizeof(UInt) * uiQNumPart );
    16391659  }
     1660#if !SEC_DMM2_E0146
    16401661  memcpy( rpcCU->getDmm2DeltaEnd()    + uiPartOffset, m_dmm2DeltaEnd   , sizeof(Int ) * uiQNumPart );
     1662#endif
    16411663  memcpy( rpcCU->getDmm3IntraTabIdx() + uiPartOffset, m_dmm3IntraTabIdx, sizeof(UInt) * uiQNumPart );
    16421664#endif
     
    27132735  // check prediction mode
    27142736  UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); 
     2737#if LGE_SDC_REMOVE_DC_E0158
     2738  if( uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) )
     2739#else
    27152740  if( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) )
     2741#endif
    27162742    return true;
    27172743 
     
    63806406  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; }
    63816407}
     6408#if !SEC_DMM2_E0146
    63826409Void  TComDataCU::setDmm2DeltaEndSubParts( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth )
    63836410{
     
    63856412  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm2DeltaEnd[uiAbsPartIdx+ui] = iDelta; }
    63866413}
     6414#endif
    63876415Void  TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )
    63886416{
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.h

    r598 r601  
    211211#if H_3D_DIM_DMM
    212212  UInt*         m_dmmWedgeTabIdx[DMM_NUM_TYPE];
     213#if !SEC_DMM2_E0146
    213214  Int*          m_dmm2DeltaEnd;
     215#endif
    214216  UInt*         m_dmm3IntraTabIdx;
    215217#endif
     
    553555  Void  setDmmWedgeTabIdxSubParts     ( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth );
    554556
     557#if !SEC_DMM2_E0146
    555558  Int*  getDmm2DeltaEnd               ()                      { return m_dmm2DeltaEnd;        }
    556559  Int   getDmm2DeltaEnd               ( UInt uiIdx )          { return m_dmm2DeltaEnd[uiIdx]; }
    557560  Void  setDmm2DeltaEnd               ( UInt uiIdx, Int iD )  { m_dmm2DeltaEnd[uiIdx] = iD;   }
    558561  Void  setDmm2DeltaEndSubParts       ( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth );
     562#endif
    559563
    560564  UInt* getDmm3IntraTabIdx            ()                      { return m_dmm3IntraTabIdx;        }
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComPrediction.cpp

    r598 r601  
    456456        dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]);
    457457      } break;
     458#if !SEC_DMM2_E0146
    458459    case( DMM2_IDX ):
    459460      {
     
    467468        dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ uiTabIdx ]);
    468469      } break;
     470#endif
    469471    case( DMM3_IDX ):
    470472      {
     
    27822784  {
    27832785    UInt dimType =  getDimType( pcTempCU->getLumaIntraDir( uiTempPartIdx ) );
     2786#if SEC_DMM2_E0146
     2787    if( DMM1_IDX == dimType || DMM3_IDX == dimType )
     2788#else
    27842789    if( DMM1_IDX == dimType || DMM2_IDX == dimType || DMM3_IDX == dimType )
     2790#endif
    27852791    {
    27862792      // get offset between current and reference block
     
    28072813  {
    28082814    UInt dimType = getDimType( pcTempCU->getLumaIntraDir( uiTempPartIdx ) );
     2815#if SEC_DMM2_E0146
     2816    if( DMM1_IDX == dimType || DMM3_IDX == dimType )
     2817#else
    28092818    if( DMM1_IDX == dimType || DMM2_IDX == dimType || DMM3_IDX == dimType )
     2819#endif
    28102820    {
    28112821      // get offset between current and reference block
     
    28702880    iDC += piRefBlkY[k];
    28712881  }
     2882
     2883#if SCU_HS_DMM4_REMOVE_DIV_E0242
     2884  Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2;
     2885  iDC = iDC >> (cuMaxLog2Size - pcCU->getDepth(0))*2;
     2886#else
    28722887  iDC /= (uiWidth*uiHeight);
     2888#endif
    28732889  piRefBlkY = cTempYuv.getLumaAddr();
    28742890
     
    33143330#endif
    33153331#if H_3D_DIM_SDC
    3316 Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride )
     3332Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride
     3333#if KWU_SDC_SIMPLE_DC_E0117
     3334                                         ,UInt uiIntraMode
     3335                                         ,Bool orgDC
     3336#endif
     3337                                        )
    33173338{
    33183339  Int iSumDepth[2];
     
    33213342  memset(iSumPix, 0, sizeof(Int)*2);
    33223343 
     3344#if KWU_SDC_SIMPLE_DC_E0117
     3345  if (orgDC == false)
     3346  {
     3347    if ( getDimType(uiIntraMode) == DMM1_IDX )
     3348    {
     3349      UChar ucSegmentLT = pMask[0];
     3350      UChar ucSegmentRT = pMask[uiSize-1];
     3351      UChar ucSegmentLB = pMask[uiMaskStride * (uiSize-1)];
     3352      UChar ucSegmentRB = pMask[uiMaskStride * (uiSize-1) + (uiSize-1)];
     3353
     3354      rpSegMeans[ucSegmentLT] = pOrig[0];
     3355      rpSegMeans[ucSegmentRT] = pOrig[uiSize-1];
     3356      rpSegMeans[ucSegmentLB] = pOrig[uiStride * (uiSize-1) ];
     3357      rpSegMeans[ucSegmentRB] = pOrig[uiStride * (uiSize-1) + (uiSize-1) ];
     3358    }
     3359    else if (uiIntraMode == PLANAR_IDX)
     3360    {
     3361      Pel* pLeftTop = pOrig;
     3362      Pel* pRightTop = pOrig + (uiSize-1);
     3363      Pel* pLeftBottom = (pOrig+ (uiStride*(uiSize-1)));
     3364      Pel* pRightBottom = (pOrig+ (uiStride*(uiSize-1)) + (uiSize-1));
     3365
     3366      rpSegMeans[0] = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2;
     3367    }
     3368    return;
     3369  }
     3370#endif
     3371
    33233372  Int subSamplePix;
    33243373  if ( uiSize == 64 || uiSize == 32 )
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComPrediction.h

    r598 r601  
    191191  Void predIntraLumaDepth         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc = false );
    192192#if H_3D_DIM_SDC
    193   Void analyzeSegmentsSDC         ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride );
     193  Void analyzeSegmentsSDC         ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride
     194#if KWU_SDC_SIMPLE_DC_E0117
     195                                    ,UInt uiIntraMode
     196                                    ,Bool orgDC=false
     197#endif
     198    );
    194199#endif
    195200#endif
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRdCost.cpp

    r598 r601  
    483483
    484484}
     485
     486#if SCU_HS_FAST_DEPTH_INTRA_E0238
     487
     488UInt TComRdCost::calcVAR (Pel* pi0, Int stride, Int width, Int height, Int cuDepth)
     489{
     490  Int temp = 0;
     491
     492  for (Int y = 0; y < height; y++)
     493  {
     494    for (Int x = 0; x < width; x++)
     495    {
     496      temp += pi0[ y * stride + x ];
     497    }
     498  }
     499
     500  Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2;
     501 
     502  if ( width == 4 )
     503  {
     504    cuDepth = cuMaxLog2Size - 2;
     505  }
     506
     507  temp = temp >> (cuMaxLog2Size-cuDepth) * 2;
     508
     509  UInt sum = 0;
     510  for (Int y = 0; y < height; y++)
     511  {
     512    for (Int x = 0; x <  width; x++)
     513    {
     514      sum += (pi0[ y * stride + x ] - temp ) * (pi0[ y * stride + x ] - temp );
     515    }
     516  }
     517  return (sum >> (cuMaxLog2Size-cuDepth)*2);
     518
     519}
     520#endif
     521
    485522
    486523#if WEIGHTED_CHROMA_DISTORTION
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRdCost.h

    r598 r601  
    235235  UInt    calcHAD(Int bitDepth, Pel* pi0, Int iStride0, Pel* pi1, Int iStride1, Int iWidth, Int iHeight );
    236236 
     237#if SCU_HS_FAST_DEPTH_INTRA_E0238
     238  UInt    calcVAR(Pel* pi0, Int stride, Int width, Int height, Int cuDepth);
     239#endif 
    237240  // for motion cost
    238241#if !FIX203
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRom.cpp

    r531 r601  
    347347{ //2x2   4x4   8x8 16x16 32x32 64x64
    348348     0,    7,   10,   11,   11,   13 };
     349#if LGE_PKU_DMM3_OVERLAP_E0159
     350const UChar g_dmm3IntraTabIdxBits[6] =
     351{ //2x2   4x4   8x8 16x16 32x32 64x64
     352     0,    4,    7,    8,    8,    0 };
     353#else
    349354const UChar g_dmm3IntraTabIdxBits[6] =
    350355{ //2x2   4x4   8x8 16x16 32x32 64x64
    351356     0,    6,    9,    9,    9,    0 };
     357#endif
    352358
    353359extern std::vector< std::vector<TComWedgelet> >   g_dmmWedgeLists;
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComWedgelet.h

    r531 r601  
    5050enum DIM_IDX
    5151{
     52#if SEC_DMM2_E0146
     53  DMM1_IDX = 0,
     54  DMM3_IDX = 1,
     55  DMM4_IDX = 2,
     56  RBC_IDX  = 3
     57#else
    5258  DMM1_IDX = 0,
    5359  DMM2_IDX = 3,
     
    5561  DMM4_IDX = 2,
    5662  RBC_IDX  = 4
     63#endif
    5764};
     65#if SEC_DMM2_E0146
     66#define DMM_NUM_TYPE   3
     67#else
    5868#define DMM_NUM_TYPE   4
     69#endif
    5970#define RBC_NUM_TYPE   1
    6071#define DIM_NUM_TYPE   (DMM_NUM_TYPE+RBC_NUM_TYPE)
     
    7586#define DMM_NO_WEDGEINDEX       MAX_UINT
    7687#define DMM_NUM_WEDGE_REFINES   8
     88#if !SEC_DMM2_E0146
    7789#define DMM2_DELTAEND_MAX       4
     90#endif
    7891#define DMM3_SIMPLIFY_TR        1
    7992
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TypeDef.h

    r600 r601  
    214214#if H_3D_DIM
    215215#define H_3D_DIM_DMM                      1   // Depth Modeling Modes
     216#if H_3D_DIM
     217#define SEC_DMM2_E0146                    1   // Removal of DMM2 from DMMs
     218#define ZJU_DEPTH_INTRA_MODE_E0204        1   // Simplified Binarization for depth_intra_mode
     219#endif
    216220#define H_3D_DIM_RBC                      1   // Region Boundary Chain mode
    217221#define H_3D_DIM_SDC                      1   // Simplified Depth Coding method
     
    220224                                              // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
    221225                                              // LG_ZEROINTRADEPTHRESI_A0087
     226#define KWU_SDC_SIMPLE_DC_E0117           1   // Simplified DC calculation for SDC
     227#define SCU_HS_DMM4_REMOVE_DIV_E0242      1   // DMM4 Division Removal
     228#define SCU_HS_FAST_DEPTH_INTRA_E0238     1   // Fast DMM and RBC Mode Selection
     229#if H_3D_DIM_SDC
     230#define LGE_SDC_REMOVE_DC_E0158           1   // Removal of DC mode from SDC
     231#endif
     232#if H_3D_DIM_DMM
     233#define LGE_PKU_DMM3_OVERLAP_E0159        1   // Removal of overlap between DMM3 and DMM1
     234#endif
    222235#endif
    223236
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r598 r601  
    874874  // get DC prediction for each segment
    875875  Pel apDCPredValues[2];
     876#if KWU_SDC_SIMPLE_DC_E0117
     877  m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode);
     878#else
    876879  m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride);
     880#endif
    877881 
    878882  // reconstruct residual based on mask + DC residuals
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecSbac.cpp

    r598 r601  
    8989#if H_3D_DIM_DMM
    9090, m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     91#if !SEC_DMM2_E0146
    9192, m_cDmm2DataSCModel          ( 1,             1,               NUM_DMM2_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     93#endif
    9294, m_cDmm3DataSCModel          ( 1,             1,               NUM_DMM3_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    9395#endif
     
    177179#if H_3D_DIM_DMM
    178180  m_cDmm1DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM1_DATA );
     181#if !SEC_DMM2_E0146
    179182  m_cDmm2DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM2_DATA );
     183#endif
    180184  m_cDmm3DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM3_DATA );
    181185#endif
     
    251255#if H_3D_DIM_DMM
    252256  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
     257#if !SEC_DMM2_E0146
    253258  m_cDmm2DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA );
     259#endif
    254260  m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
    255261#endif
     
    438444  ruiTabIdx = uiIdx;
    439445}
     446#if !SEC_DMM2_E0146
    440447Void TDecSbac::xParseDmm2Offset( Int& riOffset )
    441448{
     
    463470  riOffset = iDeltaEnd;
    464471}
     472#endif
    465473Void TDecSbac::xParseDmm3WedgeIdx( UInt& ruiIntraIdx, Int iNumBit )
    466474{
     
    11541162      pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth );
    11551163    } break;
     1164#if !SEC_DMM2_E0146
    11561165  case( DMM2_IDX ):
    11571166    {
     
    11601169      pcCU->setDmm2DeltaEndSubParts( iOffset, absPartIdx, depth );
    11611170    } break;
     1171#endif
    11621172  case( DMM3_IDX ):
    11631173    {
     
    12271237  if( puIdx == 2 )
    12281238  {
     1239#if !LGE_SDC_REMOVE_DC_E0158
    12291240    while( binNum < 2 && symbol )
     1241#endif
    12301242    {
    12311243      ctxDepthMode = puIdx*3 + binNum;
     
    12351247    }
    12361248         if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;}
     1249#if LGE_SDC_REMOVE_DC_E0158
     1250    else if( modeCode == 1 ) { dir = 0;          sdcFlag = 0;}
     1251#else
    12371252    else if( modeCode == 2 ) { dir = 0;          sdcFlag = 0;}
    12381253    else if( modeCode == 3 ) { dir =     DC_IDX; sdcFlag = 1;}
     1254#endif
    12391255  }
    12401256  else if( puIdx == 0 )
     
    12541270  else
    12551271  {
     1272#if ZJU_DEPTH_INTRA_MODE_E0204
     1273      UInt maxBinNum = 0;
     1274      m_pcTDecBinIf->decodeBinEP(symbol);
     1275      if( symbol == 1 )
     1276      {
     1277          maxBinNum = 3;
     1278      }
     1279      else
     1280      {
     1281          maxBinNum = 2;
     1282          symbol = 1;
     1283      }
     1284      while( binNum<maxBinNum && symbol )
     1285      {
     1286          ctxDepthMode = puIdx*3 + ( binNum >= 2 ? 2 : binNum );
     1287          m_pcTDecBinIf->decodeBin(symbol,m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode));
     1288          modeCode = (modeCode<<1)+symbol;
     1289          binNum++;
     1290      }
     1291      if( maxBinNum == 3 )
     1292      {
     1293          if ( modeCode == 0 )       { dir =  PLANAR_IDX;             sdcFlag = 1;}
     1294          else if ( modeCode == 2 )  { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
     1295          else if ( modeCode == 6 )  { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;}
     1296          else if ( modeCode == 7 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
     1297      }
     1298      else
     1299      {
     1300          if ( modeCode == 0 )       { dir = 5;                       sdcFlag = 0;}
     1301          else if ( modeCode == 2 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}
     1302          else if ( modeCode == 3 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
     1303      }
     1304#else
    12561305    ctxDepthMode = puIdx*3 ;
    12571306    m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
     
    12831332      {
    12841333        binNum = 0;
     1334#if LGE_SDC_REMOVE_DC_E0158
     1335#if !SEC_DMM2_E0146
     1336        while( symbol && binNum < 2 )
     1337#endif
     1338#else
     1339#if SEC_DMM2_E0146
     1340        while( symbol && binNum < 2 )
     1341#else
    12851342        while( symbol && binNum < 3 )
     1343#endif
     1344#endif
    12861345        {
    12871346          ctxDepthMode = puIdx*3 + 2;
     
    12981357    else if( modeCode == 5  ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
    12991358    else if( modeCode == 6  ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;}
     1359#if LGE_SDC_REMOVE_DC_E0158
     1360#if SEC_DMM2_E0146
     1361    else if( modeCode == 7 )  { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
     1362#else
     1363    else if( modeCode == 14 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
     1364    else if( modeCode == 15 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;}
     1365#endif
     1366#else
    13001367    else if( modeCode == 14 ) { dir =      DC_IDX;             sdcFlag = 1;}
     1368#if SEC_DMM2_E0146
     1369    else if( modeCode == 15 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
     1370#else
    13011371    else if( modeCode == 30 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
    13021372    else if( modeCode == 31 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;}
     1373#endif
     1374#endif
     1375#endif
    13031376  }
    13041377  pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecSbac.h

    r598 r601  
    102102#if H_3D_DIM_DMM
    103103  Void  xParseDmm1WedgeIdx   ( UInt& ruiTabIdx, Int iNumBit );
     104#if !SEC_DMM2_E0146
    104105  Void  xParseDmm2Offset     ( Int& riOffset );
     106#endif
    105107  Void  xParseDmm3WedgeIdx   ( UInt& ruiIntraIdx, Int iNumBit );
    106108#endif
     
    214216#if H_3D_DIM_DMM
    215217  ContextModel3DBuffer m_cDmm1DataSCModel;
     218#if !SEC_DMM2_E0146
    216219  ContextModel3DBuffer m_cDmm2DataSCModel;
     220#endif
    217221  ContextModel3DBuffer m_cDmm3DataSCModel;
    218222#endif
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSbac.cpp

    r598 r601  
    9595#if H_3D_DIM_DMM
    9696, m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     97#if !SEC_DMM2_E0146
    9798, m_cDmm2DataSCModel          ( 1,             1,               NUM_DMM2_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     99#endif
    98100, m_cDmm3DataSCModel          ( 1,             1,               NUM_DMM3_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    99101#endif
     
    175177#if H_3D_DIM_DMM
    176178  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
     179#if !SEC_DMM2_E0146
    177180  m_cDmm2DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA );
     181#endif
    178182  m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
    179183#endif
     
    264268#if H_3D_DIM_DMM
    265269      curCost += m_cDmm1DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM1_DATA );
     270#if !SEC_DMM2_E0146
    266271      curCost += m_cDmm2DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM2_DATA );
     272#endif
    267273      curCost += m_cDmm3DataSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DMM3_DATA );
    268274#endif
     
    334340#if H_3D_DIM_DMM
    335341  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
     342#if !SEC_DMM2_E0146
    336343  m_cDmm2DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA );
     344#endif
    337345  m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
    338346#endif
     
    541549}
    542550
     551#if !SEC_DMM2_E0146
    543552Void TEncSbac::xCodeDmm2Offset( Int iOffset )
    544553{
     
    557566  }
    558567}
     568#endif
    559569
    560570Void TEncSbac::xCodeDmm3WedgeIdx( UInt uiIntraIdx, Int iNumBit )
     
    12161226      xCodeDmm1WedgeIdx( pcCU->getDmmWedgeTabIdx( dimType, absPartIdx ), g_dmm1TabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] );
    12171227    } break;
     1228#if !SEC_DMM2_E0146
    12181229  case( DMM2_IDX ):
    12191230    {
    12201231      xCodeDmm2Offset( pcCU->getDmm2DeltaEnd( absPartIdx ) );
    12211232    } break;
     1233#endif
    12221234  case( DMM3_IDX ):
    12231235    {
     
    12681280Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx )
    12691281{
     1282#if ZJU_DEPTH_INTRA_MODE_E0204
     1283    UInt codeWordTable[3][7] =    {{0, 0, 0, 2, 0,6, 7},{0, 0, 2, 7, 3, 6, 2},{0, 1, 0, 0, 0, 0, 0}};
     1284    UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{1, 1, 2, 3, 2, 3, 2},{1, 1, 0, 0, 0, 0, 0}};
     1285#else
     1286#if LGE_SDC_REMOVE_DC_E0158
     1287#if SEC_DMM2_E0146
     1288  UInt codeWordTable[3][7] =    {{0, 0, 0, 2, 0,6, 7},{0, 2, 3, 4, 5, 6, 7},{0, 1, 0, 0, 0, 0, 0}};
     1289  UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{2, 3, 3, 3, 3, 3, 3},{1, 1, 0, 0, 0, 0, 0}};
     1290#else
     1291  UInt codeWordTable[3][8] =    { { 0, 0, 0, 2, 0, 6, 0, 7 }, { 0, 2, 3, 4, 5, 6, 15, 14 }, { 0, 1, 0, 0, 0, 0, 0, 0 } };
     1292  UInt codeWordLenTable[3][8] = { { 0, 1, 0, 2, 0, 3, 0, 3 }, { 2, 3, 3, 3, 3, 3,  4,  4 }, { 1, 1, 0, 0, 0, 0, 0, 0 } };
     1293#endif
     1294#else
     1295#if SEC_DMM2_E0146
     1296  UInt codeWordTable[3][8] =    {{0, 0, 0, 2, 0,6, 0, 7},{0, 2, 3, 4, 5, 6, 14, 15},{0, 2, 0, 0, 0, 0, 3, 0}};
     1297  UInt codeWordLenTable[3][8] = {{0, 1, 0, 2, 0,3, 0, 3},{2, 3, 3, 3, 3, 3,  4,  4},{1, 2, 0, 0, 0, 0, 2, 0}};
     1298#else
    12701299  UInt codeWordTable[3][9] =    {{0, 0, 0, 2, 0,6, 0, 0, 7},{0, 2, 3, 4, 5, 6, 14, 31, 30},{0, 2, 0, 0, 0, 0, 3, 0, 0}};
    12711300  UInt codeWordLenTable[3][9] = {{0, 1, 0, 2, 0,3, 0, 0, 3},{2, 3, 3, 3, 3, 3,  4,  5,  5},{1, 2, 0, 0, 0, 0, 2, 0, 0}};
     1301#endif
     1302#endif
     1303#endif
    12721304  UInt dir = pcCU->getLumaIntraDir( absPartIdx );
    12731305  UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );
     
    12851317    case DMM4_IDX: codeIdx = 4; break;
    12861318    case DMM3_IDX: codeIdx = 5; break;
     1319#if LGE_SDC_REMOVE_DC_E0158
     1320#if SEC_DMM2_E0146
     1321    case  RBC_IDX: codeIdx = 6; break;
     1322#else
     1323    case DMM2_IDX: codeIdx = 6; break;
     1324    case  RBC_IDX: codeIdx = 7; break;
     1325#endif
     1326#else
     1327#if SEC_DMM2_E0146
     1328    case  RBC_IDX: codeIdx = 7; break;
     1329#else
    12871330    case DMM2_IDX: codeIdx = 7; break;
    12881331    case  RBC_IDX: codeIdx = 8; break;
     1332#endif
     1333#endif
    12891334    default:                    break;
    12901335    }
     
    12971342    {
    12981343      case PLANAR_IDX:  codeIdx = 0; break;
     1344#if !LGE_SDC_REMOVE_DC_E0158
    12991345      case DC_IDX:      codeIdx = 6; break;
     1346#endif
    13001347      default:          codeIdx = 2; break;
    13011348    }
     1349  }
     1350#endif
     1351#if ZJU_DEPTH_INTRA_MODE_E0204
     1352  if( puIdx==1 )
     1353  {
     1354      if( codeIdx==1 || codeIdx==2 || codeIdx==4 )
     1355      {
     1356          m_pcBinIf->encodeBinEP( 0 );
     1357      }
     1358      else
     1359      {
     1360          m_pcBinIf->encodeBinEP( 1 );
     1361      }
    13021362  }
    13031363#endif
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSbac.h

    r598 r601  
    121121#if H_3D_DIM_DMM
    122122  Void  xCodeDmm1WedgeIdx    ( UInt uiTabIdx, Int iNumBit );
     123#if !SEC_DMM2_E0146
    123124  Void  xCodeDmm2Offset      ( Int iOffset );
     125#endif
    124126  Void  xCodeDmm3WedgeIdx    ( UInt uiIntraIdx, Int iNumBit );
    125127#endif
     
    254256#if H_3D_DIM_DMM
    255257  ContextModel3DBuffer m_cDmm1DataSCModel;
     258#if !SEC_DMM2_E0146
    256259  ContextModel3DBuffer m_cDmm2DataSCModel;
     260#endif
    257261  ContextModel3DBuffer m_cDmm3DataSCModel;
    258262#endif
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r598 r601  
    19001900  // get DC prediction for each segment
    19011901  Pel apDCPredValues[2];
     1902#if KWU_SDC_SIMPLE_DC_E0117
     1903  analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode );
     1904#else
    19021905  analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride );
     1906#endif
    19031907 
    19041908  // get original DC for each segment
    19051909  Pel apDCOrigValues[2];
     1910#if KWU_SDC_SIMPLE_DC_E0117
     1911  analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode, true );
     1912#else
    19061913  analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride );
     1914#endif
    19071915 
    19081916  for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ )
     
    28422850    if( m_pcEncCfg->getIsDepth() && uiWidth >= DIM_MIN_SIZE && uiWidth <= DIM_MAX_SIZE && uiWidth == uiHeight )
    28432851    {
     2852
     2853#if SCU_HS_FAST_DEPTH_INTRA_E0238
     2854      Int  threshold    = max(((pcCU->getQP(0))>>3)-1,3);
     2855      Int  varThreshold = (Int)( threshold * threshold - 8 );
     2856      UInt varCU      = m_pcRdCost->calcVAR(piOrg, uiStride, uiWidth,uiHeight,pcCU->getDepth(0));
     2857#endif
     2858
     2859
    28442860#if H_3D_DIM_DMM
    2845       if( m_pcEncCfg->getUseDMM() )
     2861      if( m_pcEncCfg->getUseDMM()
     2862#if SCU_HS_FAST_DEPTH_INTRA_E0238
     2863         && (uiRdModeList[0] != 0 || varCU >= varThreshold)
     2864#endif
     2865        )
    28462866      {
    28472867        for( UInt dmmType = 0; dmmType < DMM_NUM_TYPE; dmmType++ )
     
    28582878              biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
    28592879            } break;
     2880#if !SEC_DMM2_E0146
    28602881          case( DMM2_IDX ):
    28612882            {
     
    28692890              }
    28702891            } break;
     2892#endif
    28712893          case( DMM3_IDX ):
    28722894            {
     2895#if LGE_PKU_DMM3_OVERLAP_E0159
     2896              TComPic*      pcPicTex = pcCU->getSlice()->getTexturePic();
     2897              TComDataCU* pcColTexCU = pcPicTex->getCU( pcCU->getAddr() );
     2898              UInt      uiTexPartIdx = pcCU->getZorderIdxInCU() + uiPartOffset;
     2899              Int   uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255;
     2900
     2901              if( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 )
     2902              {
     2903#endif
    28732904              UInt uiIntraTabIdx = 0;
    28742905              xSearchDmm3Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx, uiIntraTabIdx );
     
    28762907              pcCU->setDmm3IntraTabIdxSubParts( uiIntraTabIdx, uiPartOffset, uiDepth + uiInitTrDepth );
    28772908              biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);
     2909#if LGE_PKU_DMM3_OVERLAP_E0159
     2910              }
     2911#endif
    28782912            } break;
    28792913          case( DMM4_IDX ):
     
    29032937#endif
    29042938#if H_3D_DIM_RBC
    2905       if( m_pcEncCfg->getUseRBC() )
     2939      if( m_pcEncCfg->getUseRBC()
     2940#if SCU_HS_FAST_DEPTH_INTRA_E0238
     2941          && (uiRdModeList[0] != 0 || varCU >= varThreshold)
     2942#endif
     2943        )
    29062944      {
    29072945        if( xSearchRbcEdge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight ) )
     
    73237361}
    73247362
     7363#if !SEC_DMM2_E0146
    73257364Void TEncSearch::xSearchDmm2Wedge( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd )
    73267365{
     
    73887427  return;
    73897428}
     7429#endif
    73907430
    73917431Void TEncSearch::xSearchDmm3Wedge( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx )
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSearch.h

    r598 r601  
    352352  Void xSearchDmmDeltaDCs         ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piOrig, Pel* piPredic, UInt uiStride, Bool* biSegPattern, Int patternStride, UInt uiWidth, UInt uiHeight, Pel& rDeltaDC1, Pel& rDeltaDC2 );
    353353  Void xSearchDmm1Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx );
     354#if !SEC_DMM2_E0146
    354355  Void xSearchDmm2Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd );
     356#endif
    355357  Void xSearchDmm3Wedge           ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx );
    356358#endif
Note: See TracChangeset for help on using the changeset viewer.