Changeset 11 in 3DVCSoftware for branches/0.2-poznan-univ/source/Lib/TLibCommon
- Timestamp:
- 5 Feb 2012, 22:00:22 (13 years ago)
- Location:
- branches/0.2-poznan-univ/source/Lib/TLibCommon
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.2-poznan-univ/source/Lib/TLibCommon/CommonDef.h
r8 r11 58 58 59 59 #define HM_VERSION "3.0rc2" ///< Current software version 60 #define NV_VERSION "0. 2" ///< Current software version60 #define NV_VERSION "0.3" ///< Current software version 61 61 62 62 // ==================================================================================================================== … … 137 137 #define LOG2_DISP_PREC_LUT 2 ///< log2 of disparity precision used in integer disparity LUTs 138 138 139 140 139 #if ( HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED ) 141 140 #define DEPTH_MAP_GENERATION 1 … … 171 170 #define OUTPUT_RESIDUAL_PICTURES 0 // output residual pictures (for debugging) 172 171 173 #define HHI_MPI_MERGE_POS 0 // position of mvi in merge list (0..5) 174 172 #define HHI_MPI_MERGE_POS 0 // position of mvi in merge list (0..5) 173 174 // ==================================================================================================================== 175 // POZNAN DEFINE SECTION 176 // ==================================================================================================================== 177 #define POZNAN_OUTPUT_AVAILABLE_MAP 0 // output available map (for debugging) 178 #define POZNAN_OUTPUT_SYNTH 0 // output synthesised view (for debugging) 175 179 176 180 // ==================================================================================================================== -
branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDataCU.cpp
r5 r11 2711 2711 pcCULeft = NULL; 2712 2712 } 2713 if( pcCULeft && !pcCULeft->isIntra( uiLeftPartIdx ) ) 2713 if( pcCULeft && !pcCULeft->isIntra( uiLeftPartIdx ) 2714 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 2715 && !pcCULeft->isCUSkiped( uiLeftPartIdx ) 2716 #endif 2717 ) 2714 2718 { 2715 2719 abCandIsInter[uiLeftAddr] = true; … … 2737 2741 pcCUAbove = NULL; 2738 2742 } 2739 if ( pcCUAbove && !pcCUAbove->isIntra( uiAbovePartIdx ) ) 2743 if ( pcCUAbove && !pcCUAbove->isIntra( uiAbovePartIdx ) 2744 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 2745 && !pcCUAbove->isCUSkiped( uiAbovePartIdx ) 2746 #endif 2747 ) 2740 2748 { 2741 2749 abCandIsInter[uiAboveAddr] = true; … … 3271 3279 if( uiIter == 0 ) 3272 3280 { 3273 if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) ) 3281 if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) 3282 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 3283 && !pcCorner->isCUSkiped( uiCornerPUIdx ) 3284 #endif 3285 ) 3274 3286 { 3275 3287 rbValidCand = true; … … 3306 3318 else 3307 3319 { 3308 if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) ) 3320 if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) 3321 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 3322 && !pcCorner->isCUSkiped( uiCornerPUIdx ) 3323 #endif 3324 ) 3309 3325 { 3310 3326 rbValidCand = true; … … 4425 4441 if (pColCU->isIntra(uiPartIdxCenter)) 4426 4442 return false; 4443 4444 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 4445 if (pColCU->isSkipped(uiPartIdxCenter)) 4446 return false; 4447 #endif 4427 4448 4428 4449 if( m_pcSlice->getRefPic(eRefPicList, iRefIdx)->getViewIdx() != m_pcSlice->getViewIdx() ) -
branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDataCU.h
r5 r11 529 529 Bool isIntra ( UInt uiPartIdx ) { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; } 530 530 Bool isSkipped ( UInt uiPartIdx ); ///< SKIP (no residual) 531 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 532 Bool isCUSkiped( UInt uiPartIdx ) { return m_pePredMode[ uiPartIdx ] == MODE_SYNTH; } 533 #endif 531 534 532 535 // ------------------------------------------------------------------------------------------------------------------- -
branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
r5 r11 971 971 xInterPredictCUDepthMap( pcSubCU, pcSubDM ); 972 972 break; 973 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 974 case MODE_SYNTH: 975 //What to do? Need Fix! 976 xIntraPredictCUDepthMap( pcSubCU, pcSubDM ); 977 break; 978 #endif 973 979 default: 974 980 AOT( true ); -
branches/0.2-poznan-univ/source/Lib/TLibCommon/TComLoopFilter.cpp
r5 r11 444 444 445 445 //-- Set BS for Intra MB : BS = 4 or 3 446 if ( pcCUP->isIntra(uiPartP) || pcCUQ->isIntra(uiPartQ) ) 446 if ( pcCUP->isIntra(uiPartP) || pcCUQ->isIntra(uiPartQ) 447 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 448 || pcCUP->isCUSkiped(uiPartP) || pcCUQ->isCUSkiped(uiPartQ) 449 #endif 450 ) 447 451 { 448 452 uiBs = bAtCUBoundary ? 4 : 3; // Intra MB && MB boundary 449 453 } 450 454 451 455 //-- Set BS for not Intra MB : BS = 2 or 1 or 0 452 if ( !pcCUP->isIntra(uiPartP) && !pcCUQ->isIntra(uiPartQ) ) 456 if ( !pcCUP->isIntra(uiPartP) && !pcCUQ->isIntra(uiPartQ) 457 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 458 && !pcCUP->isCUSkiped(uiPartP) && !pcCUQ->isCUSkiped(uiPartQ) 459 #endif 460 ) 453 461 { 454 462 if ( pcCUQ->getCbf( uiPartQ, TEXT_LUMA, pcCUQ->getTransformIdx(uiPartQ)) != 0 || pcCUP->getCbf( uiPartP, TEXT_LUMA, pcCUP->getTransformIdx(uiPartP) ) != 0) … … 527 535 } // enf of "if( one of BCBP == 0 )" 528 536 } // enf of "if( not Intra )" 529 537 538 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU //if one of the block is CUSkipped dont use loop filter 539 if ( pcCUP->isCUSkiped(uiPartP) || pcCUQ->isCUSkiped(uiPartQ)) 540 { 541 uiBs = 0; 542 } 543 #endif 544 530 545 m_aapucBS[iDir][0][uiAbsPartIdx] = uiBs; 531 546 if ( bAtCUBoundary || bAtCUHalf ) -
branches/0.2-poznan-univ/source/Lib/TLibCommon/TComPic.cpp
r5 r11 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 52 58 #if DEPTH_MAP_GENERATION 53 59 m_pcPredDepthMap = NULL; … … 116 122 m_apcPicYuv[1] = NULL; 117 123 } 124 #if POZNAN_AVAIL_MAP 125 if (m_apcPicYuvAvail) 126 { 127 m_apcPicYuvAvail->destroy(); 128 delete m_apcPicYuvAvail; 129 m_apcPicYuvAvail = NULL; 130 } 131 #endif 132 133 #if POZNAN_SYNTH_VIEW 134 if (m_apcPicYuvSynth) 135 { 136 m_apcPicYuvSynth->destroy(); 137 delete m_apcPicYuvSynth; 138 m_apcPicYuvSynth = NULL; 139 } 140 #endif 118 141 119 142 #if DEPTH_MAP_GENERATION … … 193 216 } 194 217 218 #if POZNAN_AVAIL_MAP 219 Void 220 TComPic::addAvailabilityBuffer() 221 { 222 AOT( m_apcPicYuvAvail ); 223 AOF( m_apcPicYuv[1] ); 224 Int iWidth = m_apcPicYuv[1]->getWidth (); 225 Int iHeight = m_apcPicYuv[1]->getHeight (); 226 UInt uiMaxCuWidth = m_apcPicYuv[1]->getMaxCuWidth (); 227 UInt uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight(); 228 UInt uiMaxCuDepth = m_apcPicYuv[1]->getMaxCuDepth (); 229 m_apcPicYuvAvail = new TComPicYuv; 230 m_apcPicYuvAvail ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth ); 231 } 232 #endif 233 234 #if POZNAN_SYNTH_VIEW 235 Void 236 TComPic::addSynthesisBuffer() 237 { 238 AOT( m_apcPicYuvSynth ); 239 AOF( m_apcPicYuv[1] ); 240 Int iWidth = m_apcPicYuv[1]->getWidth (); 241 Int iHeight = m_apcPicYuv[1]->getHeight (); 242 UInt uiMaxCuWidth = m_apcPicYuv[1]->getMaxCuWidth (); 243 UInt uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight(); 244 UInt uiMaxCuDepth = m_apcPicYuv[1]->getMaxCuDepth (); 245 m_apcPicYuvSynth = new TComPicYuv; 246 m_apcPicYuvSynth ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth ); 247 } 248 #endif 249 195 250 #if PARALLEL_MERGED_DEBLK 196 251 Void … … 284 339 } 285 340 341 #if POZNAN_AVAIL_MAP 342 Void 343 TComPic::removeAvailabilityBuffer() 344 { 345 if( m_apcPicYuvAvail ) 346 { 347 m_apcPicYuvAvail->destroy(); 348 delete m_apcPicYuvAvail; 349 m_apcPicYuvAvail = NULL; 350 } 351 } 352 #endif 353 354 #if POZNAN_SYNTH_VIEW 355 Void 356 TComPic::removeSynthesisBuffer() 357 { 358 if( m_apcPicYuvSynth ) 359 { 360 m_apcPicYuvSynth->destroy(); 361 delete m_apcPicYuvSynth; 362 m_apcPicYuvSynth = NULL; 363 } 364 } 365 #endif 366 286 367 #if PARALLEL_MERGED_DEBLK 287 368 Void … … 349 430 #endif 350 431 432 #if POZNAN_AVAIL_MAP 433 Void TComPic::checkSynthesisAvailability( TComDataCU*& rpcCU, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied ) 434 { 435 rpbCUSynthesied[0] = true; 436 rpbCUSynthesied[1] = true; 437 rpbCUSynthesied[2] = true; 438 rpbCUSynthesied[3] = true; 439 440 if (!getPicYuvAvail()) 441 { 442 rpbCUSynthesied[0] = false; 443 rpbCUSynthesied[1] = false; 444 rpbCUSynthesied[2] = false; 445 rpbCUSynthesied[3] = false; 446 return; 447 } 448 449 Int x, y; 450 Bool bAvailable = true; 451 Pel* pAvail = getPicYuvAvail()->getLumaAddr ( iCuAddr, uiAbsZorderIdx ); 452 Int CUHeight = g_uiMaxCUHeight >> uiPartDepth; //rpcCU->getHeight(uiAbsZorderIdx); 453 Int CUWidth = g_uiMaxCUWidth >> uiPartDepth; //rpcCU->getWidth(uiAbsZorderIdx); 454 455 Int iStride = getPicYuvAvail()->getStride(); 456 for ( y = ((CUHeight - 1) >> 1); y >= 0; y-- ) 457 { 458 for ( x = ((CUWidth - 1) >> 1); x >= 0; x-- ) 459 { 460 rpbCUSynthesied[0] &= (pAvail[x] != 0); 461 } 462 for ( x = CUWidth - 1; x >= ((CUWidth) >> 1); x-- ) 463 { 464 rpbCUSynthesied[1] &= (pAvail[x] != 0); 465 } 466 pAvail += iStride; 467 } 468 //for ( y = CUHeight - 1; y >= ((CUHeight) >> 1); y-- ) 469 for ( y = ((CUHeight - 1) >> 1); y >= 0; y-- ) //Owieczka 470 { 471 for ( x = ((CUWidth - 1) >> 1); x >= 0; x-- ) 472 { 473 rpbCUSynthesied[2] &= (pAvail[x] != 0); 474 } 475 for ( x = CUWidth - 1; x >= ((CUWidth) >> 1); x-- ) 476 { 477 rpbCUSynthesied[3] &= (pAvail[x] != 0); 478 } 479 pAvail += iStride; 480 } 481 482 //rpbCUSynthesied[0] = !rpbCUSynthesied[0]; 483 //rpbCUSynthesied[1] = !rpbCUSynthesied[1]; 484 //rpbCUSynthesied[2] = !rpbCUSynthesied[2]; 485 //rpbCUSynthesied[3] = !rpbCUSynthesied[3]; 486 } 487 #endif -
branches/0.2-poznan-univ/source/Lib/TLibCommon/TComPic.h
r5 r11 61 61 62 62 TComPicYuv* m_apcPicYuv[2]; // Texture, 0:org / 1:rec 63 64 #if POZNAN_AVAIL_MAP 65 TComPicYuv* m_apcPicYuvAvail; // Availability Map - Does the given pixel can be synthesised in receiver 66 #endif 67 68 #if POZNAN_SYNTH_VIEW 69 TComPicYuv* m_apcPicYuvSynth; // Sythesied image 70 #endif 71 63 72 #if DEPTH_MAP_GENERATION 64 73 TComPicYuv* m_pcPredDepthMap; // estimated depth map … … 126 135 TComPicYuv* getPicYuvOrg() { return m_apcPicYuv[0]; } 127 136 TComPicYuv* getPicYuvRec() { return m_apcPicYuv[1]; } 137 138 #if POZNAN_AVAIL_MAP 139 TComPicYuv* getPicYuvAvail() { return m_apcPicYuvAvail; } //Owieczka - returns available map from other pic image 140 #endif 141 142 #if POZNAN_SYNTH_VIEW 143 TComPicYuv* getPicYuvSynth() { return m_apcPicYuvSynth; } //Owieczka - returns synth form other pic in image 144 #endif 128 145 129 146 #if DEPTH_MAP_GENERATION … … 196 213 197 214 Void addOriginalBuffer (); 215 #if POZNAN_AVAIL_MAP 216 Void addAvailabilityBuffer (); 217 #endif 218 #if POZNAN_SYNTH_VIEW 219 Void addSynthesisBuffer (); 220 #endif 198 221 #if PARALLEL_MERGED_DEBLK 199 222 Void addDeblockBuffer (); … … 214 237 215 238 Void removeOriginalBuffer (); 239 #if POZNAN_SYNTH_VIEW 240 Void removeSynthesisBuffer (); 241 #endif 242 #if POZNAN_AVAIL_MAP 243 Void removeAvailabilityBuffer(); 244 #endif 216 245 #if PARALLEL_MERGED_DEBLK 217 246 Void removeDeblockBuffer (); … … 228 257 #if HHI_INTERVIEW_SKIP 229 258 Void removeUsedPelsMapBuffer (); 259 #endif 260 261 #if POZNAN_AVAIL_MAP 262 Void checkSynthesisAvailability( TComDataCU*& rpcBestCU, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied); 230 263 #endif 231 264 -
branches/0.2-poznan-univ/source/Lib/TLibCommon/TComResidualGenerator.cpp
r5 r11 306 306 xSetRecResidualInterCU( pcSubCU, pcSubRes ); 307 307 break; 308 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 309 case MODE_SYNTH: 310 xSetRecResidualIntraCU( pcSubCU, pcSubRes ); //MayBe it should be seperate function 311 break; 312 #endif 308 313 default: 309 314 AOT( true ); -
branches/0.2-poznan-univ/source/Lib/TLibCommon/TComSlice.cpp
r5 r11 676 676 // AMVP parameter 677 677 ::memset( m_aeAMVPMode, 0, sizeof( m_aeAMVPMode ) ); 678 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 678 679 m_bUseDMM = false; 680 #endif 679 681 } 680 682 -
branches/0.2-poznan-univ/source/Lib/TLibCommon/TComSlice.h
r5 r11 452 452 453 453 Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } 454 TComSPS* getSPS () { return m_pcSPS; }454 TComSPS* getSPS () { return m_pcSPS; } 455 455 456 456 Void setPPS ( TComPPS* pcPPS ) { m_pcPPS = pcPPS; } -
branches/0.2-poznan-univ/source/Lib/TLibCommon/TypeDef.h
r5 r11 61 61 //<<<<< HHI 3DV tools <<<<< 62 62 63 //<<<<< Poznan 3DV tools <<<<<< 64 #define POZNAN_CU_SKIP 1 //Poznan Cu Skip 65 #define POZNAN_CU_SYNTH 1 //Poznan Cu Synth 66 67 #define POZNAN_AVAIL_MAP 1 //Creates Availibity buffers in all needed classes 68 69 #define POZNAN_SYNTH_VIEW 1 //Creates view synthesis buffers in all needed classes 70 #define POZNAN_SYNTH_DEPTH 1 71 72 #define POZNAN_SYNTH 1 //Creates aligned synthesis classes in encoder and decoder 73 74 #define POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 1 //Poznan CU Skip 75 #define POZNAN_FILL_OCCLUDED_CU_WITH_SYNTHESIS 1 //Fills not sended CUs with synthesized data 76 77 #define POZNAN_CU_SKIP_PSNR 1 //Poznan Cu Skip Display psnr of the codded CU only 78 //<<<<< Poznan 3DV tools <<<<<< 63 79 64 80 //////////////////////////// … … 575 591 MODE_INTER, ///< inter-prediction mode 576 592 MODE_INTRA, ///< intra-prediction mode 593 #if POZNAN_CU_SKIP 594 MODE_SYNTH, ///< synth-mode 595 #endif 577 596 MODE_NONE = 15 578 597 };
Note: See TracChangeset for help on using the changeset viewer.