Changeset 539 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCu.cpp
- Timestamp:
- 19 Jul 2013, 17:02:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCu.cpp
r537 r539 388 388 TComPic* pcPic = rpcBestCU->getPic(); 389 389 390 #if H_3D_QTLPC 391 TComSPS *sps = pcPic->getSlice(0)->getSPS(); 392 TComPic *pcTexture = rpcBestCU->getSlice()->getTexturePic(); 393 394 Bool depthMapDetect = (pcTexture != NULL); 395 Bool bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE); 396 397 Bool rapPic = (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 398 399 Bool bTry2NxN = true; 400 Bool bTryNx2N = true; 401 #endif 402 390 403 // get Original YUV data from picture 391 404 m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); … … 481 494 482 495 rpcTempCU->initEstData( uiDepth, iQP ); 496 497 #if H_3D_QTLPC 498 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 499 500 if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL()) 501 { 502 TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU 503 UInt uiCUIdx = rpcBestCU->getZorderIdxInCU(); 504 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); //Depth cannot be more partitionned than the texture. 505 if (pcTextureCU->getDepth(uiCUIdx) > uiDepth || pcTextureCU->getPartitionSize(uiCUIdx) == SIZE_NxN) //Texture was split. 506 { 507 bTrySplit = true; 508 bTryNx2N = true; 509 bTry2NxN = true; 510 } 511 else 512 { 513 bTrySplit = false; 514 bTryNx2N = false; 515 bTry2NxN = false; 516 } 517 } 518 #endif 519 483 520 #if H_3D_NBDV 484 521 DisInfo DvInfo; … … 575 612 } 576 613 577 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) 578 { 579 if(iQP == iBaseQP) 614 #if H_3D_QTLPC 615 if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL()) 616 { 617 bTrySplitDQP = bTrySplit; 618 } 619 else 620 { 621 #endif 622 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) 623 { 624 if(iQP == iBaseQP) 625 { 626 bTrySplitDQP = bTrySplit; 627 } 628 } 629 else 580 630 { 581 631 bTrySplitDQP = bTrySplit; 582 632 } 583 } 584 else 585 { 586 bTrySplitDQP = bTrySplit; 587 } 633 #if H_3D_QTLPC 634 } 635 #endif 588 636 if (isAddLowestQP && (iQP == lowestQP)) 589 637 { … … 625 673 if(!( (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) )) 626 674 { 627 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 675 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu 676 #if H_3D_QTLPC 677 && bTrySplit 678 #endif 679 ) 628 680 { 629 681 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); … … 634 686 635 687 // 2NxN, Nx2N 636 if(doNotBlockPu) 688 if(doNotBlockPu 689 #if H_3D_QTLPC 690 && bTryNx2N 691 #endif 692 ) 637 693 { 638 694 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); … … 643 699 } 644 700 } 645 if(doNotBlockPu) 701 if(doNotBlockPu 702 #if H_3D_QTLPC 703 && bTry2NxN 704 #endif 705 ) 646 706 { 647 707 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); … … 671 731 if ( bTestAMP_Hor ) 672 732 { 673 if(doNotBlockPu) 733 if(doNotBlockPu 734 #if H_3D_QTLPC 735 && bTry2NxN 736 #endif 737 ) 674 738 { 675 739 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); … … 680 744 } 681 745 } 682 if(doNotBlockPu) 746 if(doNotBlockPu 747 #if H_3D_QTLPC 748 && bTry2NxN 749 #endif 750 ) 683 751 { 684 752 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); … … 693 761 else if ( bTestMergeAMP_Hor ) 694 762 { 695 if(doNotBlockPu) 763 if(doNotBlockPu 764 #if H_3D_QTLPC 765 && bTry2NxN 766 #endif 767 ) 696 768 { 697 769 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); … … 702 774 } 703 775 } 704 if(doNotBlockPu) 776 if(doNotBlockPu 777 #if H_3D_QTLPC 778 && bTry2NxN 779 #endif 780 ) 705 781 { 706 782 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); … … 717 793 if ( bTestAMP_Ver ) 718 794 { 719 if(doNotBlockPu) 795 if(doNotBlockPu 796 #if H_3D_QTLPC 797 && bTryNx2N 798 #endif 799 ) 720 800 { 721 801 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); … … 726 806 } 727 807 } 728 if(doNotBlockPu) 808 if(doNotBlockPu 809 #if H_3D_QTLPC 810 && bTryNx2N 811 #endif 812 ) 729 813 { 730 814 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); … … 735 819 else if ( bTestMergeAMP_Ver ) 736 820 { 737 if(doNotBlockPu) 821 if(doNotBlockPu 822 #if H_3D_QTLPC 823 && bTryNx2N 824 #endif 825 ) 738 826 { 739 827 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); … … 744 832 } 745 833 } 746 if(doNotBlockPu) 834 if(doNotBlockPu 835 #if H_3D_QTLPC 836 && bTryNx2N 837 #endif 838 ) 747 839 { 748 840 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); … … 753 845 754 846 #else 755 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 756 rpcTempCU->initEstData( uiDepth, iQP ); 757 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 758 rpcTempCU->initEstData( uiDepth, iQP ); 759 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 760 rpcTempCU->initEstData( uiDepth, iQP ); 761 762 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 763 rpcTempCU->initEstData( uiDepth, iQP ); 847 #if H_3D_QTLPC 848 if (bTry2NxN) 849 { 850 #endif 851 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 852 rpcTempCU->initEstData( uiDepth, iQP ); 853 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 854 rpcTempCU->initEstData( uiDepth, iQP ); 855 #if H_3D_QTLPC 856 } 857 if (bTryNx2N) 858 { 859 #endif 860 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 861 rpcTempCU->initEstData( uiDepth, iQP ); 862 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 863 rpcTempCU->initEstData( uiDepth, iQP ); 864 #if H_3D_QTLPC 865 } 866 #endif 764 867 765 868 #endif … … 789 892 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 790 893 { 791 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 894 #if H_3D_QTLPC //Try IntraNxN 895 if(bTrySplit) 792 896 { 793 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 794 rpcTempCU->initEstData( uiDepth, iQP ); 897 #endif 898 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 899 { 900 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 901 rpcTempCU->initEstData( uiDepth, iQP ); 902 } 903 #if H_3D_QTLPC 795 904 } 905 #endif 796 906 } 797 907 }
Note: See TracChangeset for help on using the changeset viewer.