Ignore:
Timestamp:
24 Jul 2014, 06:29:55 (10 years ago)
Author:
samsung-htm
Message:

Integration of JCT3V-I0084: Fast SDC DC offset decision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-11.2-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.cpp

    r1001 r1014  
    32843284#endif
    32853285        pcCU->setSDCFlagSubParts( (uiSDC != 0), uiPartOffset, uiDepth + uiInitTrDepth );
     3286#if FAST_SDC_OFFSET_DECISION_I0084
     3287        Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE};
     3288        for( Int iOffset = 1; iOffset <= 5; iOffset++ )
     3289#else
    32863290        for( Int iSDCDeltaResi = -2; iSDCDeltaResi <= 2; iSDCDeltaResi++ )
    3287         {
     3291#endif
     3292        {
     3293#if FAST_SDC_OFFSET_DECISION_I0084
     3294          Int iSDCDeltaResi = 0;
     3295          if(iOffset % 2 == 0)
     3296          {
     3297            iSDCDeltaResi = iOffset >> 1;
     3298          }
     3299          else
     3300          {
     3301            iSDCDeltaResi = -1 * (iOffset >> 1);
     3302          }
     3303#endif
    32883304          if( ( uiSDC == 0 ) && iSDCDeltaResi != 0 )
    32893305          {
    32903306            continue;
    32913307          }
     3308#if FAST_SDC_OFFSET_DECISION_I0084
     3309          if( iOffset > 3)
     3310          {
     3311            if ( dOffsetCost[0] < (0.9*dOffsetCost[1]) && dOffsetCost[0] < (0.9*dOffsetCost[2]) )
     3312            {
     3313              continue;
     3314            }
     3315            if ( dOffsetCost[1] < dOffsetCost[0] && dOffsetCost[0] < dOffsetCost[2] &&  iOffset == 5)
     3316            {
     3317              continue;
     3318            }
     3319            if ( dOffsetCost[0] < dOffsetCost[1] && dOffsetCost[2] < dOffsetCost[0] &&  iOffset == 4)
     3320            {
     3321              continue;
     3322            }
     3323          }
     3324#endif
    32923325#endif
    32933326     
     
    33353368          // start encoding with SDC
    33363369          xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi );
     3370#if FAST_SDC_OFFSET_DECISION_I0084
     3371          if ( testZeroResi == 0 && iOffset <= 3 )
     3372          {
     3373            dOffsetCost [iOffset -1] = dPUCost;
     3374          }
     3375#endif
    33373376        }
    33383377        else
Note: See TracChangeset for help on using the changeset viewer.