Ticket #555: bug_fix_rdoq_rem.patch
File bug_fix_rdoq_rem.patch, 3.2 KB (added by wchien, 12 years ago) |
---|
-
Lib/TLibCommon/TComRom.cpp
494 494 }; 495 495 #endif 496 496 497 #if !FIX_COEF_REMAIN_BINARNIZATION 497 498 // Rice parameters for absolute transform levels 498 499 const UInt g_auiGoRiceRange[5] = 499 500 { … … 504 505 { 505 506 8, 7, 6, 5, 4 506 507 }; 508 #endif 507 509 508 510 #if !SIMPLE_PARAM_UPDATE 509 511 const UInt g_aauiGoRiceUpdate[5][24] = -
Lib/TLibCommon/TComRom.h
137 137 extern const UInt g_uiLastCtx[ 28 ]; 138 138 #endif 139 139 140 #if !FIX_COEF_REMAIN_BINARNIZATION 140 141 extern const UInt g_auiGoRiceRange[5]; //!< maximum value coded with Rice codes 141 142 extern const UInt g_auiGoRicePrefixLen[5]; //!< prefix length for each maximum value 143 #endif 142 144 #if !SIMPLE_PARAM_UPDATE 143 145 extern const UInt g_aauiGoRiceUpdate[5][24]; //!< parameter update rules for Rice codes 144 146 #endif -
Lib/TLibCommon/TComTrQuant.cpp
2623 2623 2624 2624 if ( uiAbsLevel >= baseLevel ) 2625 2625 { 2626 #if FIX_COEF_REMAIN_BINARNIZATION 2627 UInt symbol = uiAbsLevel - baseLevel; 2628 UInt length; 2629 if (symbol < (8 << ui16AbsGoRice)) 2630 { 2631 length = symbol>>ui16AbsGoRice; 2632 iRate += (length+1+ui16AbsGoRice)<< 15; 2633 } 2634 else 2635 { 2636 length = ui16AbsGoRice; 2637 symbol = symbol - ( 8 << ui16AbsGoRice); 2638 while (symbol >= (1<<length)) 2639 { 2640 symbol -= (1<<(length++)); 2641 } 2642 iRate += (8+length+1-ui16AbsGoRice+length)<< 15; 2643 } 2644 #else 2626 2645 UInt uiSymbol = uiAbsLevel - baseLevel; 2627 2646 UInt uiMaxVlc = g_auiGoRiceRange[ ui16AbsGoRice ]; 2628 2647 Bool bExpGolomb = ( uiSymbol > uiMaxVlc ); … … 2639 2658 UShort ui16NumBins = min<UInt>( ui16PrefLen, g_auiGoRicePrefixLen[ ui16AbsGoRice ] ) + ui16AbsGoRice; 2640 2659 2641 2660 iRate += ui16NumBins << 15; 2661 #endif 2642 2662 2643 2663 if (c1Idx < C1FLAG_NUMBER) 2644 2664 { -
Lib/TLibCommon/TypeDef.h
40 40 41 41 //! \ingroup TLibCommon 42 42 //! \{ 43 #define FIX_COEF_REMAIN_BINARNIZATION 1 43 44 #define REMOVE_LASTTU_CBFDERIV 1 ///< I0152: CBF coding for last TU without derivation process 44 45 45 46 #define INTRAMODE_BYPASSGROUP 1 ///< I0302: group coding of Intra_NxN -
Lib/TLibDecoder/TDecSbac.cpp
344 344 m_pcTDecBinIf->decodeBinEP( codeWord ); 345 345 } 346 346 while( codeWord); 347 #if FIX_COEF_REMAIN_BINARNIZATION 348 prefix--; 349 #else 347 350 codeWord = 1 - codeWord; 348 351 prefix -= codeWord; 349 352 codeWord=0; 353 #endif 350 354 if (prefix < 8 ) 351 355 { 352 356 m_pcTDecBinIf->decodeBinsEP(codeWord,rParam);