Changeset 11 in 3DVCSoftware for branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCu.cpp
- Timestamp:
- 5 Feb 2012, 22:00:22 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCu.cpp ¶
r5 r11 49 49 m_ppcYuvReco = NULL; 50 50 m_ppcYuvResPred = NULL; 51 #if POZNAN_AVAIL_MAP 52 m_ppcYuvAvail = NULL; 53 #endif 54 #if POZNAN_SYNTH_VIEW 55 m_ppcYuvSynth = NULL; 56 #endif 51 57 m_ppcCU = NULL; 52 58 } … … 75 81 m_ppcYuvReco = new TComYuv* [m_uiMaxDepth-1]; 76 82 m_ppcYuvResPred = new TComYuv* [m_uiMaxDepth-1]; 83 #if POZNAN_AVAIL_MAP 84 m_ppcYuvAvail = new TComYuv* [m_uiMaxDepth-1]; 85 #endif 86 #if POZNAN_SYNTH_VIEW 87 m_ppcYuvSynth = new TComYuv* [m_uiMaxDepth-1]; 88 #endif 77 89 m_ppcCU = new TComDataCU* [m_uiMaxDepth-1]; 78 90 … … 87 99 m_ppcYuvReco [ui] = new TComYuv; m_ppcYuvReco [ui]->create( uiWidth, uiHeight ); 88 100 m_ppcYuvResPred[ui] = new TComYuv; m_ppcYuvResPred[ui]->create( uiWidth, uiHeight ); 101 #if POZNAN_AVAIL_MAP 102 m_ppcYuvAvail [ui] = new TComYuv; m_ppcYuvAvail [ui]->create( uiWidth, uiHeight ); 103 #endif 104 #if POZNAN_SYNTH_VIEW 105 m_ppcYuvSynth [ui] = new TComYuv; m_ppcYuvSynth [ui]->create( uiWidth, uiHeight ); 106 #endif 107 89 108 m_ppcCU [ui] = new TComDataCU; m_ppcCU [ui]->create( uiNumPartitions, uiWidth, uiHeight, true ); 90 109 } … … 106 125 m_ppcYuvReco [ui]->destroy(); delete m_ppcYuvReco [ui]; m_ppcYuvReco [ui] = NULL; 107 126 m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL; 127 #if POZNAN_AVAIL_MAP 128 m_ppcYuvAvail [ui]->destroy(); delete m_ppcYuvAvail [ui]; m_ppcYuvAvail [ui] = NULL; 129 #endif 130 #if POZNAN_SYNTH_VIEW 131 m_ppcYuvSynth [ui]->destroy(); delete m_ppcYuvSynth [ui]; m_ppcYuvSynth [ui] = NULL; 132 #endif 108 133 m_ppcCU [ui]->destroy(); delete m_ppcCU [ui]; m_ppcCU [ui] = NULL; 109 134 } … … 112 137 delete [] m_ppcYuvReco; m_ppcYuvReco = NULL; 113 138 delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL; 139 #if POZNAN_AVAIL_MAP 140 delete [] m_ppcYuvAvail; m_ppcYuvAvail = NULL; 141 #endif 142 #if POZNAN_SYNTH_VIEW 143 delete [] m_ppcYuvSynth; m_ppcYuvSynth = NULL; 144 #endif 145 114 146 delete [] m_ppcCU; m_ppcCU = NULL; 115 147 } … … 184 216 { 185 217 TComPic* pcPic = pcCU->getPic(); 218 219 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 220 Bool bWholeCUCanBeSynthesized = false; 221 Bool bOneSubCUCanNotBeSynthesied = false; 222 Bool bSubCUCanBeSynthesized[4]; 223 Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized; 224 pcPic->checkSynthesisAvailability(pcCU, pcCU->getAddr(), uiAbsPartIdx, uiDepth, pbSubCUCanBeSynthesized); //KUBA SYNTH 225 Int iSubCUCanNotBeSynthesized = 0; 226 Int iSubCUCanBeSynthesizedCnt = 0; 227 for(Int i = 0; i < 4; i++) 228 { 229 if (!bSubCUCanBeSynthesized[i]) 230 { 231 iSubCUCanNotBeSynthesized = i; 232 } 233 else 234 { 235 iSubCUCanBeSynthesizedCnt ++; 236 } 237 } 238 if(iSubCUCanBeSynthesizedCnt == 4) 239 { 240 bWholeCUCanBeSynthesized = true; 241 } 242 else if(iSubCUCanBeSynthesizedCnt == 3) 243 { 244 bOneSubCUCanNotBeSynthesied = true; 245 } 246 247 if(bWholeCUCanBeSynthesized) 248 { 249 pcCU->setPredModeSubParts( MODE_SYNTH, uiAbsPartIdx, uiDepth ); 250 pcCU->setDepthSubParts( uiDepth, uiAbsPartIdx ); 251 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 252 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 253 //pcCU->setSizeSubParts( pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth, pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth ); 254 return; 255 } 256 #endif 257 186 258 UInt uiCurNumParts = pcPic->getNumPartInCU() >> (uiDepth<<1); 187 259 UInt uiQNumParts = uiCurNumParts>>2; … … 195 267 if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) ) 196 268 { 269 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 270 if(bOneSubCUCanNotBeSynthesied && (uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )) // KUBA SYNTH check if CU has 3 synthesied subCU - no split flag is send in that case and CU split is assumed 271 { 272 pcCU->setDepthSubParts( uiDepth + 1, uiAbsPartIdx ); 273 } 274 else 275 #endif 197 276 #if HHI_MPI 198 277 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) ) … … 367 446 { 368 447 TComPic* pcPic = pcCU->getPic(); 448 #if POZNAN_SYNTH_VIEW 449 if(pcPic->getPicYuvSynth()) m_ppcYuvSynth[uiDepth]->copyFromPicYuv( pcPic->getPicYuvSynth(), pcCU->getAddr(), uiAbsPartIdx ); 450 #endif 451 #if POZNAN_AVAIL_MAP 452 if(pcPic->getPicYuvAvail()) m_ppcYuvAvail[uiDepth]->copyFromPicYuv( pcPic->getPicYuvAvail(), pcCU->getAddr(), uiAbsPartIdx ); 453 #endif 369 454 370 455 Bool bBoundary = false; … … 411 496 xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); 412 497 break; 498 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 499 case MODE_SYNTH: 500 // break; 501 #if POZNAN_FILL_OCCLUDED_CU_WITH_SYNTHESIS 502 m_ppcYuvReco[uiDepth]->copyFromPicYuv(pcPic->getPicYuvSynth(), pcCU->getAddr(), uiAbsPartIdx); 503 #else 504 m_ppcYuvReco[uiDepth]->copyFromPicYuv(pcPic->getPicYuvAvail(), pcCU->getAddr(), uiAbsPartIdx); //Poprawiæ 505 #endif 506 //m_ppcYuvReco[uiDepth]->clear(); 507 break; 508 #endif 413 509 default: 414 510 assert(0);
Note: See TracChangeset for help on using the changeset viewer.