Changeset 967 in 3DVCSoftware for branches/HTM-11.1-dev0/source/Lib/TLibCommon
- Timestamp:
- 5 Jul 2014, 08:19:26 (11 years ago)
- Location:
- branches/HTM-11.1-dev0/source/Lib/TLibCommon
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-11.1-dev0/source/Lib/TLibCommon/ContextTables.h
r950 r967 110 110 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 111 111 #endif 112 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135113 112 #define NUM_ANGLE_FLAG_CTX 1 114 #else115 #define NUM_ANGLE_FLAG_CTX 3116 #endif117 113 #endif 118 114 … … 372 368 }; 373 369 374 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135375 370 static const UChar 376 371 INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] = … … 380 375 { 155 }, 381 376 }; 382 #else383 static const UChar384 INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] =385 {386 { 154, 155, 156 },387 { 141, 185, 214 },388 { 155, 170, 157 },389 };390 #endif391 377 392 378 static const UChar … … 444 430 445 431 #if H_3D_DBBP 446 #if MTK_DBBP_SIGNALING_H0094447 432 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] = 448 433 { … … 451 436 { 161 }, 452 437 }; 453 #else 454 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] = 455 { 456 { CNU }, 457 { CNU }, 458 { CNU }, 459 }; 460 #endif 461 #endif 462 463 #endif 438 #endif 439 440 #endif -
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r964 r967 610 610 memset( m_apSegmentDCOffset[1] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[1] ) ); 611 611 #endif 612 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108613 612 m_apDmmPredictor[0] = 0; 614 613 m_apDmmPredictor[1] = 0; 615 #endif616 614 #endif 617 615 #if H_3D_DBBP … … 788 786 m_apSegmentDCOffset[1][ui] = 0; 789 787 #endif 790 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108791 788 m_apDmmPredictor[0] = 0; 792 789 m_apDmmPredictor[1] = 0; 793 #endif794 790 #endif 795 791 #if H_3D_DBBP … … 907 903 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition ); 908 904 #endif 909 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108910 905 m_apDmmPredictor[0] = 0; 911 906 m_apDmmPredictor[1] = 0; 912 #endif913 907 #endif 914 908 #if H_3D_DBBP … … 2399 2393 } 2400 2394 2401 UInt TComDataCU::getCtxAngleFlag( UInt uiAbsPartIdx )2402 {2403 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H01352404 return 0;2405 #else2406 TComDataCU* pcTempCU;2407 UInt uiTempPartIdx;2408 UInt uiCtx = 0;2409 2410 // Get BCBP of left PU2411 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );2412 uiCtx = ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? ( pcTempCU->getLumaIntraDir( uiTempPartIdx ) < NUM_INTRA_MODE ? 1 : 0 ) : 0;2413 2414 // Get BCBP of above PU2415 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );2416 uiCtx += ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? ( pcTempCU->getLumaIntraDir( uiTempPartIdx ) < NUM_INTRA_MODE ? 1 : 0 ) : 0;2417 2418 return uiCtx;2419 #endif2420 }2421 2395 #endif 2422 2396 … … 4142 4116 && !bARPFlag 4143 4117 #endif 4144 #if RWTH_DBBP_NO_SPU_H00574118 #if H_3D_DBBP 4145 4119 && !bDBBPFlag 4146 4120 #endif … … 4169 4143 && !bARPFlag 4170 4144 #endif 4171 #if RWTH_DBBP_NO_SPU_H00574145 #if H_3D_DBBP 4172 4146 && !bDBBPFlag 4173 4147 #endif … … 4196 4170 && !bARPFlag 4197 4171 #endif 4198 #if RWTH_DBBP_NO_SPU_H00574172 #if H_3D_DBBP 4199 4173 && !bDBBPFlag 4200 4174 #endif … … 4222 4196 && !bARPFlag 4223 4197 #endif 4224 #if RWTH_DBBP_NO_SPU_H00574198 #if H_3D_DBBP 4225 4199 && !bDBBPFlag 4226 4200 #endif … … 4249 4223 && !bARPFlag 4250 4224 #endif 4251 #if RWTH_DBBP_NO_SPU_H00574225 #if H_3D_DBBP 4252 4226 && !bDBBPFlag 4253 4227 #endif … … 4282 4256 && !bARPFlag 4283 4257 #endif 4284 #if RWTH_DBBP_NO_SPU_H00574258 #if H_3D_DBBP 4285 4259 && !bDBBPFlag 4286 4260 #endif … … 4308 4282 && !bARPFlag 4309 4283 #endif 4310 #if RWTH_DBBP_NO_SPU_H00574284 #if H_3D_DBBP 4311 4285 && !bDBBPFlag 4312 4286 #endif … … 4334 4308 && !bARPFlag 4335 4309 #endif 4336 #if RWTH_DBBP_NO_SPU_H00574310 #if H_3D_DBBP 4337 4311 && !bDBBPFlag 4338 4312 #endif … … 4358 4332 && !bARPFlag 4359 4333 #endif 4360 #if RWTH_DBBP_NO_SPU_H00574334 #if H_3D_DBBP 4361 4335 && !bDBBPFlag 4362 4336 #endif … … 4384 4358 && !bARPFlag 4385 4359 #endif 4386 #if RWTH_DBBP_NO_SPU_H00574360 #if H_3D_DBBP 4387 4361 && !bDBBPFlag 4388 4362 #endif … … 4457 4431 Int iTexPosX, iTexPosY; 4458 4432 const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4459 #if MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H01334460 4433 4461 4434 Int iCenterPosX = iCurrPosX + ( ( iWidth / iPUWidth ) >> 1 ) * iPUWidth + ( iPUWidth >> 1 ); … … 4519 4492 if ( iInterDirSaved != 0 ) 4520 4493 { 4521 #endif4522 4494 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight) 4523 4495 { … … 4568 4540 } 4569 4541 #endif 4570 #if !MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 4571 else 4572 { 4573 if (iInterDirSaved ==0) 4574 { 4575 #if ETRIKHU_CLEANUP_H0083 4576 bSPIVMPFlag = true; 4577 #else 4578 pbSPIVMPFlag[iCount] = true; 4579 #endif 4580 tmpDir = puhInterDirSP[iPartition]; 4581 tmpMV[0] = pcMvFieldSP[2*iPartition]; 4582 tmpMV[1] = pcMvFieldSP[2*iPartition+1]; 4583 4584 if (iPartition != 0) 4585 { 4586 for (Int iPart = iPartition-1; iPart >= 0; iPart--) 4587 { 4588 puhInterDirSP[iPart] = puhInterDirSP[iPartition]; 4589 pcMvFieldSP[2*iPart] = pcMvFieldSP[2*iPartition]; 4590 pcMvFieldSP[2*iPart + 1] = pcMvFieldSP[2*iPartition + 1]; 4591 } 4592 } 4593 } 4594 iInterDirSaved = puhInterDirSP[iPartition]; 4595 cMvFieldSaved[0] = pcMvFieldSP[2*iPartition]; 4596 cMvFieldSaved[1] = pcMvFieldSP[2*iPartition + 1]; 4597 } 4598 #endif 4542 4599 4543 iPartition ++; 4600 4544 } 4601 4545 } 4602 #if MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H01334546 #if H_3D 4603 4547 } 4604 4548 #endif … … 5246 5190 (nPSW + nPSH > 12) && 5247 5191 #endif 5248 #if RWTH_DBBP_NO_SPU_H00575192 #if H_3D_DBBP 5249 5193 !bDBBPFlag && 5250 5194 #endif -
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TComDataCU.h
r964 r967 70 70 Bool abMergeFlag[2]; // for two segments 71 71 UChar auhMergeIndex[2]; // for two segments 72 #if !RWTH_DBBP_NO_SPU_H005773 Char ahVSPFlag[2]; // for two segments74 DisInfo acDvInfo[2]; // for two segments75 #endif76 77 72 PartSize eVirtualPartSize; 78 73 UInt uiVirtualPartIndex; … … 195 190 Bool* m_pbSDCFlag; 196 191 Pel* m_apSegmentDCOffset[2]; 197 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108198 192 Pel m_apDmmPredictor[2]; 199 #endif200 193 #endif 201 194 #endif … … 583 576 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 584 577 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 585 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108586 578 Void setDmmPredictor ( Pel pOffset, UInt uiSeg) { m_apDmmPredictor[uiSeg] = pOffset; } 587 579 Pel getDmmPredictor ( UInt uiSeg) { return m_apDmmPredictor[uiSeg]; } 588 #endif589 580 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 590 UInt getCtxAngleFlag ( UInt uiAbsPartIdx );591 581 #endif 592 582 #endif -
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r964 r967 500 500 Pel* pDst = piPred; 501 501 xAssignBiSegDCs( pDst, uiStride, biSegPattern, patternStride, segDC1, segDC2 ); 502 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108503 502 pcCU->setDmmPredictor(segDC1, 0); 504 503 pcCU->setDmmPredictor(segDC2, 1); 505 #endif506 504 507 505 #if H_3D_DIM_DMM … … 647 645 648 646 // start mapping process 649 #if !MTK_DBBP_AMP_REM_H0072650 Bool bAMPAvail = uiSize > 8;651 Int matchedPartSum[6][2] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}}; // counter for each part size and boolean option652 PartSize virtualPartSizes[6] = { SIZE_Nx2N, SIZE_2NxN, SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N };653 #else654 647 Int matchedPartSum[2][2] = {{0,0},{0,0}}; // counter for each part size and boolean option 655 648 PartSize virtualPartSizes[2] = { SIZE_Nx2N, SIZE_2NxN}; 656 #endif657 649 658 650 UInt uiHalfSize = uiSize>>1; 659 #if !MTK_DBBP_AMP_REM_H0072660 UInt uiQuarterSize = uiSize>>2;661 #endif662 663 651 for (Int y=0; y<uiSize; y+=iSubSample) 664 652 { … … 691 679 matchedPartSum[1][1-ucSegment]++; 692 680 } 693 694 #if !MTK_DBBP_AMP_REM_H0072695 if( bAMPAvail )696 {697 // SIZE_2NxnU698 if(y<uiQuarterSize) // top (1/4)699 {700 matchedPartSum[2][ucSegment]++;701 }702 else // bottom (3/4)703 {704 matchedPartSum[2][1-ucSegment]++;705 }706 707 // SIZE_2NxnD708 if(y<(uiQuarterSize*3)) // top (3/4)709 {710 matchedPartSum[3][ucSegment]++;711 }712 else // bottom (1/4)713 {714 matchedPartSum[3][1-ucSegment]++;715 }716 717 // SIZE_nLx2N718 if(x<uiQuarterSize) // left (1/4)719 {720 matchedPartSum[4][ucSegment]++;721 }722 else // right (3/4)723 {724 matchedPartSum[4][1-ucSegment]++;725 }726 727 // SIZE_nRx2N728 if(x<(uiQuarterSize*3)) // left (3/4)729 {730 matchedPartSum[5][ucSegment]++;731 }732 else // right (1/4)733 {734 matchedPartSum[5][1-ucSegment]++;735 }736 }737 #endif738 681 } 739 682 … … 745 688 746 689 Int iMaxMatchSum = 0; 747 #if !MTK_DBBP_AMP_REM_H0072748 for(Int p=0; p<6; p++) // loop over partition749 #else750 690 for(Int p=0; p<2; p++) // loop over partition 751 #endif752 691 { 753 692 for( Int b=0; b<=1; b++ ) // loop over boolean options … … 859 798 860 799 UInt uiMaskStride= MAX_CU_SIZE; 861 #if SEC_DBBP_FILTERING_H0104862 800 Pel filSrc = 0; 863 801 Pel* tmpTar = 0; 864 802 tmpTar = (Pel *)xMalloc(Pel, uiWidth*uiHeight); 865 #endif866 803 867 804 // backup pointer … … 877 814 878 815 // filtering 879 #if SEC_DBBP_FILTERING_H0104880 816 tmpTar[y*uiWidth+x] = piSrc[ucSegment][x]; 881 #else882 Bool t = (y==0)?pMaskStart[(y+1)*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x];883 Bool l = (x==0)?pMaskStart[y*uiMaskStride+x+1]:pMaskStart[y*uiMaskStride+x-1];884 Bool b = (y==uiHeight-1)?pMaskStart[(y-1)*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x];885 Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x-1]:pMaskStart[y*uiMaskStride+x+1];886 887 Bool bBlend = !((t&&l&&b&&r) || (!t&&!l&&!b&&!r));888 piDst[x] = bBlend?((piSrc[0][x]+piSrc[1][x]+1)>>1):piSrc[ucSegment][x];889 #endif890 817 } 891 818 892 819 piSrc[0] += uiSrcStride; 893 820 piSrc[1] += uiSrcStride; 894 #if !SEC_DBBP_FILTERING_H0104895 piDst += uiDstStride;896 #endif897 821 pMask += uiMaskStride; 898 822 } 899 823 900 #if SEC_DBBP_FILTERING_H0104901 824 for (Int y=0; y<uiHeight; y++) 902 825 { … … 933 856 } 934 857 if ( tmpTar ) { xFree(tmpTar); tmpTar = NULL; } 935 #endif936 858 937 859 // now combine chroma … … 944 866 UInt uiWidthC = uiWidth >> 1; 945 867 UInt uiHeightC = uiHeight >> 1; 946 #if SEC_DBBP_FILTERING_H0104947 868 Pel filSrcU = 0, filSrcV = 0; 948 869 Pel* tmpTarU = 0, *tmpTarV = 0; 949 870 tmpTarU = (Pel *)xMalloc(Pel, uiWidthC*uiHeightC); 950 871 tmpTarV = (Pel *)xMalloc(Pel, uiWidthC*uiHeightC); 951 #endif952 872 pMask = pMaskStart; 953 873 … … 960 880 961 881 // filtering 962 #if SEC_DBBP_FILTERING_H0104963 882 tmpTarU[y*uiWidthC+x] = piSrcU[ucSegment][x]; 964 883 tmpTarV[y*uiWidthC+x] = piSrcV[ucSegment][x]; 965 #else966 Bool t = (y==0)?pMaskStart[(y+1)*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2];967 Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+(x+1)*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2];968 Bool b = (y==uiHeightC-1)?pMaskStart[(y-1)*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2];969 Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+(x-1)*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2];970 971 Bool bBlend = !((t&&l&&b&&r) || (!t&&!l&&!b&&!r));972 973 piDstU[x] = bBlend?((piSrcU[0][x]+piSrcU[1][x]+1)>>1):piSrcU[ucSegment][x];974 piDstV[x] = bBlend?((piSrcV[0][x]+piSrcV[1][x]+1)>>1):piSrcV[ucSegment][x];975 #endif976 884 } 977 885 … … 980 888 piSrcV[0] += uiSrcStrideC; 981 889 piSrcV[1] += uiSrcStrideC; 982 #if !SEC_DBBP_FILTERING_H0104983 piDstU += uiDstStrideC;984 piDstV += uiDstStrideC;985 #endif986 890 pMask += 2*uiMaskStride; 987 891 } 988 892 989 #if SEC_DBBP_FILTERING_H0104990 893 for (Int y=0; y<uiHeightC; y++) 991 894 { … … 1035 938 if ( tmpTarU ) { xFree(tmpTarU); tmpTarU = NULL; } 1036 939 if ( tmpTarV ) { xFree(tmpTarV); tmpTarV = NULL; } 1037 #endif1038 940 } 1039 941 #endif … … 2328 2230 if (orgDC == false) 2329 2231 { 2330 #if !HS_DMM_SDC_PREDICTOR_UNIFY_H0108 2331 if ( getDimType(uiIntraMode) == DMM1_IDX ) 2332 { 2333 UChar ucSegmentLT = pMask[0]; 2334 UChar ucSegmentRT = pMask[uiSize-1]; 2335 UChar ucSegmentLB = pMask[uiMaskStride * (uiSize-1)]; 2336 UChar ucSegmentRB = pMask[uiMaskStride * (uiSize-1) + (uiSize-1)]; 2337 2338 rpSegMeans[ucSegmentLT] = pOrig[0]; 2339 rpSegMeans[ucSegmentRT] = pOrig[uiSize-1]; 2340 rpSegMeans[ucSegmentLB] = pOrig[uiStride * (uiSize-1) ]; 2341 rpSegMeans[ucSegmentRB] = pOrig[uiStride * (uiSize-1) + (uiSize-1) ]; 2342 } 2343 else if( getDimType( uiIntraMode ) == DMM4_IDX ) 2344 { 2345 Pel *ptmpOrig = pOrig; 2346 Bool *ptmpMask = pMask, bBreak = false; 2347 UChar ucSegment = ptmpMask? (UChar) ptmpMask[0] : 0; 2348 UChar bFirstSeg = ucSegment; 2349 2350 rpSegMeans[ucSegment] = ptmpOrig[0]; 2351 for ( Int y = 0; y < uiSize; y++ ) 2352 { 2353 for ( Int x = 0; x < uiSize; x++ ) 2354 { 2355 ucSegment = ptmpMask[x]; 2356 assert( ucSegment < uiNumSegments ); 2357 2358 if( bFirstSeg != ucSegment ) 2359 { 2360 rpSegMeans[ucSegment] = ptmpOrig[x]; 2361 bBreak = true; 2362 break; 2363 } 2364 } 2365 2366 if( bBreak ) 2367 { 2368 break; 2369 } 2370 2371 ptmpOrig += uiStride; 2372 ptmpMask += uiMaskStride; 2373 } 2374 } 2375 else 2376 #endif 2377 { 2378 Pel* pLeftTop = pOrig; 2379 Pel* pRightTop = pOrig + (uiSize-1); 2380 Pel* pLeftBottom = (pOrig+ (uiStride*(uiSize-1))); 2381 Pel* pRightBottom = (pOrig+ (uiStride*(uiSize-1)) + (uiSize-1)); 2382 2383 rpSegMeans[0] = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2; 2384 } 2232 Pel* pLeftTop = pOrig; 2233 Pel* pRightTop = pOrig + (uiSize-1); 2234 Pel* pLeftBottom = (pOrig+ (uiStride*(uiSize-1))); 2235 Pel* pRightBottom = (pOrig+ (uiStride*(uiSize-1)) + (uiSize-1)); 2236 2237 rpSegMeans[0] = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2; 2385 2238 return; 2386 2239 } -
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TypeDef.h
r964 r967 339 339 #define SEC_VER_DONBDV_H0103 1 // Vertical DV Restriction for DoNBDV 340 340 #endif 341 342 #if H_3D_DIM343 #define HS_DMM_SDC_PREDICTOR_UNIFY_H0108 1 // Unification of DMM and SDC predictor derivation344 #define LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 1 // Use only one context for CABAC of dim_not_present_flag345 #define QC_SIMP_DELTADC_CODING_H0131 1 // Simplify detaDC entropy coding346 347 #if H_3D_DIM_DLT348 #define SEC_NO_RESI_DLT_H0105 1349 #define MTK_DLT_CODING_FIX_H0091 1350 #endif351 #endif352 #if H_3D_DBBP353 #define MTK_DBBP_AMP_REM_H0072 1354 #define RWTH_DBBP_NO_SPU_H0057 1355 #define SEC_DBBP_FILTERING_H0104 1356 #define MTK_DBBP_SIGNALING_H0094 1357 #endif358 359 #define MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 1360 341 #endif 361 342
Note: See TracChangeset for help on using the changeset viewer.