Changeset 193 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
- Timestamp:
- 19 Nov 2012, 21:15:40 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r166 r193 580 580 { 581 581 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 582 #if OL_DEPTHLIMIT_A0044 583 UInt uiSymbol; 584 #endif 582 585 if ( pcCU->isIntra( uiAbsPartIdx ) ) 583 586 { … … 585 588 { 586 589 m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) ); 587 } 590 #if OL_DEPTHLIMIT_A0044 591 if(pcCU->getPartDumpFlag()) 592 { 593 uiSymbol = (UInt)(eSize == SIZE_2Nx2N? 1 : 0); 594 pcCU->updatePartInfo(uiSymbol?0:1,uiDepth); //0 for 2Nx2N and 1 for NxN 595 pcCU->incrementPartInfo(); 596 } 597 #endif 598 } 599 #if OL_DEPTHLIMIT_A0044 600 if(pcCU->getPartDumpFlag() && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth && !pcCU->getSlice()->isIntra()) 601 { 602 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N and 1 for NxN 603 pcCU->incrementPartInfo(); 604 } 605 #endif 588 606 return; 589 607 } … … 591 609 switch(eSize) 592 610 { 593 611 case SIZE_2Nx2N: 594 612 { 595 613 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 614 #if OL_DEPTHLIMIT_A0044 615 if(pcCU->getPartDumpFlag()) 616 { 617 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N 618 pcCU->incrementPartInfo(); 619 } 620 #endif 596 621 break; 597 622 } 598 599 600 623 case SIZE_2NxN: 624 case SIZE_2NxnU: 625 case SIZE_2NxnD: 601 626 { 602 627 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); … … 623 648 } 624 649 } 650 #if OL_DEPTHLIMIT_A0044 651 if(pcCU->getPartDumpFlag()) 652 { 653 pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN 654 pcCU->incrementPartInfo(); 655 } 656 #endif 625 657 break; 626 658 } 627 628 629 659 case SIZE_Nx2N: 660 case SIZE_nLx2N: 661 case SIZE_nRx2N: 630 662 { 631 663 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); … … 656 688 } 657 689 } 690 #if OL_DEPTHLIMIT_A0044 691 if(pcCU->getPartDumpFlag()) 692 { 693 pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N 694 pcCU->incrementPartInfo(); 695 } 696 #endif 658 697 break; 659 698 } 660 699 case SIZE_NxN: 661 700 { 662 701 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) ) … … 665 704 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 666 705 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 706 #if OL_DEPTHLIMIT_A0044 707 if(pcCU->getPartDumpFlag()) 708 { 709 pcCU->updatePartInfo(1,uiDepth); //2Nx2N here since we disable NxN in Inter 710 pcCU->incrementPartInfo(); 711 } 712 #endif 713 } 714 else 715 { 716 #if OL_DEPTHLIMIT_A0044 717 if(pcCU->getPartDumpFlag()) 718 { 719 pcCU->updatePartInfo(0,uiDepth); //2Nx2N here since we disable NxN in Inter 720 pcCU->incrementPartInfo(); 721 } 722 #endif 667 723 } 668 724 break; 669 725 } 670 726 default: 671 727 { 672 728 assert(0); … … 785 841 uiNumCand = pcCU->getSlice()->getMaxNumMergeCand(); 786 842 #if HHI_MPI 787 #if VSP_ TEXT_ONLY843 #if VSP_N 788 844 TComDataCU* pcTextCU = pcCU->getSlice()->getSPS()->getUseMVI() ? pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ) : NULL; 789 845 Int aiRefIdxVsp[2] = { pcTextCU ? pcTextCU->getCUMvField( RefPicList(0) )->getRefIdx( uiAbsPartIdx ) : -1, 790 846 pcTextCU ? pcTextCU->getCUMvField( RefPicList(1) )->getRefIdx( uiAbsPartIdx ) : -1 }; 791 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 792 && !( aiRefIdxVsp[0] >= 0 && pcTextCU->getSlice()->getRefViewId( RefPicList(0), aiRefIdxVsp[0] ) == NUM_VIEW_VSP ) 793 && !( aiRefIdxVsp[1] >= 0 && pcTextCU->getSlice()->getRefViewId( RefPicList(1), aiRefIdxVsp[1] ) == NUM_VIEW_VSP ); 794 #else 795 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 847 #if VSP_CFG 848 const Bool bMVIAvailable = (pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || pcCU->getSlice()->getViewId()==0) 849 ? pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 850 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 851 && !( aiRefIdxVsp[0] >= pcCU->getSlice()->getNumRefIdx( RefPicList(0) ) ) 852 && !( aiRefIdxVsp[1] >= pcCU->getSlice()->getNumRefIdx( RefPicList(1) ) ); 853 #else 854 const Bool bMVIAvailable = pcCU->getSlice()->getVspDepthDisableFlag() ? pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 855 && !( aiRefIdxVsp[0] >= 0 && pcTextCU->isVspRef( RefPicList(0), aiRefIdxVsp[0] ) ) 856 && !( aiRefIdxVsp[1] >= 0 && pcTextCU->isVspRef( RefPicList(1), aiRefIdxVsp[1] ) ) 857 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 858 #endif 796 859 #endif 797 860 if( bMVIAvailable ) … … 858 921 assert( uiCtx < 3 ); 859 922 m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) ); 923 #if OL_DEPTHLIMIT_A0044 924 if(pcCU->getPartDumpFlag()) 925 { 926 if(pcCU->getSlice()->isIntra() || (!pcCU->getSlice()->isIntra() && uiCurrSplitFlag!=0)) 927 { 928 pcCU->updatePartInfo(uiCurrSplitFlag,uiDepth); 929 pcCU->incrementPartInfo(); 930 } 931 } 932 #endif 860 933 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 861 934 DTRACE_CABAC_T( "\tSplitFlag\n" )
Note: See TracChangeset for help on using the changeset viewer.