Changeset 213 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon
- Timestamp:
- 31 Dec 2012, 18:33:14 (12 years ago)
- Location:
- branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/CommonDef.h
r193 r213 58 58 59 59 #define HM_VERSION "6.1" 60 #define NV_VERSION " 4.1" ///< Current software version60 #define NV_VERSION "5.1" ///< Current software version 61 61 62 62 // ==================================================================================================================== … … 144 144 #define PDM_NO_INTER_UPDATE 1 // no update for inter (but not inter-view) predicted blocks 145 145 #define PDM_MERGE_POS 0 // position of pdm in merge list (0..4) 146 #if SAIT_IMPROV_MOTION_PRED_M24829&!QC_MULTI_DIS_CAN 146 147 #if QC_MRG_CANS_B0048 148 #if OL_DISMV_POS_B0069 149 #define DMV_MERGE_POS 4 150 #else 151 #define DMV_MERGE_POS 1 152 #endif 153 #endif 154 155 #if SAIT_IMPROV_MOTION_PRED_M24829&!QC_MULTI_DIS_CAN_A0097 147 156 #define PDM_AMVP_POS 0 // position of pdm in amvp list (0..3) 148 157 #else … … 181 190 // VPS constants 182 191 // ==================================================================================================================== 192 #if QC_MVHEVC_B0046 193 #define MAX_LAYER_NUM MAX_VIEW_NUM 194 #endif 183 195 #if VIDYO_VPS_INTEGRATION 184 196 #define MAX_LAYER_NUM MAX_VIEW_NUM … … 476 488 NAL_UNIT_CODED_SLICE, 477 489 #if H0566_TLA 490 #if QC_REM_IDV_B0046 491 NAL_UNIT_RESERVED, 492 #else 478 493 NAL_UNIT_CODED_SLICE_IDV, 494 #endif 479 495 NAL_UNIT_CODED_SLICE_TLA, 480 496 NAL_UNIT_CODED_SLICE_CRA, … … 504 520 NAL_UNIT_RESERVED_23, 505 521 NAL_UNIT_UNSPECIFIED_24, 506 #if VIDYO_VPS_INTEGRATION 522 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 507 523 NAL_UNIT_VPS, 508 524 #else -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/ContextTables.h
r100 r213 52 52 #define NUM_SKIP_FLAG_CTX 3 ///< number of context models for skip flag 53 53 54 #if LGE_ILLUCOMP_B0045 55 #define NUM_IC_FLAG_CTX 3 ///< number of context models for illumination compensation flag 56 #endif 57 54 58 #define NUM_MERGE_FLAG_EXT_CTX 1 ///< number of context models for merge flag of merge extended 55 59 #if MRG_IDX_CTX_RED … … 152 156 #endif 153 157 154 #if LGE_EDGE_INTRA 158 #if LGE_EDGE_INTRA_A0070 155 159 #define NUM_EDGE_INTRA_CTX 1 156 160 #if LGE_EDGE_INTRA_DELTA_DC … … 159 163 #endif 160 164 165 #if RWTH_SDC_DLT_B0036 166 #define SDC_NUM_FLAG_CTX 3 167 #define SDC_NUM_RESIDUAL_FLAG_CTX 1 168 #define SDC_NUM_SIGN_FLAG_CTX 1 169 #define SDC_NUM_RESIDUAL_CTX 10 170 171 #define SDC_NUM_PRED_MODE_CTX 5 172 #endif 173 161 174 // ==================================================================================================================== 162 175 // Tables … … 180 193 { 197, 185, 201, }, 181 194 }; 195 196 #if LGE_ILLUCOMP_B0045 197 static const UChar 198 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 199 { 200 { CNU, CNU, CNU, }, 201 { 197, 185, 201, }, 202 { 197, 185, 201, }, 203 }; 204 #endif 182 205 183 206 static const UChar … … 1280 1303 }; 1281 1304 1282 #if LGE_EDGE_INTRA 1305 #if LGE_EDGE_INTRA_A0070 1283 1306 static const Short 1284 1307 INIT_EDGE_INTRA[3][NUM_EDGE_INTRA_CTX] = … … 1314 1337 #endif 1315 1338 1339 #if RWTH_SDC_DLT_B0036 1340 static const Short INIT_SDC_FLAG[3][SDC_NUM_FLAG_CTX][2] = 1341 { 1342 { 1343 { 0, 64 }, { 0, 64 }, { 0, 64 } 1344 }, 1345 { 1346 { 0, 64 }, { 0, 64 }, { 0, 64 } 1347 }, 1348 { 1349 { 0, 64 }, { 0, 64 }, { 0, 64 } 1350 } 1351 }; 1352 1353 static const Short INIT_SDC_RESIDUAL_FLAG[3][3*SDC_NUM_RESIDUAL_FLAG_CTX][2] = 1354 { 1355 { 1356 { -5, 35 }, 1357 { -0, 56 }, 1358 { -0, 56 } 1359 1360 }, 1361 { 1362 { -5, 35 }, 1363 { -0, 56 }, 1364 { -0, 56 } 1365 }, 1366 { 1367 { -5, 35 }, 1368 { -0, 56 }, 1369 { -0, 56 } 1370 } 1371 }; 1372 1373 static const Short INIT_SDC_SIGN_FLAG[3][3*SDC_NUM_SIGN_FLAG_CTX][2] = 1374 { 1375 { 1376 { -1, 56 }, 1377 { -4, 55 }, 1378 { -4, 55 } 1379 }, 1380 { 1381 { -1, 56 }, 1382 { -4, 55 }, 1383 { -4, 55 } 1384 }, 1385 { 1386 { -1, 56 }, 1387 { -4, 55 }, 1388 { -4, 55 } 1389 } 1390 }; 1391 1392 static const Short INIT_SDC_RESIDUAL[3][3*SDC_NUM_RESIDUAL_CTX][2] = 1393 { 1394 { 1395 { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, 1396 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, 1397 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } 1398 }, 1399 { 1400 { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, 1401 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, 1402 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } 1403 }, 1404 { 1405 { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, 1406 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, 1407 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } 1408 } 1409 }; 1410 1411 static const Short INIT_SDC_PRED_MODE[3][3*SDC_NUM_PRED_MODE_CTX][2] = 1412 { 1413 { 1414 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1415 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1416 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } 1417 }, 1418 { 1419 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1420 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1421 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } 1422 }, 1423 { 1424 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1425 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1426 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } 1427 } 1428 }; 1429 #endif 1430 1316 1431 //! \} 1317 1432 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/NAL.h
r165 r213 51 51 NalRefIdc m_nalRefIDC; ///< nal_ref_idc 52 52 #endif 53 #if VIDYO_VPS_INTEGRATION 53 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 54 54 unsigned m_layerId; 55 55 unsigned m_temporalId; ///< temporal_id … … 69 69 NalUnitType nalUnitType, 70 70 Bool nalRefFlag, 71 #if !VIDYO_VPS_INTEGRATION 71 #if !VIDYO_VPS_INTEGRATION & !QC_MVHEVC_B0046 72 72 Int viewId, 73 73 Bool isDepth, … … 78 78 :m_nalUnitType (nalUnitType) 79 79 ,m_nalRefFlag (nalRefFlag) 80 #if !VIDYO_VPS_INTEGRATION 80 #if !VIDYO_VPS_INTEGRATION & !QC_MVHEVC_B0046 81 81 ,m_viewId (viewId) 82 82 ,m_isDepth (isDepth) … … 139 139 return m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR 140 140 #if H0566_TLA 141 #if !QC_REM_IDV_B0046 141 142 || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV 143 #endif 142 144 || m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA 143 145 || m_nalUnitType == NAL_UNIT_CODED_SLICE_TLA -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r193 r213 137 137 m_phQP = NULL; 138 138 m_pbMergeFlag = NULL; 139 #if LGE_ILLUCOMP_B0045 140 m_pbICFlag = NULL; 141 #endif 139 142 m_puhMergeIndex = NULL; 140 143 m_puhLumaIntraDir = NULL; … … 152 155 m_pcTrCoeffCr = NULL; 153 156 #if ADAPTIVE_QP_SELECTION 154 #if FIX_MEM_LEAKS155 157 m_ArlCoeffIsAliasedAllocation = false; 156 158 m_pcArlCoeffY = NULL; … … 158 160 m_pcArlCoeffCr = NULL; 159 161 #endif 160 #endif161 162 162 163 m_pbIPCMFlag = NULL; … … 206 207 m_pbResPredFlag = NULL; 207 208 #endif 208 #if LGE_EDGE_INTRA 209 #if LGE_EDGE_INTRA_A0070 209 210 m_pucEdgeCode = NULL; 210 211 m_pucEdgeNumber = NULL; … … 217 218 #endif 218 219 #endif 219 #if OL_DEPTHLIMIT_A0044 220 //add a variable to store the partition information 221 //a 2D array in part_symbol, uidepth format 222 //initialize m_partInfo to OL_END_CU 223 for (Int i=0; i < OL_PART_BUF_SIZE; i++) 224 { 225 for (Int j=0; j < 2; j++) 226 { 227 m_uiPartInfo[i][j] = OL_END_CU; 228 } 229 } 220 #if RWTH_SDC_DLT_B0036 221 m_pbSDCFlag = NULL; 222 m_apSegmentDCOffset[0] = NULL; 223 m_apSegmentDCOffset[1] = NULL; 230 224 #endif 231 225 } … … 268 262 m_pePredMode = new Char[ uiNumPartition ]; 269 263 264 #if RWTH_SDC_DLT_B0036 265 m_pbSDCFlag = (Bool* )xMalloc(Bool, uiNumPartition); 266 m_apSegmentDCOffset[0] = (Pel*)xMalloc(Pel, uiNumPartition); 267 m_apSegmentDCOffset[1] = (Pel*)xMalloc(Pel, uiNumPartition); 268 #endif 269 270 270 m_puiAlfCtrlFlag = new Bool[ uiNumPartition ]; 271 271 272 272 m_pbMergeFlag = (Bool* )xMalloc(Bool, uiNumPartition); 273 #if LGE_ILLUCOMP_B0045 274 m_pbICFlag = (Bool* )xMalloc(Bool, uiNumPartition); 275 #endif 273 276 m_puhMergeIndex = (UChar* )xMalloc(UChar, uiNumPartition); 274 277 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 312 315 m_pcArlCoeffCb = m_pcGlbArlCoeffCb; 313 316 m_pcArlCoeffCr = m_pcGlbArlCoeffCr; 314 #if FIX_MEM_LEAKS315 317 m_ArlCoeffIsAliasedAllocation = true; 316 #endif317 318 } 318 319 else … … 350 351 m_piContourPredTexDeltaDC2 = (Int* )xMalloc(Int, uiNumPartition); 351 352 #endif 352 #if LGE_EDGE_INTRA 353 #if LGE_EDGE_INTRA_A0070 353 354 m_pucEdgeCode = (UChar*)xMalloc(UChar, uiNumPartition * LGE_EDGE_INTRA_MAX_EDGE_NUM_PER_4x4); 354 355 m_pucEdgeNumber = (UChar*)xMalloc(UChar, uiNumPartition); … … 411 412 #endif 412 413 if ( m_pePredMode ) { delete[] m_pePredMode; m_pePredMode = NULL; } 414 #if RWTH_SDC_DLT_B0036 415 if ( m_pbSDCFlag ) { xFree(m_pbSDCFlag); m_pbSDCFlag = NULL; } 416 if ( m_apSegmentDCOffset[0] ) { xFree(m_apSegmentDCOffset[0]); m_apSegmentDCOffset[0] = NULL; } 417 if ( m_apSegmentDCOffset[1] ) { xFree(m_apSegmentDCOffset[1]); m_apSegmentDCOffset[1] = NULL; } 418 #endif 413 419 if ( m_puhCbf[0] ) { xFree(m_puhCbf[0]); m_puhCbf[0] = NULL; } 414 420 if ( m_puhCbf[1] ) { xFree(m_puhCbf[1]); m_puhCbf[1] = NULL; } … … 417 423 if ( m_puhInterDir ) { xFree(m_puhInterDir); m_puhInterDir = NULL; } 418 424 if ( m_pbMergeFlag ) { xFree(m_pbMergeFlag); m_pbMergeFlag = NULL; } 425 #if LGE_ILLUCOMP_B0045 426 if ( m_pbICFlag ) { xFree(m_pbICFlag); m_pbICFlag = NULL; } 427 #endif 419 428 if ( m_puhMergeIndex ) { xFree(m_puhMergeIndex); m_puhMergeIndex = NULL; } 420 429 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 430 439 if ( m_pcTrCoeffCr ) { xFree(m_pcTrCoeffCr); m_pcTrCoeffCr = NULL; } 431 440 #if ADAPTIVE_QP_SELECTION 432 #if FIX_MEM_LEAKS433 441 if (!m_ArlCoeffIsAliasedAllocation) 434 442 { … … 437 445 xFree(m_pcArlCoeffCr); m_pcArlCoeffCr = 0; 438 446 } 439 #endif440 447 if ( m_pcGlbArlCoeffY ) { xFree(m_pcGlbArlCoeffY); m_pcGlbArlCoeffY = NULL; } 441 448 if ( m_pcGlbArlCoeffCb ) { xFree(m_pcGlbArlCoeffCb); m_pcGlbArlCoeffCb = NULL; } … … 469 476 if ( m_piContourPredTexDeltaDC2 ) { xFree(m_piContourPredTexDeltaDC2); m_piContourPredTexDeltaDC2 = NULL; } 470 477 #endif 471 #if LGE_EDGE_INTRA 478 #if LGE_EDGE_INTRA_A0070 472 479 if ( m_pbEdgeLeftFirst ) { xFree(m_pbEdgeLeftFirst); m_pbEdgeLeftFirst = NULL; } 473 480 if ( m_pucEdgeStartPos ) { xFree(m_pucEdgeStartPos); m_pucEdgeStartPos = NULL; } … … 544 551 Void TComDataCU::initCU( TComPic* pcPic, UInt iCUAddr ) 545 552 { 546 #if OL_DEPTHLIMIT_A0044547 TComDataCU* pcCU = pcPic->getCU(iCUAddr);548 #endif549 550 553 m_pcPic = pcPic; 551 554 m_pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx()); … … 599 602 m_piTextureModeDepth[ui] = pcFrom->getTextureModeDepth(ui); 600 603 #endif 604 #if RWTH_SDC_DLT_B0036 605 m_pbSDCFlag[ui] = pcFrom->getSDCFlag(ui); 606 #endif 601 607 m_puhWidth [ui] = pcFrom->getWidth(ui); 602 608 m_puhHeight [ui] = pcFrom->getHeight(ui); … … 610 616 m_puiAlfCtrlFlag[ui]=pcFrom->m_puiAlfCtrlFlag[ui]; 611 617 m_pbMergeFlag[ui]=pcFrom->m_pbMergeFlag[ui]; 618 #if LGE_ILLUCOMP_B0045 619 m_pbICFlag[ui]=pcFrom->m_pbICFlag[ui]; 620 #endif 612 621 m_puhMergeIndex[ui]=pcFrom->m_puhMergeIndex[ui]; 613 622 m_puhLumaIntraDir[ui]=pcFrom->m_puhLumaIntraDir[ui]; … … 630 639 #if HHI_MPI 631 640 memset( m_piTextureModeDepth+ firstElement,-1, numElements * sizeof( *m_piTextureModeDepth ) ); 641 #endif 642 #if RWTH_SDC_DLT_B0036 643 memset( m_pbSDCFlag + firstElement, 0, numElements * sizeof( *m_pbSDCFlag ) ); 644 memset( m_apSegmentDCOffset[0] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[0] ) ); 645 memset( m_apSegmentDCOffset[1] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[1] ) ); 632 646 #endif 633 647 memset( m_puhTrIdx + firstElement, 0, numElements * sizeof( *m_puhTrIdx ) ); … … 642 656 memset( m_puiAlfCtrlFlag + firstElement, false, numElements * sizeof( *m_puiAlfCtrlFlag ) ); 643 657 memset( m_pbMergeFlag + firstElement, false, numElements * sizeof( *m_pbMergeFlag ) ); 658 #if LGE_ILLUCOMP_B0045 659 memset( m_pbICFlag + firstElement, false, numElements * sizeof( *m_pbICFlag ) ); 660 #endif 644 661 memset( m_puhMergeIndex + firstElement, 0, numElements * sizeof( *m_puhMergeIndex ) ); 645 662 memset( m_puhLumaIntraDir + firstElement, 2, numElements * sizeof( *m_puhLumaIntraDir ) ); … … 763 780 m_apcCUColocated[1] = getSlice()->getRefPic( REF_PIC_LIST_1, 0)->getCU( m_uiCUAddr ); 764 781 } 765 #if OL_DEPTHLIMIT_A0044766 setPartDumpFlag (pcCU->getPartDumpFlag());767 #endif768 782 } 769 783 … … 825 839 m_puiAlfCtrlFlag[ui]= false; 826 840 m_pbMergeFlag[ui] = 0; 841 #if LGE_ILLUCOMP_B0045 842 m_pbICFlag[ui] = false; 843 #endif 827 844 m_puhMergeIndex[ui] = 0; 828 845 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 854 871 m_piContourPredTexDeltaDC2[ui] = 0; 855 872 #endif 873 #if RWTH_SDC_DLT_B0036 874 m_pbSDCFlag[ui] = false; 875 m_apSegmentDCOffset[0][ui] = 0; 876 m_apSegmentDCOffset[1][ui] = 0; 877 #endif 856 878 } 857 879 } … … 926 948 memset( m_puiAlfCtrlFlag, 0, iSizeInBool ); 927 949 memset( m_pbMergeFlag, 0, iSizeInBool ); 950 #if LGE_ILLUCOMP_B0045 951 memset( m_pbICFlag, 0, iSizeInBool ); 952 #endif 928 953 #if HHI_INTERVIEW_SKIP 929 954 memset( m_pbRenderable, 0, iSizeInBool ); … … 963 988 memset( m_piContourPredTexDeltaDC1, 0, sizeof( Int ) * m_uiNumPartition ); 964 989 memset( m_piContourPredTexDeltaDC2, 0, sizeof( Int ) * m_uiNumPartition ); 965 #endif 990 #endif 991 #if RWTH_SDC_DLT_B0036 992 memset( m_pbSDCFlag, 0, sizeof(Bool) * m_uiNumPartition ); 993 memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition); 994 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition); 995 #endif 966 996 967 997 UChar uhWidth = g_uiMaxCUWidth >> uiDepth; … … 1001 1031 m_puiAlfCtrlFlag[ui]=pcCU->m_puiAlfCtrlFlag[uiPartOffset+ui]; 1002 1032 m_pbMergeFlag[ui]=pcCU->m_pbMergeFlag[uiPartOffset+ui]; 1033 #if LGE_ILLUCOMP_B0045 1034 m_pbICFlag[ui]=pcCU->m_pbICFlag[uiPartOffset+ui]; 1035 #endif 1003 1036 m_puhMergeIndex[ui]=pcCU->m_puhMergeIndex[uiPartOffset+ui]; 1004 1037 m_puhLumaIntraDir[ui]=pcCU->m_puhLumaIntraDir[uiPartOffset+ui]; … … 1030 1063 m_pbResPredAvailable[ui] = pcCU->m_pbResPredAvailable[ uiPartOffset + ui ]; 1031 1064 m_pbResPredFlag [ui] = pcCU->m_pbResPredFlag [ uiPartOffset + ui ]; 1065 #endif 1066 #if RWTH_SDC_DLT_B0036 1067 m_pbSDCFlag [ui] = pcCU->m_pbSDCFlag [ uiPartOffset + ui ]; 1068 m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0][ uiPartOffset + ui ]; 1069 m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1][ uiPartOffset + ui ]; 1032 1070 #endif 1033 1071 } … … 1095 1133 memcpy(m_uiSliceStartCU,pcCU->m_uiSliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition); 1096 1134 memcpy(m_uiEntropySliceStartCU,pcCU->m_uiEntropySliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition); 1097 #if OL_DEPTHLIMIT_A00441098 setPartDumpFlag (pcCU->getPartDumpFlag());1099 #endif1100 1135 } 1101 1136 … … 1140 1175 1141 1176 m_pbMergeFlag = pcCU->getMergeFlag() + uiPart; 1177 #if LGE_ILLUCOMP_B0045 1178 m_pbICFlag = pcCU->getICFlag() + uiPart; 1179 #endif 1142 1180 m_puhMergeIndex = pcCU->getMergeIndex() + uiPart; 1143 1181 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1223 1261 m_piContourPredTexDeltaDC2 = pcCU->getContourPredTexDeltaDC2() + uiPart; 1224 1262 #endif 1225 #if LGE_EDGE_INTRA 1263 #if LGE_EDGE_INTRA_A0070 1226 1264 if( pcCU->getSlice()->getSPS()->isDepth() ) 1227 1265 { … … 1237 1275 } 1238 1276 #endif 1277 #if RWTH_SDC_DLT_B0036 1278 m_pbSDCFlag = pcCU->getSDCFlag() + uiPart; 1279 m_apSegmentDCOffset[0] = pcCU->getSDCSegmentDCOffset(0) + uiPart; 1280 m_apSegmentDCOffset[1] = pcCU->getSDCSegmentDCOffset(1) + uiPart; 1281 #endif 1239 1282 } 1240 1283 … … 1272 1315 1273 1316 m_pbMergeFlag = pcCU->getMergeFlag() + uiAbsPartIdx; 1317 #if LGE_ILLUCOMP_B0045 1318 m_pbICFlag = pcCU->getICFlag() + uiAbsPartIdx; 1319 #endif 1274 1320 m_puhMergeIndex = pcCU->getMergeIndex() + uiAbsPartIdx; 1275 1321 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1318 1364 memcpy( m_puiAlfCtrlFlag + uiOffset, pcCU->getAlfCtrlFlag(), iSizeInBool ); 1319 1365 memcpy( m_pbMergeFlag + uiOffset, pcCU->getMergeFlag(), iSizeInBool ); 1366 #if LGE_ILLUCOMP_B0045 1367 memcpy( m_pbICFlag + uiOffset, pcCU->getICFlag(), iSizeInBool ); 1368 #endif 1320 1369 memcpy( m_puhMergeIndex + uiOffset, pcCU->getMergeIndex(), iSizeInUchar ); 1321 1370 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1395 1444 #endif 1396 1445 1397 #if LGE_EDGE_INTRA 1446 #if LGE_EDGE_INTRA_A0070 1398 1447 if( getSlice()->getSPS()->isDepth() ) 1399 1448 { … … 1413 1462 memcpy( m_piTextureModeDepth + uiOffset, pcCU->getTextureModeDepth(), sizeof( Int ) * uiNumPartition ); 1414 1463 #endif 1464 #if RWTH_SDC_DLT_B0036 1465 memcpy( m_pbSDCFlag + uiOffset, pcCU->getSDCFlag(), iSizeInBool ); 1466 memcpy( m_apSegmentDCOffset[0] + uiOffset, pcCU->getSDCSegmentDCOffset(0), sizeof( Pel ) * uiNumPartition); 1467 memcpy( m_apSegmentDCOffset[1] + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition); 1468 #endif 1415 1469 } 1416 1470 … … 1444 1498 1445 1499 memcpy( rpcCU->getMergeFlag() + m_uiAbsIdxInLCU, m_pbMergeFlag, iSizeInBool ); 1500 #if LGE_ILLUCOMP_B0045 1501 memcpy( rpcCU->getICFlag() + m_uiAbsIdxInLCU, m_pbICFlag, iSizeInBool ); 1502 #endif 1446 1503 memcpy( rpcCU->getMergeIndex() + m_uiAbsIdxInLCU, m_puhMergeIndex, iSizeInUchar ); 1447 1504 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1513 1570 #endif 1514 1571 1515 #if LGE_EDGE_INTRA 1572 #if LGE_EDGE_INTRA_A0070 1516 1573 if( rpcCU->getSlice()->getSPS()->isDepth() ) 1517 1574 { … … 1531 1588 memcpy( rpcCU->getTextureModeDepth() + m_uiAbsIdxInLCU, m_piTextureModeDepth, sizeof( Int ) * m_uiNumPartition ); 1532 1589 #endif 1590 #if RWTH_SDC_DLT_B0036 1591 memcpy( rpcCU->getSDCFlag() + m_uiAbsIdxInLCU, m_pbSDCFlag, iSizeInBool ); 1592 memcpy( rpcCU->getSDCSegmentDCOffset(0) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition); 1593 memcpy( rpcCU->getSDCSegmentDCOffset(1) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition); 1594 #endif 1533 1595 } 1534 1596 … … 1562 1624 memcpy( rpcCU->getAlfCtrlFlag() + uiPartOffset, m_puiAlfCtrlFlag, iSizeInBool ); 1563 1625 memcpy( rpcCU->getMergeFlag() + uiPartOffset, m_pbMergeFlag, iSizeInBool ); 1626 #if LGE_ILLUCOMP_B0045 1627 memcpy( rpcCU->getICFlag() + uiPartOffset, m_pbICFlag, iSizeInBool ); 1628 #endif 1564 1629 memcpy( rpcCU->getMergeIndex() + uiPartOffset, m_puhMergeIndex, iSizeInUchar ); 1565 1630 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1632 1697 #endif 1633 1698 1634 #if LGE_EDGE_INTRA 1699 #if LGE_EDGE_INTRA_A0070 1635 1700 if( rpcCU->getSlice()->getSPS()->isDepth() ) 1636 1701 { … … 1649 1714 #if HHI_MPI 1650 1715 memcpy( rpcCU->getTextureModeDepth() + uiPartOffset, m_piTextureModeDepth, sizeof( Int ) * uiQNumPart ); 1716 #endif 1717 #if RWTH_SDC_DLT_B0036 1718 memcpy( rpcCU->getSDCFlag() + uiPartOffset, m_pbSDCFlag, iSizeInBool ); 1719 memcpy( rpcCU->getSDCSegmentDCOffset(0) + uiPartOffset, m_apSegmentDCOffset[0], sizeof( Pel ) * uiQNumPart); 1720 memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart); 1651 1721 #endif 1652 1722 } … … 2383 2453 #if H0204_QP_PREDICTION 2384 2454 UInt lPartIdx, aPartIdx; 2385 #if FIX_COMP_WARNING_INIT2386 2455 lPartIdx = 0; 2387 2456 aPartIdx = 0; 2388 #endif2389 2457 TComDataCU* cULeft = getQpMinCuLeft ( lPartIdx, m_uiAbsIdxInLCU + uiCurrAbsIdxInLCU ); 2390 2458 TComDataCU* cUAbove = getQpMinCuAbove( aPartIdx, m_uiAbsIdxInLCU + uiCurrAbsIdxInLCU ); … … 2528 2596 mapDMMtoIntraMode( iLeftIntraDir ); 2529 2597 #endif 2530 #if LGE_EDGE_INTRA 2598 #if LGE_EDGE_INTRA_A0070 2531 2599 mapEdgeIntratoDC( iLeftIntraDir ); 2532 2600 #endif … … 2543 2611 mapDMMtoIntraMode( iAboveIntraDir ); 2544 2612 #endif 2545 #if LGE_EDGE_INTRA 2613 #if LGE_EDGE_INTRA_A0070 2546 2614 mapEdgeIntratoDC( iAboveIntraDir ); 2547 2615 #endif … … 2629 2697 } 2630 2698 2631 #if LGE_EDGE_INTRA 2699 #if LGE_EDGE_INTRA_A0070 2632 2700 UInt TComDataCU::getCtxEdgeIntra( UInt uiAbsPartIdx ) 2633 2701 { … … 2740 2808 return uiCtx; 2741 2809 } 2810 2811 #if LGE_ILLUCOMP_B0045 2812 UInt TComDataCU::getCtxICFlag( UInt uiAbsPartIdx ) 2813 { 2814 UInt uiCtx = 0; 2815 2816 return uiCtx; 2817 } 2818 #endif 2742 2819 2743 2820 UInt TComDataCU::getCtxInterDir( UInt uiAbsPartIdx ) … … 2970 3047 } 2971 3048 3049 #if RWTH_SDC_DLT_B0036 3050 Void TComDataCU::setSDCFlagSubParts ( Bool bSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 3051 { 3052 setSubPart( bSDCFlag, m_pbSDCFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 3053 } 3054 3055 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx ) 3056 { 3057 TComDataCU* pcTempCU; 3058 UInt uiTempPartIdx; 3059 UInt uiCtx = 0; 3060 3061 // left PU 3062 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, false ); 3063 uiCtx = ( pcTempCU ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0; 3064 3065 // above PU 3066 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, false ); 3067 uiCtx += ( pcTempCU ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0; 3068 3069 return uiCtx; 3070 } 3071 3072 Bool TComDataCU::getSDCAvailable( UInt uiAbsPartIdx ) 3073 { 3074 if( !getSlice()->getSPS()->isDepth() || getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) 3075 return false; 3076 3077 UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); 3078 3079 if(!isIntra(uiAbsPartIdx)) 3080 return false; 3081 3082 for(UInt ui=0; ui<RWTH_SDC_NUM_PRED_MODES; ui++) 3083 { 3084 if( g_auiSDCPredModes[ui] == uiLumaPredMode ) 3085 return true; 3086 } 3087 // else 3088 return false; 3089 } 3090 #endif 3091 2972 3092 Void TComDataCU::setMergeIndexSubParts ( UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2973 3093 { … … 2998 3118 setSubPart<UChar>( uiDir, m_puhInterDir, uiAbsPartIdx, uiDepth, uiPartIdx ); 2999 3119 } 3120 3121 #if LGE_ILLUCOMP_B0045 3122 Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 3123 { 3124 memset( m_pbICFlag + uiAbsPartIdx, bICFlag, (m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ))*sizeof(Bool) ); 3125 } 3126 3127 Bool TComDataCU::isICFlagRequired(UInt uiAbsPartIdx) 3128 { 3129 UInt uiPartAddr; 3130 UInt iNumbPart; 3131 Int iWidth, iHeight; 3132 3133 UInt uiPartMode = getPartitionSize(uiAbsPartIdx); 3134 3135 iNumbPart = (uiPartMode == SIZE_2Nx2N ? 1 : (uiPartMode == SIZE_NxN ? 4 : 2) ); 3136 3137 for(UInt i = 0; i < iNumbPart; i++) 3138 { 3139 getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIdx, true); 3140 uiPartAddr += uiAbsPartIdx; 3141 3142 for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++) 3143 { 3144 RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 3145 Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr); 3146 3147 #if VSP_AIC 3148 if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getPOC() == getSlice()->getRefPOC(eRefList, iBestRefIdx)) 3149 #else 3150 if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getViewId() != getSlice()->getRefViewId(eRefList, iBestRefIdx)) 3151 #endif 3152 { 3153 return true; 3154 } 3155 } 3156 } 3157 return false; 3158 } 3159 #endif 3000 3160 3001 3161 Void TComDataCU::setMVPIdxSubParts( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) … … 3570 3730 3571 3731 //===== add merge with predicted depth maps ===== 3732 #if QC_MRG_CANS_B0048 3733 TComMv acPdmMv [4]; 3734 Int aiPdmRefIdx [4] = {-1, -1, -1, -1}; 3735 Bool bLeftAvai = false; 3736 #if OL_DISMV_POS_B0069 3737 Int iPosLeftAbove[2] = {-1, -1}; 3738 #endif 3739 #else 3572 3740 TComMv acPdmMv [2]; 3573 3741 Int aiPdmRefIdx [2] = {-1, -1}; 3574 3575 #if LGE_DVMCP 3742 #endif 3743 3744 #if LGE_DVMCP_A0126 3745 #if QC_MRG_CANS_B0048 3746 acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false; 3747 #else 3576 3748 acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = false; 3577 3749 #endif 3578 3579 #if QC_MULTI_DIS_CAN 3750 #endif 3751 3752 #if QC_MULTI_DIS_CAN_A0097 3580 3753 DisInfo cDisInfo; 3581 3754 cDisInfo.iN = 0; 3582 3755 if(!bNoPdmMerge) 3583 3756 { 3584 #if LGE_DVMCP 3585 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true ); 3757 #if LGE_DVMCP_A0126 3758 #if LGE_IVMP_PARALLEL_MERGE_B0136 && !QC_SIMPLE_NBDV_B0047 3759 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true, REF_PIC_LIST_X, -1, true ); 3760 #else 3761 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo 3762 #if LGE_IVMP_PARALLEL_MERGE_B0136==QC_SIMPLE_NBDV_B0047 3763 , 3764 true 3765 #endif 3766 ); 3767 #endif 3586 3768 #else 3587 3769 getDisMvpCand (uiPUIdx, uiAbsPartIdx, &cDisInfo ); … … 3595 3777 cDisInfo.m_aVIdxCan[0] = 0; 3596 3778 } 3597 Int iPdmInterDir = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo ); 3779 #if QC_MRG_CANS_B0048 3780 Int iPdmDir[2] = {0, 0}; 3781 #endif 3782 Int iPdmInterDir = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo 3783 #if QC_MRG_CANS_B0048 3784 , iPdmDir 3785 #endif 3786 ); 3598 3787 #else 3599 3788 Int iPdmInterDir = getPdmMergeCandidate( uiPUIdx, aiPdmRefIdx, acPdmMv ); 3600 3789 #endif 3601 3790 #if QC_MRG_CANS_B0048 3791 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 0 ) 3792 #else 3602 3793 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 0 ) 3794 #endif 3603 3795 { 3604 3796 abCandIsInter [ iCount ] = true; 3797 #if QC_MRG_CANS_B0048 3798 puhInterDirNeighbours[ iCount ] = iPdmDir[0]; 3799 iPdmInterDir = iPdmDir[0]; 3800 #else 3605 3801 puhInterDirNeighbours[ iCount ] = iPdmInterDir; 3802 #endif 3606 3803 if( ( iPdmInterDir & 1 ) == 1 ) 3607 3804 { 3608 3805 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3609 3806 } 3807 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3808 else 3809 { 3810 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 3811 } 3812 #endif 3610 3813 if( ( iPdmInterDir & 2 ) == 2 ) 3611 3814 { 3612 3815 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3613 3816 } 3817 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3818 else 3819 { 3820 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 3821 } 3822 #endif 3614 3823 #if SIMP_MRG_PRUN 3615 3824 if ( mrgCandIdx == iCount ) … … 3619 3828 #endif 3620 3829 iCount ++; 3830 } 3831 #endif 3832 3833 #if QC_MRG_CANS_B0048 3834 if(extraMergeCand) 3835 { 3836 if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 1) 3837 { 3838 assert(iCount < MRG_MAX_NUM_CANDS_MEM); 3839 abCandIsInter [ iCount ] = true; 3840 puhInterDirNeighbours[ iCount ] = iPdmDir[1]; 3841 if( ( iPdmDir[1] & 1 ) == 1 ) 3842 { 3843 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] ); 3844 } 3845 if( ( iPdmDir[1] & 2 ) == 2 ) 3846 { 3847 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] ); 3848 } 3849 #if LGE_DVMCP_A0126 3850 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3851 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3852 #endif 3853 #if SIMP_MRG_PRUN 3854 if ( mrgCandIdx == iCount ) 3855 return; 3856 #endif 3857 iCount ++; 3858 } 3621 3859 } 3622 3860 #endif … … 3663 3901 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3664 3902 } 3665 #if LGE_DVMCP 3903 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3904 else 3905 { 3906 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 3907 } 3908 #endif 3909 #if QC_MRG_CANS_B0048 3910 Bool bRemoveSpa = false; //prunign to inter-view candidates 3911 Int iCnloop = iCount - 1; 3912 for(; iCnloop >= 0; iCnloop --) 3913 { 3914 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 3915 { 3916 bRemoveSpa = true; 3917 abCandIsInter [ iCount ] = false; 3918 #if FIX_MISUSE_REFINDEX 3919 //reset to the default value for IC, MC 3920 puhInterDirNeighbours[iCount] = 0; 3921 TComMv cZeroMv; 3922 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 3923 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 3924 break; 3925 #endif 3926 } 3927 } 3928 if(!bRemoveSpa) 3929 { 3930 bLeftAvai = true; 3931 #if OL_DISMV_POS_B0069 3932 iPosLeftAbove[0] = iCount; 3933 #endif 3934 #endif 3935 #if LGE_DVMCP_A0126 3666 3936 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3667 3937 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; … … 3677 3947 #endif 3678 3948 iCount ++; 3949 #if QC_MRG_CANS_B0048 3950 } 3951 #endif 3679 3952 } 3680 3953 } 3681 3954 3682 3955 #if HHI_INTER_VIEW_MOTION_PRED 3956 #if QC_MRG_CANS_B0048 3957 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 1 ) 3958 #else 3683 3959 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 1 ) 3960 #endif 3684 3961 { 3685 3962 abCandIsInter [ iCount ] = true; … … 3689 3966 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3690 3967 } 3968 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3969 else 3970 { 3971 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 3972 } 3973 #endif 3691 3974 if( ( iPdmInterDir & 2 ) == 2 ) 3692 3975 { 3693 3976 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3694 3977 } 3978 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3979 else 3980 { 3981 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 3982 } 3983 #endif 3695 3984 #if SIMP_MRG_PRUN 3696 3985 if ( mrgCandIdx == iCount ) … … 3751 4040 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3752 4041 } 3753 #if LGE_DVMCP 4042 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4043 else 4044 { 4045 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4046 } 4047 #endif 4048 #if QC_MRG_CANS_B0048 4049 Bool bRemoveSpa = false; //prunign to inter-view candidates 4050 Int iCnloop = bLeftAvai? (iCount-2): (iCount-1); 4051 for(; iCnloop >= 0; iCnloop --) 4052 { 4053 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 4054 { 4055 bRemoveSpa = true; 4056 abCandIsInter [ iCount ] = false; 4057 #if FIX_MISUSE_REFINDEX 4058 //reset to the default value for IC, MC 4059 puhInterDirNeighbours[iCount] = 0; 4060 TComMv cZeroMv; 4061 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 4062 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 4063 break; 4064 #endif 4065 } 4066 } 4067 if(!bRemoveSpa) 4068 { 4069 #if OL_DISMV_POS_B0069 4070 iPosLeftAbove[1] = iCount; 4071 #endif 4072 #endif 4073 #if LGE_DVMCP_A0126 3754 4074 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3755 4075 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; … … 3765 4085 #endif 3766 4086 iCount ++; 4087 #if QC_MRG_CANS_B0048 4088 } 4089 #endif 3767 4090 } 3768 4091 #if !SIMP_MRG_PRUN … … 3771 4094 3772 4095 #if HHI_INTER_VIEW_MOTION_PRED 4096 #if QC_MRG_CANS_B0048 4097 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 2 ) 4098 #else 3773 4099 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 2 ) 4100 #endif 3774 4101 { 3775 4102 abCandIsInter [ iCount ] = true; … … 3779 4106 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3780 4107 } 4108 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4109 else 4110 { 4111 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 4112 } 4113 #endif 3781 4114 if( ( iPdmInterDir & 2 ) == 2 ) 3782 4115 { 3783 4116 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3784 4117 } 4118 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4119 else 4120 { 4121 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4122 } 4123 #endif 3785 4124 #if SIMP_MRG_PRUN 3786 4125 if ( mrgCandIdx == iCount ) … … 3835 4174 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3836 4175 } 3837 #if LGE_DVMCP 4176 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4177 else 4178 { 4179 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4180 } 4181 #endif 4182 #if LGE_DVMCP_A0126 3838 4183 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3839 4184 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; … … 3852 4197 3853 4198 #if HHI_INTER_VIEW_MOTION_PRED 4199 #if QC_MRG_CANS_B0048 4200 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 3 ) 4201 #else 3854 4202 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 3 ) 4203 #endif 3855 4204 { 3856 4205 abCandIsInter [ iCount ] = true; … … 3860 4209 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3861 4210 } 4211 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4212 else 4213 { 4214 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 4215 } 4216 #endif 3862 4217 if( ( iPdmInterDir & 2 ) == 2 ) 3863 4218 { 3864 4219 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3865 4220 } 4221 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4222 else 4223 { 4224 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4225 } 4226 #endif 3866 4227 #if SIMP_MRG_PRUN 3867 4228 if ( mrgCandIdx == iCount ) … … 3871 4232 #endif 3872 4233 iCount ++; 4234 } 4235 #endif 4236 4237 #if OL_DISMV_POS_B0069 4238 if(extraMergeCand) 4239 { 4240 if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 4) 4241 { 4242 assert(iCount < MRG_MAX_NUM_CANDS_MEM); 4243 Bool bRemoveSpa = false; //prunign to A1, B1 4244 abCandIsInter [ iCount ] = true; 4245 puhInterDirNeighbours[ iCount ] = iPdmDir[1]; 4246 if( ( iPdmDir[1] & 1 ) == 1 ) 4247 { 4248 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] ); 4249 } 4250 if( ( iPdmDir[1] & 2 ) == 2 ) 4251 { 4252 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] ); 4253 } 4254 for(Int i = 0; i < 2; i ++) 4255 { 4256 Int iCnloop = iPosLeftAbove[i]; 4257 if(iCnloop == -1) 4258 continue; 4259 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 4260 { 4261 bRemoveSpa = true; 4262 abCandIsInter [ iCount ] = false; 4263 #if FIX_MISUSE_REFINDEX 4264 //reset to the default value for IC, MC 4265 puhInterDirNeighbours[iCount] = 0; 4266 TComMv cZeroMv; 4267 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 4268 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 4269 break; 4270 #endif 4271 } 4272 } 4273 if(!bRemoveSpa) 4274 { 4275 #if LGE_DVMCP_A0126 4276 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 4277 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 4278 #endif 4279 #if SIMP_MRG_PRUN 4280 if ( mrgCandIdx == iCount ) 4281 return; 4282 #endif 4283 iCount ++; 4284 } 4285 } 3873 4286 } 3874 4287 #endif … … 3924 4337 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3925 4338 } 3926 #if LGE_DVMCP 4339 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4340 else 4341 { 4342 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4343 } 4344 #endif 4345 #if LGE_DVMCP_A0126 3927 4346 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3928 4347 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; … … 3944 4363 3945 4364 #if HHI_INTER_VIEW_MOTION_PRED 4365 #if QC_MRG_CANS_B0048 4366 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 4 ) 4367 #else 3946 4368 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 4 ) 4369 #endif 3947 4370 { 3948 4371 abCandIsInter [ iCount ] = true; … … 3952 4375 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3953 4376 } 4377 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4378 else 4379 { 4380 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 4381 } 4382 #endif 3954 4383 if( ( iPdmInterDir & 2 ) == 2 ) 3955 4384 { 3956 4385 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3957 4386 } 4387 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4388 else 4389 { 4390 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4391 } 4392 #endif 3958 4393 #if SIMP_MRG_PRUN 3959 4394 if ( mrgCandIdx == iCount ) … … 4019 4454 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4020 4455 } 4021 #if LGE_DVMCP 4456 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4457 else 4458 { 4459 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4460 } 4461 #endif 4462 #if LGE_DVMCP_A0126 4022 4463 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 4023 4464 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; … … 4049 4490 #endif 4050 4491 4051 if ( getSlice()->getPPS()->getEnableTMVPFlag() ) 4492 if ( getSlice()->getPPS()->getEnableTMVPFlag() 4493 #if QC_MRG_CANS_B0048 4494 && iCount < (MRG_MAX_NUM_CANDS_SIGNALED + extraMergeCand) 4495 #endif 4496 ) 4052 4497 { 4053 4498 // col [2] 4499 #if !QC_TMVP_IDX_MOD_B0046 4054 4500 Int iRefIdxSkip[2] = {-1, -1}; 4055 4501 for (Int i=0; i<2; i++) … … 4071 4517 iRefIdxSkip[i] = (iRefIdxTmp != -1) ? iRefIdxTmp : 0; 4072 4518 } 4519 #endif 4073 4520 //>> MTK colocated-RightBottom 4074 4521 UInt uiPartIdxRB; … … 4082 4529 4083 4530 TComMv cColMv; 4531 #if QC_TMVP_IDX_MOD_B0046 4532 Int iRefIdx = 0; 4533 #else 4084 4534 Int iRefIdx; 4085 4535 #endif 4086 4536 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) // image boundary check 4087 4537 { … … 4116 4566 } 4117 4567 } 4568 #if !QC_TMVP_IDX_MOD_B0046 4118 4569 iRefIdx = iRefIdxSkip[0]; 4119 4570 #else 4571 iRefIdx = 0; 4572 #endif 4120 4573 Bool bExistMV = false; 4121 4574 UInt uiPartIdxCenter; … … 4135 4588 if ( getSlice()->isInterB() ) 4136 4589 { 4590 #if !QC_TMVP_IDX_MOD_B0046 4137 4591 iRefIdx = iRefIdxSkip[1]; 4592 #else 4593 iRefIdx = 0; 4594 #endif 4138 4595 bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx); 4139 4596 if( bExistMV == false ) … … 4149 4606 { 4150 4607 puhInterDirNeighbours[uiArrayAddr] = 1; 4608 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4609 pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID ); 4610 #endif 4151 4611 } 4152 4612 } … … 4154 4614 { 4155 4615 puhInterDirNeighbours[uiArrayAddr] = 1; 4156 } 4157 #if LGE_DVMCP 4616 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4617 pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID ); 4618 #endif 4619 } 4620 #if LGE_DVMCP_A0126 4158 4621 pcMvFieldNeighbours[uiArrayAddr<<1 ].getMv().m_bDvMcp = false; 4159 4622 pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getMv().m_bDvMcp = false; … … 4391 4854 pcMvFieldNeighbours[(uiArrayAddr << 1) + 1].setMvField(TComMv(0, 0), r); 4392 4855 } 4856 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4857 else 4858 { 4859 pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID ); 4860 } 4861 #endif 4393 4862 uiArrayAddr++; 4394 4863 } … … 4636 5105 return m_pcSlice->getSPS()->getAMVPMode(m_puhDepth[uiIdx]); 4637 5106 } 4638 #if QC_MULTI_DIS_CAN 5107 #if QC_MULTI_DIS_CAN_A0097 4639 5108 /** construct a list of disparity motion vectors from the neighbouring PUs **/ 4640 5109 Void TComDataCU::getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo ) … … 4667 5136 { 4668 5137 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4669 #if VSP_N & VSP_BUGFIX4670 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId);4671 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) )4672 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC())4673 #else4674 5138 if (refViewIdx!= m_pcSlice->getViewId()) 4675 #endif4676 5139 { 4677 5140 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4699 5162 { 4700 5163 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4701 #if VSP_N & VSP_BUGFIX4702 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId);4703 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) )4704 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC())4705 #else4706 5164 if (refViewIdx!= m_pcSlice->getViewId()) 4707 #endif4708 5165 { 4709 5166 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4731 5188 { 4732 5189 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4733 #if VSP_N & VSP_BUGFIX4734 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId);4735 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) )4736 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC())4737 #else4738 5190 if (refViewIdx!= m_pcSlice->getViewId()) 4739 #endif4740 5191 { 4741 5192 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4762 5213 { 4763 5214 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4764 #if VSP_N & VSP_BUGFIX4765 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId);4766 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) )4767 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC())4768 #else4769 5215 if (refViewIdx!= m_pcSlice->getViewId()) 4770 #endif4771 5216 { 4772 5217 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4796 5241 { 4797 5242 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4798 #if VSP_N & VSP_BUGFIX4799 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId);4800 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) )4801 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC())4802 #else4803 5243 if (refViewIdx!= m_pcSlice->getViewId()) 4804 #endif4805 5244 { 4806 5245 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4992 5431 } 4993 5432 4994 #if LGE_DVMCP 4995 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0 ) 5433 #if LGE_DVMCP_A0126 5434 #if QC_SIMPLE_NBDV_B0047 5435 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo 5436 #if LGE_IVMP_PARALLEL_MERGE_B0136 5437 , Bool bParMerge 5438 #endif 5439 #else 5440 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0 5441 #if LGE_IVMP_PARALLEL_MERGE_B0136 5442 , Bool bParMerge 5443 #endif 5444 #endif 5445 ) 4996 5446 { 4997 5447 PartSize eCUMode = getPartitionSize( uiPartAddr ); 4998 5448 TComDataCU* pcTmpCU = NULL; 5449 #if !QC_SIMPLE_NBDV_B0047 4999 5450 TComDataCU* pcCULeft = NULL; 5451 #endif 5000 5452 pDInfo->iN = 0; 5001 5453 … … 5005 5457 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 5006 5458 5007 Int aiDvMcpDvCand[2][7] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal, DV-MCP ÁÖº¯ ºúÓ°¿¡¼ »ç¿EÈ DV¸¦ ÀúÀE 5459 #if QC_SIMPLE_NBDV_B0047 5460 const Int iNumofDvMCP = 7; 5461 Int aiDvMcpDvCand[2][iNumofDvMCP] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 5462 Bool abDvMcpFlag [2][iNumofDvMCP] = {{false,},{false,}}; 5463 #else 5464 Int aiDvMcpDvCand[2][7] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 5008 5465 Bool abDvMcpFlag [2][7] = {{false,},{false,}}; 5009 5466 //Int aiRefPOC [2][7] = {{-1,},{-1}}; // debug 5467 #endif 5010 5468 TComMv cTmpMvPred, cMv; 5011 5469 Bool bTmpIsSkipped = false; 5012 5470 Bool bDvMcpIsFound = false; 5471 #if LGE_DVMCP_MEM_REDUCTION_B0135 5472 Int iLCUAddrDiff = 0; 5473 #endif 5474 5475 #if LGE_IVMP_PARALLEL_MERGE_B0136 5476 Int xP, yP, nPSW, nPSH; 5477 if( bParMerge) 5478 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 5479 #endif 5013 5480 5014 5481 deriveLeftRightTopIdxGeneral( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLT, uiPartIdxRT ); … … 5021 5488 pcTmpCU = getPULeft(uiIdx, uiPartIdxLB); 5022 5489 #endif 5023 5490 #if DV_DERIVATION_PARALLEL_B0096 5491 if ( uiPartIdx == 1 && (eCUMode == SIZE_Nx2N || eCUMode == SIZE_nLx2N || eCUMode == SIZE_nRx2N) ) 5492 { 5493 pcTmpCU = NULL; 5494 } 5495 #endif 5496 #if LGE_IVMP_PARALLEL_MERGE_B0136 5497 if (pcTmpCU && bParMerge) 5498 { 5499 if (!pcTmpCU->isDiffMER(xP -1, yP+nPSH-1, xP, yP)) 5500 { 5501 pcTmpCU = NULL; 5502 } 5503 } 5504 #endif 5505 5506 #if !QC_SIMPLE_NBDV_B0047 5024 5507 pcCULeft = pcTmpCU; 5025 5508 UInt uiLeftPartIdx = uiIdx; 5509 #endif 5510 5026 5511 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 5027 5512 { … … 5042 5527 return; 5043 5528 } 5529 else // MCP 5530 { 5044 5531 #if VSP_N & VSP_BUGFIX 5045 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5046 #else 5047 else // MCP 5048 #endif 5049 { 5532 if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) 5533 { 5534 #endif 5050 5535 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5051 5536 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped ) … … 5055 5540 bDvMcpIsFound = true; 5056 5541 } 5542 #if VSP_N & VSP_BUGFIX 5543 } 5544 #endif 5057 5545 } 5058 5546 } … … 5065 5553 pcTmpCU = getPUAbove(uiIdx, uiPartIdxRT); 5066 5554 #endif 5555 #if DV_DERIVATION_PARALLEL_B0096 5556 if ( uiPartIdx == 1 && (eCUMode == SIZE_2NxN || eCUMode == SIZE_2NxnU || eCUMode == SIZE_2NxnD) ) 5557 { 5558 pcTmpCU = NULL; 5559 } 5560 #endif 5561 #if LGE_IVMP_PARALLEL_MERGE_B0136 5562 if (pcTmpCU && bParMerge) 5563 { 5564 if (!pcTmpCU->isDiffMER(xP+nPSW-1, yP-1, xP, yP)) 5565 { 5566 pcTmpCU = NULL; 5567 } 5568 } 5569 #endif 5067 5570 5068 5571 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5069 5572 { 5573 #if LGE_DVMCP_MEM_REDUCTION_B0135 5574 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr(); 5575 #endif 5070 5576 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 5071 5577 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5084 5590 return; 5085 5591 } 5592 #if LGE_DVMCP_MEM_REDUCTION_B0135 5593 else if(iLCUAddrDiff == 0) //MCP, within same LCU 5594 #else 5595 else // MCP 5596 #endif 5597 { 5086 5598 #if VSP_N & VSP_BUGFIX 5087 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5088 #else 5089 else // MCP 5090 #endif 5091 { 5599 if(pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) 5600 { 5601 #endif 5092 5602 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5093 5603 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped ) … … 5097 5607 bDvMcpIsFound = true; 5098 5608 } 5609 #if VSP_N & VSP_BUGFIX 5610 } 5611 #endif 5099 5612 } 5100 5613 } … … 5107 5620 pcTmpCU = getPUAboveRight(uiIdx, uiPartIdxRT, true, true, true); 5108 5621 #endif 5622 #if LGE_IVMP_PARALLEL_MERGE_B0136 5623 if (pcTmpCU && bParMerge) 5624 { 5625 if (!pcTmpCU->isDiffMER(xP+nPSW, yP-1, xP, yP)) 5626 { 5627 pcTmpCU = NULL; 5628 } 5629 } 5630 #endif 5631 5109 5632 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 5110 5633 { 5634 #if LGE_DVMCP_MEM_REDUCTION_B0135 5635 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr(); 5636 #endif 5111 5637 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 5112 5638 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5125 5651 return; 5126 5652 } 5653 #if LGE_DVMCP_MEM_REDUCTION_B0135 5654 else if(iLCUAddrDiff == 0) 5655 #else 5656 else // MCP 5657 #endif 5658 { 5127 5659 #if VSP_N & VSP_BUGFIX 5128 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5129 #else 5130 else // MCP 5131 #endif 5132 { 5660 if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) 5661 { 5662 #endif 5133 5663 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5134 5664 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped ) … … 5138 5668 bDvMcpIsFound = true; 5139 5669 } 5670 #if VSP_N & VSP_BUGFIX 5671 } 5672 #endif 5140 5673 } 5141 5674 } … … 5147 5680 #else 5148 5681 pcTmpCU = getPUBelowLeft(uiIdx, uiPartIdxLB); 5682 #endif 5683 #if LGE_IVMP_PARALLEL_MERGE_B0136 5684 if (pcTmpCU && bParMerge) 5685 { 5686 if (!pcTmpCU->isDiffMER(xP-1, yP+nPSH, xP, yP)) 5687 { 5688 pcTmpCU = NULL; 5689 } 5690 } 5149 5691 #endif 5150 5692 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) … … 5166 5708 return; 5167 5709 } 5710 else // MCP 5711 { 5168 5712 #if VSP_N & VSP_BUGFIX 5169 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5170 #else 5171 else // MCP 5172 #endif 5173 { 5713 if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) 5714 { 5715 #endif 5174 5716 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5175 5717 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped ) … … 5179 5721 bDvMcpIsFound = true; 5180 5722 } 5723 #if VSP_N & VSP_BUGFIX 5724 } 5725 #endif 5181 5726 } 5182 5727 } … … 5191 5736 pcTmpCU = getPUAboveLeft(uiIdx, uiPartIdxLT, true, true, true); 5192 5737 #endif 5738 #if LGE_IVMP_PARALLEL_MERGE_B0136 5739 if (pcTmpCU && bParMerge) 5740 { 5741 if (!pcTmpCU->isDiffMER(xP-1, yP-1, xP, yP)) 5742 { 5743 pcTmpCU = NULL; 5744 } 5745 } 5746 #endif 5747 5193 5748 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5194 5749 { 5750 #if LGE_DVMCP_MEM_REDUCTION_B0135 5751 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr(); 5752 #endif 5195 5753 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 5196 5754 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5209 5767 return; 5210 5768 } 5769 #if LGE_DVMCP_MEM_REDUCTION_B0135 5770 else if(iLCUAddrDiff <= 1) 5771 #else 5772 else // MCP 5773 #endif 5774 { 5211 5775 #if VSP_N & VSP_BUGFIX 5212 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5213 #else 5214 else // MCP 5215 #endif 5216 { 5776 if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) 5777 { 5778 #endif 5217 5779 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5218 5780 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped ) … … 5222 5784 bDvMcpIsFound = true; 5223 5785 } 5786 #if VSP_N & VSP_BUGFIX 5787 } 5788 #endif 5224 5789 } 5225 5790 } … … 5230 5795 if ( getSlice()->getPPS()->getEnableTMVPFlag() ) 5231 5796 { 5797 #if !QC_SIMPLE_NBDV_B0047 5232 5798 UInt uiPUIdx = uiPartIdx; 5233 5799 UInt uiAbsPartAddr = uiPartAddr; … … 5387 5953 } 5388 5954 } 5955 #else 5956 TComMv cColMv; 5957 Int iTargetViewIdx = 0; 5958 Int iTStartViewIdx = 0; 5959 UInt uiPartIdxRB, uiBRIdx; 5960 Int uiViewIdxCurr= getSlice()->getViewId(); 5961 UInt uiPartIdxCenter; 5962 xDeriveCenterIdx( eCUMode, uiPartIdx, uiPartIdxCenter ); 5963 5964 Int uiLCUIdx = getAddr(); 5965 Int uiLCUnew = uiLCUIdx; 5966 eCUMode = getPartitionSize( 0 ); 5967 deriveRightBottomIdx( eCUMode, uiPartIdx, uiPartIdxRB ); 5968 uiBRIdx = uiPartIdxLT; 5969 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 5970 if ( (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) &&(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() )) // image boundary check 5971 { 5972 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 5973 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row of LCU 5974 { 5975 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; 5976 } 5977 else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) // is not at the last column of LCU But is last row of LCU 5978 { 5979 uiBRIdx = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 5980 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU(); 5981 } 5982 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 5983 { 5984 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; 5985 uiLCUnew = uiLCUIdx + 1; 5986 } 5987 else //is the right bottom corner of LCU 5988 { 5989 uiBRIdx = 0; 5990 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU() + 1; 5991 } 5992 } 5993 const Int iNumofCandPic = 2; 5994 for(Int i =0; i < iNumofCandPic; i++) 5995 { 5996 Int lpRef=0; 5997 if(i == 0) 5998 { //check the col-located picture 5999 eRefPicList = RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0); 6000 #if COLLOCATED_REF_IDX 6001 lpRef = getSlice()->getColRefIdx(); 6002 #else 6003 Int lpRef = 0; 6004 #endif 6005 } 6006 else 6007 { 6008 if(!(getPic()->getRapbCheck())) 6009 break; 6010 eRefPicList=getPic()->getRapRefList(); 6011 lpRef=getPic()->getRapRefIdx(); 6012 } 6013 6014 if( m_pcSlice->getViewId() == getSlice()->getRefPic( eRefPicList, lpRef)->getViewId() ) 6015 { 6016 if (uiViewIdxCurr > 1) 6017 { 6018 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 6019 { 6020 clipMv(cColMv); 6021 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 6022 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 6023 return ; 6024 } 6025 } 6026 6027 if(xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiPartIdxCenter, cColMv, iTargetViewIdx, iTStartViewIdx )) 6028 { 6029 clipMv(cColMv); 6030 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 6031 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 6032 return ; 6033 } 6034 if(uiViewIdxCurr == 1) 6035 { 6036 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 6037 { 6038 clipMv(cColMv); 6039 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 6040 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 6041 return ; 6042 } 6043 } 6044 } 6045 } 6046 #endif 5389 6047 } // if TMVP Flag 5390 6048 5391 6049 if( bDvMcpIsFound ) // skip dvmcp 5392 6050 { 6051 #if QC_SIMPLE_NBDV_B0047 6052 for( Int i=1 ; i<iNumofDvMCP-1 ; i++ ) // 5 spatial 6053 #else 5393 6054 for( Int i=1 ; i<7 ; i++ ) // 5 spatial + 1 temporal 6055 #endif 5394 6056 { 5395 6057 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5407 6069 } 5408 6070 } 5409 5410 6071 return; 5411 5412 } 5413 #endif 5414 6072 } 6073 #endif 5415 6074 #endif 5416 6075 … … 5422 6081 * \param pInfo 5423 6082 */ 6083 #if SHARP_INTERVIEW_DECOUPLE_B0111 6084 Void TComDataCU::fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo, Int iMVPIdx) 6085 { 6086 if (!m_pcSlice->getSPS()->getViewId() || !m_pcSlice->getSPS()->getMultiviewMvPredMode()) 6087 { 6088 // HEVC 6089 fillMvpCandBase(uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pInfo); 6090 } 6091 else 6092 { 6093 if (iMVPIdx!=0) 6094 { 6095 // HEVC part 6096 fillMvpCandBase(uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pInfo); 6097 if (iRefIdx < 0) 6098 { 6099 return; 6100 } 6101 for (Int j = AMVP_MAX_NUM_CANDS - 1; j >= 0; j--) 6102 { 6103 pInfo->m_acMvCand[j+1] = pInfo->m_acMvCand[j]; 6104 } 6105 pInfo->iN++; 6106 } 6107 if (iMVPIdx<=0) 6108 { 6109 // extention part 6110 DisInfo cDisInfo; 6111 cDisInfo.iN = 0; 6112 #if LGE_DVMCP_A0126 6113 #if QC_SIMPLE_NBDV_B0047 6114 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136 6115 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false); 6116 #else 6117 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo); 6118 #endif 6119 #else 6120 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx ); 6121 #endif 6122 #else 6123 getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo ); 6124 #endif 6125 if(cDisInfo.iN==0) 6126 { 6127 cDisInfo.iN = 1; 6128 cDisInfo.m_acMvCand[0].setHor(0); 6129 cDisInfo.m_acMvCand[0].setVer(0); 6130 cDisInfo.m_aVIdxCan[0] = 0; 6131 } 6132 TComMv cPdmMvPred; 6133 #if QC_MULTI_DIS_CAN_A0097 6134 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 6135 #else 6136 if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) ) 6137 #endif 6138 { 6139 clipMv( cPdmMvPred ); 6140 pInfo->m_acMvCand[0] = cPdmMvPred; 6141 } 6142 else 6143 { 6144 pInfo->m_acMvCand[0].set(0,0); 6145 } 6146 } 6147 } 6148 } 6149 6150 6151 Void TComDataCU::fillMvpCandBase( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ) 6152 #else 5424 6153 Void TComDataCU::fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ) 6154 #endif 5425 6155 { 5426 6156 PartSize eCUMode = getPartitionSize( 0 ); … … 5435 6165 } 5436 6166 5437 #if QC_MULTI_DIS_CAN 6167 #if QC_MULTI_DIS_CAN_A0097 && !SHARP_INTERVIEW_DECOUPLE_B0111 5438 6168 DisInfo cDisInfo; 5439 6169 cDisInfo.iN = 0; 5440 6170 if(m_pcSlice->getSPS()->getViewId() && m_pcSlice->getSPS()->getMultiviewMvPredMode()) 5441 6171 { 5442 #if LGE_DVMCP 6172 #if LGE_DVMCP_A0126 6173 #if QC_SIMPLE_NBDV_B0047 6174 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136 6175 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false); 6176 #else 6177 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo); 6178 #endif 6179 #else 5443 6180 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx ); 6181 #endif 5444 6182 #else 5445 6183 getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo ); … … 5454 6192 } 5455 6193 #endif 5456 #if HHI_INTER_VIEW_MOTION_PRED 6194 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5457 6195 #if ( PDM_AMVP_POS == 0 ) 5458 6196 // get inter-view mv predictor (at position 0) 5459 6197 TComMv cPdmMvPred; 5460 #if QC_MULTI_DIS_CAN 6198 #if QC_MULTI_DIS_CAN_A0097 5461 6199 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 5462 6200 #else … … 5513 6251 } 5514 6252 5515 #if HHI_INTER_VIEW_MOTION_PRED 6253 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5516 6254 #if ( PDM_AMVP_POS == 1 ) 5517 6255 // get inter-view mv predictor (at position 1) 5518 6256 TComMv cPdmMvPred; 5519 #if QC_MULTI_DIS_CAN 6257 #if QC_MULTI_DIS_CAN_A0097 5520 6258 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 5521 6259 #else … … 5565 6303 } 5566 6304 5567 #if HHI_INTER_VIEW_MOTION_PRED 6305 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5568 6306 #if ( PDM_AMVP_POS == 2 ) 5569 6307 // get inter-view mv predictor (at position 2) 5570 6308 TComMv cPdmMvPred; 5571 #if QC_MULTI_DIS_CAN 6309 #if QC_MULTI_DIS_CAN_A0097 5572 6310 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 5573 6311 #else … … 5587 6325 { 5588 6326 pInfo->iN = 1; 5589 } 5590 } 5591 #if QC_MULTI_DIS_CAN 6327 #if FIX_MISUSE_REFINDEX 6328 pInfo->m_acMvCand[ 1 ].set(0, 0); 6329 #endif 6330 } 6331 } 6332 #if QC_MULTI_DIS_CAN_A0097 && !SHARP_INTERVIEW_DECOUPLE_B0111 5592 6333 if ( getSlice()->getViewId()!=0 && pInfo->iN == 3 ) 5593 6334 { … … 5663 6404 if ( uiLCUIdx >= 0 && xGetColMVP( eRefPicList, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx_Col ) ) 5664 6405 { 6406 #if FIX_LGE_DVMCP_B0133 6407 cColMv.m_bDvMcp = false; 6408 #endif 5665 6409 pInfo->m_acMvCand[pInfo->iN++] = cColMv; 5666 6410 } … … 5672 6416 if (xGetColMVP( eRefPicList, uiCurLCUIdx, uiPartIdxCenter, cColMv, iRefIdx_Col )) 5673 6417 { 6418 #if FIX_LGE_DVMCP_B0133 6419 cColMv.m_bDvMcp = false; 6420 #endif 5674 6421 pInfo->m_acMvCand[pInfo->iN++] = cColMv; 5675 6422 } … … 5678 6425 } 5679 6426 5680 #if HHI_INTER_VIEW_MOTION_PRED 6427 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5681 6428 #if ( PDM_AMVP_POS == 3 ) 5682 6429 // get inter-view mv predictor (at position 3) 5683 6430 TComMv cPdmMvPred; 5684 #if QC_MULTI_DIS_CAN 6431 #if QC_MULTI_DIS_CAN_A0097 5685 6432 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 5686 6433 #else … … 5699 6446 #endif 5700 6447 5701 #if HHI_INTER_VIEW_MOTION_PRED 6448 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5702 6449 const Int iNumAMVPCands = AMVP_MAX_NUM_CANDS + ( getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); 5703 6450 if (pInfo->iN > iNumAMVPCands) … … 5953 6700 { 5954 6701 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5955 #if LGE_DVMCP 6702 #if LGE_DVMCP_A0126 5956 6703 cMvPred.m_bDvMcp = false; 5957 6704 #endif … … 5982 6729 if( pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) >= 0 ) 5983 6730 { 5984 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )5985 {5986 return false;5987 }5988 6731 #if VSP_N /// 5989 6732 if( pcTmpCU->isVspRef( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) ) 5990 6733 return false; 5991 6734 #endif 6735 #if QC_IV_AS_LT_B0046 6736 Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getIsLongTerm(); 6737 Bool bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm(); 6738 iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ); 6739 if ( (bIsCurrRefLongTerm == bIsNeibRefLongTerm) && (iNeibRefPOC == iCurrRefPOC) ) 6740 #else 6741 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) ) 6742 { 6743 return false; 6744 } 5992 6745 iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ); 5993 6746 if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List// 6747 #endif 5994 6748 { 5995 6749 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx); 5996 #if LGE_DVMCP 6750 #if LGE_DVMCP_A0126 5997 6751 cMvPred.m_bDvMcp = false; 5998 6752 #endif … … 6138 6892 Int iNeibRefPOC; 6139 6893 6894 #if QC_IV_AS_LT_B0046 6895 Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getIsLongTerm(); 6896 Bool bIsNeibRefLongTerm = false; 6897 #endif 6140 6898 if( pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) >= 0 ) 6141 6899 { 6142 iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) );6143 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )6144 return false;6145 6900 #if VSP_N /// 6146 6901 if( pcTmpCU->isVspRef( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) ) 6147 6902 return false; 6148 6903 #endif 6904 iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ); 6905 #if QC_IV_AS_LT_B0046 6906 bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm() ; 6907 if ( (bIsCurrRefLongTerm == bIsNeibRefLongTerm) && (iNeibRefPOC == iCurrRefPOC) ) 6908 #else 6909 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) ) 6910 return false; 6149 6911 if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List// 6912 #endif 6150 6913 { 6151 6914 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx); 6152 #if LGE_DVMCP 6915 #if LGE_DVMCP_A0126 6153 6916 cMvPred.m_bDvMcp = false; 6154 6917 #endif … … 6165 6928 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 6166 6929 TComMv rcMv; 6167 6930 #if QC_IV_AS_LT_B0046 6931 bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx))->getIsLongTerm(); 6932 if ( bIsCurrRefLongTerm == bIsNeibRefLongTerm ) 6933 { 6934 #else 6168 6935 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) ) 6169 6936 { 6170 6937 return false; 6171 6938 } 6939 #endif 6172 6940 #if VSP_N /// 6173 6941 if( pcTmpCU->isVspRef( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) ) … … 6192 6960 rcMv = cMvPred.scaleMv( iScale ); 6193 6961 } 6194 #if LGE_DVMCP 6962 #if LGE_DVMCP_A0126 6195 6963 rcMv.m_bDvMcp = false; 6196 6964 #endif 6197 6965 pInfo->m_acMvCand[ pInfo->iN++] = rcMv; 6198 6966 return true; 6967 #if QC_IV_AS_LT_B0046 6968 } 6969 #endif 6199 6970 } 6200 6971 //---------------------- V2(END) --------------------// … … 6204 6975 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx); 6205 6976 TComMv rcMv; 6206 6977 #if QC_IV_AS_LT_B0046 6978 bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm(); ; 6979 if ( bIsCurrRefLongTerm == bIsNeibRefLongTerm ) 6980 { 6981 #else 6207 6982 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) ) 6208 6983 { 6209 6984 return false; 6210 6985 } 6986 #endif 6211 6987 #if VSP_N /// 6212 6988 if( pcTmpCU->isVspRef( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) ) … … 6231 7007 rcMv = cMvPred.scaleMv( iScale ); 6232 7008 } 6233 #if LGE_DVMCP 7009 #if LGE_DVMCP_A0126 6234 7010 rcMv.m_bDvMcp = false; 6235 7011 #endif 6236 7012 pInfo->m_acMvCand[ pInfo->iN++] = rcMv; 6237 7013 return true; 7014 #if QC_IV_AS_LT_B0046 7015 } 7016 #endif 6238 7017 } 6239 7018 //---------------------- V3(END) --------------------// … … 6241 7020 } 6242 7021 6243 #if QC_MULTI_DIS_CAN 7022 #if QC_MULTI_DIS_CAN_A0097 6244 7023 Bool TComDataCU::xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx ) 6245 7024 { 6246 #if LGE_DVMCP 7025 #if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047 6247 7026 Int iDvMcpDispX[2] = {-1,}; 6248 7027 Bool bDvMcpFlag [2] = { false, }; … … 6269 7048 return false; 6270 7049 } 6271 #if LGE_DVMCP 7050 #if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047 6272 7051 Bool bColIsSkipped = pColCU->isSkipped( uiAbsPartAddr ); 6273 7052 #endif … … 6299 7078 if ( iColViewIdx == iColRefViewIdx ) // temporal vector 6300 7079 { 6301 #if LGE_DVMCP 7080 #if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047 6302 7081 if( iColViewIdx >0 ) 6303 7082 { … … 6317 7096 { 6318 7097 rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 6319 #if LGE_DVMCP 7098 #if LGE_DVMCP_A0126 6320 7099 rcMv.m_bDvMcp = false; 6321 7100 #endif … … 6326 7105 } 6327 7106 6328 #if LGE_DVMCP 7107 #if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047 6329 7108 for( Int ilist=0 ; ilist<2 ; ilist++ ) 6330 7109 { … … 6357 7136 RefPicList eColRefPicList; 6358 7137 Int iColPOC, iColRefPOC, iCurrPOC, iCurrRefPOC, iScale; 6359 #if SONY_COLPIC_AVAILABILITY 7138 #if SONY_COLPIC_AVAILABILITY || VSP_N 7139 #if QC_IV_AS_LT_B0046 7140 Int iColViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx; 7141 #else 6360 7142 Int iColViewOrderIdx, iColRefViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx; 6361 7143 #endif 7144 #endif 6362 7145 TComMv cColMv; 6363 7146 6364 #if SONY_COLPIC_AVAILABILITY6365 iCurrViewOrderIdx = m_pcSlice->getViewOrderIdx();6366 iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();6367 #endif6368 7147 // use coldir. 6369 7148 #if COLLOCATED_REF_IDX … … 6379 7158 iCurrPOC = m_pcSlice->getPOC(); 6380 7159 iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC(); 6381 iColPOC = pColCU->getSlice()->getPOC(); 6382 #if SONY_COLPIC_AVAILABILITY 7160 iColPOC = pColCU->getSlice()->getPOC(); 7161 7162 #if SONY_COLPIC_AVAILABILITY || VSP_N 7163 iCurrViewOrderIdx = m_pcSlice->getViewOrderIdx(); 7164 iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); 6383 7165 iColViewOrderIdx = pColCU->getSlice()->getViewOrderIdx(); 6384 7166 #endif … … 6389 7171 } 6390 7172 6391 #if !SONY_COLPIC_AVAILABILITY 7173 #if !SONY_COLPIC_AVAILABILITY&!QC_IV_AS_LT_B0046 6392 7174 if( m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId() != m_pcSlice->getViewId() ) 6393 7175 return false; … … 6413 7195 } 6414 7196 } 7197 7198 7199 #if VSP_N 7200 Bool bIsCurrRefVsp = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsVsp(); 7201 Bool bIsColRefVsp = pColCU->getSlice()->getRefPic( eColRefPicList,pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getIsVsp(); 7202 7203 if(bIsCurrRefVsp) 7204 { 7205 #if (VSP_TMVP==0) 7206 rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 7207 #elif (VSP_TMVP==1 || VSP_TMVP==2) 7208 #if !VSP_TMVP_ENABLE 7209 if(!bIsColRefVsp) return false; 7210 #endif 7211 rcMv.setZero(); 7212 #if !VSP_MV_ZERO 7213 if( bIsColRefVsp ) rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 7214 #endif 7215 #endif // (VSP_TMVP==1 || VSP_TMVP==2) 7216 return true; 7217 } 7218 if(bIsColRefVsp) 7219 #if (VSP_TMVP==0) 7220 { 7221 if(iCurrPOC != iCurrRefPOC) 7222 return false; 7223 else 7224 { 7225 Int iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx(); 7226 iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx); 7227 cColMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 7228 if ( iScale == 4096 ) 7229 rcMv = cColMv; 7230 else 7231 rcMv = cColMv.scaleMv( iScale ); 7232 return true; 7233 } 7234 } 7235 #elif (VSP_TMVP==1) 7236 return false; 7237 #elif (VSP_TMVP==2) 7238 { 7239 for(Int i=0; i < m_pcSlice->getNumRefIdx(eRefPicList); i++) 7240 { 7241 if( m_pcSlice->getRefPic(eRefPicList, i)->getIsVsp() ) 7242 { 7243 riRefIdx = i; 7244 #if VSP_MV_ZERO 7245 rcMv.setZero(); 7246 #else 7247 rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 7248 #endif 7249 return true; 7250 } 7251 } 7252 return false; 7253 } 7254 #endif // VSP_TMVP 7255 #endif // VSP_N 7256 6415 7257 6416 7258 // Scale the vector. 6417 7259 iColRefPOC = pColCU->getSlice()->getRefPOC(eColRefPicList, iColRefIdx); 6418 7260 7261 #if !QC_IV_AS_LT_B0046 6419 7262 #if SONY_COLPIC_AVAILABILITY 6420 7263 iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx(); … … 6425 7268 } 6426 7269 #endif 7270 #else 7271 Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm(); 7272 Bool bIsColRefLongTerm = pColCU->getSlice()->getWasLongTerm(eColRefPicList, iColRefIdx); 7273 if(bIsCurrRefLongTerm != bIsColRefLongTerm) 7274 { 7275 assert( ((iColPOC == iColRefPOC)&&(iCurrPOC != iCurrRefPOC))||((iColPOC != iColRefPOC)&&(iCurrPOC == iCurrRefPOC))); 7276 return false; 7277 } 7278 #endif 6427 7279 6428 7280 cColMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 6429 7281 6430 iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC(); 7282 #if QC_IV_AS_LT_B0046 7283 { 7284 assert( ((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC))||((iColPOC == iColRefPOC)&&(iCurrPOC == iCurrRefPOC))); 7285 if(!bIsCurrRefLongTerm) //short-term 7286 { 7287 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); 7288 if ( iScale == 4096 ) 7289 { 7290 rcMv = cColMv; 7291 } 7292 else 7293 { 7294 rcMv = cColMv.scaleMv( iScale ); 7295 } 7296 }else 7297 #if QC_MVHEVC_B0046 7298 rcMv = cColMv; //inter-view 7299 #else 7300 { 7301 #if SONY_COLPIC_AVAILABILITY 7302 Int iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx(); 7303 iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx); 7304 if ( iScale == 4096 ) 7305 { 7306 rcMv = cColMv; 7307 } 7308 else 7309 { 7310 rcMv = cColMv.scaleMv( iScale ); 7311 } 7312 #else 7313 return false; 7314 #endif 7315 } 7316 #endif 7317 } 7318 #else 6431 7319 #if SONY_COLPIC_AVAILABILITY 6432 7320 iScale = 0; 6433 iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); 6434 #if VSP_N 6435 // UInt uiColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId(); 6436 UInt uiCurRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId(); 6437 if( uiCurRefViewId == m_pcSlice->getViewId() && m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC() == m_pcSlice->getPOC() ) 6438 iScale = 4096; 6439 else 6440 #endif 7321 // iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); 6441 7322 if((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC)) 6442 7323 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); … … 6444 7325 iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx); 6445 7326 else 6446 return false; 6447 7327 return false; 6448 7328 #else 6449 7329 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); … … 6451 7331 if ( iScale == 4096 ) 6452 7332 { 6453 #if VSP_MV_ZERO6454 if( uiCurRefViewId == m_pcSlice->getViewId() && m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC() == m_pcSlice->getPOC() )6455 rcMv.setZero();6456 else6457 #endif6458 7333 rcMv = cColMv; 6459 7334 } … … 6462 7337 rcMv = cColMv.scaleMv( iScale ); 6463 7338 } 6464 7339 #endif 6465 7340 return true; 6466 7341 } … … 7391 8266 memcpy( m_puhInterDir + uiAbsPartIdxDst, pcCU->getInterDir() + uiAbsPartIdxSrc, sizeof( m_puhInterDir[0] ) * uiNumPartition ); 7392 8267 8268 #if !MTK_UNCONSTRAINED_MVI_B0083 7393 8269 memcpy( m_apiMVPIdx[0] + uiAbsPartIdxDst, pcCU->getMVPIdx(REF_PIC_LIST_0) + uiAbsPartIdxSrc, sizeof(*m_apiMVPIdx[0]) * uiNumPartition ); 7394 8270 memcpy( m_apiMVPIdx[1] + uiAbsPartIdxDst, pcCU->getMVPIdx(REF_PIC_LIST_1) + uiAbsPartIdxSrc, sizeof(*m_apiMVPIdx[0]) * uiNumPartition ); 7395 8271 memcpy( m_apiMVPNum[0] + uiAbsPartIdxDst, pcCU->getMVPNum(REF_PIC_LIST_0) + uiAbsPartIdxSrc, sizeof(*m_apiMVPNum[0]) * uiNumPartition ); 7396 8272 memcpy( m_apiMVPNum[1] + uiAbsPartIdxDst, pcCU->getMVPNum(REF_PIC_LIST_1) + uiAbsPartIdxSrc, sizeof(*m_apiMVPNum[0]) * uiNumPartition ); 8273 #endif 7397 8274 7398 8275 pcCU->getCUMvField( REF_PIC_LIST_0 )->copyTo( &m_acCUMvField[0], -Int(uiAbsPartIdxSrc) + uiAbsPartIdxDst, uiAbsPartIdxSrc, uiNumPartition ); 7399 8276 pcCU->getCUMvField( REF_PIC_LIST_1 )->copyTo( &m_acCUMvField[1], -Int(uiAbsPartIdxSrc) + uiAbsPartIdxDst, uiAbsPartIdxSrc, uiNumPartition ); 8277 8278 #if MTK_UNCONSTRAINED_MVI_B0083 8279 if( pcCU->getSlice()->getSliceType() == P_SLICE) 8280 { 8281 #if NTT_FIX_UNCONSTRAINED_MVI 8282 m_acCUMvField[0].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 1, getSlice()->getNumRefIdx( RefPicList(0) ) ); 8283 m_acCUMvField[1].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, -1, 1, getSlice()->getNumRefIdx( RefPicList(1) ) ); 8284 #else 8285 m_acCUMvField[0].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 1); 8286 m_acCUMvField[1].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, -1, 1); 8287 #endif 8288 } 8289 else 8290 { 8291 #if NTT_FIX_UNCONSTRAINED_MVI 8292 m_acCUMvField[0].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 3, getSlice()->getNumRefIdx( RefPicList(0) ) ); 8293 m_acCUMvField[1].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 3, getSlice()->getNumRefIdx( RefPicList(1) ) ); 8294 #else 8295 m_acCUMvField[0].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 3); 8296 m_acCUMvField[1].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 3); 8297 #endif 8298 } 8299 #endif 8300 7400 8301 7401 8302 #if HHI_FULL_PEL_DEPTH_MAP_MV_ACC … … 7410 8311 // ------------------------------------------------------------------------------------------------------------------- 7411 8312 #if HHI_INTER_VIEW_MOTION_PRED 7412 #if !QC_MULTI_DIS_CAN 8313 #if !QC_MULTI_DIS_CAN_A0097 7413 8314 Int 7414 8315 TComDataCU::getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ) … … 7429 8330 #else 7430 8331 Int 7431 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ) 8332 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 8333 #if QC_MRG_CANS_B0048 8334 , Int* iPdm 8335 #endif 8336 ) 7432 8337 { 7433 8338 TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator(); 7434 8339 ROFRS( pcDepthMapGenerator, 0 ); 7435 return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo ); 8340 return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo 8341 #if QC_MRG_CANS_B0048 8342 , iPdm 8343 #endif 8344 ); 7436 8345 } 7437 8346 Bool … … 7466 8375 TComResidualGenerator* pcResidualGenerator = m_pcSlice->getSPS()->getResidualGenerator(); 7467 8376 ROFRS( pcResidualGenerator, false ); 7468 #if QC_MULTI_DIS_CAN 8377 #if QC_MULTI_DIS_CAN_A0097 7469 8378 DisInfo cDisInfo; 7470 8379 cDisInfo.iN = 0; 7471 8380 PartSize m_peSaved = getPartitionSize( 0 ); 7472 8381 m_pePartSize[0] = SIZE_2Nx2N; 7473 #if LGE_DVMCP 8382 #if LGE_DVMCP_A0126 8383 #if QC_SIMPLE_NBDV_B0047 8384 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136 8385 getDisMvpCand2( 0, 0, &cDisInfo, false); 8386 #else 8387 getDisMvpCand2( 0, 0, &cDisInfo); 8388 #endif 8389 #else 7474 8390 getDisMvpCand2( 0, 0, &cDisInfo, true ); 8391 #endif 7475 8392 #else 7476 8393 getDisMvpCand ( 0, 0, &cDisInfo ); … … 7501 8418 #endif 7502 8419 7503 #if LGE_EDGE_INTRA 8420 #if LGE_EDGE_INTRA_A0070 7504 8421 Void TComDataCU::reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion ) 7505 8422 { … … 8125 9042 8126 9043 //! \} 8127 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDataCU.h
r193 r213 159 159 Int* m_pcArlCoeffCb; ///< ARL coefficient buffer (Cb) 160 160 Int* m_pcArlCoeffCr; ///< ARL coefficient buffer (Cr) 161 #if FIX_MEM_LEAKS162 161 Bool m_ArlCoeffIsAliasedAllocation; ///< ARL coefficient buffer is an alias of the global buffer and must not be free()'d 163 #endif164 162 165 163 static Int* m_pcGlbArlCoeffY; ///< ARL coefficient buffer (Y) 166 164 static Int* m_pcGlbArlCoeffCb; ///< ARL coefficient buffer (Cb) 167 165 static Int* m_pcGlbArlCoeffCr; ///< ARL coefficient buffer (Cr) 166 168 167 #endif 169 168 … … 194 193 195 194 Bool* m_pbMergeFlag; ///< array of merge flags 195 #if LGE_ILLUCOMP_B0045 196 Bool* m_pbICFlag; ///< array of IC flags 197 #endif 196 198 UChar* m_puhMergeIndex; ///< array of merge candidate indices 197 199 #if AMP_MRG … … 217 219 #endif 218 220 219 #if LGE_EDGE_INTRA 221 #if LGE_EDGE_INTRA_A0070 220 222 UChar* m_pucEdgeCode; ///< array of edge code 221 223 UChar* m_pucEdgeNumber; ///< total number of edge … … 235 237 Bool m_bDecSubCu; ///< indicates decoder-mode 236 238 Double m_dTotalCost; ///< sum of partition RD costs 239 #if FIX_RDO_NEGDIST 240 Dist m_uiTotalDistortion; ///< sum of partition distortion 241 #else 237 242 UInt m_uiTotalDistortion; ///< sum of partition distortion 243 #endif 238 244 UInt m_uiTotalBits; ///< sum of partition bits 239 245 UInt m_uiTotalBins; ///< sum of partition bins 240 246 UInt* m_uiSliceStartCU; ///< Start CU address of current slice 241 247 UInt* m_uiEntropySliceStartCU; ///< Start CU address of current slice 242 243 #if OL_DEPTHLIMIT_A0044244 //add a variable to store the partition information245 //a 2D array in uidepth, part_symbol format246 UInt m_uiPartInfo[OL_PART_BUF_SIZE][2];247 UInt m_uiPartNum;248 Bool m_dumpPartInfo;249 #endif250 248 251 249 // ------------------------------------------------------------------------------------------------------------------- … … 269 267 Int* m_piContourPredTexDeltaDC1; 270 268 Int* m_piContourPredTexDeltaDC2; 269 #endif 270 271 #if RWTH_SDC_DLT_B0036 272 Bool* m_pbSDCFlag; 273 Pel* m_apSegmentDCOffset[2]; 271 274 #endif 272 275 … … 283 286 Void deriveRightBottomIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxRB ); 284 287 Bool xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx ); 285 #if QC_MULTI_DIS_CAN 288 #if QC_MULTI_DIS_CAN_A0097 286 289 Bool xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 287 290 #endif … … 475 478 Void setSubPart ( T bParameter, T* pbBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ); 476 479 480 #if LGE_ILLUCOMP_B0045 481 Bool* getICFlag () { return m_pbICFlag; } 482 Bool getICFlag ( UInt uiIdx ) { return m_pbICFlag[uiIdx]; } 483 Void setICFlag ( UInt uiIdx, Bool uh ) { m_pbICFlag[uiIdx] = uh; } 484 Void setICFlagSubParts ( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 485 Bool isICFlagRequired (UInt uiAbsPartIdx); 486 #endif 487 477 488 #if AMP_MRG 478 489 Void setMergeAMP( Bool b ) { m_bIsMergeAMP = b; } … … 533 544 534 545 #if HHI_INTER_VIEW_MOTION_PRED 535 #if !QC_MULTI_DIS_CAN 546 #if !QC_MULTI_DIS_CAN_A0097 536 547 Int getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ); 537 548 Bool getPdmMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false ); 538 549 #else 539 550 Bool getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false ); 540 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ); 551 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 552 #if QC_MRG_CANS_B0048 553 , Int* iPdm 554 #endif 555 ); 541 556 Void getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo ); 542 #if LGE_DVMCP 543 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1 ); 557 #if LGE_DVMCP_A0126 558 #if QC_SIMPLE_NBDV_B0047 559 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo 560 #if LGE_IVMP_PARALLEL_MERGE_B0136 561 , Bool bParMerg = false 562 #endif 563 ); 564 #else 565 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1 566 #if LGE_IVMP_PARALLEL_MERGE_B0136 567 , Bool bParMerg = false 568 #endif 569 ); 570 #endif 544 571 #endif 545 572 … … 589 616 590 617 AMVP_MODE getAMVPMode ( UInt uiIdx ); 618 #if SHARP_INTERVIEW_DECOUPLE_B0111 619 Void fillMvpCandBase ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); 620 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo , Int iMVPIdx=-1); 621 #else 591 622 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); 623 #endif 592 624 #if PARALLEL_MERGE 593 625 Bool isDiffMER ( Int xN, Int yN, Int xP, Int yP); … … 611 643 612 644 Void compressMV (); 613 614 #if OL_DEPTHLIMIT_A0044615 Void resetPartInfo () {m_uiPartNum = 0;};616 Void incrementPartInfo () {m_uiPartNum ++;};617 Void updatePartInfo(UInt uiSymbol, UInt uiDepth) { m_uiPartInfo[m_uiPartNum][0] = uiSymbol; m_uiPartInfo[m_uiPartNum][1] = uiDepth;};618 UInt* readPartInfo() { return (UInt*)m_uiPartInfo;};619 Void setPartDumpFlag(Bool flag) { m_dumpPartInfo = flag; };620 Bool getPartDumpFlag() { return m_dumpPartInfo; };621 #endif622 645 623 646 // ------------------------------------------------------------------------------------------------------------------- … … 706 729 707 730 UInt getCtxSkipFlag ( UInt uiAbsPartIdx ); 731 #if LGE_ILLUCOMP_B0045 732 UInt getCtxICFlag ( UInt uiAbsPartIdx ); 733 #endif 708 734 UInt getCtxInterDir ( UInt uiAbsPartIdx ); 709 735 … … 716 742 UInt& getTotalBins () { return m_uiTotalBins; } 717 743 718 #if LGE_EDGE_INTRA 744 #if LGE_EDGE_INTRA_A0070 719 745 UInt getCtxEdgeIntra ( UInt uiAbsPartIdx ); 720 746 #endif … … 725 751 726 752 Double& getTotalCost() { return m_dTotalCost; } 753 #if FIX_RDO_NEGDIST 754 Dist& getTotalDistortion() { return m_uiTotalDistortion; } 755 #else 727 756 UInt& getTotalDistortion() { return m_uiTotalDistortion; } 757 #endif 728 758 UInt& getTotalBits() { return m_uiTotalBits; } 729 759 UInt& getTotalNumPart() { return m_uiNumPartition; } … … 796 826 #endif 797 827 798 #if LGE_EDGE_INTRA 828 #if LGE_EDGE_INTRA_A0070 799 829 UChar* getEdgeCode( UInt uiIdx ) { return &m_pucEdgeCode[uiIdx * LGE_EDGE_INTRA_MAX_EDGE_NUM_PER_4x4]; } 800 830 UChar* getEdgeNumber( ) { return m_pucEdgeNumber; } … … 818 848 Void setEdgeDeltaDC1( UInt uiIdx, Int val ) { m_piEdgeDeltaDC1[uiIdx] = val; } 819 849 #endif 850 #endif 851 852 #if RWTH_SDC_DLT_B0036 853 Bool* getSDCFlag () { return m_pbSDCFlag; } 854 Bool getSDCFlag ( UInt uiIdx ) { return m_pbSDCFlag[uiIdx]; } 855 Void setSDCFlagSubParts ( Bool bSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 856 857 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 858 859 Bool getSDCAvailable ( UInt uiAbsPartIdx ); 860 861 Pel* getSDCSegmentDCOffset( UInt uiSeg ) { return m_apSegmentDCOffset[uiSeg]; } 862 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 863 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 820 864 #endif 821 865 }; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
r193 r213 78 78 m_uiSubSampExpX = uiSubSampExpX; 79 79 m_uiSubSampExpY = uiSubSampExpY; 80 #if !QC_MULTI_DIS_CAN 80 #if !QC_MULTI_DIS_CAN_A0097 81 81 m_ppcYuv = new TComYuv* [ m_uiMaxDepth ]; 82 82 m_ppcCU = new TComDataCU* [ m_uiMaxDepth ]; … … 102 102 { 103 103 m_bCreated = false; 104 #if !QC_MULTI_DIS_CAN 104 #if !QC_MULTI_DIS_CAN_A0097 105 105 for( UInt uiDepth = 0; uiDepth < m_uiMaxDepth; uiDepth++ ) 106 106 { … … 377 377 } 378 378 379 #if !QC_MULTI_DIS_CAN 379 #if !QC_MULTI_DIS_CAN_A0097 380 380 Bool 381 381 TComDepthMapGenerator::predictDepthMap( TComPic* pcPic ) … … 613 613 614 614 #if HHI_INTER_VIEW_MOTION_PRED 615 #if QC_MULTI_DIS_CAN 615 #if QC_MULTI_DIS_CAN_A0097 616 616 Int 617 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ) 617 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 618 #if QC_MRG_CANS_B0048 619 , Int* iPdm 620 #endif 621 ) 618 622 #else 619 623 Int … … 624 628 AOF ( m_bCreated && m_bInit ); 625 629 626 #if !QC_MULTI_DIS_CAN 630 #if !QC_MULTI_DIS_CAN_A0097 627 631 ROFRS( m_bPDMAvailable, 0 ); 628 632 #endif … … 634 638 ROTRS( !bPdmMerge, 0 ); 635 639 640 #if QC_MRG_CANS_B0048 641 Bool abPdmAvailable[4] = {false, false, false, false}; 642 #else 636 643 Bool abPdmAvailable[2] = {false,false}; 644 #endif 637 645 638 646 Int iValid = 0; … … 665 673 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec (); 666 674 667 #if QC_MULTI_DIS_CAN 675 #if QC_MULTI_DIS_CAN_A0097 668 676 Int iCurrPosX, iCurrPosY; 669 677 UInt uiPartAddr; … … 719 727 paiPdmRefIdx [ uiBaseRefListId ] = iPdmRefIdx; 720 728 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 721 #if LGE_DVMCP 729 #if LGE_DVMCP_A0126 722 730 cMv.m_bDvMcp = true; 723 731 cMv.m_iDvMcpDispX = pDInfo->m_acMvCand[0].getHor(); … … 733 741 } 734 742 Int iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 ); 735 743 #if QC_MRG_CANS_B0048 744 iPdm[0] = iPdmInterDir; 745 #else 736 746 if (iPdmInterDir == 0) 737 747 { 748 #endif 738 749 for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ ) 739 750 { … … 747 758 if( pcSlice->getRefPOC( eRefPicList, iPdmRefIdx ) == pcSlice->getPOC()) 748 759 { 760 #if QC_MRG_CANS_B0048 761 abPdmAvailable[ iRefListId+2 ] = true; 762 paiPdmRefIdx [ iRefListId+2 ] = iPdmRefIdx; 763 #else 749 764 abPdmAvailable[ iRefListId ] = true; 750 765 paiPdmRefIdx [ iRefListId ] = iPdmRefIdx; 751 #if QC_MULTI_DIS_CAN 766 #endif 767 #if QC_MULTI_DIS_CAN_A0097 752 768 TComMv cMv = pDInfo->m_acMvCand[0]; 753 769 cMv.setVer(0); … … 756 772 #endif 757 773 pcCU->clipMv( cMv ); 774 #if QC_MRG_CANS_B0048 775 pacPdmMv [ iRefListId + 2] = cMv; 776 #else 758 777 pacPdmMv [ iRefListId ] = cMv; 778 #endif 759 779 break; 760 780 } 761 781 } 762 782 } 783 #if QC_MRG_CANS_B0048 784 iPdmInterDir = ( abPdmAvailable[2] ? 1 : 0 ) + ( abPdmAvailable[3] ? 2 : 0 ) ; 785 iPdm[1] = iPdmInterDir; 786 #else 763 787 iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 ) ; 764 788 } 789 #endif 765 790 766 791 return iPdmInterDir; … … 781 806 if( pcCU->getSlice()->getRefPOC( eRefPicList, iPdmRefIdx ) != pcCU->getSlice()->getPOC() ) 782 807 { 783 #if QC_MULTI_DIS_CAN 808 #if QC_MULTI_DIS_CAN_A0097 784 809 if( getDisCanPdmMvPred (pcCU, uiPartIdx, eRefPicList, iPdmRefIdx, cMv, pDInfo, true ) ) 785 810 #else … … 807 832 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ ) 808 833 { 809 #if QC_MULTI_DIS_CAN 834 #if QC_MULTI_DIS_CAN_A0097 810 835 if ( getDisCanPdmMvPred (pcCU, uiPartIdx, eRefPicList, iPdmRefIdx, cMv, pDInfo, true ) ) 811 836 #else … … 827 852 } 828 853 829 #if QC_MULTI_DIS_CAN 854 #if QC_MULTI_DIS_CAN_A0097 830 855 Bool 831 856 TComDepthMapGenerator::getDisCanPdmMvPred ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ) 832 857 { 833 #if LGE_DVMCP 858 #if LGE_DVMCP_A0126 834 859 rcMv.m_bDvMcp = false; 835 860 #endif … … 910 935 { 911 936 rcMv.set( cBaseMvField.getHor(), cBaseMvField.getVer() ); 912 #if LGE_DVMCP 937 #if LGE_DVMCP_A0126 913 938 // save disparity vector when a merge candidate for IVMP is set as DV-MCP 914 939 if( bMerge ) … … 1069 1094 1070 1095 1071 #if !QC_MULTI_DIS_CAN 1096 #if !QC_MULTI_DIS_CAN_A0097 1072 1097 /*=======================================================* 1073 1098 *===== =====* -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.h
r166 r213 136 136 137 137 Void initViewComponent ( TComPic* pcPic ); 138 #if !QC_MULTI_DIS_CAN 138 #if !QC_MULTI_DIS_CAN_A0097 139 139 Bool predictDepthMap ( TComPic* pcPic ); 140 140 Void updateDepthMap ( TComPic* pcPic ); … … 154 154 Int getDisparity ( TComPic* pcPic, Int iPosX, Int iPosY, UInt uiRefViewId ); 155 155 #if HHI_INTER_VIEW_MOTION_PRED 156 #if QC_MULTI_DIS_CAN 157 Int getPdmMergeCandidate ( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ); 156 #if QC_MULTI_DIS_CAN_A0097 157 Int getPdmMergeCandidate ( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 158 #if QC_MRG_CANS_B0048 159 , Int* iPdm 160 #endif 161 ); 162 158 163 Bool getPdmMvPredDisCan ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ); 159 164 Bool getDisCanPdmMvPred ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ); … … 174 179 private: 175 180 // picture operations 176 #if !QC_MULTI_DIS_CAN 181 #if !QC_MULTI_DIS_CAN_A0097 177 182 Bool xConvertDepthMapCurr2Ref ( TComPic* pcRef, TComPic* pcCur ); 178 183 Bool xConvertDepthMapRef2Curr ( TComPic* pcCur, TComPic* pcRef ); … … 237 242 Bool m_bDecoder; 238 243 TComPrediction* m_pcPrediction; 239 #if VIDYO_VPS_INTEGRATION 244 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 240 245 TComVPSAccess* m_pcVPSAccess; 241 246 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComMotionInfo.cpp
r56 r213 374 374 } 375 375 #endif 376 377 378 379 #if MTK_UNCONSTRAINED_MVI_B0083 380 Void TComCUMvField::setUndefinedMv( Int iPartAddr, Int iNumPart, Char* pePredMode, UChar* puhInterDir, Int refIdx, Int InterDir 381 #if NTT_FIX_UNCONSTRAINED_MVI 382 , Int iNumRefIdx 383 #endif 384 ) 385 { 386 PredMode predMode = MODE_INTRA; 387 TComMv cMv(0,0); 388 389 for ( Int i = 0; i < iNumPart; i++ ) 390 { 391 predMode = static_cast<PredMode>( pePredMode[ iPartAddr+i ] ); 392 #if NTT_FIX_UNCONSTRAINED_MVI 393 if( predMode==MODE_INTRA || m_piRefIdx[iPartAddr+i] >= iNumRefIdx ) 394 #else 395 if( predMode==MODE_INTRA ) 396 #endif 397 { 398 m_pcMv[iPartAddr+i] = cMv; 399 puhInterDir[iPartAddr+i] = InterDir; 400 m_piRefIdx[iPartAddr+i] = refIdx; 401 } 402 } 403 } 404 #endif 405 376 406 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComMotionInfo.h
r100 r213 43 43 #include "CommonDef.h" 44 44 #include "TComMv.h" 45 #if VSP_N 46 #include "TComSlice.h" 47 #endif 45 48 46 49 //! \ingroup TLibCommon … … 59 62 60 63 // ==================================================================================================================== 61 #if QC_MULTI_DIS_CAN 64 #if QC_MULTI_DIS_CAN_A0097 62 65 typedef struct _DisCand 63 66 { … … 94 97 Int getHor () const { return m_acMv.getHor(); } 95 98 Int getVer () const { return m_acMv.getVer(); } 99 #if QC_MRG_CANS_B0048 100 Bool operator== ( const TComMvField& rcMv ) const 101 { 102 return (m_acMv.getHor()==rcMv.getHor() && m_acMv.getVer()==rcMv.getVer() && m_iRefIdx == rcMv.getRefIdx()); 103 } 104 #endif 96 105 }; 97 106 … … 169 178 Void decreaseMvAccuracy( Int iPartAddr, Int iNumPart, Int iShift ); 170 179 #endif 180 181 #if MTK_UNCONSTRAINED_MVI_B0083 182 Void setUndefinedMv( Int iPartAddr, Int iNumPart, Char* pePredMode, UChar* puhInterDir, Int refIdx, Int InterDir 183 #if NTT_FIX_UNCONSTRAINED_MVI 184 , Int iNumRefIdx 185 #endif 186 ); 187 #endif 171 188 }; 172 189 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComMv.h
r100 r213 57 57 public: 58 58 59 #if LGE_DVMCP 59 #if LGE_DVMCP_A0126 60 60 Bool m_bDvMcp; // is dv-mcp ? 61 61 Int m_iDvMcpDispX; // disparity for dv-mcp … … 69 69 m_iHor(0), 70 70 m_iVer(0) 71 #if LGE_DVMCP 71 #if LGE_DVMCP_A0126 72 72 , m_bDvMcp(false) 73 73 , m_iDvMcpDispX(0) … … 79 79 m_iHor(iHor), 80 80 m_iVer(iVer) 81 #if LGE_DVMCP 81 #if LGE_DVMCP_A0126 82 82 , m_bDvMcp(false) 83 83 , m_iDvMcpDispX(0) -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPattern.cpp
r100 r213 675 675 { 676 676 Int* piSrc; 677 #if LGE_EDGE_INTRA 677 #if LGE_EDGE_INTRA_A0070 678 678 mapEdgeIntratoDC( uiDirMode ); 679 679 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPattern.h
r56 r213 111 111 TComPatternParam m_cPatternCr; 112 112 113 #if LGE_ILLUCOMP_B0045 114 Bool m_bICFlag; 115 #endif 116 113 117 #if LOGI_INTRA_NAME_3MPM 114 118 static const UChar m_aucIntraFilter[5]; … … 124 128 Int getROIYHeight() { return m_cPatternY.m_iROIHeight; } 125 129 Int getPatternLStride() { return m_cPatternY.m_iPatternStride; } 130 131 #if LGE_ILLUCOMP_B0045 132 Bool getICFlag() { return m_bICFlag; } 133 Void setICFlag(Bool bICFlag) { m_bICFlag = bICFlag; } 134 #endif 126 135 127 136 // access functions of ADI buffers -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPic.cpp
r193 r213 56 56 m_apcPicYuvAvail = NULL; 57 57 m_apcPicYuvSynth = NULL; 58 m_bIsVsp = false; 58 59 #endif 59 60 #if DEPTH_MAP_GENERATION … … 85 86 m_aaiCodedScale = 0; 86 87 m_aaiCodedOffset = 0; 88 #if OL_QTLIMIT_PREDCODING_B0068 89 m_bReduceBitsQTL = 0; 90 #endif 91 #if QC_SIMPLE_NBDV_B0047 92 m_bRapCheck = false; 93 m_eRapRefList = REF_PIC_LIST_0; 94 m_uiRapRefIdx = 0; 95 #endif 96 87 97 } 88 98 … … 484 494 } 485 495 } 496 #if QC_SIMPLE_NBDV_B0047 497 Bool TComPic::getDisCandRefPictures(Int iColPOC) 498 { 499 UInt uiTempLayerCurr=7; 500 TComSlice* currSlice = getCurrSlice(); 501 UInt iPOCCurr=currSlice->getPOC(); 502 UInt iPOCDiff = 255; 503 Bool bRAP=false; 504 Bool bCheck = false; 505 Int MaxRef = currSlice->getNumRefIdx(RefPicList(0)); 506 RefPicList eRefPicList = REF_PIC_LIST_0 ; 507 if(currSlice->isInterB()) 508 { 509 if(currSlice->getNumRefIdx(RefPicList(0))< currSlice->getNumRefIdx(RefPicList(1))) 510 MaxRef = currSlice->getNumRefIdx(RefPicList(1)); 511 } 512 for(Int lpRef = 0; lpRef < MaxRef; lpRef++) 513 { 514 for(Int lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr ++) 515 { 516 eRefPicList = RefPicList(0); 517 if(currSlice->isInterB()) 518 eRefPicList = RefPicList(lpNr==0 ? (currSlice->getColDir()): (1-currSlice->getColDir())); 519 if(iColPOC == currSlice->getRefPOC(eRefPicList, lpRef)) 520 continue; 521 if(lpRef >= currSlice->getNumRefIdx(eRefPicList)||(currSlice->getViewId() != currSlice->getRefPic( eRefPicList, lpRef)->getViewId())) 522 continue; 523 Int iTempPoc = currSlice->getRefPic(eRefPicList, lpRef)->getPOC(); 524 UInt uiTempLayer = currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getTLayer(); 525 Int iTempDiff = (iTempPoc > iPOCCurr) ? (iTempPoc - iPOCCurr): (iPOCCurr - iTempPoc); 526 #if QC_REM_IDV_B0046 527 TComSlice* refSlice = currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice(); 528 bRAP = (refSlice->getSPS()->getViewId() && (refSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || refSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))? 1: 0; 529 #else 530 bRAP = (currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV? 1:0); 531 #endif 532 if( bRAP) 533 { 534 bCheck = true; 535 this->setRapRefIdx(lpRef); 536 this->setRapRefList(eRefPicList); 537 return bCheck; 538 } 539 if(uiTempLayerCurr > uiTempLayer) 540 { 541 bCheck = true; 542 if(uiTempLayerCurr == uiTempLayer) 543 { 544 if(iPOCDiff > iTempDiff) 545 { 546 iPOCDiff=iTempDiff; 547 if(iPOCDiff < 255) 548 { 549 this->setRapRefIdx(lpRef); 550 this->setRapRefList(eRefPicList); 551 } 552 } 553 } 554 else 555 { 556 iPOCDiff=iTempDiff; 557 uiTempLayerCurr = uiTempLayer; 558 this->setRapRefIdx(lpRef); 559 this->setRapRefList(eRefPicList); 560 } 561 } 562 } 563 } 564 return bCheck; 565 } 566 #endif 486 567 487 568 #if HHI_INTERVIEW_SKIP -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPic.h
r193 r213 68 68 TComPicYuv* m_apcPicYuvAvail; // Availability Map - Does the given pixel can be synthesised in receiver 69 69 TComPicYuv* m_apcPicYuvSynth; // Sythesied image 70 Bool m_bIsVsp; 70 71 #endif 71 72 … … 78 79 #endif 79 80 80 #if LG_ZEROINTRADEPTHRESI_ M2603981 #if LG_ZEROINTRADEPTHRESI_A0087 81 82 Int m_uiIntraPeriod; 82 83 #endif … … 84 85 #if HHI_INTER_VIEW_MOTION_PRED 85 86 TComPicYuv* m_pcOrgDepthMap; // original depth map 86 #if QC_MULTI_DIS_CAN 87 #if QC_MULTI_DIS_CAN_A0097 87 88 Bool m_checked; 89 #endif 90 #if QC_SIMPLE_NBDV_B0047 91 UInt m_uiRapRefIdx; 92 RefPicList m_eRapRefList; 93 Bool m_bRapCheck; 88 94 #endif 89 95 #endif … … 112 118 TComPicYuv* m_pcUsedPelsMap; 113 119 #endif 114 #if SONY_COLPIC_AVAILABILITY 120 #if SONY_COLPIC_AVAILABILITY || VSP_N 115 121 Int m_iViewOrderIdx; 116 122 #endif … … 118 124 Int** m_aaiCodedOffset; 119 125 120 #if OL_DEPTHLIMIT_A0044 121 UInt* m_texPartInfo; 122 UInt m_uiTexPartIndex; 126 #if OL_QTLIMIT_PREDCODING_B0068 127 Bool m_bReduceBitsQTL; 123 128 #endif 124 129 … … 141 146 TComSlice* getSlice(Int i) { return m_apcPicSym->getSlice(i); } 142 147 TComSlice* getCurrSlice() { return m_apcPicSym->getSlice(m_uiCurrSliceIdx); } 143 #if VIDYO_VPS_INTEGRATION 148 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 144 149 TComVPS* getVPS() { return m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getVPS(); } 145 150 #endif 146 #if LG_ZEROINTRADEPTHRESI_ M26039151 #if LG_ZEROINTRADEPTHRESI_A0087 147 152 Int getIntraPeriod() { return m_uiIntraPeriod; } 148 153 Void setIntraPeriod(Int uiIntraPeriod) { m_uiIntraPeriod = uiIntraPeriod; } … … 161 166 TComPicYuv* getPicYuvSynth() { return m_apcPicYuvSynth; } 162 167 Void checkSynthesisAvailability( /*TComDataCU*& rpcBestCU, */UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied); 168 Void setIsVsp( Bool b ) { m_bIsVsp = b; } 169 Bool getIsVsp() { return m_bIsVsp; } 163 170 #endif 164 171 #if HHI_INTERVIEW_SKIP … … 177 184 #if HHI_INTER_VIEW_MOTION_PRED 178 185 TComPicYuv* getOrgDepthMap() { return m_pcOrgDepthMap; } 179 #if QC_MULTI_DIS_CAN 186 #if QC_MULTI_DIS_CAN_A0097 180 187 Void setCandPicCheckedFlag (Bool bchecked) { m_checked = bchecked; } 181 188 Bool getCandPicCheckedFlag () { return m_checked;} … … 186 193 TComPicYuv* getResidual() { return m_pcResidual; } 187 194 #endif 188 189 #if SONY_COLPIC_AVAILABILITY 195 #if QC_SIMPLE_NBDV_B0047 196 UInt getRapRefIdx() {return m_uiRapRefIdx;} 197 RefPicList getRapRefList() {return m_eRapRefList;} 198 Void setRapRefIdx(UInt uiRapRefIdx) {m_uiRapRefIdx = uiRapRefIdx;} 199 Void setRapRefList(RefPicList eRefPicList) {m_eRapRefList = eRefPicList;} 200 Bool getRapbCheck() {return m_bRapCheck;} 201 Void setRapbCheck(Bool bCheck) {m_bRapCheck = bCheck;} 202 Bool getDisCandRefPictures(Int iColPOC); 203 #endif 204 205 #if SONY_COLPIC_AVAILABILITY || VSP_N 190 206 Void setViewOrderIdx(Int i) { m_iViewOrderIdx = i; } 191 207 Int getViewOrderIdx() { return m_iViewOrderIdx; } 192 208 #endif 209 210 #if OL_QTLIMIT_PREDCODING_B0068 211 Bool getReduceBitsFlag () { return m_bReduceBitsQTL; } 212 Void setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag; } 213 #endif 214 193 215 Void setScaleOffset( Int** pS, Int** pO ) { m_aaiCodedScale = pS; m_aaiCodedOffset = pO; } 194 216 Int** getCodedScale () { return m_aaiCodedScale; } … … 261 283 #endif 262 284 263 #if OL_DEPTHLIMIT_A0044264 UInt accessPartInfo ( UInt count ) { return m_texPartInfo[m_uiTexPartIndex + count]; };265 Void incrementTexPartIndex ( ) { m_uiTexPartIndex += 2; };266 UInt getTexPartIndex () { return m_uiTexPartIndex; };267 Void setTexPartIndex ( UInt idx ) { m_uiTexPartIndex = idx; };268 Void setPartInfo ( UInt* texPart) { m_texPartInfo = texPart; };269 #endif270 271 285 Bool getValidSlice (Int sliceID) {return m_pbValidSlice[sliceID];} 272 286 Int getSliceGranularityForNDBFilter () {return m_sliceGranularityForNDBFilter;} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPicSym.cpp
r193 r213 127 127 128 128 129 #if FIX_MEM_LEAKS130 129 if( m_apcTComTile ) 131 130 { … … 135 134 } 136 135 } 137 #endif138 136 139 137 delete [] m_apcTComTile; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r100 r213 46 46 // ==================================================================================================================== 47 47 48 #if LGE_EDGE_INTRA 48 #if LGE_EDGE_INTRA_A0070 49 49 #define MAX_DISTANCE_EDGEINTRA 255 50 50 #endif … … 423 423 } 424 424 425 #if LGE_EDGE_INTRA 425 #if LGE_EDGE_INTRA_A0070 426 426 Void TComPrediction::predIntraLumaEdge ( TComDataCU* pcCU, TComPattern* pcTComPattern, UInt uiAbsPartIdx, Int iWidth, Int iHeight, Pel* piPred, UInt uiStride, Bool bDelta ) 427 427 { … … 628 628 if ( eRefPicList != REF_PIC_LIST_X ) 629 629 { 630 #if LGE_ILLUCOMP_B0045 631 if( pcCU->getSlice()->getPPS()->getUseWP() && !pcCU->getICFlag(uiPartAddr)) 632 #else 630 633 if( pcCU->getSlice()->getPPS()->getUseWP()) 634 #endif 631 635 { 632 636 #if DEPTH_MAP_GENERATION … … 644 648 #endif 645 649 } 650 #if LGE_ILLUCOMP_B0045 651 if( pcCU->getSlice()->getPPS()->getUseWP() && !pcCU->getICFlag(uiPartAddr) ) 652 #else 646 653 if ( pcCU->getSlice()->getPPS()->getUseWP() ) 654 #endif 647 655 { 648 656 xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx ); … … 689 697 if ( eRefPicList != REF_PIC_LIST_X ) 690 698 { 699 #if LGE_ILLUCOMP_B0045 700 if( pcCU->getSlice()->getPPS()->getUseWP() && !pcCU->getICFlag(uiPartAddr)) 701 #else 691 702 if( pcCU->getSlice()->getPPS()->getUseWP()) 703 #endif 692 704 { 693 705 #if DEPTH_MAP_GENERATION … … 710 722 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false ); 711 723 #endif 724 #if LGE_ILLUCOMP_B0045 725 if( pcCU->getSlice()->getPPS()->getUseWP() && !pcCU->getICFlag(uiPartAddr)) 726 #else 712 727 if ( pcCU->getSlice()->getPPS()->getUseWP() ) 728 #endif 713 729 { 714 730 xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx ); … … 779 795 { 780 796 #endif 797 #if LGE_ILLUCOMP_B0045 798 #if VSP_AIC 799 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefPOC( eRefPicList, iRefIdx ) == pcCU->getSlice()->getPOC()); 800 #else 801 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefViewId( eRefPicList, iRefIdx ) != pcCU->getSlice()->getViewId()); 802 #endif 803 804 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, bICFlag); 805 #else 781 806 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi ); 807 #endif 782 808 #if HHI_FULL_PEL_DEPTH_MAP_MV_ACC 783 809 } 784 810 #endif 811 #if LGE_ILLUCOMP_B0045 812 #if VSP_AIC 813 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefPOC( eRefPicList, iRefIdx ) == pcCU->getSlice()->getPOC()); 814 #else 815 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefViewId( eRefPicList, iRefIdx ) != pcCU->getSlice()->getViewId()); 816 #endif 817 818 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, bICFlag ); 819 #else 785 820 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi ); 821 #endif 786 822 } 787 823 … … 896 932 } 897 933 #endif 934 #if !QC_MVHEVC_B0046 898 935 Int ixFrac = iHor & 0x3; 899 936 Int iyFrac = iVer & 0x3; 937 #endif 900 938 Int iRefOffset = ( iHor >> 2 ) + ( iVer >> 2 ) * iRefStride; 901 939 #endif … … 926 964 * \param bi Flag indicating whether bipred is used 927 965 */ 966 #if LGE_ILLUCOMP_B0045 967 Void TComPrediction::xPredInterLumaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag) 968 #else 928 969 Void TComPrediction::xPredInterLumaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ) 970 #endif 929 971 { 930 972 Int refStride = refPic->getStride(); … … 961 1003 m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height, yFrac, false, !bi); 962 1004 } 1005 1006 #if LGE_ILLUCOMP_B0045 1007 if(bICFlag) 1008 { 1009 Int a, b, iShift, i, j; 1010 1011 xGetLLSICPrediction(cu, mv, refPic, a, b, iShift); 1012 1013 for (i = 0; i < height; i++) 1014 { 1015 for (j = 0; j < width; j++) 1016 { 1017 if(bi) 1018 { 1019 Int iIFshift = IF_INTERNAL_PREC - ( g_uiBitDepth + g_uiBitIncrement ); 1020 dst[j] = ( (a*dst[j]+a*IF_INTERNAL_OFFS) >> iShift ) + b*(1<<iIFshift) - IF_INTERNAL_OFFS; 1021 } 1022 else 1023 dst[j] = Clip( ( (a*dst[j]) >> iShift ) + b ); 1024 } 1025 dst += dstStride; 1026 } 1027 } 1028 #endif 963 1029 } 964 1030 … … 975 1041 * \param bi Flag indicating whether bipred is used 976 1042 */ 1043 #if LGE_ILLUCOMP_B0045 1044 Void TComPrediction::xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag ) 1045 #else 977 1046 Void TComPrediction::xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ) 1047 #endif 978 1048 { 979 1049 Int refStride = refPic->getCStride(); … … 1018 1088 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight , yFrac, false, !bi); 1019 1089 } 1090 #if LGE_ILLUCOMP_B0045 1091 if(bICFlag) 1092 { 1093 Int a, b, iShift, i, j; 1094 xGetLLSICPredictionChroma(cu, mv, refPic, a, b, iShift, 0); // Cb 1095 for (i = 0; i < cxHeight; i++) 1096 { 1097 for (j = 0; j < cxWidth; j++) 1098 { 1099 if(bi) 1100 { 1101 Int iIFshift = IF_INTERNAL_PREC - ( g_uiBitDepth + g_uiBitIncrement ); 1102 dstCb[j] = ( (a*dstCb[j]+a*IF_INTERNAL_OFFS) >> iShift ) + b*(1<<iIFshift) - IF_INTERNAL_OFFS; 1103 } 1104 else 1105 dstCb[j] = Clip3(0, 255, ((a*dstCb[j])>>iShift)+b); 1106 } 1107 dstCb += dstStride; 1108 } 1109 1110 xGetLLSICPredictionChroma(cu, mv, refPic, a, b, iShift, 1); // Cr 1111 for (i = 0; i < cxHeight; i++) 1112 { 1113 for (j = 0; j < cxWidth; j++) 1114 { 1115 if(bi) 1116 { 1117 Int iIFshift = IF_INTERNAL_PREC - ( g_uiBitDepth + g_uiBitIncrement ); 1118 dstCr[j] = ( (a*dstCr[j]+a*IF_INTERNAL_OFFS) >> iShift ) + b*(1<<iIFshift) - IF_INTERNAL_OFFS; 1119 } 1120 else 1121 dstCr[j] = Clip3(0, 255, ((a*dstCr[j])>>iShift)+b); 1122 } 1123 dstCr += dstStride; 1124 } 1125 } 1126 #endif 1020 1127 } 1021 1128 … … 1443 1550 } 1444 1551 1552 1553 #if LGE_ILLUCOMP_B0045 1554 /** Function for deriving LM illumination compensation. 1555 */ 1556 Void TComPrediction::xGetLLSICPrediction(TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift) 1557 { 1558 TComPicYuv *pRecPic = pcCU->getPic()->getPicYuvRec(); 1559 Pel *pRec, *pRef; 1560 UInt uiWidth, uiHeight, uiTmpPartIdx; 1561 Int iRecStride = pRecPic->getStride(), iRefStride = pRefPic->getStride(); 1562 Int iCUPelX, iCUPelY, iRefX, iRefY, iRefOffset; 1563 1564 iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1565 iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1566 iRefX = iCUPelX + (pMv->getHor() >> 2); 1567 iRefY = iCUPelY + (pMv->getVer() >> 2); 1568 uiWidth = pcCU->getWidth(0); 1569 uiHeight = pcCU->getHeight(0); 1570 1571 Int i, j, iCountShift = 0; 1572 1573 // LLS parameters estimation --> 1574 1575 Int x = 0, y = 0, xx = 0, xy = 0; 1576 1577 if(pcCU->getPUAbove(uiTmpPartIdx, pcCU->getZorderIdxInCU()) && iCUPelY > 0 && iRefY > 0) 1578 { 1579 iRefOffset = ( pMv->getHor() >> 2 ) + ( pMv->getVer() >> 2 ) * iRefStride - iRefStride; 1580 pRef = pRefPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1581 pRec = pRecPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - iRecStride; 1582 1583 for( j = 0; j < uiWidth; j++ ) 1584 { 1585 x += pRef[j]; 1586 y += pRec[j]; 1587 xx += pRef[j] * pRef[j]; 1588 xy += pRef[j] * pRec[j]; 1589 } 1590 iCountShift += g_aucConvertToBit[ uiWidth ] + 2; 1591 } 1592 1593 1594 if(pcCU->getPULeft(uiTmpPartIdx, pcCU->getZorderIdxInCU()) && iCUPelX > 0 && iRefX > 0) 1595 { 1596 iRefOffset = ( pMv->getHor() >> 2 ) + ( pMv->getVer() >> 2 ) * iRefStride - 1; 1597 pRef = pRefPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1598 pRec = pRecPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - 1; 1599 1600 for( i = 0; i < uiHeight; i++ ) 1601 { 1602 x += pRef[0]; 1603 y += pRec[0]; 1604 xx += pRef[0] * pRef[0]; 1605 xy += pRef[0] * pRec[0]; 1606 1607 pRef += iRefStride; 1608 pRec += iRecStride; 1609 } 1610 iCountShift += iCountShift > 0 ? 1 : ( g_aucConvertToBit[ uiWidth ] + 2 ); 1611 } 1612 1613 Int iTempShift = ( g_uiBitDepth + g_uiBitIncrement ) + g_aucConvertToBit[ uiWidth ] + 3 - 15; 1614 1615 if(iTempShift > 0) 1616 { 1617 x = ( x + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1618 y = ( y + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1619 xx = ( xx + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1620 xy = ( xy + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1621 iCountShift -= iTempShift; 1622 } 1623 1624 iShift = 13; 1625 1626 if( iCountShift == 0 ) 1627 { 1628 a = 1; 1629 b = 0; 1630 iShift = 0; 1631 } 1632 else 1633 { 1634 Int a1 = ( xy << iCountShift ) - y * x; 1635 Int a2 = ( xx << iCountShift ) - x * x; 1636 1637 { 1638 const Int iShiftA2 = 6; 1639 const Int iShiftA1 = 15; 1640 const Int iAccuracyShift = 15; 1641 1642 Int iScaleShiftA2 = 0; 1643 Int iScaleShiftA1 = 0; 1644 Int a1s = a1; 1645 Int a2s = a2; 1646 1647 iScaleShiftA1 = GetMSB( abs( a1 ) ) - iShiftA1; 1648 iScaleShiftA2 = GetMSB( abs( a2 ) ) - iShiftA2; 1649 1650 if( iScaleShiftA1 < 0 ) 1651 { 1652 iScaleShiftA1 = 0; 1653 } 1654 1655 if( iScaleShiftA2 < 0 ) 1656 { 1657 iScaleShiftA2 = 0; 1658 } 1659 1660 Int iScaleShiftA = iScaleShiftA2 + iAccuracyShift - iShift - iScaleShiftA1; 1661 1662 a2s = a2 >> iScaleShiftA2; 1663 1664 a1s = a1 >> iScaleShiftA1; 1665 1666 if (a2s >= 1) 1667 { 1668 a = a1s * m_uiaShift[ a2s - 1]; 1669 } 1670 else 1671 { 1672 a = 0; 1673 } 1674 1675 if( iScaleShiftA < 0 ) 1676 { 1677 a = a << -iScaleShiftA; 1678 } 1679 else 1680 { 1681 a = a >> iScaleShiftA; 1682 } 1683 1684 a = Clip3(-( 1 << 15 ), ( 1 << 15 ) - 1, a); 1685 1686 Int minA = -(1 << (6)); 1687 Int maxA = (1 << 6) - 1; 1688 if( a <= maxA && a >= minA ) 1689 { 1690 // do nothing 1691 } 1692 else 1693 { 1694 Short n = CountLeadingZerosOnes(a); 1695 a = a >> (9-n); 1696 iShift -= (9-n); 1697 } 1698 1699 b = ( y - ( ( a * x ) >> iShift ) + ( 1 << ( iCountShift - 1 ) ) ) >> iCountShift; 1700 } 1701 } 1702 } 1703 1704 Void TComPrediction::xGetLLSICPredictionChroma(TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift, Int iChromaId) 1705 { 1706 TComPicYuv *pRecPic = pcCU->getPic()->getPicYuvRec(); 1707 Pel *pRec = NULL, *pRef = NULL; 1708 UInt uiWidth, uiHeight, uiTmpPartIdx; 1709 Int iRecStride = pRecPic->getCStride(), iRefStride = pRefPic->getCStride(); 1710 Int iCUPelX, iCUPelY, iRefX, iRefY, iRefOffset; 1711 1712 iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1713 iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1714 iRefX = iCUPelX + (pMv->getHor() >> 3); 1715 iRefY = iCUPelY + (pMv->getVer() >> 3); 1716 uiWidth = pcCU->getWidth(0) >> 1; 1717 uiHeight = pcCU->getHeight(0) >> 1; 1718 1719 Int i, j, iCountShift = 0; 1720 1721 // LLS parameters estimation --> 1722 1723 Int x = 0, y = 0, xx = 0, xy = 0; 1724 1725 if(pcCU->getPUAbove(uiTmpPartIdx, pcCU->getZorderIdxInCU()) && iCUPelY > 0 && iRefY > 0) 1726 { 1727 iRefOffset = ( pMv->getHor() >> 3 ) + ( pMv->getVer() >> 3 ) * iRefStride - iRefStride; 1728 if (iChromaId == 0) // Cb 1729 { 1730 pRef = pRefPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1731 pRec = pRecPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - iRecStride; 1732 } 1733 else if (iChromaId == 1) // Cr 1734 { 1735 pRef = pRefPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1736 pRec = pRecPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - iRecStride; 1737 } 1738 1739 for( j = 0; j < uiWidth; j++ ) 1740 { 1741 x += pRef[j]; 1742 y += pRec[j]; 1743 xx += pRef[j] * pRef[j]; 1744 xy += pRef[j] * pRec[j]; 1745 } 1746 iCountShift += g_aucConvertToBit[ uiWidth ] + 2; 1747 } 1748 1749 1750 if(pcCU->getPULeft(uiTmpPartIdx, pcCU->getZorderIdxInCU()) && iCUPelX > 0 && iRefX > 0) 1751 { 1752 iRefOffset = ( pMv->getHor() >> 3 ) + ( pMv->getVer() >> 3 ) * iRefStride - 1; 1753 if (iChromaId == 0) // Cb 1754 { 1755 pRef = pRefPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1756 pRec = pRecPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - 1; 1757 } 1758 else if (iChromaId == 1) // Cr 1759 { 1760 pRef = pRefPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1761 pRec = pRecPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - 1; 1762 } 1763 1764 for( i = 0; i < uiHeight; i++ ) 1765 { 1766 x += pRef[0]; 1767 y += pRec[0]; 1768 xx += pRef[0] * pRef[0]; 1769 xy += pRef[0] * pRec[0]; 1770 1771 pRef += iRefStride; 1772 pRec += iRecStride; 1773 } 1774 iCountShift += iCountShift > 0 ? 1 : ( g_aucConvertToBit[ uiWidth ] + 2 ); 1775 } 1776 1777 Int iTempShift = ( g_uiBitDepth + g_uiBitIncrement ) + g_aucConvertToBit[ uiWidth ] + 3 - 15; 1778 1779 if(iTempShift > 0) 1780 { 1781 x = ( x + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1782 y = ( y + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1783 xx = ( xx + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1784 xy = ( xy + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1785 iCountShift -= iTempShift; 1786 } 1787 1788 iShift = 13; 1789 1790 if( iCountShift == 0 ) 1791 { 1792 a = 1; 1793 b = 0; 1794 iShift = 0; 1795 } 1796 else 1797 { 1798 Int a1 = ( xy << iCountShift ) - y * x; 1799 Int a2 = ( xx << iCountShift ) - x * x; 1800 1801 { 1802 const Int iShiftA2 = 6; 1803 const Int iShiftA1 = 15; 1804 const Int iAccuracyShift = 15; 1805 1806 Int iScaleShiftA2 = 0; 1807 Int iScaleShiftA1 = 0; 1808 Int a1s = a1; 1809 Int a2s = a2; 1810 1811 iScaleShiftA1 = GetMSB( abs( a1 ) ) - iShiftA1; 1812 iScaleShiftA2 = GetMSB( abs( a2 ) ) - iShiftA2; 1813 1814 if( iScaleShiftA1 < 0 ) 1815 { 1816 iScaleShiftA1 = 0; 1817 } 1818 1819 if( iScaleShiftA2 < 0 ) 1820 { 1821 iScaleShiftA2 = 0; 1822 } 1823 1824 Int iScaleShiftA = iScaleShiftA2 + iAccuracyShift - iShift - iScaleShiftA1; 1825 1826 a2s = a2 >> iScaleShiftA2; 1827 1828 a1s = a1 >> iScaleShiftA1; 1829 1830 if (a2s >= 1) 1831 { 1832 a = a1s * m_uiaShift[ a2s - 1]; 1833 } 1834 else 1835 { 1836 a = 0; 1837 } 1838 1839 if( iScaleShiftA < 0 ) 1840 { 1841 a = a << -iScaleShiftA; 1842 } 1843 else 1844 { 1845 a = a >> iScaleShiftA; 1846 } 1847 1848 a = Clip3(-( 1 << 15 ), ( 1 << 15 ) - 1, a); 1849 1850 Int minA = -(1 << (6)); 1851 Int maxA = (1 << 6) - 1; 1852 if( a <= maxA && a >= minA ) 1853 { 1854 // do nothing 1855 } 1856 else 1857 { 1858 Short n = CountLeadingZerosOnes(a); 1859 a = a >> (9-n); 1860 iShift -= (9-n); 1861 } 1862 1863 b = ( y - ( ( a * x ) >> iShift ) + ( 1 << ( iCountShift - 1 ) ) ) >> iCountShift; 1864 } 1865 } 1866 } 1867 #endif 1445 1868 /** Function for filtering intra DC predictor. 1446 1869 * \param pSrc pointer to reconstructed sample array … … 1704 2127 { 1705 2128 assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE ); 1706 WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];1707 2129 1708 2130 // get copy of co-located texture luma block … … 1723 2145 UInt uiPredStride = cPredYuv.getStride(); 1724 2146 1725 // regularwedge search2147 // wedge search 1726 2148 TComWedgeDist cWedgeDist; 1727 2149 UInt uiBestDist = MAX_UINT; … … 1729 2151 Int iDC1 = 0; 1730 2152 Int iDC2 = 0; 1731 2153 WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])]; 2154 2155 #if HHIQC_DMMFASTSEARCH_B0039 2156 TComPic* pcPicTex = pcCU->getSlice()->getTexturePic(); 2157 TComDataCU* pcColTexCU = pcPicTex->getCU(pcCU->getAddr()); 2158 UInt uiTexPartIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 2159 Int uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255; 2160 2161 std::vector< std::vector<UInt> > pauiWdgLstSz = g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]]; 2162 if( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 ) 2163 { 2164 std::vector<UInt>* pauiWdgLst = &pauiWdgLstSz[uiColTexIntraDir-2]; 2165 for( UInt uiIdxW = 0; uiIdxW < pauiWdgLst->size(); uiIdxW++ ) 2166 { 2167 UInt uiIdx = pauiWdgLst->at(uiIdxW); 2168 calcWedgeDCs ( &(pacWedgeList->at(uiIdx)), piRefBlkY, uiWidth, iDC1, iDC2 ); 2169 assignWedgeDCs2Pred( &(pacWedgeList->at(uiIdx)), piPred, uiPredStride, iDC1, iDC2 ); 2170 2171 UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD ); 2172 2173 if( uiActDist < uiBestDist || uiBestDist == MAX_UINT ) 2174 { 2175 uiBestDist = uiActDist; 2176 uiBestTabIdx = uiIdx; 2177 } 2178 } 2179 } 2180 else 2181 { 2182 WedgeNodeList* pacWedgeNodeList = &g_aacWedgeNodeLists[(g_aucConvertToBit[uiWidth])]; 2183 UInt uiBestNodeDist = MAX_UINT; 2184 UInt uiBestNodeId = 0; 2185 for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ ) 2186 { 2187 calcWedgeDCs ( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piRefBlkY, uiWidth, iDC1, iDC2 ); 2188 assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piPred, uiPredStride, iDC1, iDC2 ); 2189 2190 UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD ); 2191 2192 if( uiActDist < uiBestNodeDist || uiBestNodeDist == MAX_UINT ) 2193 { 2194 uiBestNodeDist = uiActDist; 2195 uiBestNodeId = uiNodeId; 2196 } 2197 } 2198 2199 // refinement 2200 uiBestDist = uiBestNodeDist; 2201 uiBestTabIdx = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx(); 2202 for( UInt uiRefId = 0; uiRefId < NUM_WEDGE_REFINES; uiRefId++ ) 2203 { 2204 if( pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ) != NO_IDX ) 2205 { 2206 calcWedgeDCs ( &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ))), piRefBlkY, uiWidth, iDC1, iDC2 ); 2207 assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ))), piPred, uiPredStride, iDC1, iDC2 ); 2208 2209 UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD ); 2210 2211 if( uiActDist < uiBestDist || uiBestDist == MAX_UINT ) 2212 { 2213 uiBestDist = uiActDist; 2214 uiBestTabIdx = pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ); 2215 } 2216 } 2217 } 2218 } 2219 #else 1732 2220 for( UInt uiIdx = 0; uiIdx < pacWedgeList->size(); uiIdx++ ) 1733 2221 { … … 1743 2231 } 1744 2232 } 2233 #endif 1745 2234 1746 2235 cPredYuv.destroy(); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPrediction.h
r193 r213 100 100 #endif 101 101 102 #if LGE_ILLUCOMP_B0045 103 Void xPredInterLumaBlk ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag = false ); 104 Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag = false ); 105 #else 102 106 Void xPredInterLumaBlk ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ); 103 107 Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ); 108 #endif 104 109 Void xWeightedAverage ( TComDataCU* pcCU, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst ); 105 110 106 111 Void xGetLLSPrediction ( TComPattern* pcPattern, Int* pSrc0, Int iSrcStride, Pel* pDst0, Int iDstStride, UInt uiWidth, UInt uiHeight, UInt uiExt0 ); 107 112 #if LGE_ILLUCOMP_B0045 113 Void xGetLLSICPrediction(TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift); 114 Void xGetLLSICPredictionChroma(TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift, Int iChromaId); 115 #endif 108 116 Void xDCPredFiltering( Int* pSrc, Int iSrcStride, Pel*& rpDst, Int iDstStride, Int iWidth, Int iHeight ); 109 117 Bool xCheckIdenticalMotion ( TComDataCU* pcCU, UInt PartAddr); … … 125 133 #endif 126 134 127 #if LGE_EDGE_INTRA 135 #if LGE_EDGE_INTRA_A0070 128 136 Pel xGetNearestNeighbor ( Int x, Int y, Int* pSrc, Int srcStride, Int iWidth, Int iHeight, Bool* bpRegion ); 129 137 Void xPredIntraEdge ( TComDataCU* pcCU, UInt uiAbsPartIdx, Int iWidth, Int iHeight, Int* pSrc, Int srcStride, Pel*& rpDst, Int dstStride, Bool bDelta = false ); … … 142 150 Void motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 ); 143 151 #endif 144 152 145 153 // motion vector prediction 146 154 Void getMvPredAMVP ( TComDataCU* pcCU, UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMvPred ); … … 175 183 Bool getWedgePatternIdx ( WedgeRefList* pcWedgeRefList, UInt& ruiTabIdx, UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe ); 176 184 #endif 177 #if LGE_EDGE_INTRA 185 #if LGE_EDGE_INTRA_A0070 178 186 Void predIntraLumaEdge ( TComDataCU* pcCU, TComPattern* pcTComPattern, UInt uiAbsPartIdx, Int iWidth, Int iHeight, Pel* piPred, UInt uiStride, Bool bDelta = false ); 179 187 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRdCost.cpp
r100 r213 543 543 cDtParam.uiComp = 255; // just for assert: to be sure it was set before use, since only values 0,1 or 2 are allowed. 544 544 #endif 545 #if LGE_ILLUCOMP_B0045 546 cDtParam.bUseIC = false; 547 #endif 545 548 return cDtParam.DistFunc( &cDtParam ); 546 549 } … … 565 568 566 569 #if WEIGHTED_CHROMA_DISTORTION 570 #if LGE_ILLUCOMP_B0045 571 cDtParam.bUseIC = false; 572 #endif 567 573 if (bWeighted) 568 574 { … … 598 604 cDtParam.uiComp = 255; // just for assert: to be sure it was set before use, since only values 0,1 or 2 are allowed. 599 605 606 #if LGE_ILLUCOMP_B0045 607 cDtParam.bUseIC = false; 608 #endif 600 609 return cDtParam.DistFunc( &cDtParam ); 601 610 } 602 611 #endif 603 612 604 605 // ====================================================================================================================606 // Distortion functions607 // ====================================================================================================================608 609 // --------------------------------------------------------------------------------------------------------------------610 // SAD611 // --------------------------------------------------------------------------------------------------------------------612 613 613 UInt TComRdCost::xGetSAD( DistParam* pcDtParam ) 614 614 { … … 617 617 return xGetSADw( pcDtParam ); 618 618 } 619 #if LGE_ILLUCOMP_B0045 620 if(pcDtParam->bUseIC) 621 { 622 return xGetSADic( pcDtParam ); 623 } 624 #endif 619 625 Pel* piOrg = pcDtParam->pOrg; 620 626 Pel* piCur = pcDtParam->pCur; … … 623 629 Int iStrideCur = pcDtParam->iStrideCur; 624 630 Int iStrideOrg = pcDtParam->iStrideOrg; 625 626 UInt uiSum = 0; 627 631 632 UInt uiSum = 0; 633 628 634 for( ; iRows != 0; iRows-- ) 629 635 { … … 635 641 piCur += iStrideCur; 636 642 } 637 643 638 644 return ( uiSum >> g_uiBitIncrement ); 639 645 } … … 645 651 return xGetSADw( pcDtParam ); 646 652 } 653 #if LGE_ILLUCOMP_B0045 654 if(pcDtParam->bUseIC) 655 { 656 return xGetSAD4ic( pcDtParam ); 657 } 658 #endif 647 659 Pel* piOrg = pcDtParam->pOrg; 648 660 Pel* piCur = pcDtParam->pCur; … … 652 664 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 653 665 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 654 655 UInt uiSum = 0; 656 666 667 UInt uiSum = 0; 668 657 669 for( ; iRows != 0; iRows-=iSubStep ) 658 670 { … … 661 673 uiSum += abs( piOrg[2] - piCur[2] ); 662 674 uiSum += abs( piOrg[3] - piCur[3] ); 663 664 piOrg += iStrideOrg; 665 piCur += iStrideCur; 666 } 667 675 676 piOrg += iStrideOrg; 677 piCur += iStrideCur; 678 } 679 668 680 uiSum <<= iSubShift; 669 681 return ( uiSum >> g_uiBitIncrement ); … … 676 688 return xGetSADw( pcDtParam ); 677 689 } 690 #if LGE_ILLUCOMP_B0045 691 if(pcDtParam->bUseIC) 692 { 693 return xGetSAD8ic( pcDtParam ); 694 } 695 #endif 678 696 Pel* piOrg = pcDtParam->pOrg; 679 697 Pel* piCur = pcDtParam->pCur; … … 683 701 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 684 702 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 685 686 UInt uiSum = 0; 687 703 704 UInt uiSum = 0; 705 688 706 for( ; iRows != 0; iRows-=iSubStep ) 689 707 { … … 696 714 uiSum += abs( piOrg[6] - piCur[6] ); 697 715 uiSum += abs( piOrg[7] - piCur[7] ); 698 699 piOrg += iStrideOrg; 700 piCur += iStrideCur; 701 } 702 716 717 piOrg += iStrideOrg; 718 piCur += iStrideCur; 719 } 720 703 721 uiSum <<= iSubShift; 704 722 return ( uiSum >> g_uiBitIncrement ); … … 711 729 return xGetSADw( pcDtParam ); 712 730 } 731 #if LGE_ILLUCOMP_B0045 732 if(pcDtParam->bUseIC) 733 { 734 return xGetSAD16ic( pcDtParam ); 735 } 736 #endif 713 737 Pel* piOrg = pcDtParam->pOrg; 714 738 Pel* piCur = pcDtParam->pCur; … … 718 742 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 719 743 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 720 721 UInt uiSum = 0; 722 744 745 UInt uiSum = 0; 746 723 747 for( ; iRows != 0; iRows-=iSubStep ) 724 748 { … … 739 763 uiSum += abs( piOrg[14] - piCur[14] ); 740 764 uiSum += abs( piOrg[15] - piCur[15] ); 741 742 piOrg += iStrideOrg; 743 piCur += iStrideCur; 744 } 745 765 766 piOrg += iStrideOrg; 767 piCur += iStrideCur; 768 } 769 746 770 uiSum <<= iSubShift; 747 771 return ( uiSum >> g_uiBitIncrement ); … … 755 779 return xGetSADw( pcDtParam ); 756 780 } 781 #if LGE_ILLUCOMP_B0045 782 if(pcDtParam->bUseIC) 783 { 784 return xGetSAD12ic( pcDtParam ); 785 } 786 #endif 757 787 Pel* piOrg = pcDtParam->pOrg; 758 788 Pel* piCur = pcDtParam->pCur; … … 762 792 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 763 793 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 764 765 UInt uiSum = 0; 766 794 795 UInt uiSum = 0; 796 767 797 for( ; iRows != 0; iRows-=iSubStep ) 768 798 { … … 779 809 uiSum += abs( piOrg[10] - piCur[10] ); 780 810 uiSum += abs( piOrg[11] - piCur[11] ); 781 782 piOrg += iStrideOrg; 783 piCur += iStrideCur; 784 } 785 811 812 piOrg += iStrideOrg; 813 piCur += iStrideCur; 814 } 815 786 816 uiSum <<= iSubShift; 787 817 return ( uiSum >> g_uiBitIncrement ); … … 791 821 UInt TComRdCost::xGetSAD16N( DistParam* pcDtParam ) 792 822 { 823 #if LGE_ILLUCOMP_B0045 824 if(pcDtParam->bUseIC) 825 { 826 return xGetSAD16Nic( pcDtParam ); 827 } 828 #endif 793 829 Pel* piOrg = pcDtParam->pOrg; 794 830 Pel* piCur = pcDtParam->pCur; … … 799 835 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 800 836 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 801 802 UInt uiSum = 0; 803 837 838 UInt uiSum = 0; 839 804 840 for( ; iRows != 0; iRows-=iSubStep ) 805 841 { … … 826 862 piCur += iStrideCur; 827 863 } 828 864 829 865 uiSum <<= iSubShift; 830 866 return ( uiSum >> g_uiBitIncrement ); … … 837 873 return xGetSADw( pcDtParam ); 838 874 } 875 #if LGE_ILLUCOMP_B0045 876 if(pcDtParam->bUseIC) 877 { 878 return xGetSAD32ic( pcDtParam ); 879 } 880 #endif 839 881 Pel* piOrg = pcDtParam->pOrg; 840 882 Pel* piCur = pcDtParam->pCur; … … 844 886 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 845 887 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 846 847 UInt uiSum = 0; 848 888 889 UInt uiSum = 0; 890 849 891 for( ; iRows != 0; iRows-=iSubStep ) 850 892 { … … 881 923 uiSum += abs( piOrg[30] - piCur[30] ); 882 924 uiSum += abs( piOrg[31] - piCur[31] ); 883 884 piOrg += iStrideOrg; 885 piCur += iStrideCur; 886 } 887 925 926 piOrg += iStrideOrg; 927 piCur += iStrideCur; 928 } 929 888 930 uiSum <<= iSubShift; 889 931 return ( uiSum >> g_uiBitIncrement ); … … 897 939 return xGetSADw( pcDtParam ); 898 940 } 941 #if LGE_ILLUCOMP_B0045 942 if(pcDtParam->bUseIC) 943 { 944 return xGetSAD24ic( pcDtParam ); 945 } 946 #endif 899 947 Pel* piOrg = pcDtParam->pOrg; 900 948 Pel* piCur = pcDtParam->pCur; … … 904 952 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 905 953 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 906 907 UInt uiSum = 0; 908 954 955 UInt uiSum = 0; 956 909 957 for( ; iRows != 0; iRows-=iSubStep ) 910 958 { … … 933 981 uiSum += abs( piOrg[22] - piCur[22] ); 934 982 uiSum += abs( piOrg[23] - piCur[23] ); 935 936 piOrg += iStrideOrg; 937 piCur += iStrideCur; 938 } 939 983 984 piOrg += iStrideOrg; 985 piCur += iStrideCur; 986 } 987 940 988 uiSum <<= iSubShift; 941 989 return ( uiSum >> g_uiBitIncrement ); … … 950 998 return xGetSADw( pcDtParam ); 951 999 } 1000 #if LGE_ILLUCOMP_B0045 1001 if(pcDtParam->bUseIC) 1002 { 1003 return xGetSAD64ic( pcDtParam ); 1004 } 1005 #endif 952 1006 Pel* piOrg = pcDtParam->pOrg; 953 1007 Pel* piCur = pcDtParam->pCur; … … 957 1011 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 958 1012 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 959 960 UInt uiSum = 0; 961 1013 1014 UInt uiSum = 0; 1015 962 1016 for( ; iRows != 0; iRows-=iSubStep ) 963 1017 { … … 1026 1080 uiSum += abs( piOrg[62] - piCur[62] ); 1027 1081 uiSum += abs( piOrg[63] - piCur[63] ); 1028 1029 piOrg += iStrideOrg; 1030 piCur += iStrideCur; 1031 } 1032 1082 1083 piOrg += iStrideOrg; 1084 piCur += iStrideCur; 1085 } 1086 1033 1087 uiSum <<= iSubShift; 1034 1088 return ( uiSum >> g_uiBitIncrement ); … … 1042 1096 return xGetSADw( pcDtParam ); 1043 1097 } 1098 #if LGE_ILLUCOMP_B0045 1099 if(pcDtParam->bUseIC) 1100 { 1101 return xGetSAD48ic( pcDtParam ); 1102 } 1103 #endif 1044 1104 Pel* piOrg = pcDtParam->pOrg; 1045 1105 Pel* piCur = pcDtParam->pCur; … … 1049 1109 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1050 1110 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1051 1052 UInt uiSum = 0; 1053 1111 1112 UInt uiSum = 0; 1113 1054 1114 for( ; iRows != 0; iRows-=iSubStep ) 1055 1115 { … … 1102 1162 uiSum += abs( piOrg[46] - piCur[46] ); 1103 1163 uiSum += abs( piOrg[47] - piCur[47] ); 1104 1105 piOrg += iStrideOrg; 1106 piCur += iStrideCur; 1107 } 1108 1164 1165 piOrg += iStrideOrg; 1166 piCur += iStrideCur; 1167 } 1168 1109 1169 uiSum <<= iSubShift; 1110 1170 return ( uiSum >> g_uiBitIncrement ); 1111 1171 } 1172 #endif 1173 1174 // ==================================================================================================================== 1175 // Distortion functions 1176 // ==================================================================================================================== 1177 1178 // -------------------------------------------------------------------------------------------------------------------- 1179 // SAD 1180 // -------------------------------------------------------------------------------------------------------------------- 1181 #if LGE_ILLUCOMP_B0045 1182 UInt TComRdCost::xGetSADic( DistParam* pcDtParam ) 1183 { 1184 if ( pcDtParam->bApplyWeight ) 1185 { 1186 return xGetSADw( pcDtParam ); 1187 } 1188 Pel* piOrg = pcDtParam->pOrg; 1189 Pel* piCur = pcDtParam->pCur; 1190 Int iRows = pcDtParam->iRows; 1191 Int iCols = pcDtParam->iCols; 1192 Int iStrideCur = pcDtParam->iStrideCur; 1193 Int iStrideOrg = pcDtParam->iStrideOrg; 1194 1195 UInt uiSum = 0; 1196 1197 Int iOrigAvg = 0, iCurAvg = 0; 1198 Int iDeltaC; 1199 1200 for( ; iRows != 0; iRows-- ) 1201 { 1202 for (Int n = 0; n < iCols; n++ ) 1203 { 1204 iOrigAvg += piOrg[n]; 1205 iCurAvg += piCur[n]; 1206 } 1207 piOrg += iStrideOrg; 1208 piCur += iStrideCur; 1209 } 1210 1211 piOrg = pcDtParam->pOrg; 1212 piCur = pcDtParam->pCur; 1213 iRows = pcDtParam->iRows; 1214 1215 iDeltaC = (iOrigAvg - iCurAvg)/iCols/iRows; 1216 1217 for( ; iRows != 0; iRows-- ) 1218 { 1219 for (Int n = 0; n < iCols; n++ ) 1220 { 1221 uiSum += abs( piOrg[n] - piCur[n] - iDeltaC ); 1222 } 1223 piOrg += iStrideOrg; 1224 piCur += iStrideCur; 1225 } 1226 1227 return ( uiSum >> g_uiBitIncrement ); 1228 } 1229 1230 UInt TComRdCost::xGetSAD4ic( DistParam* pcDtParam ) 1231 { 1232 if ( pcDtParam->bApplyWeight ) 1233 { 1234 return xGetSADw( pcDtParam ); 1235 } 1236 Pel* piOrg = pcDtParam->pOrg; 1237 Pel* piCur = pcDtParam->pCur; 1238 Int iRows = pcDtParam->iRows; 1239 Int iSubShift = pcDtParam->iSubShift; 1240 Int iSubStep = ( 1 << iSubShift ); 1241 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1242 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1243 1244 UInt uiSum = 0; 1245 1246 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1247 Int iDeltaC; 1248 1249 for( ; iRows != 0; iRows-=iSubStep ) 1250 { 1251 iOrigAvg += piOrg[0]; 1252 iOrigAvg += piOrg[1]; 1253 iOrigAvg += piOrg[2]; 1254 iOrigAvg += piOrg[3]; 1255 1256 iCurAvg += piCur[0]; 1257 iCurAvg += piCur[1]; 1258 iCurAvg += piCur[2]; 1259 iCurAvg += piCur[3]; 1260 1261 piOrg += iStrideOrg; 1262 piCur += iStrideCur; 1263 uiRowCnt++; 1264 } 1265 1266 piOrg = pcDtParam->pOrg; 1267 piCur = pcDtParam->pCur; 1268 iRows = pcDtParam->iRows; 1269 1270 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/4) : 0; 1271 1272 for( ; iRows != 0; iRows-=iSubStep ) 1273 { 1274 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1275 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1276 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1277 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1278 1279 piOrg += iStrideOrg; 1280 piCur += iStrideCur; 1281 } 1282 1283 uiSum <<= iSubShift; 1284 return ( uiSum >> g_uiBitIncrement ); 1285 } 1286 1287 UInt TComRdCost::xGetSAD8ic( DistParam* pcDtParam ) 1288 { 1289 if ( pcDtParam->bApplyWeight ) 1290 { 1291 return xGetSADw( pcDtParam ); 1292 } 1293 Pel* piOrg = pcDtParam->pOrg; 1294 Pel* piCur = pcDtParam->pCur; 1295 Int iRows = pcDtParam->iRows; 1296 Int iSubShift = pcDtParam->iSubShift; 1297 Int iSubStep = ( 1 << iSubShift ); 1298 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1299 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1300 1301 UInt uiSum = 0; 1302 1303 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1304 Int iDeltaC; 1305 1306 for( ; iRows != 0; iRows-=iSubStep ) 1307 { 1308 iOrigAvg += piOrg[0]; 1309 iOrigAvg += piOrg[1]; 1310 iOrigAvg += piOrg[2]; 1311 iOrigAvg += piOrg[3]; 1312 iOrigAvg += piOrg[4]; 1313 iOrigAvg += piOrg[5]; 1314 iOrigAvg += piOrg[6]; 1315 iOrigAvg += piOrg[7]; 1316 1317 iCurAvg += piCur[0]; 1318 iCurAvg += piCur[1]; 1319 iCurAvg += piCur[2]; 1320 iCurAvg += piCur[3]; 1321 iCurAvg += piCur[4]; 1322 iCurAvg += piCur[5]; 1323 iCurAvg += piCur[6]; 1324 iCurAvg += piCur[7]; 1325 1326 piOrg += iStrideOrg; 1327 piCur += iStrideCur; 1328 uiRowCnt++; 1329 } 1330 1331 piOrg = pcDtParam->pOrg; 1332 piCur = pcDtParam->pCur; 1333 iRows = pcDtParam->iRows; 1334 1335 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/8) : 0; 1336 1337 for( ; iRows != 0; iRows-=iSubStep ) 1338 { 1339 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1340 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1341 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1342 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1343 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 1344 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 1345 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 1346 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 1347 1348 piOrg += iStrideOrg; 1349 piCur += iStrideCur; 1350 } 1351 1352 uiSum <<= iSubShift; 1353 return ( uiSum >> g_uiBitIncrement ); 1354 } 1355 1356 UInt TComRdCost::xGetSAD16ic( DistParam* pcDtParam ) 1357 { 1358 if ( pcDtParam->bApplyWeight ) 1359 { 1360 return xGetSADw( pcDtParam ); 1361 } 1362 Pel* piOrg = pcDtParam->pOrg; 1363 Pel* piCur = pcDtParam->pCur; 1364 Int iRows = pcDtParam->iRows; 1365 Int iSubShift = pcDtParam->iSubShift; 1366 Int iSubStep = ( 1 << iSubShift ); 1367 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1368 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1369 1370 UInt uiSum = 0; 1371 1372 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1373 Int iDeltaC; 1374 1375 for( ; iRows != 0; iRows-=iSubStep ) 1376 { 1377 iOrigAvg += piOrg[0]; 1378 iOrigAvg += piOrg[1]; 1379 iOrigAvg += piOrg[2]; 1380 iOrigAvg += piOrg[3]; 1381 iOrigAvg += piOrg[4]; 1382 iOrigAvg += piOrg[5]; 1383 iOrigAvg += piOrg[6]; 1384 iOrigAvg += piOrg[7]; 1385 iOrigAvg += piOrg[8]; 1386 iOrigAvg += piOrg[9]; 1387 iOrigAvg += piOrg[10]; 1388 iOrigAvg += piOrg[11]; 1389 iOrigAvg += piOrg[12]; 1390 iOrigAvg += piOrg[13]; 1391 iOrigAvg += piOrg[14]; 1392 iOrigAvg += piOrg[15]; 1393 1394 iCurAvg += piCur[0]; 1395 iCurAvg += piCur[1]; 1396 iCurAvg += piCur[2]; 1397 iCurAvg += piCur[3]; 1398 iCurAvg += piCur[4]; 1399 iCurAvg += piCur[5]; 1400 iCurAvg += piCur[6]; 1401 iCurAvg += piCur[7]; 1402 iCurAvg += piCur[8]; 1403 iCurAvg += piCur[9]; 1404 iCurAvg += piCur[10]; 1405 iCurAvg += piCur[11]; 1406 iCurAvg += piCur[12]; 1407 iCurAvg += piCur[13]; 1408 iCurAvg += piCur[14]; 1409 iCurAvg += piCur[15]; 1410 1411 piOrg += iStrideOrg; 1412 piCur += iStrideCur; 1413 uiRowCnt++; 1414 } 1415 1416 piOrg = pcDtParam->pOrg; 1417 piCur = pcDtParam->pCur; 1418 iRows = pcDtParam->iRows; 1419 1420 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/16) : 0; 1421 1422 for( ; iRows != 0; iRows-=iSubStep ) 1423 { 1424 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1425 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1426 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1427 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1428 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 1429 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 1430 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 1431 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 1432 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 1433 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 1434 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 1435 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 1436 uiSum += abs( piOrg[12] - piCur[12] - iDeltaC ); 1437 uiSum += abs( piOrg[13] - piCur[13] - iDeltaC ); 1438 uiSum += abs( piOrg[14] - piCur[14] - iDeltaC ); 1439 uiSum += abs( piOrg[15] - piCur[15] - iDeltaC ); 1440 1441 piOrg += iStrideOrg; 1442 piCur += iStrideCur; 1443 } 1444 1445 uiSum <<= iSubShift; 1446 return ( uiSum >> g_uiBitIncrement ); 1447 } 1448 1449 #if AMP_SAD 1450 UInt TComRdCost::xGetSAD12ic( DistParam* pcDtParam ) 1451 { 1452 if ( pcDtParam->bApplyWeight ) 1453 { 1454 return xGetSADw( pcDtParam ); 1455 } 1456 Pel* piOrg = pcDtParam->pOrg; 1457 Pel* piCur = pcDtParam->pCur; 1458 Int iRows = pcDtParam->iRows; 1459 Int iSubShift = pcDtParam->iSubShift; 1460 Int iSubStep = ( 1 << iSubShift ); 1461 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1462 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1463 1464 UInt uiSum = 0; 1465 1466 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1467 Int iDeltaC; 1468 1469 for( ; iRows != 0; iRows-=iSubStep ) 1470 { 1471 iOrigAvg += piOrg[0]; 1472 iOrigAvg += piOrg[1]; 1473 iOrigAvg += piOrg[2]; 1474 iOrigAvg += piOrg[3]; 1475 iOrigAvg += piOrg[4]; 1476 iOrigAvg += piOrg[5]; 1477 iOrigAvg += piOrg[6]; 1478 iOrigAvg += piOrg[7]; 1479 iOrigAvg += piOrg[8]; 1480 iOrigAvg += piOrg[9]; 1481 iOrigAvg += piOrg[10]; 1482 iOrigAvg += piOrg[11]; 1483 1484 iCurAvg += piCur[0]; 1485 iCurAvg += piCur[1]; 1486 iCurAvg += piCur[2]; 1487 iCurAvg += piCur[3]; 1488 iCurAvg += piCur[4]; 1489 iCurAvg += piCur[5]; 1490 iCurAvg += piCur[6]; 1491 iCurAvg += piCur[7]; 1492 iCurAvg += piCur[8]; 1493 iCurAvg += piCur[9]; 1494 iCurAvg += piCur[10]; 1495 iCurAvg += piCur[11]; 1496 1497 piOrg += iStrideOrg; 1498 piCur += iStrideCur; 1499 uiRowCnt++; 1500 } 1501 1502 piOrg = pcDtParam->pOrg; 1503 piCur = pcDtParam->pCur; 1504 iRows = pcDtParam->iRows; 1505 1506 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/12) : 0; 1507 1508 for( ; iRows != 0; iRows-=iSubStep ) 1509 { 1510 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1511 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1512 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1513 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1514 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 1515 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 1516 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 1517 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 1518 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 1519 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 1520 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 1521 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 1522 1523 piOrg += iStrideOrg; 1524 piCur += iStrideCur; 1525 } 1526 1527 uiSum <<= iSubShift; 1528 return ( uiSum >> g_uiBitIncrement ); 1529 } 1530 #endif 1531 1532 UInt TComRdCost::xGetSAD16Nic( DistParam* pcDtParam ) 1533 { 1534 Pel* piOrg = pcDtParam->pOrg; 1535 Pel* piCur = pcDtParam->pCur; 1536 Int iRows = pcDtParam->iRows; 1537 Int iCols = pcDtParam->iCols; 1538 Int iSubShift = pcDtParam->iSubShift; 1539 Int iSubStep = ( 1 << iSubShift ); 1540 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1541 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1542 1543 UInt uiSum = 0; 1544 1545 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0, uiColCnt = (iCols-1)/16 + 1; 1546 Int iDeltaC; 1547 1548 for( ; iRows != 0; iRows-=iSubStep ) 1549 { 1550 for (Int n = 0; n < iCols; n+=16 ) 1551 { 1552 iOrigAvg += piOrg[n + 0]; 1553 iOrigAvg += piOrg[n + 1]; 1554 iOrigAvg += piOrg[n + 2]; 1555 iOrigAvg += piOrg[n + 3]; 1556 iOrigAvg += piOrg[n + 4]; 1557 iOrigAvg += piOrg[n + 5]; 1558 iOrigAvg += piOrg[n + 6]; 1559 iOrigAvg += piOrg[n + 7]; 1560 iOrigAvg += piOrg[n + 8]; 1561 iOrigAvg += piOrg[n + 9]; 1562 iOrigAvg += piOrg[n + 10]; 1563 iOrigAvg += piOrg[n + 11]; 1564 iOrigAvg += piOrg[n + 12]; 1565 iOrigAvg += piOrg[n + 13]; 1566 iOrigAvg += piOrg[n + 14]; 1567 iOrigAvg += piOrg[n + 15]; 1568 1569 iCurAvg += piCur[n + 0]; 1570 iCurAvg += piCur[n + 1]; 1571 iCurAvg += piCur[n + 2]; 1572 iCurAvg += piCur[n + 3]; 1573 iCurAvg += piCur[n + 4]; 1574 iCurAvg += piCur[n + 5]; 1575 iCurAvg += piCur[n + 6]; 1576 iCurAvg += piCur[n + 7]; 1577 iCurAvg += piCur[n + 8]; 1578 iCurAvg += piCur[n + 9]; 1579 iCurAvg += piCur[n + 10]; 1580 iCurAvg += piCur[n + 11]; 1581 iCurAvg += piCur[n + 12]; 1582 iCurAvg += piCur[n + 13]; 1583 iCurAvg += piCur[n + 14]; 1584 iCurAvg += piCur[n + 15]; 1585 } 1586 piOrg += iStrideOrg; 1587 piCur += iStrideCur; 1588 uiRowCnt++; 1589 } 1590 piOrg = pcDtParam->pOrg; 1591 piCur = pcDtParam->pCur; 1592 iRows = pcDtParam->iRows; 1593 1594 iDeltaC = (uiRowCnt && uiColCnt) ? ((iOrigAvg - iCurAvg)/uiRowCnt/uiColCnt/16) : 0; 1595 1596 for( ; iRows != 0; iRows-=iSubStep ) 1597 { 1598 for (Int n = 0; n < iCols; n+=16 ) 1599 { 1600 uiSum += abs( piOrg[n+ 0] - piCur[n+ 0] - iDeltaC ); 1601 uiSum += abs( piOrg[n+ 1] - piCur[n+ 1] - iDeltaC ); 1602 uiSum += abs( piOrg[n+ 2] - piCur[n+ 2] - iDeltaC ); 1603 uiSum += abs( piOrg[n+ 3] - piCur[n+ 3] - iDeltaC ); 1604 uiSum += abs( piOrg[n+ 4] - piCur[n+ 4] - iDeltaC ); 1605 uiSum += abs( piOrg[n+ 5] - piCur[n+ 5] - iDeltaC ); 1606 uiSum += abs( piOrg[n+ 6] - piCur[n+ 6] - iDeltaC ); 1607 uiSum += abs( piOrg[n+ 7] - piCur[n+ 7] - iDeltaC ); 1608 uiSum += abs( piOrg[n+ 8] - piCur[n+ 8] - iDeltaC ); 1609 uiSum += abs( piOrg[n+ 9] - piCur[n+ 9] - iDeltaC ); 1610 uiSum += abs( piOrg[n+10] - piCur[n+10] - iDeltaC ); 1611 uiSum += abs( piOrg[n+11] - piCur[n+11] - iDeltaC ); 1612 uiSum += abs( piOrg[n+12] - piCur[n+12] - iDeltaC ); 1613 uiSum += abs( piOrg[n+13] - piCur[n+13] - iDeltaC ); 1614 uiSum += abs( piOrg[n+14] - piCur[n+14] - iDeltaC ); 1615 uiSum += abs( piOrg[n+15] - piCur[n+15] - iDeltaC ); 1616 } 1617 piOrg += iStrideOrg; 1618 piCur += iStrideCur; 1619 } 1620 1621 uiSum <<= iSubShift; 1622 return ( uiSum >> g_uiBitIncrement ); 1623 } 1624 1625 UInt TComRdCost::xGetSAD32ic( DistParam* pcDtParam ) 1626 { 1627 if ( pcDtParam->bApplyWeight ) 1628 { 1629 return xGetSADw( pcDtParam ); 1630 } 1631 Pel* piOrg = pcDtParam->pOrg; 1632 Pel* piCur = pcDtParam->pCur; 1633 Int iRows = pcDtParam->iRows; 1634 Int iSubShift = pcDtParam->iSubShift; 1635 Int iSubStep = ( 1 << iSubShift ); 1636 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1637 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1638 1639 UInt uiSum = 0; 1640 1641 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1642 Int iDeltaC; 1643 1644 for( ; iRows != 0; iRows-=iSubStep ) 1645 { 1646 iOrigAvg += piOrg[0]; 1647 iOrigAvg += piOrg[1]; 1648 iOrigAvg += piOrg[2]; 1649 iOrigAvg += piOrg[3]; 1650 iOrigAvg += piOrg[4]; 1651 iOrigAvg += piOrg[5]; 1652 iOrigAvg += piOrg[6]; 1653 iOrigAvg += piOrg[7]; 1654 iOrigAvg += piOrg[8]; 1655 iOrigAvg += piOrg[9]; 1656 iOrigAvg += piOrg[10]; 1657 iOrigAvg += piOrg[11]; 1658 iOrigAvg += piOrg[12]; 1659 iOrigAvg += piOrg[13]; 1660 iOrigAvg += piOrg[14]; 1661 iOrigAvg += piOrg[15]; 1662 iOrigAvg += piOrg[16]; 1663 iOrigAvg += piOrg[17]; 1664 iOrigAvg += piOrg[18]; 1665 iOrigAvg += piOrg[19]; 1666 iOrigAvg += piOrg[20]; 1667 iOrigAvg += piOrg[21]; 1668 iOrigAvg += piOrg[22]; 1669 iOrigAvg += piOrg[23]; 1670 iOrigAvg += piOrg[24]; 1671 iOrigAvg += piOrg[25]; 1672 iOrigAvg += piOrg[26]; 1673 iOrigAvg += piOrg[27]; 1674 iOrigAvg += piOrg[28]; 1675 iOrigAvg += piOrg[29]; 1676 iOrigAvg += piOrg[30]; 1677 iOrigAvg += piOrg[31]; 1678 1679 iCurAvg += piCur[0]; 1680 iCurAvg += piCur[1]; 1681 iCurAvg += piCur[2]; 1682 iCurAvg += piCur[3]; 1683 iCurAvg += piCur[4]; 1684 iCurAvg += piCur[5]; 1685 iCurAvg += piCur[6]; 1686 iCurAvg += piCur[7]; 1687 iCurAvg += piCur[8]; 1688 iCurAvg += piCur[9]; 1689 iCurAvg += piCur[10]; 1690 iCurAvg += piCur[11]; 1691 iCurAvg += piCur[12]; 1692 iCurAvg += piCur[13]; 1693 iCurAvg += piCur[14]; 1694 iCurAvg += piCur[15]; 1695 iCurAvg += piCur[16]; 1696 iCurAvg += piCur[17]; 1697 iCurAvg += piCur[18]; 1698 iCurAvg += piCur[19]; 1699 iCurAvg += piCur[20]; 1700 iCurAvg += piCur[21]; 1701 iCurAvg += piCur[22]; 1702 iCurAvg += piCur[23]; 1703 iCurAvg += piCur[24]; 1704 iCurAvg += piCur[25]; 1705 iCurAvg += piCur[26]; 1706 iCurAvg += piCur[27]; 1707 iCurAvg += piCur[28]; 1708 iCurAvg += piCur[29]; 1709 iCurAvg += piCur[30]; 1710 iCurAvg += piCur[31]; 1711 1712 piOrg += iStrideOrg; 1713 piCur += iStrideCur; 1714 uiRowCnt++; 1715 } 1716 1717 piOrg = pcDtParam->pOrg; 1718 piCur = pcDtParam->pCur; 1719 iRows = pcDtParam->iRows; 1720 1721 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/32) : 0; 1722 1723 for( ; iRows != 0; iRows-=iSubStep ) 1724 { 1725 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1726 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1727 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1728 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1729 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 1730 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 1731 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 1732 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 1733 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 1734 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 1735 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 1736 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 1737 uiSum += abs( piOrg[12] - piCur[12] - iDeltaC ); 1738 uiSum += abs( piOrg[13] - piCur[13] - iDeltaC ); 1739 uiSum += abs( piOrg[14] - piCur[14] - iDeltaC ); 1740 uiSum += abs( piOrg[15] - piCur[15] - iDeltaC ); 1741 uiSum += abs( piOrg[16] - piCur[16] - iDeltaC ); 1742 uiSum += abs( piOrg[17] - piCur[17] - iDeltaC ); 1743 uiSum += abs( piOrg[18] - piCur[18] - iDeltaC ); 1744 uiSum += abs( piOrg[19] - piCur[19] - iDeltaC ); 1745 uiSum += abs( piOrg[20] - piCur[20] - iDeltaC ); 1746 uiSum += abs( piOrg[21] - piCur[21] - iDeltaC ); 1747 uiSum += abs( piOrg[22] - piCur[22] - iDeltaC ); 1748 uiSum += abs( piOrg[23] - piCur[23] - iDeltaC ); 1749 uiSum += abs( piOrg[24] - piCur[24] - iDeltaC ); 1750 uiSum += abs( piOrg[25] - piCur[25] - iDeltaC ); 1751 uiSum += abs( piOrg[26] - piCur[26] - iDeltaC ); 1752 uiSum += abs( piOrg[27] - piCur[27] - iDeltaC ); 1753 uiSum += abs( piOrg[28] - piCur[28] - iDeltaC ); 1754 uiSum += abs( piOrg[29] - piCur[29] - iDeltaC ); 1755 uiSum += abs( piOrg[30] - piCur[30] - iDeltaC ); 1756 uiSum += abs( piOrg[31] - piCur[31] - iDeltaC ); 1757 1758 piOrg += iStrideOrg; 1759 piCur += iStrideCur; 1760 } 1761 1762 uiSum <<= iSubShift; 1763 return ( uiSum >> g_uiBitIncrement ); 1764 } 1765 1766 #if AMP_SAD 1767 UInt TComRdCost::xGetSAD24ic( DistParam* pcDtParam ) 1768 { 1769 if ( pcDtParam->bApplyWeight ) 1770 { 1771 return xGetSADw( pcDtParam ); 1772 } 1773 Pel* piOrg = pcDtParam->pOrg; 1774 Pel* piCur = pcDtParam->pCur; 1775 Int iRows = pcDtParam->iRows; 1776 Int iSubShift = pcDtParam->iSubShift; 1777 Int iSubStep = ( 1 << iSubShift ); 1778 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1779 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1780 1781 UInt uiSum = 0; 1782 1783 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1784 Int iDeltaC; 1785 1786 for( ; iRows != 0; iRows-=iSubStep ) 1787 { 1788 iOrigAvg += piOrg[0]; 1789 iOrigAvg += piOrg[1]; 1790 iOrigAvg += piOrg[2]; 1791 iOrigAvg += piOrg[3]; 1792 iOrigAvg += piOrg[4]; 1793 iOrigAvg += piOrg[5]; 1794 iOrigAvg += piOrg[6]; 1795 iOrigAvg += piOrg[7]; 1796 iOrigAvg += piOrg[8]; 1797 iOrigAvg += piOrg[9]; 1798 iOrigAvg += piOrg[10]; 1799 iOrigAvg += piOrg[11]; 1800 iOrigAvg += piOrg[12]; 1801 iOrigAvg += piOrg[13]; 1802 iOrigAvg += piOrg[14]; 1803 iOrigAvg += piOrg[15]; 1804 iOrigAvg += piOrg[16]; 1805 iOrigAvg += piOrg[17]; 1806 iOrigAvg += piOrg[18]; 1807 iOrigAvg += piOrg[19]; 1808 iOrigAvg += piOrg[20]; 1809 iOrigAvg += piOrg[21]; 1810 iOrigAvg += piOrg[22]; 1811 iOrigAvg += piOrg[23]; 1812 1813 iCurAvg += piCur[0]; 1814 iCurAvg += piCur[1]; 1815 iCurAvg += piCur[2]; 1816 iCurAvg += piCur[3]; 1817 iCurAvg += piCur[4]; 1818 iCurAvg += piCur[5]; 1819 iCurAvg += piCur[6]; 1820 iCurAvg += piCur[7]; 1821 iCurAvg += piCur[8]; 1822 iCurAvg += piCur[9]; 1823 iCurAvg += piCur[10]; 1824 iCurAvg += piCur[11]; 1825 iCurAvg += piCur[12]; 1826 iCurAvg += piCur[13]; 1827 iCurAvg += piCur[14]; 1828 iCurAvg += piCur[15]; 1829 iCurAvg += piCur[16]; 1830 iCurAvg += piCur[17]; 1831 iCurAvg += piCur[18]; 1832 iCurAvg += piCur[19]; 1833 iCurAvg += piCur[20]; 1834 iCurAvg += piCur[21]; 1835 iCurAvg += piCur[22]; 1836 iCurAvg += piCur[23]; 1837 1838 piOrg += iStrideOrg; 1839 piCur += iStrideCur; 1840 uiRowCnt++; 1841 } 1842 1843 piOrg = pcDtParam->pOrg; 1844 piCur = pcDtParam->pCur; 1845 iRows = pcDtParam->iRows; 1846 1847 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/24) : 0; 1848 1849 for( ; iRows != 0; iRows-=iSubStep ) 1850 { 1851 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1852 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1853 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1854 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1855 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 1856 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 1857 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 1858 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 1859 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 1860 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 1861 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 1862 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 1863 uiSum += abs( piOrg[12] - piCur[12] - iDeltaC ); 1864 uiSum += abs( piOrg[13] - piCur[13] - iDeltaC ); 1865 uiSum += abs( piOrg[14] - piCur[14] - iDeltaC ); 1866 uiSum += abs( piOrg[15] - piCur[15] - iDeltaC ); 1867 uiSum += abs( piOrg[16] - piCur[16] - iDeltaC ); 1868 uiSum += abs( piOrg[17] - piCur[17] - iDeltaC ); 1869 uiSum += abs( piOrg[18] - piCur[18] - iDeltaC ); 1870 uiSum += abs( piOrg[19] - piCur[19] - iDeltaC ); 1871 uiSum += abs( piOrg[20] - piCur[20] - iDeltaC ); 1872 uiSum += abs( piOrg[21] - piCur[21] - iDeltaC ); 1873 uiSum += abs( piOrg[22] - piCur[22] - iDeltaC ); 1874 uiSum += abs( piOrg[23] - piCur[23] - iDeltaC ); 1875 1876 piOrg += iStrideOrg; 1877 piCur += iStrideCur; 1878 } 1879 1880 uiSum <<= iSubShift; 1881 return ( uiSum >> g_uiBitIncrement ); 1882 } 1883 #endif 1884 1885 UInt TComRdCost::xGetSAD64ic( DistParam* pcDtParam ) 1886 { 1887 if ( pcDtParam->bApplyWeight ) 1888 { 1889 return xGetSADw( pcDtParam ); 1890 } 1891 Pel* piOrg = pcDtParam->pOrg; 1892 Pel* piCur = pcDtParam->pCur; 1893 Int iRows = pcDtParam->iRows; 1894 Int iSubShift = pcDtParam->iSubShift; 1895 Int iSubStep = ( 1 << iSubShift ); 1896 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1897 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1898 1899 UInt uiSum = 0; 1900 1901 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1902 Int iDeltaC; 1903 1904 for( ; iRows != 0; iRows-=iSubStep ) 1905 { 1906 iOrigAvg += piOrg[0] ; 1907 iOrigAvg += piOrg[1] ; 1908 iOrigAvg += piOrg[2] ; 1909 iOrigAvg += piOrg[3] ; 1910 iOrigAvg += piOrg[4] ; 1911 iOrigAvg += piOrg[5] ; 1912 iOrigAvg += piOrg[6] ; 1913 iOrigAvg += piOrg[7] ; 1914 iOrigAvg += piOrg[8] ; 1915 iOrigAvg += piOrg[9] ; 1916 iOrigAvg += piOrg[10] ; 1917 iOrigAvg += piOrg[11] ; 1918 iOrigAvg += piOrg[12] ; 1919 iOrigAvg += piOrg[13] ; 1920 iOrigAvg += piOrg[14] ; 1921 iOrigAvg += piOrg[15] ; 1922 iOrigAvg += piOrg[16] ; 1923 iOrigAvg += piOrg[17] ; 1924 iOrigAvg += piOrg[18] ; 1925 iOrigAvg += piOrg[19] ; 1926 iOrigAvg += piOrg[20] ; 1927 iOrigAvg += piOrg[21] ; 1928 iOrigAvg += piOrg[22] ; 1929 iOrigAvg += piOrg[23] ; 1930 iOrigAvg += piOrg[24] ; 1931 iOrigAvg += piOrg[25] ; 1932 iOrigAvg += piOrg[26] ; 1933 iOrigAvg += piOrg[27] ; 1934 iOrigAvg += piOrg[28] ; 1935 iOrigAvg += piOrg[29] ; 1936 iOrigAvg += piOrg[30] ; 1937 iOrigAvg += piOrg[31] ; 1938 iOrigAvg += piOrg[32] ; 1939 iOrigAvg += piOrg[33] ; 1940 iOrigAvg += piOrg[34] ; 1941 iOrigAvg += piOrg[35] ; 1942 iOrigAvg += piOrg[36] ; 1943 iOrigAvg += piOrg[37] ; 1944 iOrigAvg += piOrg[38] ; 1945 iOrigAvg += piOrg[39] ; 1946 iOrigAvg += piOrg[40] ; 1947 iOrigAvg += piOrg[41] ; 1948 iOrigAvg += piOrg[42] ; 1949 iOrigAvg += piOrg[43] ; 1950 iOrigAvg += piOrg[44] ; 1951 iOrigAvg += piOrg[45] ; 1952 iOrigAvg += piOrg[46] ; 1953 iOrigAvg += piOrg[47] ; 1954 iOrigAvg += piOrg[48] ; 1955 iOrigAvg += piOrg[49] ; 1956 iOrigAvg += piOrg[50] ; 1957 iOrigAvg += piOrg[51] ; 1958 iOrigAvg += piOrg[52] ; 1959 iOrigAvg += piOrg[53] ; 1960 iOrigAvg += piOrg[54] ; 1961 iOrigAvg += piOrg[55] ; 1962 iOrigAvg += piOrg[56] ; 1963 iOrigAvg += piOrg[57] ; 1964 iOrigAvg += piOrg[58] ; 1965 iOrigAvg += piOrg[59] ; 1966 iOrigAvg += piOrg[60] ; 1967 iOrigAvg += piOrg[61] ; 1968 iOrigAvg += piOrg[62] ; 1969 iOrigAvg += piOrg[63] ; 1970 1971 iCurAvg += piCur[0] ; 1972 iCurAvg += piCur[1] ; 1973 iCurAvg += piCur[2] ; 1974 iCurAvg += piCur[3] ; 1975 iCurAvg += piCur[4] ; 1976 iCurAvg += piCur[5] ; 1977 iCurAvg += piCur[6] ; 1978 iCurAvg += piCur[7] ; 1979 iCurAvg += piCur[8] ; 1980 iCurAvg += piCur[9] ; 1981 iCurAvg += piCur[10] ; 1982 iCurAvg += piCur[11] ; 1983 iCurAvg += piCur[12] ; 1984 iCurAvg += piCur[13] ; 1985 iCurAvg += piCur[14] ; 1986 iCurAvg += piCur[15] ; 1987 iCurAvg += piCur[16] ; 1988 iCurAvg += piCur[17] ; 1989 iCurAvg += piCur[18] ; 1990 iCurAvg += piCur[19] ; 1991 iCurAvg += piCur[20] ; 1992 iCurAvg += piCur[21] ; 1993 iCurAvg += piCur[22] ; 1994 iCurAvg += piCur[23] ; 1995 iCurAvg += piCur[24] ; 1996 iCurAvg += piCur[25] ; 1997 iCurAvg += piCur[26] ; 1998 iCurAvg += piCur[27] ; 1999 iCurAvg += piCur[28] ; 2000 iCurAvg += piCur[29] ; 2001 iCurAvg += piCur[30] ; 2002 iCurAvg += piCur[31] ; 2003 iCurAvg += piCur[32] ; 2004 iCurAvg += piCur[33] ; 2005 iCurAvg += piCur[34] ; 2006 iCurAvg += piCur[35] ; 2007 iCurAvg += piCur[36] ; 2008 iCurAvg += piCur[37] ; 2009 iCurAvg += piCur[38] ; 2010 iCurAvg += piCur[39] ; 2011 iCurAvg += piCur[40] ; 2012 iCurAvg += piCur[41] ; 2013 iCurAvg += piCur[42] ; 2014 iCurAvg += piCur[43] ; 2015 iCurAvg += piCur[44] ; 2016 iCurAvg += piCur[45] ; 2017 iCurAvg += piCur[46] ; 2018 iCurAvg += piCur[47] ; 2019 iCurAvg += piCur[48] ; 2020 iCurAvg += piCur[49] ; 2021 iCurAvg += piCur[50] ; 2022 iCurAvg += piCur[51] ; 2023 iCurAvg += piCur[52] ; 2024 iCurAvg += piCur[53] ; 2025 iCurAvg += piCur[54] ; 2026 iCurAvg += piCur[55] ; 2027 iCurAvg += piCur[56] ; 2028 iCurAvg += piCur[57] ; 2029 iCurAvg += piCur[58] ; 2030 iCurAvg += piCur[59] ; 2031 iCurAvg += piCur[60] ; 2032 iCurAvg += piCur[61] ; 2033 iCurAvg += piCur[62] ; 2034 iCurAvg += piCur[63] ; 2035 2036 piOrg += iStrideOrg; 2037 piCur += iStrideCur; 2038 uiRowCnt++; 2039 } 2040 2041 piOrg = pcDtParam->pOrg; 2042 piCur = pcDtParam->pCur; 2043 iRows = pcDtParam->iRows; 2044 2045 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/64) : 0; 2046 2047 for( ; iRows != 0; iRows-=iSubStep ) 2048 { 2049 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 2050 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 2051 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 2052 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 2053 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 2054 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 2055 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 2056 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 2057 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 2058 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 2059 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 2060 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 2061 uiSum += abs( piOrg[12] - piCur[12] - iDeltaC ); 2062 uiSum += abs( piOrg[13] - piCur[13] - iDeltaC ); 2063 uiSum += abs( piOrg[14] - piCur[14] - iDeltaC ); 2064 uiSum += abs( piOrg[15] - piCur[15] - iDeltaC ); 2065 uiSum += abs( piOrg[16] - piCur[16] - iDeltaC ); 2066 uiSum += abs( piOrg[17] - piCur[17] - iDeltaC ); 2067 uiSum += abs( piOrg[18] - piCur[18] - iDeltaC ); 2068 uiSum += abs( piOrg[19] - piCur[19] - iDeltaC ); 2069 uiSum += abs( piOrg[20] - piCur[20] - iDeltaC ); 2070 uiSum += abs( piOrg[21] - piCur[21] - iDeltaC ); 2071 uiSum += abs( piOrg[22] - piCur[22] - iDeltaC ); 2072 uiSum += abs( piOrg[23] - piCur[23] - iDeltaC ); 2073 uiSum += abs( piOrg[24] - piCur[24] - iDeltaC ); 2074 uiSum += abs( piOrg[25] - piCur[25] - iDeltaC ); 2075 uiSum += abs( piOrg[26] - piCur[26] - iDeltaC ); 2076 uiSum += abs( piOrg[27] - piCur[27] - iDeltaC ); 2077 uiSum += abs( piOrg[28] - piCur[28] - iDeltaC ); 2078 uiSum += abs( piOrg[29] - piCur[29] - iDeltaC ); 2079 uiSum += abs( piOrg[30] - piCur[30] - iDeltaC ); 2080 uiSum += abs( piOrg[31] - piCur[31] - iDeltaC ); 2081 uiSum += abs( piOrg[32] - piCur[32] - iDeltaC ); 2082 uiSum += abs( piOrg[33] - piCur[33] - iDeltaC ); 2083 uiSum += abs( piOrg[34] - piCur[34] - iDeltaC ); 2084 uiSum += abs( piOrg[35] - piCur[35] - iDeltaC ); 2085 uiSum += abs( piOrg[36] - piCur[36] - iDeltaC ); 2086 uiSum += abs( piOrg[37] - piCur[37] - iDeltaC ); 2087 uiSum += abs( piOrg[38] - piCur[38] - iDeltaC ); 2088 uiSum += abs( piOrg[39] - piCur[39] - iDeltaC ); 2089 uiSum += abs( piOrg[40] - piCur[40] - iDeltaC ); 2090 uiSum += abs( piOrg[41] - piCur[41] - iDeltaC ); 2091 uiSum += abs( piOrg[42] - piCur[42] - iDeltaC ); 2092 uiSum += abs( piOrg[43] - piCur[43] - iDeltaC ); 2093 uiSum += abs( piOrg[44] - piCur[44] - iDeltaC ); 2094 uiSum += abs( piOrg[45] - piCur[45] - iDeltaC ); 2095 uiSum += abs( piOrg[46] - piCur[46] - iDeltaC ); 2096 uiSum += abs( piOrg[47] - piCur[47] - iDeltaC ); 2097 uiSum += abs( piOrg[48] - piCur[48] - iDeltaC ); 2098 uiSum += abs( piOrg[49] - piCur[49] - iDeltaC ); 2099 uiSum += abs( piOrg[50] - piCur[50] - iDeltaC ); 2100 uiSum += abs( piOrg[51] - piCur[51] - iDeltaC ); 2101 uiSum += abs( piOrg[52] - piCur[52] - iDeltaC ); 2102 uiSum += abs( piOrg[53] - piCur[53] - iDeltaC ); 2103 uiSum += abs( piOrg[54] - piCur[54] - iDeltaC ); 2104 uiSum += abs( piOrg[55] - piCur[55] - iDeltaC ); 2105 uiSum += abs( piOrg[56] - piCur[56] - iDeltaC ); 2106 uiSum += abs( piOrg[57] - piCur[57] - iDeltaC ); 2107 uiSum += abs( piOrg[58] - piCur[58] - iDeltaC ); 2108 uiSum += abs( piOrg[59] - piCur[59] - iDeltaC ); 2109 uiSum += abs( piOrg[60] - piCur[60] - iDeltaC ); 2110 uiSum += abs( piOrg[61] - piCur[61] - iDeltaC ); 2111 uiSum += abs( piOrg[62] - piCur[62] - iDeltaC ); 2112 uiSum += abs( piOrg[63] - piCur[63] - iDeltaC ); 2113 2114 piOrg += iStrideOrg; 2115 piCur += iStrideCur; 2116 } 2117 2118 uiSum <<= iSubShift; 2119 return ( uiSum >> g_uiBitIncrement ); 2120 } 2121 2122 #if AMP_SAD 2123 UInt TComRdCost::xGetSAD48ic( DistParam* pcDtParam ) 2124 { 2125 if ( pcDtParam->bApplyWeight ) 2126 { 2127 return xGetSADw( pcDtParam ); 2128 } 2129 Pel* piOrg = pcDtParam->pOrg; 2130 Pel* piCur = pcDtParam->pCur; 2131 Int iRows = pcDtParam->iRows; 2132 Int iSubShift = pcDtParam->iSubShift; 2133 Int iSubStep = ( 1 << iSubShift ); 2134 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 2135 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 2136 2137 UInt uiSum = 0; 2138 2139 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 2140 Int iDeltaC; 2141 2142 for( ; iRows != 0; iRows-=iSubStep ) 2143 { 2144 iOrigAvg += piOrg[0] ; 2145 iOrigAvg += piOrg[1] ; 2146 iOrigAvg += piOrg[2] ; 2147 iOrigAvg += piOrg[3] ; 2148 iOrigAvg += piOrg[4] ; 2149 iOrigAvg += piOrg[5] ; 2150 iOrigAvg += piOrg[6] ; 2151 iOrigAvg += piOrg[7] ; 2152 iOrigAvg += piOrg[8] ; 2153 iOrigAvg += piOrg[9] ; 2154 iOrigAvg += piOrg[10] ; 2155 iOrigAvg += piOrg[11] ; 2156 iOrigAvg += piOrg[12] ; 2157 iOrigAvg += piOrg[13] ; 2158 iOrigAvg += piOrg[14] ; 2159 iOrigAvg += piOrg[15] ; 2160 iOrigAvg += piOrg[16] ; 2161 iOrigAvg += piOrg[17] ; 2162 iOrigAvg += piOrg[18] ; 2163 iOrigAvg += piOrg[19] ; 2164 iOrigAvg += piOrg[20] ; 2165 iOrigAvg += piOrg[21] ; 2166 iOrigAvg += piOrg[22] ; 2167 iOrigAvg += piOrg[23] ; 2168 iOrigAvg += piOrg[24] ; 2169 iOrigAvg += piOrg[25] ; 2170 iOrigAvg += piOrg[26] ; 2171 iOrigAvg += piOrg[27] ; 2172 iOrigAvg += piOrg[28] ; 2173 iOrigAvg += piOrg[29] ; 2174 iOrigAvg += piOrg[30] ; 2175 iOrigAvg += piOrg[31] ; 2176 iOrigAvg += piOrg[32] ; 2177 iOrigAvg += piOrg[33] ; 2178 iOrigAvg += piOrg[34] ; 2179 iOrigAvg += piOrg[35] ; 2180 iOrigAvg += piOrg[36] ; 2181 iOrigAvg += piOrg[37] ; 2182 iOrigAvg += piOrg[38] ; 2183 iOrigAvg += piOrg[39] ; 2184 iOrigAvg += piOrg[40] ; 2185 iOrigAvg += piOrg[41] ; 2186 iOrigAvg += piOrg[42] ; 2187 iOrigAvg += piOrg[43] ; 2188 iOrigAvg += piOrg[44] ; 2189 iOrigAvg += piOrg[45] ; 2190 iOrigAvg += piOrg[46] ; 2191 iOrigAvg += piOrg[47] ; 2192 2193 iCurAvg += piCur[0] ; 2194 iCurAvg += piCur[1] ; 2195 iCurAvg += piCur[2] ; 2196 iCurAvg += piCur[3] ; 2197 iCurAvg += piCur[4] ; 2198 iCurAvg += piCur[5] ; 2199 iCurAvg += piCur[6] ; 2200 iCurAvg += piCur[7] ; 2201 iCurAvg += piCur[8] ; 2202 iCurAvg += piCur[9] ; 2203 iCurAvg += piCur[10] ; 2204 iCurAvg += piCur[11] ; 2205 iCurAvg += piCur[12] ; 2206 iCurAvg += piCur[13] ; 2207 iCurAvg += piCur[14] ; 2208 iCurAvg += piCur[15] ; 2209 iCurAvg += piCur[16] ; 2210 iCurAvg += piCur[17] ; 2211 iCurAvg += piCur[18] ; 2212 iCurAvg += piCur[19] ; 2213 iCurAvg += piCur[20] ; 2214 iCurAvg += piCur[21] ; 2215 iCurAvg += piCur[22] ; 2216 iCurAvg += piCur[23] ; 2217 iCurAvg += piCur[24] ; 2218 iCurAvg += piCur[25] ; 2219 iCurAvg += piCur[26] ; 2220 iCurAvg += piCur[27] ; 2221 iCurAvg += piCur[28] ; 2222 iCurAvg += piCur[29] ; 2223 iCurAvg += piCur[30] ; 2224 iCurAvg += piCur[31] ; 2225 iCurAvg += piCur[32] ; 2226 iCurAvg += piCur[33] ; 2227 iCurAvg += piCur[34] ; 2228 iCurAvg += piCur[35] ; 2229 iCurAvg += piCur[36] ; 2230 iCurAvg += piCur[37] ; 2231 iCurAvg += piCur[38] ; 2232 iCurAvg += piCur[39] ; 2233 iCurAvg += piCur[40] ; 2234 iCurAvg += piCur[41] ; 2235 iCurAvg += piCur[42] ; 2236 iCurAvg += piCur[43] ; 2237 iCurAvg += piCur[44] ; 2238 iCurAvg += piCur[45] ; 2239 iCurAvg += piCur[46] ; 2240 iCurAvg += piCur[47] ; 2241 2242 piOrg += iStrideOrg; 2243 piCur += iStrideCur; 2244 uiRowCnt++; 2245 } 2246 2247 piOrg = pcDtParam->pOrg; 2248 piCur = pcDtParam->pCur; 2249 iRows = pcDtParam->iRows; 2250 2251 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/48) : 0; 2252 2253 for( ; iRows != 0; iRows-=iSubStep ) 2254 { 2255 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 2256 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 2257 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 2258 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 2259 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 2260 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 2261 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 2262 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 2263 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 2264 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 2265 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 2266 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 2267 uiSum += abs( piOrg[12] - piCur[12] - iDeltaC ); 2268 uiSum += abs( piOrg[13] - piCur[13] - iDeltaC ); 2269 uiSum += abs( piOrg[14] - piCur[14] - iDeltaC ); 2270 uiSum += abs( piOrg[15] - piCur[15] - iDeltaC ); 2271 uiSum += abs( piOrg[16] - piCur[16] - iDeltaC ); 2272 uiSum += abs( piOrg[17] - piCur[17] - iDeltaC ); 2273 uiSum += abs( piOrg[18] - piCur[18] - iDeltaC ); 2274 uiSum += abs( piOrg[19] - piCur[19] - iDeltaC ); 2275 uiSum += abs( piOrg[20] - piCur[20] - iDeltaC ); 2276 uiSum += abs( piOrg[21] - piCur[21] - iDeltaC ); 2277 uiSum += abs( piOrg[22] - piCur[22] - iDeltaC ); 2278 uiSum += abs( piOrg[23] - piCur[23] - iDeltaC ); 2279 uiSum += abs( piOrg[24] - piCur[24] - iDeltaC ); 2280 uiSum += abs( piOrg[25] - piCur[25] - iDeltaC ); 2281 uiSum += abs( piOrg[26] - piCur[26] - iDeltaC ); 2282 uiSum += abs( piOrg[27] - piCur[27] - iDeltaC ); 2283 uiSum += abs( piOrg[28] - piCur[28] - iDeltaC ); 2284 uiSum += abs( piOrg[29] - piCur[29] - iDeltaC ); 2285 uiSum += abs( piOrg[30] - piCur[30] - iDeltaC ); 2286 uiSum += abs( piOrg[31] - piCur[31] - iDeltaC ); 2287 uiSum += abs( piOrg[32] - piCur[32] - iDeltaC ); 2288 uiSum += abs( piOrg[33] - piCur[33] - iDeltaC ); 2289 uiSum += abs( piOrg[34] - piCur[34] - iDeltaC ); 2290 uiSum += abs( piOrg[35] - piCur[35] - iDeltaC ); 2291 uiSum += abs( piOrg[36] - piCur[36] - iDeltaC ); 2292 uiSum += abs( piOrg[37] - piCur[37] - iDeltaC ); 2293 uiSum += abs( piOrg[38] - piCur[38] - iDeltaC ); 2294 uiSum += abs( piOrg[39] - piCur[39] - iDeltaC ); 2295 uiSum += abs( piOrg[40] - piCur[40] - iDeltaC ); 2296 uiSum += abs( piOrg[41] - piCur[41] - iDeltaC ); 2297 uiSum += abs( piOrg[42] - piCur[42] - iDeltaC ); 2298 uiSum += abs( piOrg[43] - piCur[43] - iDeltaC ); 2299 uiSum += abs( piOrg[44] - piCur[44] - iDeltaC ); 2300 uiSum += abs( piOrg[45] - piCur[45] - iDeltaC ); 2301 uiSum += abs( piOrg[46] - piCur[46] - iDeltaC ); 2302 uiSum += abs( piOrg[47] - piCur[47] - iDeltaC ); 2303 2304 piOrg += iStrideOrg; 2305 piCur += iStrideCur; 2306 } 2307 2308 uiSum <<= iSubShift; 2309 return ( uiSum >> g_uiBitIncrement ); 2310 } 2311 #endif 1112 2312 #endif 1113 2313 … … 2826 4026 return xGetHADsw( pcDtParam ); 2827 4027 } 4028 #if LGE_ILLUCOMP_B0045 4029 if(pcDtParam->bUseIC) 4030 { 4031 return xGetHADsic( pcDtParam ); 4032 } 4033 #endif 2828 4034 Pel* piOrg = pcDtParam->pOrg; 2829 4035 Pel* piCur = pcDtParam->pCur; … … 2833 4039 Int iStrideOrg = pcDtParam->iStrideOrg; 2834 4040 Int iStep = pcDtParam->iStep; 2835 4041 2836 4042 Int x, y; 2837 2838 UInt uiSum = 0; 2839 4043 4044 UInt uiSum = 0; 4045 2840 4046 #if NS_HAD 2841 4047 if( ( ( iRows % 8 == 0) && (iCols % 8 == 0) && ( iRows == iCols ) ) || ( ( iRows % 8 == 0 ) && (iCols % 8 == 0) && !pcDtParam->bUseNSHAD ) ) … … 2890 4096 Int iOffsetOrg = iStrideOrg<<2; 2891 4097 Int iOffsetCur = iStrideCur<<2; 2892 4098 2893 4099 for ( y=0; y<iRows; y+= 4 ) 2894 4100 { … … 2919 4125 assert(false); 2920 4126 } 2921 4127 2922 4128 return ( uiSum >> g_uiBitIncrement ); 2923 4129 } 4130 4131 #if LGE_ILLUCOMP_B0045 4132 UInt TComRdCost::xGetHADsic( DistParam* pcDtParam ) 4133 { 4134 if ( pcDtParam->bApplyWeight ) 4135 { 4136 return xGetHADsw( pcDtParam ); 4137 } 4138 Pel* piOrg = pcDtParam->pOrg; 4139 Pel* piCur = pcDtParam->pCur; 4140 Int iRows = pcDtParam->iRows; 4141 Int iCols = pcDtParam->iCols; 4142 Int iStrideCur = pcDtParam->iStrideCur; 4143 Int iStrideOrg = pcDtParam->iStrideOrg; 4144 Int iStep = pcDtParam->iStep; 4145 4146 Int x, y; 4147 4148 UInt uiSum = 0; 4149 4150 Int iOrigAvg = 0, iCurAvg = 0; 4151 Int iDeltaC; 4152 4153 for ( y=0; y<iRows; y++ ) 4154 { 4155 for ( x=0; x<iCols; x++ ) 4156 { 4157 iOrigAvg += piOrg[x]; 4158 iCurAvg += piCur[x]; 4159 } 4160 piOrg += iStrideOrg; 4161 piCur += iStrideCur; 4162 } 4163 4164 piOrg = pcDtParam->pOrg; 4165 piCur = pcDtParam->pCur; 4166 4167 iDeltaC = (iOrigAvg - iCurAvg)/iRows/iCols; 4168 4169 for ( y=0; y<iRows; y++ ) 4170 { 4171 for ( x=0; x<iCols; x++ ) 4172 { 4173 piOrg[x] -= iDeltaC; 4174 } 4175 piOrg += iStrideOrg; 4176 } 4177 4178 piOrg = pcDtParam->pOrg; 4179 4180 #if NS_HAD 4181 if( ( ( iRows % 8 == 0) && (iCols % 8 == 0) && ( iRows == iCols ) ) || ( ( iRows % 8 == 0 ) && (iCols % 8 == 0) && !pcDtParam->bUseNSHAD ) ) 4182 #else 4183 if( ( iRows % 8 == 0) && (iCols % 8 == 0) ) 4184 #endif 4185 { 4186 Int iOffsetOrg = iStrideOrg<<3; 4187 Int iOffsetCur = iStrideCur<<3; 4188 for ( y=0; y<iRows; y+= 8 ) 4189 { 4190 for ( x=0; x<iCols; x+= 8 ) 4191 { 4192 uiSum += xCalcHADs8x8( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 4193 } 4194 piOrg += iOffsetOrg; 4195 piCur += iOffsetCur; 4196 } 4197 } 4198 #if NS_HAD 4199 else if ( ( iCols > 8 ) && ( iCols > iRows ) && pcDtParam->bUseNSHAD ) 4200 { 4201 Int iOffsetOrg = iStrideOrg<<2; 4202 Int iOffsetCur = iStrideCur<<2; 4203 for ( y=0; y<iRows; y+= 4 ) 4204 { 4205 for ( x=0; x<iCols; x+= 16 ) 4206 { 4207 uiSum += xCalcHADs16x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 4208 } 4209 piOrg += iOffsetOrg; 4210 piCur += iOffsetCur; 4211 } 4212 } 4213 else if ( ( iRows > 8 ) && ( iCols < iRows ) && pcDtParam->bUseNSHAD ) 4214 { 4215 Int iOffsetOrg = iStrideOrg<<4; 4216 Int iOffsetCur = iStrideCur<<4; 4217 for ( y=0; y<iRows; y+= 16 ) 4218 { 4219 for ( x=0; x<iCols; x+= 4 ) 4220 { 4221 uiSum += xCalcHADs4x16( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 4222 } 4223 piOrg += iOffsetOrg; 4224 piCur += iOffsetCur; 4225 } 4226 } 4227 #endif 4228 else if( ( iRows % 4 == 0) && (iCols % 4 == 0) ) 4229 { 4230 Int iOffsetOrg = iStrideOrg<<2; 4231 Int iOffsetCur = iStrideCur<<2; 4232 4233 for ( y=0; y<iRows; y+= 4 ) 4234 { 4235 for ( x=0; x<iCols; x+= 4 ) 4236 { 4237 uiSum += xCalcHADs4x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 4238 } 4239 piOrg += iOffsetOrg; 4240 piCur += iOffsetCur; 4241 } 4242 } 4243 else if( ( iRows % 2 == 0) && (iCols % 2 == 0) ) 4244 { 4245 Int iOffsetOrg = iStrideOrg<<1; 4246 Int iOffsetCur = iStrideCur<<1; 4247 for ( y=0; y<iRows; y+=2 ) 4248 { 4249 for ( x=0; x<iCols; x+=2 ) 4250 { 4251 uiSum += xCalcHADs2x2( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 4252 } 4253 piOrg += iOffsetOrg; 4254 piCur += iOffsetCur; 4255 } 4256 } 4257 else 4258 { 4259 assert(false); 4260 } 4261 4262 piOrg = pcDtParam->pOrg; 4263 4264 for ( y=0; y<iRows; y++ ) 4265 { 4266 for ( x=0; x<iCols; x++ ) 4267 { 4268 piOrg[x] += iDeltaC; 4269 } 4270 piOrg += iStrideOrg; 4271 } 4272 4273 return ( uiSum >> g_uiBitIncrement ); 4274 } 4275 #endif 2924 4276 2925 4277 #if HHI_VSO -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRdCost.h
r193 r213 88 88 Int iCols; 89 89 Int iStep; 90 #if LGE_ILLUCOMP_B0045 91 Bool bUseIC; 92 #endif 90 93 FpDistFunc DistFunc; 91 94 … … 302 305 private: 303 306 307 #if LGE_ILLUCOMP_B0045 308 static UInt xGetSADic ( DistParam* pcDtParam ); 309 static UInt xGetSAD4ic ( DistParam* pcDtParam ); 310 static UInt xGetSAD8ic ( DistParam* pcDtParam ); 311 static UInt xGetSAD16ic ( DistParam* pcDtParam ); 312 static UInt xGetSAD32ic ( DistParam* pcDtParam ); 313 static UInt xGetSAD64ic ( DistParam* pcDtParam ); 314 static UInt xGetSAD16Nic ( DistParam* pcDtParam ); 315 #endif 304 316 static UInt xGetSSE ( DistParam* pcDtParam ); 305 317 static UInt xGetSSE4 ( DistParam* pcDtParam ); … … 329 341 330 342 #if AMP_SAD 343 #if LGE_ILLUCOMP_B0045 344 static UInt xGetSAD12ic ( DistParam* pcDtParam ); 345 static UInt xGetSAD24ic ( DistParam* pcDtParam ); 346 static UInt xGetSAD48ic ( DistParam* pcDtParam ); 347 #endif 331 348 static UInt xGetSAD12 ( DistParam* pcDtParam ); 332 349 static UInt xGetSAD24 ( DistParam* pcDtParam ); 333 350 static UInt xGetSAD48 ( DistParam* pcDtParam ); 334 335 #endif 336 351 #endif 352 353 #if LGE_ILLUCOMP_B0045 354 static UInt xGetHADsic ( DistParam* pcDtParam ); 355 #endif 337 356 static UInt xGetHADs4 ( DistParam* pcDtParam ); 338 357 static UInt xGetHADs8 ( DistParam* pcDtParam ); 339 358 static UInt xGetHADs ( DistParam* pcDtParam ); 359 340 360 static UInt xCalcHADs2x2 ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); 341 361 static UInt xCalcHADs4x4 ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComResidualGenerator.cpp
r166 r213 219 219 } 220 220 221 #if QC_MULTI_DIS_CAN 221 #if QC_MULTI_DIS_CAN_A0097 222 222 Bool 223 223 TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, Int iDisp … … 243 243 iBlkHeight = pcCU->getHeight ( 0 ); 244 244 pcCU->getPic()->getPicYuvRec()->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iXPos, iYPos ); 245 #if QC_MULTI_DIS_CAN 245 #if QC_MULTI_DIS_CAN_A0097 246 246 return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv, iDisp 247 247 #if QC_SIMPLIFIEDIVRP_M24938 … … 258 258 } 259 259 260 #if QC_MULTI_DIS_CAN 260 #if QC_MULTI_DIS_CAN_A0097 261 261 Bool 262 262 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp … … 283 283 UInt uiXPosInRefView = uiXPos , uiYPosInRefView = uiYPos; 284 284 #endif 285 #if QC_MULTI_DIS_CAN 285 #if QC_MULTI_DIS_CAN_A0097 286 286 xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv, iDisp 287 287 #if QC_SIMPLIFIEDIVRP_M24938 … … 522 522 523 523 524 #if QC_MULTI_DIS_CAN 524 #if QC_MULTI_DIS_CAN_A0097 525 525 Void 526 526 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp … … 553 553 554 554 //===== get disparity ===== 555 #if QC_MULTI_DIS_CAN 555 #if QC_MULTI_DIS_CAN_A0097 556 556 Int iDisparity = iDisp; 557 557 #else -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComResidualGenerator.h
r100 r213 69 69 Void setRecResidualPic ( TComPic* pcPic ); 70 70 71 #if QC_MULTI_DIS_CAN 71 #if QC_MULTI_DIS_CAN_A0097 72 72 Bool getResidualSamples ( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, Int iDisp 73 73 #if QC_SIMPLIFIEDIVRP_M24938 … … 100 100 Void xClearIntViewResidual ( TComDataCU* pcCU, TComYuv* pcCUResidual, UInt uiPartIdx ); 101 101 Void xClearResidual ( TComYuv* pcCUResidual, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight ); 102 #if QC_MULTI_DIS_CAN 102 #if QC_MULTI_DIS_CAN_A0097 103 103 Void xSetPredResidualBlock ( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp 104 104 #if QC_SIMPLIFIEDIVRP_M24938 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRom.cpp
r77 r213 174 174 g_aacWedgeRefLists.clear(); 175 175 } 176 #if HHIQC_DMMFASTSEARCH_B0039 177 if ( !g_aacWedgeNodeLists.empty() ) 178 { 179 for ( UInt ui = 0; ui < g_aacWedgeNodeLists.size(); ui++ ) 180 { 181 g_aacWedgeNodeLists[ui].clear(); 182 } 183 g_aacWedgeNodeLists.clear(); 184 } 185 #endif 176 186 #endif 177 187 } … … 295 305 }; 296 306 307 #if RWTH_SDC_DLT_B0036 308 UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, DMM_WEDGE_PREDDIR_IDX, PLANAR_IDX }; 309 #endif 297 310 298 311 Int g_quantScales[6] = … … 1170 1183 std::vector< std::vector<TComWedgeRef> > g_aacWedgeRefLists; 1171 1184 1185 #if HHIQC_DMMFASTSEARCH_B0039 1186 std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3; 1187 std::vector< std::vector< TComWedgeNode> > g_aacWedgeNodeLists; 1188 #endif 1189 1172 1190 Void initWedgeLists() 1173 1191 { … … 1180 1198 g_aacWedgeLists.push_back( acWedgeList ); 1181 1199 g_aacWedgeRefLists.push_back( acWedgeRefList ); 1200 1201 #if HHIQC_DMMFASTSEARCH_B0039 1202 // create WedgeNodeList 1203 std::vector<TComWedgeNode> acWedgeNodeList; 1204 for( UInt uiPos = 0; uiPos < acWedgeList.size(); uiPos++ ) 1205 { 1206 if( acWedgeList[uiPos].getIsCoarse() ) 1207 { 1208 TComWedgeNode cWedgeNode; 1209 cWedgeNode.setPatternIdx( uiPos ); 1210 1211 // set refinement idxs 1212 UInt uiRefPos = 0; 1213 for( Int iOffS = -1; iOffS <= 1; iOffS++ ) 1214 { 1215 for( Int iOffE = -1; iOffE <= 1; iOffE++ ) 1216 { 1217 if( iOffS == 0 && iOffE == 0 ) { continue; } 1218 1219 Int iSx = (Int)acWedgeList[uiPos].getStartX(); 1220 Int iSy = (Int)acWedgeList[uiPos].getStartY(); 1221 Int iEx = (Int)acWedgeList[uiPos].getEndX(); 1222 Int iEy = (Int)acWedgeList[uiPos].getEndY(); 1223 1224 switch( acWedgeList[uiPos].getOri() ) 1225 { 1226 case( 0 ): { iSx += iOffS; iEy += iOffE; } break; 1227 case( 1 ): { iSy += iOffS; iEx -= iOffE; } break; 1228 case( 2 ): { iSx -= iOffS; iEy -= iOffE; } break; 1229 case( 3 ): { iSy -= iOffS; iEx += iOffE; } break; 1230 case( 4 ): { iSx += iOffS; iEx += iOffE; } break; 1231 case( 5 ): { iSy += iOffS; iEy += iOffE; } break; 1232 default: assert( 0 ); 1233 } 1234 1235 for( UInt k = 0; k < acWedgeRefList.size(); k++ ) 1236 { 1237 if( iSx == (Int)acWedgeRefList[k].getStartX() && 1238 iSy == (Int)acWedgeRefList[k].getStartY() && 1239 iEx == (Int)acWedgeRefList[k].getEndX() && 1240 iEy == (Int)acWedgeRefList[k].getEndY() ) 1241 { 1242 if( acWedgeRefList[k].getRefIdx() != cWedgeNode.getPatternIdx() ) 1243 { 1244 Bool bNew = true; 1245 for( UInt m = 0; m < uiRefPos; m++ ) { if( acWedgeRefList[k].getRefIdx() == cWedgeNode.getRefineIdx( m ) ) { bNew = false; break; } } 1246 1247 if( bNew ) 1248 { 1249 cWedgeNode.setRefineIdx( acWedgeRefList[k].getRefIdx(), uiRefPos ); 1250 uiRefPos++; 1251 break; 1252 } 1253 } 1254 } 1255 } 1256 } 1257 } 1258 acWedgeNodeList.push_back( cWedgeNode ); 1259 } 1260 } 1261 g_aacWedgeNodeLists.push_back( acWedgeNodeList ); 1262 #endif 1182 1263 } 1183 1264 return; … … 1217 1298 for( Int iL = 0; iL < uiBlockSize; iL++ ) 1218 1299 { 1300 #if HHIQC_DMMFASTSEARCH_B0039 1301 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 1302 #else 1219 1303 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes ); 1304 #endif 1220 1305 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 1221 1306 } 1222 1307 } 1223 1308 } 1309 #if HHIQC_DMMFASTSEARCH_B0039 1310 UInt uiThrSz = DMM3_SIMPLIFY_TR; 1311 1312 std::vector< std::vector<UInt> > auiWdgListSz; 1313 for( Int idxM=2; idxM<=34 ; idxM++) 1314 { 1315 std::vector<UInt> auiWdgList; 1316 for( Int idxW=0; idxW<racWedgeList.size(); idxW++) 1317 { 1318 UInt uiAbsDiff = abs(idxM-(Int)racWedgeList[idxW].getAng()); 1319 if( uiAbsDiff <= uiThrSz ) 1320 { 1321 auiWdgList.push_back(idxW); 1322 } 1323 } 1324 auiWdgListSz.push_back(auiWdgList); 1325 } 1326 g_aauiWdgLstM3.push_back(auiWdgListSz); 1327 #endif 1224 1328 } 1225 1329 … … 1257 1361 if( bValid ) 1258 1362 { 1363 #if HHIQC_DMMFASTSEARCH_B0039 1364 cWedgelet.findClosetAngle(); 1365 #endif 1259 1366 racWedgeList.push_back( cWedgelet ); 1260 1367 TComWedgeRef cWedgeRef; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRom.h
r100 r213 193 193 extern std::vector< std::vector<TComWedgeRef> > g_aacWedgeRefLists; 194 194 195 #if HHIQC_DMMFASTSEARCH_B0039 196 extern std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3; 197 extern std::vector< std::vector<TComWedgeNode> > g_aacWedgeNodeLists; 198 #endif 199 200 #if RWTH_SDC_DLT_B0036 201 #define RWTH_SDC_NUM_PRED_MODES 4 202 extern UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES]; 203 #endif 204 195 205 Void initWedgeLists(); 196 206 Void createWedgeList( UInt uiWidth, UInt uiHeight, std::vector<TComWedgelet> &racWedgeList, std::vector<TComWedgeRef> &racWedgeRefList, WedgeResolution eWedgeRes ); … … 206 216 #endif 207 217 208 #if LGE_EDGE_INTRA 218 #if LGE_EDGE_INTRA_A0070 209 219 __inline Void mapEdgeIntratoDC( UChar& curDir ) { curDir = (curDir >= EDGE_INTRA_IDX) ? DC_IDX : curDir; } 210 220 __inline Void mapEdgeIntratoDC( UInt& curDir ) { curDir = (curDir >= EDGE_INTRA_IDX) ? DC_IDX : curDir; } -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComSlice.cpp
r193 r213 44 44 45 45 TComSlice::TComSlice() 46 #if QC_MVHEVC_B0046 47 : m_iPPSId ( 0 ) 48 #else 46 49 : m_iPPSId ( -1 ) 50 #endif 47 51 , m_iPOC ( 0 ) 48 52 , m_iLastIDR ( 0 ) … … 112 116 , m_iViewOrderIdx ( 0 ) 113 117 #endif 118 #if LGE_ILLUCOMP_B0045 119 , m_bApplyIC ( false ) 120 #endif 114 121 #if VSP_CFG 115 122 , m_uiNumVspRefPics ( 0 ) … … 146 153 resetWpScalingLC(m_weightPredTableLC); 147 154 initWpAcDcParam(); 155 #if QC_IV_AS_LT_B0046 156 for(Int iNumCount = 0; iNumCount < MAX_NUM_REF+1; iNumCount++) 157 { 158 m_bWasLongTerm[0][iNumCount] = false; 159 m_bWasLongTerm[1][iNumCount] = false; 160 } 161 #endif 148 162 149 163 #if VSP_SLICE_HEADER … … 507 521 { 508 522 pcRefPic = xGetInterViewRefPic( rapcInterViewRefPics, getViewId() + m_pcSPS->getUsableInterViewRef(i) ); 523 #if QC_IV_AS_LT_B0046 524 pcRefPic->setIsLongTerm( 1 ); 525 #else 509 526 pcRefPic->setIsLongTerm( 0 ); 527 #endif 510 528 pcRefPic->getPicYuvRec()->extendPicBorder(); 511 529 RefPicSetIvCurr[NumPocIvCurr] = pcRefPic; … … 590 608 #endif 591 609 } 610 #if QC_IV_AS_LT_B0046 611 setWasLongTerm(m_apcRefPicList[0][cIdx]->getIsLongTerm(), REF_PIC_LIST_0, cIdx); 612 #endif 592 613 #else 593 614 m_apcRefPicList[0][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? refPicListTemp0[ m_RefPicListModification.getRefPicSetIdxL0(cIdx) ] : refPicListTemp0[cIdx]; 615 #if QC_IV_AS_LT_B0046 616 setWasLongTerm(m_apcRefPicList[0][cIdx]->getIsLongTerm(), REF_PIC_LIST_0, cIdx); 617 #endif 594 618 #endif 595 619 } … … 630 654 #endif 631 655 } 656 #if QC_IV_AS_LT_B0046 657 setWasLongTerm(m_apcRefPicList[1][cIdx]->getIsLongTerm(), REF_PIC_LIST_1, cIdx); 658 #endif 632 659 #else 633 660 m_apcRefPicList[1][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? refPicListTemp1[ m_RefPicListModification.getRefPicSetIdxL1(cIdx) ] : refPicListTemp1[cIdx]; 661 #if QC_IV_AS_LT_B0046 662 setWasLongTerm(m_apcRefPicList[1][cIdx]->getIsLongTerm(), REF_PIC_LIST_1, cIdx); 663 #endif 634 664 #endif 635 665 } … … 985 1015 for(i=0;i<pReferencePictureSet->getNumberOfPositivePictures()+pReferencePictureSet->getNumberOfNegativePictures();i++) 986 1016 { 1017 #if QC_IV_AS_LT_B0046 1018 if( rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i)) 1019 #else 987 1020 if(!rpcPic->getIsLongTerm() && rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i)) 1021 #endif 988 1022 { 989 1023 isReference = 1; … … 995 1029 for(;i<pReferencePictureSet->getNumberOfPictures();i++) 996 1030 { 1031 #if QC_IV_AS_LT_B0046 1032 if( (rpcPic->getPicSym()->getSlice(0)->getPOC()%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) == pReferencePictureSet->getPOC(i)%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) 1033 #else 997 1034 if(rpcPic->getIsLongTerm() && (rpcPic->getPicSym()->getSlice(0)->getPOC()%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) == pReferencePictureSet->getPOC(i)%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) 1035 #endif 998 1036 { 999 1037 isReference = 1; … … 1417 1455 } 1418 1456 1457 #if LGE_ILLUCOMP_B0045 1458 Void TComSlice::xSetApplyIC() // comment (S.Shimizu): better to support multiple inter-view reference frames (= write one flag for each inter-view reference frame including VSP ref)? 1459 { 1460 Int iMaxPelValue = (1<<g_uiBitDepth); 1461 Int *aiRefOrgHist; 1462 Int *aiCurrHist; 1463 aiRefOrgHist = new Int; 1464 aiCurrHist = new Int; 1465 aiRefOrgHist = (Int *)xMalloc(Int,iMaxPelValue); 1466 aiCurrHist = (Int *)xMalloc(Int,iMaxPelValue); 1467 memset(aiRefOrgHist, 0, iMaxPelValue*sizeof(Int) ); 1468 memset(aiCurrHist, 0, iMaxPelValue*sizeof(Int) ); 1469 // Reference Idx Number 1470 Int iNumRefIdx = getNumRefIdx( REF_PIC_LIST_0 ); 1471 TComPic* pcCurrPic = NULL; 1472 TComPic* pcRefPic = NULL; 1473 TComPicYuv* pcCurrPicYuv = NULL; 1474 TComPicYuv* pcRefPicYuvOrg = NULL; 1475 pcCurrPic = getPic(); 1476 pcCurrPicYuv = pcCurrPic->getPicYuvOrg(); 1477 Int iWidth = pcCurrPicYuv->getWidth(); 1478 Int iHeight = pcCurrPicYuv->getHeight(); 1479 1480 1481 // Get InterView Reference picture 1482 // !!!!! Assume only one Interview Reference Picture in L0 1483 for (Int i = 0; i < iNumRefIdx; i++) 1484 { 1485 pcRefPic = getRefPic( REF_PIC_LIST_0, i); 1486 if (pcRefPic != NULL) 1487 { 1488 // Current Picture 1489 if (pcCurrPic->getViewId() != pcRefPic->getViewId()) 1490 { 1491 pcRefPicYuvOrg = pcRefPic->getPicYuvOrg(); 1492 } 1493 } 1494 } 1495 if (pcRefPicYuvOrg != NULL) 1496 { 1497 Pel* pCurrY = pcCurrPicYuv ->getLumaAddr(); 1498 Pel* pRefOrgY = pcRefPicYuvOrg ->getLumaAddr(); 1499 Int iCurrStride = pcCurrPicYuv->getStride(); 1500 Int iRefStride = pcRefPicYuvOrg->getStride(); 1501 Int iSumOrgSAD = 0; 1502 double dThresholdOrgSAD = 0.05; 1503 // Histogram building - luminance 1504 for ( Int y = 0; y < iHeight; y++) 1505 { 1506 for ( Int x = 0; x < iWidth; x++) 1507 { 1508 aiCurrHist[pCurrY[x]]++; 1509 aiRefOrgHist[pRefOrgY[x]]++; 1510 } 1511 pCurrY += iCurrStride; 1512 pRefOrgY += iRefStride; 1513 } 1514 // Calc SAD 1515 for (Int i = 0; i < iMaxPelValue; i++) 1516 { 1517 iSumOrgSAD += abs(aiCurrHist[i] - aiRefOrgHist[i]); 1518 } 1519 // Setting 1520 if ( iSumOrgSAD > Int(dThresholdOrgSAD * iWidth * iHeight) ) 1521 { 1522 m_bApplyIC = true; 1523 } 1524 else 1525 { 1526 m_bApplyIC = false; 1527 } 1528 } 1529 xFree(aiCurrHist); 1530 xFree(aiRefOrgHist); 1531 aiCurrHist = NULL; 1532 aiRefOrgHist = NULL; 1533 } 1534 #endif 1535 1419 1536 // ------------------------------------------------------------------------------------------------ 1420 1537 // Video parameter set (VPS) 1421 1538 // ------------------------------------------------------------------------------------------------ 1539 #if QC_MVHEVC_B0046 1540 TComVPS::TComVPS() 1541 : m_VPSId ( 0) 1542 , m_uiMaxTLayers ( 1) 1543 , m_uiMaxLayers ( 1) 1544 , m_bTemporalIdNestingFlag (false) 1545 , m_uiNumHRDParameter ( 0) 1546 , m_numAddiLayerOperationPoints (2) 1547 , m_numAddiProLevelSets ( 1) 1548 { 1549 for( Int i = 0; i < MAX_LAYER_NUM; i++) 1550 { 1551 m_numOpLayerIdMinus1[i] = 0; 1552 if(i) 1553 m_numDirectRefLayer[i] = 1; 1554 else 1555 m_numDirectRefLayer[i] = 0; 1556 for( Int j = 0; j < MAX_LAYER_NUM; j++) 1557 { 1558 m_numDirectRefID[i][j] = 0; 1559 m_numOpLayerId[i][j] = 0; 1560 } 1561 m_uiViewId[i] = 0; 1562 m_iViewOrderIdx[i] = 0; 1563 } 1564 1565 for( Int i = 0; i < MAX_TLAYER; i++) 1566 { 1567 m_numReorderPics[i] = 0; 1568 m_uiMaxDecPicBuffering[i] = 0; 1569 m_uiMaxLatencyIncrease[i] = 0; 1570 } 1571 } 1572 1573 TComVPS::~TComVPS() 1574 { 1575 } 1576 #else 1422 1577 #if VIDYO_VPS_INTEGRATION 1423 1578 TComVPS::TComVPS() … … 1452 1607 1453 1608 #endif 1454 1609 #endif 1455 1610 1456 1611 // ------------------------------------------------------------------------------------------------ … … 1459 1614 1460 1615 TComSPS::TComSPS() 1461 #if VIDYO_VPS_INTEGRATION 1616 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1462 1617 : m_VPSId ( 0) 1463 1618 , m_SPSId ( 0) … … 1511 1666 , m_bLCMod (false) 1512 1667 #if H0412_REF_PIC_LIST_RESTRICTION 1668 #if QC_MVHEVC_B0046 1669 , m_restrictedRefPicListsFlag ( 0) 1670 #else 1513 1671 , m_restrictedRefPicListsFlag ( 1) 1672 #endif 1514 1673 , m_listsModificationPresentFlag( 0) 1515 1674 #endif … … 1553 1712 , m_bUseDMM (false) 1554 1713 #endif 1555 #if OL_DEPTHLIMIT_A0044 1556 , m_bDepthPartitionLimiting (false) 1714 #if FLEX_CODING_ORDER_M23723 && HHI_DMM_PRED_TEX 1715 , m_bUseDMM34 (false) 1716 #endif 1717 #if OL_QTLIMIT_PREDCODING_B0068 1718 , m_bUseQTLPC (false) 1557 1719 #endif 1558 1720 #if VSP_N … … 1561 1723 , m_bVspDepthPresentFlag (false) 1562 1724 #endif 1725 , m_bIsFirstInView (false) 1563 1726 #endif 1564 1727 { … … 1593 1756 1594 1757 ::memset( m_aiUsableInterViewRefs, 0, sizeof( m_aiUsableInterViewRefs ) ); 1758 1759 #if RWTH_SDC_DLT_B0036 1760 m_bUseDLT = false; 1761 1762 m_uiBitsPerDepthValue = g_uiBitDepth; 1763 m_uiNumDepthmapValues = 0; 1764 m_uiDepthValue2Idx = NULL; 1765 m_uiIdx2DepthValue = NULL; 1766 #endif 1595 1767 } 1596 1768 … … 1608 1780 } 1609 1781 } 1782 1783 #if RWTH_SDC_DLT_B0036 1784 Void TComSPS::setDepthLUTs(UInt* uidx2DepthValue, UInt uiNumDepthValues) 1785 { 1786 UInt uiMaxDepthValue = g_uiIBDI_MAX; 1787 1788 // allocate some memory 1789 if( m_uiNumDepthmapValues == 0 ) 1790 { 1791 m_uiNumDepthmapValues = uiMaxDepthValue+1; 1792 m_uiBitsPerDepthValue = (UInt)ceil(Log2(m_uiNumDepthmapValues)); 1793 1794 m_uiDepthValue2Idx = (UInt*) xMalloc(UInt, m_uiNumDepthmapValues); 1795 m_uiIdx2DepthValue = (UInt*) xMalloc(UInt, m_uiNumDepthmapValues); 1796 1797 //default mapping 1798 for (Int i=0; i<m_uiNumDepthmapValues; i++) 1799 { 1800 m_uiDepthValue2Idx[i] = i; 1801 m_uiIdx2DepthValue[i] = i; 1802 } 1803 } 1804 1805 if( uidx2DepthValue == NULL || uiNumDepthValues == 0 ) // default mapping only 1806 return; 1807 1808 // copy idx2DepthValue to internal array 1809 memcpy(m_uiIdx2DepthValue, uidx2DepthValue, uiNumDepthValues*sizeof(UInt)); 1810 1811 for(Int p=0; p<=uiMaxDepthValue; p++) 1812 { 1813 Int iIdxDown = 0; 1814 Int iIdxUp = uiNumDepthValues-1; 1815 Bool bFound = false; 1816 1817 // iterate over indices to find lower closest depth 1818 Int i = 1; 1819 while(!bFound && i<uiNumDepthValues) 1820 { 1821 if( m_uiIdx2DepthValue[i] > p ) 1822 { 1823 iIdxDown = i-1; 1824 bFound = true; 1825 } 1826 1827 i++; 1828 } 1829 // iterate over indices to find upper closest depth 1830 i = uiNumDepthValues-2; 1831 bFound = false; 1832 while(!bFound && i>=0) 1833 { 1834 if( m_uiIdx2DepthValue[i] < p ) 1835 { 1836 iIdxUp = i+1; 1837 bFound = true; 1838 } 1839 1840 i--; 1841 } 1842 1843 // assert monotony 1844 assert(iIdxDown<=iIdxUp); 1845 1846 // assign closer depth value/idx 1847 if( abs(p-(Int)m_uiIdx2DepthValue[iIdxDown]) < abs(p-(Int)m_uiIdx2DepthValue[iIdxUp]) ) 1848 { 1849 m_uiDepthValue2Idx[p] = iIdxDown; 1850 } 1851 else 1852 { 1853 m_uiDepthValue2Idx[p] = iIdxUp; 1854 } 1855 1856 } 1857 1858 // update globals 1859 m_uiNumDepthmapValues = uiNumDepthValues; 1860 m_uiBitsPerDepthValue = (UInt)ceil(Log2(m_uiNumDepthmapValues)); 1861 } 1862 #endif 1610 1863 1611 1864 TComPPS::TComPPS() … … 1650 1903 , m_cabacInitPresentFlag (false) 1651 1904 , m_encCABACTableIdx (0) 1652 #if POZNAN_CABAC_INIT_FLAG_FIX1905 #if FIX_POZNAN_CABAC_INIT_FLAG 1653 1906 , m_encPrevPOC (0) 1654 1907 #endif … … 1680 1933 TComSPS::initMultiviewSPS( UInt uiViewId, Int iViewOrderIdx, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 1681 1934 { 1935 #if !QC_MVHEVC_B0046 1682 1936 AOT( uiViewId == 0 && iViewOrderIdx != 0 ); 1683 1937 AOT( uiViewId != 0 && iViewOrderIdx == 0 ); 1684 1938 AOT( uiViewId != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); 1685 1939 #endif 1686 1940 m_uiViewId = uiViewId; 1687 1941 m_iViewOrderIdx = iViewOrderIdx; … … 1691 1945 ::memset( m_aaiCodedScale, 0x00, sizeof( m_aaiCodedScale ) ); 1692 1946 ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) ); 1947 #if !QC_MVHEVC_B0046 1693 1948 if( !m_bCamParInSliceHeader ) 1694 1949 { … … 1701 1956 } 1702 1957 } 1958 #endif 1703 1959 } 1704 1960 … … 1717 1973 ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) ); 1718 1974 } 1975 1976 #if VSP_N 1977 Void 1978 TComSPS::initMultiviewSPSFlex( UInt uiViewId, Int iViewOrderIdx, Bool bDepth, Bool bPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 1979 { 1980 AOT( uiViewId == 0 && iViewOrderIdx != 0 ); 1981 AOT( uiViewId != 0 && iViewOrderIdx == 0 ); 1982 //AOT( uiViewId != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); 1983 1984 m_uiViewId = uiViewId; 1985 m_iViewOrderIdx = iViewOrderIdx; 1986 m_bDepth = bDepth; 1987 m_uiCamParPrecision = ( m_uiViewId && bPresent ? uiCamParPrecision : 0 ); 1988 m_bCamParInSliceHeader = ( m_uiViewId && bPresent ? bCamParSlice : false ); 1989 if( bPresent && !m_bCamParInSliceHeader ) 1990 { 1991 for( UInt uiBaseViewId = 0; uiBaseViewId < m_uiViewId; uiBaseViewId++ ) 1992 { 1993 m_aaiCodedScale [ 0 ][ uiBaseViewId ] = aaiScale [ uiBaseViewId ][ m_uiViewId ]; 1994 m_aaiCodedScale [ 1 ][ uiBaseViewId ] = aaiScale [ m_uiViewId ][ uiBaseViewId ]; 1995 m_aaiCodedOffset[ 0 ][ uiBaseViewId ] = aaiOffset[ uiBaseViewId ][ m_uiViewId ]; 1996 m_aaiCodedOffset[ 1 ][ uiBaseViewId ] = aaiOffset[ m_uiViewId ][ uiBaseViewId ]; 1997 } 1998 } 1999 } 2000 2001 Void 2002 TComSPS::copyCameraParameterPre( UInt uiCamParPrecision, Bool bCamParSlice ) 2003 { 2004 m_uiCamParPrecision = uiCamParPrecision; 2005 m_bCamParInSliceHeader = bCamParSlice; 2006 } 2007 Void 2008 TComSPS::copyCameraParameterPost( Int* aiScale0, Int* aiScale1, Int* aiOffset0, Int* aiOffset1 ) 2009 { 2010 if( !m_bCamParInSliceHeader ) 2011 { 2012 for( UInt uiBaseViewId = 0; uiBaseViewId < m_uiViewId; uiBaseViewId++ ) 2013 { 2014 m_aaiCodedScale [ 0 ][ uiBaseViewId ] = aiScale0 [ uiBaseViewId ]; 2015 m_aaiCodedScale [ 1 ][ uiBaseViewId ] = aiScale1 [ uiBaseViewId ]; 2016 m_aaiCodedOffset[ 0 ][ uiBaseViewId ] = aiOffset0[ uiBaseViewId ]; 2017 m_aaiCodedOffset[ 1 ][ uiBaseViewId ] = aiOffset1[ uiBaseViewId ]; 2018 } 2019 } 2020 } 2021 #endif 1719 2022 1720 2023 #if DEPTH_MAP_GENERATION … … 2320 2623 , m_ppsMap(MAX_NUM_PPS) 2321 2624 , m_apsMap(MAX_NUM_APS) 2322 #if VIDYO_VPS_INTEGRATION 2625 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 2323 2626 , m_vpsMap(MAX_NUM_VPS) 2324 2627 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComSlice.h
r193 r213 144 144 #endif 145 145 146 #if VIDYO_VPS_INTEGRATION 146 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 147 147 /// VPS class 148 148 … … 156 156 157 157 UInt m_uiExtensionType; 158 158 #if !QC_MVHEVC_B0046 159 159 Bool m_bDependentFlag[MAX_LAYER_NUM]; 160 #else 161 UInt m_uiNumHRDParameter; 162 UInt m_numAddiLayerOperationPoints; 163 UInt m_numAddiProLevelSets; 164 UInt m_numDirectRefLayer[MAX_LAYER_NUM]; 165 UInt m_numDirectRefID[MAX_LAYER_NUM][MAX_LAYER_NUM]; 166 UInt m_numOpLayerIdMinus1[MAX_LAYER_NUM]; 167 UInt m_numOpLayerId[MAX_LAYER_NUM][MAX_LAYER_NUM]; 168 #endif 160 169 UInt m_uiViewId[MAX_LAYER_NUM]; 170 #if !QC_MVHEVC_B0046 161 171 Bool m_bDepthFlag[MAX_LAYER_NUM]; 172 #endif 162 173 Int m_iViewOrderIdx[MAX_LAYER_NUM]; 174 #if !QC_MVHEVC_B0046 163 175 UInt m_uiDependentLayer[MAX_LAYER_NUM]; 176 #endif 164 177 165 178 UInt m_numReorderPics[MAX_TLAYER]; … … 182 195 Bool getTemporalNestingFlag () { return m_uiMaxLayers; } 183 196 Void setTemporalNestingFlag (UInt t) { m_bTemporalIdNestingFlag = t; } 184 197 #if !QC_MVHEVC_B0046 185 198 Void setExtensionType(UInt v) { m_uiExtensionType = v; } 186 199 UInt getExtensionType() { return m_uiExtensionType; } … … 188 201 Void setDependentFlag(Bool d, UInt layer) { m_bDependentFlag[layer] = d; } 189 202 Bool getDependentFlag(UInt layer) { return m_bDependentFlag[layer]; } 190 203 #endif 191 204 Void setViewId(UInt v, UInt layer) { m_uiViewId[layer] = v; } 192 205 UInt getViewId(UInt layer) { return m_uiViewId[layer]; } 193 206 #if !QC_MVHEVC_B0046 194 207 Void setDepthFlag(Bool d, UInt layer) { m_bDepthFlag[layer] = d; } 195 208 Bool getDepthFlag(UInt layer) { return m_bDepthFlag[layer]; } 196 209 #endif 197 210 Void setViewOrderIdx(Int v, UInt layer) { m_iViewOrderIdx[layer] = v; } 198 211 Int getViewOrderIdx(UInt layer) { return m_iViewOrderIdx[layer]; } 199 212 #if !QC_MVHEVC_B0046 200 213 Void setDependentLayer(UInt v, UInt layer) { m_uiDependentLayer[layer] = v; } 201 214 UInt getDependentLayer(UInt layer) { return m_uiDependentLayer[layer]; } 202 215 #endif 203 216 Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } 204 217 UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } … … 209 222 Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } 210 223 UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } 211 224 #if QC_MVHEVC_B0046 225 Void setNumHRDParameters(UInt n) { m_uiNumHRDParameter = n; } 226 UInt getNumHRDParameters() { return m_uiNumHRDParameter; } 227 Void setNumDirectRefLayer(UInt n, UInt layer) { m_numDirectRefLayer[layer] = n; }; 228 UInt getNumDirectRefLayer(UInt layer) { return m_numDirectRefLayer[layer]; }; 229 Void setDirectRefLayerId (UInt n, UInt layer, UInt refId) { m_numDirectRefID[layer][refId] = n; assert(refId < MAX_NUM_REF ); }; 230 UInt getDirectRefLayerId ( UInt layer, UInt refId) { return m_numDirectRefID[layer][refId]; }; 231 UInt getNumAddiLayerOperationPoints( ) { return m_numAddiLayerOperationPoints; }; 232 Void setNumAddiLayerOperationPoints(UInt n) { m_numAddiLayerOperationPoints = n; }; 233 Void setNumAddiProLevelSets (UInt n) { m_numAddiProLevelSets = n;} 234 UInt getNumAddiProLevelSets ( ) { return m_numAddiProLevelSets;} 235 236 Void setNumOpLayerIdMinus1 (UInt n, UInt layer) { m_numOpLayerIdMinus1[layer] = n;} 237 UInt getNumOpLayerIdMinus1 (UInt layer ) { return m_numOpLayerIdMinus1[layer];} 238 239 Void setNumOpLayerId (UInt n, UInt layer, UInt OpId) { m_numOpLayerId[layer][OpId] = n;} 240 UInt getNumOpLayerId (UInt layer, UInt OpId ) { return m_numOpLayerId[layer][OpId];} 241 242 #endif 212 243 }; 213 244 … … 218 249 { 219 250 private: 220 #if VIDYO_VPS_INTEGRATION 251 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 221 252 Int m_VPSId; 222 253 #endif … … 323 354 Bool m_bUseMVI; 324 355 #endif 356 357 #if RWTH_SDC_DLT_B0036 358 Bool m_bUseDLT; 359 360 UInt m_uiBitsPerDepthValue; 361 UInt m_uiNumDepthmapValues; 362 UInt* m_uiDepthValue2Idx; 363 UInt* m_uiIdx2DepthValue; 364 #endif 325 365 326 366 Bool m_bLFCrossTileBoundaryFlag; … … 354 394 #endif 355 395 356 #if OL_DEPTHLIMIT_A0044 357 Bool m_bDepthPartitionLimiting; 396 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 397 Bool m_bUseDMM34; 398 #endif 399 400 #if OL_QTLIMIT_PREDCODING_B0068 401 Bool m_bUseQTLPC; 358 402 #endif 359 403 … … 384 428 Bool m_bVspDepthPresentFlag; 385 429 #endif 430 Bool m_bIsFirstInView; 386 431 #endif 387 432 … … 389 434 TComSPS(); 390 435 virtual ~TComSPS(); 391 #if VIDYO_VPS_INTEGRATION 436 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 392 437 Int getVPSId () { return m_VPSId; } 393 438 Void setVPSId (Int i) { m_VPSId = i; } … … 554 599 Bool getUseMVI () {return m_bUseMVI;} 555 600 #endif 601 602 #if RWTH_SDC_DLT_B0036 603 Bool getUseDLT () { return m_bUseDLT; } 604 Void setUseDLT ( Bool b ) { m_bUseDLT = b; } 605 606 UInt getBitsPerDepthValue() { return m_bUseDLT?m_uiBitsPerDepthValue:g_uiBitDepth; } 607 UInt getNumDepthValues() { return m_bUseDLT?m_uiNumDepthmapValues:g_uiIBDI_MAX; } 608 UInt depthValue2idx(Pel uiValue) { return m_bUseDLT?m_uiDepthValue2Idx[uiValue]:uiValue; } 609 Pel idx2DepthValue(UInt uiIdx) { return m_bUseDLT?m_uiIdx2DepthValue[uiIdx]:uiIdx; } 610 Void setDepthLUTs (UInt* uidx2DepthValue = NULL, UInt uiNumDepthValues = 0); 611 #endif 556 612 557 613 UInt getMaxTLayers() { return m_uiMaxTLayers; } … … 630 686 #endif 631 687 632 #if OL_DEPTHLIMIT_A0044 633 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 634 Bool getUseDPL() {return m_bDepthPartitionLimiting;} 688 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 689 Bool getUseDMM34() { return m_bUseDMM34; } 690 Void setUseDMM34( Bool b ) { m_bUseDMM34 = b; } 691 #endif 692 693 #if OL_QTLIMIT_PREDCODING_B0068 694 Void setUseQTLPC( Bool b ) { m_bUseQTLPC = b; } 695 Bool getUseQTLPC() { return m_bUseQTLPC; } 635 696 #endif 636 697 637 698 Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 638 699 Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx ); 700 #if VSP_N 701 Void initMultiviewSPSFlex ( UInt uiViewId, Int iViewOrderIdx, Bool bDepth, Bool bPresent = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 702 #endif 639 703 640 704 UInt getViewId () { return m_uiViewId; } … … 686 750 Bool getVspDepthPresentFlag() { return m_bVspDepthPresentFlag; } 687 751 #endif 752 Void setIsFirstInView( Bool b ) { m_bIsFirstInView = b; } 753 Bool getIsFirstInView() { return m_bIsFirstInView; } 754 Void copyCameraParameterPre( UInt uiCamParPrecision, Bool bCamParSlice ); 755 Void copyCameraParameterPost( Int* aiScale0, Int* aiScale1, Int* aiOffset0, Int* aiOffset1 ); 688 756 #endif 689 757 }; … … 879 947 Bool m_cabacInitPresentFlag; 880 948 UInt m_encCABACTableIdx; // Used to transmit table selection across slices 881 #if POZNAN_CABAC_INIT_FLAG_FIX949 #if FIX_POZNAN_CABAC_INIT_FLAG 882 950 UInt m_encPrevPOC; 883 951 #endif … … 1014 1082 Bool getCabacInitPresentFlag() { return m_cabacInitPresentFlag; } 1015 1083 UInt getEncCABACTableIdx() { return m_encCABACTableIdx; } 1016 #if POZNAN_CABAC_INIT_FLAG_FIX1084 #if FIX_POZNAN_CABAC_INIT_FLAG 1017 1085 Void setEncPrevPOC(UInt uiPOC) { m_encPrevPOC = uiPOC; } 1018 1086 UInt getEncPrevPOC() { return m_encPrevPOC; } … … 1217 1285 1218 1286 // access channel 1219 #if VIDYO_VPS_INTEGRATION 1287 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1220 1288 TComVPS* m_pcVPS; 1289 #endif 1290 #if QC_IV_AS_LT_B0046 1291 Bool m_bWasLongTerm[2][MAX_NUM_REF+1]; //was long-term picture 1221 1292 #endif 1222 1293 TComSPS* m_pcSPS; … … 1293 1364 Int m_aaiCodedOffset[2][MAX_VIEW_NUM]; 1294 1365 1295 #if SONY_COLPIC_AVAILABILITY 1366 #if SONY_COLPIC_AVAILABILITY|QC_MVHEVC_B0046|VSP_N 1296 1367 Int m_iViewOrderIdx; 1368 #endif 1369 #if LGE_ILLUCOMP_B0045 1370 Bool m_bApplyIC; 1297 1371 #endif 1298 1372 … … 1318 1392 Void initTiles(); 1319 1393 1320 #if VIDYO_VPS_INTEGRATION 1394 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1321 1395 Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } 1322 1396 TComVPS* getVPS () { return m_pcVPS; } 1323 1397 #endif 1398 #if QC_IV_AS_LT_B0046 1399 Void setWasLongTerm( Bool lt, RefPicList e, Int iRefIdx ) { m_bWasLongTerm[e][iRefIdx] = lt; } 1400 Bool getWasLongTerm( RefPicList e, Int iRefIdx ) { return m_bWasLongTerm[e][iRefIdx] ; } 1401 #endif 1402 1324 1403 Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } 1325 1404 TComSPS* getSPS () { return m_pcSPS; } … … 1389 1468 Int getRefViewId ( RefPicList e, Int iRefIdx) { return m_aiRefViewIdList[e][iRefIdx]; } 1390 1469 TComPic* getTexturePic () const { return m_pcTexturePic; } 1391 #if SONY_COLPIC_AVAILABILITY 1470 #if SONY_COLPIC_AVAILABILITY || VSP_N 1392 1471 Int getViewOrderIdx () { return m_iViewOrderIdx; } 1393 1472 #endif … … 1441 1520 Void setRefViewId ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefViewIdList[e][iRefIdx] = i; } 1442 1521 Void setTexturePic ( TComPic *pcTexturePic ) { m_pcTexturePic = pcTexturePic; } 1443 #if SONY_COLPIC_AVAILABILITY 1522 #if SONY_COLPIC_AVAILABILITY || VSP_N 1444 1523 Void setViewOrderIdx ( Int i ) { m_iViewOrderIdx = i; } 1445 1524 #endif … … 1598 1677 Void setViewId( Int viewId ) { m_viewId = viewId; } 1599 1678 Int getViewId() { return m_viewId; } 1679 #if QC_MVHEVC_B0046 1680 Void setViewOrderIdx(Int v, UInt layer) { m_iViewOrderIdx = v; } 1681 Int getViewOrderIdx() { return m_iViewOrderIdx; } 1682 #endif 1600 1683 Void setIsDepth( Bool isDepth ) { m_isDepth = isDepth; } 1601 1684 Bool getIsDepth() { return m_isDepth; } … … 1607 1690 Int* getInvCodedScale () { return m_aaiCodedScale [1]; } 1608 1691 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } 1692 1693 #if LGE_ILLUCOMP_B0045 1694 Void setApplyIC ( Bool b ) { m_bApplyIC = b; } 1695 Bool getApplyIC () { return m_bApplyIC; } 1696 Void xSetApplyIC (); 1697 #endif 1609 1698 1610 1699 #if FORCE_REF_VSP … … 1679 1768 } 1680 1769 1770 #if QC_MVHEVC_B0046 1771 Void clearPSList() 1772 { 1773 m_paramsetMap.clear(); 1774 } 1775 #endif 1681 1776 private: 1682 1777 std::map<Int,T *> m_paramsetMap; … … 1689 1784 ParameterSetManager(); 1690 1785 virtual ~ParameterSetManager(); 1691 #if VIDYO_VPS_INTEGRATION 1786 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1692 1787 //! store video parameter set and take ownership of it 1693 1788 Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; … … 1695 1790 TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; 1696 1791 TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; 1792 #if QC_MVHEVC_B0046 1793 Void clearVPS() { m_vpsMap.clearPSList(); }; 1794 Void clearSPS() { m_spsMap.clearPSList(); }; 1795 Void clearPPS() { m_ppsMap.clearPSList(); }; 1796 #endif 1697 1797 #endif 1698 1798 //! store sequence parameter set and take ownership of it … … 1717 1817 ParameterSetMap<TComPPS> m_ppsMap; 1718 1818 ParameterSetMap<TComAPS> m_apsMap; 1719 #if VIDYO_VPS_INTEGRATION 1819 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1720 1820 ParameterSetMap<TComVPS> m_vpsMap; 1721 1821 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComWedgelet.cpp
r56 r213 52 52 m_uhOri ( 0 ), 53 53 m_eWedgeRes( FULL_PEL ) 54 #if HHIQC_DMMFASTSEARCH_B0039 55 , m_bIsCoarse( false ) 56 #endif 54 57 { 55 58 create( uiWidth, uiHeight ); … … 62 65 m_uhOri ( rcWedge.m_uhOri ), 63 66 m_eWedgeRes( rcWedge.m_eWedgeRes ), 67 #if HHIQC_DMMFASTSEARCH_B0039 68 m_bIsCoarse( rcWedge.m_bIsCoarse ), 69 m_uiAng ( rcWedge.m_uiAng ), 70 #endif 64 71 m_uiWidth ( rcWedge.m_uiWidth ), 65 72 m_uiHeight ( rcWedge.m_uiHeight ), … … 94 101 } 95 102 103 #if HHIQC_DMMFASTSEARCH_B0039 104 Void TComWedgelet::findClosetAngle() 105 { 106 UInt uiAng=0,uiOptAng=0; 107 UInt uiMinD=MAX_UINT; 108 UInt uiTmpD=0; 109 Int angTable[9] = {0, 2, 5, 9, 13, 17, 21, 26, 32}; 110 111 UChar uhXs = m_uhXs; 112 UChar uhYs = m_uhYs; 113 UChar uhXe = m_uhXe; 114 UChar uhYe = m_uhYe; 115 116 for(uiAng=2; uiAng<=34; uiAng++) 117 { 118 Int iSign = (uiAng<VER_IDX && uiAng>HOR_IDX ) ? -1 : 1; 119 Int iVer = uiAng>17 ? 32 : angTable[(uiAng>10) ? (uiAng-10) : (10-uiAng)]; 120 Int iHor = uiAng<19 ? 32 : angTable[(uiAng>26) ? (uiAng-26) : (26-uiAng)]; 121 122 uiTmpD = abs(iVer*iSign*(uhXs-uhXe) - iHor*(uhYe-uhYs)); 123 124 if( uiTmpD < uiMinD ) 125 { 126 uiMinD = uiTmpD; 127 uiOptAng = uiAng; 128 } 129 } 130 m_uiAng = uiOptAng; 131 } 132 133 Void TComWedgelet::setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse ) 134 #else 96 135 Void TComWedgelet::setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes ) 136 #endif 97 137 { 98 138 m_uhXs = uhXs; … … 102 142 m_uhOri = uhOri; 103 143 m_eWedgeRes = eWedgeRes; 144 #if HHIQC_DMMFASTSEARCH_B0039 145 m_bIsCoarse = bIsCoarse; 146 #endif 104 147 105 148 xGenerateWedgePattern(); … … 644 687 case( 2 ): { for( UInt iX = uiTempBlockSize-1; iX > uhXs; iX-- ) { UInt iY = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY--; } } } break; 645 688 case( 3 ): { for( UInt iY = uiTempBlockSize-1; iY > uhYs; iY-- ) { UInt iX = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX++; } } } break; 689 #if HHIQC_DMMFASTSEARCH_B0039 690 case( 4 ): 691 { 692 if( (uhXs+uhXe) < uiTempBlockSize ) { for( UInt iY = 0; iY < uiTempBlockSize; iY++ ) { UInt iX = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX++; } } } 693 else { for( UInt iY = 0; iY < uiTempBlockSize; iY++ ) { UInt iX = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX--; } } } 694 } 695 break; 696 case( 5 ): 697 { 698 if( (uhYs+uhYe) < uiTempBlockSize ) { for( UInt iX = 0; iX < uiTempBlockSize; iX++ ) { UInt iY = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY++; } } } 699 else { for( UInt iX = 0; iX < uiTempBlockSize; iX++ ) { UInt iY = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY--; } } } 700 } 701 #else 646 702 case( 4 ): { for( UInt iY = 0; iY < uiTempBlockSize; iY++ ) { UInt iX = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX++; } } } break; 647 703 case( 5 ): { for( UInt iX = 0; iX < uiTempBlockSize; iX++ ) { UInt iY = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY++; } } } break; 704 #endif 648 705 } 649 706 … … 664 721 case( 2 ): { uiOffX = 1; uiOffY = 1; } break; 665 722 case( 3 ): { uiOffX = 0; uiOffY = 1; } break; 723 #if HHIQC_DMMFASTSEARCH_B0039 724 case( 4 ): 725 { 726 if( (uhXs+uhXe) < uiTempBlockSize ) { uiOffX = 0; uiOffY = 0; } 727 else { uiOffX = 1; uiOffY = 0; } 728 } 729 break; 730 case( 5 ): 731 { 732 if( (uhYs+uhYe) < uiTempBlockSize ) { uiOffX = 0; uiOffY = 0; } 733 else { uiOffX = 0; uiOffY = 1; } 734 } 735 break; 736 #else 666 737 case( 4 ): { uiOffX = 0; uiOffY = 0; } break; 667 738 case( 5 ): { uiOffX = 0; uiOffY = 0; } break; 739 #endif 668 740 default: { uiOffX = 0; uiOffY = 0; } break; 669 741 } … … 732 804 } 733 805 } 806 807 #if HHIQC_DMMFASTSEARCH_B0039 808 TComWedgeNode::TComWedgeNode() 809 { 810 m_uiPatternIdx = NO_IDX; 811 for( UInt uiPos = 0; uiPos < NUM_WEDGE_REFINES; uiPos++ ) 812 { 813 m_uiRefineIdx[uiPos] = NO_IDX; 814 } 815 } 816 817 UInt TComWedgeNode::getPatternIdx() 818 { 819 return m_uiPatternIdx; 820 } 821 UInt TComWedgeNode::getRefineIdx( UInt uiPos ) 822 { 823 assert( uiPos < NUM_WEDGE_REFINES ); 824 return m_uiRefineIdx[uiPos]; 825 } 826 Void TComWedgeNode::setPatternIdx( UInt uiIdx ) 827 { 828 m_uiPatternIdx = uiIdx; 829 } 830 Void TComWedgeNode::setRefineIdx( UInt uiIdx, UInt uiPos ) 831 { 832 assert( uiPos < NUM_WEDGE_REFINES ); 833 m_uiRefineIdx[uiPos] = uiIdx; 834 } 835 #endif 734 836 735 837 #if HHI_DMM_PRED_TEX -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComWedgelet.h
r193 r213 50 50 }; 51 51 52 #if HHIQC_DMMFASTSEARCH_B0039 53 #define NUM_WEDGE_REFINES 8 54 #define NO_IDX MAX_UINT 55 #endif 56 52 57 // ==================================================================================================================== 53 58 // Class definition TComWedgelet … … 62 67 UChar m_uhOri; // orientation index 63 68 WedgeResolution m_eWedgeRes; // start/end pos resolution 69 #if HHIQC_DMMFASTSEARCH_B0039 70 Bool m_bIsCoarse; 71 UInt m_uiAng; 72 #endif 64 73 65 74 UInt m_uiWidth; … … 90 99 UChar getEndY () { return m_uhYe; } 91 100 UChar getOri () { return m_uhOri; } 92 101 #if HHIQC_DMMFASTSEARCH_B0039 102 Bool getIsCoarse() { return m_bIsCoarse; } 103 UInt getAng () { return m_uiAng; } 104 Void findClosetAngle(); 105 106 Void setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false ); 107 #else 93 108 Void setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes ); 109 #endif 94 110 95 111 Bool checkNotPlain(); … … 136 152 // type definition wedgelet reference list 137 153 typedef std::vector<TComWedgeRef> WedgeRefList; 154 155 #if HHIQC_DMMFASTSEARCH_B0039 156 // ==================================================================================================================== 157 // Class definition TComWedgeNode 158 // ==================================================================================================================== 159 class TComWedgeNode 160 { 161 private: 162 UInt m_uiPatternIdx; 163 UInt m_uiRefineIdx[NUM_WEDGE_REFINES]; 164 165 public: 166 TComWedgeNode(); 167 virtual ~TComWedgeNode() {} 168 169 UInt getPatternIdx(); 170 UInt getRefineIdx ( UInt uiPos ); 171 172 Void setPatternIdx( UInt uiIdx ); 173 Void setRefineIdx ( UInt uiIdx, UInt uiPos ); 174 }; // END CLASS DEFINITION TComWedgeNode 175 176 // type definition wedgelet node list 177 typedef std::vector<TComWedgeNode> WedgeNodeList; 178 #endif 138 179 139 180 #if HHI_DMM_PRED_TEX -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComYuv.cpp
r133 r213 409 409 410 410 #if LG_RESTRICTEDRESPRED_M24766 411 void411 Void 412 412 TComYuv::getPUXYOffset(PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset) 413 413 { -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TypeDef.h
r193 r213 43 43 44 44 #define VSP_N 1 45 45 46 #if VSP_N 46 47 #define VSP_BUGFIX 1 … … 51 52 #define AMVP_VSP_UNAVAILABLE 1 52 53 #endif 54 53 55 #define VSP_MERGE_POS 5 // position of vsp in merge list (0..5) 54 56 #define NTT_SUBPEL 1 57 58 #define VSP_SLICE_HEADER 1 55 59 #define VSP_CFG 1 56 #endif57 58 #define VSP_SLICE_HEADER 159 60 #if !VSP_CFG 60 61 #define VSP_FRAME_INTERVAL 2 61 62 #endif 62 63 63 #define FIXES 1 64 #define POZNAN_CABAC_INIT_FLAG_FIX 1 65 #define FIX_DECODING_WO_WRITING 1 66 #define FIX_INIT_ROM 1 67 #define FIX_VIRT_DESTRUCTOR 1 68 #define FIX_MEM_LEAKS 1 69 #define FIX_VSO_SETUP 1 70 #define FIX_COMP_WARNING_INIT 1 71 #define FIX_RDO_MACRO 1 64 #define VSP_AIC 0 65 #define VSP_TMVP 0 66 #define VSP_TMVP_ENABLE 0 67 #endif // VSP_N 68 69 70 #define NTT_FIX_UNCONSTRAINED_MVI 1 71 72 #define QC_MVHEVC_B0046 0 //JCT3V-B0046: disable 3DHEVC tools 73 #define QC_IV_AS_LT_B0046 1 //JCT3V-B0046: inter-view reference pictures are treated as long-term pictures 74 #define QC_TMVP_IDX_MOD_B0046 1 //JCT3V-B0046: the reference index for temporal merging candidate is set to 0, as defined in HEVC 75 #define QC_REM_IDV_B0046 1 //JCT3V-B0046: removal of IDV NAL unit type 76 #define FIX_DEL_NULLPTR 1 77 #define FIX_MISUSE_REFINDEX 1 78 #define FIX_FCO_COMP_WARNING 1 79 #define DV_V_RESTRICTION_B0037 1 // JCT3V-B0037 disparity vector vertical range restriction 80 81 #if !QC_MVHEVC_B0046 82 ///// ***** FIXES ********* 83 // A 84 #define FIX_POZNAN_CABAC_INIT_FLAG 1 72 85 #define FIX_LG_RESTRICTEDRESPRED_M24766 1 73 #define FIX_REMOVE_TILE_DEPENDENCE 1 74 #define FIX_DBL_CONTROL_DEFAULT 1 75 76 77 #define LGE_EDGE_INTRA 1 // JCT2-A0070 78 #if LGE_EDGE_INTRA 86 87 // B 88 #define FIX_LGE_IVMP_PARALLEL_MERGE_B0136 1 89 #define FIX_RDO_NEGDIST 1 90 #define FIX_DMM_NEG_DIST 1 91 #define FIX_LGE_DVMCP_B0133 1 92 93 94 // FCO 95 #define FLEX_CODING_ORDER_M23723 1 96 #if FLEX_CODING_ORDER_M23723 97 #define DISABLE_FCO_FOR_VSO 0 // Optional compile settings to disable VSO with FCO. 98 #endif 99 100 ///// ***** PATCHES ********* 101 #define TMVP_DEPTH_SWITCH 1 // JCT3V-B0092 additional encoder option only 102 103 ///// ***** DEPTH MODELING MODES ********* 104 #define HHI_DMM_WEDGE_INTRA 1 // depth model modes independent on texture (explicit and intra-predicted Wedgelet prediction) 105 #define HHI_DMM_PRED_TEX 1 // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction ) 106 #define LGE_EDGE_INTRA_A0070 1 // JCT3V-A0070 107 #define RWTH_SDC_DLT_B0036 1 // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table 108 #define HHIQC_DMMFASTSEARCH_B0039 1 // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3 109 110 ///// ***** INTERVIEW MOTION VECTOR PREDICTION ********* 111 #define HHI_INTER_VIEW_MOTION_PRED 1 // inter-view motion parameter prediction 112 #define SHARP_INTERVIEW_DECOUPLE_B0111 1 // JCT3V-B0111 decoupling inter-view candidate 113 #define QC_MRG_CANS_B0048 1 // JCT3V-B0048, B0086, B0069 114 #if QC_MRG_CANS_B0048 115 #define OL_DISMV_POS_B0069 1 // different pos for disparity MV candidate, B0069 116 #endif 117 #define MTK_INTERVIEW_MERGE_A0049 1 // JCT3V-A0049 second part 118 #if HHI_INTER_VIEW_MOTION_PRED 119 #define SAIT_IMPROV_MOTION_PRED_M24829 1 // improved inter-view motion vector prediction 120 #else 121 #define SAIT_IMPROV_MOTION_PRED_M24829 0 122 #endif 123 124 ///// ***** INTERVIEW RESIDUAL PREDICTION ********* 125 #define HHI_INTER_VIEW_RESIDUAL_PRED 1 // inter-view residual prediction 126 #if HHI_INTER_VIEW_RESIDUAL_PRED 127 #define LG_RESTRICTEDRESPRED_M24766 1 // restricted inter-view residual prediction 128 #define QC_SIMPLIFIEDIVRP_M24938 1 129 #else 130 #define LG_RESTRICTEDRESPRED_M24766 0 131 #define QC_SIMPLIFIEDIVRP_M24938 0 132 #endif 133 134 ///// ***** DISPARITY VECTOR DERIVATION ********* 135 #define QC_MULTI_DIS_CAN_A0097 1 // JCT3V-A0097 136 #define LGE_DVMCP_A0126 1 // JCT3V-A0126 137 #define LGE_DVMCP_MEM_REDUCTION_B0135 1 // JCT3V-B0135 138 #define DV_DERIVATION_PARALLEL_B0096 1 // JCT3V-B0096, enable parallel derivation of disparity vector 139 #define QC_SIMPLE_NBDV_B0047 1 // JCT3V-B0047 140 141 ///// ***** MOTION PARAMETER INHERITANCE ********* 142 #define HHI_MPI 1 // motion parameter inheritance from texture picture for depth map coding 143 #if HHI_MPI 144 #define FIX_MPI_B0065 1 // JCT3V-B0065, fix the MPI bug when RQT is off 145 #endif 146 #define MTK_UNCONSTRAINED_MVI_B0083 1 //JCT3V-B0083 147 148 ///// ***** VIEW SYNTHESIS OPTIMIZAION ********* 149 #define HHI_VSO 1 150 #define HHI_VSO_LS_TABLE_M23714 1 // m23714, enable table base Lagrange multiplier optimization 151 #define HHI_VSO_DIST_INT 1 // Allow negative synthesized view distortion change 152 #define HHI_VSO_COLOR_PLANES 1 // Compute VSO distortion on color planes 153 #define HHI_VSO_RM_ASSERTIONS 0 // Output VSO assertions 154 #define HHI_VSO_SYNTH_DIST_OUT 0 // Output of synthesized view distortion instead of depth distortion in encoder output 155 #define SAIT_VSO_EST_A0033 1 // JCT3V-A0033 modification 3 156 #define LGE_VSO_EARLY_SKIP_A0093 1 // JCT3V-A0093 modification 4 157 #define LGE_WVSO_A0119 1 // JCT3V-A0119 & JCT3V-B0131 Depth Metric with a weighted depth fidelity term 158 159 160 ///// ***** ILLUMINATION COMPENSATON ********* 161 #define LGE_ILLUCOMP_B0045 1 // JCT2-B0045 Illumination compensation for Luma and Chroma 162 #if LGE_ILLUCOMP_B0045 163 #define LGE_ILLUCOMP_B0045_ENCSIMP 1 164 #endif 165 166 ///// ***** INTERVIEW SKIP ********* 167 #define HHI_INTERVIEW_SKIP 1 168 169 ///// ***** QUADTREE LIMITATION ********* 170 #define OL_QTLIMIT_PREDCODING_B0068 1 //JCT3V-B0068 171 172 ///// ***** OTHERS ********* 173 #define LG_ZEROINTRADEPTHRESI_A0087 1 // JCT2-A0087 174 #define SONY_COLPIC_AVAILABILITY 1 175 #define HHI_FULL_PEL_DEPTH_MAP_MV_ACC 1 // full-pel mv accuracy for depth maps 176 #define VIDYO_VPS_INTEGRATION 1 177 178 179 180 ///// ***** DEFINED PARAMETERS ********* 181 #if QC_MULTI_DIS_CAN_A0097 182 #define DIS_CANS 1 183 #endif 184 185 #define HHI_INTERVIEW_SKIP_LAMBDA_SCALE 1 186 187 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 188 #define DMM_WEDGEMODEL_MIN_SIZE 4 189 #define DMM_WEDGEMODEL_MAX_SIZE 32 190 #define DMM_WEDGE_PREDDIR_DELTAEND_MAX 4 191 #endif 192 193 #if LGE_EDGE_INTRA_A0070 79 194 #define LGE_EDGE_INTRA_MIN_SIZE 4 80 195 #define LGE_EDGE_INTRA_MAX_SIZE 32 … … 85 200 #endif 86 201 87 #define LG_ZEROINTRADEPTHRESI_M26039 1 // JCT2-A0087 88 89 #define SONY_COLPIC_AVAILABILITY 1 90 91 #define HHI_INTER_VIEW_MOTION_PRED 1 // inter-view motion parameter prediction 92 #define HHI_INTER_VIEW_RESIDUAL_PRED 1 // inter-view residual prediction 93 #define QC_MULTI_DIS_CAN 1 // JCT2-A0097 94 #if QC_MULTI_DIS_CAN 95 #define DIS_CANS 1 96 #endif 97 98 #define MTK_INTERVIEW_MERGE_A0049 1 // JCT2-A0049 second part 99 100 #define LGE_DVMCP 1 // JCT2-A0126 101 #if LGE_DVMCP 202 203 #if LGE_DVMCP_A0126 102 204 #define DVFROM_LEFTBELOW 1 103 205 #define DVFROM_LEFT 2 … … 109 211 110 212 111 #define HHI_VSO 1 112 #define HHI_VSO_LS_TABLE 1 // m23714 113 #define HHI_VSO_DIST_INT 1 114 #define HHI_VSO_SYNTH_DIST_OUT 0 115 #define HHI_VSO_COLOR_PLANES 1 116 #define HHI_VSO_SPEEDUP_A0033 1 // JCT2-A0033 modification 1 (changes in classes directly related the renderer model 117 // to are not covered by this define, since nearly the entire class has been changed) 118 #define HHI_VSO_RM_ASSERTIONS 0 // output VSO assertions 119 #define HHI_VSO_SET_OPTIM 1 // remove unnecessary updates (works only with HHI_VSO_FIX 1 properly) 120 #define SAIT_VSO_EST_A0033 1 // JCT2-A0033 modification 3 121 #define LGE_VSO_EARLY_SKIP_A0093 1 // JCT2-A0093 modification 4 122 #define LGE_WVSO_A0119 1 // JCT2-A0119 Depth Metric with a weighted depth fidelity term 123 124 #define OL_DEPTHLIMIT_A0044 1 //JCT2-A0044 125 #if OL_DEPTHLIMIT_A0044 126 #define OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1 //Turn this on to not perform depth limiting for I-SLICES. 127 #define OL_END_CU MAX_INT //Default for initializing the partition information buffer 128 #define OL_PART_BUF_SIZE 86 //maximum number of possible partition bits in a CU 129 #endif 130 131 #define HHI_INTERVIEW_SKIP 1 132 #define HHI_INTERVIEW_SKIP_LAMBDA_SCALE 1 133 134 #define HHI_DMM_WEDGE_INTRA 1 // depth model modes independent on texture (explicit and intra-predicted Wedgelet prediction) 135 #define HHI_DMM_PRED_TEX 1 // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction ) 136 137 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 138 #define DMM_WEDGEMODEL_MIN_SIZE 4 139 #define DMM_WEDGEMODEL_MAX_SIZE 32 140 #define DMM_WEDGE_PREDDIR_DELTAEND_MAX 4 141 #endif 142 143 #define HHI_MPI 1 // motion parameter inheritance from texture picture for depth map coding 213 #if HHIQC_DMMFASTSEARCH_B0039 214 #define DMM3_SIMPLIFY_TR 1 215 #endif 216 217 218 #if RWTH_SDC_DLT_B0036 219 #define Log2( n ) ( log((double)n) / log(2.0) ) 220 #endif 221 144 222 #define HHI_MPI_MERGE_POS 0 145 #define HHI_FULL_PEL_DEPTH_MAP_MV_ACC 1 // full-pel mv accuracy for depth maps 146 147 #if HHI_INTER_VIEW_MOTION_PRED 148 #define SAIT_IMPROV_MOTION_PRED_M24829 1 // improved inter-view motion vector prediction 149 #else 150 #define SAIT_IMPROV_MOTION_PRED_M24829 0 151 #endif 152 153 #if HHI_INTER_VIEW_RESIDUAL_PRED 154 #define LG_RESTRICTEDRESPRED_M24766 1 // restricted inter-view residual prediction 155 #define QC_SIMPLIFIEDIVRP_M24938 1 156 #else 157 #define LG_RESTRICTEDRESPRED_M24766 0 158 #define QC_SIMPLIFIEDIVRP_M24938 0 159 #endif 160 161 223 #endif 224 ///// ***** HM 6.1 ********* 162 225 #define SKIPFRAME_BUGFIX 1 ///< bug fix to enable skipFrame at decoder 163 226 #define START_DECODING_AT_CRA 1 ///< H0496, start decoding at clear random access point … … 170 233 171 234 #define PARALLEL_MERGE 1 //< H0082 parallel merge/skip 235 #define LGE_IVMP_PARALLEL_MERGE_B0136 1 //< B0136 support of parallel merge/skip in disparity vector derivation 172 236 #define LOG2_PARALLEL_MERGE_LEVEL_MINUS2 0 //< H0082 parallel merge level 0-> 4x4, 1-> 8x8, 2->16x16, 3->32x32, 4->64x64 237 173 238 #if PARALLEL_MERGE && LOG2_PARALLEL_MERGE_LEVEL_MINUS2 174 239 #define CU_BASED_MRG_CAND_LIST 1 //< H0240: single merge candidate list for all PUs inside a 8x8 CU conditioned on LOG2_PARALLEL_MERGE_LEVEL_MINUS2 > 0 175 #endif 240 #define FIX_CU_BASED_MRG_CAND_LIST_B0136 1 //< B0136 bug fix for CU_BASED_MRG_CAND_LIST 241 #endif 242 176 243 #define MVP_AT_ENTROPYSLICE_BOUNDARY 1 //< H0362 enable motion prediction accross entropy slice boundary 177 244 178 245 #define FAST_DECISION_FOR_MRG_RD_COST 1 ////< H0178: Fast Decision for Merge 2Nx2N RDCost 179 246 180 #define PIC_CROPPING 1 ///< Picture cropping and size constraints181 #define NAL_REF_FLAG 1 ///< Change nal_ref_idc to nal_ref_flag (JCTVC-F463)182 #define REMOVE_DIV_OPERATION 1 ///< H0238: Simplified intra horizontal and vertical filtering247 #define PIC_CROPPING 1 ///< Picture cropping and size constraints 248 #define NAL_REF_FLAG 1 ///< Change nal_ref_idc to nal_ref_flag (JCTVC-F463) 249 #define REMOVE_DIV_OPERATION 1 ///< H0238: Simplified intra horizontal and vertical filtering 183 250 #define LOGI_INTRA_NAME_3MPM 1 ///< H0407: logical Intra mode naming (sequential angular mode numbering) and 3 MPM mode coding 184 251 … … 191 258 #define MULTIBITS_DATA_HIDING 1 ///< H0481: multiple sign bit hiding 192 259 193 #define DEQUANT_CLIPPING 260 #define DEQUANT_CLIPPING 1 ///< H0312/H0541: transformed coefficients clipping before de-quantization 194 261 195 262 #define REMOVE_NON_SCALED 1 ///< H0164/H0250: Removal of non-scaled merge candidate … … 299 366 #define LOG2_SCAN_SET_SIZE 4 300 367 301 #if LGE_EDGE_INTRA 368 #if LGE_EDGE_INTRA_A0070 302 369 #if LGE_EDGE_INTRA_DELTA_DC 303 370 #define FAST_UDI_MAX_RDMODE_NUM 37 ///< maximum number of RD comparison in fast-UDI estimation loop … … 347 414 #endif 348 415 349 #if LGE_EDGE_INTRA 416 #if LGE_EDGE_INTRA_A0070 350 417 #if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX 351 418 #define EDGE_INTRA_IDX (NUM_INTRA_MODE+NUM_DMM_MODE) … … 372 439 // This is here just to perform timing tests -- OL_FLUSH_ALIGN should be 0 for WPP. 373 440 374 #define RVM_VCEGAM10_M 4441 #define RVM_VCEGAM10_M 4 375 442 376 443 #define PLANAR_IDX 0 … … 454 521 // VPS INTEGRATION 455 522 // ==================================================================================================================== 456 # define VIDYO_VPS_INTEGRATION 1523 #if !QC_MVHEVC_B0046 457 524 #if VIDYO_VPS_INTEGRATION 458 525 #define MAX_NUM_VPS 10 459 526 #endif 527 #else 528 #define MAX_NUM_VPS 1 529 #endif 530 460 531 461 532 // ==================================================================================================================== … … 739 810 }; 740 811 741 #if HHI_VSO_SPEEDUP_A0033742 812 743 813 enum BlenMod … … 749 819 BLEND_GEN = 3 750 820 }; 751 #endif752 821 753 822 /// supported prediction type
Note: See TracChangeset for help on using the changeset viewer.