Changeset 790 in 3DVCSoftware
- Timestamp:
- 22 Jan 2014, 09:44:36 (11 years ago)
- Location:
- branches/HTM-9.3-dev2-MediaTek
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.3-dev2-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp
r773 r790 3250 3250 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3251 3251 { 3252 #if MTK_NBDV_IVREF_FIX_G0067 3253 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1) 3254 #else 3252 3255 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() ) 3256 #endif 3253 3257 { 3254 3258 return false; … … 4229 4233 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 4230 4234 4235 #if MTK_NBDV_IVREF_FIX_G0067 4236 if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1) 4237 #else 4231 4238 if ( ivMvPredFlag ) 4239 #endif 4232 4240 { 4233 4241 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP ); … … 6425 6433 // Init disparity struct for results 6426 6434 pDInfo->bDV = false; 6435 #if MTK_NBDV_IVREF_FIX_G0067 6436 pDInfo->m_aVIdxCan = -1; 6437 #endif 6427 6438 // Init struct for disparities from MCP neighboring blocks 6428 6439 IDVInfo cIDVInfo; -
branches/HTM-9.3-dev2-MediaTek/source/Lib/TLibCommon/TypeDef.h
r785 r790 77 77 #define H_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 78 78 // HHI_QTLPC_RAU_OFF_C0160 // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 79 79 #ifdef H_3D_QTLPC 80 #define MTK_TEX_DEP_PAR_G0055 1 // Texture-partition-dependent depth partition. JCT3V-G0055 81 #endif 80 82 #define H_3D_VSO 1 // VSO, View synthesis optimization, includes: 81 83 // HHI_VSO … … 117 119 // NBDV_DEFAULT_VIEWIDX_BUGFIX Bug fix for invalid default view index for NBDV 118 120 // NTT_DoNBDV_VECTOR_CLIP_E0141 disparity vector clipping in DoNBDV, JCT3V-E0141 and JCT3V-E0209 121 #define MTK_NBDV_IVREF_FIX_G0067 0 // Disable IvMC, VSP when IVREF is not available, JCT3V-G0067 119 122 #endif 120 123 -
branches/HTM-9.3-dev2-MediaTek/source/Lib/TLibDecoder/TDecSbac.cpp
r773 r790 783 783 784 784 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); 785 785 #if MTK_TEX_DEP_PAR_G0055 786 Bool depthDependent = false; 787 UInt uiTexturePart = uiMode; 788 #endif 786 789 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC()) 787 790 { 788 791 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 789 792 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 793 #if !MTK_TEX_DEP_PAR_G0055 790 794 if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN) 795 #else 796 if(pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth ) 797 { 798 depthDependent = true; 799 uiTexturePart = pcTextureCU->getPartitionSize( uiAbsPartIdx ); 800 } 801 if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N) 802 #endif 791 803 { 792 804 bParsePartSize = false; … … 796 808 #endif 797 809 798 810 799 811 if ( pcCU->isIntra( uiAbsPartIdx ) ) 800 812 { … … 803 815 { 804 816 #endif 805 uiSymbol = 1;817 uiSymbol = 1; 806 818 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 807 819 { … … 834 846 { 835 847 #endif 836 UInt uiMaxNumBits = 2; 837 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 838 { 839 uiMaxNumBits ++; 840 } 841 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 842 { 843 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 844 if ( uiSymbol ) 845 { 846 break; 847 } 848 uiMode++; 849 } 850 eMode = (PartSize) uiMode; 851 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 852 { 853 if (eMode == SIZE_2NxN) 854 { 855 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 856 if (uiSymbol == 0) 848 #if MTK_TEX_DEP_PAR_G0055 849 if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N) 850 { 851 #endif 852 UInt uiMaxNumBits = 2; 853 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 854 { 855 uiMaxNumBits ++; 856 } 857 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 858 { 859 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 860 if ( uiSymbol ) 857 861 { 858 m_pcTDecBinIf->decodeBinEP(uiSymbol); 859 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 862 break; 860 863 } 861 } 862 else if (eMode == SIZE_Nx2N) 863 { 864 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 865 if (uiSymbol == 0) 864 uiMode++; 865 } 866 eMode = (PartSize) uiMode; 867 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 868 { 869 if (eMode == SIZE_2NxN) 866 870 { 867 m_pcTDecBinIf->decodeBinEP(uiSymbol); 868 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 871 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 872 if (uiSymbol == 0) 873 { 874 m_pcTDecBinIf->decodeBinEP(uiSymbol); 875 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 876 } 869 877 } 870 } 871 } 878 else if (eMode == SIZE_Nx2N) 879 { 880 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 881 if (uiSymbol == 0) 882 { 883 m_pcTDecBinIf->decodeBinEP(uiSymbol); 884 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 885 } 886 } 887 } 888 #if MTK_TEX_DEP_PAR_G0055 889 } 890 else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD) 891 { 892 UInt uiMaxNumBits = 1; 893 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 894 { 895 uiMaxNumBits ++; 896 } 897 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 898 { 899 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 900 if ( uiSymbol ) 901 { 902 break; 903 } 904 uiMode++; 905 } 906 eMode = (PartSize) uiMode; 907 if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==1 ) 908 { 909 eMode = SIZE_2NxN; 910 } 911 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0 && uiSymbol==0) 912 { 913 eMode = SIZE_2NxN; 914 } 915 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==0) 916 { 917 m_pcTDecBinIf->decodeBinEP(uiSymbol); 918 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 919 } 920 } 921 else if(uiTexturePart == SIZE_Nx2N|| uiTexturePart==SIZE_nLx2N || uiTexturePart==SIZE_nRx2N) 922 { 923 UInt uiMaxNumBits = 1; 924 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 925 { 926 uiMaxNumBits ++; 927 } 928 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 929 { 930 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 931 if ( uiSymbol ) 932 { 933 break; 934 } 935 uiMode++; 936 } 937 eMode = (PartSize) uiMode; 938 if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==1 ) 939 { 940 eMode = SIZE_Nx2N; 941 } 942 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0 && uiSymbol==0) 943 { 944 eMode = SIZE_Nx2N; 945 } 946 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==0) 947 { 948 m_pcTDecBinIf->decodeBinEP(uiSymbol); 949 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 950 } 951 } 952 else 953 assert(0); 954 #endif 872 955 #if H_MV_ENC_DEC_TRAC 873 956 DTRACE_CU("part_mode", eMode ) -
branches/HTM-9.3-dev2-MediaTek/source/Lib/TLibEncoder/TEncCu.cpp
r785 r790 544 544 bTryNx2N = false; 545 545 bTry2NxN = false; 546 #if MTK_TEX_DEP_PAR_G0055 547 if( pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize(uiCUIdx) != SIZE_2Nx2N) 548 { 549 if(pcTextureCU->getPartitionSize(uiCUIdx)==SIZE_2NxN || pcTextureCU->getPartitionSize(uiCUIdx)==SIZE_2NxnU|| pcTextureCU->getPartitionSize(uiCUIdx)==SIZE_2NxnD) 550 bTry2NxN = true; 551 else 552 bTryNx2N = true; 553 } 554 #endif 546 555 } 547 556 } -
branches/HTM-9.3-dev2-MediaTek/source/Lib/TLibEncoder/TEncSbac.cpp
r773 r790 678 678 679 679 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); 680 680 #if MTK_TEX_DEP_PAR_G0055 681 Bool depthDependent = false; 682 UInt uiTexturePart = eSize; 683 #endif 681 684 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC() ) 682 685 { … … 684 687 UInt uiCUIdx = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU(); 685 688 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); 689 #if !MTK_TEX_DEP_PAR_G0055 686 690 if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) != SIZE_NxN) 691 #else 692 if(pcTextureCU->getDepth(uiCUIdx) == uiDepth ) 693 { 694 depthDependent = true; 695 uiTexturePart = pcTextureCU->getPartitionSize( uiCUIdx ); 696 } 697 if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) == SIZE_2Nx2N) 698 #endif 687 699 { 688 700 assert( eSize == SIZE_2Nx2N ); … … 702 714 return; 703 715 } 704 716 705 717 #if H_MV_ENC_DEC_TRAC 706 718 DTRACE_CU("part_mode", eSize ) 707 719 #endif 708 switch(eSize) 709 { 710 case SIZE_2Nx2N: 711 { 712 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 713 break; 714 } 715 case SIZE_2NxN: 716 case SIZE_2NxnU: 717 case SIZE_2NxnD: 718 { 719 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 720 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 721 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 722 { 723 if (eSize == SIZE_2NxN) 720 #if MTK_TEX_DEP_PAR_G0055 721 if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N) 722 { 723 #endif 724 switch(eSize) 725 { 726 case SIZE_2Nx2N: 724 727 { 725 m_pcBinIf->encodeBin(1, m_cCUAMPSCModel.get( 0, 0, 0 )); 728 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 729 break; 726 730 } 727 else 731 case SIZE_2NxN: 732 case SIZE_2NxnU: 733 case SIZE_2NxnD: 728 734 { 729 m_pcBinIf->encodeBin(0, m_cCUAMPSCModel.get( 0, 0, 0 )); 735 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 736 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 737 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 738 { 739 if (eSize == SIZE_2NxN) 740 { 741 m_pcBinIf->encodeBin(1, m_cCUAMPSCModel.get( 0, 0, 0 )); 742 } 743 else 744 { 745 m_pcBinIf->encodeBin(0, m_cCUAMPSCModel.get( 0, 0, 0 )); 746 m_pcBinIf->encodeBinEP((eSize == SIZE_2NxnU? 0: 1)); 747 } 748 } 749 break; 750 } 751 case SIZE_Nx2N: 752 case SIZE_nLx2N: 753 case SIZE_nRx2N: 754 { 755 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 756 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 757 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) ) 758 { 759 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 760 } 761 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 762 { 763 if (eSize == SIZE_Nx2N) 764 { 765 m_pcBinIf->encodeBin(1, m_cCUAMPSCModel.get( 0, 0, 0 )); 766 } 767 else 768 { 769 m_pcBinIf->encodeBin(0, m_cCUAMPSCModel.get( 0, 0, 0 )); 770 m_pcBinIf->encodeBinEP((eSize == SIZE_nLx2N? 0: 1)); 771 } 772 } 773 break; 774 } 775 case SIZE_NxN: 776 { 777 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) ) 778 { 779 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 780 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 781 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 782 } 783 break; 784 } 785 default: 786 { 787 assert(0); 788 } 789 } 790 #if MTK_TEX_DEP_PAR_G0055 791 } 792 else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD) 793 { 794 //assert(eSize!=SIZE_NxN); 795 //assert(eSize!=SIZE_Nx2N); 796 //assert(eSize==SIZE_2Nx2N || eSize==SIZE_2NxN || eSize==SIZE_2NxnU || eSize==SIZE_2NxnD); 797 switch(eSize) 798 { 799 case SIZE_2Nx2N: 800 { 801 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 802 break; 803 } 804 case SIZE_2NxN: 805 { 806 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 807 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 808 { 809 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 810 } 811 break; 812 } 813 case SIZE_2NxnU: 814 case SIZE_2NxnD: 815 { 816 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 817 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 730 818 m_pcBinIf->encodeBinEP((eSize == SIZE_2NxnU? 0: 1)); 819 break; 731 820 } 732 } 733 break; 734 } 735 case SIZE_Nx2N: 736 case SIZE_nLx2N: 737 case SIZE_nRx2N: 738 { 739 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 740 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 741 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) ) 742 { 743 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 744 } 745 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 746 { 747 if (eSize == SIZE_Nx2N) 821 default: 748 822 { 749 m_pcBinIf->encodeBin(1, m_cCUAMPSCModel.get( 0, 0, 0 ));823 assert(0); 750 824 } 751 else 825 } 826 } 827 else if(uiTexturePart == SIZE_Nx2N|| uiTexturePart==SIZE_nLx2N || uiTexturePart==SIZE_nRx2N) 828 { 829 //assert(eSize!=SIZE_NxN); 830 //assert(eSize!=SIZE_2NxN); 831 //assert(eSize==SIZE_2Nx2N ||eSize==SIZE_Nx2N || eSize==SIZE_nLx2N || eSize==SIZE_nRx2N); 832 switch(eSize) 833 { 834 case SIZE_2Nx2N: 752 835 { 753 m_pcBinIf->encodeBin(0, m_cCUAMPSCModel.get( 0, 0, 0 )); 836 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 837 break; 838 } 839 case SIZE_Nx2N: 840 { 841 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 842 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 843 { 844 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 845 } 846 break; 847 } 848 case SIZE_nLx2N: 849 case SIZE_nRx2N: 850 { 851 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 852 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 754 853 m_pcBinIf->encodeBinEP((eSize == SIZE_nLx2N? 0: 1)); 854 break; 755 855 } 756 } 757 break; 758 } 759 case SIZE_NxN: 760 { 761 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) ) 762 { 763 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 764 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 765 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 766 } 767 break; 768 } 769 default: 770 { 856 default: 857 { 858 assert(0); 859 } 860 } 861 } 862 else 863 { 864 printf("uiTexturePart=%d",uiTexturePart); 771 865 assert(0); 772 866 } 773 } 867 #endif 774 868 } 775 869
Note: See TracChangeset for help on using the changeset viewer.