| 1 | |
|---|
| 2 | |
|---|
| 3 | /** \file TDecCu.cpp |
|---|
| 4 | \brief CU decoder class |
|---|
| 5 | */ |
|---|
| 6 | |
|---|
| 7 | #include "TDecCu.h" |
|---|
| 8 | |
|---|
| 9 | // ==================================================================================================================== |
|---|
| 10 | // Constructor / destructor / create / destroy |
|---|
| 11 | // ==================================================================================================================== |
|---|
| 12 | |
|---|
| 13 | TDecCu::TDecCu() |
|---|
| 14 | { |
|---|
| 15 | m_ppcYuvResi = NULL; |
|---|
| 16 | m_ppcYuvReco = NULL; |
|---|
| 17 | m_ppcYuvResPred = NULL; |
|---|
| 18 | m_ppcCU = NULL; |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | TDecCu::~TDecCu() |
|---|
| 22 | { |
|---|
| 23 | } |
|---|
| 24 | |
|---|
| 25 | Void TDecCu::init( TDecEntropy* pcEntropyDecoder, TComTrQuant* pcTrQuant, TComPrediction* pcPrediction) |
|---|
| 26 | { |
|---|
| 27 | m_pcEntropyDecoder = pcEntropyDecoder; |
|---|
| 28 | m_pcTrQuant = pcTrQuant; |
|---|
| 29 | m_pcPrediction = pcPrediction; |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | /** |
|---|
| 33 | \param uiMaxDepth total number of allowable depth |
|---|
| 34 | \param uiMaxWidth largest CU width |
|---|
| 35 | \param uiMaxHeight largest CU height |
|---|
| 36 | */ |
|---|
| 37 | Void TDecCu::create( UInt uiMaxDepth, UInt uiMaxWidth, UInt uiMaxHeight ) |
|---|
| 38 | { |
|---|
| 39 | m_uiMaxDepth = uiMaxDepth+1; |
|---|
| 40 | |
|---|
| 41 | m_ppcYuvResi = new TComYuv* [m_uiMaxDepth-1]; |
|---|
| 42 | m_ppcYuvReco = new TComYuv* [m_uiMaxDepth-1]; |
|---|
| 43 | m_ppcYuvResPred = new TComYuv* [m_uiMaxDepth-1]; |
|---|
| 44 | m_ppcCU = new TComDataCU* [m_uiMaxDepth-1]; |
|---|
| 45 | |
|---|
| 46 | UInt uiNumPartitions; |
|---|
| 47 | for ( UInt ui = 0; ui < m_uiMaxDepth-1; ui++ ) |
|---|
| 48 | { |
|---|
| 49 | uiNumPartitions = 1<<( ( m_uiMaxDepth - ui - 1 )<<1 ); |
|---|
| 50 | UInt uiWidth = uiMaxWidth >> ui; |
|---|
| 51 | UInt uiHeight = uiMaxHeight >> ui; |
|---|
| 52 | |
|---|
| 53 | m_ppcYuvResi [ui] = new TComYuv; m_ppcYuvResi [ui]->create( uiWidth, uiHeight ); |
|---|
| 54 | m_ppcYuvReco [ui] = new TComYuv; m_ppcYuvReco [ui]->create( uiWidth, uiHeight ); |
|---|
| 55 | m_ppcYuvResPred[ui] = new TComYuv; m_ppcYuvResPred[ui]->create( uiWidth, uiHeight ); |
|---|
| 56 | m_ppcCU [ui] = new TComDataCU; m_ppcCU [ui]->create( uiNumPartitions, uiWidth, uiHeight, true ); |
|---|
| 57 | } |
|---|
| 58 | |
|---|
| 59 | // initialize partition order. |
|---|
| 60 | UInt* piTmp = &g_auiZscanToRaster[0]; |
|---|
| 61 | initZscanToRaster(m_uiMaxDepth, 1, 0, piTmp); |
|---|
| 62 | initRasterToZscan( uiMaxWidth, uiMaxHeight, m_uiMaxDepth ); |
|---|
| 63 | |
|---|
| 64 | // initialize conversion matrix from partition index to pel |
|---|
| 65 | initRasterToPelXY( uiMaxWidth, uiMaxHeight, m_uiMaxDepth ); |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | Void TDecCu::destroy() |
|---|
| 69 | { |
|---|
| 70 | for ( UInt ui = 0; ui < m_uiMaxDepth-1; ui++ ) |
|---|
| 71 | { |
|---|
| 72 | m_ppcYuvResi [ui]->destroy(); delete m_ppcYuvResi [ui]; m_ppcYuvResi [ui] = NULL; |
|---|
| 73 | m_ppcYuvReco [ui]->destroy(); delete m_ppcYuvReco [ui]; m_ppcYuvReco [ui] = NULL; |
|---|
| 74 | m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL; |
|---|
| 75 | m_ppcCU [ui]->destroy(); delete m_ppcCU [ui]; m_ppcCU [ui] = NULL; |
|---|
| 76 | } |
|---|
| 77 | |
|---|
| 78 | delete [] m_ppcYuvResi; m_ppcYuvResi = NULL; |
|---|
| 79 | delete [] m_ppcYuvReco; m_ppcYuvReco = NULL; |
|---|
| 80 | delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL; |
|---|
| 81 | delete [] m_ppcCU; m_ppcCU = NULL; |
|---|
| 82 | } |
|---|
| 83 | |
|---|
| 84 | // ==================================================================================================================== |
|---|
| 85 | // Public member functions |
|---|
| 86 | // ==================================================================================================================== |
|---|
| 87 | |
|---|
| 88 | /** \param pcCU pointer of CU data |
|---|
| 89 | \param ruiIsLast last data? |
|---|
| 90 | */ |
|---|
| 91 | Void TDecCu::decodeCU( TComDataCU* pcCU, UInt& ruiIsLast ) |
|---|
| 92 | { |
|---|
| 93 | #if SNY_DQP |
|---|
| 94 | if ( pcCU->getSlice()->getSPS()->getUseDQP() ) |
|---|
| 95 | { |
|---|
| 96 | pcCU->setdQPFlag(true); |
|---|
| 97 | } |
|---|
| 98 | #endif//SNY_DQP |
|---|
| 99 | // start from the top level CU |
|---|
| 100 | xDecodeCU( pcCU, 0, 0 ); |
|---|
| 101 | |
|---|
| 102 | #if SNY_DQP |
|---|
| 103 | // dQP: only for LCU |
|---|
| 104 | if ( pcCU->getSlice()->getSPS()->getUseDQP() ) |
|---|
| 105 | { |
|---|
| 106 | if ( pcCU->isSkipped( 0 ) && pcCU->getDepth( 0 ) == 0 ) |
|---|
| 107 | { |
|---|
| 108 | } |
|---|
| 109 | else if ( pcCU->getdQPFlag())// non-skip |
|---|
| 110 | { |
|---|
| 111 | m_pcEntropyDecoder->decodeQP( pcCU, 0, 0 ); |
|---|
| 112 | pcCU->setdQPFlag(false); |
|---|
| 113 | } |
|---|
| 114 | } |
|---|
| 115 | #else |
|---|
| 116 | // dQP: only for LCU |
|---|
| 117 | if ( pcCU->getSlice()->getSPS()->getUseDQP() ) |
|---|
| 118 | { |
|---|
| 119 | if ( pcCU->isSkipped( 0 ) && pcCU->getDepth( 0 ) == 0 ) |
|---|
| 120 | { |
|---|
| 121 | } |
|---|
| 122 | else |
|---|
| 123 | { |
|---|
| 124 | m_pcEntropyDecoder->decodeQP( pcCU, 0, 0 ); |
|---|
| 125 | } |
|---|
| 126 | } |
|---|
| 127 | #endif//SNY_DQP |
|---|
| 128 | |
|---|
| 129 | //--- Read terminating bit --- |
|---|
| 130 | m_pcEntropyDecoder->decodeTerminatingBit( ruiIsLast ); |
|---|
| 131 | } |
|---|
| 132 | |
|---|
| 133 | /** \param pcCU pointer of CU data |
|---|
| 134 | */ |
|---|
| 135 | Void TDecCu::decompressCU( TComDataCU* pcCU ) |
|---|
| 136 | { |
|---|
| 137 | xDecompressCU( pcCU, pcCU, 0, 0 ); |
|---|
| 138 | } |
|---|
| 139 | |
|---|
| 140 | // ==================================================================================================================== |
|---|
| 141 | // Protected member functions |
|---|
| 142 | // ==================================================================================================================== |
|---|
| 143 | |
|---|
| 144 | /** decode CU block recursively |
|---|
| 145 | * \param pcCU |
|---|
| 146 | * \param uiAbsPartIdx |
|---|
| 147 | * \param uiDepth |
|---|
| 148 | * \returns Void |
|---|
| 149 | */ |
|---|
| 150 | Void TDecCu::xDecodeCU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) |
|---|
| 151 | { |
|---|
| 152 | TComPic* pcPic = pcCU->getPic(); |
|---|
| 153 | UInt uiCurNumParts = pcPic->getNumPartInCU() >> (uiDepth<<1); |
|---|
| 154 | UInt uiQNumParts = uiCurNumParts>>2; |
|---|
| 155 | |
|---|
| 156 | Bool bBoundary = false; |
|---|
| 157 | UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ]; |
|---|
| 158 | UInt uiRPelX = uiLPelX + (g_uiMaxCUWidth>>uiDepth) - 1; |
|---|
| 159 | UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; |
|---|
| 160 | UInt uiBPelY = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1; |
|---|
| 161 | |
|---|
| 162 | #if MW_MVI_SIGNALLING_MODE == 0 |
|---|
| 163 | if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE ) |
|---|
| 164 | { |
|---|
| 165 | m_pcEntropyDecoder->decodeMvInheritanceFlag( pcCU, uiAbsPartIdx, uiDepth ); |
|---|
| 166 | |
|---|
| 167 | if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) |
|---|
| 168 | { |
|---|
| 169 | assert( pcCU->getZorderIdxInCU() == 0 ); |
|---|
| 170 | TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); |
|---|
| 171 | pcCU->copyTextureMotionDataFrom( pcTextureCU, uiDepth, pcCU->getZorderIdxInCU() + uiAbsPartIdx, uiAbsPartIdx ); |
|---|
| 172 | |
|---|
| 173 | UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); |
|---|
| 174 | for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) |
|---|
| 175 | { |
|---|
| 176 | const UChar uhNewDepth = max( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) ); |
|---|
| 177 | if( pcCU->getPredictionMode( uiAbsPartIdx + ui ) == MODE_SKIP ) |
|---|
| 178 | pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_INTER ); |
|---|
| 179 | assert( pcCU->getPredictionMode( uiAbsPartIdx + ui ) == MODE_INTER ); |
|---|
| 180 | pcCU->setPartitionSize( uiAbsPartIdx + ui, SIZE_NxN ); |
|---|
| 181 | pcCU->setDepth( uiAbsPartIdx + ui, uhNewDepth ); |
|---|
| 182 | pcCU->setWidth( uiAbsPartIdx + ui, g_uiMaxCUWidth>>uhNewDepth ); |
|---|
| 183 | pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth ); |
|---|
| 184 | } |
|---|
| 185 | } |
|---|
| 186 | } |
|---|
| 187 | #endif |
|---|
| 188 | |
|---|
| 189 | if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) ) |
|---|
| 190 | { |
|---|
| 191 | if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) ) |
|---|
| 192 | m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); |
|---|
| 193 | } |
|---|
| 194 | else |
|---|
| 195 | { |
|---|
| 196 | bBoundary = true; |
|---|
| 197 | } |
|---|
| 198 | |
|---|
| 199 | if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary ) |
|---|
| 200 | { |
|---|
| 201 | UInt uiIdx = uiAbsPartIdx; |
|---|
| 202 | for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ ) |
|---|
| 203 | { |
|---|
| 204 | uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiIdx] ]; |
|---|
| 205 | uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ]; |
|---|
| 206 | |
|---|
| 207 | if( ( uiLPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getHeight() ) ) |
|---|
| 208 | xDecodeCU( pcCU, uiIdx, uiDepth+1 ); |
|---|
| 209 | |
|---|
| 210 | uiIdx += uiQNumParts; |
|---|
| 211 | } |
|---|
| 212 | |
|---|
| 213 | return; |
|---|
| 214 | } |
|---|
| 215 | |
|---|
| 216 | #if TSB_ALF_HEADER |
|---|
| 217 | #else |
|---|
| 218 | m_pcEntropyDecoder->decodeAlfCtrlFlag( pcCU, uiAbsPartIdx, uiDepth ); |
|---|
| 219 | #endif |
|---|
| 220 | |
|---|
| 221 | // decode CU mode and the partition size |
|---|
| 222 | if( !pcCU->getSlice()->isIntra() && pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) |
|---|
| 223 | { |
|---|
| 224 | m_pcEntropyDecoder->decodeSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); |
|---|
| 225 | } |
|---|
| 226 | |
|---|
| 227 | |
|---|
| 228 | if( pcCU->isSkipped(uiAbsPartIdx) ) |
|---|
| 229 | { |
|---|
| 230 | #if HHI_MRG_SKIP |
|---|
| 231 | m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); |
|---|
| 232 | m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); |
|---|
| 233 | TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists |
|---|
| 234 | UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; |
|---|
| 235 | UInt uiNeighbourCandIdx[MRG_MAX_NUM_CANDS]; //MVs with same idx => same cand |
|---|
| 236 | for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ++ui ) |
|---|
| 237 | { |
|---|
| 238 | uhInterDirNeighbours[ui] = 0; |
|---|
| 239 | uiNeighbourCandIdx[ui] = 0; |
|---|
| 240 | } |
|---|
| 241 | m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, uiNeighbourCandIdx ); |
|---|
| 242 | for(UInt uiIter = 0; uiIter < MRG_MAX_NUM_CANDS; uiIter++ ) |
|---|
| 243 | { |
|---|
| 244 | pcCU->setNeighbourCandIdxSubParts( uiIter, uiNeighbourCandIdx[uiIter], uiAbsPartIdx, 0, uiDepth ); |
|---|
| 245 | } |
|---|
| 246 | m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, SIZE_2Nx2N, uhInterDirNeighbours, cMvFieldNeighbours, uiDepth ); |
|---|
| 247 | #else |
|---|
| 248 | pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_0, uiAbsPartIdx, 0, uiDepth); |
|---|
| 249 | pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_0, uiAbsPartIdx, 0, uiDepth); |
|---|
| 250 | |
|---|
| 251 | pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_1, uiAbsPartIdx, 0, uiDepth); |
|---|
| 252 | pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_1, uiAbsPartIdx, 0, uiDepth); |
|---|
| 253 | |
|---|
| 254 | if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_0 ) > 0 ) //if ( ref. frame list0 has at least 1 entry ) |
|---|
| 255 | { |
|---|
| 256 | m_pcEntropyDecoder->decodeMVPIdx( pcCU, uiAbsPartIdx, uiDepth, REF_PIC_LIST_0, m_ppcCU[uiDepth]); |
|---|
| 257 | } |
|---|
| 258 | |
|---|
| 259 | if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_1 ) > 0 ) //if ( ref. frame list1 has at least 1 entry ) |
|---|
| 260 | { |
|---|
| 261 | m_pcEntropyDecoder->decodeMVPIdx( pcCU, uiAbsPartIdx, uiDepth, REF_PIC_LIST_1, m_ppcCU[uiDepth]); |
|---|
| 262 | } |
|---|
| 263 | #endif |
|---|
| 264 | #if MW_MVI_SIGNALLING_MODE == 1 |
|---|
| 265 | if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) |
|---|
| 266 | { |
|---|
| 267 | TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); |
|---|
| 268 | pcCU->copyTextureMotionDataFrom( pcTextureCU, uiDepth, pcCU->getZorderIdxInCU() + uiAbsPartIdx, uiAbsPartIdx ); |
|---|
| 269 | |
|---|
| 270 | UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); |
|---|
| 271 | for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) |
|---|
| 272 | { |
|---|
| 273 | const UChar uhNewDepth = max( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) ); |
|---|
| 274 | pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_SKIP ); |
|---|
| 275 | pcCU->setPartitionSize( uiAbsPartIdx + ui, SIZE_2Nx2N ); |
|---|
| 276 | pcCU->setDepth( uiAbsPartIdx + ui, uhNewDepth ); |
|---|
| 277 | pcCU->setWidth( uiAbsPartIdx + ui, g_uiMaxCUWidth>>uhNewDepth ); |
|---|
| 278 | pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth ); |
|---|
| 279 | } |
|---|
| 280 | } |
|---|
| 281 | #endif |
|---|
| 282 | |
|---|
| 283 | m_pcEntropyDecoder->decodeResPredFlag( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 ); |
|---|
| 284 | return; |
|---|
| 285 | } |
|---|
| 286 | |
|---|
| 287 | if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) |
|---|
| 288 | { |
|---|
| 289 | m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); |
|---|
| 290 | |
|---|
| 291 | m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth ); |
|---|
| 292 | |
|---|
| 293 | // prediction mode ( Intra : direction mode, Inter : Mv, reference idx ) |
|---|
| 294 | m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); |
|---|
| 295 | |
|---|
| 296 | if( !pcCU->isIntra( uiAbsPartIdx ) ) |
|---|
| 297 | { |
|---|
| 298 | m_ppcCU[uiDepth] ->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); |
|---|
| 299 | m_ppcCU[uiDepth] ->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); |
|---|
| 300 | m_pcEntropyDecoder->decodeResPredFlag ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 ); |
|---|
| 301 | } |
|---|
| 302 | |
|---|
| 303 | #if MW_MVI_SIGNALLING_MODE == 1 |
|---|
| 304 | if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) |
|---|
| 305 | { |
|---|
| 306 | assert( pcCU->getZorderIdxInCU() == 0 ); |
|---|
| 307 | TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); |
|---|
| 308 | pcCU->copyTextureMotionDataFrom( pcTextureCU, uiDepth, pcCU->getZorderIdxInCU() + uiAbsPartIdx, uiAbsPartIdx ); |
|---|
| 309 | |
|---|
| 310 | UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); |
|---|
| 311 | for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) |
|---|
| 312 | { |
|---|
| 313 | const UChar uhNewDepth = max( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) ); |
|---|
| 314 | pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_INTER ); |
|---|
| 315 | pcCU->setPartitionSize( uiAbsPartIdx + ui, SIZE_2Nx2N ); |
|---|
| 316 | pcCU->setDepth( uiAbsPartIdx + ui, uhNewDepth ); |
|---|
| 317 | pcCU->setWidth( uiAbsPartIdx + ui, g_uiMaxCUWidth>>uhNewDepth ); |
|---|
| 318 | pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth ); |
|---|
| 319 | } |
|---|
| 320 | |
|---|
| 321 | if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary ) |
|---|
| 322 | { |
|---|
| 323 | UInt uiIdx = uiAbsPartIdx; |
|---|
| 324 | for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ ) |
|---|
| 325 | { |
|---|
| 326 | uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiIdx] ]; |
|---|
| 327 | uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ]; |
|---|
| 328 | |
|---|
| 329 | if( ( uiLPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getHeight() ) ) |
|---|
| 330 | xDecodeCU( pcCU, uiIdx, uiDepth+1 ); |
|---|
| 331 | |
|---|
| 332 | uiIdx += uiQNumParts; |
|---|
| 333 | } |
|---|
| 334 | return; |
|---|
| 335 | } |
|---|
| 336 | } |
|---|
| 337 | #endif |
|---|
| 338 | } |
|---|
| 339 | UInt uiCurrWidth = pcCU->getWidth ( uiAbsPartIdx ); |
|---|
| 340 | UInt uiCurrHeight = pcCU->getHeight( uiAbsPartIdx ); |
|---|
| 341 | |
|---|
| 342 | // Coefficient decoding |
|---|
| 343 | m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight ); |
|---|
| 344 | |
|---|
| 345 | } |
|---|
| 346 | |
|---|
| 347 | Void TDecCu::xDecompressCU( TComDataCU* pcCU, TComDataCU* pcCUCur, UInt uiAbsPartIdx, UInt uiDepth ) |
|---|
| 348 | { |
|---|
| 349 | TComPic* pcPic = pcCU->getPic(); |
|---|
| 350 | |
|---|
| 351 | Bool bBoundary = false; |
|---|
| 352 | UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ]; |
|---|
| 353 | UInt uiRPelX = uiLPelX + (g_uiMaxCUWidth>>uiDepth) - 1; |
|---|
| 354 | UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; |
|---|
| 355 | UInt uiBPelY = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1; |
|---|
| 356 | |
|---|
| 357 | if( ( uiRPelX >= pcCU->getSlice()->getSPS()->getWidth() ) || ( uiBPelY >= pcCU->getSlice()->getSPS()->getHeight() ) ) |
|---|
| 358 | { |
|---|
| 359 | bBoundary = true; |
|---|
| 360 | } |
|---|
| 361 | |
|---|
| 362 | if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary ) |
|---|
| 363 | { |
|---|
| 364 | UInt uiNextDepth = uiDepth + 1; |
|---|
| 365 | UInt uiQNumParts = pcCU->getTotalNumPart() >> (uiNextDepth<<1); |
|---|
| 366 | UInt uiIdx = uiAbsPartIdx; |
|---|
| 367 | for ( UInt uiPartIdx = 0; uiPartIdx < 4; uiPartIdx++ ) |
|---|
| 368 | { |
|---|
| 369 | uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiIdx] ]; |
|---|
| 370 | uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ]; |
|---|
| 371 | |
|---|
| 372 | if( ( uiLPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getHeight() ) ) |
|---|
| 373 | xDecompressCU(pcCU, m_ppcCU[uiNextDepth], uiIdx, uiNextDepth ); |
|---|
| 374 | |
|---|
| 375 | uiIdx += uiQNumParts; |
|---|
| 376 | } |
|---|
| 377 | return; |
|---|
| 378 | } |
|---|
| 379 | |
|---|
| 380 | // Residual reconstruction |
|---|
| 381 | m_ppcYuvResi[uiDepth]->clear(); |
|---|
| 382 | |
|---|
| 383 | m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth ); |
|---|
| 384 | |
|---|
| 385 | switch( m_ppcCU[uiDepth]->getPredictionMode(0) ) |
|---|
| 386 | { |
|---|
| 387 | case MODE_SKIP: |
|---|
| 388 | case MODE_INTER: |
|---|
| 389 | xReconInter( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); |
|---|
| 390 | break; |
|---|
| 391 | case MODE_INTRA: |
|---|
| 392 | xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); |
|---|
| 393 | break; |
|---|
| 394 | default: |
|---|
| 395 | assert(0); |
|---|
| 396 | break; |
|---|
| 397 | } |
|---|
| 398 | |
|---|
| 399 | xCopyToPic( m_ppcCU[uiDepth], pcPic, uiAbsPartIdx, uiDepth ); |
|---|
| 400 | } |
|---|
| 401 | |
|---|
| 402 | Void TDecCu::xReconInter( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) |
|---|
| 403 | { |
|---|
| 404 | #if MW_MVI_SIGNALLING_MODE == 1 |
|---|
| 405 | if( pcCU->getTextureModeDepth( 0 ) != -1 ) |
|---|
| 406 | pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth ); |
|---|
| 407 | #endif |
|---|
| 408 | |
|---|
| 409 | // inter prediction |
|---|
| 410 | m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); |
|---|
| 411 | |
|---|
| 412 | #if MW_MVI_SIGNALLING_MODE == 1 |
|---|
| 413 | if( pcCU->getTextureModeDepth( 0 ) != -1 ) |
|---|
| 414 | pcCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); |
|---|
| 415 | #endif |
|---|
| 416 | |
|---|
| 417 | if( pcCU->getResPredFlag( 0 ) ) |
|---|
| 418 | { |
|---|
| 419 | AOF( pcCU->getResPredAvail( 0 ) ); |
|---|
| 420 | Bool bOK = pcCU->getResidualSamples( 0, m_ppcYuvResPred[uiDepth] ); |
|---|
| 421 | AOF( bOK ); |
|---|
| 422 | m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); |
|---|
| 423 | } |
|---|
| 424 | |
|---|
| 425 | // inter recon |
|---|
| 426 | xDecodeInterTexture( pcCU, 0, uiDepth ); |
|---|
| 427 | |
|---|
| 428 | // clip for only non-zero cbp case |
|---|
| 429 | if ( ( pcCU->getCbf( 0, TEXT_LUMA ) ) || ( pcCU->getCbf( 0, TEXT_CHROMA_U ) ) || ( pcCU->getCbf(0, TEXT_CHROMA_V ) ) ) |
|---|
| 430 | { |
|---|
| 431 | m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) ); |
|---|
| 432 | } |
|---|
| 433 | else |
|---|
| 434 | { |
|---|
| 435 | if( pcCU->getResPredFlag( 0 ) ) |
|---|
| 436 | { |
|---|
| 437 | m_ppcYuvReco[uiDepth]->clip( pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); |
|---|
| 438 | } |
|---|
| 439 | m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 )); |
|---|
| 440 | } |
|---|
| 441 | } |
|---|
| 442 | |
|---|
| 443 | Void TDecCu::xDecodeIntraTexture( TComDataCU* pcCU, UInt uiPartIdx, Pel* piReco, Pel* piPred, Pel* piResi, UInt uiStride, TCoeff* pCoeff, UInt uiWidth, UInt uiHeight, UInt uiCurrDepth ) |
|---|
| 444 | { |
|---|
| 445 | if( pcCU->getTransformIdx(0) == uiCurrDepth ) |
|---|
| 446 | { |
|---|
| 447 | UInt uiX, uiY; |
|---|
| 448 | TComPattern* pcPattern = pcCU->getPattern(); |
|---|
| 449 | UInt uiZorder = pcCU->getZorderIdxInCU()+uiPartIdx; |
|---|
| 450 | Pel* pPred = piPred; |
|---|
| 451 | Pel* pResi = piResi; |
|---|
| 452 | Pel* piPicReco = pcCU->getPic()->getPicYuvRec()->getLumaAddr(pcCU->getAddr(), uiZorder); |
|---|
| 453 | UInt uiPicStride = pcCU->getPic()->getPicYuvRec()->getStride(); |
|---|
| 454 | |
|---|
| 455 | pcPattern->initPattern( pcCU, uiCurrDepth, uiPartIdx ); |
|---|
| 456 | |
|---|
| 457 | Bool bAboveAvail = false; |
|---|
| 458 | Bool bLeftAvail = false; |
|---|
| 459 | |
|---|
| 460 | pcPattern->initAdiPattern(pcCU, uiPartIdx, uiCurrDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail); |
|---|
| 461 | |
|---|
| 462 | m_pcPrediction->predIntraLumaAng( pcPattern, pcCU->getLumaIntraDir(uiPartIdx), pPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail ); |
|---|
| 463 | |
|---|
| 464 | m_pcTrQuant->setQPforQuant( pcCU->getQP(uiPartIdx), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); |
|---|
| 465 | #if INTRA_DST_TYPE_7 |
|---|
| 466 | m_pcTrQuant->invtransformNxN(TEXT_LUMA, pcCU->getLumaIntraDir(uiPartIdx), pResi, uiStride, pCoeff, uiWidth, uiHeight ); |
|---|
| 467 | #else |
|---|
| 468 | m_pcTrQuant->invtransformNxN( pResi, uiStride, pCoeff, uiWidth, uiHeight ); |
|---|
| 469 | #endif |
|---|
| 470 | // Reconstruction |
|---|
| 471 | { |
|---|
| 472 | pResi = piResi; |
|---|
| 473 | pPred = piPred; |
|---|
| 474 | for( uiY = 0; uiY < uiHeight; uiY++ ) |
|---|
| 475 | { |
|---|
| 476 | for( uiX = 0; uiX < uiWidth; uiX++ ) |
|---|
| 477 | { |
|---|
| 478 | piReco [uiX] = Clip(pPred[uiX] + pResi[uiX]); |
|---|
| 479 | piPicReco[uiX] = piReco[uiX]; |
|---|
| 480 | } |
|---|
| 481 | piReco += uiStride; |
|---|
| 482 | pPred += uiStride; |
|---|
| 483 | pResi += uiStride; |
|---|
| 484 | piPicReco += uiPicStride; |
|---|
| 485 | } |
|---|
| 486 | } |
|---|
| 487 | } |
|---|
| 488 | else |
|---|
| 489 | { |
|---|
| 490 | uiCurrDepth++; |
|---|
| 491 | uiWidth >>= 1; |
|---|
| 492 | uiHeight >>= 1; |
|---|
| 493 | UInt uiPartOffset = pcCU->getTotalNumPart()>>(uiCurrDepth<<1); |
|---|
| 494 | UInt uiCoeffOffset = uiWidth * uiHeight; |
|---|
| 495 | UInt uiPelOffset = uiHeight * uiStride; |
|---|
| 496 | Pel* pResi = piResi; |
|---|
| 497 | Pel* pReco = piReco; |
|---|
| 498 | Pel* pPred = piPred; |
|---|
| 499 | xDecodeIntraTexture( pcCU, uiPartIdx, pReco, pPred, pResi, uiStride, pCoeff, uiWidth, uiHeight, uiCurrDepth ); |
|---|
| 500 | uiPartIdx += uiPartOffset; |
|---|
| 501 | pCoeff += uiCoeffOffset; |
|---|
| 502 | pResi = piResi + uiWidth; |
|---|
| 503 | pReco = piReco + uiWidth; |
|---|
| 504 | pPred = piPred + uiWidth; |
|---|
| 505 | xDecodeIntraTexture( pcCU, uiPartIdx, pReco, pPred, pResi, uiStride, pCoeff, uiWidth, uiHeight, uiCurrDepth ); |
|---|
| 506 | uiPartIdx += uiPartOffset; |
|---|
| 507 | pCoeff += uiCoeffOffset; |
|---|
| 508 | pResi = piResi + uiPelOffset; |
|---|
| 509 | pReco = piReco + uiPelOffset; |
|---|
| 510 | pPred = piPred + uiPelOffset; |
|---|
| 511 | xDecodeIntraTexture( pcCU, uiPartIdx, pReco, pPred, pResi, uiStride, pCoeff, uiWidth, uiHeight, uiCurrDepth ); |
|---|
| 512 | uiPartIdx += uiPartOffset; |
|---|
| 513 | pCoeff += uiCoeffOffset; |
|---|
| 514 | pResi = piResi + uiPelOffset + uiWidth; |
|---|
| 515 | pReco = piReco + uiPelOffset + uiWidth; |
|---|
| 516 | pPred = piPred + uiPelOffset + uiWidth; |
|---|
| 517 | xDecodeIntraTexture( pcCU, uiPartIdx, pReco, pPred, pResi, uiStride, pCoeff, uiWidth, uiHeight, uiCurrDepth ); |
|---|
| 518 | } |
|---|
| 519 | } |
|---|
| 520 | |
|---|
| 521 | // ADI chroma |
|---|
| 522 | Void TDecCu::xRecurIntraInvTransChroma(TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piResi, Pel* piPred, Pel* piReco, UInt uiStride, TCoeff* piCoeff, UInt uiWidth, UInt uiHeight, UInt uiTrMode, UInt uiCurrTrMode, TextType eText ) |
|---|
| 523 | { |
|---|
| 524 | if( uiTrMode == uiCurrTrMode ) |
|---|
| 525 | { |
|---|
| 526 | UInt uiX, uiY; |
|---|
| 527 | UInt uiZorder = pcCU->getZorderIdxInCU()+uiAbsPartIdx; |
|---|
| 528 | Pel* pResi = piResi; |
|---|
| 529 | Pel* pPred = piPred; |
|---|
| 530 | Pel* piPicReco; |
|---|
| 531 | if( eText == TEXT_CHROMA_U ) |
|---|
| 532 | piPicReco= pcCU->getPic()->getPicYuvRec()->getCbAddr(pcCU->getAddr(), uiZorder); |
|---|
| 533 | else |
|---|
| 534 | piPicReco= pcCU->getPic()->getPicYuvRec()->getCrAddr(pcCU->getAddr(), uiZorder); |
|---|
| 535 | |
|---|
| 536 | UInt uiPicStride = pcCU->getPic()->getPicYuvRec()->getCStride(); |
|---|
| 537 | |
|---|
| 538 | pcCU->getPattern()->initPattern( pcCU, uiCurrTrMode, uiAbsPartIdx ); |
|---|
| 539 | |
|---|
| 540 | Bool bAboveAvail = false; |
|---|
| 541 | Bool bLeftAvail = false; |
|---|
| 542 | |
|---|
| 543 | pcCU->getPattern()->initAdiPatternChroma(pcCU,uiAbsPartIdx, uiCurrTrMode, m_pcPrediction->getPredicBuf(),m_pcPrediction->getPredicBufWidth(),m_pcPrediction->getPredicBufHeight(),bAboveAvail,bLeftAvail); |
|---|
| 544 | |
|---|
| 545 | UInt uiModeL = pcCU->getLumaIntraDir(0); |
|---|
| 546 | UInt uiMode = pcCU->getChromaIntraDir(0); |
|---|
| 547 | |
|---|
| 548 | if (uiMode==4) uiMode = uiModeL; |
|---|
| 549 | |
|---|
| 550 | Int* pPatChr; |
|---|
| 551 | |
|---|
| 552 | if (eText==TEXT_CHROMA_U) |
|---|
| 553 | { |
|---|
| 554 | pPatChr= pcCU->getPattern()->getAdiCbBuf( uiWidth, uiHeight, m_pcPrediction->getPredicBuf() ); |
|---|
| 555 | } |
|---|
| 556 | else // (eText==TEXT_CHROMA_V) |
|---|
| 557 | { |
|---|
| 558 | pPatChr= pcCU->getPattern()->getAdiCrBuf( uiWidth, uiHeight, m_pcPrediction->getPredicBuf() ); |
|---|
| 559 | } |
|---|
| 560 | |
|---|
| 561 | m_pcPrediction-> predIntraChromaAng( pcCU->getPattern(), pPatChr, uiMode, pPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail ); |
|---|
| 562 | |
|---|
| 563 | // Inverse Transform |
|---|
| 564 | if( pcCU->getCbf(0, eText, uiCurrTrMode) ) |
|---|
| 565 | { |
|---|
| 566 | #if INTRA_DST_TYPE_7 |
|---|
| 567 | m_pcTrQuant->invtransformNxN( eText, REG_DCT, pResi, uiStride, piCoeff, uiWidth, uiHeight); |
|---|
| 568 | #else |
|---|
| 569 | m_pcTrQuant->invtransformNxN( pResi, uiStride, piCoeff, uiWidth, uiHeight ); |
|---|
| 570 | #endif |
|---|
| 571 | } |
|---|
| 572 | pResi = piResi; |
|---|
| 573 | |
|---|
| 574 | for( uiY = 0; uiY < uiHeight; uiY++ ) |
|---|
| 575 | { |
|---|
| 576 | for( uiX = 0; uiX < uiWidth; uiX++ ) |
|---|
| 577 | { |
|---|
| 578 | piReco [uiX] = Clip( pPred[uiX] + pResi[uiX] ); |
|---|
| 579 | piPicReco[uiX] = piReco[uiX]; |
|---|
| 580 | } |
|---|
| 581 | |
|---|
| 582 | pPred += uiStride; |
|---|
| 583 | pResi += uiStride; |
|---|
| 584 | piReco += uiStride; |
|---|
| 585 | piPicReco += uiPicStride; |
|---|
| 586 | } |
|---|
| 587 | } |
|---|
| 588 | else |
|---|
| 589 | { |
|---|
| 590 | uiCurrTrMode++; |
|---|
| 591 | uiWidth >>= 1; |
|---|
| 592 | uiHeight >>= 1; |
|---|
| 593 | UInt uiCoeffOffset = uiWidth*uiHeight; |
|---|
| 594 | UInt uiPelOffset = uiHeight*uiStride; |
|---|
| 595 | UInt uiPartOffst = pcCU->getTotalNumPart()>>(uiCurrTrMode<<1); |
|---|
| 596 | Pel* pResi = piResi; |
|---|
| 597 | Pel* pPred = piPred; |
|---|
| 598 | Pel* pReco = piReco; |
|---|
| 599 | xRecurIntraInvTransChroma( pcCU, uiAbsPartIdx, pResi, pPred, pReco, uiStride, piCoeff, uiWidth, uiHeight, uiTrMode, uiCurrTrMode, eText ); |
|---|
| 600 | uiAbsPartIdx += uiPartOffst; |
|---|
| 601 | piCoeff += uiCoeffOffset; |
|---|
| 602 | pResi = piResi + uiWidth; pPred = piPred + uiWidth; pReco = piReco + uiWidth; |
|---|
| 603 | xRecurIntraInvTransChroma( pcCU, uiAbsPartIdx, pResi, pPred, pReco, uiStride, piCoeff, uiWidth, uiHeight, uiTrMode, uiCurrTrMode, eText ); |
|---|
| 604 | uiAbsPartIdx += uiPartOffst; |
|---|
| 605 | piCoeff += uiCoeffOffset; |
|---|
| 606 | pResi = piResi + uiPelOffset; pPred = piPred + uiPelOffset; pReco = piReco + uiPelOffset; |
|---|
| 607 | xRecurIntraInvTransChroma( pcCU, uiAbsPartIdx, pResi, pPred, pReco, uiStride, piCoeff, uiWidth, uiHeight, uiTrMode, uiCurrTrMode, eText ); |
|---|
| 608 | uiAbsPartIdx += uiPartOffst; |
|---|
| 609 | piCoeff += uiCoeffOffset; |
|---|
| 610 | pResi = piResi + uiPelOffset + uiWidth; pPred = piPred + uiPelOffset + uiWidth; pReco = piReco + uiPelOffset + uiWidth; |
|---|
| 611 | xRecurIntraInvTransChroma( pcCU, uiAbsPartIdx, pResi, pPred, pReco, uiStride, piCoeff, uiWidth, uiHeight, uiTrMode, uiCurrTrMode, eText ); |
|---|
| 612 | } |
|---|
| 613 | } |
|---|
| 614 | |
|---|
| 615 | Void |
|---|
| 616 | TDecCu::xIntraRecLumaBlk( TComDataCU* pcCU, |
|---|
| 617 | UInt uiTrDepth, |
|---|
| 618 | UInt uiAbsPartIdx, |
|---|
| 619 | TComYuv* pcRecoYuv, |
|---|
| 620 | TComYuv* pcPredYuv, |
|---|
| 621 | TComYuv* pcResiYuv ) |
|---|
| 622 | { |
|---|
| 623 | UInt uiWidth = pcCU ->getWidth ( 0 ) >> uiTrDepth; |
|---|
| 624 | UInt uiHeight = pcCU ->getHeight ( 0 ) >> uiTrDepth; |
|---|
| 625 | UInt uiStride = pcRecoYuv->getStride (); |
|---|
| 626 | Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); |
|---|
| 627 | Pel* piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); |
|---|
| 628 | Pel* piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); |
|---|
| 629 | |
|---|
| 630 | UInt uiNumCoeffInc = ( pcCU->getSlice()->getSPS()->getMaxCUWidth() * pcCU->getSlice()->getSPS()->getMaxCUHeight() ) >> ( pcCU->getSlice()->getSPS()->getMaxCUDepth() << 1 ); |
|---|
| 631 | TCoeff* pcCoeff = pcCU->getCoeffY() + ( uiNumCoeffInc * uiAbsPartIdx ); |
|---|
| 632 | |
|---|
| 633 | UInt uiLumaPredMode = pcCU->getLumaIntraDir ( uiAbsPartIdx ); |
|---|
| 634 | |
|---|
| 635 | UInt uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; |
|---|
| 636 | Pel* piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); |
|---|
| 637 | UInt uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); |
|---|
| 638 | |
|---|
| 639 | //===== init availability pattern ===== |
|---|
| 640 | Bool bAboveAvail = false; |
|---|
| 641 | Bool bLeftAvail = false; |
|---|
| 642 | pcCU->getPattern()->initPattern ( pcCU, uiTrDepth, uiAbsPartIdx ); |
|---|
| 643 | pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, |
|---|
| 644 | m_pcPrediction->getPredicBuf (), |
|---|
| 645 | m_pcPrediction->getPredicBufWidth (), |
|---|
| 646 | m_pcPrediction->getPredicBufHeight (), |
|---|
| 647 | bAboveAvail, bLeftAvail ); |
|---|
| 648 | |
|---|
| 649 | #if HHI_DMM_INTRA |
|---|
| 650 | if( uiLumaPredMode > MAX_MODE_ID_INTRA_DIR ) |
|---|
| 651 | { |
|---|
| 652 | m_pcPrediction->predIntraLumaDMM( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail, false ); |
|---|
| 653 | } |
|---|
| 654 | else |
|---|
| 655 | #endif |
|---|
| 656 | { |
|---|
| 657 | //===== get prediction signal ===== |
|---|
| 658 | m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail ); |
|---|
| 659 | } |
|---|
| 660 | //===== inverse transform ===== |
|---|
| 661 | m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); |
|---|
| 662 | #if INTRA_DST_TYPE_7 |
|---|
| 663 | m_pcTrQuant->invtransformNxN( TEXT_LUMA, pcCU->getLumaIntraDir( uiAbsPartIdx ), piResi, uiStride, pcCoeff, uiWidth, uiHeight ); |
|---|
| 664 | #else |
|---|
| 665 | m_pcTrQuant->invtransformNxN( piResi, uiStride, pcCoeff, uiWidth, uiHeight ); |
|---|
| 666 | #endif |
|---|
| 667 | |
|---|
| 668 | |
|---|
| 669 | //===== reconstruction ===== |
|---|
| 670 | { |
|---|
| 671 | Pel* pPred = piPred; |
|---|
| 672 | Pel* pResi = piResi; |
|---|
| 673 | Pel* pReco = piReco; |
|---|
| 674 | Pel* pRecIPred = piRecIPred; |
|---|
| 675 | for( UInt uiY = 0; uiY < uiHeight; uiY++ ) |
|---|
| 676 | { |
|---|
| 677 | for( UInt uiX = 0; uiX < uiWidth; uiX++ ) |
|---|
| 678 | { |
|---|
| 679 | pReco [ uiX ] = Clip( pPred[ uiX ] + pResi[ uiX ] ); |
|---|
| 680 | pRecIPred[ uiX ] = pReco[ uiX ]; |
|---|
| 681 | } |
|---|
| 682 | pPred += uiStride; |
|---|
| 683 | pResi += uiStride; |
|---|
| 684 | pReco += uiStride; |
|---|
| 685 | pRecIPred += uiRecIPredStride; |
|---|
| 686 | } |
|---|
| 687 | } |
|---|
| 688 | } |
|---|
| 689 | |
|---|
| 690 | |
|---|
| 691 | Void |
|---|
| 692 | TDecCu::xIntraRecChromaBlk( TComDataCU* pcCU, |
|---|
| 693 | UInt uiTrDepth, |
|---|
| 694 | UInt uiAbsPartIdx, |
|---|
| 695 | TComYuv* pcRecoYuv, |
|---|
| 696 | TComYuv* pcPredYuv, |
|---|
| 697 | TComYuv* pcResiYuv, |
|---|
| 698 | UInt uiChromaId ) |
|---|
| 699 | { |
|---|
| 700 | UInt uiFullDepth = pcCU->getDepth( 0 ) + uiTrDepth; |
|---|
| 701 | UInt uiLog2TrSize = g_aucConvertToBit[ pcCU->getSlice()->getSPS()->getMaxCUWidth() >> uiFullDepth ] + 2; |
|---|
| 702 | if( uiLog2TrSize == pcCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) |
|---|
| 703 | { |
|---|
| 704 | assert( uiTrDepth > 0 ); |
|---|
| 705 | uiTrDepth--; |
|---|
| 706 | UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth( 0 ) + uiTrDepth ) << 1 ); |
|---|
| 707 | Bool bFirstQ = ( ( uiAbsPartIdx % uiQPDiv ) == 0 ); |
|---|
| 708 | if( !bFirstQ ) |
|---|
| 709 | { |
|---|
| 710 | return; |
|---|
| 711 | } |
|---|
| 712 | } |
|---|
| 713 | |
|---|
| 714 | TextType eText = ( uiChromaId > 0 ? TEXT_CHROMA_V : TEXT_CHROMA_U ); |
|---|
| 715 | UInt uiWidth = pcCU ->getWidth ( 0 ) >> ( uiTrDepth + 1 ); |
|---|
| 716 | UInt uiHeight = pcCU ->getHeight ( 0 ) >> ( uiTrDepth + 1 ); |
|---|
| 717 | UInt uiStride = pcRecoYuv->getCStride (); |
|---|
| 718 | Pel* piReco = ( uiChromaId > 0 ? pcRecoYuv->getCrAddr( uiAbsPartIdx ) : pcRecoYuv->getCbAddr( uiAbsPartIdx ) ); |
|---|
| 719 | Pel* piPred = ( uiChromaId > 0 ? pcPredYuv->getCrAddr( uiAbsPartIdx ) : pcPredYuv->getCbAddr( uiAbsPartIdx ) ); |
|---|
| 720 | Pel* piResi = ( uiChromaId > 0 ? pcResiYuv->getCrAddr( uiAbsPartIdx ) : pcResiYuv->getCbAddr( uiAbsPartIdx ) ); |
|---|
| 721 | |
|---|
| 722 | UInt uiNumCoeffInc = ( ( pcCU->getSlice()->getSPS()->getMaxCUWidth() * pcCU->getSlice()->getSPS()->getMaxCUHeight() ) >> ( pcCU->getSlice()->getSPS()->getMaxCUDepth() << 1 ) ) >> 2; |
|---|
| 723 | TCoeff* pcCoeff = ( uiChromaId > 0 ? pcCU->getCoeffCr() : pcCU->getCoeffCb() ) + ( uiNumCoeffInc * uiAbsPartIdx ); |
|---|
| 724 | |
|---|
| 725 | UInt uiChromaPredMode = pcCU->getChromaIntraDir( 0 ); |
|---|
| 726 | |
|---|
| 727 | #if !LM_CHROMA |
|---|
| 728 | if( uiChromaPredMode == 4 ) |
|---|
| 729 | { |
|---|
| 730 | uiChromaPredMode = pcCU->getLumaIntraDir( 0 ); |
|---|
| 731 | } |
|---|
| 732 | #endif |
|---|
| 733 | |
|---|
| 734 | UInt uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; |
|---|
| 735 | Pel* piRecIPred = ( uiChromaId > 0 ? pcCU->getPic()->getPicYuvRec()->getCrAddr( pcCU->getAddr(), uiZOrder ) : pcCU->getPic()->getPicYuvRec()->getCbAddr( pcCU->getAddr(), uiZOrder ) ); |
|---|
| 736 | UInt uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getCStride(); |
|---|
| 737 | |
|---|
| 738 | //===== init availability pattern ===== |
|---|
| 739 | Bool bAboveAvail = false; |
|---|
| 740 | Bool bLeftAvail = false; |
|---|
| 741 | pcCU->getPattern()->initPattern ( pcCU, uiTrDepth, uiAbsPartIdx ); |
|---|
| 742 | pcCU->getPattern()->initAdiPatternChroma( pcCU, uiAbsPartIdx, uiTrDepth, |
|---|
| 743 | m_pcPrediction->getPredicBuf (), |
|---|
| 744 | m_pcPrediction->getPredicBufWidth (), |
|---|
| 745 | m_pcPrediction->getPredicBufHeight (), |
|---|
| 746 | bAboveAvail, bLeftAvail ); |
|---|
| 747 | Int* pPatChroma = ( uiChromaId > 0 ? pcCU->getPattern()->getAdiCrBuf( uiWidth, uiHeight, m_pcPrediction->getPredicBuf() ) : pcCU->getPattern()->getAdiCbBuf( uiWidth, uiHeight, m_pcPrediction->getPredicBuf() ) ); |
|---|
| 748 | |
|---|
| 749 | //===== get prediction signal ===== |
|---|
| 750 | #if LM_CHROMA |
|---|
| 751 | if(pcCU->getSlice()->getSPS()->getUseLMChroma() && uiChromaPredMode == 3) |
|---|
| 752 | { |
|---|
| 753 | m_pcPrediction->predLMIntraChroma( pcCU->getPattern(), pPatChroma, piPred, uiStride, uiWidth, uiHeight, uiChromaId ); |
|---|
| 754 | } |
|---|
| 755 | else |
|---|
| 756 | { |
|---|
| 757 | if( uiChromaPredMode == 4 ) |
|---|
| 758 | { |
|---|
| 759 | uiChromaPredMode = pcCU->getLumaIntraDir( 0 ); |
|---|
| 760 | } |
|---|
| 761 | m_pcPrediction->predIntraChromaAng( pcCU->getPattern(), pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail ); |
|---|
| 762 | } |
|---|
| 763 | #else // LM_CHROMA |
|---|
| 764 | m_pcPrediction->predIntraChromaAng( pcCU->getPattern(), pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail ); |
|---|
| 765 | #endif |
|---|
| 766 | |
|---|
| 767 | //===== inverse transform ===== |
|---|
| 768 | m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText ); |
|---|
| 769 | #if INTRA_DST_TYPE_7 |
|---|
| 770 | m_pcTrQuant->invtransformNxN( eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight ); |
|---|
| 771 | #else |
|---|
| 772 | m_pcTrQuant->invtransformNxN( piResi, uiStride, pcCoeff, uiWidth, uiHeight ); |
|---|
| 773 | #endif |
|---|
| 774 | |
|---|
| 775 | //===== reconstruction ===== |
|---|
| 776 | { |
|---|
| 777 | Pel* pPred = piPred; |
|---|
| 778 | Pel* pResi = piResi; |
|---|
| 779 | Pel* pReco = piReco; |
|---|
| 780 | Pel* pRecIPred = piRecIPred; |
|---|
| 781 | for( UInt uiY = 0; uiY < uiHeight; uiY++ ) |
|---|
| 782 | { |
|---|
| 783 | for( UInt uiX = 0; uiX < uiWidth; uiX++ ) |
|---|
| 784 | { |
|---|
| 785 | pReco [ uiX ] = Clip( pPred[ uiX ] + pResi[ uiX ] ); |
|---|
| 786 | pRecIPred[ uiX ] = pReco[ uiX ]; |
|---|
| 787 | } |
|---|
| 788 | pPred += uiStride; |
|---|
| 789 | pResi += uiStride; |
|---|
| 790 | pReco += uiStride; |
|---|
| 791 | pRecIPred += uiRecIPredStride; |
|---|
| 792 | } |
|---|
| 793 | } |
|---|
| 794 | } |
|---|
| 795 | |
|---|
| 796 | Void |
|---|
| 797 | TDecCu::xIntraRecQT( TComDataCU* pcCU, |
|---|
| 798 | UInt uiTrDepth, |
|---|
| 799 | UInt uiAbsPartIdx, |
|---|
| 800 | TComYuv* pcRecoYuv, |
|---|
| 801 | TComYuv* pcPredYuv, |
|---|
| 802 | TComYuv* pcResiYuv ) |
|---|
| 803 | { |
|---|
| 804 | UInt uiFullDepth = pcCU->getDepth(0) + uiTrDepth; |
|---|
| 805 | UInt uiTrMode = pcCU->getTransformIdx( uiAbsPartIdx ); |
|---|
| 806 | if( uiTrMode == uiTrDepth ) |
|---|
| 807 | { |
|---|
| 808 | xIntraRecLumaBlk ( pcCU, uiTrDepth, uiAbsPartIdx, pcRecoYuv, pcPredYuv, pcResiYuv ); |
|---|
| 809 | xIntraRecChromaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcRecoYuv, pcPredYuv, pcResiYuv, 0 ); |
|---|
| 810 | xIntraRecChromaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcRecoYuv, pcPredYuv, pcResiYuv, 1 ); |
|---|
| 811 | } |
|---|
| 812 | else |
|---|
| 813 | { |
|---|
| 814 | UInt uiNumQPart = pcCU->getPic()->getNumPartInCU() >> ( ( uiFullDepth + 1 ) << 1 ); |
|---|
| 815 | for( UInt uiPart = 0; uiPart < 4; uiPart++ ) |
|---|
| 816 | { |
|---|
| 817 | xIntraRecQT( pcCU, uiTrDepth + 1, uiAbsPartIdx + uiPart * uiNumQPart, pcRecoYuv, pcPredYuv, pcResiYuv ); |
|---|
| 818 | } |
|---|
| 819 | } |
|---|
| 820 | } |
|---|
| 821 | |
|---|
| 822 | Void |
|---|
| 823 | TDecCu::xReconIntraQT( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) |
|---|
| 824 | { |
|---|
| 825 | UInt uiInitTrDepth = ( pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1 ); |
|---|
| 826 | UInt uiNumPart = pcCU->getNumPartInter(); |
|---|
| 827 | UInt uiNumQParts = pcCU->getTotalNumPart() >> 2; |
|---|
| 828 | |
|---|
| 829 | #if LM_CHROMA |
|---|
| 830 | for( UInt uiPU = 0; uiPU < uiNumPart; uiPU++ ) |
|---|
| 831 | { |
|---|
| 832 | xIntraLumaRecQT( pcCU, uiInitTrDepth, uiPU * uiNumQParts, m_ppcYuvReco[uiDepth], m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth] ); |
|---|
| 833 | } |
|---|
| 834 | |
|---|
| 835 | for( UInt uiPU = 0; uiPU < uiNumPart; uiPU++ ) |
|---|
| 836 | { |
|---|
| 837 | xIntraChromaRecQT( pcCU, uiInitTrDepth, uiPU * uiNumQParts, m_ppcYuvReco[uiDepth], m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth] ); |
|---|
| 838 | } |
|---|
| 839 | #else |
|---|
| 840 | |
|---|
| 841 | for( UInt uiPU = 0; uiPU < uiNumPart; uiPU++ ) |
|---|
| 842 | { |
|---|
| 843 | xIntraRecQT( pcCU, uiInitTrDepth, uiPU * uiNumQParts, m_ppcYuvReco[uiDepth], m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth] ); |
|---|
| 844 | } |
|---|
| 845 | #endif |
|---|
| 846 | |
|---|
| 847 | } |
|---|
| 848 | |
|---|
| 849 | #if LM_CHROMA |
|---|
| 850 | |
|---|
| 851 | /** Funtion for deriving recontructed PU/CU Luma sample with QTree structure |
|---|
| 852 | * \param pcCU pointer of current CU |
|---|
| 853 | * \param uiTrDepth current tranform split depth |
|---|
| 854 | * \param uiAbsPartIdx part index |
|---|
| 855 | * \param pcRecoYuv pointer to reconstructed sample arrays |
|---|
| 856 | * \param pcPredYuv pointer to prediction sample arrays |
|---|
| 857 | * \param pcResiYuv pointer to residue sample arrays |
|---|
| 858 | * |
|---|
| 859 | \ This function dervies recontructed PU/CU Luma sample with recursive QTree structure |
|---|
| 860 | */ |
|---|
| 861 | Void |
|---|
| 862 | TDecCu::xIntraLumaRecQT( TComDataCU* pcCU, |
|---|
| 863 | UInt uiTrDepth, |
|---|
| 864 | UInt uiAbsPartIdx, |
|---|
| 865 | TComYuv* pcRecoYuv, |
|---|
| 866 | TComYuv* pcPredYuv, |
|---|
| 867 | TComYuv* pcResiYuv ) |
|---|
| 868 | { |
|---|
| 869 | UInt uiFullDepth = pcCU->getDepth(0) + uiTrDepth; |
|---|
| 870 | UInt uiTrMode = pcCU->getTransformIdx( uiAbsPartIdx ); |
|---|
| 871 | if( uiTrMode == uiTrDepth ) |
|---|
| 872 | { |
|---|
| 873 | xIntraRecLumaBlk ( pcCU, uiTrDepth, uiAbsPartIdx, pcRecoYuv, pcPredYuv, pcResiYuv ); |
|---|
| 874 | } |
|---|
| 875 | else |
|---|
| 876 | { |
|---|
| 877 | UInt uiNumQPart = pcCU->getPic()->getNumPartInCU() >> ( ( uiFullDepth + 1 ) << 1 ); |
|---|
| 878 | for( UInt uiPart = 0; uiPart < 4; uiPart++ ) |
|---|
| 879 | { |
|---|
| 880 | xIntraLumaRecQT( pcCU, uiTrDepth + 1, uiAbsPartIdx + uiPart * uiNumQPart, pcRecoYuv, pcPredYuv, pcResiYuv ); |
|---|
| 881 | } |
|---|
| 882 | } |
|---|
| 883 | } |
|---|
| 884 | |
|---|
| 885 | /** Funtion for deriving recontructed PU/CU chroma samples with QTree structure |
|---|
| 886 | * \param pcCU pointer of current CU |
|---|
| 887 | * \param uiTrDepth current tranform split depth |
|---|
| 888 | * \param uiAbsPartIdx part index |
|---|
| 889 | * \param pcRecoYuv pointer to reconstructed sample arrays |
|---|
| 890 | * \param pcPredYuv pointer to prediction sample arrays |
|---|
| 891 | * \param pcResiYuv pointer to residue sample arrays |
|---|
| 892 | * |
|---|
| 893 | \ This function dervies recontructed PU/CU chroma samples with QTree recursive structure |
|---|
| 894 | */ |
|---|
| 895 | Void |
|---|
| 896 | TDecCu::xIntraChromaRecQT( TComDataCU* pcCU, |
|---|
| 897 | UInt uiTrDepth, |
|---|
| 898 | UInt uiAbsPartIdx, |
|---|
| 899 | TComYuv* pcRecoYuv, |
|---|
| 900 | TComYuv* pcPredYuv, |
|---|
| 901 | TComYuv* pcResiYuv ) |
|---|
| 902 | { |
|---|
| 903 | UInt uiFullDepth = pcCU->getDepth(0) + uiTrDepth; |
|---|
| 904 | UInt uiTrMode = pcCU->getTransformIdx( uiAbsPartIdx ); |
|---|
| 905 | if( uiTrMode == uiTrDepth ) |
|---|
| 906 | { |
|---|
| 907 | xIntraRecChromaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcRecoYuv, pcPredYuv, pcResiYuv, 0 ); |
|---|
| 908 | xIntraRecChromaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcRecoYuv, pcPredYuv, pcResiYuv, 1 ); |
|---|
| 909 | } |
|---|
| 910 | else |
|---|
| 911 | { |
|---|
| 912 | UInt uiNumQPart = pcCU->getPic()->getNumPartInCU() >> ( ( uiFullDepth + 1 ) << 1 ); |
|---|
| 913 | for( UInt uiPart = 0; uiPart < 4; uiPart++ ) |
|---|
| 914 | { |
|---|
| 915 | xIntraChromaRecQT( pcCU, uiTrDepth + 1, uiAbsPartIdx + uiPart * uiNumQPart, pcRecoYuv, pcPredYuv, pcResiYuv ); |
|---|
| 916 | } |
|---|
| 917 | } |
|---|
| 918 | } |
|---|
| 919 | #endif |
|---|
| 920 | |
|---|
| 921 | Void TDecCu::xCopyToPic( TComDataCU* pcCU, TComPic* pcPic, UInt uiZorderIdx, UInt uiDepth ) |
|---|
| 922 | { |
|---|
| 923 | UInt uiCUAddr = pcCU->getAddr(); |
|---|
| 924 | |
|---|
| 925 | m_ppcYuvReco[uiDepth]->copyToPicYuv ( pcPic->getPicYuvRec (), uiCUAddr, uiZorderIdx ); |
|---|
| 926 | |
|---|
| 927 | return; |
|---|
| 928 | } |
|---|
| 929 | |
|---|
| 930 | Void TDecCu::xDecodeInterTexture ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) |
|---|
| 931 | { |
|---|
| 932 | UInt uiWidth = pcCU->getWidth ( uiAbsPartIdx ); |
|---|
| 933 | UInt uiHeight = pcCU->getHeight( uiAbsPartIdx ); |
|---|
| 934 | TCoeff* piCoeff; |
|---|
| 935 | |
|---|
| 936 | Pel* pResi; |
|---|
| 937 | UInt uiLumaTrMode, uiChromaTrMode; |
|---|
| 938 | |
|---|
| 939 | pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx( uiAbsPartIdx ), uiLumaTrMode, uiChromaTrMode ); |
|---|
| 940 | |
|---|
| 941 | // Y |
|---|
| 942 | piCoeff = pcCU->getCoeffY(); |
|---|
| 943 | pResi = m_ppcYuvResi[uiDepth]->getLumaAddr(); |
|---|
| 944 | m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); |
|---|
| 945 | m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_LUMA, pResi, 0, m_ppcYuvResi[uiDepth]->getStride(), uiWidth, uiHeight, uiLumaTrMode, 0, piCoeff ); |
|---|
| 946 | |
|---|
| 947 | // Cb and Cr |
|---|
| 948 | m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); |
|---|
| 949 | |
|---|
| 950 | uiWidth >>= 1; |
|---|
| 951 | uiHeight >>= 1; |
|---|
| 952 | piCoeff = pcCU->getCoeffCb(); pResi = m_ppcYuvResi[uiDepth]->getCbAddr(); |
|---|
| 953 | m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_CHROMA_U, pResi, 0, m_ppcYuvResi[uiDepth]->getCStride(), uiWidth, uiHeight, uiChromaTrMode, 0, piCoeff ); |
|---|
| 954 | piCoeff = pcCU->getCoeffCr(); pResi = m_ppcYuvResi[uiDepth]->getCrAddr(); |
|---|
| 955 | m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_CHROMA_V, pResi, 0, m_ppcYuvResi[uiDepth]->getCStride(), uiWidth, uiHeight, uiChromaTrMode, 0, piCoeff ); |
|---|
| 956 | } |
|---|
| 957 | |
|---|