Ignore:
Timestamp:
16 May 2013, 05:07:24 (12 years ago)
Author:
lg
Message:

D0141 with Macro LGE_CONCATENATE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-6.2-dev3-LG-2/source/Lib/TLibDecoder/TDecSbac.cpp

    r397 r406  
    4141#define GetNumDepthValues()     (pcCU->getSlice()->getSPS()->getNumDepthValues())
    4242#define GetBitsPerDepthValue()  (pcCU->getSlice()->getSPS()->getBitsPerDepthValue())
     43#if LGE_CONCATENATE
     44#define PrefixThreshold ( ((GetNumDepthValues() * 3) >> 2) )
     45#define BitsPerSuffix ( (UInt)ceil( Log2(GetNumDepthValues() - PrefixThreshold) ) )
     46#endif
    4347#endif
    4448
     
    26732677   
    26742678    // decode residual magnitude
     2679#if LGE_CONCATENATE
     2680    //prefix part
     2681    UInt uiCount = 0;
     2682    for ( UInt ui = 0; ui < PrefixThreshold; ui++)
     2683    {
     2684        m_pcTDecBinIf->decodeBin( uiBit, m_cSDCResidualSCModel.get(0, 0, 0) );
     2685        if ( uiBit == 0 )
     2686            break;
     2687        else
     2688            uiCount++;
     2689    }
     2690    //suffix part
     2691    if ( uiCount == PrefixThreshold )
     2692    {
     2693        for ( UInt ui = 0; ui < BitsPerSuffix; ui++ )
     2694        {
     2695            m_pcTDecBinIf->decodeBinEP( uiBit );
     2696            uiAbsIdx |= uiBit << ui;
     2697        }
     2698        uiAbsIdx += uiCount;
     2699    }
     2700    else
     2701        uiAbsIdx = uiCount;
     2702#else
    26752703    for (Int i=0; i<uiMaxResidualBits; i++)
    26762704    {
     
    26822710      uiAbsIdx |= uiBit << i;
    26832711    }
     2712#endif
    26842713   
    26852714    uiAbsIdx += 1;
Note: See TracChangeset for help on using the changeset viewer.