Changeset 833 in 3DVCSoftware for trunk/source/Lib/TLibCommon
- Timestamp:
- 7 Feb 2014, 20:31:12 (11 years ago)
- Location:
- trunk/source/Lib/TLibCommon
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/ContextTables.h
r773 r833 97 97 98 98 #if H_3D_ARP 99 #if MTK_ARP_FLAG_CABAC_SIMP_G0061 100 #define NUM_ARPW_CTX 3 ///< number of context models for weighting factor index used by advanced residual prediction 101 #else 99 102 #define NUM_ARPW_CTX 4 ///< number of context models for weighting factor index used by advanced residual prediction 100 103 #endif 104 #endif 101 105 102 106 #if H_3D_IC 107 #if MTK_IC_FLAG_CABAC_SIMP_G0061 108 #define NUM_IC_FLAG_CTX 1 ///< number of context models for illumination compensation flag 109 #else 103 110 #define NUM_IC_FLAG_CTX 3 ///< number of context models for illumination compensation flag 104 111 #endif 112 #endif 105 113 106 114 #define CNU 154 ///< dummy initialization value for unused context models 'Context model Not Used' 107 115 108 116 #if H_3D_DIM 117 #if QC_GENERIC_SDC_G0122 118 #define NUM_DEPTH_INTRA_MODE_CTX 1 ///< number of context models for depth intra modes 119 #else 109 120 #define NUM_DEPTH_INTRA_MODE_CTX 8 ///< number of context models for depth intra modes 121 #endif 110 122 #define NUM_DDC_FLAG_CTX 2 ///< number of context models for deltaDC flag (DMM or RBC) 111 123 #define NUM_DDC_DATA_CTX 1 ///< number of context models for deltaDC data (DMM or RBC) … … 113 125 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 114 126 #endif 127 #if QC_GENERIC_SDC_G0122 128 #define NUM_ANGLE_FLAG_CTX 3 129 #if !QC_SDC_UNIFY_G0130 130 #define NUM_INTRASDC_FLAG_CTX 3 131 #endif 132 #endif 115 133 #endif 116 134 … … 120 138 #endif 121 139 122 #if H_3D_INTER_SDC 140 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 123 141 #define NUM_INTER_SDC_FLAG_CTX 1 ///< number of context models for inter SDC flag 124 142 #define NUM_INTER_SDC_SIGN_FLAG_CTX 1 ///< number of context models for sign of inter SDC residual 125 143 #define NUM_INTER_SDC_RESIDUAL_CTX 1 ///< number of context models for abs of inter SDC residual 144 #endif 145 146 #if QC_SDC_UNIFY_G0130 147 #define NUM_SDC_FLAG_CTX 1 ///< number of context 148 #endif 149 #if H_3D_DBBP 150 #define DBBP_NUM_FLAG_CTX 1 126 151 #endif 127 152 // ==================================================================================================================== … … 364 389 365 390 #if H_3D_ARP 391 #if MTK_ARP_FLAG_CABAC_SIMP_G0061 392 static const UChar 393 INIT_ARPW[3][NUM_ARPW_CTX] = 394 { 395 { 162, 153, 162 }, 396 { 162, 153, 162 }, 397 { 162, 153, 162 }, 398 }; 399 #else 366 400 static const UChar 367 401 INIT_ARPW[3][NUM_ARPW_CTX] = … … 372 406 }; 373 407 #endif 374 408 #endif 375 409 #if H_3D_IC 410 #if MTK_IC_FLAG_CABAC_SIMP_G0061 411 static const UChar 412 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 413 { 414 { 154 }, 415 { 154 }, 416 { 154 }, 417 }; 418 #else 376 419 static const UChar 377 420 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = … … 382 425 }; 383 426 #endif 427 #endif 384 428 #if H_3D_DIM 429 #if QC_GENERIC_SDC_G0122 430 static const UChar 431 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] = 432 { 433 { 154, }, 434 { 154, }, 435 { 154, } 436 }; 437 #else 385 438 static const UChar 386 439 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] = … … 390 443 {64, 0, CNU, CNU, 168, 109, 0, 0} 391 444 }; 445 #endif 446 447 #if QC_GENERIC_SDC_G0122 448 static const UChar 449 INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] = 450 { 451 { 154, 155, 156 }, 452 { 141, 185, 214 }, 453 { 155, 170, 157 }, 454 }; 455 #if !QC_SDC_UNIFY_G0130 456 static const UChar 457 INIT_INTRASDC_FLAG[3][NUM_INTRASDC_FLAG_CTX] = 458 { 459 { 214, 229, 230 }, 460 { 215, 202, 174 }, 461 { 213, 201, 246 }, 462 }; 463 #endif 464 #endif 392 465 393 466 static const UChar … … 432 505 #endif 433 506 434 #if H_3D_INTER_SDC 507 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 435 508 static const UChar 436 509 INIT_INTER_SDC_FLAG[3][NUM_INTER_SDC_FLAG_CTX] = … … 458 531 #endif 459 532 //! \} 460 461 462 #endif 533 #if QC_SDC_UNIFY_G0130 534 static const UChar 535 INIT_SDC_FLAG[3][NUM_SDC_FLAG_CTX] = 536 { 537 { 154 }, 538 { 154 }, 539 { 154 }, 540 }; 541 #endif 542 543 #if H_3D_DBBP 544 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] = 545 { 546 { CNU }, 547 { CNU }, 548 { CNU }, 549 }; 550 #endif 551 552 #endif -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r773 r833 123 123 #if H_3D_DIM_SDC 124 124 m_pbSDCFlag = NULL; 125 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 126 for( Int i = 0; i < 4; i++ ) 127 { 128 m_apSegmentDCOffset[i] = NULL; 129 } 130 #else 125 131 m_apSegmentDCOffset[0] = NULL; 126 132 m_apSegmentDCOffset[1] = NULL; 133 #endif 127 134 #endif 128 135 #endif … … 146 153 #endif 147 154 #if H_3D_INTER_SDC 155 #if !QC_SDC_UNIFY_G0130 148 156 m_pbInterSDCFlag = NULL; 149 157 for( Int i = 0; i < 4; i++ ) … … 151 159 m_apSegmentInterDCOffset[i] = NULL; 152 160 } 161 #endif 162 #if !SEC_INTER_SDC_G0101 153 163 m_pucInterSDCMask = NULL; 164 #endif 165 #endif 166 #if H_3D_DBBP 167 m_pbDBBPFlag = NULL; 168 #endif 169 170 #if MTK_DDD_G0063 171 m_pucDisparityDerivedDepth = NULL; 172 m_pbUseDDD = NULL; 154 173 #endif 155 174 } … … 272 291 #if H_3D_DIM_SDC 273 292 m_pbSDCFlag = (Bool*)xMalloc(Bool, uiNumPartition); 293 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 294 for( Int i = 0; i < 4; i++ ) 295 { 296 m_apSegmentDCOffset[i] = (Pel*)xMalloc(Pel, uiNumPartition); 297 } 298 #else 274 299 m_apSegmentDCOffset[0] = (Pel*)xMalloc(Pel, uiNumPartition); 275 300 m_apSegmentDCOffset[1] = (Pel*)xMalloc(Pel, uiNumPartition); 276 301 #endif 277 302 #endif 278 #if H_3D_INTER_SDC 303 #endif 304 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 279 305 m_pbInterSDCFlag = (Bool* )xMalloc(Bool, uiNumPartition); 280 306 for( Int i = 0; i < 4; i++ ) … … 283 309 } 284 310 #endif 311 #if H_3D_DBBP 312 m_pbDBBPFlag = (Bool* )xMalloc(Bool, uiNumPartition); 313 #endif 285 314 } 286 315 else … … 289 318 m_acCUMvField[1].setNumPartition(uiNumPartition ); 290 319 } 320 #if !SEC_INTER_SDC_G0101 291 321 #if H_3D_INTER_SDC 292 322 m_pucInterSDCMask = (UChar* )xMalloc(UChar, g_uiMaxCUHeight*g_uiMaxCUWidth); 293 323 #endif 324 #endif 294 325 m_sliceStartCU = (UInt* )xMalloc(UInt, uiNumPartition); 295 326 m_sliceSegmentStartCU = (UInt* )xMalloc(UInt, uiNumPartition); … … 298 329 m_pcPattern = (TComPattern*)xMalloc(TComPattern, 1); 299 330 331 #if MTK_DDD_G0063 332 m_pucDisparityDerivedDepth = (UChar* )xMalloc( UChar, uiNumPartition); 333 m_pbUseDDD = (Bool* ) xMalloc( Bool, uiNumPartition); 334 #endif 335 300 336 // create motion vector fields 301 337 … … 377 413 #endif 378 414 415 #if MTK_DDD_G0063 416 if ( m_pucDisparityDerivedDepth ) { xFree(m_pucDisparityDerivedDepth); m_pucDisparityDerivedDepth = NULL; } 417 if ( m_pbUseDDD ) { xFree(m_pbUseDDD); m_pbUseDDD = NULL; } 418 #endif 419 379 420 #if H_3D_ARP 380 421 if ( m_puhARPW ) { delete[] m_puhARPW; m_puhARPW = NULL; } … … 400 441 #if H_3D_DIM_SDC 401 442 if ( m_pbSDCFlag ) { xFree(m_pbSDCFlag); m_pbSDCFlag = NULL; } 443 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 444 for( Int i = 0; i < 4; i++ ) 445 { 446 if ( m_apSegmentDCOffset[i] ) { xFree(m_apSegmentDCOffset[i]); m_apSegmentDCOffset[i] = NULL; } 447 } 448 #else 402 449 if ( m_apSegmentDCOffset[0] ) { xFree(m_apSegmentDCOffset[0]); m_apSegmentDCOffset[0] = NULL; } 403 450 if ( m_apSegmentDCOffset[1] ) { xFree(m_apSegmentDCOffset[1]); m_apSegmentDCOffset[1] = NULL; } 404 451 #endif 405 452 #endif 406 #if H_3D_INTER_SDC 453 #endif 454 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 407 455 if ( m_pbInterSDCFlag ) { xFree(m_pbInterSDCFlag); m_pbInterSDCFlag = NULL; } 408 456 for(Int i = 0; i < 4; i++ ) … … 411 459 } 412 460 #endif 413 } 461 #if H_3D_DBBP 462 if ( m_pbDBBPFlag ) { xFree(m_pbDBBPFlag); m_pbDBBPFlag = NULL; } 463 #endif 464 } 465 #if !SEC_INTER_SDC_G0101 414 466 #if H_3D_INTER_SDC 415 467 if ( m_pucInterSDCMask ) { xFree(m_pucInterSDCMask); m_pucInterSDCMask = NULL; } 468 #endif 416 469 #endif 417 470 m_pcCUAboveLeft = NULL; … … 525 578 m_pbICFlag[ui] = pcFrom->m_pbICFlag[ui]; 526 579 #endif 580 581 #if MTK_DDD_G0063 582 m_pucDisparityDerivedDepth[ui] = pcFrom->m_pucDisparityDerivedDepth[ui]; 583 m_pbUseDDD[ui] = pcFrom->m_pbUseDDD[ui]; 584 #endif 585 527 586 m_puhWidth [ui] = pcFrom->getWidth(ui); 528 587 m_puhHeight [ui] = pcFrom->getHeight(ui); … … 554 613 m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui]; 555 614 #endif 556 #if H_3D_INTER_SDC 615 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 557 616 m_pbInterSDCFlag[ui] = pcFrom->m_pbInterSDCFlag[ui]; 617 #endif 618 #if H_3D_DBBP 619 m_pbDBBPFlag[ui] = pcFrom->m_pbDBBPFlag[ui]; 558 620 #endif 559 621 } … … 602 664 memset( m_pbICFlag + firstElement, false, numElements * sizeof( *m_pbICFlag ) ); 603 665 #endif 666 667 #if MTK_DDD_G0063 668 memset( m_pucDisparityDerivedDepth + firstElement, 0, numElements * sizeof( *m_pucDisparityDerivedDepth ) ); 669 memset( m_pbUseDDD + firstElement, 0, numElements * sizeof( *m_pbUseDDD ) ); 670 #endif 671 604 672 #if H_3D_DIM 605 673 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 616 684 #if H_3D_DIM_SDC 617 685 memset( m_pbSDCFlag + firstElement, 0, numElements * sizeof( *m_pbSDCFlag ) ); 686 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 687 for( Int i = 0; i < 4; i++ ) 688 { 689 memset( m_apSegmentDCOffset[i] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[i] ) ); 690 } 691 #else 618 692 memset( m_apSegmentDCOffset[0] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[0] ) ); 619 693 memset( m_apSegmentDCOffset[1] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[1] ) ); 620 694 #endif 621 695 #endif 622 #if H_3D_INTER_SDC 696 #endif 697 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 623 698 memset( m_pbInterSDCFlag + firstElement, 0, numElements * sizeof( *m_pbInterSDCFlag ) ); 624 699 for( Int i = 0; i < 4; i++ ) … … 626 701 memset( m_apSegmentInterDCOffset[i] + firstElement, 0, numElements * sizeof( *m_apSegmentInterDCOffset[i] ) ); 627 702 } 703 #endif 704 #if H_3D_DBBP 705 memset( m_pbDBBPFlag + firstElement, false, numElements * sizeof( *m_pbDBBPFlag ) ); 628 706 #endif 629 707 } … … 774 852 m_pbICFlag[ui] = false; 775 853 #endif 854 855 #if MTK_DDD_G0063 856 m_pucDisparityDerivedDepth[ui] = 0; 857 m_pbUseDDD[ui] = 0; 858 #endif 859 776 860 #if H_3D_DIM 777 861 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 788 872 #if H_3D_DIM_SDC 789 873 m_pbSDCFlag [ui] = false; 874 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 875 for( Int i = 0; i < 4; i++ ) 876 { 877 m_apSegmentDCOffset[i][ui] = 0; 878 } 879 #else 790 880 m_apSegmentDCOffset[0][ui] = 0; 791 881 m_apSegmentDCOffset[1][ui] = 0; 792 882 #endif 793 883 #endif 794 #if H_3D_INTER_SDC 884 #endif 885 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 795 886 m_pbInterSDCFlag[ui] = false; 796 887 for( Int i = 0; i < 4; i++ ) … … 798 889 m_apSegmentInterDCOffset[i][ui] = 0; 799 890 } 891 #endif 892 #if H_3D_DBBP 893 m_pbDBBPFlag[ui] = false; 800 894 #endif 801 895 } … … 879 973 memset( m_puhARPW, 0, iSizeInUchar ); 880 974 #endif 975 976 #if MTK_DDD_G0063 977 memset( m_pucDisparityDerivedDepth, 0, iSizeInUchar ); 978 memset( m_pbUseDDD, 0, iSizeInBool ); 979 #endif 980 881 981 UChar uhWidth = g_uiMaxCUWidth >> uiDepth; 882 982 UChar uhHeight = g_uiMaxCUHeight >> uiDepth; … … 901 1001 #if H_3D_DIM_SDC 902 1002 memset( m_pbSDCFlag, 0, sizeof(Bool) * m_uiNumPartition ); 1003 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 1004 for( Int i = 0; i < 4; i++ ) 1005 { 1006 memset( m_apSegmentDCOffset[i], 0, sizeof(Pel) * m_uiNumPartition ); 1007 } 1008 #else 903 1009 memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition ); 904 1010 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition ); 905 1011 #endif 906 1012 #endif 907 #if H_3D_INTER_SDC 1013 #endif 1014 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 908 1015 memset( m_pbInterSDCFlag, 0, sizeof( Bool ) * m_uiNumPartition ); 909 1016 for( Int i = 0; i < 4; i++ ) … … 911 1018 memset( m_apSegmentInterDCOffset[i], 0, sizeof( Int ) * m_uiNumPartition ); 912 1019 } 1020 #endif 1021 #if H_3D_DBBP 1022 memset( m_pbDBBPFlag, 0, iSizeInBool ); 913 1023 #endif 914 1024 … … 964 1074 m_pbICFlag [ui] = pcCU->m_pbICFlag[uiPartOffset+ui]; 965 1075 #endif 1076 1077 #if MTK_DDD_G0063 1078 m_pucDisparityDerivedDepth[ui] = pcCU->m_pucDisparityDerivedDepth[uiPartOffset+ui]; 1079 m_pbUseDDD[ui] = pcCU->m_pbUseDDD[uiPartOffset+ui]; 1080 #endif 1081 966 1082 #if H_3D_DIM 967 1083 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 978 1094 #if H_3D_DIM_SDC 979 1095 m_pbSDCFlag [ui] = pcCU->m_pbSDCFlag [ uiPartOffset + ui ]; 1096 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 1097 for( Int i = 0; i < 4; i++ ) 1098 { 1099 m_apSegmentDCOffset[i][ui] = pcCU->m_apSegmentDCOffset[i] [ uiPartOffset + ui ]; 1100 } 1101 #else 980 1102 m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0] [ uiPartOffset + ui ]; 981 1103 m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1] [ uiPartOffset + ui ]; 982 1104 #endif 983 1105 #endif 984 #if H_3D_INTER_SDC 1106 #endif 1107 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 985 1108 m_pbInterSDCFlag [ui] = pcCU->m_pbInterSDCFlag [ uiPartOffset + ui ]; 986 1109 for( Int i = 0; i < 4; i++ ) … … 988 1111 m_apSegmentInterDCOffset[i][ui] = pcCU->m_apSegmentInterDCOffset[i][ uiPartOffset + ui ]; 989 1112 } 1113 #endif 1114 #if H_3D_DBBP 1115 m_pbDBBPFlag[ui]=pcCU->m_pbDBBPFlag[uiPartOffset+ui]; 990 1116 #endif 991 1117 } … … 1109 1235 #endif 1110 1236 1237 #if MTK_DDD_G0063 1238 m_pucDisparityDerivedDepth = pcCU->getDDDepth() + uiPart; 1239 m_pbUseDDD = pcCU->getUseDDD() + uiPart; 1240 #endif 1241 1111 1242 m_puhLumaIntraDir = pcCU->getLumaIntraDir() + uiPart; 1112 1243 m_puhChromaIntraDir = pcCU->getChromaIntraDir() + uiPart; … … 1134 1265 #if H_3D_DIM_SDC 1135 1266 m_pbSDCFlag = pcCU->getSDCFlag() + uiPart; 1267 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 1268 for( Int i = 0; i < 4; i++ ) 1269 { 1270 m_apSegmentDCOffset[i] = pcCU->getSDCSegmentDCOffset(i) + uiPart; 1271 } 1272 #else 1136 1273 m_apSegmentDCOffset[0] = pcCU->getSDCSegmentDCOffset(0) + uiPart; 1137 1274 m_apSegmentDCOffset[1] = pcCU->getSDCSegmentDCOffset(1) + uiPart; 1138 1275 #endif 1139 1276 #endif 1140 #if H_3D_INTER_SDC 1277 #endif 1278 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 1141 1279 m_pbInterSDCFlag = pcCU->getInterSDCFlag() + uiPart; 1142 1280 for( Int i = 0; i < 4; i++ ) … … 1144 1282 m_apSegmentInterDCOffset[i] = pcCU->getInterSDCSegmentDCOffset( i ) + uiPart; 1145 1283 } 1284 #endif 1285 #if H_3D_DBBP 1286 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiPart; 1146 1287 #endif 1147 1288 m_puhDepth=pcCU->getDepth() + uiPart; … … 1256 1397 #if H_3D_ARP 1257 1398 m_puhARPW = pcCU->getARPW() + uiAbsPartIdx; 1399 #endif 1400 1401 #if MTK_DDD_G0063 1402 m_pucDisparityDerivedDepth = pcCU->getDDDepth() + uiAbsPartIdx; 1403 m_pbUseDDD = pcCU->getUseDDD() + uiAbsPartIdx; 1404 #endif 1405 1406 #if H_3D_DBBP 1407 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiAbsPartIdx; 1258 1408 #endif 1259 1409 … … 1314 1464 memcpy( m_puhCbf[2] + uiOffset, pcCU->getCbf(TEXT_CHROMA_V), iSizeInUchar ); 1315 1465 1466 #if MTK_DDD_G0063 1467 memcpy( m_pucDisparityDerivedDepth + uiOffset, pcCU->getDDDepth(), iSizeInUchar ); 1468 memcpy( m_pbUseDDD + uiOffset, pcCU->getUseDDD(), iSizeInBool ); 1469 #endif 1470 1471 1316 1472 #if H_3D_DIM 1317 1473 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 1328 1484 #if H_3D_DIM_SDC 1329 1485 memcpy( m_pbSDCFlag + uiOffset, pcCU->getSDCFlag(), iSizeInBool ); 1486 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 1487 for( Int i = 0; i < 4; i++ ) 1488 { 1489 memcpy( m_apSegmentDCOffset[i] + uiOffset, pcCU->getSDCSegmentDCOffset(i), sizeof( Pel ) * uiNumPartition); 1490 } 1491 #else 1330 1492 memcpy( m_apSegmentDCOffset[0] + uiOffset, pcCU->getSDCSegmentDCOffset(0), sizeof( Pel ) * uiNumPartition); 1331 1493 memcpy( m_apSegmentDCOffset[1] + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition); 1332 1494 #endif 1333 1495 #endif 1334 #if H_3D_INTER_SDC 1496 #endif 1497 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 1335 1498 memcpy( m_pbInterSDCFlag + uiOffset, pcCU->getInterSDCFlag(), iSizeInBool ); 1336 1499 for( Int i = 0; i < 4; i++ ) … … 1338 1501 memcpy( m_apSegmentInterDCOffset[i] + uiOffset, pcCU->getInterSDCSegmentDCOffset( i ), sizeof( Int ) * uiNumPartition); 1339 1502 } 1503 #endif 1504 #if H_3D_DBBP 1505 memcpy( m_pbDBBPFlag + uiOffset, pcCU->getDBBPFlag(), iSizeInBool ); 1340 1506 #endif 1341 1507 … … 1410 1576 #if H_3D_NBDV 1411 1577 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof(* m_pDvInfo) * m_uiNumPartition ); 1578 #endif 1579 1580 #if MTK_DDD_G0063 1581 memcpy( rpcCU->getDDDepth() + m_uiAbsIdxInLCU, m_pucDisparityDerivedDepth, iSizeInUchar ); 1582 memcpy( rpcCU->getUseDDD() + m_uiAbsIdxInLCU, m_pbUseDDD, iSizeInBool ); 1412 1583 #endif 1413 1584 … … 1450 1621 #if H_3D_DIM_SDC 1451 1622 memcpy( rpcCU->getSDCFlag() + m_uiAbsIdxInLCU, m_pbSDCFlag, iSizeInBool ); 1623 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 1624 for( Int i = 0; i < 4; i++ ) 1625 { 1626 memcpy( rpcCU->getSDCSegmentDCOffset(i) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[i], sizeof( Pel ) * m_uiNumPartition); 1627 } 1628 #else 1452 1629 memcpy( rpcCU->getSDCSegmentDCOffset(0) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition); 1453 1630 memcpy( rpcCU->getSDCSegmentDCOffset(1) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition); 1454 1631 #endif 1455 1632 #endif 1456 #if H_3D_INTER_SDC 1633 #endif 1634 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 1457 1635 memcpy( rpcCU->getInterSDCFlag() + m_uiAbsIdxInLCU, m_pbInterSDCFlag, iSizeInBool ); 1458 1636 for( Int i = 0;i < 4; i++ ) … … 1461 1639 } 1462 1640 #endif 1641 #if H_3D_DBBP 1642 memcpy( rpcCU->getDBBPFlag() + m_uiAbsIdxInLCU, m_pbDBBPFlag, iSizeInBool ); 1643 #endif 1644 1463 1645 memcpy( rpcCU->getDepth() + m_uiAbsIdxInLCU, m_puhDepth, iSizeInUchar ); 1464 1646 memcpy( rpcCU->getWidth() + m_uiAbsIdxInLCU, m_puhWidth, iSizeInUchar ); … … 1544 1726 memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2], iSizeInUchar ); 1545 1727 1728 #if MTK_DDD_G0063 1729 memcpy( rpcCU->getDDDepth() + uiPartOffset, m_pucDisparityDerivedDepth, iSizeInUchar ); 1730 memcpy( rpcCU->getUseDDD() + uiPartOffset, m_pbUseDDD, iSizeInBool ); 1731 #endif 1732 1546 1733 #if H_3D_DIM 1547 1734 for( Int i = 0; i < DMM_NUM_TYPE; i++ ) … … 1558 1745 #if H_3D_DIM_SDC 1559 1746 memcpy( rpcCU->getSDCFlag() + uiPartOffset, m_pbSDCFlag, iSizeInBool ); 1747 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 1748 for( Int i = 0; i < 4; i++ ) 1749 { 1750 memcpy( rpcCU->getSDCSegmentDCOffset(i) + uiPartOffset, m_apSegmentDCOffset[i], sizeof( Pel ) * uiQNumPart); 1751 } 1752 #else 1560 1753 memcpy( rpcCU->getSDCSegmentDCOffset(0) + uiPartOffset, m_apSegmentDCOffset[0], sizeof( Pel ) * uiQNumPart); 1561 1754 memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart); 1562 1755 #endif 1563 1756 #endif 1564 #if H_3D_INTER_SDC 1757 #endif 1758 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 1565 1759 memcpy( rpcCU->getInterSDCFlag() + uiPartOffset, m_pbInterSDCFlag, iSizeInBool ); 1566 1760 for( Int i = 0; i < 4; i++ ) … … 1569 1763 } 1570 1764 #endif 1765 #if H_3D_DBBP 1766 memcpy( rpcCU->getDBBPFlag() + uiPartOffset, m_pbDBBPFlag, iSizeInBool ); 1767 #endif 1768 1571 1769 memcpy( rpcCU->getDepth() + uiPartOffset, m_puhDepth, iSizeInUchar ); 1572 1770 memcpy( rpcCU->getWidth() + uiPartOffset, m_puhWidth, iSizeInUchar ); … … 1611 1809 #endif 1612 1810 } 1811 1812 #if MTK_DDD_G0063 1813 Void TComDataCU::setDDDepthSubParts ( UChar ucDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 1814 { 1815 setSubPart<UChar>( ucDDD, m_pucDisparityDerivedDepth, uiAbsPartIdx, uiDepth, uiPartIdx ); 1816 } 1817 1818 Void TComDataCU::setUseDDD ( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 1819 { 1820 setSubPart<Bool>( bUseDDD, m_pbUseDDD, uiAbsPartIdx, uiDepth, uiPartIdx ); 1821 } 1822 1823 Void TComDataCU::setUseDDD( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiDepth ) 1824 { 1825 memset( m_pbUseDDD + uiAbsPartIdx, bUseDDD, (m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ))*sizeof(Bool) ); 1826 } 1827 1828 #endif 1613 1829 1614 1830 // -------------------------------------------------------------------------------------------------------------------- … … 2267 2483 uiCtx = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0; 2268 2484 2485 #if !MTK_ARP_FLAG_CABAC_SIMP_G0061 2269 2486 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2270 2487 uiCtx += ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1): 0; 2271 2488 #endif 2272 2489 return uiCtx; 2273 2490 } 2274 2491 #endif 2275 2492 #if !MTK_IC_FLAG_CABAC_SIMP_G0061 2276 2493 #if H_3D_IC 2277 2494 UInt TComDataCU::getCtxICFlag( UInt uiAbsPartIdx ) … … 2291 2508 } 2292 2509 #endif 2510 #endif 2511 #if H_3D_DBBP 2512 Pel* TComDataCU::getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride) 2513 { 2514 // get coded and reconstructed depth view 2515 TComPicYuv* depthPicYuv = NULL; 2516 Pel* pDepthPels = NULL; 2517 2518 // DBBP is a texture coding tool 2519 if( getSlice()->getIsDepth() ) 2520 { 2521 return NULL; 2522 } 2523 2524 #if H_3D_FCO 2525 TComPic* depthPic = getSlice()->getIvPic(true, getSlice()->getViewIndex() ); 2526 2527 if( depthPic && depthPic->getPicYuvRec() != NULL && depthPic->getIsDepth() ) // depth first 2528 { 2529 depthPicYuv = depthPic->getPicYuvRec(); 2530 depthPicYuv->extendPicBorder(); 2531 2532 // get collocated depth block for current CU 2533 uiDepthStride = depthPicYuv->getStride(); 2534 pDepthPels = depthPicYuv->getLumaAddr( getAddr(), uiAbsPartIdx ); 2535 } 2536 else // texture first 2537 #else 2538 { 2539 DisInfo DvInfo = getDvInfo(uiAbsPartIdx); 2540 2541 TComPic* baseDepthPic = getSlice()->getIvPic (true, DvInfo.m_aVIdxCan); 2542 2543 if( baseDepthPic == NULL || baseDepthPic->getPicYuvRec() == NULL ) 2544 { 2545 return NULL; 2546 } 2547 2548 depthPicYuv = baseDepthPic->getPicYuvRec(); 2549 depthPicYuv->extendPicBorder(); 2550 uiDepthStride = depthPicYuv->getStride(); 2551 2552 Int iBlkX = ( getAddr() % baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ]; 2553 Int iBlkY = ( getAddr() / baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ]; 2554 2555 Int iPictureWidth = depthPicYuv->getWidth(); 2556 Int iPictureHeight = depthPicYuv->getHeight(); 2557 2558 Int iWidth = uiWidth; 2559 Int iHeight = uiHeight; 2560 2561 Bool depthRefineFlag = false; 2562 #if H_3D_NBDV_REF 2563 depthRefineFlag = m_pcSlice->getVPS()->getDepthRefinementFlag( m_pcSlice->getLayerIdInVps() ); 2564 #endif // H_3D_NBDV_REF 2565 2566 TComMv cDv = depthRefineFlag ? DvInfo.m_acDoNBDV : DvInfo.m_acNBDV; 2567 2568 Int depthPosX = Clip3(0, iPictureWidth - iWidth, iBlkX + ((cDv.getHor()+2)>>2)); 2569 Int depthPosY = Clip3(0, iPictureHeight- iHeight, iBlkY + ((cDv.getVer()+2)>>2)); 2570 2571 pDepthPels = depthPicYuv->getLumaAddr() + depthPosX + depthPosY * uiDepthStride; 2572 } 2573 #endif 2574 2575 AOF( depthPicYuv != NULL ); 2576 AOF( pDepthPels != NULL ); 2577 AOF( uiDepthStride != 0 ); 2578 2579 return pDepthPels; 2580 } 2581 #endif 2582 2583 #if H_3D_DBBP 2584 Void TComDataCU::setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2585 { 2586 setSubPart( bDBBPFlag, m_pbDBBPFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 2587 } 2588 #endif 2293 2589 2294 2590 #if H_3D_INTER_SDC 2591 #if !QC_SDC_UNIFY_G0130 2295 2592 Void TComDataCU::setInterSDCFlagSubParts ( Bool bInterSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2296 2593 { … … 2302 2599 return 0; 2303 2600 } 2304 2601 #endif 2602 2603 #if !SEC_INTER_SDC_G0101 2305 2604 Void TComDataCU::xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask ) 2306 2605 { … … 2400 2699 } 2401 2700 #endif 2701 #endif 2702 2703 #if QC_GENERIC_SDC_G0122 2704 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx ) 2705 { 2706 #if QC_SDC_UNIFY_G0130 2707 return 0; 2708 #else 2709 TComDataCU* pcTempCU; 2710 UInt uiTempPartIdx; 2711 UInt uiCtx = 0; 2712 2713 // Get BCBP of left PU 2714 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2715 uiCtx = ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0; 2716 2717 // Get BCBP of above PU 2718 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2719 uiCtx += ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0; 2720 2721 return uiCtx; 2722 #endif 2723 } 2724 2725 UInt TComDataCU::getCtxAngleFlag( UInt uiAbsPartIdx ) 2726 { 2727 TComDataCU* pcTempCU; 2728 UInt uiTempPartIdx; 2729 UInt uiCtx = 0; 2730 2731 // Get BCBP of left PU 2732 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2733 uiCtx = ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? ( pcTempCU->getLumaIntraDir( uiTempPartIdx ) < NUM_INTRA_MODE ? 1 : 0 ) : 0; 2734 2735 // Get BCBP of above PU 2736 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2737 uiCtx += ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? ( pcTempCU->getLumaIntraDir( uiTempPartIdx ) < NUM_INTRA_MODE ? 1 : 0 ) : 0; 2738 2739 return uiCtx; 2740 } 2741 #endif 2402 2742 2403 2743 UInt TComDataCU::getCtxInterDir( UInt uiAbsPartIdx ) … … 2627 2967 if( !getSlice()->getIsDepth() || !isIntra(uiAbsPartIdx) || getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) 2628 2968 return false; 2629 2969 #if QC_GENERIC_SDC_G0122 2970 if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) && !isDimDeltaDC( getLumaIntraDir( uiAbsPartIdx ) ) ) 2971 { 2972 return true; 2973 } 2974 2975 if( getLumaIntraDir( uiAbsPartIdx ) < NUM_INTRA_MODE ) 2976 { 2977 return true; 2978 } 2979 2980 return false; 2981 #endif 2630 2982 // check prediction mode 2631 2983 UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); … … 3250 3602 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3251 3603 { 3604 #if MTK_NBDV_IVREF_FIX_G0067 3605 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1) 3606 #else 3252 3607 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() ) 3608 #endif 3253 3609 { 3254 3610 return false; … … 3267 3623 3268 3624 Bool refViewAvailFlag = false; 3269 UChar predFlag[2] = {0, 0}; 3625 UChar predFlag[2] = {0, 0}; 3626 #if !MTK_RBIP_VSP_G0069 3270 3627 Int refListIdY = 0; 3271 3628 Int viewIdInRefListX = -1; 3629 #endif 3272 3630 3273 3631 for( Int iRefListIdX = 0; iRefListIdX < 2 && !refViewAvailFlag; iRefListIdX++ ) … … 3281 3639 refViewAvailFlag = true; 3282 3640 predFlag[iRefListIdX] = 1; 3641 #if !MTK_RBIP_VSP_G0069 3283 3642 viewIdInRefListX = m_pcSlice->getRefPic(eRefPicListX, i)->getViewId(); 3284 3643 refListIdY = 1 - iRefListIdX; 3644 #endif 3285 3645 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3286 3646 #if H_3D_NBDV … … 3291 3651 } 3292 3652 3653 #if !MTK_RBIP_VSP_G0069 3293 3654 if (m_pcSlice->isInterB() && refViewAvailFlag) 3294 3655 { … … 3330 3691 } 3331 3692 } 3693 #endif 3332 3694 3333 3695 // Set values to be returned … … 3448 3810 for ( Int currListPos = (ivCandDir[0] ? 1 : 0); currListPos < iCount; currListPos++ ) 3449 3811 { 3812 #if NTT_STORE_SPDV_VSP_G0148 3813 if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] != 0 ) ) 3814 #else 3450 3815 if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] == 1 ) ) 3816 #endif 3451 3817 { 3452 3818 continue; … … 3880 4246 UChar tmpDir; 3881 4247 4248 #if MTK_DDD_G0063 4249 m_iUseDDDCandIdx = -1; 4250 #endif 4251 3882 4252 ////////////////////////////////// 3883 4253 //////// GET DISPARITIES //////// … … 3932 4302 Bool bARPFlag = getARPW(uiAbsPartIdx)>0 ? true : false; 3933 4303 #endif 4304 #if H_3D_DBBP 4305 Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx); 4306 #endif 3934 4307 3935 4308 #if H_3D … … 3957 4330 iPosLeftAbove[0] = numA1B1B0; 3958 4331 #if H_3D_VSP 4332 #if NTT_STORE_SPDV_VSP_G0148 4333 if (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 4334 #else 3959 4335 if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1 4336 #endif 3960 4337 #if H_3D_IC 3961 4338 && !bICFlag … … 3980 4357 iPosLeftAbove[1] = numA1B1B0; 3981 4358 #if H_3D_VSP 4359 #if NTT_STORE_SPDV_VSP_G0148 4360 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) != 0) 4361 #else 3982 4362 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1) 4363 #endif 3983 4364 #if H_3D_IC 3984 4365 && !bICFlag … … 4003 4384 { 4004 4385 #if H_3D_VSP 4386 #if NTT_STORE_SPDV_VSP_G0148 4387 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) != 0) 4388 #else 4005 4389 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1) 4390 #endif 4006 4391 #if H_3D_IC 4007 4392 && !bICFlag … … 4024 4409 { 4025 4410 #if H_3D_VSP 4411 #if NTT_STORE_SPDV_VSP_G0148 4412 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) != 0 4413 #else 4026 4414 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1 4415 #endif 4027 4416 #if H_3D_IC 4028 4417 && !bICFlag … … 4047 4436 { 4048 4437 #if H_3D_VSP 4438 #if NTT_STORE_SPDV_VSP_G0148 4439 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) != 0) 4440 #else 4049 4441 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1) 4442 #endif 4050 4443 #if H_3D_IC 4051 4444 && !bICFlag … … 4075 4468 if( bMPIFlag) 4076 4469 { 4470 #if QC_SPIVMP_MPI_G0119 4471 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4472 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4473 tmpDir = 0; 4474 4475 TComPic * pcTexPic = m_pcSlice->getTexturePic(); 4476 #if H_3D_FCO 4477 if (pcTexturePic->getReconMark()) 4478 { 4479 #endif 4480 TComPicYuv* pcTexRec = pcTexPic->getPicYuvRec (); 4481 UInt uiPartAddr; 4482 Int iWidth, iHeight; 4483 Int iCurrPosX, iCurrPosY; 4484 4485 this->getPartIndexAndSize( uiPUIdx, uiPartAddr, iWidth, iHeight ); 4486 pcTexRec->getTopLeftSamplePos( this->getAddr(), this->getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY ); 4487 4488 Int iPUWidth, iPUHeight, iNumPart, iNumPartLine; 4489 this->getSPPara(iWidth, iHeight, iNumPart, iNumPartLine, iPUWidth, iPUHeight); 4490 4491 for (Int i=0; i<iNumPart; i++) 4492 { 4493 puhInterDirSP[i] = 0; 4494 pcMvFieldSP[2*i].getMv().set(0, 0); 4495 pcMvFieldSP[2*i+1].getMv().set(0, 0); 4496 pcMvFieldSP[2*i].setRefIdx(-1); 4497 pcMvFieldSP[2*i+1].setRefIdx(-1); 4498 } 4499 4500 Int iTexCUAddr; 4501 Int iTexAbsPartIdx; 4502 TComDataCU* pcTexCU; 4503 Int iPartition = 0; 4504 Int iInterDirSaved = 0; 4505 TComMvField cMvFieldSaved[2]; 4506 4507 Int iOffsetX = iPUWidth/2;; 4508 Int iOffsetY = iPUHeight/2; 4509 4510 Int iTexPosX, iTexPosY; 4511 const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4512 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight) 4513 { 4514 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iPUWidth) 4515 { 4516 iTexPosX = j + iOffsetX; 4517 iTexPosY = i + iOffsetY; 4518 pcTexRec->getCUAddrAndPartIdx( iTexPosX, iTexPosY, iTexCUAddr, iTexAbsPartIdx ); 4519 pcTexCU = pcTexPic->getCU( iTexCUAddr ); 4520 4521 if( pcTexCU && !pcTexCU->isIntra(iTexAbsPartIdx) ) 4522 { 4523 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4524 { 4525 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4526 TComMvField cTexMvField; 4527 pcTexCU->getMvField( pcTexCU, iTexAbsPartIdx, eCurrRefPicList, cTexMvField ); 4528 Int iValidDepRef = getPic()->isTextRefValid( eCurrRefPicList, cTexMvField.getRefIdx() ); 4529 if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) ) 4530 { 4531 TComMv cMv = cTexMvField.getMv() + cMvRounding; 4532 cMv >>=2; 4533 this->clipMv( cMv ); 4534 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef); 4535 } 4536 } 4537 } 4538 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0); 4539 if (puhInterDirSP[iPartition] == 0) 4540 { 4541 if (iInterDirSaved != 0) 4542 { 4543 puhInterDirSP[iPartition] = iInterDirSaved; 4544 pcMvFieldSP[2*iPartition] = cMvFieldSaved[0]; 4545 pcMvFieldSP[2*iPartition + 1] = cMvFieldSaved[1]; 4546 } 4547 } 4548 else 4549 { 4550 if (iInterDirSaved ==0) 4551 { 4552 pbSPIVMPFlag[iCount] = true; 4553 tmpDir = puhInterDirSP[iPartition]; 4554 tmpMV[0] = pcMvFieldSP[2*iPartition]; 4555 tmpMV[1] = pcMvFieldSP[2*iPartition+1]; 4556 4557 if (iPartition != 0) 4558 { 4559 for (Int iPart = iPartition-1; iPart >= 0; iPart--) 4560 { 4561 puhInterDirSP[iPart] = puhInterDirSP[iPartition]; 4562 pcMvFieldSP[2*iPart] = pcMvFieldSP[2*iPartition]; 4563 pcMvFieldSP[2*iPart + 1] = pcMvFieldSP[2*iPartition + 1]; 4564 } 4565 } 4566 } 4567 iInterDirSaved = puhInterDirSP[iPartition]; 4568 cMvFieldSaved[0] = pcMvFieldSP[2*iPartition]; 4569 cMvFieldSaved[1] = pcMvFieldSP[2*iPartition + 1]; 4570 } 4571 iPartition ++; 4572 } 4573 } 4574 #if H_3D_FCO 4575 } 4576 #endif 4577 #else 4077 4578 UInt uiPartIdxCenter; 4078 4579 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); … … 4131 4632 tmpDir += ((tmpMV[1].getRefIdx()>=0)?2:0); 4132 4633 } 4133 4634 #endif 4134 4635 if( tmpDir != 0 ) 4135 4636 { … … 4190 4691 } 4191 4692 } 4192 4693 #if QC_SPIVMP_MPI_G0119 4694 pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tmpMV[0].getRefIdx()); 4695 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tmpMV[1].getRefIdx()); 4696 #else 4193 4697 if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) ) 4194 4698 { … … 4202 4706 } 4203 4707 } 4708 #endif 4204 4709 puhInterDirNeighbours[iCount] = tmpDir; 4205 4710 … … 4210 4715 iCount ++; 4211 4716 } 4212 } 4213 } 4214 4717 #if !QC_SPIVMP_MPI_G0119 4718 } 4719 #endif 4720 } 4721 #if MTK_DDD_G0063 4722 if( m_pcSlice->getIsDepth() && m_pcSlice->getViewIndex() != 0 && bMPIFlag ) 4723 { 4724 UInt uiPartIdx; 4725 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 4726 TComSlice *pcTextureSlice = pcTextureCU->getSlice(); 4727 4728 4729 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4730 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4731 tmpDir = 0; 4732 4733 xDeriveCenterIdx( uiPUIdx, uiPartIdx); 4734 4735 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdx ) ) 4736 { 4737 4738 TComMvField cMVField; 4739 UChar ucInterDir = pcTextureCU->getInterDir( uiPartIdx ); 4740 4741 Int iDV = 0; 4742 Int iViewIdx = 0; 4743 if( ucInterDir & 1 ) 4744 { 4745 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_0, cMVField ); 4746 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_0, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4747 { 4748 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_0, cMVField.getRefIdx())->getViewIndex(); 4749 iDV = cMVField.getHor(); 4750 4751 4752 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, cMVField.getRefIdx() ); 4753 4754 if( iValidDepRef >= 0 ) 4755 { 4756 const TComMv cAdd( 2, 2 ); 4757 cMVField.getMv() += cAdd; 4758 cMVField.getMv() >>= 2; 4759 clipMv( cMVField.getMv() ); 4760 tmpMV[ 0 ].setMvField( cMVField.getMv(), iValidDepRef ); 4761 tmpDir = 1; 4762 } 4763 } 4764 } 4765 if( !tmpDir && ( ucInterDir & 2 )) 4766 { 4767 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_1, cMVField ); 4768 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_1, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4769 { 4770 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_1, cMVField.getRefIdx())->getViewIndex(); 4771 iDV = cMVField.getHor(); 4772 4773 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, cMVField.getRefIdx() ); 4774 4775 if( iValidDepRef >= 0 ) 4776 { 4777 const TComMv cAdd( 2, 2 ); 4778 cMVField.getMv() += cAdd; 4779 cMVField.getMv() >>= 2; 4780 clipMv( cMVField.getMv() ); 4781 tmpMV[ 1 ].setMvField( cMVField.getMv(), iValidDepRef ); 4782 tmpDir = 2; 4783 } 4784 } 4785 } 4786 if( tmpDir != 0 ) 4787 { 4788 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4789 m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV, iViewIdx ); 4790 m_iUseDDDCandIdx = iCount; 4791 4792 if( tmpDir == 1 ) 4793 { 4794 pcMvFieldNeighbours[ iCount << 1 ] = tmpMV[ 0 ]; 4795 } 4796 else if( tmpDir == 2 ) 4797 { 4798 pcMvFieldNeighbours[( iCount << 1 ) + 1 ] = tmpMV[ 1 ]; 4799 } 4800 4801 abCandIsInter [ iCount ] = true; 4802 puhInterDirNeighbours[ iCount ] = tmpDir; 4803 4804 if ( mrgCandIdx == iCount ) 4805 { 4806 return; 4807 } 4808 iCount ++; 4809 4810 Int iLeftAboveAvail = 0; 4811 if( iPosLeftAbove[ 0 ] != -1 ) 4812 { 4813 iPosLeftAbove[ 0 ] = iCount; 4814 iLeftAboveAvail = 1; 4815 } 4816 if( iPosLeftAbove[ 1 ] != -1 ) 4817 { 4818 iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail; 4819 } 4820 4821 } 4822 } 4823 4824 } 4825 #endif 4215 4826 ///////////////////////////////////////////////////////////////// 4216 4827 //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC Candidates ///// … … 4229 4840 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 4230 4841 4842 #if MTK_NBDV_IVREF_FIX_G0067 4843 if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1) 4844 #else 4231 4845 if ( ivMvPredFlag ) 4846 #endif 4232 4847 { 4233 4848 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP ); … … 4237 4852 //////// INTER VIEW MOTION COMP(IvMC) ///////// 4238 4853 /////////////////////////////////////////////// 4239 4854 #if QC_DEPTH_MERGE_SIMP_G0127 4855 if( getSlice()->getIsDepth() ) 4856 { 4857 ivCandDir[1] = ivCandDir[2] = ivCandDir[3] = 0; 4858 } 4859 #endif 4240 4860 if( ivCandDir[0] ) 4241 4861 { … … 4277 4897 for(; iCnloop >= 0; iCnloop --) 4278 4898 { 4899 #if MTK_DDD_G0063 4900 if( iCnloop == m_iUseDDDCandIdx ) 4901 { 4902 continue; 4903 } 4904 #endif 4279 4905 if(ivCandDir[0] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==tmpMV[0] && pcMvFieldNeighbours[(iCnloop<<1)+1]==tmpMV[1]) // F0125 compatible with F0093 4280 4906 { … … 4339 4965 if (bIvMC) 4340 4966 { 4967 #if QC_SPIVMP_MPI_G0119 4968 if(!m_pcSlice->getIsDepth()) 4969 #endif 4970 #if SEC_SPIVMP_MCP_SIZE_G0077 4971 if(getPartitionSize(0) == SIZE_2Nx2N) 4972 pbSPIVMPFlag[iCount] = true; 4973 #else 4341 4974 pbSPIVMPFlag[iCount] = true; 4975 #endif 4976 #if H_3D_DBBP 4977 pbSPIVMPFlag[iCount] &= !bDBBPFlag; 4978 #endif 4342 4979 if( ( ivCandDir[0] & 1 ) == 1 ) 4343 4980 { … … 4466 5103 #endif 4467 5104 5105 #if MTK_DDD_G0063 5106 // early termination 5107 if ( iCount >= getSlice()->getMaxNumMergeCand()) 5108 { 5109 return; 5110 } 5111 #endif 4468 5112 4469 5113 #if H_3D_IV_MERGE … … 4471 5115 //////// INTER VIEW DISP COMP (IvDC) //////// 4472 5116 ///////////////////////////////////////////// 4473 5117 #if QC_DEPTH_MERGE_SIMP_G0127 5118 if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 5119 #else 4474 5120 if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand()) 5121 #endif 4475 5122 { 4476 5123 assert(iCount < getSlice()->getMaxNumMergeCand()); … … 4633 5280 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// 4634 5281 //////////////////////////////////////////////////// 5282 #if QC_DEPTH_MERGE_SIMP_G0127 5283 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 5284 #else 4635 5285 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() ) 5286 #endif 4636 5287 { 4637 5288 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) … … 5439 6090 Int height = 0; 5440 6091 UInt partAddr; 6092 6093 #if H_3D_DBBP 6094 if( getDBBPFlag(0) ) 6095 { 6096 return true; 6097 } 6098 #endif 5441 6099 5442 6100 getPartIndexAndSize( puIdx, partAddr, width, height ); … … 6362 7020 #endif 6363 7021 #if H_3D_IV_MERGE 7022 #if SEC_DEPTH_DV_DERIVAITON_G0074 7023 Bool TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 7024 #else 6364 7025 Bool TComDataCU::getDispNeighBlocks (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 6365 { 7026 #endif 7027 { 7028 #if SEC_DEPTH_DV_DERIVAITON_G0074 7029 assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N); 7030 7031 TComMv cMv; 7032 Int iDisp = getSlice()->getDepthToDisparityB( 0 )[ 128 ]; 7033 cMv.setHor(iDisp); 7034 cMv.setVer(0); 7035 pDisp->m_acNBDV = cMv; 7036 pDisp->m_aVIdxCan = 0; 7037 7038 return true; 7039 #else 6366 7040 Pel pDepPos[3] = {0, 0, 0}; 6367 7041 assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N); … … 6409 7083 return false; 6410 7084 } 7085 #endif 6411 7086 } 6412 7087 #endif … … 6425 7100 // Init disparity struct for results 6426 7101 pDInfo->bDV = false; 7102 #if MTK_NBDV_IVREF_FIX_G0067 7103 pDInfo->m_aVIdxCan = -1; 7104 #endif 6427 7105 // Init struct for disparities from MCP neighboring blocks 6428 7106 IDVInfo cIDVInfo; … … 6945 7623 { 6946 7624 Int iSubPUSize = 1<<getSlice()->getVPS()->getSubPULog2Size(getSlice()->getLayerId()); 7625 #if QC_SPIVMP_MPI_G0119 7626 if( getSlice()->getIsDepth() ) 7627 { 7628 iSubPUSize = 1 << getSlice()->getVPS()->getSubPUMPILog2Size(); 7629 } 7630 #endif 6947 7631 iNumSPInOneLine = iPUWidth/iSubPUSize; 6948 7632 iNumSPInOneLine = iNumSPInOneLine < 1 ? 1: iNumSPInOneLine; … … 7038 7722 //////////sub-PU IvMC/////////// 7039 7723 //////////////////////////////// 7040 7724 #if QC_SPIVMP_MPI_G0119 7725 if(!m_pcSlice->getIsDepth()) 7726 { 7727 #endif 7728 #if SEC_SPIVMP_MCP_SIZE_G0077 7729 if( getPartitionSize(0) == SIZE_2Nx2N ) 7730 { 7731 #endif 7041 7732 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 7042 7733 getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); … … 7055 7746 TComDataCU* pcBaseCU; 7056 7747 Int iPartition = 0; 7748 #if !KHU_SIMP_SPIVMP_G0147 7057 7749 Int iInterDirLast = 0; 7058 7750 TComMvField cMvFieldLast[2]; 7751 #endif 7059 7752 7060 7753 Int iDelX = iSPWidth/2; 7061 7754 Int iDelY = iSPHeight/2; 7062 7755 7756 #if KHU_SIMP_SPIVMP_G0147 7757 Int iCenterPosX = iCurrPosX + ( ( iWidth / iSPWidth ) >> 1 ) * iSPWidth + ( iSPWidth >> 1 ); 7758 Int iCenterPosY = iCurrPosY + ( ( iHeight / iSPHeight ) >> 1 ) * iSPHeight + (iSPHeight >> 1); 7759 Int iRefCenterCUAddr, iRefCenterAbsPartIdx; 7760 7761 if(iWidth == iSPWidth && iHeight == iSPHeight) 7762 { 7763 iCenterPosX = iCurrPosX + (iWidth >> 1); 7764 iCenterPosY = iCurrPosY + (iHeight >> 1); 7765 } 7766 7767 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 7768 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) ); 7769 7770 pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx ); 7771 TComDataCU* pcDefaultCU = pcBasePic->getCU( iRefCenterCUAddr ); 7772 if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA )) 7773 { 7774 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 7775 { 7776 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 7777 Bool stopLoop = false; 7778 for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop) 7779 { 7780 RefPicList eDefaultRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 7781 TComMvField cDefaultMvField; 7782 pcDefaultCU->getMvField( pcDefaultCU, iRefCenterAbsPartIdx, eDefaultRefPicList, cDefaultMvField ); 7783 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 7784 if (iDefaultRefIdx >= 0) 7785 { 7786 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eDefaultRefPicList, iDefaultRefIdx); 7787 if (iDefaultRefPOC != pcSlice->getPOC()) 7788 { 7789 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 7790 { 7791 if (iDefaultRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 7792 { 7793 abPdmAvailable[ uiCurrRefListId ] = true; 7794 TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer()); 7795 #if H_3D_NBDV 7796 #if H_3D_IV_MERGE 7797 if( !bIsDepth ) 7798 { 7799 #endif 7800 cMv.setIDVFlag (true); 7801 cMv.setIDVHor (cDv.getHor()); 7802 cMv.setIDVVer (cDv.getVer()); 7803 cMv.setIDVVId (iViewIndex); 7804 #if H_3D_IV_MERGE 7805 } 7806 #endif 7807 #endif 7808 clipMv( cMv ); 7809 paiPdmRefIdx [ uiCurrRefListId ] = iPdmRefIdx; 7810 pacPdmMv [ uiCurrRefListId ] = cMv; 7811 stopLoop = true; 7812 break; 7813 } 7814 } 7815 } 7816 } 7817 } 7818 } 7819 } 7820 availableMcDc[0] = ( abPdmAvailable[0]? 1 : 0) + (abPdmAvailable[1]? 2 : 0); 7821 7822 if(availableMcDc[0]) 7823 { 7824 #endif 7063 7825 Int iBasePosX, iBasePosY; 7064 7826 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iSPHeight) … … 7119 7881 if (puhInterDirSP[iPartition] == 0) 7120 7882 { 7883 #if KHU_SIMP_SPIVMP_G0147 7884 puhInterDirSP[iPartition] = availableMcDc[0]; 7885 pcMvFieldSP[2*iPartition].setMvField(pacPdmMv[0], paiPdmRefIdx[0]); 7886 pcMvFieldSP[2*iPartition + 1].setMvField(pacPdmMv[1], paiPdmRefIdx[1]); 7887 #else 7121 7888 if (iInterDirLast != 0) 7122 7889 { … … 7125 7892 pcMvFieldSP[2*iPartition + 1] = cMvFieldLast[1]; 7126 7893 } 7127 } 7894 #endif 7895 } 7896 #if !KHU_SIMP_SPIVMP_G0147 7128 7897 else 7129 7898 { … … 7150 7919 cMvFieldLast[1] = pcMvFieldSP[2*iPartition + 1]; 7151 7920 } 7152 7921 #endif 7153 7922 iPartition ++; 7154 7923 7155 7924 } 7156 } 7925 } 7926 #if KHU_SIMP_SPIVMP_G0147 7927 } 7928 #endif 7929 #if SEC_SPIVMP_MCP_SIZE_G0077 7930 } 7931 #endif 7157 7932 7158 7933 iCurrPosX += ( iWidth >> 1 ); 7159 7934 iCurrPosY += ( iHeight >> 1 ); 7935 #if QC_SPIVMP_MPI_G0119 7936 } 7937 #endif 7160 7938 #endif 7161 7939 … … 7165 7943 7166 7944 #if H_3D_SPIVMP 7945 #if QC_SPIVMP_MPI_G0119 7946 if(m_pcSlice->getIsDepth()) 7947 { 7948 iCurrPosX += ( iWidth >> 1 ); 7949 iCurrPosY += ( iHeight >> 1 ); 7950 } 7951 #if QC_DEPTH_MERGE_SIMP_G0127 7952 #if SEC_SPIVMP_MCP_SIZE_G0077 7953 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7954 #else 7955 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7956 #endif 7957 #else 7958 #if SEC_SPIVMP_MCP_SIZE_G0077 7959 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < 2; iLoopCan ++) 7960 #else 7961 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < 2; iLoopCan ++) 7962 #endif 7963 #endif 7964 #else 7965 #if SEC_SPIVMP_MCP_SIZE_G0077 7966 for(Int iLoopCan = (getPartitionSize(uiPartAddr) == SIZE_2Nx2N ? 1 : 0); iLoopCan < 2; iLoopCan ++) 7967 #else 7167 7968 for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++) 7969 #endif 7970 #endif 7168 7971 #else 7169 7972 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) … … 7173 7976 // iLoopCan == 1 --> IvMCShift 7174 7977 7175 #if !H_3D_SPIVMP 7978 #if !H_3D_SPIVMP || QC_SPIVMP_MPI_G0119 7176 7979 Int iBaseCUAddr; 7177 7980 Int iBaseAbsPartIdx; … … 7181 7984 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 ); 7182 7985 7183 #if H_3D_SPIVMP 7986 #if H_3D_SPIVMP && !QC_SPIVMP_MPI_G0119 7184 7987 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); 7185 7988 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); … … 7190 7993 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 7191 7994 7192 #if H_3D_SPIVMP 7995 #if H_3D_SPIVMP && !QC_SPIVMP_MPI_G0119 7193 7996 pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 7194 7997 #else … … 7248 8051 } 7249 8052 #if H_3D_SPIVMP 8053 #if QC_SPIVMP_MPI_G0119 8054 #if QC_DEPTH_MERGE_SIMP_G0127 8055 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 8056 #else 8057 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < 2; iLoopCan ++) 8058 #endif 8059 #else 7250 8060 for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++) 8061 #endif 7251 8062 #else 7252 8063 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) … … 7260 8071 /////// IvDC + IvDCShift /////// 7261 8072 //////////////////////////////// 7262 8073 #if QC_DEPTH_MERGE_SIMP_G0127 8074 if( !getSlice()->getIsDepth() ) 8075 { 8076 #endif 7263 8077 for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ ) 7264 8078 { … … 7294 8108 availableMcDc[1 + (iLoopCan << 1)] = ( abPdmAvailable[2 + (iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[3 + (iLoopCan<<2)] ? 2 : 0 ); 7295 8109 } 8110 #if QC_DEPTH_MERGE_SIMP_G0127 8111 } 8112 #endif 7296 8113 return false; 7297 8114 } … … 7367 8184 #endif 7368 8185 8186 #if NTT_STORE_SPDV_VSP_G0148 8187 Void TComDataCU::setMvFieldPUForVSP( TComDataCU* pcCU, UInt partAddr, Int width, Int height, RefPicList eRefPicList, Int iRefIdx, Int &vspSize ) 8188 { 8189 // Get depth reference 8190 Int depthRefViewIdx = pcCU->getDvInfo(partAddr).m_aVIdxCan; 8191 8192 #if H_3D_FCO_VSP_DONBDV_E0163 8193 TComPic* pRefPicBaseDepth = 0; 8194 Bool bIsCurrDepthCoded = false; 8195 pRefPicBaseDepth = pcCU->getSlice()->getIvPic( true, pcCU->getSlice()->getViewIndex() ); 8196 if ( pRefPicBaseDepth->getPicYuvRec() != NULL ) 8197 { 8198 bIsCurrDepthCoded = true; 8199 } 8200 else 8201 { 8202 pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx ); 8203 } 8204 #else 8205 TComPic* pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx ); 8206 #endif 8207 assert(pRefPicBaseDepth != NULL); 8208 TComPicYuv* pcBaseViewDepthPicYuv = pRefPicBaseDepth->getPicYuvRec(); 8209 assert(pcBaseViewDepthPicYuv != NULL); 8210 pcBaseViewDepthPicYuv->extendPicBorder(); 8211 8212 // Get texture reference 8213 assert(iRefIdx >= 0); 8214 TComPic* pRefPicBaseTxt = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx ); 8215 TComPicYuv* pcBaseViewTxtPicYuv = pRefPicBaseTxt->getPicYuvRec(); 8216 assert(pcBaseViewTxtPicYuv != NULL); 8217 8218 // Initialize LUT according to the reference viewIdx 8219 Int txtRefViewIdx = pRefPicBaseTxt->getViewIndex(); 8220 Int* pShiftLUT = pcCU->getSlice()->getDepthToDisparityB( txtRefViewIdx ); 8221 assert( txtRefViewIdx < pcCU->getSlice()->getViewIndex() ); 8222 8223 // prepare Dv to access depth map or reference view 8224 TComMv cDv = pcCU->getDvInfo(partAddr).m_acNBDV; 8225 pcCU->clipMv(cDv); 8226 8227 #if H_3D_FCO_VSP_DONBDV_E0163 8228 if ( bIsCurrDepthCoded ) 8229 { 8230 cDv.setZero(); 8231 } 8232 #endif 8233 8234 // fetch virtual depth map & convert depth to motion vector, which are stored in the motion memory 8235 xSetMvFieldForVSP( pcCU, pcBaseViewDepthPicYuv, &cDv, partAddr, width, height, pShiftLUT, eRefPicList, iRefIdx, pcCU->getSlice()->getIsDepth(), vspSize ); 8236 } 8237 8238 Void TComDataCU::xSetMvFieldForVSP( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, Int *shiftLUT, RefPicList refPicList, Int refIdx, Bool isDepth, Int &vspSize ) 8239 { 8240 TComCUMvField *cuMvField = cu->getCUMvField( refPicList ); 8241 Int partAddrRasterSubPULine = g_auiZscanToRaster[ partAddr ]; 8242 Int numPartsLine = cu->getPic()->getNumPartInWidth(); 8243 8244 Int nTxtPerMvInfoX = 4; // cu->getPic()->getMinCUWidth(); 8245 Int nTxtPerMvInfoY = 4; // cu->getPic()->getMinCUHeight(); 8246 8247 Int refDepStride = picRefDepth->getStride(); 8248 8249 TComMv tmpMv(0, 0); 8250 tmpMv.setIDVFlag(false); 8251 8252 Int refDepOffset = ( (dv->getHor()+2) >> 2 ) + ( (dv->getVer()+2) >> 2 ) * refDepStride; 8253 Pel *refDepth = picRefDepth->getLumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr ) + refDepOffset; 8254 8255 if ((height % 8)) 8256 { 8257 vspSize = 1; // 8x4 8258 } 8259 else if ((width % 8)) 8260 { 8261 vspSize = 0; // 4x8 8262 } 8263 else 8264 { 8265 Bool ULvsBR, URvsBL; 8266 ULvsBR = refDepth[0] < refDepth[refDepStride * (height-1) + width-1]; 8267 URvsBL = refDepth[width-1] < refDepth[refDepStride * (height-1)]; 8268 vspSize = ( ULvsBR ^ URvsBL ) ? 0 : 1; 8269 } 8270 8271 Int subBlockW, subBlockH; 8272 if (vspSize) 8273 { 8274 subBlockW = 8; 8275 subBlockH = 4; 8276 } 8277 else 8278 { 8279 subBlockW = 4; 8280 subBlockH = 8; 8281 } 8282 8283 Int numPartsInSubPUW = subBlockW / nTxtPerMvInfoX; 8284 Int numPartsInSubPUH = subBlockH / nTxtPerMvInfoY * numPartsLine; 8285 8286 for( Int y=0; y<height; y+=subBlockH, partAddrRasterSubPULine+=numPartsInSubPUH ) 8287 { 8288 Pel *refDepthTmp[4]; 8289 refDepthTmp[0] = refDepth + refDepStride * y; 8290 refDepthTmp[1] = refDepthTmp[0] + subBlockW - 1; 8291 refDepthTmp[2] = refDepthTmp[0] + refDepStride * (subBlockH - 1); 8292 refDepthTmp[3] = refDepthTmp[2] + subBlockW - 1; 8293 8294 Int partAddrRasterSubPU = partAddrRasterSubPULine; 8295 for( Int x=0; x<width; x+=subBlockW, partAddrRasterSubPU+=numPartsInSubPUW ) 8296 { 8297 Pel maxDepthVal; 8298 maxDepthVal = refDepthTmp[0][x]; 8299 maxDepthVal = std::max( maxDepthVal, refDepthTmp[1][x]); 8300 maxDepthVal = std::max( maxDepthVal, refDepthTmp[2][x]); 8301 maxDepthVal = std::max( maxDepthVal, refDepthTmp[3][x]); 8302 tmpMv.setHor( (Short) shiftLUT[ maxDepthVal ] ); 8303 8304 Int partAddrRasterPartLine = partAddrRasterSubPU; 8305 for( Int sY=0; sY<numPartsInSubPUH; sY+=numPartsLine, partAddrRasterPartLine += numPartsLine ) 8306 { 8307 Int partAddrRasterPart = partAddrRasterPartLine; 8308 for( Int sX=0; sX<numPartsInSubPUW; sX+=1, partAddrRasterPart++ ) 8309 { 8310 cuMvField->setMv ( g_auiRasterToZscan[ partAddrRasterPart ], tmpMv ); 8311 cuMvField->setRefIdx( g_auiRasterToZscan[ partAddrRasterPart ], refIdx ); 8312 } 8313 } 8314 } 8315 } 8316 8317 vspSize = (vspSize<<2)+1; 8318 8319 } 8320 #endif // NTT_STORE_SPDV_VSP_G0148 7369 8321 7370 8322 //! \} -
trunk/source/Lib/TLibCommon/TComDataCU.h
r773 r833 97 97 }; 98 98 99 #if H_3D_DBBP 100 typedef struct _DBBPTmpData 101 { 102 TComMv acMvd[2][2]; // for two segments and two lists 103 TComMvField acMvField[2][2]; // for two segments and two lists 104 Int aiMvpNum[2][2]; // for two segments and two lists 105 Int aiMvpIdx[2][2]; // for two segments and two lists 106 UChar auhInterDir[2]; // for two segments 107 Bool abMergeFlag[2]; // for two segments 108 UChar auhMergeIndex[2]; // for two segments 109 Char ahVSPFlag[2]; // for two segments 110 DisInfo acDvInfo[2]; // for two segments 111 112 PartSize eVirtualPartSize; 113 UInt uiVirtualPartIndex; 114 } DBBPTmpData; 115 #endif 99 116 100 117 // ==================================================================================================================== … … 215 232 #if H_3D_DIM_SDC 216 233 Bool* m_pbSDCFlag; 234 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101 235 Pel* m_apSegmentDCOffset[4]; 236 #else 217 237 Pel* m_apSegmentDCOffset[2]; 218 238 #endif 219 239 #endif 240 #endif 220 241 #if H_3D_INTER_SDC 242 #if !QC_SDC_UNIFY_G0130 221 243 Bool* m_pbInterSDCFlag; 222 244 Int* m_apSegmentInterDCOffset[4]; 245 #endif 246 #if !SEC_INTER_SDC_G0101 223 247 UChar* m_pucInterSDCMask; 248 #endif 249 #endif 250 #if H_3D_DBBP 251 Bool* m_pbDBBPFlag; ///< array of DBBP flags 252 DBBPTmpData m_sDBBPTmpData; 224 253 #endif 225 254 #if H_3D … … 250 279 #endif 251 280 281 #if MTK_DDD_G0063 282 UChar* m_pucDisparityDerivedDepth; 283 Bool* m_pbUseDDD; 284 Int m_iUseDDDCandIdx; 285 UChar m_ucDDTmpDepth; 286 #endif 287 252 288 protected: 253 289 … … 283 319 284 320 Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter ); 321 322 #if NTT_STORE_SPDV_VSP_G0148 323 Void xSetMvFieldForVSP ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, Int *shiftLUT, RefPicList refPicList, Int refIdx, Bool isDepth, Int &vspSize ); 324 #endif 285 325 286 326 public: … … 351 391 Void setCUTransquantBypassSubParts( Bool flag, UInt uiAbsPartIdx, UInt uiDepth ); 352 392 393 #if H_3D_DBBP 394 Pel* getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride); 395 #endif 396 353 397 Bool* getSkipFlag () { return m_skipFlag; } 354 398 Bool getSkipFlag (UInt idx) { return m_skipFlag[idx]; } … … 362 406 Void setPredictionMode ( UInt uiIdx, PredMode uh){ m_pePredMode[uiIdx] = uh; } 363 407 Void setPredModeSubParts ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ); 408 409 #if H_3D_DBBP 410 Bool* getDBBPFlag () { return m_pbDBBPFlag; } 411 Bool getDBBPFlag ( UInt uiIdx ) { return m_pbDBBPFlag[uiIdx]; } 412 Void setDBBPFlag ( UInt uiIdx, Bool b ) { m_pbDBBPFlag[uiIdx] = b; } 413 Void setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 414 DBBPTmpData* getDBBPTmpData () { return &m_sDBBPTmpData; } 415 #endif 364 416 365 417 UChar* getWidth () { return m_puhWidth; } … … 501 553 #if H_3D 502 554 Void rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV); 555 #if SEC_DEPTH_DV_DERIVAITON_G0074 556 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 557 #else 503 558 Bool getDispNeighBlocks ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 559 #endif 504 560 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 505 561 #endif … … 571 627 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 572 628 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 629 #if QC_GENERIC_SDC_G0122 630 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 631 UInt getCtxAngleFlag ( UInt uiAbsPartIdx ); 632 #endif 573 633 #endif 574 634 #endif 575 635 #if H_3D_INTER_SDC 636 #if !QC_SDC_UNIFY_G0130 576 637 Bool* getInterSDCFlag () { return m_pbInterSDCFlag; } 577 638 Bool getInterSDCFlag ( UInt uiIdx ) { return m_pbInterSDCFlag[uiIdx]; } … … 582 643 Void setInterSDCSegmentDCOffset( Int pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentInterDCOffset[uiSeg][uiPartIdx] = pOffset; } 583 644 645 #endif 646 #if !SEC_INTER_SDC_G0101 584 647 Void xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask ); 585 648 586 649 UChar* getInterSDCMask () { return m_pucInterSDCMask; } 650 #endif 587 651 #endif 588 652 … … 691 755 Void setVSPFlag ( UInt uiIdx, Int n ) { m_piVSPFlag[uiIdx] = n; } 692 756 Void setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 757 #if NTT_STORE_SPDV_VSP_G0148 758 Void setMvFieldPUForVSP ( TComDataCU* cu, UInt partAddr, Int width, Int height, RefPicList refPicList, Int refIdx, Int &vspSize ); 759 #endif 693 760 #endif 694 761 Void deriveLeftRightTopIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); … … 730 797 UInt getCTXARPWFlag ( UInt uiAbsPartIdx ); 731 798 #endif 799 #if !MTK_IC_FLAG_CABAC_SIMP_G0061 732 800 #if H_3D_IC 733 801 UInt getCtxICFlag ( UInt uiAbsPartIdx ); 802 #endif 734 803 #endif 735 804 UInt getSliceStartCU ( UInt pos ) { return m_sliceStartCU[pos-m_uiAbsIdxInLCU]; } … … 751 820 UInt getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra); 752 821 822 #if MTK_DDD_G0063 823 UChar* getDDDepth () { return m_pucDisparityDerivedDepth; } 824 UChar getDDDepth ( UInt uiIdx ) { return m_pucDisparityDerivedDepth[uiIdx]; } 825 Void setDDDepth ( UInt uiIdx, UChar n ) { m_pucDisparityDerivedDepth[uiIdx] = n; } 826 Void setDDDepthSubParts( UChar ucDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 827 828 Bool* getUseDDD () { return m_pbUseDDD; } 829 Bool getUseDDD ( UInt uiIdx ) { return m_pbUseDDD[uiIdx]; } 830 Void setUseDDD ( UInt uiIdx, Bool n ) { m_pbUseDDD[uiIdx] = n; } 831 Void setUseDDD( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiDepth ); 832 833 Void setUseDDD ( Bool bUseDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 834 835 UChar getDDTmpDepth(){ return m_ucDDTmpDepth; } 836 Int getUseDDDCandIdx(){ return m_iUseDDDCandIdx;} 837 838 #endif 753 839 }; 754 840 -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r773 r833 176 176 Void setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight ); 177 177 #endif 178 #if NTT_STORE_SPDV_VSP_G0148 179 Void setMv ( Int iIdx, TComMv const & rcMv ) { m_pcMv[iIdx] = rcMv; } 180 Void setRefIdx ( Int iIdx, Int iRefIdx ) { m_piRefIdx[iIdx] = iRefIdx; } 181 #endif 178 182 179 183 Void setNumPartition( Int iNumPart ) -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r773 r833 416 416 417 417 #if H_3D_DIM 418 Void TComPrediction::predIntraLumaDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc ) 418 Void TComPrediction::predIntraLumaDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc 419 #if QC_GENERIC_SDC_G0122 420 , TComWedgelet* dmm4Segmentation 421 #endif 422 ) 419 423 { 420 424 assert( iWidth == iHeight ); … … 442 446 case( DMM4_IDX ): 443 447 { 448 #if QC_GENERIC_SDC_G0122 449 if( dmm4Segmentation == NULL ) 450 { 451 dmmSegmentation = new TComWedgelet( iWidth, iHeight ); 452 xPredContourFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, dmmSegmentation ); 453 } 454 else 455 { 456 xPredContourFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, dmm4Segmentation ); 457 dmmSegmentation = dmm4Segmentation; 458 } 459 #else 444 460 dmmSegmentation = new TComWedgelet( iWidth, iHeight ); 445 461 xPredContourFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, dmmSegmentation ); 462 #endif 446 463 } break; 447 464 default: assert(0); … … 494 511 495 512 #if H_3D_DIM_DMM 513 #if QC_GENERIC_SDC_G0122 514 if( dimType == DMM4_IDX && dmm4Segmentation == NULL ) { dmmSegmentation->destroy(); delete dmmSegmentation; } 515 #else 496 516 if( dimType == DMM4_IDX ) { dmmSegmentation->destroy(); delete dmmSegmentation; } 517 #endif 497 518 #endif 498 519 } … … 598 619 } 599 620 return true; 621 } 622 #endif 623 624 #if H_3D_DBBP 625 PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize) 626 { 627 // find virtual partitioning for this CU based on depth block 628 // segmentation of texture block --> mask IDs 629 Pel* pDepthBlockStart = pDepthPels; 630 631 // first compute average of depth block for thresholding 632 Int iSumDepth = 0; 633 Int iSubSample = 4; 634 for (Int y=0; y<uiSize; y+=iSubSample) 635 { 636 for (Int x=0; x<uiSize; x+=iSubSample) 637 { 638 Int depthPel = pDepthPels[x]; 639 640 iSumDepth += depthPel; 641 } 642 643 // next row 644 pDepthPels += uiDepthStride*iSubSample; 645 } 646 647 Int iSizeInBits = g_aucConvertToBit[uiSize] - g_aucConvertToBit[iSubSample]; // respect sub-sampling factor 648 Int iMean = iSumDepth >> iSizeInBits*2; // iMean /= (uiSize*uiSize); 649 650 // start again for segmentation 651 pDepthPels = pDepthBlockStart; 652 653 // start mapping process 654 Bool bAMPAvail = uiSize > 8; 655 Int matchedPartSum[6][2] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}}; // counter for each part size and boolean option 656 PartSize virtualPartSizes[6] = { SIZE_Nx2N, SIZE_2NxN, SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N }; 657 658 UInt uiHalfSize = uiSize>>1; 659 UInt uiQuarterSize = uiSize>>2; 660 661 for (Int y=0; y<uiSize; y+=iSubSample) 662 { 663 for (Int x=0; x<uiSize; x+=iSubSample) 664 { 665 Int depthPel = pDepthPels[x]; 666 667 // decide which segment this pixel belongs to 668 Int ucSegment = (Int)(depthPel>iMean); 669 670 // Matched Filter to find optimal (conventional) partitioning 671 672 // SIZE_Nx2N 673 if(x<uiHalfSize) // left 674 { 675 matchedPartSum[0][ucSegment]++; 676 } 677 else // right 678 { 679 matchedPartSum[0][1-ucSegment]++; 680 } 681 682 // SIZE_2NxN 683 if(y<uiHalfSize) // top 684 { 685 matchedPartSum[1][ucSegment]++; 686 } 687 else // bottom 688 { 689 matchedPartSum[1][1-ucSegment]++; 690 } 691 692 if( bAMPAvail ) 693 { 694 // SIZE_2NxnU 695 if(y<uiQuarterSize) // top (1/4) 696 { 697 matchedPartSum[2][ucSegment]++; 698 } 699 else // bottom (3/4) 700 { 701 matchedPartSum[2][1-ucSegment]++; 702 } 703 704 // SIZE_2NxnD 705 if(y<(uiQuarterSize*3)) // top (3/4) 706 { 707 matchedPartSum[3][ucSegment]++; 708 } 709 else // bottom (1/4) 710 { 711 matchedPartSum[3][1-ucSegment]++; 712 } 713 714 // SIZE_nLx2N 715 if(x<uiQuarterSize) // left (1/4) 716 { 717 matchedPartSum[4][ucSegment]++; 718 } 719 else // right (3/4) 720 { 721 matchedPartSum[4][1-ucSegment]++; 722 } 723 724 // SIZE_nRx2N 725 if(x<(uiQuarterSize*3)) // left (3/4) 726 { 727 matchedPartSum[5][ucSegment]++; 728 } 729 else // right (1/4) 730 { 731 matchedPartSum[5][1-ucSegment]++; 732 } 733 } 734 } 735 736 // next row 737 pDepthPels += uiDepthStride*iSubSample; 738 } 739 740 PartSize matchedPartSize = SIZE_NONE; 741 742 Int iMaxMatchSum = 0; 743 for(Int p=0; p<6; p++) // loop over partition sizes 744 { 745 for( Int b=0; b<=1; b++ ) // loop over boolean options 746 { 747 if(matchedPartSum[p][b] > iMaxMatchSum) 748 { 749 iMaxMatchSum = matchedPartSum[p][b]; 750 matchedPartSize = virtualPartSizes[p]; 751 } 752 } 753 } 754 755 AOF( matchedPartSize != SIZE_NONE ); 756 757 return matchedPartSize; 758 } 759 760 Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask ) 761 { 762 // segmentation of texture block --> mask IDs 763 Pel* pDepthBlockStart = pDepthPels; 764 765 // first compute average of depth block for thresholding 766 Int iSumDepth = 0; 767 Int uiMinDepth = MAX_INT; 768 Int uiMaxDepth = 0; 769 for (Int y=0; y<uiHeight; y++) 770 { 771 for (Int x=0; x<uiWidth; x++) 772 { 773 Int depthPel = pDepthPels[x]; 774 iSumDepth += depthPel; 775 776 if( depthPel > uiMaxDepth ) 777 { 778 uiMaxDepth = depthPel; 779 } 780 if( depthPel < uiMinDepth ) 781 { 782 uiMinDepth = depthPel; 783 } 784 } 785 786 // next row 787 pDepthPels += uiDepthStride; 788 } 789 790 // don't generate mask for blocks with small depth range (encoder decision) 791 if( uiMaxDepth - uiMinDepth < 10 ) 792 { 793 return false; 794 } 795 796 AOF(uiWidth==uiHeight); 797 Int iSizeInBits = g_aucConvertToBit[uiWidth]+2; 798 Int iMean = iSumDepth >> iSizeInBits*2; // iMean /= (uiWidth*uiHeight); 799 800 // start again for segmentation 801 pDepthPels = pDepthBlockStart; 802 803 Bool bInvertMask = pDepthPels[0]>iMean; // top-left segment needs to be mapped to partIdx 0 804 805 // generate mask 806 UInt uiSumPix[2] = {0,0}; 807 for (Int y=0; y<uiHeight; y++) 808 { 809 for (Int x=0; x<uiHeight; x++) 810 { 811 Int depthPel = pDepthPels[x]; 812 813 // decide which segment this pixel belongs to 814 Int ucSegment = (Int)(depthPel>iMean); 815 816 if( bInvertMask ) 817 { 818 ucSegment = 1-ucSegment; 819 } 820 821 // count pixels for each segment 822 uiSumPix[ucSegment]++; 823 824 // set mask value 825 pMask[x] = (Bool)ucSegment; 826 } 827 828 // next row 829 pDepthPels += uiDepthStride; 830 pMask += MAX_CU_SIZE; 831 } 832 833 // don't generate valid mask for tiny segments (encoder decision) 834 // each segment needs to cover at least 1/8th of block 835 UInt uiMinPixPerSegment = (uiWidth*uiHeight) >> 3; 836 if( !( uiSumPix[0] > uiMinPixPerSegment && uiSumPix[1] > uiMinPixPerSegment ) ) 837 { 838 return false; 839 } 840 841 // all good 842 return true; 843 } 844 845 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr ) 846 { 847 Pel* piSrc[2] = {pInYuv[0]->getLumaAddr(uiPartAddr), pInYuv[1]->getLumaAddr(uiPartAddr)}; 848 UInt uiSrcStride = pInYuv[0]->getStride(); 849 Pel* piDst = pOutYuv->getLumaAddr(uiPartAddr); 850 UInt uiDstStride = pOutYuv->getStride(); 851 852 UInt uiMaskStride= MAX_CU_SIZE; 853 854 // backup pointer 855 Bool* pMaskStart = pMask; 856 857 // combine luma first 858 for (Int y=0; y<uiHeight; y++) 859 { 860 for (Int x=0; x<uiWidth; x++) 861 { 862 UChar ucSegment = (UChar)pMask[x]; 863 AOF( ucSegment < 2 ); 864 865 // filtering 866 Bool t = (y==0)?pMaskStart[(y+1)*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x]; 867 Bool l = (x==0)?pMaskStart[y*uiMaskStride+x+1]:pMaskStart[y*uiMaskStride+x-1]; 868 Bool b = (y==uiHeight-1)?pMaskStart[(y-1)*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x]; 869 Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x-1]:pMaskStart[y*uiMaskStride+x+1]; 870 871 Bool bBlend = !((t&&l&&b&&r) || (!t&&!l&&!b&&!r)); 872 piDst[x] = bBlend?((piSrc[0][x]+piSrc[1][x]+1)>>1):piSrc[ucSegment][x]; 873 } 874 875 piSrc[0] += uiSrcStride; 876 piSrc[1] += uiSrcStride; 877 piDst += uiDstStride; 878 pMask += uiMaskStride; 879 } 880 881 // now combine chroma 882 Pel* piSrcU[2] = { pInYuv[0]->getCbAddr(uiPartAddr), pInYuv[1]->getCbAddr(uiPartAddr) }; 883 Pel* piSrcV[2] = { pInYuv[0]->getCrAddr(uiPartAddr), pInYuv[1]->getCrAddr(uiPartAddr) }; 884 UInt uiSrcStrideC = pInYuv[0]->getCStride(); 885 Pel* piDstU = pOutYuv->getCbAddr(uiPartAddr); 886 Pel* piDstV = pOutYuv->getCrAddr(uiPartAddr); 887 UInt uiDstStrideC = pOutYuv->getCStride(); 888 UInt uiWidthC = uiWidth >> 1; 889 UInt uiHeightC = uiHeight >> 1; 890 pMask = pMaskStart; 891 892 for (Int y=0; y<uiHeightC; y++) 893 { 894 for (Int x=0; x<uiWidthC; x++) 895 { 896 UChar ucSegment = (UChar)pMask[x*2]; 897 AOF( ucSegment < 2 ); 898 899 // filtering 900 Bool t = (y==0)?pMaskStart[(y+1)*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2]; 901 Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+(x+1)*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2]; 902 Bool b = (y==uiHeightC-1)?pMaskStart[(y-1)*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2]; 903 Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+(x-1)*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2]; 904 905 Bool bBlend = !((t&&l&&b&&r) || (!t&&!l&&!b&&!r)); 906 907 piDstU[x] = bBlend?((piSrcU[0][x]+piSrcU[1][x]+1)>>1):piSrcU[ucSegment][x]; 908 piDstV[x] = bBlend?((piSrcV[0][x]+piSrcV[1][x]+1)>>1):piSrcV[ucSegment][x]; 909 } 910 911 piSrcU[0] += uiSrcStrideC; 912 piSrcU[1] += uiSrcStrideC; 913 piSrcV[0] += uiSrcStrideC; 914 piSrcV[1] += uiSrcStrideC; 915 piDstU += uiDstStrideC; 916 piDstV += uiDstStrideC; 917 pMask += 2*uiMaskStride; 918 } 600 919 } 601 920 #endif … … 783 1102 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 784 1103 pcCU->clipMv(cMv); 1104 1105 #if MTK_DDD_G0063 1106 if( pcCU->getUseDDD( uiPartAddr ) ) 1107 { 1108 assert( pcCU->getSPIVMPFlag( uiPartAddr ) == 0 ); 1109 assert( pcCU->getSlice()->getViewIndex() != 0 ); 1110 1111 Int dstStride = rpcYuvPred->getStride(); 1112 Int dstStrideC = rpcYuvPred->getCStride(); 1113 Pel *dst = rpcYuvPred->getLumaAddr( uiPartAddr ); 1114 Pel *dstU = rpcYuvPred->getCbAddr( uiPartAddr ); 1115 Pel *dstV = rpcYuvPred->getCrAddr( uiPartAddr ); 1116 1117 Int iWidthC = iWidth >> 1; 1118 Int iHeightC = iHeight >> 1; 1119 Int DefaultC = 1 << ( g_bitDepthY - 1); 1120 for ( Int i = 0; i < iHeight; i++) 1121 { 1122 for ( Int j = 0; j < iWidth ; j++) 1123 { 1124 dst[j] = pcCU->getDDDepth( uiPartAddr ); 1125 } 1126 dst += dstStride; 1127 } 1128 for ( Int i = 0; i < iHeightC; i++) 1129 { 1130 for ( Int j = 0; j < iWidthC; j++) 1131 { 1132 dstU[j] = dstV[j] = DefaultC; 1133 } 1134 dstU += dstStrideC; 1135 dstV += dstStrideC; 1136 } 1137 1138 //return; 1139 } else 1140 #endif 785 1141 #if H_3D_ARP 786 1142 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) … … 826 1182 Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ) 827 1183 { 1184 #if NTT_STORE_SPDV_VSP_G0148 1185 Int vspSize = pcCU->getVSPFlag( uiPartAddr ) >> 1; 1186 1187 Int widthSubPU, heightSubPU; 1188 if (vspSize) 1189 { 1190 widthSubPU = 8; 1191 heightSubPU = 4; 1192 } 1193 else 1194 { 1195 widthSubPU = 4; 1196 heightSubPU = 8; 1197 } 1198 xPredInterUniSubPU( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi, widthSubPU, heightSubPU ); 1199 1200 #else // NTT_STORE_SPDV_VSP_G0148 828 1201 // Get depth reference 829 1202 Int depthRefViewIdx = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; … … 877 1250 xPredInterLumaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 878 1251 xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 879 } 1252 #endif // NTT_STORE_SPDV_VSP_G0148 1253 } 1254 1255 #if NTT_STORE_SPDV_VSP_G0148 1256 Void TComPrediction::xPredInterUniSubPU( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU, Int heightSubPU ) 1257 { 1258 UInt numPartsInLine = pcCU->getPic()->getNumPartInWidth(); 1259 UInt horiNumPartsInSubPU = widthSubPU >> 2; 1260 UInt vertNumPartsInSubPU = (heightSubPU >> 2) * numPartsInLine; 1261 1262 UInt partAddrRasterLine = g_auiZscanToRaster[ uiPartAddr ]; 1263 1264 for( Int posY=0; posY<iHeight; posY+=heightSubPU, partAddrRasterLine+=vertNumPartsInSubPU ) 1265 { 1266 UInt partAddrRasterSubPU = partAddrRasterLine; 1267 for( Int posX=0; posX<iWidth; posX+=widthSubPU, partAddrRasterSubPU+=horiNumPartsInSubPU ) 1268 { 1269 UInt partAddrSubPU = g_auiRasterToZscan[ partAddrRasterSubPU ]; 1270 Int refIdx = pcCU->getCUMvField( eRefPicList )->getRefIdx( partAddrSubPU ); assert (refIdx >= 0); 1271 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( partAddrSubPU ); 1272 pcCU->clipMv(cMv); 1273 1274 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi ); 1275 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi ); 1276 1277 } 1278 } 1279 } 1280 #endif // NTT_STORE_SPDV_VSP_G0148 1281 880 1282 #endif 881 1283 … … 1732 2134 1733 2135 #if H_3D_VSP 2136 #if !(NTT_STORE_SPDV_VSP_G0148) 1734 2137 // not fully support iRatioTxtPerDepth* != 1 1735 2138 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY ) … … 2044 2447 } 2045 2448 } 2046 2449 #endif 2047 2450 2048 2451 #if H_3D_VSP_CONSTRAINED … … 2082 2485 if( bL == bT ) 2083 2486 { 2487 #if SCU_HS_DEPTH_DC_PRED_G0143 2488 const Int iTRR = ( patternStride * 2 - 1 ) - srcStride; 2489 const Int iLBB = ( patternStride * 2 - 1 ) * srcStride - 1; 2490 refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : (abs(ptrSrc[iTRR] - ptrSrc[-(Int)srcStride]) > abs(ptrSrc[iLBB] - ptrSrc[ -1]) ? ptrSrc[iTRR] : ptrSrc[iLBB]); 2491 #else 2084 2492 refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : 1<<( g_bitDepthY - 1 ); 2493 #endif 2085 2494 refDC2 = ( ptrSrc[ -1] + ptrSrc[-(Int)srcStride] )>>1; 2086 2495 } … … 2184 2593 Int iSumPix[2]; 2185 2594 memset(iSumPix, 0, sizeof(Int)*2); 2186 2595 #if QC_GENERIC_SDC_G0122 2596 for( Int i = 0; i < uiNumSegments; i++ ) 2597 { 2598 rpSegMeans[i] = 0; 2599 } 2600 #endif 2187 2601 if (orgDC == false) 2188 2602 { … … 2199 2613 rpSegMeans[ucSegmentRB] = pOrig[uiStride * (uiSize-1) + (uiSize-1) ]; 2200 2614 } 2615 #if QC_GENERIC_SDC_G0122 2616 else if( getDimType( uiIntraMode ) == DMM4_IDX ) 2617 { 2618 Pel *ptmpOrig = pOrig; 2619 Bool *ptmpMask = pMask, bBreak = false; 2620 UChar ucSegment = ptmpMask? (UChar) ptmpMask[0] : 0; 2621 UChar bFirstSeg = ucSegment; 2622 2623 rpSegMeans[ucSegment] = ptmpOrig[0]; 2624 for ( Int y = 0; y < uiSize; y++ ) 2625 { 2626 for ( Int x = 0; x < uiSize; x++ ) 2627 { 2628 ucSegment = ptmpMask[x]; 2629 assert( ucSegment < uiNumSegments ); 2630 2631 if( bFirstSeg != ucSegment ) 2632 { 2633 rpSegMeans[ucSegment] = ptmpOrig[x]; 2634 bBreak = true; 2635 break; 2636 } 2637 } 2638 2639 if( bBreak ) 2640 { 2641 break; 2642 } 2643 2644 ptmpOrig += uiStride; 2645 ptmpMask += uiMaskStride; 2646 } 2647 } 2648 else 2649 #else 2201 2650 else if (uiIntraMode == PLANAR_IDX) 2651 #endif 2202 2652 { 2203 2653 Pel* pLeftTop = pOrig; -
trunk/source/Lib/TLibCommon/TComPrediction.h
r773 r833 121 121 122 122 #if H_3D_VSP 123 #if NTT_STORE_SPDV_VSP_G0148 124 Void xPredInterUniSubPU ( TComDataCU *cu, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU=4, Int heightSubPU=4 ); 125 #else 123 126 Void xGetVirtualDepth ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int txtPerDepthX=1, Int txtPerDepthY=1 ); 124 127 Void xPredInterLumaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize); 125 128 Void xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize); 129 #endif 126 130 #endif 127 131 … … 167 171 #if H_3D_DIM 168 172 // Depth intra 169 Void predIntraLumaDepth ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc = false ); 173 Void predIntraLumaDepth ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc = false 174 #if QC_GENERIC_SDC_G0122 175 , TComWedgelet* dmm4Segmentation = NULL 176 #endif 177 ); 170 178 #if H_3D_DIM_SDC 171 179 Void analyzeSegmentsSDC ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride … … 175 183 #endif 176 184 #endif 185 186 #if H_3D_DBBP 187 PartSize getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize); 188 Bool getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask ); 189 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr = 0 ); 190 #endif 177 191 178 192 Pel predIntraGetPredValDC ( Int* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, Bool bAbove, Bool bLeft ); -
trunk/source/Lib/TLibCommon/TComRdCost.cpp
r655 r833 266 266 m_bUseEstimatedVSD = false; 267 267 #endif 268 #if H_3D_DBBP 269 m_bUseMask = false; 270 #endif 268 271 } 269 272 … … 326 329 rcDistParam.DistFunc = m_afpDistortFunc[eDFunc + g_aucConvertToBit[ rcDistParam.iCols ] + 1 ]; 327 330 331 #if H_3D_DBBP 332 if( m_bUseMask ) 333 { 334 if( eDFunc >= DF_SSE && eDFunc <= DF_SSE16N ) 335 { 336 rcDistParam.DistFunc = TComRdCost::xGetMaskedSSE; 337 } 338 else if( eDFunc >= DF_SAD && eDFunc <= DF_SADS16N ) 339 { 340 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 341 } 342 else if( eDFunc >= DF_HADS && eDFunc <= DF_HADS16N ) 343 { 344 rcDistParam.DistFunc = TComRdCost::xGetMaskedHADs; 345 } 346 else if( eDFunc >= DF_VSD && eDFunc <= DF_VSD16N ) 347 { 348 rcDistParam.DistFunc = TComRdCost::xGetMaskedVSD; 349 } 350 else if( eDFunc >= DF_SAD12 && eDFunc <= DF_SADS48 ) 351 { 352 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 353 } 354 } 355 #endif 356 328 357 // initialize 329 358 rcDistParam.iSubShift = 0; … … 357 386 { 358 387 rcDistParam.DistFunc = m_afpDistortFunc[45 ]; 388 } 389 #endif 390 391 #if H_3D_DBBP 392 if( m_bUseMask ) 393 { 394 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 359 395 } 360 396 #endif … … 411 447 rcDistParam.DistFunc = m_afpDistortFunc[DF_HADS + g_aucConvertToBit[ rcDistParam.iCols ] + 1 ]; 412 448 } 449 450 #if H_3D_DBBP 451 if( m_bUseMask ) 452 { 453 rcDistParam.DistFunc = (bHADME)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD; 454 } 455 #endif 413 456 414 457 // initialize … … 433 476 rcDP.bitDepth = bitDepth; 434 477 rcDP.DistFunc = m_afpDistortFunc[ ( bHadamard ? DF_HADS : DF_SADS ) + g_aucConvertToBit[ iWidth ] + 1 ]; 478 479 #if H_3D_DBBP 480 if( m_bUseMask ) 481 { 482 rcDP.DistFunc = (bHadamard)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD; 483 } 484 #endif 485 435 486 #if NS_HAD 436 487 rcDP.bUseNSHAD = bUseNSHAD; … … 586 637 cDtParam.uiComp = 255; // just for assert: to be sure it was set before use, since only values 0,1 or 2 are allowed. 587 638 639 #if SCU_HS_VSD_BUGFIX_IMPROV_G0163 640 cDtParam.bitDepth = g_bitDepthY; 641 #endif 588 642 Dist dist = cDtParam.DistFunc( &cDtParam ); 589 643 … … 631 685 // Distortion functions 632 686 // ==================================================================================================================== 687 688 #if H_3D_DBBP 689 // -------------------------------------------------------------------------------------------------------------------- 690 // Masked distortion functions 691 // -------------------------------------------------------------------------------------------------------------------- 692 693 UInt TComRdCost::xGetMaskedSSE( DistParam* pcDtParam ) 694 { 695 Pel* piOrg = pcDtParam->pOrg; 696 Pel* piCur = pcDtParam->pCur; 697 Int iRows = pcDtParam->iRows; 698 Int iCols = pcDtParam->iCols; 699 Int iStrideOrg = pcDtParam->iStrideOrg; 700 Int iStrideCur = pcDtParam->iStrideCur; 701 702 UInt uiSum = 0; 703 704 UInt uiShift = DISTORTION_PRECISION_ADJUSTMENT((pcDtParam->bitDepth-8) << 1); 705 706 Int iTemp; 707 708 for( ; iRows != 0; iRows-- ) 709 { 710 for (Int n = 0; n < iCols; n++ ) 711 { 712 if( piOrg[n] != DBBP_INVALID_SHORT ) 713 { 714 iTemp = piOrg[n ] - piCur[n ]; 715 uiSum += ( iTemp * iTemp ) >> uiShift; 716 } 717 } 718 piOrg += iStrideOrg; 719 piCur += iStrideCur; 720 } 721 722 return ( uiSum ); 723 } 724 725 UInt TComRdCost::xGetMaskedSAD( DistParam* pcDtParam ) 726 { 727 728 AOF(!pcDtParam->bApplyWeight); 729 #if H_3D_IC 730 AOF(!pcDtParam->bUseIC); 731 #endif 732 733 Pel* piOrg = pcDtParam->pOrg; 734 Pel* piCur = pcDtParam->pCur; 735 Int iRows = pcDtParam->iRows; 736 Int iCols = pcDtParam->iCols; 737 Int iStrideCur = pcDtParam->iStrideCur; 738 Int iStrideOrg = pcDtParam->iStrideOrg; 739 740 UInt uiSum = 0; 741 742 for( ; iRows != 0; iRows-- ) 743 { 744 for (Int n = 0; n < iCols; n++ ) 745 { 746 if( piOrg[n] != DBBP_INVALID_SHORT ) 747 { 748 uiSum += abs( piOrg[n] - piCur[n] ); 749 } 750 } 751 piOrg += iStrideOrg; 752 piCur += iStrideCur; 753 } 754 755 return uiSum >> DISTORTION_PRECISION_ADJUSTMENT(pcDtParam->bitDepth-8); 756 } 757 758 UInt TComRdCost::xGetMaskedHADs( DistParam* pcDtParam ) 759 { 760 AOF(!pcDtParam->bApplyWeight); 761 #if H_3D_IC 762 AOF(!pcDtParam->bUseIC); 763 #endif 764 Pel* piOrg = pcDtParam->pOrg; 765 Pel* piCur = pcDtParam->pCur; 766 Int iRows = pcDtParam->iRows; 767 Int iCols = pcDtParam->iCols; 768 Int iStrideCur = pcDtParam->iStrideCur; 769 Int iStrideOrg = pcDtParam->iStrideOrg; 770 Int iStep = pcDtParam->iStep; 771 772 Int x, y; 773 774 UInt uiSum = 0; 775 776 #if NS_HAD 777 if( ( ( iRows % 8 == 0) && (iCols % 8 == 0) && ( iRows == iCols ) ) || ( ( iRows % 8 == 0 ) && (iCols % 8 == 0) && !pcDtParam->bUseNSHAD ) ) 778 #else 779 if( ( iRows % 8 == 0) && (iCols % 8 == 0) ) 780 #endif 781 { 782 Int iOffsetOrg = iStrideOrg<<3; 783 Int iOffsetCur = iStrideCur<<3; 784 for ( y=0; y<iRows; y+= 8 ) 785 { 786 for ( x=0; x<iCols; x+= 8 ) 787 { 788 if( piOrg[x] != DBBP_INVALID_SHORT ) 789 { 790 uiSum += xCalcHADs8x8( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 791 } 792 } 793 piOrg += iOffsetOrg; 794 piCur += iOffsetCur; 795 } 796 } 797 #if NS_HAD 798 else if ( ( iCols > 8 ) && ( iCols > iRows ) && pcDtParam->bUseNSHAD ) 799 { 800 Int iOffsetOrg = iStrideOrg<<2; 801 Int iOffsetCur = iStrideCur<<2; 802 for ( y=0; y<iRows; y+= 4 ) 803 { 804 for ( x=0; x<iCols; x+= 16 ) 805 { 806 if( piOrg[x] != DBBP_INVALID_SHORT ) 807 { 808 uiSum += xCalcHADs16x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 809 } 810 } 811 piOrg += iOffsetOrg; 812 piCur += iOffsetCur; 813 } 814 } 815 else if ( ( iRows > 8 ) && ( iCols < iRows ) && pcDtParam->bUseNSHAD ) 816 { 817 Int iOffsetOrg = iStrideOrg<<4; 818 Int iOffsetCur = iStrideCur<<4; 819 for ( y=0; y<iRows; y+= 16 ) 820 { 821 for ( x=0; x<iCols; x+= 4 ) 822 { 823 if( piOrg[x] != DBBP_INVALID_SHORT ) 824 { 825 uiSum += xCalcHADs4x16( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 826 } 827 } 828 piOrg += iOffsetOrg; 829 piCur += iOffsetCur; 830 } 831 } 832 #endif 833 else if( ( iRows % 4 == 0) && (iCols % 4 == 0) ) 834 { 835 Int iOffsetOrg = iStrideOrg<<2; 836 Int iOffsetCur = iStrideCur<<2; 837 838 for ( y=0; y<iRows; y+= 4 ) 839 { 840 for ( x=0; x<iCols; x+= 4 ) 841 { 842 if( piOrg[x] != DBBP_INVALID_SHORT ) 843 { 844 uiSum += xCalcHADs4x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 845 } 846 } 847 piOrg += iOffsetOrg; 848 piCur += iOffsetCur; 849 } 850 } 851 else if( ( iRows % 2 == 0) && (iCols % 2 == 0) ) 852 { 853 Int iOffsetOrg = iStrideOrg<<1; 854 Int iOffsetCur = iStrideCur<<1; 855 for ( y=0; y<iRows; y+=2 ) 856 { 857 for ( x=0; x<iCols; x+=2 ) 858 { 859 if( piOrg[x] != DBBP_INVALID_SHORT ) 860 { 861 uiSum += xCalcHADs2x2( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 862 } 863 } 864 piOrg += iOffsetOrg; 865 piCur += iOffsetCur; 866 } 867 } 868 else 869 { 870 assert(false); 871 } 872 873 return uiSum >> DISTORTION_PRECISION_ADJUSTMENT(pcDtParam->bitDepth-8); 874 } 875 876 UInt TComRdCost::xGetMaskedVSD( DistParam* pcDtParam ) 877 { 878 Pel* piOrg = pcDtParam->pOrg; 879 Pel* piCur = pcDtParam->pCur; 880 Pel* piVirRec = pcDtParam->pVirRec; 881 Pel* piVirOrg = pcDtParam->pVirOrg; 882 Int iRows = pcDtParam->iRows; 883 Int iCols = pcDtParam->iCols; 884 Int iStrideOrg = pcDtParam->iStrideOrg; 885 Int iStrideCur = pcDtParam->iStrideCur; 886 Int iStrideVir = pcDtParam->iStrideVir; 887 888 UInt uiSum = 0; 889 UInt uiShift = DISTORTION_PRECISION_ADJUSTMENT(pcDtParam->bitDepth-8)<<1; 890 891 Int dDM; 892 893 for ( Int y = 0 ; y < iRows ; y++ ) 894 { 895 for (Int x = 0; x < iCols; x++ ) 896 { 897 if( piOrg[x] != DBBP_INVALID_SHORT ) 898 { 899 dDM = (Int) ( piOrg[x ] - piCur[x ] ); 900 uiSum += getVSDEstimate( dDM, piOrg, iStrideOrg, piVirRec, piVirOrg, iStrideVir, x, y ) >> uiShift; 901 } 902 } 903 piOrg += iStrideOrg; 904 piCur += iStrideCur; 905 } 906 907 return ( uiSum ); 908 } 909 #endif 633 910 634 911 // -------------------------------------------------------------------------------------------------------------------- … … 2747 3024 dD = ( (Double) ( dDM >> DISTORTION_PRECISION_ADJUSTMENT( g_bitDepthY - 8 ) ) ) * m_dDisparityCoeff; 2748 3025 3026 #if SCU_HS_VSD_BUGFIX_IMPROV_G0163 3027 Double dDepthWeight = ( pOrg[x] >= ( (1<<(g_bitDepthY - 3)) + (1<<(g_bitDepthY - 2)) ) ? 4 : pOrg[x] > ((1<<g_bitDepthY) >> 4) ? (Float)(pOrg[x] - ((1<<g_bitDepthY) >> 4))/(Float)((1<<g_bitDepthY) >> 3) + 1 : 1.0 ); 3028 Double dTemp = ( 0.5 * fabs(dD) * dDepthWeight * ( abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x-1+y*iVirStride ] ) + abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x+1+y*iVirStride ] ) ) ); 3029 #else 2749 3030 Double dTemp = ( 0.5 * fabs(dD) * ( abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x-1+y*iVirStride ] ) + abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x+1+y*iVirStride ] ) ) ); 3031 #endif 2750 3032 iTemp = (Int) (((dTemp) < 0)? (Int)((dTemp) - 0.5) : (Int)((dTemp) + 0.5)); 2751 3033 -
trunk/source/Lib/TLibCommon/TComRdCost.h
r655 r833 184 184 #endif 185 185 186 #if H_3D_DBBP 187 Bool m_bUseMask; 188 #endif 189 186 190 public: 187 191 TComRdCost(); … … 229 233 Void setDistParam( TComPattern* pcPatternKey, Pel* piRefY, Int iRefStride, Int iStep, DistParam& rcDistParam, Bool bHADME=false ); 230 234 Void setDistParam( DistParam& rcDP, Int bitDepth, Pel* p1, Int iStride1, Pel* p2, Int iStride2, Int iWidth, Int iHeight, Bool bHadamard = false ); 235 #endif 236 237 #if H_3D_DBBP 238 Void setUseMask(Bool b) { m_bUseMask = b; } 231 239 #endif 232 240 … … 334 342 #endif 335 343 344 #if H_3D_DBBP 345 static UInt xGetMaskedSSE ( DistParam* pcDtParam ); 346 static UInt xGetMaskedSAD ( DistParam* pcDtParam ); 347 static UInt xGetMaskedHADs ( DistParam* pcDtParam ); 348 static UInt xGetMaskedVSD ( DistParam* pcDtParam ); 349 #endif 350 336 351 public: 337 352 #if WEIGHTED_CHROMA_DISTORTION -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r773 r833 1827 1827 #if H_3D_INTER_SDC 1828 1828 m_bInterSDCFlag [ i ] = false; 1829 #endif 1830 #if H_3D_DBBP 1831 m_dbbpFlag [ i ] = false; 1829 1832 #endif 1830 1833 #if H_3D_IV_MERGE … … 3129 3132 for ( Int refListIdx = 0; refListIdx < ((m_eSliceType==B_SLICE) ? 2 : 1); refListIdx++ ) 3130 3133 { 3134 #if MTK_ARP_REF_SELECTION_G0053 3135 Int diffPOC=MAX_INT; 3136 Int idx=-1; 3137 #endif 3131 3138 for(Int i = 0; i < getNumRefIdx(RefPicList(refListIdx)); i++ ) 3132 3139 { 3133 3140 if ( getRefPic(RefPicList(refListIdx), i)->getPOC() != getPOC() ) 3134 3141 { 3142 #if MTK_ARP_REF_SELECTION_G0053 3143 if( abs(getRefPic(RefPicList(refListIdx), i)->getPOC() - getPOC()) < diffPOC) 3144 { 3145 diffPOC=abs(getRefPic(RefPicList(refListIdx), i)->getPOC() - getPOC()); 3146 idx=i; 3147 } 3148 #else 3135 3149 setFirstTRefIdx (RefPicList(refListIdx), i); 3136 3150 break; 3151 #endif 3137 3152 } 3153 #if MTK_ARP_REF_SELECTION_G0053 3154 if(idx>=0) 3155 { 3156 setFirstTRefIdx (RefPicList(refListIdx), idx); 3157 } 3158 #endif 3138 3159 } 3139 3160 } … … 3272 3293 #endif 3273 3294 3295 #if MTK_DDD_G0063 3296 if( getIsDepth() && getViewIndex() > 0 ) 3297 { 3298 TComSlice *pcTextSlice = getTexturePic()->getSlice( 0 ); 3299 memcpy( m_aiDDDInvScale, pcTextSlice->m_aiDDDInvScale, sizeof( Int ) * getViewIndex() ); 3300 memcpy( m_aiDDDInvOffset, pcTextSlice->m_aiDDDInvOffset, sizeof( Int ) * getViewIndex() ); 3301 memcpy( m_aiDDDShift, pcTextSlice->m_aiDDDShift, sizeof( Int ) * getViewIndex() ); 3302 } 3303 #endif 3304 3274 3305 if( !setupLUT ) 3275 3306 return; … … 3319 3350 m_depthToDisparityF[ i ][ d ] = ( invCodScale[ i ] * d + invOffset ) >> log2Div; 3320 3351 } 3321 } 3322 } 3323 #endif 3324 #endif 3352 3353 #if MTK_DDD_G0063 3354 InitializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i ); 3355 #endif 3356 } 3357 } 3358 #endif 3359 #endif 3360 3361 #if MTK_DDD_G0063 3362 Void TComSlice::InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ) 3363 { 3364 UInt uiViewId = getViewIndex(); 3365 3366 if( uiViewId == 0 ) 3367 { 3368 m_aiDDDInvScale[ iBaseViewIdx ] = m_aiDDDInvOffset[ iBaseViewIdx ] = m_aiDDDShift[ iBaseViewIdx ] = 0; 3369 return; 3370 } 3371 3372 3373 Int iSign = iCodedScale >= 0 ? 1 : -1; 3374 iCodedScale = abs( iCodedScale ); 3375 3376 Int iBitWidth = 0; 3377 3378 const Int iInvPres = 9; 3379 3380 while( ((( 1 << iBitWidth ) << 1 ) <= iCodedScale ) ) 3381 { 3382 iBitWidth ++; 3383 } 3384 iBitWidth += iInvPres; 3385 Int iTargetValue = 1 << iBitWidth; 3386 3387 Int iMinError = MAX_INT; 3388 Int iBestD = 1 << ( iInvPres - 1 ); 3389 for( Int d = 1 << ( iInvPres - 1 ); d < ( 1 << iInvPres ); d++ ) 3390 { 3391 Int iError = abs( iCodedScale * d - iTargetValue ); 3392 if( iError < iMinError ) 3393 { 3394 iMinError = iError; 3395 iBestD = d; 3396 } 3397 if( iMinError == 0 ) 3398 { 3399 break; 3400 } 3401 } 3402 Int iRoundingDir = 0; 3403 if( iCodedScale * iBestD > iTargetValue ) 3404 { 3405 iRoundingDir = -1; 3406 } 3407 else if( iCodedScale * iBestD < iTargetValue ) 3408 { 3409 iRoundingDir = 1; 3410 } 3411 Int iCamPres = uiCamParsCodedPrecision - 1; 3412 m_aiDDDInvScale [ iBaseViewIdx ] = ( iBestD << ( iCamPres + g_bitDepthY )) * iSign; 3413 m_aiDDDInvOffset[ iBaseViewIdx ] = -iSign * iBestD * ( iCodedOffset << g_bitDepthY ); 3414 m_aiDDDShift [ iBaseViewIdx ] = iBitWidth; 3415 m_aiDDDInvOffset[ iBaseViewIdx ] += 1 << ( m_aiDDDShift[ iBaseViewIdx ] - 1 ); 3416 m_aiDDDInvOffset[ iBaseViewIdx ] += ( 1 << ( m_aiDDDShift[ iBaseViewIdx ] - 4 ) ) * iRoundingDir; 3417 3418 return; 3419 } 3420 #endif 3421 3325 3422 /** get scaling matrix from RefMatrixID 3326 3423 * \param sizeId size index -
trunk/source/Lib/TLibCommon/TComSlice.h
r773 r833 783 783 #endif 784 784 #endif 785 #if QC_SPIVMP_MPI_G0119 786 Int m_iSubPUMPILog2Size; 787 #endif 785 788 #if H_3D_VSP 786 789 Bool m_viewSynthesisPredFlag [ MAX_NUM_LAYERS ]; … … 801 804 #if H_3D_INTER_SDC 802 805 Bool m_bInterSDCFlag[MAX_NUM_LAYERS ]; 806 #endif 807 #if H_3D_DBBP 808 Bool m_dbbpFlag[MAX_NUM_LAYERS]; 803 809 #endif 804 810 #if H_3D_IV_MERGE … … 952 958 Bool inferOutputLayerFlag( Int layerSetIdx, Int i ) { return ( getDefaultOneTargetOutputLayerIdc( ) == 0 || ( ( getDefaultOneTargetOutputLayerIdc( ) == 1 ) && ( i == m_layerSetLayerIdList[layerSetIdx].size() - 1 ) )); } 953 959 954 Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx = val ]; }960 Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx ] = val; } 955 961 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 956 962 Void setAltOutputLayerFlag( Bool flag ) { m_altOutputLayerFlag = flag; } … … 1058 1064 #endif 1059 1065 #endif 1066 #if QC_SPIVMP_MPI_G0119 1067 Int getSubPUMPILog2Size( ) { return m_iSubPUMPILog2Size; } 1068 Void setSubPUMPILog2Size( Int u ) { m_iSubPUMPILog2Size = u; } 1069 #endif 1060 1070 #if H_3D_VSP 1061 1071 Void setViewSynthesisPredFlag ( Int layerIdInVps, Bool val ) { m_viewSynthesisPredFlag[ layerIdInVps ] = val; } … … 1074 1084 Bool getInterSDCFlag ( Int layerIdInVps ) { return m_bInterSDCFlag[layerIdInVps]; } 1075 1085 Void setInterSDCFlag ( Int layerIdInVps, Bool bval ){ m_bInterSDCFlag[layerIdInVps] = bval; } 1086 #endif 1087 #if H_3D_DBBP 1088 Bool getUseDBBP ( Int layerIdInVps ) { return m_dbbpFlag[layerIdInVps]; } 1089 Void setUseDBBP ( Int layerIdInVps, Bool bval ){ m_dbbpFlag[layerIdInVps] = bval; } 1076 1090 #endif 1077 1091 #if H_3D_IV_MERGE … … 2055 2069 #endif 2056 2070 #endif 2071 2072 #if MTK_DDD_G0063 2073 Int m_aiDDDInvScale [MAX_NUM_LAYERS]; 2074 Int m_aiDDDInvOffset[MAX_NUM_LAYERS]; 2075 UInt m_aiDDDShift [MAX_NUM_LAYERS]; 2076 #endif 2077 2057 2078 public: 2058 2079 TComSlice(); … … 2401 2422 TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); 2402 2423 #endif 2424 2425 #if MTK_DDD_G0063 2426 Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); 2427 Int getDepthFromDV( Int iDV, Int iBaseViewIdx ) 2428 { 2429 return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]); 2430 } 2431 #endif 2432 2403 2433 protected: 2404 2434 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, -
trunk/source/Lib/TLibCommon/TypeDef.h
r773 r833 235 235 #define H_3D_DELTA_DLT 1 236 236 #endif 237 238 237 #define H_3D_DIM_ENC 1 // Depth Intra encoder optimizations, includes: 239 238 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 … … 250 249 #endif 251 250 251 252 252 ///// ***** ILLUMATION COMPENSATION ********* 253 253 #if H_3D_IC … … 257 257 #endif 258 258 259 259 260 ///// ***** FCO ********* 260 261 #if H_3D_FCO … … 272 273 /////////////////////////////////// HTM-10.0 Integrations ////////////////////////////// 273 274 ///////////////////////////////////////////////////////////////////////////////////////// 274 275 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 276 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 277 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 278 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 279 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 280 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 281 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 282 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 283 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 284 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 285 275 #if H_3D 276 #if H_3D_QTLPC 277 #define MTK_TEX_DEP_PAR_G0055 1 // Texture-partition-dependent depth partition. JCT3V-G0055 278 #endif 279 280 #define MTK_DDD_G0063 1 // Disparity derived depth coding 281 282 #if H_3D_VSP 283 #define MTK_RBIP_VSP_G0069 1 // Restricted bi-prediction for VSP 284 #define NTT_STORE_SPDV_VSP_G0148 1 // Storing Sub-PU based DV for VSP 285 #endif 286 287 #define H_3D_DBBP 1 // DBBP: Depth-based Block Partitioning and Merging 288 289 #if H_3D_DBBP 290 #define DBBP_INVALID_SHORT (-4) 291 #define RWTH_DBBP_PACK_MODE SIZE_2NxN 292 #endif 293 294 #if H_3D_DIM 295 #define QC_PKU_SDC_SPLIT_G0123 1 // Intra SDC Split 296 #if QC_PKU_SDC_SPLIT_G0123 297 #define HS_TSINGHUA_SDC_SPLIT_G0111 1 298 #endif 299 #define SCU_HS_DEPTH_DC_PRED_G0143 1 300 #define QC_GENERIC_SDC_G0122 1 // Generalize SDC to all depth intra modes 301 #if H_3D_DIM_SDC && H_3D_INTER_SDC 302 #define QC_SDC_UNIFY_G0130 1 // Unify intra SDC and inter SDC 303 #define QC_SDC_UNIFY_G0130_FIX 1 // Fix bug of G0130 304 #define QC_SDC_UNIFY_G0130_FIX2 1 // Fix bug of G0130 305 #endif 306 #define SEC_INTER_SDC_G0101 1 // Improved inter SDC with multiple DC candidates 307 #endif 308 309 #define KHU_SIMP_SPIVMP_G0147 1 // Simplification on Sub-PU level temporal interview motion prediction 310 311 #if H_3D_SPIVMP 312 #define QC_SPIVMP_MPI_G0119 1 // Sub-PU level MPI merge candidate 313 #endif 314 315 #define QC_DEPTH_MERGE_SIMP_G0127 1 // Remove DV candidate and shifting candidate for depth coding 316 #define SEC_IC_ARP_SIG_G0072 1 // Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121 317 #define SCU_HS_VSD_BUGFIX_IMPROV_G0163 1 318 #define SEC_SPIVMP_MCP_SIZE_G0077 1 // Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077 319 #define SEC_DEPTH_DV_DERIVAITON_G0074 1 // Simplification of DV derivation for depth, JCT3V-G0074 320 #define MTK_ARP_REF_SELECTION_G0053 1 // ARP Reference picture selection in JCT3V-G0053 321 #define MTK_ARP_FLAG_CABAC_SIMP_G0061 1 // Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061 322 #define MTK_IC_FLAG_CABAC_SIMP_G0061 1 // Use only 1 context for IC flag in JCT3V-G0061 323 #define MTK_NBDV_IVREF_FIX_G0067 1 // Disable IvMC, VSP when IVREF is not available, JCT3V-G0067 324 #endif 286 325 ///////////////////////////////////////////////////////////////////////////////////////// 287 326 /////////////////////////////////// HM RELATED DEFINES ////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.