Changeset 539 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder
- Timestamp:
- 19 Jul 2013, 17:02:35 (11 years ago)
- Location:
- branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCavlc.cpp
r537 r539 550 550 } 551 551 } 552 } 552 } 553 554 #if H_3D_QTLPC 555 if( depthFlag ) 556 { 557 WRITE_FLAG( pcSPS->getUseQTL() ? 1 : 0, "use_qtl_flag"); 558 WRITE_FLAG( pcSPS->getUsePC() ? 1 : 0, "use_pc_flag"); 559 } 560 #endif 561 553 562 //// sps_extension_vui_parameters( ) END 554 563 WRITE_UVLC( 0, "sps_shvc_reserved_zero_idc" ); -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCfg.h
r537 r539 401 401 Bool m_useDLT; 402 402 #endif 403 404 #if H_3D_QTLPC 405 Bool m_bUseQTL; 406 Bool m_bUsePC; 407 #endif 408 403 409 #endif 404 410 public: … … 946 952 Void setUseDLT ( Bool b) { m_useDLT = b; } 947 953 #endif 954 955 #if H_3D_QTLPC 956 Void setUseQTL ( Bool b ) { m_bUseQTL = b; } 957 Bool getUseQTL () { return m_bUseQTL; } 958 Void setUsePC ( Bool b ) { m_bUsePC = b; } 959 Bool getUsePC () { return m_bUsePC; } 960 #endif 961 948 962 #endif // H_3D 949 963 }; -
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 } -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSbac.cpp
r531 r539 730 730 { 731 731 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 732 733 #if H_3D_QTLPC 734 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 735 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 736 Bool bDepthMapDetect = (pcTexture != NULL); 737 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 738 739 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 740 741 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC() ) 742 { 743 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 744 UInt uiCUIdx = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU(); 745 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); 746 if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) != SIZE_NxN) 747 { 748 assert( eSize == SIZE_2Nx2N ); 749 return; 750 } 751 } 752 #endif 753 732 754 if ( pcCU->isIntra( uiAbsPartIdx ) ) 733 755 { … … 989 1011 990 1012 assert( uiCtx < 3 ); 1013 1014 #if H_3D_QTLPC 1015 Bool bCodeSplitFlag = true; 1016 1017 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 1018 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 1019 Bool bDepthMapDetect = (pcTexture != NULL); 1020 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 1021 1022 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 1023 1024 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC()) 1025 { 1026 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 1027 UInt uiCUIdx = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU(); 1028 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); 1029 bCodeSplitFlag = (pcTextureCU->getDepth(uiCUIdx) > uiDepth); 1030 } 1031 1032 if(!bCodeSplitFlag) 1033 { 1034 assert(uiCurrSplitFlag == 0); 1035 return; 1036 } 1037 #endif 1038 991 1039 m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) ); 992 1040 #if !H_MV_ENC_DEC_TRAC -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.cpp
r537 r539 1614 1614 } 1615 1615 1616 #if H_3D_QTLPC 1617 rpcPic->setReduceBitsFlag(true); 1618 #endif 1619 1616 1620 TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr ); 1617 1621 if ( pcSlice->getSPS()->getUseSAO() && (pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma()) ) … … 1723 1727 } 1724 1728 } 1729 #if H_3D_QTLPC 1730 rpcPic->setReduceBitsFlag(false); 1731 #endif 1725 1732 } 1726 1733 if( depSliceSegmentsEnabled ) -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.cpp
r537 r539 588 588 m_cSPS.setUseAMP ( m_useAMP ); 589 589 590 #if H_3D_QTLPC 591 m_cSPS.setUseQTL( m_bUseQTL ); 592 m_cSPS.setUsePC ( m_bUsePC ); 593 #endif 594 590 595 for (i = g_uiMaxCUDepth-g_uiAddCUDepth; i < g_uiMaxCUDepth; i++ ) 591 596 {
Note: See TracChangeset for help on using the changeset viewer.