Changeset 28 in 3DVCSoftware for branches/0.3-poznan-univ/source/Lib/TLibCommon/TComPic.cpp
- Timestamp:
- 24 Feb 2012, 20:22:58 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.3-poznan-univ/source/Lib/TLibCommon/TComPic.cpp
r21 r28 50 50 m_apcPicYuv[0] = NULL; 51 51 m_apcPicYuv[1] = NULL; 52 #if POZNAN_AVAIL_MAP 53 m_apcPicYuvAvail = NULL; 54 #endif 55 #if POZNAN_SYNTH_VIEW 56 m_apcPicYuvSynth = NULL; 57 #endif 58 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 59 m_apcPicYuvSynthDepth= NULL; 60 #endif 52 61 #if DEPTH_MAP_GENERATION 53 62 m_pcPredDepthMap = NULL; … … 118 127 m_apcPicYuv[1] = NULL; 119 128 } 129 #if POZNAN_AVAIL_MAP 130 if (m_apcPicYuvAvail) 131 { 132 m_apcPicYuvAvail->destroy(); 133 delete m_apcPicYuvAvail; 134 m_apcPicYuvAvail = NULL; 135 } 136 #endif 137 138 #if POZNAN_SYNTH_VIEW 139 if (m_apcPicYuvSynth) 140 { 141 m_apcPicYuvSynth->destroy(); 142 delete m_apcPicYuvSynth; 143 m_apcPicYuvSynth = NULL; 144 } 145 #endif 146 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 147 if (m_apcPicYuvSynthDepth) 148 { 149 m_apcPicYuvSynthDepth->destroy(); 150 delete m_apcPicYuvSynthDepth; 151 m_apcPicYuvSynthDepth = NULL; 152 } 153 #endif 120 154 121 155 #if DEPTH_MAP_GENERATION … … 195 229 } 196 230 231 #if POZNAN_AVAIL_MAP 232 Void 233 TComPic::addAvailabilityBuffer() 234 { 235 AOT( m_apcPicYuvAvail ); 236 AOF( m_apcPicYuv[1] ); 237 Int iWidth = m_apcPicYuv[1]->getWidth (); 238 Int iHeight = m_apcPicYuv[1]->getHeight (); 239 UInt uiMaxCuWidth = m_apcPicYuv[1]->getMaxCuWidth (); 240 UInt uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight(); 241 UInt uiMaxCuDepth = m_apcPicYuv[1]->getMaxCuDepth (); 242 m_apcPicYuvAvail = new TComPicYuv; 243 m_apcPicYuvAvail ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth ); 244 } 245 #endif 246 247 #if POZNAN_SYNTH_VIEW 248 Void 249 TComPic::addSynthesisBuffer() 250 { 251 AOT( m_apcPicYuvSynth ); 252 AOF( m_apcPicYuv[1] ); 253 Int iWidth = m_apcPicYuv[1]->getWidth (); 254 Int iHeight = m_apcPicYuv[1]->getHeight (); 255 UInt uiMaxCuWidth = m_apcPicYuv[1]->getMaxCuWidth (); 256 UInt uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight(); 257 UInt uiMaxCuDepth = m_apcPicYuv[1]->getMaxCuDepth (); 258 m_apcPicYuvSynth = new TComPicYuv; 259 m_apcPicYuvSynth ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth ); 260 } 261 #endif 262 263 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 264 Void 265 TComPic::addSynthesisDepthBuffer() 266 { 267 AOT( m_apcPicYuvSynthDepth ); 268 AOF( m_apcPicYuv[1] ); 269 Int iWidth = m_apcPicYuv[1]->getWidth (); 270 Int iHeight = m_apcPicYuv[1]->getHeight (); 271 UInt uiMaxCuWidth = m_apcPicYuv[1]->getMaxCuWidth (); 272 UInt uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight(); 273 UInt uiMaxCuDepth = m_apcPicYuv[1]->getMaxCuDepth (); 274 m_apcPicYuvSynthDepth = new TComPicYuv; 275 m_apcPicYuvSynthDepth ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth ); 276 } 277 #endif 278 197 279 #if PARALLEL_MERGED_DEBLK 198 280 Void … … 286 368 } 287 369 370 #if POZNAN_AVAIL_MAP 371 Void 372 TComPic::removeAvailabilityBuffer() 373 { 374 if( m_apcPicYuvAvail ) 375 { 376 m_apcPicYuvAvail->destroy(); 377 delete m_apcPicYuvAvail; 378 m_apcPicYuvAvail = NULL; 379 } 380 } 381 #endif 382 383 #if POZNAN_SYNTH_VIEW 384 Void 385 TComPic::removeSynthesisBuffer() 386 { 387 if( m_apcPicYuvSynth ) 388 { 389 m_apcPicYuvSynth->destroy(); 390 delete m_apcPicYuvSynth; 391 m_apcPicYuvSynth = NULL; 392 } 393 } 394 #endif 395 396 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 397 Void 398 TComPic::removeSynthesisDepthBuffer() 399 { 400 if( m_apcPicYuvSynthDepth ) 401 { 402 m_apcPicYuvSynthDepth->destroy(); 403 delete m_apcPicYuvSynthDepth; 404 m_apcPicYuvSynthDepth = NULL; 405 } 406 } 407 #endif 408 288 409 #if PARALLEL_MERGED_DEBLK 289 410 Void … … 351 472 #endif 352 473 474 #if POZNAN_AVAIL_MAP 475 Void TComPic::checkSynthesisAvailability( TComDataCU*& rpcCU, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied ) 476 { 477 rpbCUSynthesied[0] = true; 478 rpbCUSynthesied[1] = true; 479 rpbCUSynthesied[2] = true; 480 rpbCUSynthesied[3] = true; 481 482 if (!getPicYuvAvail()) 483 { 484 rpbCUSynthesied[0] = false; 485 rpbCUSynthesied[1] = false; 486 rpbCUSynthesied[2] = false; 487 rpbCUSynthesied[3] = false; 488 return; 489 } 490 491 Int x, y; 492 Bool bAvailable = true; 493 Pel* pAvail = getPicYuvAvail()->getLumaAddr ( iCuAddr, uiAbsZorderIdx ); 494 Int CUHeight = g_uiMaxCUHeight >> uiPartDepth; //rpcCU->getHeight(uiAbsZorderIdx); 495 Int CUWidth = g_uiMaxCUWidth >> uiPartDepth; //rpcCU->getWidth(uiAbsZorderIdx); 496 497 Int iStride = getPicYuvAvail()->getStride(); 498 for ( y = ((CUHeight - 1) >> 1); y >= 0; y-- ) 499 { 500 for ( x = ((CUWidth - 1) >> 1); x >= 0; x-- ) 501 { 502 rpbCUSynthesied[0] &= (pAvail[x] != 0); 503 } 504 for ( x = CUWidth - 1; x >= ((CUWidth) >> 1); x-- ) 505 { 506 rpbCUSynthesied[1] &= (pAvail[x] != 0); 507 } 508 pAvail += iStride; 509 } 510 //for ( y = CUHeight - 1; y >= ((CUHeight) >> 1); y-- ) 511 for ( y = ((CUHeight - 1) >> 1); y >= 0; y-- ) //Owieczka 512 { 513 for ( x = ((CUWidth - 1) >> 1); x >= 0; x-- ) 514 { 515 rpbCUSynthesied[2] &= (pAvail[x] != 0); 516 } 517 for ( x = CUWidth - 1; x >= ((CUWidth) >> 1); x-- ) 518 { 519 rpbCUSynthesied[3] &= (pAvail[x] != 0); 520 } 521 pAvail += iStride; 522 } 523 524 //rpbCUSynthesied[0] = !rpbCUSynthesied[0]; 525 //rpbCUSynthesied[1] = !rpbCUSynthesied[1]; 526 //rpbCUSynthesied[2] = !rpbCUSynthesied[2]; 527 //rpbCUSynthesied[3] = !rpbCUSynthesied[3]; 528 } 529 #endif
Note: See TracChangeset for help on using the changeset viewer.