Changeset 415 in 3DVCSoftware for branches/HTM-6.2-dev3-RWTH-Fix/source/Lib
- Timestamp:
- 17 May 2013, 14:26:01 (12 years ago)
- Location:
- branches/HTM-6.2-dev3-RWTH-Fix/source/Lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-6.2-dev3-RWTH-Fix/source/Lib/TLibDecoder/TDecSbac.cpp
r414 r415 37 37 38 38 #include "TDecSbac.h" 39 40 #if RWTH_SDC_DLT_B003641 #define GetNumDepthValues() (pcCU->getSlice()->getSPS()->getNumDepthValues())42 #define GetBitsPerDepthValue() (pcCU->getSlice()->getSPS()->getBitsPerDepthValue())43 #if LGE_CONCATENATE_D014144 #define PrefixThreshold ( ((GetNumDepthValues() * 3) >> 2) )45 #define BitsPerSuffix ( (UInt)ceil( Log2(GetNumDepthValues() - PrefixThreshold) ) )46 #endif47 #endif48 39 49 40 //! \ingroup TLibDecoder … … 2658 2649 Int iIdx = 0; 2659 2650 2660 UInt uiMaxResidualBits = GetBitsPerDepthValue();2651 UInt uiMaxResidualBits = pcCU->getSlice()->getSPS()->getBitsPerDepthValue(); 2661 2652 assert( uiMaxResidualBits <= g_uiBitDepth ); 2662 2653 … … 2680 2671 //prefix part 2681 2672 UInt uiCount = 0; 2682 for ( UInt ui = 0; ui < PrefixThreshold; ui++) 2673 UInt uiNumDepthValues = pcCU->getSlice()->getSPS()->getNumDepthValues(); 2674 UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2); 2675 for ( UInt ui = 0; ui < uiPrefixThreshold; ui++) 2683 2676 { 2684 2677 m_pcTDecBinIf->decodeBin( uiBit, m_cSDCResidualSCModel.get(0, 0, 0) ); … … 2689 2682 } 2690 2683 //suffix part 2691 if ( uiCount == PrefixThreshold )2692 { 2693 for ( UInt ui = 0; ui < BitsPerSuffix; ui++ )2684 if ( uiCount == uiPrefixThreshold ) 2685 { 2686 for ( UInt ui = 0; ui < ( (UInt)ceil( Log2(uiNumDepthValues - uiPrefixThreshold) ) ); ui++ ) 2694 2687 { 2695 2688 m_pcTDecBinIf->decodeBinEP( uiBit ); -
branches/HTM-6.2-dev3-RWTH-Fix/source/Lib/TLibEncoder/TEncSbac.cpp
r414 r415 41 41 #include <map> 42 42 #include <algorithm> 43 44 #if RWTH_SDC_DLT_B003645 #define GetNumDepthValues() (pcCU->getSlice()->getSPS()->getNumDepthValues())46 #define GetBitsPerDepthValue() (pcCU->getSlice()->getSPS()->getBitsPerDepthValue())47 #if LGE_CONCATENATE_D014148 #define PrefixThreshold ( ((GetNumDepthValues() * 3) >> 2) )49 #define BitsPerSuffix ( (UInt)ceil( Log2(GetNumDepthValues() - PrefixThreshold) ) )50 #endif51 #endif52 43 53 44 //! \ingroup TLibEncoder … … 2657 2648 #endif 2658 2649 2659 UInt uiMaxResidualBits = GetBitsPerDepthValue();2650 UInt uiMaxResidualBits = pcCU->getSlice()->getSPS()->getBitsPerDepthValue(); 2660 2651 assert( uiMaxResidualBits <= g_uiBitDepth ); 2661 2652 … … 2675 2666 m_pcBinIf->encodeBin( uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) ); //TODO depthmap: more sophisticated context selection 2676 2667 #endif 2677 2678 assert(uiAbsIdx < GetNumDepthValues()); 2668 2669 UInt uiNumDepthValues = pcCU->getSlice()->getSPS()->getNumDepthValues(); 2670 assert(uiAbsIdx < uiNumDepthValues); 2679 2671 2680 2672 // encode residual magnitude … … 2688 2680 UInt l = uiAbsIdx; 2689 2681 UInt k = 0; 2690 while ( l > 0 && k < PrefixThreshold ) 2682 UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2); 2683 while ( l > 0 && k < uiPrefixThreshold ) 2691 2684 { 2692 2685 m_pcBinIf->encodeBin( 1, m_cSDCResidualSCModel.get(0, 0, 0) ); … … 2694 2687 k++; 2695 2688 } 2696 if ( uiAbsIdx < PrefixThreshold )2689 if ( uiAbsIdx < uiPrefixThreshold ) 2697 2690 m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) ); 2698 2691 //suffix part 2699 2692 else 2700 2693 { 2701 uiAbsIdx -= PrefixThreshold;2702 UInt uiSuffixLength = BitsPerSuffix;2694 uiAbsIdx -= uiPrefixThreshold; 2695 UInt uiSuffixLength = ( (UInt)ceil( Log2(uiNumDepthValues - uiPrefixThreshold) ) ); 2703 2696 UInt uiBitInfo = 0; 2704 2697 for ( Int i = 0; i < uiSuffixLength; i++)
Note: See TracChangeset for help on using the changeset viewer.