Ticket #645: RPS_COUNTER_BUGFIX_r2613.patch
File RPS_COUNTER_BUGFIX_r2613.patch, 4.1 KB (added by adarsh, 11 years ago) |
---|
-
App/TAppDecoder/TAppDecTop.cpp
197 197 #if RPS_COUNTER 198 198 printf("\nRPS related bits in SPS: %d\n", m_cTDecTop.getSPS()->getBitsForSPS()); 199 199 printf("RPS related bits in PPS: %d\n", m_cTDecTop.getPPS()->getBitsForPPS()); 200 #if RPS_COUNTER_BUGFIX 201 int shbits = (m_cTDecTop.getPPS()->getBitsForSliceHeader()+2); //The first intra costs 2 bits. 202 #else 200 203 int shbits = (m_cTDecTop.getPPS()->getBitsForSliceHeader()+2)/2; //All slice headers except for the first intra picture are counted twice. The first intra costs 2 bits. 204 #endif 201 205 printf("RPS related bits in slice headers: %d\n", shbits); 202 206 printf("RPS related bits in total: %d\n\n",m_cTDecTop.getPPS()->getBitsForPPS()+m_cTDecTop.getSPS()->getBitsForSPS()+shbits); 203 207 #endif -
Lib/TLibCommon/TComSlice.h
301 301 UInt m_tilesOrEntropyCodingSyncIdc; 302 302 Int m_numSubstreams; 303 303 #endif 304 #if RPS_COUNTER_BUGFIX 305 Bool m_firstRunFlag; 306 #endif 304 307 305 308 public: 306 309 TComSPS(); 307 310 virtual ~TComSPS(); 308 311 #if RPS_COUNTER_BUGFIX 312 Void setFirstRunFlag(Bool x) { m_firstRunFlag = x;} 313 Bool getFirstRunFlag() { return m_firstRunFlag;} 314 Void flipFirstRunFlag() { m_firstRunFlag = !m_firstRunFlag;} 315 #endif 309 316 Int getSPSId () { return m_SPSId; } 310 317 Void setSPSId (Int i) { m_SPSId = i; } 311 318 Int getProfileIdc () { return m_ProfileIdc; } -
Lib/TLibCommon/TypeDef.h
40 40 41 41 //! \ingroup TLibCommon 42 42 //! \{ 43 43 #define RPS_COUNTER_BUGFIX 1 ///< To fix the bug in bit count of RPS-related parameters in the slice header 44 44 #define REMOVE_TILE_MARKERS 1 45 45 #define EXPLICITLY_SIGNAL_ENTRY_POINTS 1 ///< I0273: Explicitly signal all tiles/wavefront entry points 46 46 -
Lib/TLibDecoder/TDecCAVLC.cpp
1737 1737 #endif 1738 1738 } 1739 1739 #if RPS_COUNTER 1740 #if RPS_COUNTER_BUGFIX 1741 rpcSlice->getPPS()->setBitsForSliceHeader( (rpcSlice->getPPS()->getBitsForSliceHeader()+bitsBefore-m_pcBitstream->getNumBitsLeft()) * rpcSlice->getSPS()->getFirstRunFlag() ); 1742 #else 1740 1743 rpcSlice->getPPS()->setBitsForSliceHeader(rpcSlice->getPPS()->getBitsForSliceHeader()+bitsBefore-m_pcBitstream->getNumBitsLeft()); 1741 1744 #endif 1745 #endif 1742 1746 #if DBL_HL_SYNTAX 1743 1747 if(sps->getUseSAO() || sps->getUseALF()) 1744 1748 #else … … 1913 1917 refPicListModification->setRefPicListModificationFlagL1(0); 1914 1918 } 1915 1919 #if RPS_COUNTER 1920 #if RPS_COUNTER_BUGFIX 1921 rpcSlice->getPPS()->setBitsForSliceHeader( (rpcSlice->getPPS()->getBitsForSliceHeader()+bitsBefore-m_pcBitstream->getNumBitsLeft()) * rpcSlice->getSPS()->getFirstRunFlag() ); 1922 #else 1916 1923 rpcSlice->getPPS()->setBitsForSliceHeader(rpcSlice->getPPS()->getBitsForSliceHeader()+bitsBefore-m_pcBitstream->getNumBitsLeft()); 1917 1924 #endif 1925 #endif 1918 1926 } 1919 1927 else 1920 1928 { -
Lib/TLibDecoder/TDecTop.cpp
324 324 { 325 325 m_apcSlicePilot->copySliceInfo( pcPic->getPicSym()->getSlice(m_uiSliceIdx-1) ); 326 326 } 327 327 #if RPS_COUNTER_BUGFIX 328 if(m_apcSlicePilot->getSliceCurStartCUAddr() == 0) 329 { 330 m_apcSlicePilot->getSPS()->flipFirstRunFlag(); 331 } 332 else 333 { 334 m_apcSlicePilot->getSPS()->setFirstRunFlag(1); 335 } 336 #endif 328 337 m_apcSlicePilot->setNalUnitType(nalu.m_nalUnitType); 329 338 m_apcSlicePilot->setReferenced(nalu.m_nalRefFlag); 330 339 m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);