Changeset 213 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
- Timestamp:
- 31 Dec 2012, 18:33:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r193 r213 74 74 } 75 75 76 #if LGE_ILLUCOMP_B0045 77 Void TDecEntropy::decodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 78 { 79 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 80 81 if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth()) 82 { 83 return; 84 } 85 86 if(!pcCU->getSlice()->getApplyIC()) 87 return; 88 89 if(pcCU->isICFlagRequired(uiAbsPartIdx)) 90 m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth ); 91 } 92 #endif 76 93 /** decode merge index 77 94 * \param pcCU … … 137 154 { 138 155 m_pcEntropyDecoderIf->parsePredMode( pcCU, uiAbsPartIdx, uiDepth ); 156 157 #if RWTH_SDC_DLT_B0036 158 // if B-Slice, code SDC flag later 159 if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->isDepth() ) 160 { 161 // decode SDC flag 162 decodeSDCFlag(pcCU, uiAbsPartIdx, uiDepth); 163 } 164 #endif 139 165 } 140 166 141 167 Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 142 168 { 169 #if RWTH_SDC_DLT_B0036 170 if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx) ) 171 { 172 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 173 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 174 return; 175 } 176 #endif 177 143 178 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 179 180 #if RWTH_SDC_DLT_B0036 181 if( pcCU->getSlice()->isInterB() && pcCU->getSlice()->getSPS()->isDepth() && pcCU->isIntra(uiAbsPartIdx) ) 182 { 183 // decode SDC flag 184 decodeSDCFlag(pcCU, uiAbsPartIdx, uiDepth); 185 186 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 187 { 188 // part size is also known for SDC intra 189 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 190 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 191 } 192 } 193 #endif 144 194 } 145 195 146 196 Void TDecEntropy::decodePredInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU ) 147 197 { 198 #if RWTH_SDC_DLT_B0036 199 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 200 { 201 decodeSDCPredMode(pcCU, uiAbsPartIdx, uiDepth); 202 return; 203 } 204 #endif 205 148 206 PartSize eMode = pcCU->getPartitionSize( uiAbsPartIdx ); 149 207 … … 186 244 return; 187 245 } 246 247 #if RWTH_SDC_DLT_B0036 248 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 249 { 250 return; 251 } 252 #endif 188 253 189 254 m_pcEntropyDecoderIf->parseIPCMInfo( pcCU, uiAbsPartIdx, uiDepth ); … … 449 514 #endif 450 515 } 516 #if SHARP_INTERVIEW_DECOUPLE_B0111 517 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo, iMVPIdx); 518 #else 451 519 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo); 520 #endif 452 521 pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth); 453 522 pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth ); … … 917 986 #endif 918 987 988 #if RWTH_SDC_DLT_B0036 989 if( pcCU->getSDCAvailable(uiAbsPartIdx) && pcCU->getSDCFlag( uiAbsPartIdx ) ) 990 { 991 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 992 assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 ); 993 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 ); 994 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 995 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 996 997 decodeSDCResidualData(pcCU, uiAbsPartIdx, uiDepth); 998 return; 999 } 1000 #endif 1001 919 1002 if( pcCU->isIntra(uiAbsPartIdx) ) 920 1003 { … … 952 1035 #endif // !UNIFIED_TRANSFORM_TREE 953 1036 } 1037 1038 #if FIX_MPI_B0065 1039 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N && pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 ) 1040 { 1041 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); 1042 if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx)) 1043 { 1044 PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx); 1045 pcCU->setPartSizeSubParts( partSize, uiAbsPartIdx, uiDepth ); 1046 } 1047 else 1048 { 1049 pcCU->setPartSizeSubParts( SIZE_NxN, uiAbsPartIdx, uiDepth ); 1050 } 1051 } 1052 #endif 1053 954 1054 #if UNIFIED_TRANSFORM_TREE 955 1055 xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, 0, temp, temp1, temp2, bCodeDQP ); … … 957 1057 xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP ); 958 1058 #endif // UNIFIED_TRANSFORM_TREE 959 } 1059 1060 #if FIX_MPI_B0065 1061 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N && pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 ) 1062 { 1063 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 1064 } 1065 #endif 1066 } 1067 1068 #if RWTH_SDC_DLT_B0036 1069 Void TDecEntropy::decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1070 { 1071 assert( pcCU->getSlice()->getSPS()->isDepth() ); 1072 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 1073 1074 m_pcEntropyDecoderIf->parseSDCPredMode(pcCU, uiAbsPartIdx, uiDepth ); 1075 } 1076 1077 Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1078 { 1079 assert( pcCU->getSlice()->getSPS()->isDepth() ); 1080 1081 m_pcEntropyDecoderIf->parseSDCFlag(pcCU, uiAbsPartIdx, uiDepth ); 1082 } 1083 1084 Void TDecEntropy::decodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1085 { 1086 assert( pcCU->getSlice()->getSPS()->isDepth() ); 1087 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 1088 1089 // number of segments depends on prediction mode for INTRA 1090 UInt uiNumSegments = 2; 1091 UInt uiLumaPredMode = pcCU->getLumaIntraDir( uiAbsPartIdx ); 1092 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && (uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX) ) 1093 uiNumSegments = 1; 1094 1095 // decode residual data for each segment 1096 for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ ) 1097 m_pcEntropyDecoderIf->parseSDCResidualData(pcCU, uiAbsPartIdx, uiDepth, uiSeg); 1098 } 1099 #endif 960 1100 961 1101 //! \}
Note: See TracChangeset for help on using the changeset viewer.