Changeset 379 in 3DVCSoftware for branches/HTM-6.2-dev3-Qualcomm


Ignore:
Timestamp:
6 May 2013, 05:34:34 (11 years ago)
Author:
zhang
Message:

JCT3V-D0183 (DC predictor)

Location:
branches/HTM-6.2-dev3-Qualcomm/source/Lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp

    r342 r379  
    540540  // Do prediction
    541541  {
     542#if QC_DC_PREDICTOR_D0183
     543    Int iMean0, iMean1;
     544    getPredDCs( pbRegion, iWidth, pSrc+srcStride+1, srcStride, iMean0, iMean1 );
     545#else
    542546    //UInt uiSum0 = 0, uiSum1 = 0;
    543547    Int iSum0 = 0, iSum1 = 0;
     
    578582    iMean0 = iSum0 / iCount0; // TODO : integer op.
    579583    iMean1 = iSum1 / iCount1;
     584#endif
    580585#if LGE_EDGE_INTRA_DELTA_DC
    581586    if( bDelta )
     
    24312436}
    24322437
     2438#if QC_DC_PREDICTOR_D0183
     2439Void TComPrediction::getPredDCs( Bool* pbPattern, Int iStride, Int* piMask, Int iMaskStride, Int& riPredDC1, Int& riPredDC2 )
     2440{
     2441  Int  iDC1, iDC2;
     2442  const Int  iTR = (   iStride - 1        ) - iMaskStride;
     2443  const Int  iTM = ( ( iStride - 1 ) >> 1 ) - iMaskStride;
     2444  const Int  iLB = (   iStride - 1        ) * iMaskStride - 1;
     2445  const Int  iLM = ( ( iStride - 1 ) >> 1 ) * iMaskStride - 1;
     2446  const UInt uiBitDepth = g_uiBitDepth + g_uiBitIncrement;
     2447
     2448  Bool bL = ( pbPattern[0] != pbPattern[(iStride-1)*iStride] );
     2449  Bool bT = ( pbPattern[0] != pbPattern[(iStride-1)]         );
     2450
     2451  if( bL == bT )
     2452  {
     2453    iDC1 = bL ? ( piMask[iTR] + piMask[iLB] )>>1 : 1<<( uiBitDepth - 1 );
     2454    iDC2 =      ( piMask[ -1] + piMask[-iMaskStride] )>>1;
     2455  }
     2456  else
     2457  {
     2458    iDC1 = bL ? piMask[iLB] : piMask[iTR];
     2459    iDC2 = bL ? piMask[iTM] : piMask[iLM];
     2460  }
     2461
     2462  riPredDC1 = pbPattern[0] ? iDC1 : iDC2;
     2463  riPredDC2 = pbPattern[0] ? iDC2 : iDC1;
     2464}
     2465#else
    24332466Void TComPrediction::getWedgePredDCs( TComWedgelet* pcWedgelet, Int* piMask, Int iMaskStride, Int& riPredDC1, Int& riPredDC2, Bool bAbove, Bool bLeft )
    24342467{
     
    25082541  }
    25092542}
     2543#endif
    25102544
    25112545Void TComPrediction::calcWedgeDCs( TComWedgelet* pcWedgelet, Pel* piOrig, UInt uiStride, Int& riDC1, Int& riDC2 )
     
    28752909  Int iMaskStride = ( iWidth<<1 ) + 1;
    28762910  piMask += iMaskStride+1;
     2911#if QC_DC_PREDICTOR_D0183
     2912  getPredDCs( pcWedgelet->getPattern(), pcWedgelet->getStride(), piMask, iMaskStride, iPredDC1, iPredDC2 );
     2913#else
    28772914  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
     2915#endif
    28782916
    28792917  // assign wedge pred DCs to prediction
     
    29042942  Int iMaskStride = ( iWidth<<1 ) + 1;
    29052943  piMask += iMaskStride+1;
     2944#if QC_DC_PREDICTOR_D0183
     2945  getPredDCs( pcContourWedge->getPattern(), pcContourWedge->getStride(), piMask, iMaskStride, iPredDC1, iPredDC2 );
     2946#else
    29062947  getWedgePredDCs( pcContourWedge, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
     2948#endif
    29072949
    29082950  // assign wedge pred DCs to prediction
     
    30893131  Int iMaskStride = ( iWidth<<1 ) + 1;
    30903132  piMask += iMaskStride+1;
     3133#if QC_DC_PREDICTOR_D0183
     3134  getPredDCs( pcWedgelet->getPattern(), pcWedgelet->getStride(), piMask, iMaskStride, iPredDC1, iPredDC2 );
     3135#else
    30913136  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
     3137#endif
    30923138
    30933139  // assign wedge pred DCs to prediction
     
    31343180  Int iMaskStride = ( iWidth<<1 ) + 1;
    31353181  piMask += iMaskStride+1;
     3182#if QC_DC_PREDICTOR_D0183
     3183  getPredDCs( pcWedgelet->getPattern(), pcWedgelet->getStride(), piMask, iMaskStride, iPredDC1, iPredDC2 );
     3184#else
    31363185  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
     3186#endif
    31373187
    31383188  // assign wedge pred DCs to prediction
  • branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibCommon/TComPrediction.h

    r332 r379  
    191191#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    192192  Void  predIntraLumaDMM        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder );
    193 
     193#if QC_DC_PREDICTOR_D0183
     194  Void  getPredDCs              ( Bool* pbPattern, Int iPatternStride, Int* piMask, Int iMaskStride, Int& riPredDC1, Int& riPredDC2 );
     195#else
    194196  Void  getWedgePredDCs         ( TComWedgelet* pcWedgelet, Int* piMask, Int iMaskStride, Int& riPredDC1, Int& riPredDC2, Bool bAbove, Bool bLeft );
     197#endif
    195198  Void  calcWedgeDCs            ( TComWedgelet* pcWedgelet, Pel* piOrig, UInt uiStride, Int& riDC1, Int& riDC2 );
    196199  Void  assignWedgeDCs2Pred     ( TComWedgelet* pcWedgelet, Pel* piPred,  UInt uiStride, Int   iDC1, Int   iDC2 );
  • branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibCommon/TypeDef.h

    r356 r379  
    6363#define LGE_EDGE_INTRA_A0070              1   // JCT3V-A0070
    6464#define LGE_DMM3_SIMP_C0044               1
     65
     66#define QC_DC_PREDICTOR_D0183             1   // JCT3V-D0183: Simplified DC predictor for depth intra modes
    6567
    6668///// ***** SDC *********
  • branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp

    r350 r379  
    63126312  Int iMaskStride = ( uiWidth<<1 ) + 1;
    63136313  piMask += iMaskStride+1;
     6314#if QC_DC_PREDICTOR_D0183
     6315  getPredDCs( pcWedgelet->getPattern(), pcWedgelet->getStride(), piMask, iMaskStride, iPredDC1, iPredDC2 );
     6316#else
    63146317  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAboveAvail, bLeftAvail );
     6318#endif
    63156319
    63166320  riDeltaDC1 = iDC1 - iPredDC1;
     
    78777881
    78787882  // PredDC Calculation
     7883#if QC_DC_PREDICTOR_D0183
     7884  getPredDCs( pbRegion, uiWidth, piMask+iMaskStride+1, iMaskStride, iPredDC0, iPredDC1 );
     7885#else
    78797886  {
    78807887    UInt uiSum0 = 0;
     
    79167923    iPredDC1 = uiSum1 / uiCount1;
    79177924  }
     7925#endif
    79187926
    79197927  iDeltaDC0 = iDC0 - iPredDC0;
Note: See TracChangeset for help on using the changeset viewer.