Changeset 1346 in SHVCSoftware
- Timestamp:
- 22 Jul 2015, 03:03:33 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp
r1342 r1346 946 946 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 947 947 948 // TODO: this does not account for the slice bytes already written. See other instances of FIXED_NUMBER_OF_BYTES 949 Bool isEndOfSlice = rpcBestCU->getSlice()->getSliceMode()==FIXED_NUMBER_OF_BYTES 950 && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceArgument()<<3); 951 Bool isEndOfSliceSegment = rpcBestCU->getSlice()->getSliceSegmentMode()==FIXED_NUMBER_OF_BYTES 952 && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceSegmentArgument()<<3); 948 // If the configuration being tested exceeds the maximum number of bytes for a slice / slice-segment, then 949 // a proper RD evaluation cannot be performed. Therefore, termination of the 950 // slice/slice-segment must be made prior to this CTU. 951 // This can be achieved by forcing the decision to be that of the rpcTempCU. 952 // The exception is each slice / slice-segment must have at least one CTU. 953 const Bool isEndOfSlice = pcSlice->getSliceMode()==FIXED_NUMBER_OF_BYTES 954 && ((pcSlice->getSliceBits()+rpcBestCU->getTotalBits())>pcSlice->getSliceArgument()<<3) 955 && rpcBestCU->getCtuRsAddr() != pcPic->getPicSym()->getCtuTsToRsAddrMap(pcSlice->getSliceCurStartCtuTsAddr()) 956 && rpcBestCU->getCtuRsAddr() != pcPic->getPicSym()->getCtuTsToRsAddrMap(pcSlice->getSliceSegmentCurStartCtuTsAddr()); 957 const Bool isEndOfSliceSegment = pcSlice->getSliceSegmentMode()==FIXED_NUMBER_OF_BYTES 958 && ((pcSlice->getSliceSegmentBits()+rpcBestCU->getTotalBits()) > pcSlice->getSliceSegmentArgument()<<3) 959 && rpcBestCU->getCtuRsAddr() != pcPic->getPicSym()->getCtuTsToRsAddrMap(pcSlice->getSliceSegmentCurStartCtuTsAddr()); 960 // Do not need to check slice condition for slice-segment since a slice-segment is a subset of a slice. 953 961 if(isEndOfSlice||isEndOfSliceSegment) 954 962 { 955 if (m_pcEncCfg->getCostMode()==COST_MIXED_LOSSLESS_LOSSY_CODING) 956 { 957 rpcBestCU->getTotalCost()=rpcTempCU->getTotalCost() + (1.0 / m_pcRdCost->getLambda()); 958 } 959 else 960 { 961 rpcBestCU->getTotalCost()=rpcTempCU->getTotalCost()+1; 962 } 963 rpcBestCU->getTotalCost()=MAX_DOUBLE; 963 964 } 964 965
Note: See TracChangeset for help on using the changeset viewer.