Changeset 1164 in 3DVCSoftware
- Timestamp:
- 16 Mar 2015, 12:52:20 (10 years ago)
- Location:
- branches/HTM-13.1-dev0
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-13.1-dev0/cfg/MV-HEVC/baseCfg_2view.cfg
r1084 r1164 94 94 FEN : 1 # Fast encoder decision 95 95 FDM : 1 # Fast Decision for Merge RD cost 96 DispSearchRangeRestriction : 0 # Limit Search range for vertical component of disparity vector 97 VerticalDispSearchRange : 56 # Vertical Search range in pixel 96 98 97 99 #======== Quantization ============= -
branches/HTM-13.1-dev0/cfg/MV-HEVC/baseCfg_3view.cfg
r1084 r1164 120 120 FEN : 1 # Fast encoder decision 121 121 FDM : 1 # Fast Decision for Merge RD cost 122 DispSearchRangeRestriction : 0 # Limit Search range for vertical component of disparity vector 123 VerticalDispSearchRange : 56 # Vertical Search range in pixel 122 124 123 125 #======== Quantization ============= -
branches/HTM-13.1-dev0/cfg/MV-HEVC/fullCfg.cfg
r1084 r1164 226 226 FEN : 1 # Fast encoder decision 227 227 FDM : 1 # Fast Decision for Merge RD cost 228 DispSearchRangeRestriction : 0 # Limit Search range for vertical component of disparity vector 229 VerticalDispSearchRange : 56 # Vertical Search range in pixel 228 230 229 231 #======== Quantization ============= -
branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r1163 r1164 477 477 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") 478 478 ("SearchRange,-sr", m_iSearchRange, 96, "Motion search range") 479 #ifdef SONY_MV_V_CONST_C0078 480 ("DispSearchRangeRestriction", m_bUseDisparitySearchRangeRestriction, false, "restrict disparity search range") 481 ("VerticalDispSearchRange", m_iVerticalDisparitySearchRange, 56, "vertical disparity search range") 482 #endif 479 483 ("BipredSearchRange", m_bipredSearchRange, 4, "Motion search range for bipred refinement") 480 484 ("HadamardME", m_bUseHADME, true, "Hadamard ME for fractional-pel") … … 1586 1590 xConfirmPara( m_iSearchRange < 0 , "Search Range must be more than 0" ); 1587 1591 xConfirmPara( m_bipredSearchRange < 0 , "Search Range must be more than 0" ); 1592 #ifdef SONY_MV_V_CONST_C0078 1593 xConfirmPara( m_iVerticalDisparitySearchRange <= 0 , "Vertical Disparity Search Range must be more than 0" ); 1594 #endif 1588 1595 xConfirmPara( m_iMaxDeltaQP > 7, "Absolute Delta QP exceeds supported range (0 to 7)" ); 1589 1596 xConfirmPara( m_iMaxCuDQPDepth > m_uiMaxCUDepth - 1, "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth" ); … … 2457 2464 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 2458 2465 printf("Motion search range : %d\n", m_iSearchRange ); 2466 #ifdef SONY_MV_V_CONST_C0078 2467 printf("Disp search range restriction: %d\n", m_bUseDisparitySearchRangeRestriction ); 2468 printf("Vertical disp search range : %d\n", m_iVerticalDisparitySearchRange ); 2469 #endif 2459 2470 #if H_MV 2460 2471 xPrintParaVector( "Intra period", m_iIntraPeriod ); -
branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncCfg.h
r1163 r1164 289 289 Int m_iSearchRange; ///< ME search range 290 290 Int m_bipredSearchRange; ///< ME search range for bipred refinement 291 #ifdef SONY_MV_V_CONST_C0078 292 Bool m_bUseDisparitySearchRangeRestriction; ///< restrict vertical search range for inter-view prediction 293 Int m_iVerticalDisparitySearchRange; ///< ME vertical search range for inter-view prediction 294 #endif 291 295 Bool m_bUseFastEnc; ///< flag for using fast encoder setting 292 296 Bool m_bUseEarlyCU; ///< flag for using Early CU setting -
branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r1163 r1164 352 352 m_cTEncTop.setBipredSearchRange ( m_bipredSearchRange ); 353 353 354 #if SONY_MV_V_CONST_C0078 355 m_cTEncTop.setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction ); 356 m_cTEncTop.setVerticalDisparitySearchRange ( m_iVerticalDisparitySearchRange ); 357 #endif 354 358 //====== Quality control ======== 355 359 m_cTEncTop.setMaxDeltaQP ( m_iMaxDeltaQP ); -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r1163 r1164 2388 2388 Int iPictureHeight = depthPicYuv->getHeight(); 2389 2389 2390 #if !HS_DBBP_CLEAN_K0048 2390 2391 Int iWidth = uiWidth; 2391 2392 Int iHeight = uiHeight; 2393 #endif 2392 2394 2393 2395 Bool depthRefineFlag = false; … … 2402 2404 } 2403 2405 2406 #if HS_DBBP_CLEAN_K0048 2407 Int depthPosX = Clip3(0, iPictureWidth - 1, iBlkX + ((cDv.getHor()+2)>>2)); 2408 Int depthPosY = Clip3(0, iPictureHeight - 1, iBlkY + ((cDv.getVer()+2)>>2)); 2409 #else 2404 2410 Int depthPosX = Clip3(0, iPictureWidth - iWidth, iBlkX + ((cDv.getHor()+2)>>2)); 2405 2411 Int depthPosY = Clip3(0, iPictureHeight- iHeight, iBlkY + ((cDv.getVer()+2)>>2)); 2412 #endif 2406 2413 2407 2414 pDepthPels = depthPicYuv->getLumaAddr() + depthPosX + depthPosY * uiDepthStride; … … 4189 4196 } 4190 4197 } 4198 #if !SHARP_SUBBLOCK_CLEAN_K0044 4191 4199 if (iPUHeight + iPUWidth == 12) 4192 4200 { … … 4197 4205 } 4198 4206 } 4207 #endif 4199 4208 4200 4209 iPartition ++; … … 5411 5420 rcMv.setVer( min (iVerMax, max (iVerMin, rcMv.getVer())) ); 5412 5421 } 5422 5423 #if SONY_MV_V_CONST_C0078 5424 Void TComDataCU::checkMV_V (TComMv& rcMv, RefPicList eRefPicList, int iRefIdx ) 5425 { 5426 if ( getSlice()->getSPS()->getInterViewMvVertConstraintFlag() ) 5427 { 5428 if ( getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC() == getSlice()->getPOC() ) 5429 { 5430 //When inter_view_mv_vert_constraint_flag is equal to 1, 5431 //the vertical component of the motion vectors used for inter-layer prediction 5432 //shall be equal to or less than 56 in units of luma samples 5433 assert ( rcMv.getVer() <= (56<<2) ); 5434 } 5435 } 5436 } 5437 #endif 5413 5438 5414 5439 UInt TComDataCU::getIntraSizeIdx(UInt uiAbsPartIdx) … … 6918 6943 6919 6944 } 6945 #if !SHARP_SUBBLOCK_CLEAN_K0044 6920 6946 if (iSPHeight + iSPWidth == 12) 6921 6947 { … … 6926 6952 } 6927 6953 } 6954 #endif 6928 6955 iPartition ++; 6929 6956 } -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComDataCU.h
r1163 r1164 620 620 621 621 Void clipMv ( TComMv& rcMv ); 622 #if SONY_MV_V_CONST_C0078 623 Void checkMV_V (TComMv& rcMv, RefPicList eRefPicList, int iRefIdx ); 624 #endif 622 625 Void getMvPredLeft ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldA.getMv(); } 623 626 Void getMvPredAbove ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldB.getMv(); } -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r1163 r1164 630 630 631 631 #if H_3D_DBBP 632 #if HS_DBBP_CLEAN_K0048 633 PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU) 634 #else 632 635 PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize) 636 #endif 633 637 { 634 638 // find virtual partitioning for this CU based on depth block … … 639 643 Int iSumDepth = 0; 640 644 Int iSubSample = 4; 645 #if HS_DBBP_CLEAN_K0048 646 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(); 647 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); 648 TComMv cDv = pcCU->getSlice()->getDepthRefinementFlag( ) ? pcCU->getDvInfo(0).m_acDoNBDV : pcCU->getDvInfo(0).m_acNBDV; 649 if( pcCU->getSlice()->getDepthRefinementFlag( ) ) 650 { 651 cDv.setVer(0); 652 } 653 Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2); 654 Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2); 655 UInt t=0; 656 657 for (Int y=0; y<uiSize; y+=iSubSample) 658 { 659 for (Int x=0; x<uiSize; x+=iSubSample) 660 { 661 if (iBlkX+x>iPictureWidth) 662 { 663 Int depthPel = pDepthPels[t]; 664 iSumDepth += depthPel; 665 } 666 else 667 { 668 Int depthPel = pDepthPels[x]; 669 t=x; 670 iSumDepth += depthPel; 671 } 672 } 673 674 // next row 675 if (!(iBlkY+y+4>iPictureHeight)) 676 pDepthPels += uiDepthStride*iSubSample; 677 #else 641 678 for (Int y=0; y<uiSize; y+=iSubSample) 642 679 { … … 650 687 // next row 651 688 pDepthPels += uiDepthStride*iSubSample; 689 #endif 652 690 } 653 691 … … 667 705 for (Int x=0; x<uiSize; x+=iSubSample) 668 706 { 707 #if HS_DBBP_CLEAN_K0048 708 Int depthPel = 0; 709 if (iBlkX+x>iPictureWidth) 710 { 711 depthPel = pDepthPels[t]; 712 } 713 else 714 { 715 depthPel = pDepthPels[x]; 716 t=x; 717 } 718 #else 669 719 Int depthPel = pDepthPels[x]; 720 #endif 670 721 671 722 // decide which segment this pixel belongs to … … 696 747 697 748 // next row 749 #if HS_DBBP_CLEAN_K0048 750 if (!(iBlkY+y+4>iPictureHeight)) 751 #endif 698 752 pDepthPels += uiDepthStride*iSubSample; 699 753 } … … 719 773 } 720 774 775 #if HS_DBBP_CLEAN_K0048 776 Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU) 777 #else 721 778 Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask ) 779 #endif 722 780 { 723 781 // segmentation of texture block --> mask IDs … … 728 786 Int uiMinDepth = MAX_INT; 729 787 Int uiMaxDepth = 0; 730 788 #if HS_DBBP_CLEAN_K0048 789 uiMinDepth = pDepthPels[ 0 ]; 790 uiMaxDepth = pDepthPels[ 0 ]; 791 iSumDepth = pDepthPels[ 0 ]; 792 UInt t=0; 793 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(); 794 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); 795 TComMv cDv = pcCU->getSlice()->getDepthRefinementFlag( ) ? pcCU->getDvInfo(0).m_acDoNBDV : pcCU->getDvInfo(0).m_acNBDV; 796 if( pcCU->getSlice()->getDepthRefinementFlag( ) ) 797 { 798 cDv.setVer(0); 799 } 800 Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2); 801 Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2); 802 if (iBlkX>(Int)(iPictureWidth - uiWidth)) 803 { 804 iSumDepth += pDepthPels[ iPictureWidth - iBlkX - 1 ]; 805 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]); 806 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]); 807 } 808 else 809 { 810 iSumDepth += pDepthPels[ uiWidth - 1 ]; 811 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiWidth - 1 ]); 812 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiWidth - 1 ]); 813 } 814 if (iBlkY>(Int)(iPictureHeight - uiHeight)) 815 { 816 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]; 817 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]); 818 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]); 819 } 820 else 821 { 822 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) ]; 823 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]); 824 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]); 825 } 826 if (iBlkY>(Int)(iPictureHeight - uiHeight) && iBlkX>(Int)(iPictureWidth - uiWidth)) 827 { 828 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]; 829 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]); 830 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]); 831 } 832 else if (iBlkY>(Int)(iPictureHeight - uiHeight)) 833 { 834 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]; 835 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]); 836 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]); 837 } 838 else if (iBlkX>(Int)(iPictureWidth - uiWidth)) 839 { 840 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]; 841 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]); 842 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]); 843 } 844 else 845 { 846 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]; 847 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 848 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 849 } 850 #else 731 851 iSumDepth = pDepthPels[ 0 ]; 732 852 iSumDepth += pDepthPels[ uiWidth - 1 ]; … … 743 863 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]); 744 864 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 745 865 #endif 746 866 747 867 // don't generate mask for blocks with small depth range (encoder decision) … … 765 885 for (Int x=0; x<uiHeight; x++) 766 886 { 887 #if HS_DBBP_CLEAN_K0048 888 Int depthPel = 0; 889 if (iBlkX+x>iPictureWidth) 890 { 891 depthPel = pDepthPels[t]; 892 } 893 else 894 { 895 depthPel = pDepthPels[x]; 896 t=x; 897 } 898 #else 767 899 Int depthPel = pDepthPels[x]; 900 #endif 768 901 769 902 // decide which segment this pixel belongs to … … 783 916 784 917 // next row 918 #if HS_DBBP_CLEAN_K0048 919 if (!(iBlkY+y+1>iPictureHeight)) 920 #endif 785 921 pDepthPels += uiDepthStride; 786 922 pMask += MAX_CU_SIZE; … … 1157 1293 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 1158 1294 pcCU->clipMv(cMv); 1159 1295 #if SONY_MV_V_CONST_C0078 1296 pcCU->checkMV_V(cMv, eRefPicList, iRefIdx ); 1297 #endif 1160 1298 #if H_3D_ARP 1161 1299 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRom.cpp
r1133 r1164 739 739 assert( uiWidth == uiHeight ); 740 740 741 #if SHARP_DMM_CLEAN_K0042 742 Int posStart = 0, posEnd = 0; 743 #else 741 744 UChar uhStartX = 0, uhStartY = 0, uhEndX = 0, uhEndY = 0; 742 745 Int iStepStartX = 0, iStepStartY = 0, iStepEndX = 0, iStepEndY = 0; 746 #endif 743 747 744 748 UInt uiBlockSize = 0; … … 752 756 for( UInt uiOri = 0; uiOri < 6; uiOri++ ) 753 757 { 758 #if !SHARP_DMM_CLEAN_K0042 754 759 // init the edge line parameters for each of the 6 wedgelet types 755 760 switch( uiOri ) … … 762 767 case( 5 ): { uhStartX = (uiBlockSize-1); uhStartY = 0; uhEndX = 0; uhEndY = 0; iStepStartX = 0; iStepStartY = +1; iStepEndX = 0; iStepEndY = +1; break; } 763 768 } 764 769 #endif 770 771 #if SHARP_DMM_CLEAN_K0042 772 posEnd = racWedgeList.size(); 773 if (uiOri == 0 || uiOri == 4) 774 { 775 #endif 765 776 for( Int iK = 0; iK < uiBlockSize; iK += (uiWidth>=16 ?2:1)) 766 777 { 767 778 for( Int iL = 0; iL < uiBlockSize; iL += ((uiWidth>=16 && uiOri<4)?2:1) ) 768 779 { 780 #if SHARP_DMM_CLEAN_K0042 781 Int xS = iK; 782 Int yS = 0; 783 Int xE = (uiOri == 0) ? 0 : iL; 784 Int yE = (uiOri == 0) ? iL : uiBlockSize - 1; 785 cTempWedgelet.setWedgelet( xS, yS, xE, yE, uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 786 #else 769 787 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 788 #endif 770 789 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 771 790 } 772 791 } 792 #if SHARP_DMM_CLEAN_K0042 793 } 794 else 795 { 796 for (Int pos = posStart; pos < posEnd; pos++) 797 { 798 cTempWedgelet.generateWedgePatternByRotate(racWedgeList[pos], uiOri); 799 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 800 } 801 } 802 posStart = posEnd; 803 #endif 773 804 } 774 805 -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComWedgelet.cpp
r1084 r1164 177 177 } 178 178 179 #if SHARP_DMM_CLEAN_K0042 180 Void TComWedgelet::generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate) 181 { 182 Int stride = m_uiWidth; 183 Int sinc, offsetI, offsetJ; 184 185 sinc = 1; 186 offsetI = ( sinc) < 0 ? stride-1 : 0; // 0 187 offsetJ = (-sinc) < 0 ? stride-1 : 0; // stride - 1 188 189 for (Int y = 0; y < stride; y++) 190 { 191 for (Int x = 0; x < stride; x++) 192 { 193 Int i = offsetI + sinc * y; // y 194 Int j = offsetJ - sinc * x; // stride - 1 - x 195 m_pbPattern[(y * stride) + x] = !rcWedge.m_pbPattern[(j * stride) + i]; 196 } 197 } 198 Int blocksize = rcWedge.m_uiWidth * (rcWedge.m_eWedgeRes == HALF_PEL ? 2 : 1); 199 Int offsetX = (-sinc) < 0 ? blocksize - 1 : 0; 200 Int offsetY = ( sinc) < 0 ? blocksize - 1 : 0; 201 m_uhXs = offsetX - sinc * rcWedge.m_uhYs; 202 m_uhYs = offsetY + sinc * rcWedge.m_uhXs; 203 m_uhXe = offsetX - sinc * rcWedge.m_uhYe; 204 m_uhYe = offsetY + sinc * rcWedge.m_uhXe; 205 m_uhOri = rotate; 206 m_eWedgeRes = rcWedge.m_eWedgeRes; 207 m_bIsCoarse = rcWedge.m_bIsCoarse; 208 m_uiAng = rcWedge.m_uiAng; 209 m_uiWidth = rcWedge.m_uiWidth; 210 m_uiHeight = rcWedge.m_uiHeight; 211 } 212 #endif 213 179 214 Void TComWedgelet::xGenerateWedgePattern() 180 215 { … … 193 228 xDrawEdgeLine( uhXs, uhYs, uhXe, uhYe, pbTempPattern, iTempStride ); 194 229 230 #if SHARP_DMM_CLEAN_K0042 231 Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0; 232 Int endPos = uhYe>>shift; 233 for (Int y = 0; y <= endPos; y++) 234 { 235 for (Int x = 0; x < m_uiWidth && pbTempPattern[(y * m_uiWidth) + x] == 0; x++) 236 { 237 pbTempPattern[(y * m_uiWidth) + x] = true; 238 } 239 } 240 for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) 241 { 242 m_pbPattern[k] = pbTempPattern[k]; 243 }; 244 #else 195 245 switch( m_uhOri ) 196 246 { … … 252 302 break; 253 303 } 304 #endif 254 305 255 306 if( pbTempPattern ) … … 294 345 for( Int x = x0; x <= x1; x++ ) 295 346 { 347 #if SHARP_DMM_CLEAN_K0042 348 Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0; 349 Int stride = iPatternStride >> shift; 350 if( steep ) { pbPattern[((x>>shift) * stride) + (y>>shift)] = true; } 351 else { pbPattern[((y>>shift) * stride) + (x>>shift)] = true; } 352 #else 296 353 if( steep ) { pbPattern[(x * iPatternStride) + y] = true; } 297 354 else { pbPattern[(y * iPatternStride) + x] = true; } 355 #endif 298 356 299 357 error += deltaerr; -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComWedgelet.h
r1084 r1164 124 124 Bool* getScaledPattern(UInt uiWidth); 125 125 126 #if SHARP_DMM_CLEAN_K0042 127 Void generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate); 128 #endif 126 129 Void setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false ); 127 130 Void findClosestAngle(); -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h
r1163 r1164 64 64 #define H_MV ( HEVC_EXT != 0) 65 65 #define H_3D ( HEVC_EXT == 2) 66 67 #if H_MV 68 #define SONY_MV_V_CONST_C0078 1 // Control disparity vector search range via configuration file 69 #endif 66 70 67 71 #define NTT_BUG_FIX_TK54 1 … … 280 284 // SEC_DBBP_DMM4_THRESHOLD_I0076 Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076 281 285 // SEC_DBBP_VIEW_REF_CHECK_J0037 1 // Signaling dbbp_flag when the current slice has view reference picture(s), JCT3V-J0037 item4 286 #define HS_DBBP_CLEAN_K0048 1 282 287 283 288 #define H_3D_DDD 1 // Disparity derived depth coding … … 367 372 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 368 373 // LG_ZEROINTRADEPTHRESI_A0087 374 #define SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation 369 375 370 376 #define TICKET083_IVPFLAG_FIX 1 377 #define SHARP_SUBBLOCK_CLEAN_K0044 1 // Remove unused bipred restriction 378 371 379 #endif 372 380 ///// ***** VIEW SYNTHESIS PREDICTION ********* -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r1163 r1164 954 954 // compute mask by segmenting depth block 955 955 Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE]; 956 #if HS_DBBP_CLEAN_K0048 957 Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask, pcCU); 958 #else 956 959 Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask); 960 #endif 957 961 AOF(bValidMask); 958 962 -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r1133 r1164 954 954 955 955 xActivateParameterSets(); 956 957 #if SONY_MV_V_CONST_C0078 958 //Check Multiview Main profile constraint in G.11.1.1 959 // When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1 960 // for the layer with nuh_layer_id equal to i in subBitstream, 961 // inter_view_mv_vert_constraint_flag shall be equal to 1 962 // in the sps_multilayer_extension( ) syntax structure in each active SPS for that layer. 963 if( m_apcSlicePilot->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc()==Profile::MULTIVIEWMAIN 964 && 965 m_apcSlicePilot->getVPS()->getViewOrderIdx(m_apcSlicePilot->getVPS()->getLayerIdInNuh(getLayerId()))==1 966 ) 967 { 968 assert( m_apcSlicePilot->getSPS()->getInterViewMvVertConstraintFlag()==1 ); 969 } 970 #endif 956 971 957 972 if (m_apcSlicePilot->isNextSlice()) -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCfg.h
r1133 r1164 180 180 Int m_iSearchRange; // 0:Full frame 181 181 Int m_bipredSearchRange; 182 182 #ifdef SONY_MV_V_CONST_C0078 183 Bool m_bUseDisparitySearchRangeRestriction; 184 Int m_iVerticalDisparitySearchRange; 185 #endif 183 186 //====== Quality control ======== 184 187 Int m_iMaxDeltaQP; // Max. absolute delta QP (1:default) … … 502 505 Void setSearchRange ( Int i ) { m_iSearchRange = i; } 503 506 Void setBipredSearchRange ( Int i ) { m_bipredSearchRange = i; } 507 #ifdef SONY_MV_V_CONST_C0078 508 Void setUseDisparitySearchRangeRestriction ( Bool b ) { m_bUseDisparitySearchRangeRestriction = b; } 509 Void setVerticalDisparitySearchRange ( Int i ) { m_iVerticalDisparitySearchRange = i; } 510 #endif 504 511 505 512 //====== Quality control ======== … … 554 561 Int getFastSearch () { return m_iFastSearch; } 555 562 Int getSearchRange () { return m_iSearchRange; } 563 #ifdef SONY_MV_V_CONST_C0078 564 Bool getUseDisparitySearchRangeRestriction () { return m_bUseDisparitySearchRangeRestriction; } 565 Int getVerticalDisparitySearchRange () { return m_iVerticalDisparitySearchRange; } 566 #endif 556 567 557 568 //==== Quality control ======== -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r1163 r1164 2647 2647 AOF( uiDepthStride != 0 ); 2648 2648 2649 #if HS_DBBP_CLEAN_K0048 2650 PartSize eVirtualPartSize = m_pcPredSearch->getPartitionSizeFromDepth(pDepthPels, uiDepthStride, uiWidth, rpcTempCU); 2651 2649 2652 // derive partitioning from depth 2653 Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE]; 2654 Bool bValidMask = m_pcPredSearch->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, uiWidth, uiHeight, pMask, rpcTempCU); 2655 #else 2650 2656 PartSize eVirtualPartSize = m_pcPredSearch->getPartitionSizeFromDepth(pDepthPels, uiDepthStride, uiWidth); 2651 2657 … … 2653 2659 Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE]; 2654 2660 Bool bValidMask = m_pcPredSearch->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, uiWidth, uiHeight, pMask); 2661 #endif 2655 2662 2656 2663 if( !bValidMask ) -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r1163 r1164 5500 5500 TComMv cMvPred = *pcMvPred; 5501 5501 5502 #ifdef SONY_MV_V_CONST_C0078 5503 Bool bMv_VRng_Restricted = false; 5504 if( m_pcEncCfg->getUseDisparitySearchRangeRestriction() 5505 && 5506 pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getPOC() == pcCU->getSlice()->getPOC() 5507 ) 5508 { 5509 bMv_VRng_Restricted = true; 5510 } 5511 if ( bBi ) xSetSearchRange ( pcCU, rcMv , iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, m_pcEncCfg->getVerticalDisparitySearchRange() ); 5512 else xSetSearchRange ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, m_pcEncCfg->getVerticalDisparitySearchRange() ); 5513 #else 5502 5514 if ( bBi ) xSetSearchRange ( pcCU, rcMv , iSrchRng, cMvSrchRngLT, cMvSrchRngRB ); 5503 5515 else xSetSearchRange ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB ); 5516 #endif 5504 5517 5505 5518 m_pcRdCost->getMotionCost ( 1, 0 ); … … 5554 5567 5555 5568 5569 #ifdef SONY_MV_V_CONST_C0078 5570 Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB, Bool bMv_VRng_Restricted, Int iVerDispSrchRng ) 5571 #else 5556 5572 Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB ) 5573 #endif 5557 5574 { 5558 5575 Int iMvShift = 2; … … 5569 5586 rcMvSrchRngRB.setHor( cTmpMvPred.getHor() + (iSrchRng << iMvShift) ); 5570 5587 rcMvSrchRngRB.setVer( cTmpMvPred.getVer() + (iSrchRng << iMvShift) ); 5588 5589 #ifdef SONY_MV_V_CONST_C0078 5590 if ( bMv_VRng_Restricted ) { 5591 Int iRestrictMvVrange = ( iVerDispSrchRng - 1 ) << iMvShift ; // -1 to consider subpel search 5592 if ( rcMvSrchRngRB.getVer() >= iRestrictMvVrange ){ 5593 rcMvSrchRngRB.setVer( iRestrictMvVrange ); //only positive side is restricted 5594 } 5595 } 5596 #endif 5597 5571 5598 pcCU->clipMv ( rcMvSrchRngLT ); 5572 5599 pcCU->clipMv ( rcMvSrchRngRB ); -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSearch.h
r1163 r1164 480 480 UInt& ruiSAD ); 481 481 482 #ifdef SONY_MV_V_CONST_C0078 483 Void xSetSearchRange ( TComDataCU* pcCU, 484 TComMv& cMvPred, 485 Int iSrchRng, 486 TComMv& rcMvSrchRngLT, 487 TComMv& rcMvSrchRngRB, 488 Bool bMv_VRng_Restricted, 489 Int iVerDispSrchRng ); 490 #else 482 491 Void xSetSearchRange ( TComDataCU* pcCU, 483 492 TComMv& cMvPred, … … 485 494 TComMv& rcMvSrchRngLT, 486 495 TComMv& rcMvSrchRngRB ); 496 #endif 487 497 488 498 Void xPatternSearchFast ( TComDataCU* pcCU, -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r1133 r1164 760 760 m_cSPS.setSpsInferScalingListFlag ( true ); 761 761 m_cSPS.setSpsScalingListRefLayerId( m_cVPS->getIdRefLayer( getLayerId(), 0 ) ); 762 #if SONY_MV_V_CONST_C0078 763 if ( m_bUseDisparitySearchRangeRestriction ) 764 { 765 m_cSPS.setInterViewMvVertConstraintFlag ( true ) ; 766 } 767 #endif 762 768 } 763 769 m_cSPS.setSpsExtensionPresentFlag ( true );
Note: See TracChangeset for help on using the changeset viewer.