Changeset 115 in 3DVCSoftware for trunk/source
- Timestamp:
- 30 Aug 2012, 14:52:41 (12 years ago)
- Location:
- trunk/source
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r100 r115 335 335 ("AllowNegDist", m_bAllowNegDist , true , "Allow negative Distortion in VSO") 336 336 #endif 337 #if LGE_WVSO_A0119 338 ("WVSO", m_bWVSO , true , "Use WVSO" ) 339 ("VSOWeight", m_iVSOWeight , 10 , "VSO Weight" ) 340 ("VSDWeight", m_iVSDWeight , 1 , "SAIT Weight" ) 341 ("DWeight", m_iDWeight , 1 , "SSE Weight" ) 342 #endif 343 344 #if OL_DEPTHLIMIT 345 ("DPL", m_bDepthPartitionLimiting , false , "Use DepthPartitionLimiting" ) 346 #endif 337 347 338 348 #endif … … 644 654 #endif 645 655 656 #if LGE_WVSO_A0119 657 m_bWVSO = m_bUseVSO && m_bWVSO && m_bUsingDepthMaps; 658 #endif 646 659 xCleanUpVectors(); 647 660 … … 1688 1701 #if HHI_VSO 1689 1702 printf("VSO:%d ", m_bUseVSO ); 1690 #endif 1703 #endif 1704 #if LGE_WVSO_A0119 1705 printf("WVSO:%d ", m_bWVSO ); 1706 #endif 1707 #if OL_DEPTHLIMIT 1708 printf("DPL:%d ", m_bDepthPartitionLimiting); 1709 #endif 1691 1710 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1692 1711 printf("DMM:%d ", m_bUseDMM ); … … 1694 1713 #if HHI_MPI 1695 1714 printf("MVI:%d ", m_bUseMVI ? 1 : 0 ); 1715 #endif 1716 #if LGE_WVSO_A0119 1717 printf("\nVSO : SAIT : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight ); 1696 1718 #endif 1697 1719 printf("\n\n"); -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r102 r115 297 297 Bool m_bUseEstimatedVSD; ///< Flag for using model based VSD estimation instead of VSO for some encoder decisions (JCT3V-A0033 modification 3) 298 298 #endif 299 299 #if LGE_WVSO_A0119 300 Bool m_bWVSO; ///< flag for using View Synthesis Optimization 301 Int m_iVSOWeight; 302 Int m_iVSDWeight; 303 Int m_iDWeight; 304 #endif 300 305 // coding tools (depth intra modes) 301 306 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 302 307 Bool m_bUseDMM; ///< flag for using DMM 308 #endif 309 310 #if OL_DEPTHLIMIT 311 Bool m_bDepthPartitionLimiting; 303 312 #endif 304 313 -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r102 r115 207 207 m_acTEncTopList[iViewIdx]->setUseEstimatedVSD ( false ); 208 208 #endif 209 #if LGE_WVSO_A0119 210 m_acTEncTopList[iViewIdx]->setWVSO ( false ); 211 #endif 209 212 #endif 210 213 … … 361 364 m_acTEncTopList[iViewIdx]->setUseDMM ( false ); 362 365 #endif 366 #if OL_DEPTHLIMIT 367 m_acTEncTopList[iViewIdx]->setUseDPL ( false ); 368 #endif 363 369 #if HHI_MPI 364 370 m_acTEncTopList[iViewIdx]->setUseMVI( false ); … … 524 530 m_acTEncDepthTopList[iViewIdx]->setUseEstimatedVSD ( m_bUseEstimatedVSD ); 525 531 #endif 532 #if LGE_WVSO_A0119 533 m_acTEncDepthTopList[iViewIdx]->setWVSO ( m_bWVSO ); 534 #endif 526 535 #endif 527 536 … … 634 643 m_acTEncDepthTopList[iViewIdx]->setUseDMM ( m_bUseDMM ); 635 644 #endif 645 #if OL_DEPTHLIMIT 646 m_acTEncDepthTopList[iViewIdx]->setUseDPL (m_bDepthPartitionLimiting); 647 #endif 636 648 #if HHI_MPI 637 649 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); … … 690 702 AOT(true); 691 703 } 704 #if LGE_WVSO_A0119 705 for ( Int iViewNum = 0; iViewNum < m_iNumberOfViews; iViewNum++ ) 706 { 707 for (Int iContent = 0; iContent < 2; iContent++ ) 708 { 709 TEncTop* pcEncTop = ( iContent == 0 ) ? m_acTEncTopList[iViewNum] : m_acTEncDepthTopList[iViewNum]; 710 pcEncTop->setWVSO( m_bWVSO ); 711 pcEncTop->setVSOWeight( m_iVSOWeight ); 712 pcEncTop->setVSDWeight( m_iVSDWeight ); 713 pcEncTop->setDWeight( m_iDWeight ); 714 } 715 } 716 #endif 692 717 } 693 718 #endif -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r100 r115 152 152 #endif 153 153 #endif 154 #if OL_DEPTHLIMIT 155 //add a variable to store the partition information 156 //a 2D array in part_symbol,uidepth format 157 //initialize m_partInfo to OL_END_CU 158 for (int i=0; i < OL_PART_BUF_SIZE; i++) 159 { 160 for (int j=0; j < 2; j++) 161 m_uiPartInfo[i][j] = OL_END_CU; 162 } 163 #endif 154 164 } 155 165 … … 456 466 Void TComDataCU::initCU( TComPic* pcPic, UInt iCUAddr ) 457 467 { 468 #if OL_DEPTHLIMIT 469 TComDataCU* pcCU = pcPic->getCU(iCUAddr); 470 #endif 458 471 459 472 m_pcPic = pcPic; … … 672 685 m_apcCUColocated[1] = getSlice()->getRefPic( REF_PIC_LIST_1, 0)->getCU( m_uiCUAddr ); 673 686 } 687 #if OL_DEPTHLIMIT 688 setPartDumpFlag (pcCU->getPartDumpFlag()); 689 #endif 674 690 } 675 691 … … 1001 1017 memcpy(m_uiSliceStartCU,pcCU->m_uiSliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition); 1002 1018 memcpy(m_uiEntropySliceStartCU,pcCU->m_uiEntropySliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition); 1019 #if OL_DEPTHLIMIT 1020 setPartDumpFlag (pcCU->getPartDumpFlag()); 1021 #endif 1003 1022 } 1004 1023 -
trunk/source/Lib/TLibCommon/TComDataCU.h
r100 r115 237 237 UInt* m_uiSliceStartCU; ///< Start CU address of current slice 238 238 UInt* m_uiEntropySliceStartCU; ///< Start CU address of current slice 239 240 #if OL_DEPTHLIMIT 241 //add a variable to store the partition information 242 //a 2D array in uidepth,part_symbol format 243 UInt m_uiPartInfo[OL_PART_BUF_SIZE][2]; 244 UInt m_uiPartNum; 245 Bool b_dumpPartInfo; 246 #endif 239 247 240 248 // ------------------------------------------------------------------------------------------------------------------- … … 596 604 597 605 Void compressMV (); 606 607 #if OL_DEPTHLIMIT 608 Void resetPartInfo () {m_uiPartNum = 0;}; 609 Void incrementPartInfo () {m_uiPartNum ++;}; 610 Void updatePartInfo(UInt uiSymbol, UInt uiDepth) {m_uiPartInfo[m_uiPartNum][0] = uiSymbol; m_uiPartInfo 611 [m_uiPartNum][1] = uiDepth;}; 612 UInt* readPartInfo() {return (UInt*)m_uiPartInfo;}; 613 // UInt getPartNumIdx() {return m_uiPartNum;}; //added this to get the index 614 //flag to signal to start dumping 615 Void setPartDumpFlag(bool flag) {b_dumpPartInfo = flag;}; 616 Bool getPartDumpFlag() {return b_dumpPartInfo;}; 617 #endif 598 618 599 619 // ------------------------------------------------------------------------------------------------------------------- -
trunk/source/Lib/TLibCommon/TComRdCost.h
r100 r115 377 377 Bool m_bUseEstimatedVSD; 378 378 #endif 379 #if LGE_WVSO_A0119 380 Int m_iDWeight; 381 Int m_iVSOWeight; 382 Int m_iVSDWeight; 383 Bool m_bWVSO; 384 #endif 379 385 380 386 Bool m_bUseVSO; … … 410 416 Void setVSOMode( UInt uiIn); 411 417 UInt getVSOMode( ) { return m_uiVSOMode; } 412 418 #if LGE_WVSO_A0119 419 Void setWVSO ( Bool bIn ) { m_bWVSO = bIn; }; 420 Bool getWVSO ( ) { return m_bWVSO;}; 421 Void setDWeight ( Int iDWeight ) { m_iDWeight = iDWeight; }; 422 Int getDWeight () { return m_iDWeight; }; 423 Void setVSOWeight ( Int iVSOWeight ) { m_iVSOWeight = iVSOWeight; }; 424 Int getVSOWeight () { return m_iVSOWeight; }; 425 Void setVSDWeight ( Int iVSDWeight ) { m_iVSDWeight = iVSDWeight; }; 426 Int getVSDWeight () { return m_iVSDWeight; }; 427 #endif 413 428 #if HHI_VSO_DIST_INT 414 429 Void setAllowNegDist ( Bool bAllowNegDist ); -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r101 r115 1441 1441 , m_bUseDMM (false) 1442 1442 #endif 1443 #if OL_DEPTHLIMIT 1444 , m_bDepthPartitionLimiting (false) 1445 #endif 1443 1446 { 1444 1447 // AMVP parameter -
trunk/source/Lib/TLibCommon/TComSlice.h
r101 r115 354 354 #endif 355 355 356 #if OL_DEPTHLIMIT 357 Bool m_bDepthPartitionLimiting; 358 #endif 359 356 360 #if DEPTH_MAP_GENERATION 357 361 UInt m_uiPredDepthMapGeneration; … … 619 623 #endif 620 624 625 #if OL_DEPTHLIMIT 626 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 627 Bool getUseDPL() {return m_bDepthPartitionLimiting;} 628 #endif 629 621 630 Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 622 631 Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx ); -
trunk/source/Lib/TLibCommon/TypeDef.h
r105 r115 94 94 #define SAIT_VSO_EST_A0033 1 // JCT2-A0033 modification 3 95 95 #define LGE_VSO_EARLY_SKIP_A0093 1 // JCT2-A0093 modification 4 96 96 #define LGE_WVSO_A0119 1 // JCT2-A0119 Depth Metric with a weighted depth fidelity term 97 98 #define OL_DEPTHLIMIT 1 //JCT2-A0044 99 #if OL_DEPTHLIMIT 100 #define OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1 //Turn this on to not perform depth limiting for I-SLICES. 101 #define OL_END_CU MAX_INT //Default for initialising the partition information buffer 102 #define OL_PART_BUF_SIZE 86 //maximum number of possible partition bits in a CU 103 #endif 97 104 98 105 #define HHI_INTERVIEW_SKIP 1 -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r100 r115 204 204 Double m_dLambdaScaleVSO; 205 205 UInt m_uiVSOMode; 206 #if LGE_WVSO_A0119 207 Bool m_bWVSO; 208 Int m_iVSOWeight; 209 Int m_iVSDWeight; 210 Int m_iDWeight; 211 #endif 206 212 #endif 207 213 #if SAIT_VSO_EST_A0033 … … 310 316 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 311 317 Bool m_bUseDMM; 318 #endif 319 320 #if OL_DEPTHLIMIT 321 Bool m_bDepthPartitionLimiting; 312 322 #endif 313 323 … … 466 476 Void setAllowNegDist ( Bool b ) { m_bAllowNegDist = b; }; 467 477 #endif 478 #if LGE_WVSO_A0119 479 Void setWVSO ( Bool b ) { m_bWVSO = b; } 480 Void setVSOWeight ( Int i ) { m_iVSOWeight = i; } 481 Void setVSDWeight ( Int i ) { m_iVSDWeight = i; } 482 Void setDWeight ( Int i ) { m_iDWeight = i; } 483 #endif 468 484 #endif 469 485 … … 545 561 #if HHI_VSO_DIST_INT 546 562 Bool getAllowNegDist () { return m_bAllowNegDist; } 563 #endif 564 #if LGE_WVSO_A0119 565 Bool getWVSO () { return m_bWVSO; } 566 Int getVSOWeight () { return m_iVSOWeight; } 567 Int getVSDWeight () { return m_iVSDWeight; } 568 Int getDWeight () { return m_iDWeight; } 547 569 #endif 548 570 #endif … … 799 821 #endif 800 822 823 #if OL_DEPTHLIMIT 824 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 825 Bool getUseDPL() {return m_bDepthPartitionLimiting;} 826 #endif 827 801 828 Void setViewOrderIdx ( Int i ) { m_iViewOrderIdx = i; } 802 829 Void setCamParPrecision ( UInt u ) { m_uiCamParPrecision = u; } -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r100 r115 451 451 TComPic* pcPic = rpcBestCU->getPic(); 452 452 453 #if OL_DEPTHLIMIT 454 TComSPS *sps = pcPic->getSlice(0)->getSPS(); 455 TComPic *pcTexture; 456 TComDataCU *pcTextureCU; 457 static UInt* texPartInfo; 458 static UInt uiTexPartIndex; 459 static Bool depthMapDetect = false; 460 UInt uiPrevTexPartIndex = 0; 461 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 462 static Bool bIntraSliceDetect = false; 463 #endif 464 Bool bTry2NxN = false; 465 Bool bTryNx2N = false; 466 if(uiDepth == 0) 467 { 468 pcTexture = rpcBestCU->getSlice()->getTexturePic(); 469 if(pcTexture != NULL) //depth map being encoded 470 { 471 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 472 bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType()==I_SLICE); 473 #endif 474 pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); 475 texPartInfo = pcTextureCU -> readPartInfo(); 476 uiTexPartIndex = 0; 477 depthMapDetect = true; 478 } 479 else 480 { 481 depthMapDetect = false; 482 } 483 } 484 #endif 453 485 // get Original YUV data from picture 454 486 m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); … … 592 624 593 625 rpcTempCU->initEstData( uiDepth, iQP ); 626 627 #if OL_DEPTHLIMIT 628 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 629 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 630 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 631 #else 632 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 633 #endif 634 { 635 assert(uiDepth == (UInt)texPartInfo[uiTexPartIndex+1]); 636 if((UInt)texPartInfo[uiTexPartIndex+0] == 1) //NxN modes 637 { 638 bTrySplit = true; 639 bTryNx2N = true; 640 bTry2NxN = true; 641 uiPrevTexPartIndex = uiTexPartIndex; 642 uiTexPartIndex += 2; 643 } 644 else if((UInt)texPartInfo[uiTexPartIndex+0] == 0) //2Nx2N modes 645 { 646 UInt uiTexdepth; 647 UInt temp_uiTexPartIndex; 648 bTrySplit = false; 649 //scan ahead till next depth 650 uiTexdepth = (UInt)texPartInfo[uiTexPartIndex+1]; 651 uiPrevTexPartIndex = uiTexPartIndex; 652 uiTexPartIndex+=2; 653 temp_uiTexPartIndex = uiTexPartIndex; //store in case to rewind 654 //temp_uiTexPartIndex+=2; 655 while(uiTexdepth != (UInt)texPartInfo[uiTexPartIndex+1] && uiTexdepth != 0) 656 { 657 if((UInt)texPartInfo[uiTexPartIndex+1] < uiTexdepth) 658 { 659 break; 660 } 661 uiTexPartIndex+=2; 662 663 if((UInt)texPartInfo[uiTexPartIndex+1] == OL_END_CU) 664 { 665 uiTexPartIndex = temp_uiTexPartIndex; 666 uiTexdepth++; 667 if(uiTexdepth >= g_uiMaxCUDepth) 668 { 669 //uiTexPartIndex-=2; 670 break; 671 } 672 } 673 } 674 } 675 else if((UInt)texPartInfo[uiTexPartIndex+0] == OL_END_CU) 676 { 677 bTrySplit = false; 678 bTryNx2N = false; 679 bTry2NxN = false; 680 } 681 else if((UInt)texPartInfo[uiTexPartIndex+0] == 2) //2NxN case 682 { 683 bTrySplit = false; 684 bTryNx2N = false; 685 bTry2NxN = true; 686 uiPrevTexPartIndex = uiTexPartIndex; 687 uiTexPartIndex += 2; 688 } 689 else if((UInt)texPartInfo[uiTexPartIndex+0] == 3) //Nx2N case 690 { 691 bTrySplit = false; 692 bTryNx2N = true; 693 bTry2NxN = false; 694 uiPrevTexPartIndex = uiTexPartIndex; 695 uiTexPartIndex += 2; 696 } 697 } 698 #endif 699 594 700 595 701 // do inter modes, SKIP and 2Nx2N … … 660 766 } // != I_SLICE 661 767 768 #if OL_DEPTHLIMIT 769 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 770 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 771 #else 772 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 773 #endif 774 { 775 bTrySplitDQP = bTrySplit; 776 } 777 else 778 { 779 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) 780 { 781 if(iQP == iBaseQP) 782 { 783 bTrySplitDQP = bTrySplit; 784 } 785 } 786 else 787 { 788 bTrySplitDQP = bTrySplit; 789 } 790 } 791 #else 662 792 663 793 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) … … 672 802 bTrySplitDQP = bTrySplit; 673 803 } 804 #endif 674 805 #if LOSSLESS_CODING 675 806 if (isAddLowestQP && (iQP == lowestQP)) … … 721 852 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 722 853 { 854 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 855 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 856 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 857 #else 858 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 859 #endif 860 { 861 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 862 if (bTrySplit) 863 { 864 #endif 723 865 #if HHI_INTER_VIEW_RESIDUAL_PRED 724 866 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); … … 730 872 #endif 731 873 rpcTempCU->initEstData( uiDepth, iQP ); 732 } 874 #if OL_DEPTHLIMIT 875 }//bTrySplit 876 }//depthMapDetect 877 else//do things normally 878 { 879 #if HHI_INTER_VIEW_RESIDUAL_PRED 880 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 881 #endif 882 #if HHI_INTERVIEW_SKIP 883 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 884 #else 885 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 886 #endif 887 rpcTempCU->initEstData( uiDepth, iQP ); 888 } 889 #endif 890 } 733 891 } 734 892 } 735 893 736 894 { // 2NxN, Nx2N 895 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 896 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 897 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 898 #else 899 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 900 #endif 901 { 902 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 903 if (bTryNx2N) 904 { 905 #endif 737 906 if(doNotBlockPu) 738 907 { … … 751 920 } 752 921 } 922 #if OL_DEPTHLIMIT 923 }//bTryNx2N 924 }//depthMapDetect 925 else//do things normally 926 { 927 if(doNotBlockPu) 928 { 929 #if HHI_INTER_VIEW_RESIDUAL_PRED 930 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 931 #endif 932 #if HHI_INTERVIEW_SKIP 933 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 934 #else 935 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 936 #endif 937 rpcTempCU->initEstData( uiDepth, iQP ); 938 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 939 { 940 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 941 } 942 } 943 } 944 #endif 945 946 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 947 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 948 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 949 #else 950 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 951 #endif 952 { 953 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 954 if (bTry2NxN) 955 { 956 #endif 753 957 if(doNotBlockPu) 754 958 { … … 767 971 } 768 972 } 973 #if OL_DEPTHLIMIT 974 }//bTryNx2N 975 }//depthMapDetect 976 else//do things normally 977 { 978 if(doNotBlockPu) 979 { 980 #if HHI_INTER_VIEW_RESIDUAL_PRED 981 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 982 #endif 983 #if HHI_INTERVIEW_SKIP 984 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 985 #else 986 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 987 #endif 988 rpcTempCU->initEstData( uiDepth, iQP ); 989 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 990 { 991 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 992 } 993 } 994 } 995 #endif 769 996 } 770 997 … … 787 1014 if ( bTestAMP_Hor ) 788 1015 { 1016 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 1017 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1018 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1019 #else 1020 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1021 #endif 1022 { 1023 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1024 if (bTry2NxN) 1025 { 1026 #endif 789 1027 if(doNotBlockPu) 790 1028 { … … 819 1057 } 820 1058 } 821 } 822 #if AMP_MRG 823 else if ( bTestMergeAMP_Hor ) 824 { 1059 #if OL_DEPTHLIMIT 1060 }//bTry2NxN 1061 }//depthMapDetect 1062 else//do things normally 1063 { 825 1064 if(doNotBlockPu) 826 1065 { … … 829 1068 #endif 830 1069 #if HHI_INTERVIEW_SKIP 831 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec , true);832 #else 833 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU , true);1070 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1071 #else 1072 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 834 1073 #endif 835 1074 rpcTempCU->initEstData( uiDepth, iQP ); … … 845 1084 #endif 846 1085 #if HHI_INTERVIEW_SKIP 847 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec , true);848 #else 849 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD , true);1086 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1087 #else 1088 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 850 1089 #endif 851 1090 rpcTempCU->initEstData( uiDepth, iQP ); … … 857 1096 } 858 1097 #endif 1098 } 1099 #if AMP_MRG 1100 else if ( bTestMergeAMP_Hor ) 1101 { 1102 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 1103 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1104 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1105 #else 1106 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1107 #endif 1108 { 1109 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1110 if (bTry2NxN) 1111 { 1112 #endif 1113 if(doNotBlockPu) 1114 { 1115 #if HHI_INTER_VIEW_RESIDUAL_PRED 1116 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1117 #endif 1118 #if HHI_INTERVIEW_SKIP 1119 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 1120 #else 1121 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 1122 #endif 1123 rpcTempCU->initEstData( uiDepth, iQP ); 1124 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1125 { 1126 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1127 } 1128 } 1129 if(doNotBlockPu) 1130 { 1131 #if HHI_INTER_VIEW_RESIDUAL_PRED 1132 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1133 #endif 1134 #if HHI_INTERVIEW_SKIP 1135 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 1136 #else 1137 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 1138 #endif 1139 rpcTempCU->initEstData( uiDepth, iQP ); 1140 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1141 { 1142 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1143 } 1144 } 1145 #if OL_DEPTHLIMIT 1146 }//bTry2NxN 1147 }//depthMapDetect 1148 else//do things normally 1149 { 1150 if(doNotBlockPu) 1151 { 1152 #if HHI_INTER_VIEW_RESIDUAL_PRED 1153 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1154 #endif 1155 #if HHI_INTERVIEW_SKIP 1156 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 1157 #else 1158 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 1159 #endif 1160 rpcTempCU->initEstData( uiDepth, iQP ); 1161 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1162 { 1163 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1164 } 1165 } 1166 if(doNotBlockPu) 1167 { 1168 #if HHI_INTER_VIEW_RESIDUAL_PRED 1169 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1170 #endif 1171 #if HHI_INTERVIEW_SKIP 1172 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 1173 #else 1174 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 1175 #endif 1176 rpcTempCU->initEstData( uiDepth, iQP ); 1177 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1178 { 1179 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1180 } 1181 } 1182 1183 } 1184 #endif 1185 } 1186 #endif 859 1187 860 1188 //! Do horizontal AMP 861 1189 if ( bTestAMP_Ver ) 862 1190 { 1191 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 1192 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1193 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1194 #else 1195 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1196 #endif 1197 { 1198 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1199 if (bTryNx2N) 1200 { 1201 #endif 863 1202 if(doNotBlockPu) 864 1203 { … … 889 1228 rpcTempCU->initEstData( uiDepth, iQP ); 890 1229 } 891 } 892 #if AMP_MRG 893 else if ( bTestMergeAMP_Ver ) 894 { 1230 #if OL_DEPTHLIMIT 1231 }//bTryNx2N 1232 }//depthMapDetect 1233 else//do things normally 1234 { 895 1235 if(doNotBlockPu) 896 1236 { … … 899 1239 #endif 900 1240 #if HHI_INTERVIEW_SKIP 901 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec , true);902 #else 903 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N , true);1241 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1242 #else 1243 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 904 1244 #endif 905 1245 rpcTempCU->initEstData( uiDepth, iQP ); … … 915 1255 #endif 916 1256 #if HHI_INTERVIEW_SKIP 917 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec , true);918 #else 919 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N , true);1257 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1258 #else 1259 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 920 1260 #endif 921 1261 rpcTempCU->initEstData( uiDepth, iQP ); 922 1262 } 1263 } 1264 #endif 1265 } 1266 #if AMP_MRG 1267 else if ( bTestMergeAMP_Ver ) 1268 { 1269 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 1270 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1271 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1272 #else 1273 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1274 #endif 1275 { 1276 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1277 if (bTryNx2N) 1278 { 1279 #endif 1280 if(doNotBlockPu) 1281 { 1282 #if HHI_INTER_VIEW_RESIDUAL_PRED 1283 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1284 #endif 1285 #if HHI_INTERVIEW_SKIP 1286 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 1287 #else 1288 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 1289 #endif 1290 rpcTempCU->initEstData( uiDepth, iQP ); 1291 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1292 { 1293 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1294 } 1295 } 1296 if(doNotBlockPu) 1297 { 1298 #if HHI_INTER_VIEW_RESIDUAL_PRED 1299 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1300 #endif 1301 #if HHI_INTERVIEW_SKIP 1302 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 1303 #else 1304 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 1305 #endif 1306 rpcTempCU->initEstData( uiDepth, iQP ); 1307 } 1308 #if OL_DEPTHLIMIT 1309 }//bTryNx2N 1310 }//depthMapDetect 1311 else//do things normally 1312 { 1313 if(doNotBlockPu) 1314 { 1315 #if HHI_INTER_VIEW_RESIDUAL_PRED 1316 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1317 #endif 1318 #if HHI_INTERVIEW_SKIP 1319 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 1320 #else 1321 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 1322 #endif 1323 rpcTempCU->initEstData( uiDepth, iQP ); 1324 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1325 { 1326 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1327 } 1328 } 1329 if(doNotBlockPu) 1330 { 1331 #if HHI_INTER_VIEW_RESIDUAL_PRED 1332 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1333 #endif 1334 #if HHI_INTERVIEW_SKIP 1335 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 1336 #else 1337 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 1338 #endif 1339 rpcTempCU->initEstData( uiDepth, iQP ); 1340 } 1341 } 1342 #endif 923 1343 } 924 1344 #endif … … 994 1414 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 995 1415 { 1416 #if OL_DEPTHLIMIT //add code here to select or deselect NxN mode for Intra 1417 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1418 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1419 #else 1420 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1421 #endif 1422 { 1423 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1424 if (bTrySplit) 1425 { 1426 1427 #endif 996 1428 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 997 1429 { … … 999 1431 rpcTempCU->initEstData( uiDepth, iQP ); 1000 1432 } 1433 #if OL_DEPTHLIMIT 1434 }//bTrySplit 1435 }//depthMapDetect 1436 else 1437 { 1438 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1439 { 1440 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1441 rpcTempCU->initEstData( uiDepth, iQP ); 1442 } 1443 } 1444 #endif 1001 1445 } 1002 1446 } … … 1561 2005 #if HHI_MPI 1562 2006 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) ) 1563 #endif 2007 { 2008 #endif 2009 1564 2010 m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 2011 2012 #if HHI_MPI 2013 } 2014 #endif 1565 2015 } 1566 2016 else … … 1577 2027 1578 2028 if( ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 2029 { 1579 2030 m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 2031 } 1580 2032 if( !pcCU->getSlice()->isIntra() ) 1581 2033 { … … 1631 2083 #if HHI_MPI 1632 2084 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) 2085 { 1633 2086 #endif 1634 2087 if( !pcCU->getSlice()->isIntra() ) … … 1636 2089 m_pcEntropyCoder->encodeSkipFlag( pcCU, uiAbsPartIdx ); 1637 2090 } 2091 #if HHI_MPI 2092 } 2093 #endif 1638 2094 1639 2095 if( pcCU->isSkipped( uiAbsPartIdx ) ) 1640 2096 { 2097 #if OL_DEPTHLIMIT 2098 if(pcCU->getPartDumpFlag()) 2099 { 2100 pcCU->updatePartInfo(0,uiDepth); 2101 pcCU->incrementPartInfo(); 2102 } 2103 #endif 1641 2104 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1642 2105 #if HHI_INTER_VIEW_RESIDUAL_PRED -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r102 r115 464 464 m_pcRdCost->setDepthPicYuv ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) ); 465 465 #endif 466 466 #if LGE_WVSO_A0119 467 Bool bWVSO = m_pcEncTop->getWVSO(); 468 m_pcRdCost->setWVSO( bWVSO ); 469 #endif 467 470 468 471 } … … 1133 1136 if (!bEntropySlice) 1134 1137 { 1138 #if OL_DEPTHLIMIT //start dumping partition information 1139 m_pcSliceEncoder->setPartDumpFlag(1); 1140 // if(!(pcPic->getSlice(0)->getSPS()->getUseDPL())) 1141 // { 1142 // m_pcSliceEncoder->setPartDumpFlag(0); 1143 // } 1144 #endif 1135 1145 pcSlice->setTileLocationCount ( 0 ); 1136 1146 m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info. 1147 #if OL_DEPTHLIMIT //stop dumping partition information 1148 m_pcSliceEncoder->setPartDumpFlag(0); 1149 #endif 1137 1150 } 1138 1151 else 1139 1152 { 1153 #if OL_DEPTHLIMIT //start dumping partition information 1154 m_pcSliceEncoder->setPartDumpFlag(1); 1155 #endif 1140 1156 m_pcSliceEncoder->encodeSlice(pcPic, &nalu.m_Bitstream, pcSubstreamsOut); // nalu.m_Bitstream is only used for CAVLC tile position info. 1157 #if OL_DEPTHLIMIT //stop dumping partition information 1158 m_pcSliceEncoder->setPartDumpFlag(0); 1159 #endif 1141 1160 } 1142 1161 -
trunk/source/Lib/TLibEncoder/TEncSbac.cpp
r101 r115 580 580 { 581 581 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 582 #if OL_DEPTHLIMIT 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 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 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 } … … 594 612 { 595 613 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 614 #if OL_DEPTHLIMIT 615 if(pcCU->getPartDumpFlag()) 616 { 617 // if (!pcCU->isIntra( uiAbsPartIdx )) 618 { 619 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N 620 pcCU->incrementPartInfo(); 621 } 622 } 623 #endif 596 624 break; 597 625 } … … 623 651 } 624 652 } 653 #if OL_DEPTHLIMIT 654 if(pcCU->getPartDumpFlag()) 655 { 656 // if (!pcCU->isIntra( uiAbsPartIdx )) 657 { 658 pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN 659 pcCU->incrementPartInfo(); 660 } 661 } 662 #endif 625 663 break; 626 664 } … … 656 694 } 657 695 } 696 #if OL_DEPTHLIMIT 697 if(pcCU->getPartDumpFlag()) 698 { 699 // if (!pcCU->isIntra( uiAbsPartIdx )) 700 { 701 pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N 702 pcCU->incrementPartInfo(); 703 } 704 } 705 #endif 658 706 break; 659 707 } … … 665 713 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 666 714 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 715 #if OL_DEPTHLIMIT 716 if(pcCU->getPartDumpFlag()) 717 { 718 //if (!pcCU->getSlice()->isIntra()) 719 { 720 pcCU->updatePartInfo(1,uiDepth); //2Nx2N here since we disable NxN in Inter 721 pcCU->incrementPartInfo(); 722 } 723 } 724 #endif 725 } 726 else 727 { 728 #if OL_DEPTHLIMIT 729 if(pcCU->getPartDumpFlag()) 730 { 731 //if (!pcCU->getSlice()->isIntra()) 732 { 733 pcCU->updatePartInfo(0,uiDepth); //2Nx2N here since we disable NxN in Inter 734 pcCU->incrementPartInfo(); 735 } 736 } 737 #endif 667 738 } 668 739 break; … … 828 899 assert( uiCtx < 3 ); 829 900 m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) ); 901 #if OL_DEPTHLIMIT 902 if(pcCU->getPartDumpFlag()) 903 { 904 if(pcCU->getSlice()->isIntra() || (!pcCU->getSlice()->isIntra() && uiCurrSplitFlag!=0)) 905 { 906 pcCU->updatePartInfo(uiCurrSplitFlag,uiDepth); 907 pcCU->incrementPartInfo(); 908 } 909 } 910 #endif 830 911 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 831 912 DTRACE_CABAC_T( "\tSplitFlag\n" ) -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r100 r115 1129 1129 if ( m_pcRdCost->getUseVSO() ) 1130 1130 { 1131 #if LGE_WVSO_A0119 1132 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 1133 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 1134 Dist iD = (Dist) m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight ); 1135 Dist iVSO = m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 ); 1136 ruiDist += (iDWeight * iD + iVSOWeight * iVSO) / ( iDWeight + iVSOWeight); 1137 1138 #else 1131 1139 ruiDist += m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 ); 1140 #endif 1132 1141 } 1133 1142 else … … 1902 1911 1903 1912 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 ) ); 1913 #if LGE_WVSO_A0119 1914 Int iDWeight = m_pcRdCost->getDWeight(); 1915 Int iVSDWeight = m_pcRdCost->getVSDWeight(); 1916 Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight ); 1917 uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight); 1918 #endif 1904 1919 } 1905 1920 else … … 4391 4406 { 4392 4407 uiDistortion = m_pcRdCost->getDistVS( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight , false, 0 ); 4408 #if LGE_WVSO_A0119 4409 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 4410 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 4411 Dist iD = (Dist) m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight ); 4412 uiDistortion = (iDWeight * iD + iVSOWeight * (Dist)uiDistortion) / ( iDWeight + iVSOWeight); 4413 #endif 4393 4414 } 4394 4415 else … … 4750 4771 { 4751 4772 uiDistortionBest = m_pcRdCost->getDistVS ( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight, false, 0 ); 4773 #if LGE_WVSO_A0119 4774 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 4775 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 4776 Dist iD = (Dist) m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight ); 4777 uiDistortionBest = (iDWeight * iD + iVSOWeight * (Dist) uiDistortionBest) / ( iDWeight + iVSOWeight); 4778 #endif 4752 4779 } 4753 4780 else … … 4985 5012 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 4986 5013 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 ); 5014 #if LGE_WVSO_A0119 5015 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5016 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 5017 Dist iD = (Dist) m_pcRdCost->getDistPart( m_pTempPel, trWidth, pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth, trHeight ); 5018 uiDistY = (iDWeight * iD + iVSDWeight * (Dist)uiDistY) / ( iDWeight + iVSDWeight); 5019 #endif 4987 5020 } 4988 5021 else … … 5035 5068 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 5036 5069 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 ); 5070 #if LGE_WVSO_A0119 5071 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5072 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 5073 Dist iD = (Dist) m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight ); 5074 uiNonzeroDistY = (iDWeight * iD + iVSDWeight * (Dist) uiNonzeroDistY) / ( iDWeight + iVSDWeight); 5075 #endif 5037 5076 } 5038 5077 else … … 6119 6158 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6120 6159 uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6160 #if LGE_WVSO_A0119 6161 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6162 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6163 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6164 uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight); 6165 #endif 6121 6166 } 6122 6167 else … … 6232 6277 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6233 6278 uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6279 #if LGE_WVSO_A0119 6280 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6281 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6282 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 6283 uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight); 6284 #endif 6234 6285 } 6235 6286 else … … 6298 6349 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6299 6350 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 ); 6351 #if LGE_WVSO_A0119 6352 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6353 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6354 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 6355 uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight); 6356 #endif 6300 6357 } 6301 6358 else -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r102 r115 376 376 m_pcRdCost->setDisparityCoeff( m_pcCfg->getDispCoeff() ); 377 377 #endif 378 378 #if LGE_WVSO_A0119 379 if( m_pcCfg->getWVSO() && 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 // if( rpcSlice->getViewId() ) iDWeight = ( iDWeight >> 1 ); 387 // if( rpcSlice->getPOC() % 8 != 0 ) iDWeight = ( iDWeight >> 1 ); 388 // if( rpcSlice->getPOC() % 4 != 0 ) iDWeight = ( iDWeight >> 1 ); 389 // if( rpcSlice->getPOC() % 2 != 0 ) iDWeight = ( iDWeight >> 1 ); 390 391 m_pcRdCost->setDWeight( iDWeight ); 392 m_pcRdCost->setVSOWeight( iVSOWeight ); 393 m_pcRdCost->setVSDWeight( iVSDWeight ); 394 395 } 396 #endif 379 397 #if RDOQ_CHROMA_LAMBDA 380 398 // for RDOQ … … 831 849 #endif 832 850 851 #if OL_DEPTHLIMIT //stop dumping partition information 852 b_dumpPartInfo = 0; 853 pcCU->setPartDumpFlag(b_dumpPartInfo); 854 #endif 833 855 834 856 // inherit from TR if necessary, select substream to use. … … 1290 1312 1291 1313 TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr ); 1314 #if OL_DEPTHLIMIT 1315 pcCU->setPartDumpFlag(b_dumpPartInfo); 1316 pcCU->resetPartInfo(); 1317 #endif 1292 1318 #if !REMOVE_TILE_DEPENDENCE 1293 1319 if( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) ) -
trunk/source/Lib/TLibEncoder/TEncSlice.h
r77 r115 101 101 102 102 UInt m_uiSliceIdx; 103 #if OL_DEPTHLIMIT //flag to signal to start dumping 104 bool b_dumpPartInfo; 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 //flag to signal to start dumping 134 Void setPartDumpFlag(bool flag) {b_dumpPartInfo = flag;}; 135 #endif 130 136 }; 131 137 -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r105 r115 768 768 m_cSPS.setUseDMM( m_bUseDMM ); 769 769 #endif 770 #if OL_DEPTHLIMIT 771 m_cSPS.setUseDPL( m_bDepthPartitionLimiting ); 772 #endif 770 773 #if HHI_MPI 771 774 m_cSPS.setUseMVI( m_bUseMVI );
Note: See TracChangeset for help on using the changeset viewer.