Changeset 782 in 3DVCSoftware for branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon
- Timestamp:
- 20 Jan 2014, 05:01:03 (11 years ago)
- Location:
- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/ContextTables.h
r781 r782 119 119 #if QC_GENERIC_SDC_G0122 120 120 #define NUM_ANGLE_FLAG_CTX 3 121 #if !QC_SDC_UNIFY_G0130 121 122 #define NUM_INTRASDC_FLAG_CTX 3 123 #endif 122 124 #endif 123 125 #endif … … 128 130 #endif 129 131 130 #if H_3D_INTER_SDC 132 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 131 133 #define NUM_INTER_SDC_FLAG_CTX 1 ///< number of context models for inter SDC flag 132 134 #define NUM_INTER_SDC_SIGN_FLAG_CTX 1 ///< number of context models for sign of inter SDC residual 133 135 #define NUM_INTER_SDC_RESIDUAL_CTX 1 ///< number of context models for abs of inter SDC residual 136 #endif 137 #if QC_SDC_UNIFY_G0130 138 #define NUM_SDC_FLAG_CTX 1 ///< number of context models for inter SDC flag 134 139 #endif 135 140 // ==================================================================================================================== … … 417 422 { 155, 170, 157 }, 418 423 }; 424 #if !QC_SDC_UNIFY_G0130 419 425 static const UChar 420 426 INIT_INTRASDC_FLAG[3][NUM_INTRASDC_FLAG_CTX] = … … 425 431 }; 426 432 #endif 433 #endif 427 434 428 435 static const UChar … … 467 474 #endif 468 475 469 #if H_3D_INTER_SDC 476 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 470 477 static const UChar 471 478 INIT_INTER_SDC_FLAG[3][NUM_INTER_SDC_FLAG_CTX] = … … 493 500 #endif 494 501 //! \} 495 496 497 #endif 502 #if QC_SDC_UNIFY_G0130 503 static const UChar 504 INIT_SDC_FLAG[3][NUM_SDC_FLAG_CTX] = 505 { 506 { 154 }, 507 { 154 }, 508 { 154 }, 509 }; 510 #endif 511 512 #endif -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r781 r782 123 123 #if H_3D_DIM_SDC 124 124 m_pbSDCFlag = NULL; 125 #if QC_SDC_UNIFY_G0130 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 153 162 m_pucInterSDCMask = NULL; 154 163 #endif … … 272 281 #if H_3D_DIM_SDC 273 282 m_pbSDCFlag = (Bool*)xMalloc(Bool, uiNumPartition); 283 #if QC_SDC_UNIFY_G0130 284 for( Int i = 0; i < 4; i++ ) 285 { 286 m_apSegmentDCOffset[i] = (Pel*)xMalloc(Pel, uiNumPartition); 287 } 288 #else 274 289 m_apSegmentDCOffset[0] = (Pel*)xMalloc(Pel, uiNumPartition); 275 290 m_apSegmentDCOffset[1] = (Pel*)xMalloc(Pel, uiNumPartition); 276 291 #endif 277 292 #endif 278 #if H_3D_INTER_SDC 293 #endif 294 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 279 295 m_pbInterSDCFlag = (Bool* )xMalloc(Bool, uiNumPartition); 280 296 for( Int i = 0; i < 4; i++ ) … … 400 416 #if H_3D_DIM_SDC 401 417 if ( m_pbSDCFlag ) { xFree(m_pbSDCFlag); m_pbSDCFlag = NULL; } 418 #if QC_SDC_UNIFY_G0130 419 for( Int i = 0; i < 4; i++ ) 420 { 421 if ( m_apSegmentDCOffset[i] ) { xFree(m_apSegmentDCOffset[i]); m_apSegmentDCOffset[i] = NULL; } 422 } 423 #else 402 424 if ( m_apSegmentDCOffset[0] ) { xFree(m_apSegmentDCOffset[0]); m_apSegmentDCOffset[0] = NULL; } 403 425 if ( m_apSegmentDCOffset[1] ) { xFree(m_apSegmentDCOffset[1]); m_apSegmentDCOffset[1] = NULL; } 404 426 #endif 427 #endif 405 428 #endif 406 #if H_3D_INTER_SDC 429 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 407 430 if ( m_pbInterSDCFlag ) { xFree(m_pbInterSDCFlag); m_pbInterSDCFlag = NULL; } 408 431 for(Int i = 0; i < 4; i++ ) … … 554 577 m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui]; 555 578 #endif 556 #if H_3D_INTER_SDC 579 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 557 580 m_pbInterSDCFlag[ui] = pcFrom->m_pbInterSDCFlag[ui]; 558 581 #endif … … 616 639 #if H_3D_DIM_SDC 617 640 memset( m_pbSDCFlag + firstElement, 0, numElements * sizeof( *m_pbSDCFlag ) ); 641 #if QC_SDC_UNIFY_G0130 642 for( Int i = 0; i < 4; i++ ) 643 { 644 memset( m_apSegmentDCOffset[i] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[i] ) ); 645 } 646 #else 618 647 memset( m_apSegmentDCOffset[0] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[0] ) ); 619 648 memset( m_apSegmentDCOffset[1] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[1] ) ); 620 649 #endif 621 650 #endif 622 #if H_3D_INTER_SDC 651 #endif 652 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 623 653 memset( m_pbInterSDCFlag + firstElement, 0, numElements * sizeof( *m_pbInterSDCFlag ) ); 624 654 for( Int i = 0; i < 4; i++ ) … … 788 818 #if H_3D_DIM_SDC 789 819 m_pbSDCFlag [ui] = false; 820 #if QC_SDC_UNIFY_G0130 821 for( Int i = 0; i < 4; i++ ) 822 { 823 m_apSegmentDCOffset[i][ui] = 0; 824 } 825 #else 790 826 m_apSegmentDCOffset[0][ui] = 0; 791 827 m_apSegmentDCOffset[1][ui] = 0; 792 828 #endif 793 829 #endif 794 #if H_3D_INTER_SDC 830 #endif 831 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 795 832 m_pbInterSDCFlag[ui] = false; 796 833 for( Int i = 0; i < 4; i++ ) … … 901 938 #if H_3D_DIM_SDC 902 939 memset( m_pbSDCFlag, 0, sizeof(Bool) * m_uiNumPartition ); 940 #if QC_SDC_UNIFY_G0130 941 for( Int i = 0; i < 4; i++ ) 942 { 943 memset( m_apSegmentDCOffset[i], 0, sizeof(Pel) * m_uiNumPartition ); 944 } 945 #else 903 946 memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition ); 904 947 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition ); 905 948 #endif 906 949 #endif 907 #if H_3D_INTER_SDC 950 #endif 951 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 908 952 memset( m_pbInterSDCFlag, 0, sizeof( Bool ) * m_uiNumPartition ); 909 953 for( Int i = 0; i < 4; i++ ) … … 978 1022 #if H_3D_DIM_SDC 979 1023 m_pbSDCFlag [ui] = pcCU->m_pbSDCFlag [ uiPartOffset + ui ]; 1024 #if QC_SDC_UNIFY_G0130 1025 for( Int i = 0; i < 4; i++ ) 1026 { 1027 m_apSegmentDCOffset[i][ui] = pcCU->m_apSegmentDCOffset[i] [ uiPartOffset + ui ]; 1028 } 1029 #else 980 1030 m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0] [ uiPartOffset + ui ]; 981 1031 m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1] [ uiPartOffset + ui ]; 982 1032 #endif 983 1033 #endif 984 #if H_3D_INTER_SDC 1034 #endif 1035 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 985 1036 m_pbInterSDCFlag [ui] = pcCU->m_pbInterSDCFlag [ uiPartOffset + ui ]; 986 1037 for( Int i = 0; i < 4; i++ ) … … 1134 1185 #if H_3D_DIM_SDC 1135 1186 m_pbSDCFlag = pcCU->getSDCFlag() + uiPart; 1187 #if QC_SDC_UNIFY_G0130 1188 for( Int i = 0; i < 4; i++ ) 1189 { 1190 m_apSegmentDCOffset[i] = pcCU->getSDCSegmentDCOffset(i) + uiPart; 1191 } 1192 #else 1136 1193 m_apSegmentDCOffset[0] = pcCU->getSDCSegmentDCOffset(0) + uiPart; 1137 1194 m_apSegmentDCOffset[1] = pcCU->getSDCSegmentDCOffset(1) + uiPart; 1138 1195 #endif 1196 #endif 1139 1197 #endif 1140 #if H_3D_INTER_SDC 1198 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 1141 1199 m_pbInterSDCFlag = pcCU->getInterSDCFlag() + uiPart; 1142 1200 for( Int i = 0; i < 4; i++ ) … … 1328 1386 #if H_3D_DIM_SDC 1329 1387 memcpy( m_pbSDCFlag + uiOffset, pcCU->getSDCFlag(), iSizeInBool ); 1388 #if QC_SDC_UNIFY_G0130 1389 for( Int i = 0; i < 4; i++ ) 1390 { 1391 memcpy( m_apSegmentDCOffset[i] + uiOffset, pcCU->getSDCSegmentDCOffset(i), sizeof( Pel ) * uiNumPartition); 1392 } 1393 #else 1330 1394 memcpy( m_apSegmentDCOffset[0] + uiOffset, pcCU->getSDCSegmentDCOffset(0), sizeof( Pel ) * uiNumPartition); 1331 1395 memcpy( m_apSegmentDCOffset[1] + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition); 1332 1396 #endif 1333 1397 #endif 1334 #if H_3D_INTER_SDC 1398 #endif 1399 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 1335 1400 memcpy( m_pbInterSDCFlag + uiOffset, pcCU->getInterSDCFlag(), iSizeInBool ); 1336 1401 for( Int i = 0; i < 4; i++ ) … … 1450 1515 #if H_3D_DIM_SDC 1451 1516 memcpy( rpcCU->getSDCFlag() + m_uiAbsIdxInLCU, m_pbSDCFlag, iSizeInBool ); 1517 #if QC_SDC_UNIFY_G0130 1518 for( Int i = 0; i < 4; i++ ) 1519 { 1520 memcpy( rpcCU->getSDCSegmentDCOffset(i) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[i], sizeof( Pel ) * m_uiNumPartition); 1521 } 1522 #else 1452 1523 memcpy( rpcCU->getSDCSegmentDCOffset(0) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition); 1453 1524 memcpy( rpcCU->getSDCSegmentDCOffset(1) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition); 1454 1525 #endif 1455 1526 #endif 1456 #if H_3D_INTER_SDC 1527 #endif 1528 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 1457 1529 memcpy( rpcCU->getInterSDCFlag() + m_uiAbsIdxInLCU, m_pbInterSDCFlag, iSizeInBool ); 1458 1530 for( Int i = 0;i < 4; i++ ) … … 1558 1630 #if H_3D_DIM_SDC 1559 1631 memcpy( rpcCU->getSDCFlag() + uiPartOffset, m_pbSDCFlag, iSizeInBool ); 1632 #if QC_SDC_UNIFY_G0130 1633 for( Int i = 0; i < 4; i++ ) 1634 { 1635 memcpy( rpcCU->getSDCSegmentDCOffset(i) + uiPartOffset, m_apSegmentDCOffset[i], sizeof( Pel ) * uiQNumPart); 1636 } 1637 #else 1560 1638 memcpy( rpcCU->getSDCSegmentDCOffset(0) + uiPartOffset, m_apSegmentDCOffset[0], sizeof( Pel ) * uiQNumPart); 1561 1639 memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart); 1562 1640 #endif 1563 1641 #endif 1564 #if H_3D_INTER_SDC 1642 #endif 1643 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 1565 1644 memcpy( rpcCU->getInterSDCFlag() + uiPartOffset, m_pbInterSDCFlag, iSizeInBool ); 1566 1645 for( Int i = 0; i < 4; i++ ) … … 2293 2372 2294 2373 #if H_3D_INTER_SDC 2374 #if !QC_SDC_UNIFY_G0130 2295 2375 Void TComDataCU::setInterSDCFlagSubParts ( Bool bInterSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2296 2376 { … … 2302 2382 return 0; 2303 2383 } 2384 #endif 2304 2385 2305 2386 Void TComDataCU::xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask ) … … 2404 2485 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx ) 2405 2486 { 2487 #if QC_SDC_UNIFY_G0130 2488 return 0; 2489 #else 2406 2490 TComDataCU* pcTempCU; 2407 2491 UInt uiTempPartIdx; … … 2417 2501 2418 2502 return uiCtx; 2503 #endif 2419 2504 } 2420 2505 -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r781 r782 215 215 #if H_3D_DIM_SDC 216 216 Bool* m_pbSDCFlag; 217 #if QC_SDC_UNIFY_G0130 218 Pel* m_apSegmentDCOffset[4]; 219 #else 217 220 Pel* m_apSegmentDCOffset[2]; 218 221 #endif 219 222 #endif 223 #endif 220 224 #if H_3D_INTER_SDC 225 #if !QC_SDC_UNIFY_G0130 221 226 Bool* m_pbInterSDCFlag; 222 227 Int* m_apSegmentInterDCOffset[4]; 228 #endif 223 229 UChar* m_pucInterSDCMask; 224 230 #endif … … 578 584 #endif 579 585 #if H_3D_INTER_SDC 586 #if !QC_SDC_UNIFY_G0130 580 587 Bool* getInterSDCFlag () { return m_pbInterSDCFlag; } 581 588 Bool getInterSDCFlag ( UInt uiIdx ) { return m_pbInterSDCFlag[uiIdx]; } … … 585 592 Int getInterSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentInterDCOffset[uiSeg][uiPartIdx]; } 586 593 Void setInterSDCSegmentDCOffset( Int pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentInterDCOffset[uiSeg][uiPartIdx] = pOffset; } 587 594 #endif 588 595 Void xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask ); 589 596 -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r781 r782 236 236 #endif 237 237 #define QC_GENERIC_SDC_G0122 1 // Generalize SDC to all depth intra modes 238 238 #if H_3D_DIM_SDC && H_3D_INTER_SDC 239 #define QC_SDC_UNIFY_G0130 1 // Unify intra SDC and inter SDC 240 #endif 239 241 #define H_3D_DIM_ENC 1 // Depth Intra encoder optimizations, includes: 240 242 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
Note: See TracChangeset for help on using the changeset viewer.