Changeset 193 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder
- Timestamp:
- 19 Nov 2012, 21:15:40 (12 years ago)
- Location:
- branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r166 r193 695 695 WRITE_FLAG( 1, "base_view_flag" ); 696 696 } 697 #if VSP_N 698 if( pcSPS->getViewId() ) 699 { 700 WRITE_FLAG( pcSPS->getVspPresentFlag(), "vsp_present_flag" ); 701 #if VSP_CFG 702 if( pcSPS->getVspPresentFlag() ) 703 { 704 WRITE_FLAG( pcSPS->getVspDepthPresentFlag(), "vsp_depth_present_flag" ); 705 } 706 #endif 707 } 708 #endif 697 709 WRITE_FLAG( 0, "sps_extension2_flag" ); 698 710 } … … 707 719 #if ENC_DEC_TRACE 708 720 xTraceSliceHeader (pcSlice); 721 #endif 722 723 #if VSP_CFG 724 Int iNumOfVspRefsL0 = 0; 725 Int iNumOfVspRefsL1 = 0; 709 726 #endif 710 727 … … 949 966 } 950 967 968 #if VSP_SLICE_HEADER && VSP_CFG 969 if( pcSlice->getSPS()->getViewId()!=0 970 && pcSlice->getSliceType() != I_SLICE 971 && pcSlice->getSPS()->getVspPresentFlag() 972 ) 973 { 974 if( !pcSlice->getSPS()->isDepth() || pcSlice->getSPS()->getVspDepthPresentFlag() ) 975 { 976 WRITE_UVLC( pcSlice->getNumVspRefPics(), "num_vsp_ref_pics"); 977 for( UInt i = 0; i < pcSlice->getNumVspRefPics(); i++ ) 978 { 979 WRITE_UVLC( pcSlice->getVspRefPos( REF_PIC_LIST_0, i ), "vsp_ref_list0_pos"); 980 if( pcSlice->getSliceType() == B_SLICE ) 981 { 982 WRITE_UVLC( pcSlice->getVspRefPos( REF_PIC_LIST_1, i ), "vsp_ref_list1_pos"); 983 } 984 } 985 iNumOfVspRefsL0 = ( (pcSlice->getSPS()->getViewId()==0 986 || (!pcSlice->getSPS()->getVspDepthPresentFlag() && pcSlice->getSPS()->isDepth()) 987 || !pcSlice->getVspFlag() 988 || pcSlice->getVspRefPos(REF_PIC_LIST_0, 0) == 0 ) ? 0 : 1 ); 989 iNumOfVspRefsL1 = ( (pcSlice->getSPS()->getViewId()==0 990 || (!pcSlice->getSPS()->getVspDepthPresentFlag() && pcSlice->getSPS()->isDepth()) 991 || !pcSlice->getVspFlag() 992 || pcSlice->getVspRefPos(REF_PIC_LIST_1, 0) == 0 ) ? 0 : 1 ); 993 } 994 } 995 #endif 996 951 997 // we always set num_ref_idx_active_override_flag equal to one. this might be done in a more intelligent way 952 998 if (!pcSlice->isIntra()) 953 999 { 954 1000 WRITE_FLAG( 1 , "num_ref_idx_active_override_flag"); 1001 #if VSP_CFG 1002 WRITE_CODE( pcSlice->getNumRefIdx( REF_PIC_LIST_0 ) - 1 - iNumOfVspRefsL0, 3, "num_ref_idx_l0_active_minus1" ); 1003 #else 955 1004 WRITE_CODE( pcSlice->getNumRefIdx( REF_PIC_LIST_0 ) - 1, 3, "num_ref_idx_l0_active_minus1" ); 1005 #endif 956 1006 } 957 1007 else … … 961 1011 if (pcSlice->isInterB()) 962 1012 { 1013 #if VSP_CFG 1014 WRITE_CODE( pcSlice->getNumRefIdx( REF_PIC_LIST_1 ) - 1 - iNumOfVspRefsL1, 3, "num_ref_idx_l1_active_minus1" ); 1015 #else 963 1016 WRITE_CODE( pcSlice->getNumRefIdx( REF_PIC_LIST_1 ) - 1, 3, "num_ref_idx_l1_active_minus1" ); 1017 #endif 964 1018 } 965 1019 else … … 1050 1104 if(pcSlice->getRefPicListCombinationFlag()) 1051 1105 { 1106 #if VSP_CFG 1107 WRITE_UVLC( pcSlice->getNumRefIdx(REF_PIC_LIST_C) - 1 - iNumOfVspRefsL0, "num_ref_idx lc_active_minus1"); 1108 #else 1052 1109 WRITE_UVLC( pcSlice->getNumRefIdx(REF_PIC_LIST_C) - 1, "num_ref_idx lc_active_minus1"); 1110 #endif 1053 1111 1054 1112 #if H0412_REF_PIC_LIST_RESTRICTION … … 1180 1238 #endif 1181 1239 1240 #if !VSP_CFG 1182 1241 #if VSP_SLICE_HEADER 1183 1242 if( pcSlice->getSPS()->getViewId()!=0 1184 #if VSP_TEXT_ONLY 1185 && !(pcSlice->getSPS()->isDepth()) 1186 #endif 1243 && pcSlice->getSPS()->getVspPresentFlag() 1187 1244 ) 1188 1245 { 1189 1246 WRITE_FLAG( pcSlice->getVspFlag()?1:0, "vsp_flag" ); 1190 1247 // printf("[VSP: %d] ", pcSlice->getVspFlag()?1:0); 1191 } 1192 #endif 1193 1248 if( pcSlice->getVspFlag() ) 1249 { 1250 WRITE_FLAG( pcSlice->getVspDepthDisableFlag()?1:0 , "vsp_depth_disable_flag" ); 1251 } 1252 } 1253 #endif 1254 #endif 1194 1255 } 1195 1256 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCfg.h
r100 r193 67 67 Int m_interViewRefPosL0[MAX_NUM_REF_PICS]; 68 68 Int m_interViewRefPosL1[MAX_NUM_REF_PICS]; 69 #if VSP_CFG 70 Int m_numVSPRefPics; 71 Int m_VSPRefPics[MAX_NUM_REF_PICS]; 72 Int m_VSPRefPosL0[MAX_NUM_REF_PICS]; 73 Int m_VSPRefPosL1[MAX_NUM_REF_PICS]; 74 #endif 69 75 GOPEntryMvc() 70 76 : m_POC(-1) … … 81 87 , m_numRefIdc() 82 88 , m_numInterViewRefPics() 89 #if VSP_CFG 90 , m_numVSPRefPics() 91 #endif 83 92 { 84 93 ::memset( m_referencePics, 0, sizeof(m_referencePics) ); … … 88 97 ::memset( m_interViewRefPosL0, 0, sizeof(m_interViewRefPosL0) ); 89 98 ::memset( m_interViewRefPosL1, 0, sizeof(m_interViewRefPosL1) ); 99 #if VSP_CFG 100 ::memset( m_VSPRefPics, 0, sizeof(m_VSPRefPics) ); 101 ::memset( m_VSPRefPosL0, 0, sizeof(m_VSPRefPosL0) ); 102 ::memset( m_VSPRefPosL1, 0, sizeof(m_VSPRefPosL1) ); 103 #endif 90 104 } 91 105 }; … … 204 218 Double m_dLambdaScaleVSO; 205 219 UInt m_uiVSOMode; 220 #if LGE_WVSO_A0119 221 Bool m_bUseWVSO; 222 Int m_iVSOWeight; 223 Int m_iVSDWeight; 224 Int m_iDWeight; 225 #endif 206 226 #endif 207 227 #if SAIT_VSO_EST_A0033 … … 210 230 #endif 211 231 232 #if VSP_SLICE_HEADER 233 Bool m_bUseVSP; 234 Bool m_bVSPDepthDisable; 235 #endif 212 236 213 237 //====== Tool list ======== … … 266 290 Int m_iColumnRowInfoPresent; 267 291 Int m_iUniformSpacingIdr; 292 #if FIX_REMOVE_TILE_DEPENDENCE 293 #else 268 294 Int m_iTileBoundaryIndependenceIdr; 295 #endif 269 296 Int m_iNumColumnsMinus1; 270 297 UInt* m_puiColumnWidth; … … 281 308 Int m_iWaveFrontSubstreams; 282 309 283 boolm_pictureDigestEnabled; ///< enable(1)/disable(0) md5 computation and SEI signalling310 Bool m_pictureDigestEnabled; ///< enable(1)/disable(0) md5 computation and SEI signalling 284 311 285 312 //====== Weighted Prediction ======== … … 309 336 #endif 310 337 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 311 Bool m_bUseDMM; 338 Bool m_bUseDMM; 339 #endif 340 341 #if OL_DEPTHLIMIT_A0044 342 Bool m_bDepthPartitionLimiting; 312 343 #endif 313 344 … … 466 497 Void setAllowNegDist ( Bool b ) { m_bAllowNegDist = b; }; 467 498 #endif 499 #if LGE_WVSO_A0119 500 Void setUseWVSO ( Bool b ) { m_bUseWVSO = b; } 501 Void setVSOWeight ( Int i ) { m_iVSOWeight = i; } 502 Void setVSDWeight ( Int i ) { m_iVSDWeight = i; } 503 Void setDWeight ( Int i ) { m_iDWeight = i; } 504 #endif 468 505 #endif 469 506 … … 546 583 Bool getAllowNegDist () { return m_bAllowNegDist; } 547 584 #endif 585 #if LGE_WVSO_A0119 586 Bool getUseWVSO () { return m_bUseWVSO; } 587 Int getVSOWeight () { return m_iVSOWeight; } 588 Int getVSDWeight () { return m_iVSDWeight; } 589 Int getDWeight () { return m_iDWeight; } 590 #endif 548 591 #endif 549 592 … … 571 614 #if HHI_VSO 572 615 Void setUseVSO ( Bool b ) { m_bUseVSO = b; } 616 #endif 617 618 #if VSP_SLICE_HEADER 619 Void setUseVSP ( Bool b ) { m_bUseVSP = b; } 620 Void setVSPDepthDisable ( Bool b ) { m_bVSPDepthDisable = b; } 573 621 #endif 574 622 … … 623 671 #endif 624 672 673 #if VSP_SLICE_HEADER 674 Bool getUseVSP () { return m_bUseVSP; } 675 Bool getVSPDepthDisable () { return m_bVSPDepthDisable; } 676 #endif 677 625 678 Bool getUseFastEnc () { return m_bUseFastEnc; } 626 679 Bool getUseEarlyCU () { return m_bUseEarlyCU; } … … 657 710 Void setSliceGranularity ( Int i ) { m_iSliceGranularity = i; } 658 711 Int getSliceGranularity () { return m_iSliceGranularity; } 659 Void setLFCrossSliceBoundaryFlag( Bool bValue ) { m_bLFCrossSliceBoundaryFlag = bValue; }660 Bool getLFCrossSliceBoundaryFlag() { return m_bLFCrossSliceBoundaryFlag; }712 Void setLFCrossSliceBoundaryFlag ( Bool bValue ) { m_bLFCrossSliceBoundaryFlag = bValue; } 713 Bool getLFCrossSliceBoundaryFlag () { return m_bLFCrossSliceBoundaryFlag; } 661 714 662 715 #if HHI_MPI 663 Void setUseMVI (Bool bVal){m_bUseMVI = bVal;}664 #endif 665 Void setUseSAO (Bool bVal){m_bUseSAO = bVal;}666 Bool getUseSAO() {return m_bUseSAO;}716 Void setUseMVI ( Bool bVal ) {m_bUseMVI = bVal;} 717 #endif 718 Void setUseSAO ( Bool bVal ) {m_bUseSAO = bVal;} 719 Bool getUseSAO () {return m_bUseSAO;} 667 720 #if SAO_UNIT_INTERLEAVING 668 721 Void setMaxNumOffsetsPerPic (Int iVal) { m_maxNumOffsetsPerPic = iVal; } … … 795 848 796 849 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 797 Void setUseDMM( Bool b) { m_bUseDMM = b; } 798 Bool getUseDMM() { return m_bUseDMM; } 850 Void setUseDMM( Bool b) { m_bUseDMM = b; } 851 Bool getUseDMM() { return m_bUseDMM; } 852 #endif 853 854 #if OL_DEPTHLIMIT_A0044 855 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 856 Bool getUseDPL() {return m_bDepthPartitionLimiting;} 799 857 #endif 800 858 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r166 r193 451 451 TComPic* pcPic = rpcBestCU->getPic(); 452 452 453 #if OL_DEPTHLIMIT_A0044 454 TComSPS *sps = pcPic->getSlice(0)->getSPS(); 455 TComPic *pcTexture; 456 TComDataCU * pcTextureCU; 457 Bool depthMapDetect = false; 458 //UInt uiPrevTexPartIndex = 0; 459 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 460 Bool bIntraSliceDetect = false; 461 #endif 462 Bool bTry2NxN = false; 463 Bool bTryNx2N = false; 464 pcTexture = rpcBestCU->getSlice()->getTexturePic(); 465 if(pcTexture != NULL) //depth map being encoded 466 { 467 depthMapDetect = true; 468 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 469 bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType()==I_SLICE); 470 #endif 471 if(uiDepth == 0) 472 { 473 pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); 474 pcTexture->setPartInfo(pcTextureCU->readPartInfo()); 475 pcTexture->setTexPartIndex(0); 476 } 477 } 478 else 479 { 480 depthMapDetect = false; 481 } 482 #endif 453 483 // get Original YUV data from picture 454 484 m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); 455 485 #if FORCE_REF_VSP 456 //Bool bWholeCUCanBeSynthesized = false;486 Bool bWholeCUCanBeSynthesized = false; 457 487 //Bool bOneSubCUCanNotBeSynthesied = false; 458 488 Bool bSubCUCanBeSynthesized[4]; … … 476 506 if(iSubCUCanBeSynthesizedCnt == 4) 477 507 { 478 //bWholeCUCanBeSynthesized = true;508 bWholeCUCanBeSynthesized = true; 479 509 } 480 510 //else if(iSubCUCanBeSynthesizedCnt == 3) … … 488 518 // variables for fast encoder decision 489 519 Bool bEarlySkip = false; 490 Bool bTrySplit 520 Bool bTrySplit = true; 491 521 Double fRD_Skip = MAX_DOUBLE; 492 522 … … 499 529 Bool bTrySplitDQP = true; 500 530 501 static Double afCost [ MAX_CU_DEPTH ];531 static Double afCost [ MAX_CU_DEPTH ]; 502 532 static Int aiNum [ MAX_CU_DEPTH ]; 503 533 … … 581 611 isAddLowestQP = true; 582 612 iMinQP = iMinQP - 1; 583 613 584 614 } 585 615 #endif … … 624 654 625 655 rpcTempCU->initEstData( uiDepth, iQP ); 656 657 #if OL_DEPTHLIMIT_A0044 658 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 659 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 660 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 661 #else 662 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 663 #endif 664 { 665 assert(uiDepth == pcTexture->accessPartInfo(1)); 666 if(pcTexture->accessPartInfo(0) == 1) //NxN modes 667 { 668 bTrySplit = true; 669 bTryNx2N = true; 670 bTry2NxN = true; 671 //uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 672 pcTexture->incrementTexPartIndex(); 673 } 674 else if(pcTexture->accessPartInfo(0) == 0) //2Nx2N modes 675 { 676 UInt uiTexdepth; 677 UInt temp_uiTexPartIndex; 678 bTrySplit = false; 679 680 //scan ahead till next depth 681 uiTexdepth = pcTexture->accessPartInfo(1); 682 //uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 683 pcTexture->incrementTexPartIndex(); 684 temp_uiTexPartIndex = pcTexture->getTexPartIndex(); //store in case to rewind 685 686 while(uiTexdepth != pcTexture->accessPartInfo(1) && uiTexdepth != 0) 687 { 688 if(pcTexture->accessPartInfo(1) < uiTexdepth) 689 { 690 break; 691 } 692 pcTexture->incrementTexPartIndex(); 693 694 if(pcTexture->accessPartInfo(1) == OL_END_CU) 695 { 696 pcTexture->setTexPartIndex(temp_uiTexPartIndex); 697 uiTexdepth++; 698 if(uiTexdepth >= g_uiMaxCUDepth) 699 { 700 break; 701 } 702 } 703 } 704 } 705 else if(pcTexture->accessPartInfo(0) == OL_END_CU) 706 { 707 bTrySplit = false; 708 bTryNx2N = false; 709 bTry2NxN = false; 710 } 711 else if(pcTexture->accessPartInfo(0) == 2) //2NxN case 712 { 713 bTrySplit = false; 714 bTryNx2N = false; 715 bTry2NxN = true; 716 //uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 717 pcTexture->incrementTexPartIndex(); ; 718 } 719 else if(pcTexture->accessPartInfo(0) == 3) //Nx2N case 720 { 721 bTrySplit = false; 722 bTryNx2N = true; 723 bTry2NxN = false; 724 //uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 725 pcTexture->incrementTexPartIndex(); ; 726 } 727 } 728 #endif 729 626 730 627 731 // do inter modes, SKIP and 2Nx2N … … 648 752 #endif 649 753 #if HHI_INTER_VIEW_RESIDUAL_PRED 650 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 651 #endif 652 // SKIP 653 #if HHI_INTERVIEW_SKIP 654 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, bFullyRenderedSec ); 655 #else 656 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU ); 657 #endif 658 rpcTempCU->initEstData( uiDepth, iQP ); 659 660 // fast encoder decision for early skip 661 if ( m_pcEncCfg->getUseFastEnc() ) 754 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 755 #endif 756 // SKIP 757 #if HHI_INTERVIEW_SKIP 758 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, bFullyRenderedSec ); 759 #else 760 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU ); 761 #endif 762 rpcTempCU->initEstData( uiDepth, iQP ); 763 764 // fast encoder decision for early skip 765 if ( m_pcEncCfg->getUseFastEnc() ) 766 { 767 Int iIdx = g_aucConvertToBit[ rpcBestCU->getWidth(0) ]; 768 if ( aiNum [ iIdx ] > 5 && fRD_Skip < EARLY_SKIP_THRES*afCost[ iIdx ]/aiNum[ iIdx ] ) 769 { 770 bEarlySkip = true; 771 bTrySplit = false; 772 } 773 } 774 775 // 2Nx2N, NxN 776 if ( !bEarlySkip ) 777 { 778 #if HHI_INTER_VIEW_RESIDUAL_PRED 779 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 780 #endif 781 #if HHI_INTERVIEW_SKIP 782 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec ); 783 784 #else 785 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 786 #endif 787 rpcTempCU->initEstData( uiDepth, iQP ); 788 if(m_pcEncCfg->getUseCbfFastMode()) 789 { 790 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 791 } 792 793 #if FORCE_REF_VSP==1 794 #if VSP_CFG 795 if( rpcBestCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !rpcBestCU->getSlice()->getSPS()->isDepth() ) 796 #else 797 if( !rpcBestCU->getSlice()->getVspDepthDisableFlag() || !rpcBestCU->getSlice()->getSPS()->isDepth() ) 798 #endif 799 if( bWholeCUCanBeSynthesized ) 800 { 801 #if HHI_INTER_VIEW_RESIDUAL_PRED 802 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 803 #endif 804 #if HHI_INTERVIEW_SKIP 805 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec, false, true ); // VSP 806 #else 807 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 808 #endif 809 rpcTempCU->initEstData( uiDepth, iQP ); 810 } 811 #else 812 if( bWholeCUCanBeSynthesized ) // To avoid compiling warning 813 { 814 } 815 #endif 816 } 817 #if HHI_INTER_VIEW_RESIDUAL_PRED 818 } // uiResPrdId 819 #endif 820 } // != I_SLICE 821 822 #if OL_DEPTHLIMIT_A0044 823 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 824 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 825 #else 826 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 827 #endif 828 { 829 bTrySplitDQP = bTrySplit; 830 } 831 else 832 { 833 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) 662 834 { 663 Int iIdx = g_aucConvertToBit[ rpcBestCU->getWidth(0) ]; 664 if ( aiNum [ iIdx ] > 5 && fRD_Skip < EARLY_SKIP_THRES*afCost[ iIdx ]/aiNum[ iIdx ] ) 835 if(iQP == iBaseQP) 665 836 { 666 bEarlySkip = true; 667 bTrySplit = false; 837 bTrySplitDQP = bTrySplit; 668 838 } 669 839 } 670 671 // 2Nx2N, NxN 672 if ( !bEarlySkip ) 840 else 673 841 { 674 #if HHI_INTER_VIEW_RESIDUAL_PRED 675 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 676 #endif 677 #if HHI_INTERVIEW_SKIP 678 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec ); 679 680 #else 681 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 682 #endif 683 rpcTempCU->initEstData( uiDepth, iQP ); 684 if(m_pcEncCfg->getUseCbfFastMode()) 685 { 686 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 687 } 688 689 #if FORCE_REF_VSP==1 690 #if VSP_TEXT_ONLY 691 if( !rpcBestCU->getSlice()->getSPS()->isDepth() ) 692 #endif 693 #if HHI_INTER_VIEW_RESIDUAL_PRED 694 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 695 #endif 696 #if HHI_INTERVIEW_SKIP 697 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec, false, true ); // VSP 698 #else 699 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 700 #endif 701 rpcTempCU->initEstData( uiDepth, iQP ); 702 #endif 842 bTrySplitDQP = bTrySplit; 703 843 } 704 #if HHI_INTER_VIEW_RESIDUAL_PRED 705 } // uiResPrdId 706 #endif 707 } // != I_SLICE 708 844 } 845 #else 709 846 710 847 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) … … 719 856 bTrySplitDQP = bTrySplit; 720 857 } 858 #endif 721 859 #if LOSSLESS_CODING 722 860 if (isAddLowestQP && (iQP == lowestQP)) … … 760 898 Bool bResPredFlag = ( uiResPrdId > 0 ); 761 899 #endif 762 // 2Nx2N, NxN 763 if ( !bEarlySkip ) 764 { 765 766 if(!( rpcBestCU->getSlice()->getSPS()->getDisInter4x4() && (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) )) 767 { 768 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 900 // 2Nx2N, NxN 901 if ( !bEarlySkip ) 769 902 { 770 #if HHI_INTER_VIEW_RESIDUAL_PRED 771 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 772 #endif 773 #if HHI_INTERVIEW_SKIP 774 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 775 #else 776 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 777 #endif 778 rpcTempCU->initEstData( uiDepth, iQP ); 779 } 780 } 781 } 782 783 { // 2NxN, Nx2N 784 if(doNotBlockPu) 785 { 786 #if HHI_INTER_VIEW_RESIDUAL_PRED 787 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 788 #endif 789 #if HHI_INTERVIEW_SKIP 790 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 791 #else 792 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 793 #endif 794 rpcTempCU->initEstData( uiDepth, iQP ); 795 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 903 904 if(!( rpcBestCU->getSlice()->getSPS()->getDisInter4x4() && (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) )) 796 905 { 797 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 798 } 799 } 800 if(doNotBlockPu) 801 { 802 #if HHI_INTER_VIEW_RESIDUAL_PRED 803 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 804 #endif 805 #if HHI_INTERVIEW_SKIP 806 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 807 #else 808 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 809 #endif 810 rpcTempCU->initEstData( uiDepth, iQP ); 811 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 812 { 813 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 814 } 815 } 816 } 817 818 #if 1 819 //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 820 if( pcPic->getSlice(0)->getSPS()->getAMPAcc(uiDepth) ) 821 { 822 #if AMP_ENC_SPEEDUP 823 Bool bTestAMP_Hor = false, bTestAMP_Ver = false; 824 825 #if AMP_MRG 826 Bool bTestMergeAMP_Hor = false, bTestMergeAMP_Ver = false; 827 828 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver, bTestMergeAMP_Hor, bTestMergeAMP_Ver); 829 #else 830 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver); 831 #endif 832 833 //! Do horizontal AMP 834 if ( bTestAMP_Hor ) 835 { 836 if(doNotBlockPu) 837 { 838 #if HHI_INTER_VIEW_RESIDUAL_PRED 839 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 840 #endif 841 #if HHI_INTERVIEW_SKIP 842 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 843 #else 844 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 845 #endif 846 rpcTempCU->initEstData( uiDepth, iQP ); 847 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 906 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 848 907 { 849 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 850 } 851 } 852 if(doNotBlockPu) 853 { 854 #if HHI_INTER_VIEW_RESIDUAL_PRED 855 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 856 #endif 857 #if HHI_INTERVIEW_SKIP 858 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 859 #else 860 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 861 #endif 862 rpcTempCU->initEstData( uiDepth, iQP ); 863 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 864 { 865 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 908 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 909 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 910 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 911 #else 912 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 913 #endif 914 { 915 if (bTrySplit) 916 { 917 #endif 918 #if HHI_INTER_VIEW_RESIDUAL_PRED 919 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 920 #endif 921 #if HHI_INTERVIEW_SKIP 922 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 923 #else 924 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 925 #endif 926 rpcTempCU->initEstData( uiDepth, iQP ); 927 #if OL_DEPTHLIMIT_A0044 928 }//bTrySplit 929 }//depthMapDetect 930 else//do things normally 931 { 932 #if HHI_INTER_VIEW_RESIDUAL_PRED 933 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 934 #endif 935 #if HHI_INTERVIEW_SKIP 936 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 937 #else 938 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 939 #endif 940 rpcTempCU->initEstData( uiDepth, iQP ); 941 } 942 #endif 866 943 } 867 944 } 868 945 } 869 #if AMP_MRG 870 else if ( bTestMergeAMP_Hor ) 871 { 872 if(doNotBlockPu) 946 947 { // 2NxN, Nx2N 948 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 949 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 950 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 951 #else 952 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 953 #endif 873 954 { 874 #if HHI_INTER_VIEW_RESIDUAL_PRED 875 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 876 #endif 877 #if HHI_INTERVIEW_SKIP 878 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 879 #else 880 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 881 #endif 882 rpcTempCU->initEstData( uiDepth, iQP ); 883 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 955 if (bTryNx2N) 884 956 { 885 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 957 #endif 958 if(doNotBlockPu) 959 { 960 #if HHI_INTER_VIEW_RESIDUAL_PRED 961 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 962 #endif 963 #if HHI_INTERVIEW_SKIP 964 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 965 #else 966 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 967 #endif 968 rpcTempCU->initEstData( uiDepth, iQP ); 969 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 970 { 971 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 972 } 973 } 974 #if OL_DEPTHLIMIT_A0044 975 }//bTryNx2N 976 }//depthMapDetect 977 else//do things normally 978 { 979 if(doNotBlockPu) 980 { 981 #if HHI_INTER_VIEW_RESIDUAL_PRED 982 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 983 #endif 984 #if HHI_INTERVIEW_SKIP 985 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 986 #else 987 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 988 #endif 989 rpcTempCU->initEstData( uiDepth, iQP ); 990 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 991 { 992 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 993 } 886 994 } 887 995 } 888 if(doNotBlockPu) 996 #endif 997 998 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 999 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1000 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1001 #else 1002 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1003 #endif 889 1004 { 890 #if HHI_INTER_VIEW_RESIDUAL_PRED 891 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 892 #endif 893 #if HHI_INTERVIEW_SKIP 894 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 895 #else 896 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 897 #endif 898 rpcTempCU->initEstData( uiDepth, iQP ); 899 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1005 if (bTry2NxN) 900 1006 { 901 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1007 #endif 1008 if(doNotBlockPu) 1009 { 1010 #if HHI_INTER_VIEW_RESIDUAL_PRED 1011 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1012 #endif 1013 #if HHI_INTERVIEW_SKIP 1014 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 1015 #else 1016 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 1017 #endif 1018 rpcTempCU->initEstData( uiDepth, iQP ); 1019 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 1020 { 1021 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1022 } 1023 } 1024 #if OL_DEPTHLIMIT_A0044 1025 }//bTryNx2N 1026 }//depthMapDetect 1027 else//do things normally 1028 { 1029 if(doNotBlockPu) 1030 { 1031 #if HHI_INTER_VIEW_RESIDUAL_PRED 1032 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1033 #endif 1034 #if HHI_INTERVIEW_SKIP 1035 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 1036 #else 1037 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 1038 #endif 1039 rpcTempCU->initEstData( uiDepth, iQP ); 1040 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 1041 { 1042 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1043 } 902 1044 } 903 1045 } 1046 #endif 904 1047 } 905 #endif 906 907 //! Do horizontal AMP908 if ( bTestAMP_Ver)1048 1049 #if 1 1050 //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1051 if( pcPic->getSlice(0)->getSPS()->getAMPAcc(uiDepth) ) 909 1052 { 910 if(doNotBlockPu) 1053 #if AMP_ENC_SPEEDUP 1054 Bool bTestAMP_Hor = false, bTestAMP_Ver = false; 1055 1056 #if AMP_MRG 1057 Bool bTestMergeAMP_Hor = false, bTestMergeAMP_Ver = false; 1058 1059 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver, bTestMergeAMP_Hor, bTestMergeAMP_Ver); 1060 #else 1061 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver); 1062 #endif 1063 1064 //! Do horizontal AMP 1065 if ( bTestAMP_Hor ) 911 1066 { 912 #if HHI_INTER_VIEW_RESIDUAL_PRED 913 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 914 #endif 915 #if HHI_INTERVIEW_SKIP 916 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 917 #else 918 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 919 #endif 920 rpcTempCU->initEstData( uiDepth, iQP ); 921 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1067 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1068 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1069 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1070 #else 1071 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1072 #endif 922 1073 { 923 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1074 if (bTry2NxN) 1075 { 1076 #endif 1077 if(doNotBlockPu) 1078 { 1079 #if HHI_INTER_VIEW_RESIDUAL_PRED 1080 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1081 #endif 1082 #if HHI_INTERVIEW_SKIP 1083 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1084 #else 1085 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1086 #endif 1087 rpcTempCU->initEstData( uiDepth, iQP ); 1088 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1089 { 1090 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1091 } 1092 } 1093 if(doNotBlockPu) 1094 { 1095 #if HHI_INTER_VIEW_RESIDUAL_PRED 1096 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1097 #endif 1098 #if HHI_INTERVIEW_SKIP 1099 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1100 #else 1101 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1102 #endif 1103 rpcTempCU->initEstData( uiDepth, iQP ); 1104 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1105 { 1106 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1107 } 1108 } 1109 #if OL_DEPTHLIMIT_A0044 1110 }//bTry2NxN 1111 }//depthMapDetect 1112 else//do things normally 1113 { 1114 if(doNotBlockPu) 1115 { 1116 #if HHI_INTER_VIEW_RESIDUAL_PRED 1117 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1118 #endif 1119 #if HHI_INTERVIEW_SKIP 1120 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1121 #else 1122 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1123 #endif 1124 rpcTempCU->initEstData( uiDepth, iQP ); 1125 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1126 { 1127 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1128 } 1129 } 1130 if(doNotBlockPu) 1131 { 1132 #if HHI_INTER_VIEW_RESIDUAL_PRED 1133 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1134 #endif 1135 #if HHI_INTERVIEW_SKIP 1136 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1137 #else 1138 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1139 #endif 1140 rpcTempCU->initEstData( uiDepth, iQP ); 1141 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1142 { 1143 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1144 } 1145 } 924 1146 } 1147 #endif 925 1148 } 926 if(doNotBlockPu) 1149 #if AMP_MRG 1150 else if ( bTestMergeAMP_Hor ) 927 1151 { 928 #if HHI_INTER_VIEW_RESIDUAL_PRED 929 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 930 #endif 931 #if HHI_INTERVIEW_SKIP 932 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 933 #else 934 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 935 #endif 936 rpcTempCU->initEstData( uiDepth, iQP ); 1152 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1153 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1154 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1155 #else 1156 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1157 #endif 1158 { 1159 if (bTry2NxN) 1160 { 1161 #endif 1162 if(doNotBlockPu) 1163 { 1164 #if HHI_INTER_VIEW_RESIDUAL_PRED 1165 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1166 #endif 1167 #if HHI_INTERVIEW_SKIP 1168 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 1169 #else 1170 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 1171 #endif 1172 rpcTempCU->initEstData( uiDepth, iQP ); 1173 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1174 { 1175 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1176 } 1177 } 1178 if(doNotBlockPu) 1179 { 1180 #if HHI_INTER_VIEW_RESIDUAL_PRED 1181 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1182 #endif 1183 #if HHI_INTERVIEW_SKIP 1184 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 1185 #else 1186 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 1187 #endif 1188 rpcTempCU->initEstData( uiDepth, iQP ); 1189 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1190 { 1191 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1192 } 1193 } 1194 #if OL_DEPTHLIMIT_A0044 1195 }//bTry2NxN 1196 }//depthMapDetect 1197 else//do things normally 1198 { 1199 if(doNotBlockPu) 1200 { 1201 #if HHI_INTER_VIEW_RESIDUAL_PRED 1202 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1203 #endif 1204 #if HHI_INTERVIEW_SKIP 1205 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 1206 #else 1207 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 1208 #endif 1209 rpcTempCU->initEstData( uiDepth, iQP ); 1210 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1211 { 1212 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1213 } 1214 } 1215 if(doNotBlockPu) 1216 { 1217 #if HHI_INTER_VIEW_RESIDUAL_PRED 1218 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1219 #endif 1220 #if HHI_INTERVIEW_SKIP 1221 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 1222 #else 1223 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 1224 #endif 1225 rpcTempCU->initEstData( uiDepth, iQP ); 1226 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1227 { 1228 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1229 } 1230 } 1231 1232 } 1233 #endif 937 1234 } 938 } 1235 #endif 1236 1237 //! Do horizontal AMP 1238 if ( bTestAMP_Ver ) 1239 { 1240 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1241 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1242 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1243 #else 1244 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1245 #endif 1246 { 1247 if (bTryNx2N) 1248 { 1249 #endif 1250 if(doNotBlockPu) 1251 { 1252 #if HHI_INTER_VIEW_RESIDUAL_PRED 1253 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1254 #endif 1255 #if HHI_INTERVIEW_SKIP 1256 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1257 #else 1258 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1259 #endif 1260 rpcTempCU->initEstData( uiDepth, iQP ); 1261 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1262 { 1263 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1264 } 1265 } 1266 if(doNotBlockPu) 1267 { 1268 #if HHI_INTER_VIEW_RESIDUAL_PRED 1269 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1270 #endif 1271 #if HHI_INTERVIEW_SKIP 1272 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1273 #else 1274 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1275 #endif 1276 rpcTempCU->initEstData( uiDepth, iQP ); 1277 } 1278 #if OL_DEPTHLIMIT_A0044 1279 }//bTryNx2N 1280 }//depthMapDetect 1281 else//do things normally 1282 { 1283 if(doNotBlockPu) 1284 { 1285 #if HHI_INTER_VIEW_RESIDUAL_PRED 1286 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1287 #endif 1288 #if HHI_INTERVIEW_SKIP 1289 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1290 #else 1291 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1292 #endif 1293 rpcTempCU->initEstData( uiDepth, iQP ); 1294 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1295 { 1296 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1297 } 1298 } 1299 if(doNotBlockPu) 1300 { 1301 #if HHI_INTER_VIEW_RESIDUAL_PRED 1302 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1303 #endif 1304 #if HHI_INTERVIEW_SKIP 1305 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1306 #else 1307 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1308 #endif 1309 rpcTempCU->initEstData( uiDepth, iQP ); 1310 } 1311 } 1312 #endif 1313 } 939 1314 #if AMP_MRG 940 else if ( bTestMergeAMP_Ver ) 941 { 942 if(doNotBlockPu) 1315 else if ( bTestMergeAMP_Ver ) 943 1316 { 944 #if HHI_INTER_VIEW_RESIDUAL_PRED 945 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 946 #endif 947 #if HHI_INTERVIEW_SKIP 948 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 949 #else 950 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 951 #endif 952 rpcTempCU->initEstData( uiDepth, iQP ); 953 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1317 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1318 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1319 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1320 #else 1321 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1322 #endif 954 1323 { 955 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1324 if (bTryNx2N) 1325 { 1326 #endif 1327 if(doNotBlockPu) 1328 { 1329 #if HHI_INTER_VIEW_RESIDUAL_PRED 1330 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1331 #endif 1332 #if HHI_INTERVIEW_SKIP 1333 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 1334 #else 1335 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 1336 #endif 1337 rpcTempCU->initEstData( uiDepth, iQP ); 1338 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1339 { 1340 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1341 } 1342 } 1343 if(doNotBlockPu) 1344 { 1345 #if HHI_INTER_VIEW_RESIDUAL_PRED 1346 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1347 #endif 1348 #if HHI_INTERVIEW_SKIP 1349 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 1350 #else 1351 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 1352 #endif 1353 rpcTempCU->initEstData( uiDepth, iQP ); 1354 } 1355 #if OL_DEPTHLIMIT_A0044 1356 }//bTryNx2N 1357 }//depthMapDetect 1358 else//do things normally 1359 { 1360 if(doNotBlockPu) 1361 { 1362 #if HHI_INTER_VIEW_RESIDUAL_PRED 1363 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1364 #endif 1365 #if HHI_INTERVIEW_SKIP 1366 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 1367 #else 1368 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 1369 #endif 1370 rpcTempCU->initEstData( uiDepth, iQP ); 1371 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1372 { 1373 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1374 } 1375 } 1376 if(doNotBlockPu) 1377 { 1378 #if HHI_INTER_VIEW_RESIDUAL_PRED 1379 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1380 #endif 1381 #if HHI_INTERVIEW_SKIP 1382 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 1383 #else 1384 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 1385 #endif 1386 rpcTempCU->initEstData( uiDepth, iQP ); 1387 } 956 1388 } 1389 #endif 957 1390 } 958 if(doNotBlockPu) 959 { 960 #if HHI_INTER_VIEW_RESIDUAL_PRED 961 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 962 #endif 963 #if HHI_INTERVIEW_SKIP 964 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 965 #else 966 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 967 #endif 968 rpcTempCU->initEstData( uiDepth, iQP ); 969 } 970 } 971 #endif 972 973 #else 974 #if HHI_INTER_VIEW_RESIDUAL_PRED 975 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 976 #endif 977 #if HHI_INTERVIEW_SKIP 978 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 979 #else 980 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 981 #endif 982 rpcTempCU->initEstData( uiDepth, iQP ); 983 #if HHI_INTER_VIEW_RESIDUAL_PRED 984 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 985 #endif 986 #if HHI_INTERVIEW_SKIP 987 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 988 #else 989 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 990 #endif 991 rpcTempCU->initEstData( uiDepth, iQP ); 992 #if HHI_INTER_VIEW_RESIDUAL_PRED 993 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 994 #endif 995 #if HHI_INTERVIEW_SKIP 996 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 997 #else 998 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 999 #endif 1000 rpcTempCU->initEstData( uiDepth, iQP ); 1001 #if HHI_INTER_VIEW_RESIDUAL_PRED 1002 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1003 #endif 1004 #if HHI_INTERVIEW_SKIP 1005 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1006 #else 1007 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1008 #endif 1009 rpcTempCU->initEstData( uiDepth, iQP ); 1010 1011 #endif 1012 } //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1391 #endif 1392 1393 #else 1394 #if HHI_INTER_VIEW_RESIDUAL_PRED 1395 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1396 #endif 1397 #if HHI_INTERVIEW_SKIP 1398 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1399 #else 1400 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1401 #endif 1402 rpcTempCU->initEstData( uiDepth, iQP ); 1403 #if HHI_INTER_VIEW_RESIDUAL_PRED 1404 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1405 #endif 1406 #if HHI_INTERVIEW_SKIP 1407 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1408 #else 1409 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1410 #endif 1411 rpcTempCU->initEstData( uiDepth, iQP ); 1412 #if HHI_INTER_VIEW_RESIDUAL_PRED 1413 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1414 #endif 1415 #if HHI_INTERVIEW_SKIP 1416 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1417 #else 1418 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1419 #endif 1420 rpcTempCU->initEstData( uiDepth, iQP ); 1421 #if HHI_INTER_VIEW_RESIDUAL_PRED 1422 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1423 #endif 1424 #if HHI_INTERVIEW_SKIP 1425 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1426 #else 1427 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1428 #endif 1429 rpcTempCU->initEstData( uiDepth, iQP ); 1430 1431 #endif 1432 } //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1013 1433 #endif 1014 1434 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1026 1446 // speedup for inter frames 1027 1447 #if HHI_INTERVIEW_SKIP 1028 if( ( rpcBestCU->getSlice()->getSliceType() == I_SLICE ||1029 1030 1031 1448 if( ( rpcBestCU->getSlice()->getSliceType() == I_SLICE || 1449 rpcBestCU->getCbf( 0, TEXT_LUMA ) != 0 || 1450 rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0 || 1451 rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 ) && !bFullyRenderedSec ) // avoid very complex intra if it is unlikely 1032 1452 #else 1033 1453 if( rpcBestCU->getSlice()->getSliceType() == I_SLICE || … … 1041 1461 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 1042 1462 { 1043 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1463 #if OL_DEPTHLIMIT_A0044 //add code here to select or deselect NxN mode for Intra 1464 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1465 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1466 #else 1467 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1468 #endif 1044 1469 { 1045 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1046 rpcTempCU->initEstData( uiDepth, iQP ); 1470 if (bTrySplit) 1471 { 1472 1473 #endif 1474 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1475 { 1476 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1477 rpcTempCU->initEstData( uiDepth, iQP ); 1478 } 1479 #if OL_DEPTHLIMIT_A0044 1480 }//bTrySplit 1481 }//depthMapDetect 1482 else 1483 { 1484 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1485 { 1486 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1487 rpcTempCU->initEstData( uiDepth, iQP ); 1488 } 1047 1489 } 1490 #endif 1048 1491 } 1049 1492 } … … 1101 1544 #endif 1102 1545 { 1103 rpcBestCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() );1546 rpcBestCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() ); 1104 1547 } 1105 1548 … … 1125 1568 } 1126 1569 #if HHI_INTERVIEW_SKIP 1127 rpcBestCU->setRenderableSubParts(bFullyRenderedSec,0,rpcBestCU->getDepth( 0 )) ;1570 rpcBestCU->setRenderableSubParts(bFullyRenderedSec,0,rpcBestCU->getDepth( 0 )) ; 1128 1571 #endif 1129 1572 } … … 1189 1632 { 1190 1633 #if LOSSLESS_CODING 1191 1192 1193 1194 1634 if (isAddLowestQP && (iQP == iMinQP)) 1635 { 1636 iQP = lowestQP; 1637 } 1195 1638 #endif 1196 1639 rpcTempCU->initEstData( uiDepth, iQP ); … … 1301 1744 #endif 1302 1745 { 1303 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );1746 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1304 1747 } 1305 1748 … … 1344 1787 #endif 1345 1788 { 1346 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );1789 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1347 1790 } 1348 1791 #endif … … 1393 1836 } // with sub partitioned prediction. 1394 1837 #if LOSSLESS_CODING 1395 1396 1397 1398 1838 if (isAddLowestQP && (iQP == lowestQP)) 1839 { 1840 iQP = iMinQP; 1841 } 1399 1842 #endif 1400 1843 } // SPLIT- QP Loop … … 1403 1846 if( m_pcRdCost->getUseRenModel() ) 1404 1847 { 1405 1406 1407 1408 1409 1848 UInt uiWidth = m_ppcRecoYuvBest[uiDepth]->getWidth ( ); 1849 UInt uiHeight = m_ppcRecoYuvBest[uiDepth]->getHeight ( ); 1850 Pel* piSrc = m_ppcRecoYuvBest[uiDepth]->getLumaAddr( 0 ); 1851 UInt uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride ( ); 1852 m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1410 1853 } 1411 1854 #endif … … 1608 2051 #if HHI_MPI 1609 2052 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) ) 1610 #endif 2053 { 2054 #endif 2055 1611 2056 m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 2057 2058 #if HHI_MPI 2059 } 2060 #endif 1612 2061 } 1613 2062 else … … 1624 2073 1625 2074 if( ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 2075 { 1626 2076 m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 2077 } 2078 1627 2079 if( !pcCU->getSlice()->isIntra() ) 1628 2080 { … … 1631 2083 #if FORCE_REF_VSP==1 1632 2084 if( (pcCU->isSkipped( uiAbsPartIdx ) || pcCU->isVspMode( uiAbsPartIdx )) && pcCU->getSlice()->getViewId() != 0 ) 1633 #if VSP_TEXT_ONLY 1634 if( !pcCU->getSlice()->getSPS()->isDepth() ) 2085 #if VSP_CFG 2086 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 2087 #else 2088 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 1635 2089 #endif 1636 2090 { … … 1647 2101 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1648 2102 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1649 #if DEBUGLOGOUT1650 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );1651 #endif1652 2103 xRestoreDepthWidthHeight( pcCU ); 1653 2104 return; … … 1694 2145 #if HHI_MPI 1695 2146 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) 2147 { 1696 2148 #endif 1697 2149 if( !pcCU->getSlice()->isIntra() ) … … 1700 2152 1701 2153 #if FORCE_REF_VSP==1 1702 if( (pcCU->isSkipped( uiAbsPartIdx ) || pcCU->isVspMode( uiAbsPartIdx )) && pcCU->getSlice()->getViewId() != 0 ) 1703 #if VSP_TEXT_ONLY 1704 if( !pcCU->getSlice()->getSPS()->isDepth() ) 2154 if( (pcCU->isSkipped( uiAbsPartIdx ) || pcCU->isVspMode( uiAbsPartIdx )) && pcCU->getSlice()->getViewId() != 0 )] 2155 #if VSP_CFG 2156 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 2157 #else 2158 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 1705 2159 #endif 1706 2160 { … … 1709 2163 #endif 1710 2164 } 2165 #if HHI_MPI 2166 } 2167 #endif 1711 2168 1712 2169 if( pcCU->isSkipped( uiAbsPartIdx ) ) … … 1715 2172 #endif 1716 2173 { 2174 #if OL_DEPTHLIMIT_A0044 2175 if(pcCU->getPartDumpFlag()) 2176 { 2177 pcCU->updatePartInfo(0,uiDepth); 2178 pcCU->incrementPartInfo(); 2179 } 2180 #endif 1717 2181 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1718 2182 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1720 2184 #endif 1721 2185 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1722 #if DEBUGLOGOUT1723 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );1724 #endif1725 2186 return; 1726 2187 } … … 1730 2191 { 1731 2192 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1732 #if DEBUGLOGOUT1733 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );1734 #endif1735 2193 return; 1736 2194 } … … 1753 2211 // Encode slice finish 1754 2212 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1755 #if DEBUGLOGOUT1756 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );1757 #endif1758 2213 return; 1759 2214 } … … 1779 2234 // --- write terminating bit --- 1780 2235 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1781 #if DEBUGLOGOUT1782 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );1783 #endif1784 2236 } 1785 2237 … … 2613 3065 } 2614 3066 #if VSP_N 2615 #if !(!VSP_TEXT_ONLY && FORCE_REF_VSP==2) 2616 else // inter 3067 #if VSP_CFG 3068 else if( (!rpcTempCU->getSlice()->getSPS()->getVspDepthPresentFlag() && rpcTempCU->getSlice()->getViewId() ) || FORCE_REF_VSP!=2 ) // inter 3069 #else 3070 else if( rpcTempCU->getSlice()->getVspDepthDisableFlag() || FORCE_REF_VSP!=2 ) // inter 3071 #endif 2617 3072 { 2618 3073 Int aiRefIdx[2] = {NOT_VALID, NOT_VALID}; … … 2620 3075 { 2621 3076 aiRefIdx[iList] = pcTextureCU->getCUMvField( RefPicList(iList) )->getRefIdx( rpcTempCU->getZorderIdxInCU() + ui ); 2622 if( aiRefIdx[iList] >= 0 && pcTextureCU->getSlice()->getRefViewId( RefPicList(iList), aiRefIdx[iList] ) == NUM_VIEW_VSP ) 3077 #if VSP_CFG 3078 if( aiRefIdx[iList] >= rpcTempCU->getSlice()->getNumRefIdx( RefPicList(iList) ) ) 3079 #else 3080 if( aiRefIdx[iList] >= 0 && pcTextureCU->isVspRef( RefPicList(iList), aiRefIdx[iList] ) ) 3081 #endif 2623 3082 { 2624 3083 return; … … 2630 3089 //} 2631 3090 } 2632 #endif2633 3091 #endif 2634 3092 } … … 2830 3288 #if FORCE_REF_VSP==1 2831 3289 if( (pcCU->isSkipped( 0 ) || pcCU->isVspMode( 0 )) && pcCU->getSlice()->getViewId() != 0 ) 2832 #if VSP_TEXT_ONLY 2833 if( !pcCU->getSlice()->getSPS()->isDepth() ) 3290 #if VSP_CFG 3291 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 3292 #else 3293 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 2834 3294 #endif 2835 3295 m_pcEntropyCoder->encodeVspFlag ( pcCU, 0, true ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCu.h
r166 r193 46 46 #include "TLibCommon/TComBitCounter.h" 47 47 #include "TLibCommon/TComDataCU.h" 48 #if DEBUGLOGOUT49 #include "TLibCommon/DebugLog.h"50 #endif51 48 52 49 #include "TEncEntropy.h" … … 116 113 117 114 public: 118 #if DEBUGLOGOUT119 DebugLog m_cDebug;120 #endif121 122 115 /// copy parameters from encoder class 123 116 Void init ( TEncTop* pcEncTop ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
r166 r193 1370 1370 #if VSP_MV_ZERO 1371 1371 Int iRefIdx = pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->getRefIdx(uiSubPartIdx); 1372 if( !(pcCU->getSlice()->getViewId() && iRefIdx >= 0 && pcCU-> getSlice()->getRefViewId( RefPicList( uiRefListIdx ), iRefIdx ) == NUM_VIEW_VSP) )1372 if( !(pcCU->getSlice()->getViewId() && iRefIdx >= 0 && pcCU->isVspRef( RefPicList( uiRefListIdx ), iRefIdx )) ) 1373 1373 { 1374 1374 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r166 r193 332 332 #endif 333 333 334 #if VSP_SLICE_HEADER && VSP_CFG 335 pcSlice->setNumVspRefPics( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numVSPRefPics ); 336 pcSlice->setVspFlag( m_pcEncTop->getUseVSP() && pcSlice->getNumVspRefPics() > 0 ); 337 for( UInt i = 0; i < pcSlice->getNumVspRefPics(); i++ ) 338 { 339 pcSlice->setVspRefPos( REF_PIC_LIST_0, i, m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_VSPRefPosL0[i] ); 340 if( pcSlice->getSliceType() == B_SLICE ) 341 { 342 pcSlice->setVspRefPos( REF_PIC_LIST_1, i, m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_VSPRefPosL1[i] ); 343 } 344 } 345 #endif 346 334 347 #if VSP_N 348 #if VSP_CFG 349 Int NumberOfVspRefsL0 = ( ( pcPic->getViewId()==0 350 || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth()) 351 #if VSP_SLICE_HEADER 352 || !pcSlice->getVspFlag() 353 #endif 354 || pcSlice->getVspRefPos( REF_PIC_LIST_0, 0 ) == 0 355 ) ? 0 : 1 ); 356 Int NumberOfVspRefsL1 = ( ( pcPic->getViewId()==0 357 || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth()) 358 #if VSP_SLICE_HEADER 359 || !pcSlice->getVspFlag() 360 #endif 361 || pcSlice->getVspRefPos( REF_PIC_LIST_1, 0 ) == 0 362 ) ? 0 : 1 ); 363 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL0, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL0) ) ); 364 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL1, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL1) ) ); 365 #else 335 366 Int NumberOfVspRefs = ( ( pcPic->getViewId()==0 336 #if VSP_TEXT_ONLY 337 || m_pcEncTop->getIsDepth() 338 #endif 367 || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth()) 339 368 #if VSP_SLICE_HEADER 340 || ! m_pcEncTop->getUseVSP()369 || !pcSlice->getVspFlag() 341 370 #endif 342 371 ) ? 0 : 1 ); 343 372 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefs, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefs) ) ); 344 373 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefs, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefs) ) ); 374 #endif 345 375 #else 346 376 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) ); … … 373 403 #if VSP_N 374 404 Bool bUseVsp = (pcPic->getViewId()!=0); 375 #if VSP_TEXT_ONLY 376 if( m_pcEncTop->getIsDepth() ) bUseVsp = false; 377 #endif 405 if( m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth() ) bUseVsp = false; 378 406 #if VSP_SLICE_HEADER 407 #if VSP_CFG 408 if( !pcSlice->getVspFlag() ) bUseVsp = false; 409 #else 379 410 if( !m_pcEncTop->getUseVSP() ) bUseVsp = false; 380 411 #endif 412 #endif 413 414 #if VSP_SLICE_HEADER 415 if( bUseVsp ) 416 #endif 417 { 418 m_pcEncTop->getVSPBuf()->getCurrSlice()->setPOC( pcPic->getPOC() ); 419 m_pcEncTop->getVSPBuf()->getCurrSlice()->setViewId( pcPic->getViewId() ); 420 } 421 381 422 pcSlice->setRefPicListMvc( rcListPic, apcInterViewRefPics, bUseVsp ? m_pcEncTop->getVSPBuf() : NULL ); 382 423 #else 383 424 pcSlice->setRefPicListMvc( rcListPic, apcInterViewRefPics ); 384 425 #endif 426 427 #if !VSP_CFG 385 428 #if VSP_SLICE_HEADER 386 pcSlice->setVspFlag( bUseVsp ); 429 pcSlice->setVspFlag( m_pcEncTop->getUseVSP() ); 430 pcSlice->setVspDepthDisableFlag( m_pcEncTop->getVSPDepthDisable() ); 431 #endif 387 432 #endif 388 433 … … 471 516 Int iVSOMode = m_pcEncTop->getVSOMode(); 472 517 m_pcRdCost->setVSOMode( iVSOMode ); 518 473 519 #if HHI_VSO_DIST_INT 474 520 m_pcRdCost->setAllowNegDist( m_pcEncTop->getAllowNegDist() ); … … 491 537 m_pcRdCost->setDepthPicYuv ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) ); 492 538 #endif 493 539 #if LGE_WVSO_A0119 540 Bool bUseWVSO = m_pcEncTop->getUseWVSO(); 541 m_pcRdCost->setUseWVSO( bUseWVSO ); 542 #endif 494 543 495 544 } … … 1157 1206 m_pcSbacCoder->load( &pcSbacCoders[0] ); 1158 1207 1159 #if DEBUGLOGOUT1160 char fname[128];1161 sprintf(fname, "%sV%02d_%05d%s.csv", "Log", pcSlice->getViewId(), uiPOCCurr, pcSlice->getIsDepth() ? "depth":"text");1162 getSliceEncoder()->getCUEncoder()->m_cDebug.DebugLogFileOpen( fname );1163 #endif1164 1165 1208 pcSlice->setTileOffstForMultES( uiOneBitstreamPerSliceLength ); 1166 1209 if (!bEntropySlice) 1167 1210 { 1211 #if OL_DEPTHLIMIT_A0044 //start dumping partition information 1212 m_pcSliceEncoder->setPartDumpFlag(1); 1213 #endif 1168 1214 pcSlice->setTileLocationCount ( 0 ); 1169 1215 m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info. 1216 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 1217 m_pcSliceEncoder->setPartDumpFlag(0); 1218 #endif 1170 1219 } 1171 1220 else 1172 1221 { 1222 #if OL_DEPTHLIMIT_A0044 //start dumping partition information 1223 m_pcSliceEncoder->setPartDumpFlag(1); 1224 #endif 1173 1225 m_pcSliceEncoder->encodeSlice(pcPic, &nalu.m_Bitstream, pcSubstreamsOut); // nalu.m_Bitstream is only used for CAVLC tile position info. 1174 } 1175 1176 #if DEBUGLOGOUT 1177 getSliceEncoder()->getCUEncoder()->m_cDebug.DebugLogFileClose(); 1178 #endif 1226 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 1227 m_pcSliceEncoder->setPartDumpFlag(0); 1228 #endif 1229 } 1179 1230 1180 1231 { … … 2187 2238 printf( "V%d ", pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) ); 2188 2239 } 2240 #if VSP_CFG 2241 else if( pcSlice->getViewId() == pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) 2242 && pcSlice->getPOC() == pcSlice->getRefPOC( RefPicList(iRefList), iRefIndex ) ) 2243 { 2244 printf( "VS " ); 2245 } 2246 #endif 2189 2247 else 2190 2248 { … … 2203 2261 printf( "V%d ", pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) ); 2204 2262 } 2263 #if VSP_CFG 2264 else if( pcSlice->getViewId() == pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) 2265 && pcSlice->getPOC() == pcSlice->getRefPOC( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) ) 2266 { 2267 printf( "VS " ); 2268 } 2269 #endif 2205 2270 else 2206 2271 { -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncGOP.h
r166 r193 146 146 Void freeAPS (TComAPS* pAPS, TComSPS* pSPS); 147 147 Void allocAPS (TComAPS* pAPS, TComSPS* pSPS); 148 149 148 protected: 150 149 Void encodeAPS (TComAPS* pcAPS, TComOutputBitstream& APSbs, TComSlice* pcSlice); //!< encode APS syntax elements -
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" ) -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r166 r193 882 882 #if FORCE_REF_VSP==1 883 883 if( pcCU->getSlice()->getViewId() != 0 ) 884 #if VSP_TEXT_ONLY 885 if( !pcCU->getSlice()->getSPS()->isDepth() ) 884 #if VSP_CFG 885 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 886 #else 887 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 886 888 #endif 887 889 m_pcEntropyCoder->encodeVspFlag ( pcCU, 0, true ); … … 1145 1147 if ( m_pcRdCost->getUseVSO() ) 1146 1148 { 1147 ruiDist += m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 ); 1149 #if LGE_WVSO_A0119 1150 if ( m_pcRdCost->getUseWVSO() ) 1151 { 1152 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 1153 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 1154 Dist iD = (Dist) m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight ); 1155 Dist iVSO = m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 ); 1156 ruiDist += (iDWeight * iD + iVSOWeight * iVSO) / ( iDWeight + iVSOWeight); 1157 } 1158 else 1159 #endif 1160 { 1161 ruiDist += m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 ); 1162 } 1148 1163 } 1149 1164 else 1150 1165 #endif 1151 1166 { 1152 ruiDist += m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );1153 }1167 ruiDist += m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight ); 1168 } 1154 1169 } 1155 1170 … … 1918 1933 1919 1934 uiSad = (Dist) ( m_pcRdCost->getDistPart( piPred, uiStride, piOrg, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiPartOffset), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiPartOffset), pcVirRec->getStride(), uiWidth, uiHeight ) ); 1935 #if LGE_WVSO_A0119 1936 if ( m_pcRdCost->getUseWVSO() ) 1937 { 1938 Int iDWeight = m_pcRdCost->getDWeight(); 1939 Int iVSDWeight = m_pcRdCost->getVSDWeight(); 1940 Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight ); 1941 uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight); 1942 } 1943 #endif 1920 1944 } 1921 1945 else … … 1924 1948 Bool bSad = !m_pcRdCost->getUseRenModel(); 1925 1949 uiSad = m_pcRdCost->getDistVS(pcCU, uiPartOffset, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, bSad, 0 ); 1950 #if LGE_WVSO_A0119 1951 if ( m_pcRdCost->getUseWVSO() ) 1952 { 1953 Int iDWeight = m_pcRdCost->getDWeight()*m_pcRdCost->getDWeight(); 1954 Int iVSDWeight = m_pcRdCost->getVSOWeight()*m_pcRdCost->getVSOWeight(); 1955 Dist iD = (Dist) m_pcRdCost->getDistPart( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight ); 1956 uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight); 1957 } 1958 #endif 1926 1959 } 1927 1960 … … 2960 2993 { 2961 2994 #if VSP_MV_ZERO 2962 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(eRefPicList, iRefIdxTemp) == NUM_VIEW_VSP);2995 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(eRefPicList, iRefIdxTemp)); 2963 2996 //if( bIsVsp && !bWholeCUCanBeSynthesized ) 2964 2997 //{ … … 2969 3002 if( pcCU->getResPredFlag( 0 )) 2970 3003 { 2971 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp)) 3004 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp) 3005 #if VSP_N 3006 && pcCU->getSlice()->getPOC() != pcCU->getSlice()->getRefPOC(eRefPicList, iRefIdxTemp) 3007 #endif 3008 ) 2972 3009 { // subtract residual prediction from original in motion search 2973 3010 if(!bLastResiFlag) … … 3068 3105 { 3069 3106 #if VSP_MV_ZERO 3070 if( pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(eRefPicList, iRefIdxTemp) == NUM_VIEW_VSP)3107 if( pcCU->getSlice()->getViewId() && pcCU->isVspRef(eRefPicList, iRefIdxTemp) ) 3071 3108 { 3072 3109 cMvTemp[1][iRefIdxTemp].setZero(); … … 3214 3251 { 3215 3252 #if VSP_MV_ZERO 3216 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_1, bestBiPRefIdxL1) == NUM_VIEW_VSP);3253 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_1, bestBiPRefIdxL1)); 3217 3254 3218 3255 if( bIsVsp ) … … 3314 3351 { 3315 3352 #if VSP_MV_ZERO 3316 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(eRefPicList, iRefIdxTemp) == NUM_VIEW_VSP);3353 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(eRefPicList, iRefIdxTemp)); 3317 3354 //if( bIsVsp && !bWholeCUCanBeSynthesized ) 3318 3355 //{ … … 3343 3380 3344 3381 iPredFrom = iBestRefIdx >= 0 ? 3 : 1; 3345 if(iBestRefIdx >= 0 && pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0, iBestRefIdx)) 3382 if(iBestRefIdx >= 0 && pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0, iBestRefIdx) 3383 #if VSP_N 3384 && pcCU->getSlice()->getPOC() != pcCU->getSlice()->getRefPOC(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0, iBestRefIdx) 3385 #endif 3386 ) 3346 3387 iAddResiShift++; 3347 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp)) 3388 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp) 3389 #if VSP_N 3390 && pcCU->getSlice()->getPOC() != pcCU->getSlice()->getRefPOC(eRefPicList, iRefIdxTemp) 3391 #endif 3392 ) 3348 3393 iAddResiShift++; 3349 3394 iAddResiShift = (pcCU->getSlice()->getPPS()->getUseWP() || iPredFrom != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1); … … 3420 3465 { 3421 3466 #if VSP_MV_ZERO 3422 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_0, iRefIdxBi[0]) == NUM_VIEW_VSP);3467 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_0, iRefIdxBi[0])); 3423 3468 3424 3469 if( !bIsVsp ) … … 3435 3480 #endif 3436 3481 #if VSP_MV_ZERO 3437 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_1, iRefIdxBi[1]) == NUM_VIEW_VSP);3482 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_1, iRefIdxBi[1])); 3438 3483 3439 3484 if( !bIsVsp ) … … 3606 3651 3607 3652 #if VSP_MV_ZERO 3608 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_0, iRefIdxBi[0]) == NUM_VIEW_VSP);3653 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_0, iRefIdxBi[0])); 3609 3654 if( !bIsVsp ) 3610 3655 { … … 3614 3659 #if VSP_MV_ZERO 3615 3660 } 3616 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_1, iRefIdxBi[1]) == NUM_VIEW_VSP);3661 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_1, iRefIdxBi[1])); 3617 3662 if( !bIsVsp ) 3618 3663 { … … 3638 3683 3639 3684 #if VSP_MV_ZERO 3640 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_0, iRefIdx[0]) == NUM_VIEW_VSP);3685 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_0, iRefIdx[0])); 3641 3686 if( !bIsVsp ) 3642 3687 { … … 3662 3707 3663 3708 #if VSP_MV_ZERO 3664 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_1, iRefIdx[1]) == NUM_VIEW_VSP);3709 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_1, iRefIdx[1])); 3665 3710 if( !bIsVsp ) 3666 3711 { … … 4655 4700 { 4656 4701 uiDistortion = m_pcRdCost->getDistVS( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight , false, 0 ); 4702 #if LGE_WVSO_A0119 4703 if ( m_pcRdCost->getUseWVSO() ) 4704 { 4705 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 4706 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 4707 Dist iD = (Dist) m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight ); 4708 uiDistortion = (iDWeight * iD + iVSOWeight * (Dist)uiDistortion) / ( iDWeight + iVSOWeight); 4709 } 4710 #endif 4657 4711 } 4658 4712 else … … 5014 5068 { 5015 5069 uiDistortionBest = m_pcRdCost->getDistVS ( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight, false, 0 ); 5070 #if LGE_WVSO_A0119 5071 if ( m_pcRdCost->getUseWVSO() ) 5072 { 5073 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5074 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 5075 Dist iD = (Dist) m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight ); 5076 uiDistortionBest = (iDWeight * iD + iVSOWeight * (Dist) uiDistortionBest) / ( iDWeight + iVSOWeight); 5077 } 5078 #endif 5016 5079 } 5017 5080 else … … 5249 5312 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 5250 5313 uiDistY = m_pcRdCost->getDistPart( m_pTempPel, 1<< uiLog2TrSize, pcResi->getLumaAddr( uiAbsPartIdx ), pcResi->getStride(), pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPartIdx), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPartIdx), pcVirRec->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize ); 5314 #if LGE_WVSO_A0119 5315 if ( m_pcRdCost->getUseWVSO() ) 5316 { 5317 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5318 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 5319 Dist iD = (Dist) m_pcRdCost->getDistPart( m_pTempPel, trWidth, pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth, trHeight ); 5320 uiDistY = (iDWeight * iD + iVSDWeight * (Dist)uiDistY) / ( iDWeight + iVSDWeight); 5321 } 5322 #endif 5251 5323 } 5252 5324 else … … 5254 5326 { 5255 5327 uiDistY = m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, pcPred->getLumaAddr( uiAbsPartIdx ), pcPred->getStride(), pcOrg->getLumaAddr( uiAbsPartIdx), pcOrg->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize, false, 0 ); // initialized with zero residual distortion 5328 #if LGE_WVSO_A0119 5329 if ( m_pcRdCost->getUseWVSO() ) 5330 { 5331 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5332 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 5333 Dist iD = (Dist) m_pcRdCost->getDistPart( m_pTempPel, trWidth, pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth, trHeight ); 5334 uiDistY = (iDWeight * iD + iVSOWeight * (Dist)uiDistY) / ( iDWeight + iVSOWeight); 5335 } 5336 #endif 5256 5337 } 5257 5338 } … … 5299 5380 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 5300 5381 uiNonzeroDistY = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( uiAbsPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcResi->getLumaAddr( uiAbsPartIdx ), pcResi->getStride(), pcVirRec->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU()+uiAbsPartIdx ), pcVirOrg->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU()+uiAbsPartIdx ), pcVirRec->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize ); 5382 #if LGE_WVSO_A0119 5383 if ( m_pcRdCost->getUseWVSO() ) 5384 { 5385 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5386 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 5387 Dist iD = (Dist) m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight ); 5388 uiNonzeroDistY = (iDWeight * iD + iVSDWeight * (Dist) uiNonzeroDistY) / ( iDWeight + iVSDWeight); 5389 } 5390 #endif 5301 5391 } 5302 5392 else … … 5306 5396 uiNonzeroDistY = m_pcRdCost->getDistVS( pcCU, uiAbsPartIdx, m_cYuvRecTemp.getLumaAddr(uiAbsPartIdx), m_cYuvRecTemp.getStride(), 5307 5397 pcOrg->getLumaAddr( uiAbsPartIdx ), pcOrg->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize, false, 0 ); 5398 #if LGE_WVSO_A0119 5399 if ( m_pcRdCost->getUseWVSO() ) 5400 { 5401 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5402 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 5403 Dist iD = (Dist) m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight ); 5404 uiNonzeroDistY = (iDWeight * iD + iVSOWeight * (Dist) uiNonzeroDistY) / ( iDWeight + iVSOWeight); 5405 } 5406 #endif 5308 5407 } 5309 5408 } … … 6003 6102 #if FORCE_REF_VSP==1 6004 6103 if( pcCU->getSlice()->getViewId() != 0 ) 6005 #if VSP_TEXT_ONLY 6006 if( !pcCU->getSlice()->getSPS()->isDepth() ) 6104 #if VSP_CFG 6105 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 6106 #else 6107 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 6007 6108 #endif 6008 6109 m_pcEntropyCoder->encodeVspFlag ( pcCU, 0, true ); … … 6400 6501 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6401 6502 uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6503 #if LGE_WVSO_A0119 6504 if ( m_pcRdCost->getUseWVSO() ) 6505 { 6506 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6507 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6508 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6509 uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight); 6510 } 6511 #endif // LGE_WVSO_A0119 6402 6512 } 6403 6513 else … … 6405 6515 { 6406 6516 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6517 #if LGE_WVSO_A0119 6518 if ( m_pcRdCost->getUseWVSO() ) 6519 { 6520 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6521 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6522 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6523 uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight); 6524 } 6525 #endif // LGE_WVSO_A0119 6407 6526 } 6408 6527 #else // FIX_RDO_MACRO … … 6413 6532 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6414 6533 uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6534 #if LGE_WVSO_A0119 6535 if ( m_pcRdCost->getUseWVSO() ) 6536 { 6537 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6538 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6539 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6540 uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight); 6541 } 6542 #endif // LGE_WVSO_A0119 6415 6543 } 6416 6544 else … … 6418 6546 { 6419 6547 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6548 #if LGE_WVSO_A0119 6549 if ( m_pcRdCost->getUseWVSO() ) 6550 { 6551 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6552 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6553 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6554 uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight); 6555 } 6556 #endif // LGE_WVSO_A0119 6420 6557 } 6421 6558 #endif // SAIT_VSO_EST_A0033 <-- wrong #endif should be removed … … 6527 6664 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6528 6665 uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6666 #if LGE_WVSO_A0119 6667 if ( m_pcRdCost->getUseWVSO() ) 6668 { 6669 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6670 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6671 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 6672 uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight); 6673 } 6674 #endif 6529 6675 } 6530 6676 else … … 6532 6678 { 6533 6679 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 ); 6680 #if LGE_WVSO_A0119 6681 if ( m_pcRdCost->getUseWVSO() ) 6682 { 6683 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6684 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6685 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 6686 uiActDist = (iDWeight * iD + iVSOWeight * (Int) uiActDist) / ( iDWeight + iVSOWeight); 6687 } 6688 #endif 6534 6689 } 6535 6690 } … … 6593 6748 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6594 6749 uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPtIdx), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPtIdx), pcVirRec->getStride(), uiWidth, uiHeight ); 6750 #if LGE_WVSO_A0119 6751 if ( m_pcRdCost->getUseWVSO() ) 6752 { 6753 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6754 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6755 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 6756 uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight); 6757 } 6758 #endif 6595 6759 } 6596 6760 else … … 6598 6762 { 6599 6763 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 ); 6764 #if LGE_WVSO_A0119 6765 if ( m_pcRdCost->getUseWVSO() ) 6766 { 6767 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6768 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6769 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 6770 uiActDist = (iDWeight * iD + iVSOWeight * (Int) uiActDist) / ( iDWeight + iVSOWeight); 6771 } 6772 #endif 6600 6773 } 6601 6774 } -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSlice.cpp
r102 r193 376 376 m_pcRdCost->setDisparityCoeff( m_pcCfg->getDispCoeff() ); 377 377 #endif 378 378 #if LGE_WVSO_A0119 379 if( m_pcCfg->getUseWVSO() && m_pcCfg->isDepthCoder() ) 380 { 381 382 Int iDWeight, iVSOWeight, iVSDWeight; 383 iDWeight = m_pcCfg->getDWeight(); 384 iVSOWeight = m_pcCfg->getVSOWeight(); 385 iVSDWeight = m_pcCfg->getVSDWeight(); 386 387 m_pcRdCost->setDWeight( iDWeight ); 388 m_pcRdCost->setVSOWeight( iVSOWeight ); 389 m_pcRdCost->setVSDWeight( iVSDWeight ); 390 391 } 392 #endif 379 393 #if RDOQ_CHROMA_LAMBDA 380 394 // for RDOQ … … 831 845 #endif 832 846 847 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 848 m_bDumpPartInfo = 0; 849 pcCU->setPartDumpFlag(m_bDumpPartInfo); 850 #endif 833 851 834 852 // inherit from TR if necessary, select substream to use. … … 1290 1308 1291 1309 TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr ); 1310 #if OL_DEPTHLIMIT_A0044 1311 pcCU->setPartDumpFlag(m_bDumpPartInfo); 1312 pcCU->resetPartInfo(); 1313 #endif 1292 1314 #if !REMOVE_TILE_DEPENDENCE 1293 1315 if( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) ) -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSlice.h
r77 r193 101 101 102 102 UInt m_uiSliceIdx; 103 #if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping 104 Bool m_bDumpPartInfo; 105 #endif 103 106 public: 104 107 TEncSlice(); … … 128 131 UInt getSliceIdx() { return m_uiSliceIdx; } 129 132 Void setSliceIdx(UInt i) { m_uiSliceIdx = i; } 133 #if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping 134 Void setPartDumpFlag(Bool flag) { m_bDumpPartInfo = flag;}; 135 #endif 130 136 }; 131 137 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r166 r193 87 87 #if VSP_SLICE_HEADER 88 88 m_bUseVSP = false; 89 #endif 90 89 m_bVSPDepthDisable = false; 90 #endif 91 91 } 92 92 … … 198 198 m_pcPicVSP = new TComPic; 199 199 m_pcPicVSP->create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 200 //m_pcPicVSP->getCurrSlice()->setViewId( this->getViewId() );201 m_pcPicVSP->getCurrSlice()->setViewId( NUM_VIEW_VSP );202 200 m_pcPicVSP->getCurrSlice()->setViewOrderIdx( m_iViewOrderIdx ); 203 201 204 202 m_pcPicAvail = new TComPic; 205 203 m_pcPicAvail->create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 206 m_pcPicAvail->getCurrSlice()->setViewId( 99 );207 204 m_pcPicAvail->getCurrSlice()->setViewOrderIdx( m_iViewOrderIdx ); 208 205 #endif 209 210 206 } 211 207 … … 854 850 m_cSPS.setUseDMM( m_bUseDMM ); 855 851 #endif 852 #if OL_DEPTHLIMIT_A0044 853 m_cSPS.setUseDPL( m_bDepthPartitionLimiting ); 854 #endif 856 855 #if HHI_MPI 857 856 m_cSPS.setUseMVI( m_bUseMVI ); … … 894 893 } 895 894 } 895 #if VSP_N 896 m_cSPS.setVspPresentFlag( m_bUseVSP ); 897 #if VSP_CFG 898 m_cSPS.setVspDepthPresentFlag( m_bVSPDepthDisable ? false : true ); 899 #endif 900 #endif 896 901 } 897 902 … … 1185 1190 1186 1191 // # substreams is "per tile" when tiles are independent. 1192 #if FIX_REMOVE_TILE_DEPENDENCE 1193 if ( m_iWaveFrontSynchro ) 1194 #else 1187 1195 if (m_iTileBoundaryIndependenceIdr && m_iWaveFrontSynchro) 1196 #endif 1188 1197 { 1189 1198 m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams * (m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1)); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncTop.h
r166 r193 150 150 #endif 151 151 152 #if VSP_SLICE_HEADER153 Bool m_bUseVSP;154 #endif155 156 152 protected: 157 153 Void xGetNewPicBuffer ( TComPic*& rpcPic ); ///< get picture buffer which will be processed … … 251 247 #endif 252 248 253 #if VSP_SLICE_HEADER254 Void setUseVSP ( Bool val ) { m_bUseVSP = val; }255 Bool getUseVSP () { return m_bUseVSP; }256 #endif257 258 249 // ------------------------------------------------------------------------------------------------------------------- 259 250 // encoder function
Note: See TracChangeset for help on using the changeset viewer.