Changeset 821 in 3DVCSoftware
- Timestamp:
- 5 Feb 2014, 12:28:40 (11 years ago)
- Location:
- branches/HTM-9.3-dev1-RWTH
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.cpp
r817 r821 2432 2432 // DBBP is a texture coding tool 2433 2433 if( getSlice()->getIsDepth() ) 2434 { 2434 2435 return NULL; 2436 } 2435 2437 2436 2438 #if H_3D_FCO … … 2454 2456 2455 2457 if( baseDepthPic == NULL || baseDepthPic->getPicYuvRec() == NULL ) 2458 { 2456 2459 return NULL; 2460 } 2457 2461 2458 2462 depthPicYuv = baseDepthPic->getPicYuvRec(); … … 5939 5943 #if H_3D_DBBP 5940 5944 if( getDBBPFlag(0) ) 5945 { 5941 5946 return true; 5947 } 5942 5948 #endif 5943 5949 -
branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.cpp
r820 r821 651 651 // SIZE_Nx2N 652 652 if(x<uiHalfSize) // left 653 { 653 654 matchedPartSum[0][ucSegment]++; 655 } 654 656 else // right 657 { 655 658 matchedPartSum[0][1-ucSegment]++; 659 } 656 660 657 661 // SIZE_2NxN 658 662 if(y<uiHalfSize) // top 663 { 659 664 matchedPartSum[1][ucSegment]++; 665 } 660 666 else // bottom 667 { 661 668 matchedPartSum[1][1-ucSegment]++; 669 } 662 670 663 671 if( bAMPAvail ) … … 665 673 // SIZE_2NxnU 666 674 if(y<uiQuarterSize) // top (1/4) 675 { 667 676 matchedPartSum[2][ucSegment]++; 677 } 668 678 else // bottom (3/4) 679 { 669 680 matchedPartSum[2][1-ucSegment]++; 681 } 670 682 671 683 // SIZE_2NxnD 672 684 if(y<(uiQuarterSize*3)) // top (3/4) 685 { 673 686 matchedPartSum[3][ucSegment]++; 687 } 674 688 else // bottom (1/4) 689 { 675 690 matchedPartSum[3][1-ucSegment]++; 691 } 676 692 677 693 // SIZE_nLx2N 678 694 if(x<uiQuarterSize) // left (1/4) 695 { 679 696 matchedPartSum[4][ucSegment]++; 697 } 680 698 else // right (3/4) 699 { 681 700 matchedPartSum[4][1-ucSegment]++; 701 } 682 702 683 703 // SIZE_nRx2N 684 704 if(x<(uiQuarterSize*3)) // left (3/4) 705 { 685 706 matchedPartSum[5][ucSegment]++; 707 } 686 708 else // right (1/4) 709 { 687 710 matchedPartSum[5][1-ucSegment]++; 711 } 688 712 } 689 713 } … … 730 754 731 755 if( depthPel > uiMaxDepth ) 756 { 732 757 uiMaxDepth = depthPel; 758 } 733 759 if( depthPel < uiMinDepth ) 760 { 734 761 uiMinDepth = depthPel; 762 } 735 763 } 736 764 … … 741 769 // don't generate mask for blocks with small depth range (encoder decision) 742 770 if( uiMaxDepth - uiMinDepth < 10 ) 771 { 743 772 return false; 773 } 744 774 745 775 AOF(uiWidth==uiHeight); … … 764 794 765 795 if( bInvertMask ) 796 { 766 797 ucSegment = 1-ucSegment; 798 } 767 799 768 800 // count pixels for each segment … … 782 814 UInt uiMinPixPerSegment = (uiWidth*uiHeight) >> 3; 783 815 if( !( uiSumPix[0] > uiMinPixPerSegment && uiSumPix[1] > uiMinPixPerSegment ) ) 816 { 784 817 return false; 818 } 785 819 786 820 // all good -
branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComRdCost.cpp
r816 r821 327 327 328 328 #if H_3D_DBBP 329 if( g_bTestVirtualParts)329 if( m_bUseMask ) 330 330 { 331 331 if( eDFunc >= DF_SSE && eDFunc <= DF_SSE16N ) 332 { 332 333 rcDistParam.DistFunc = TComRdCost::xGetMaskedSSE; 334 } 333 335 else if( eDFunc >= DF_SAD && eDFunc <= DF_SADS16N ) 336 { 334 337 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 338 } 335 339 else if( eDFunc >= DF_HADS && eDFunc <= DF_HADS16N ) 340 { 336 341 rcDistParam.DistFunc = TComRdCost::xGetMaskedHADs; 342 } 337 343 else if( eDFunc >= DF_VSD && eDFunc <= DF_VSD16N ) 344 { 338 345 rcDistParam.DistFunc = TComRdCost::xGetMaskedVSD; 346 } 339 347 else if( eDFunc >= DF_SAD12 && eDFunc <= DF_SADS48 ) 348 { 340 349 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 350 } 341 351 } 342 352 #endif … … 377 387 378 388 #if H_3D_DBBP 379 if( g_bTestVirtualParts)389 if( m_bUseMask ) 380 390 { 381 391 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; … … 436 446 437 447 #if H_3D_DBBP 438 if( g_bTestVirtualParts ) 439 { 440 if( !bHADME ) 441 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 442 else 443 rcDistParam.DistFunc = TComRdCost::xGetMaskedHADs; 448 if( m_bUseMask ) 449 { 450 rcDistParam.DistFunc = (bHADME)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD; 444 451 } 445 452 #endif … … 468 475 469 476 #if H_3D_DBBP 470 if( g_bTestVirtualParts ) 471 { 472 if( !bHadamard ) 473 rcDP.DistFunc = TComRdCost::xGetMaskedSAD; 474 else 475 rcDP.DistFunc = TComRdCost::xGetMaskedHADs; 477 if( m_bUseMask ) 478 { 479 rcDP.DistFunc = (bHadamard)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD; 476 480 } 477 481 #endif … … 735 739 { 736 740 if( piOrg[n] != DBBP_INVALID_SHORT ) 741 { 737 742 uiSum += abs( piOrg[n] - piCur[n] ); 743 } 738 744 } 739 745 piOrg += iStrideOrg; … … 775 781 { 776 782 if( piOrg[x] != DBBP_INVALID_SHORT ) 783 { 777 784 uiSum += xCalcHADs8x8( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 785 } 778 786 } 779 787 piOrg += iOffsetOrg; … … 791 799 { 792 800 if( piOrg[x] != DBBP_INVALID_SHORT ) 801 { 793 802 uiSum += xCalcHADs16x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 803 } 794 804 } 795 805 piOrg += iOffsetOrg; … … 806 816 { 807 817 if( piOrg[x] != DBBP_INVALID_SHORT ) 818 { 808 819 uiSum += xCalcHADs4x16( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 820 } 809 821 } 810 822 piOrg += iOffsetOrg; … … 823 835 { 824 836 if( piOrg[x] != DBBP_INVALID_SHORT ) 837 { 825 838 uiSum += xCalcHADs4x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 839 } 826 840 } 827 841 piOrg += iOffsetOrg; … … 838 852 { 839 853 if( piOrg[x] != DBBP_INVALID_SHORT ) 854 { 840 855 uiSum += xCalcHADs2x2( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 856 } 841 857 } 842 858 piOrg += iOffsetOrg; -
branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComRdCost.h
r816 r821 184 184 #endif 185 185 186 #if H_3D_DBBP 187 Bool m_bUseMask; 188 #endif 189 186 190 public: 187 191 TComRdCost(); … … 229 233 Void setDistParam( TComPattern* pcPatternKey, Pel* piRefY, Int iRefStride, Int iStep, DistParam& rcDistParam, Bool bHADME=false ); 230 234 Void setDistParam( DistParam& rcDP, Int bitDepth, Pel* p1, Int iStride1, Pel* p2, Int iStride2, Int iWidth, Int iHeight, Bool bHadamard = false ); 235 #endif 236 237 #if H_3D_DBBP 238 Void setUseMask(Bool b) { m_bUseMask = b; } 231 239 #endif 232 240 -
branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComRom.cpp
r816 r821 106 106 // ==================================================================================================================== 107 107 108 #if H_3D_DBBP109 Bool g_bTestVirtualParts;110 #endif111 112 108 UInt g_uiMaxCUWidth = MAX_CU_SIZE; 113 109 UInt g_uiMaxCUHeight = MAX_CU_SIZE; -
branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComRom.h
r816 r821 72 72 // ==================================================================================================================== 73 73 74 #if H_3D_DBBP75 extern Bool g_bTestVirtualParts;76 #endif77 78 74 // flexible conversion from relative to absolute index 79 75 extern UInt g_auiZscanToRaster[ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; -
branches/HTM-9.3-dev1-RWTH/source/Lib/TLibEncoder/TEncCu.cpp
r820 r821 2438 2438 2439 2439 if( !bValidMask ) 2440 { 2440 2441 return; 2442 } 2441 2443 2442 2444 // find optimal motion/disparity vector for each segment … … 2458 2460 2459 2461 // do motion estimation for this segment 2460 g_bTestVirtualParts = true;2462 m_pcRdCost->setUseMask(true); 2461 2463 rpcTempCU->getDBBPTmpData()->eVirtualPartSize = eVirtualPartSize; 2462 2464 rpcTempCU->getDBBPTmpData()->uiVirtualPartIndex = uiSegment; 2463 2465 m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, false, bUseMRG ); 2464 g_bTestVirtualParts = false;2466 m_pcRdCost->setUseMask(false); 2465 2467 2466 2468 // extract motion parameters of full block for this segment
Note: See TracChangeset for help on using the changeset viewer.