Changeset 406 in 3DVCSoftware for branches/HTM-6.2-dev3-LG-2
- Timestamp:
- 16 May 2013, 05:07:24 (12 years ago)
- Location:
- branches/HTM-6.2-dev3-LG-2/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-6.2-dev3-LG-2/source/Lib/TLibCommon/ContextTables.h
r397 r406 138 138 #define SDC_NUM_SIGN_FLAG_CTX 1 139 139 #endif 140 #if LGE_CONCATENATE 141 #define SDC_NUM_RESIDUAL_CTX 1 142 #else 140 143 #if RWTH_SDC_CTX_SIMPL_D0032 141 144 #define SDC_NUM_RESIDUAL_CTX 8 142 145 #else 143 146 #define SDC_NUM_RESIDUAL_CTX 10 147 #endif 144 148 #endif 145 149 … … 576 580 } 577 581 }; 578 582 583 #if LGE_CONCATENATE 579 584 static const UChar INIT_SDC_RESIDUAL[3][SDC_NUM_RESIDUAL_CTX] = 580 585 { 586 { 587 155 588 }, 589 { 590 155 591 }, 592 { 593 155 594 } 595 }; 596 #else 597 static const UChar INIT_SDC_RESIDUAL[3][SDC_NUM_RESIDUAL_CTX] = 598 { 581 599 { 582 600 CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU … … 589 607 } 590 608 }; 609 #endif 591 610 592 611 static const UChar INIT_SDC_PRED_MODE[3][3*SDC_NUM_PRED_MODE_CTX] = -
branches/HTM-6.2-dev3-LG-2/source/Lib/TLibCommon/TypeDef.h
r397 r406 74 74 #define INTEL_SDC64_D0193 1 // JCT3V-D0193: SDC binary clean up (use a 1 bit binary code to signal sdc_pred_mode when CU size is 64x64) 75 75 #define RWTH_SDC_CTX_SIMPL_D0032 1 // JCT3V-D0032: CABAC Context Reduction for Simplified Depth Coding 76 #define LGE_CONCATENATE 1 // JCT3V-D0141: concatenate binarization for residual index coding 76 77 #endif 77 78 #define FIX_SDC_ENC_RD_WVSO_D0163 1 // JCT3V-D0163: fix for SDC encoder rd-cost (VSO -> WVSO) -
branches/HTM-6.2-dev3-LG-2/source/Lib/TLibDecoder/TDecSbac.cpp
r397 r406 41 41 #define GetNumDepthValues() (pcCU->getSlice()->getSPS()->getNumDepthValues()) 42 42 #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 43 47 #endif 44 48 … … 2673 2677 2674 2678 // 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 2675 2703 for (Int i=0; i<uiMaxResidualBits; i++) 2676 2704 { … … 2682 2710 uiAbsIdx |= uiBit << i; 2683 2711 } 2712 #endif 2684 2713 2685 2714 uiAbsIdx += 1; -
branches/HTM-6.2-dev3-LG-2/source/Lib/TLibEncoder/TEncSbac.cpp
r397 r406 45 45 #define GetNumDepthValues() (pcCU->getSlice()->getSPS()->getNumDepthValues()) 46 46 #define GetBitsPerDepthValue() (pcCU->getSlice()->getSPS()->getBitsPerDepthValue()) 47 #if LGE_CONCATENATE 48 #define PrefixThreshold ( ((GetNumDepthValues() * 3) >> 2) ) 49 #define BitsPerSuffix ( (UInt)ceil( Log2(GetNumDepthValues() - PrefixThreshold) ) ) 50 #endif 47 51 #endif 48 52 … … 2649 2653 UInt uiSign = segmentDCOffset < 0 ? 1 : 0; 2650 2654 UInt uiAbsIdx = abs(segmentDCOffset); 2655 #if !LGE_CONCATENATE 2651 2656 UInt uiBit = 0; 2657 #endif 2652 2658 2653 2659 UInt uiMaxResidualBits = GetBitsPerDepthValue(); … … 2674 2680 // encode residual magnitude 2675 2681 uiAbsIdx -= 1; 2682 #if LGE_CONCATENATE 2683 //prefix part 2684 if ( uiAbsIdx == 0 ) 2685 m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) ); 2686 else 2687 { 2688 UInt l = uiAbsIdx; 2689 UInt k = 0; 2690 while ( l > 0 && k < PrefixThreshold ) 2691 { 2692 m_pcBinIf->encodeBin( 1, m_cSDCResidualSCModel.get(0, 0, 0) ); 2693 l--; 2694 k++; 2695 } 2696 if ( uiAbsIdx < PrefixThreshold ) 2697 m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) ); 2698 //suffix part 2699 else 2700 { 2701 uiAbsIdx -= PrefixThreshold; 2702 UInt uiSuffixLength = BitsPerSuffix; 2703 UInt uiBitInfo = 0; 2704 for ( Int i = 0; i < uiSuffixLength; i++) 2705 { 2706 uiBitInfo = ( uiAbsIdx & ( 1 << i ) ) >> i; 2707 m_pcBinIf->encodeBinEP( uiBitInfo); 2708 } 2709 } 2710 } 2711 #else 2676 2712 for (Int i=0; i<uiMaxResidualBits; i++) 2677 2713 { … … 2684 2720 #endif 2685 2721 } 2722 #endif 2686 2723 2687 2724 }
Note: See TracChangeset for help on using the changeset viewer.