Ticket #30: rm_useless_ctx_copy.patch
File rm_useless_ctx_copy.patch, 3.9 KB (added by tpoirier, 8 years ago) |
---|
-
Lib/TLibCommon/TypeDef.h
47 47 //! \ingroup TLibCommon 48 48 //! \{ 49 49 50 #define RM_USELESS_CTX_COPY 1 51 50 52 /////////////////////////////////////////////////////////// 51 53 // KTA tools section start 52 54 /////////////////////////////////////////////////////////// -
Lib/TLibEncoder/TEncCu.cpp
2312 2312 } 2313 2313 } 2314 2314 #endif 2315 #if !RM_USELESS_CTX_COPY 2315 2316 m_pcRDGoOnSbacCoder->store(m_ppppcRDSbacCoder[uiWidthIdx][uiHeightIdx][CI_TEMP_BEST]); 2317 #endif 2316 2318 2317 2319 if (rpcBestCU->getTotalCost()!=MAX_DOUBLE) 2318 2320 { … … 2468 2470 } 2469 2471 } 2470 2472 #endif 2473 #if !RM_USELESS_CTX_COPY 2471 2474 m_pcRDGoOnSbacCoder->store(m_ppppcRDSbacCoder[uiWidthIdx][uiHeightIdx][CI_TEMP_BEST]); 2475 #endif 2472 2476 2473 2477 if (rpcBestCU->getTotalCost()!=MAX_DOUBLE) 2474 2478 { … … 2742 2746 } 2743 2747 } 2744 2748 2749 #if !RM_USELESS_CTX_COPY 2745 2750 #if JVET_C0024_QTBT 2746 2751 m_pcRDGoOnSbacCoder->store(m_ppppcRDSbacCoder[uiWidthIdx][uiHeightIdx][CI_TEMP_BEST]); 2747 2752 #else 2748 2753 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 2749 2754 #endif 2755 #endif 2750 2756 2751 2757 // If the configuration being tested exceeds the maximum number of bytes for a slice / slice-segment, then 2752 2758 // a proper RD evaluation cannot be performed. Therefore, termination of the … … 4375 4381 setCodeChromaQpAdjFlag( codeChromaQpAdjFlag ); 4376 4382 setdQPFlag( bCodeDQP ); 4377 4383 4384 #if !RM_USELESS_CTX_COPY 4378 4385 #if JVET_C0024_QTBT 4379 4386 m_pcRDGoOnSbacCoder->store(m_ppppcRDSbacCoder[uiWIdx][uiHIdx][CI_TEMP_BEST]); 4380 4387 #else 4381 4388 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 4382 4389 #endif 4390 #endif 4383 4391 4384 4392 rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits(); 4385 4393 rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); … … 4479 4487 #endif 4480 4488 m_pcEntropyCoder->encodeIPCMInfo ( rpcTempCU, 0, true ); 4481 4489 4490 #if !RM_USELESS_CTX_COPY 4482 4491 #if JVET_C0024_QTBT 4483 4492 m_pcRDGoOnSbacCoder->store(m_ppppcRDSbacCoder[uiWIdx][uiHIdx][CI_TEMP_BEST]); 4484 4493 #else 4485 4494 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 4486 4495 #endif 4496 #endif 4487 4497 4488 4498 rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits(); 4489 4499 rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); … … 4547 4557 pcCU = NULL; 4548 4558 4549 4559 // store temp best CI for next CU coding 4560 #if RM_USELESS_CTX_COPY 4550 4561 #if JVET_C0024_QTBT 4562 m_pcRDGoOnSbacCoder->store(m_ppppcRDSbacCoder[uiWIdx][uiHIdx][CI_NEXT_BEST]); 4563 #else 4564 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]); 4565 #endif 4566 #else 4567 #if JVET_C0024_QTBT 4551 4568 m_ppppcRDSbacCoder[uiWIdx][uiHIdx][CI_TEMP_BEST]->store(m_ppppcRDSbacCoder[uiWIdx][uiHIdx][CI_NEXT_BEST]); 4552 4569 #else 4553 4570 m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]->store(m_pppcRDSbacCoder[uiDepth][CI_NEXT_BEST]); 4554 4571 #endif 4572 #endif 4555 4573 4556 4574 4557 4575 #if DEBUG_STRING -
Lib/TLibEncoder/TEncSearch.cpp
8128 8128 pcCU->getTotalDistortion() = distortion; 8129 8129 pcCU->getTotalCost() = m_pcRdCost->calcRdCost( uiBits, distortion ); 8130 8130 8131 #if !RM_USELESS_CTX_COPY 8131 8132 #if JVET_C0024_QTBT 8132 8133 m_pcRDGoOnSbacCoder->store(m_ppppcRDSbacCoder[uiWIdx][uiHIdx][CI_TEMP_BEST]); 8133 8134 #else 8134 8135 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[pcCU->getDepth(0)][CI_TEMP_BEST]); 8135 8136 #endif 8137 #endif 8136 8138 8137 8139 #if DEBUG_STRING 8138 8140 pcYuvResiBest->clear(); // Clear the residual image, if we didn't code it.