Ticket #392: bugfix_for_ticket_392_v1.patch
File bugfix_for_ticket_392_v1.patch, 4.7 KB (added by shibahara, 13 years ago) |
---|
-
Lib/TLibCommon/TypeDef.h
68 68 #define CLIPSCALEDMVP 1 ///< H0216: Clipping scaled MV to 16 bit 69 69 70 70 #define UNIFIED_TRANSFORM_TREE 1 ///< H0123: unified tree structure for TU 71 #define FIX_TICKET_392 1 ///< Fix Ticket #392 (encoder decoder mismatch occures when QP_adaptation enabled) 71 72 72 73 #define SIGMAP_CTX_SUBBLOCK 1 ///< H0290: 4x4 sub-block based region for significant_flag context selection 73 74 -
Lib/TLibDecoder/TDecEntropy.cpp
593 593 const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth; 594 594 595 595 #if UNIFIED_TRANSFORM_TREE 596 #if FIX_TICKET_392 && UNIFIED_TRANSFORM_TREE 597 if(uiTrIdx==0) 598 { 599 m_bakAbsPartIdxCU = uiAbsPartIdx; 600 } 601 #endif 596 602 if( uiLog2TrafoSize == 2 ) 597 603 { 598 604 UInt partNum = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 ); … … 814 820 { 815 821 if ( bCodeDQP ) 816 822 { 823 #if FIX_TICKET_392 && UNIFIED_TRANSFORM_TREE 824 decodeQP( pcCU, m_bakAbsPartIdxCU); 825 #else 817 826 decodeQP( pcCU, uiAbsPartIdx, uiDepth); 827 #endif 818 828 bCodeDQP = false; 819 829 } 820 830 } … … 881 891 } 882 892 #endif // UNIFIED_TRANSFORM_TREE 883 893 894 #if FIX_TICKET_392 && UNIFIED_TRANSFORM_TREE 895 Void TDecEntropy::decodeQP ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 896 { 897 if ( pcCU->getSlice()->getPPS()->getUseDQP() ) 898 { 899 m_pcEntropyDecoderIf->parseDeltaQP( pcCU, uiAbsPartIdx, pcCU->getDepth( uiAbsPartIdx ) ); 900 } 901 } 902 #else 884 903 Void TDecEntropy::decodeQP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 885 904 { 886 905 if ( pcCU->getSlice()->getPPS()->getUseDQP() ) … … 888 907 m_pcEntropyDecoderIf->parseDeltaQP( pcCU, uiAbsPartIdx, uiDepth ); 889 908 } 890 909 } 910 #endif 891 911 892 912 #if !UNIFIED_TRANSFORM_TREE 893 913 Void TDecEntropy::xDecodeCoeff( TComDataCU* pcCU, UInt uiLumaOffset, UInt uiChromaOffset, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, UInt uiTrIdx, UInt uiCurrTrIdx, Bool& bCodeDQP ) -
Lib/TLibDecoder/TDecEntropy.h
166 166 TComPrediction* m_pcPrediction; 167 167 UInt m_uiBakAbsPartIdx; 168 168 UInt m_uiBakChromaOffset; 169 #if FIX_TICKET_392 && UNIFIED_TRANSFORM_TREE 170 UInt m_bakAbsPartIdxCU; 171 #endif 169 172 170 173 public: 171 174 Void init (TComPrediction* p) {m_pcPrediction = p;} … … 231 234 #if !UNIFIED_TRANSFORM_TREE 232 235 Void decodeTransformIdx ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 233 236 #endif 237 #if FIX_TICKET_392 && UNIFIED_TRANSFORM_TREE 238 Void decodeQP ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 239 #else 234 240 Void decodeQP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 241 #endif 235 242 236 243 Void readTileMarker ( UInt& uiTileIdx, UInt uiBitsUsed ) { m_pcEntropyDecoderIf->readTileMarker( uiTileIdx, uiBitsUsed ); } 237 244 Void updateContextTables ( SliceType eSliceType, Int iQp ) { m_pcEntropyDecoderIf->updateContextTables( eSliceType, iQp ); } -
Lib/TLibEncoder/TEncEntropy.cpp
947 947 UInt cbfU = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ); 948 948 UInt cbfV = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ); 949 949 950 #if FIX_TICKET_392 && UNIFIED_TRANSFORM_TREE 951 if(uiTrIdx==0) 952 { 953 m_bakAbsPartIdxCU = uiAbsPartIdx; 954 } 955 #endif 950 956 if( uiLog2TrafoSize == 2 ) 951 957 { 952 958 UInt partNum = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 ); … … 1165 1171 { 1166 1172 if ( bCodeDQP ) 1167 1173 { 1174 #if FIX_TICKET_392 && UNIFIED_TRANSFORM_TREE 1175 encodeQP( pcCU, m_bakAbsPartIdxCU ); 1176 #else 1168 1177 encodeQP( pcCU, uiAbsPartIdx ); 1178 #endif 1169 1179 bCodeDQP = false; 1170 1180 } 1171 1181 } -
Lib/TLibEncoder/TEncEntropy.h
165 165 private: 166 166 UInt m_uiBakAbsPartIdx; 167 167 UInt m_uiBakChromaOffset; 168 #if FIX_TICKET_392 && UNIFIED_TRANSFORM_TREE 169 UInt m_bakAbsPartIdxCU; 170 #endif 168 171 169 172 public: 170 173 Void setEntropyCoder ( TEncEntropyIf* e, TComSlice* pcSlice );