Changeset 181 in 3DVCSoftware for branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSbac.cpp
- Timestamp:
- 14 Nov 2012, 17:23:56 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.1-dev2-Orange/source/Lib/TLibEncoder/TEncSbac.cpp
r177 r181 618 618 { 619 619 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 620 #if OL_DEPTHLIMIT_A0044 621 UInt uiSymbol; 622 #endif 620 621 #if OL_QTLIMIT_PREDCODING_B0068 622 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 623 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 624 Bool bDepthMapDetect = (pcTexture != NULL); 625 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 626 627 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 628 { 629 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 630 UInt uiCUIdx = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU(); 631 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); 632 if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) != SIZE_NxN) 633 { 634 assert( eSize == SIZE_2Nx2N ); 635 return; 636 } 637 } 638 #endif 639 623 640 if ( pcCU->isIntra( uiAbsPartIdx ) ) 624 641 { … … 626 643 { 627 644 m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) ); 628 #if OL_DEPTHLIMIT_A0044 629 if(pcCU->getPartDumpFlag()) 630 { 631 uiSymbol = (UInt)(eSize == SIZE_2Nx2N? 1 : 0); 632 pcCU->updatePartInfo(uiSymbol?0:1,uiDepth); //0 for 2Nx2N and 1 for NxN 633 pcCU->incrementPartInfo(); 634 } 635 #endif 636 } 637 #if OL_DEPTHLIMIT_A0044 638 if(pcCU->getPartDumpFlag() && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth && !pcCU->getSlice()->isIntra()) 639 { 640 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N and 1 for NxN 641 pcCU->incrementPartInfo(); 642 } 643 #endif 645 } 644 646 return; 645 647 } … … 650 652 { 651 653 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 652 #if OL_DEPTHLIMIT_A0044653 if(pcCU->getPartDumpFlag())654 {655 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N656 pcCU->incrementPartInfo();657 }658 #endif659 654 break; 660 655 } … … 686 681 } 687 682 } 688 #if OL_DEPTHLIMIT_A0044689 if(pcCU->getPartDumpFlag())690 {691 pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN692 pcCU->incrementPartInfo();693 }694 #endif695 683 break; 696 684 } … … 726 714 } 727 715 } 728 #if OL_DEPTHLIMIT_A0044729 if(pcCU->getPartDumpFlag())730 {731 pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N732 pcCU->incrementPartInfo();733 }734 #endif735 716 break; 736 717 } … … 742 723 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 743 724 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 744 #if OL_DEPTHLIMIT_A0044745 if(pcCU->getPartDumpFlag())746 {747 pcCU->updatePartInfo(1,uiDepth); //2Nx2N here since we disable NxN in Inter748 pcCU->incrementPartInfo();749 }750 #endif751 }752 else753 {754 #if OL_DEPTHLIMIT_A0044755 if(pcCU->getPartDumpFlag())756 {757 pcCU->updatePartInfo(0,uiDepth); //2Nx2N here since we disable NxN in Inter758 pcCU->incrementPartInfo();759 }760 #endif761 725 } 762 726 break; … … 951 915 952 916 assert( uiCtx < 3 ); 917 918 #if OL_QTLIMIT_PREDCODING_B0068 919 Bool bCodeSplitFlag = true; 920 921 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 922 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 923 Bool bDepthMapDetect = (pcTexture != NULL); 924 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 925 926 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 927 { 928 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 929 UInt uiCUIdx = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU(); 930 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); 931 bCodeSplitFlag = (pcTextureCU->getDepth(uiCUIdx) > uiDepth); 932 } 933 934 if(!bCodeSplitFlag) 935 { 936 assert(uiCurrSplitFlag == 0); 937 return; 938 } 939 #endif 940 953 941 m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) ); 954 #if OL_DEPTHLIMIT_A0044955 if(pcCU->getPartDumpFlag())956 {957 if(pcCU->getSlice()->isIntra() || (!pcCU->getSlice()->isIntra() && uiCurrSplitFlag!=0))958 {959 pcCU->updatePartInfo(uiCurrSplitFlag,uiDepth);960 pcCU->incrementPartInfo();961 }962 }963 #endif964 942 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 965 943 DTRACE_CABAC_T( "\tSplitFlag\n" )
Note: See TracChangeset for help on using the changeset viewer.