Changeset 1163 in 3DVCSoftware for branches/HTM-13.1-dev0/source/Lib/TLibCommon
- Timestamp:
- 16 Mar 2015, 12:40:05 (10 years ago)
- Location:
- branches/HTM-13.1-dev0/source/Lib/TLibCommon
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-13.1-dev0/source/Lib/TLibCommon/ContextTables.h
r1084 r1163 51 51 #define NUM_SPLIT_FLAG_CTX 3 ///< number of context models for split flag 52 52 #define NUM_SKIP_FLAG_CTX 3 ///< number of context models for skip flag 53 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 54 #define NUM_DIS_FLAG_CTX 1 55 #define NUM_DIS_TYPE_CTX 1 56 #else 53 57 #if H_3D_SINGLE_DEPTH 54 58 #define NUM_SINGLEDEPTH_FLAG_CTX 1 55 59 #define NUM_SINGLE_DEPTH_VALUE_DATA_CTX 1 60 #endif 56 61 #endif 57 62 #define NUM_MERGE_FLAG_EXT_CTX 1 ///< number of context models for merge flag of merge extended … … 153 158 { CNU, CNU, CNU, }, 154 159 }; 160 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 161 static const UChar 162 INIT_DIS_FLAG[3][NUM_DIS_FLAG_CTX] = 163 { 164 { 185 }, 165 { 185 }, 166 { 185 }, 167 }; 168 static const UChar 169 INIT_DIS_TYPE[3][NUM_DIS_TYPE_CTX] = 170 { 171 { 137 }, 172 { 137 }, 173 { 137 }, 174 }; 175 #else 155 176 #if H_3D_SINGLE_DEPTH 156 177 static const UChar … … 169 190 }; 170 191 #endif 192 #endif 171 193 static const UChar 172 194 INIT_MERGE_FLAG_EXT[3][NUM_MERGE_FLAG_EXT_CTX] = -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r1133 r1163 60 60 61 61 m_skipFlag = NULL; 62 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 63 m_bDISFlag = NULL; 64 m_uiDISType = NULL; 65 #else 62 66 #if H_3D_SINGLE_DEPTH 63 67 m_singleDepthFlag = NULL; 64 68 m_apSingleDepthValue = NULL; 65 #endif 69 #endif 70 #endif 66 71 m_pePartSize = NULL; 67 72 m_pePredMode = NULL; … … 181 186 182 187 m_skipFlag = new Bool[ uiNumPartition ]; 188 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 189 m_bDISFlag = new Bool[ uiNumPartition ]; 190 m_uiDISType = (UInt*)xMalloc(UInt, uiNumPartition); 191 #else 183 192 #if H_3D_SINGLE_DEPTH 184 193 m_singleDepthFlag = new Bool[ uiNumPartition ]; 185 194 m_apSingleDepthValue = (Pel*)xMalloc(Pel, uiNumPartition); 195 #endif 186 196 #endif 187 197 m_pePartSize = new Char[ uiNumPartition ]; … … 327 337 328 338 if ( m_skipFlag ) { delete[] m_skipFlag; m_skipFlag = NULL; } 339 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 340 if ( m_bDISFlag ) { delete[] m_bDISFlag; m_bDISFlag = NULL; } 341 if ( m_uiDISType ) { xFree(m_uiDISType); m_uiDISType = NULL; } 342 #else 329 343 #if H_3D_SINGLE_DEPTH 330 344 if ( m_singleDepthFlag ) { delete[] m_singleDepthFlag; m_singleDepthFlag = NULL; } 331 345 if ( m_apSingleDepthValue ) { xFree(m_apSingleDepthValue); m_apSingleDepthValue = NULL; } 346 #endif 332 347 #endif 333 348 if ( m_pePartSize ) { delete[] m_pePartSize; m_pePartSize = NULL; } … … 491 506 TComDataCU * pcFrom = pcPic->getCU(getAddr()); 492 507 m_skipFlag[ui] = pcFrom->getSkipFlag(ui); 508 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 509 m_bDISFlag[ui] = pcFrom->getDISFlag(ui); 510 m_uiDISType[ui] = pcFrom->getDISType(ui); 511 #else 493 512 #if H_3D_SINGLE_DEPTH 494 513 m_singleDepthFlag[ui] = pcFrom->getSingleDepthFlag(ui); 495 514 m_apSingleDepthValue[ui] = pcFrom->getSingleDepthValue(ui); 515 #endif 496 516 #endif 497 517 m_pePartSize[ui] = pcFrom->getPartitionSize(ui); … … 546 566 { 547 567 memset( m_skipFlag + firstElement, false, numElements * sizeof( *m_skipFlag ) ); 568 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 569 memset( m_bDISFlag + firstElement, false, numElements * sizeof( *m_bDISFlag ) ); 570 memset( m_uiDISType + firstElement, 0, numElements * sizeof( *m_uiDISType) ); 571 #else 548 572 #if H_3D_SINGLE_DEPTH 549 573 memset( m_singleDepthFlag + firstElement, false, numElements * sizeof( *m_singleDepthFlag ) ); 550 574 memset( m_apSingleDepthValue + firstElement, 0, numElements * sizeof( *m_apSingleDepthValue ) ); 575 #endif 551 576 #endif 552 577 memset( m_pePartSize + firstElement, SIZE_NONE, numElements * sizeof( *m_pePartSize ) ); … … 733 758 m_puhTransformSkip[2][ui] = 0; 734 759 m_skipFlag[ui] = false; 760 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 761 m_bDISFlag[ui] = false; 762 m_uiDISType[ui] = 0; 763 #else 735 764 #if H_3D_SINGLE_DEPTH 736 765 m_singleDepthFlag[ui] = false; 737 766 m_apSingleDepthValue[ui] = 0; 767 #endif 738 768 #endif 739 769 m_pePartSize[ui] = SIZE_NONE; … … 861 891 memset( m_puhCbf[2], 0, iSizeInUchar ); 862 892 memset( m_puhDepth, uiDepth, iSizeInUchar ); 863 #if H_3D_NBDV 893 #if H_3D_NBDV && !SEC_ARP_REM_ENC_RESTRICT_K0035 864 894 m_pDvInfo->bDV = false; 865 895 #endif … … 904 934 { 905 935 m_skipFlag[ui] = false; 936 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 937 m_bDISFlag[ui] = false; 938 m_uiDISType[ui] = 0; 939 #else 906 940 #if H_3D_SINGLE_DEPTH 907 941 m_singleDepthFlag[ui] = false; 908 942 m_apSingleDepthValue[ui]= 0; 943 #endif 909 944 #endif 910 945 m_pePartSize[ui] = SIZE_NONE; … … 929 964 m_puhTransformSkip[2][ui] = pcCU->getTransformSkip(uiPartOffset+ui,TEXT_CHROMA_V); 930 965 m_skipFlag[ui] = pcCU->getSkipFlag(uiPartOffset+ui); 966 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 967 m_bDISFlag[ui] = pcCU->getDISFlag(uiPartOffset+ui); 968 m_uiDISType[ui] = pcCU->getDISType(uiPartOffset+ui); 969 #else 931 970 #if H_3D_SINGLE_DEPTH 932 971 m_singleDepthFlag[ui] = pcCU->getSingleDepthFlag(uiPartOffset+ui); 933 972 m_apSingleDepthValue[ui] = pcCU->getSingleDepthValue(uiPartOffset+ui); 973 #endif 934 974 #endif 935 975 m_pePartSize[ui] = pcCU->getPartitionSize(uiPartOffset+ui); … … 1078 1118 1079 1119 m_skipFlag=pcCU->getSkipFlag() + uiPart; 1120 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1121 m_bDISFlag = pcCU->getDISFlag() + uiPart; 1122 m_uiDISType = pcCU->getDISType() + uiPart; 1123 #else 1080 1124 #if H_3D_SINGLE_DEPTH 1081 1125 m_singleDepthFlag = pcCU->getSingleDepthFlag() + uiPart; 1082 1126 m_apSingleDepthValue = pcCU->getSingleDepthValue() + uiPart; 1083 #endif 1127 #endif 1128 #endif 1084 1129 m_phQP=pcCU->getQP() + uiPart; 1085 1130 m_pePartSize = pcCU->getPartitionSize() + uiPart; … … 1215 1260 1216 1261 m_skipFlag = pcCU->getSkipFlag () + uiAbsPartIdx; 1262 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1263 m_bDISFlag = pcCU->getDISFlag () + uiAbsPartIdx; 1264 m_uiDISType = pcCU->getDISType() + uiAbsPartIdx; 1265 #else 1217 1266 #if H_3D_SINGLE_DEPTH 1218 1267 m_singleDepthFlag = pcCU->getSingleDepthFlag () + uiAbsPartIdx; 1219 1268 m_apSingleDepthValue = pcCU->getSingleDepthValue () + uiAbsPartIdx; 1220 #endif 1269 #endif 1270 #endif 1221 1271 m_pePartSize = pcCU->getPartitionSize () + uiAbsPartIdx; 1222 1272 #if H_3D_NBDV … … 1290 1340 Int sizeInChar = sizeof( Char ) * uiNumPartition; 1291 1341 memcpy( m_skipFlag + uiOffset, pcCU->getSkipFlag(), sizeof( *m_skipFlag ) * uiNumPartition ); 1342 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1343 memcpy( m_bDISFlag + uiOffset, pcCU->getDISFlag(), sizeof( *m_bDISFlag ) * uiNumPartition ); 1344 memcpy( m_uiDISType + uiOffset, pcCU->getDISType(), sizeof( *m_uiDISType ) * uiNumPartition); 1345 #else 1292 1346 #if H_3D_SINGLE_DEPTH 1293 1347 memcpy( m_singleDepthFlag + uiOffset, pcCU->getSingleDepthFlag(), sizeof( *m_singleDepthFlag ) * uiNumPartition ); 1294 1348 memcpy( m_apSingleDepthValue + uiOffset, pcCU->getSingleDepthValue(), sizeof( *m_apSingleDepthValue ) * uiNumPartition); 1349 #endif 1295 1350 #endif 1296 1351 memcpy( m_phQP + uiOffset, pcCU->getQP(), sizeInChar ); … … 1410 1465 1411 1466 memcpy( rpcCU->getSkipFlag() + m_uiAbsIdxInLCU, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition ); 1467 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1468 memcpy( rpcCU->getDISFlag() + m_uiAbsIdxInLCU, m_bDISFlag, sizeof( *m_bDISFlag ) * m_uiNumPartition ); 1469 memcpy( rpcCU->getDISType() + m_uiAbsIdxInLCU, m_uiDISType, sizeof( *m_uiDISType ) * m_uiNumPartition ); 1470 #else 1412 1471 #if H_3D_SINGLE_DEPTH 1413 1472 memcpy( rpcCU->getSingleDepthFlag() + m_uiAbsIdxInLCU, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * m_uiNumPartition ); 1414 1473 memcpy( rpcCU->getSingleDepthValue() + m_uiAbsIdxInLCU, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * m_uiNumPartition); 1474 #endif 1415 1475 #endif 1416 1476 memcpy( rpcCU->getQP() + m_uiAbsIdxInLCU, m_phQP, sizeInChar ); … … 1525 1585 Int sizeInChar = sizeof( Char ) * uiQNumPart; 1526 1586 memcpy( rpcCU->getSkipFlag() + uiPartOffset, m_skipFlag, sizeof( *m_skipFlag ) * uiQNumPart ); 1587 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1588 memcpy( rpcCU->getDISFlag() + uiPartOffset, m_bDISFlag, sizeof( *m_bDISFlag ) * uiQNumPart ); 1589 memcpy( rpcCU->getDISType() + uiPartOffset, m_uiDISType, sizeof( *m_uiDISType ) * uiQNumPart ); 1590 #else 1527 1591 #if H_3D_SINGLE_DEPTH 1528 1592 memcpy( rpcCU->getSingleDepthFlag() + uiPartOffset, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * uiQNumPart ); 1529 1593 memcpy( rpcCU->getSingleDepthValue() + uiPartOffset, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * uiQNumPart); 1594 #endif 1530 1595 #endif 1531 1596 memcpy( rpcCU->getQP() + uiPartOffset, m_phQP, sizeInChar ); … … 2427 2492 memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2428 2493 } 2494 2495 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2496 Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt absPartIdx, UInt depth ) 2497 { 2498 assert( sizeof( *m_bDISFlag) == 1 ); 2499 memset( m_bDISFlag + absPartIdx, bDIS, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2500 } 2501 2502 Void TComDataCU::setDISTypeSubParts(UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 2503 { 2504 setSubPartT( uiDISType, m_uiDISType, uiAbsPartIdx, uiDepth, uiPUIdx ); 2505 } 2506 #else 2429 2507 #if H_3D_SINGLE_DEPTH 2430 2508 Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth ) … … 2439 2517 } 2440 2518 #endif 2519 #endif 2520 2441 2521 Void TComDataCU::setPredModeSubParts( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ) 2442 2522 { … … 5674 5754 } 5675 5755 5676 if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) 5756 if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) // CY: this condition equals to both bIsCurrRefLongTerm and bIsColRefLongTerm being 1 5677 5757 { 5678 5758 #if H_3D_TMVP … … 5681 5761 Int iColViewId = pColCU->getSlice()->getViewIndex(); 5682 5762 Int iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewIndex(); 5763 #if H_3D_TMVP_SCALING_FIX_K0053 5764 iScale = 4096; 5765 if ( iCurrRefViewId != iCurrViewId && iColViewId != iColRefViewId ) 5766 #endif 5683 5767 iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId ); 5684 5768 … … 5695 5779 #endif 5696 5780 } 5697 else 5781 else // CY: both bIsCurrRefLongTerm and bIsColRefLongTerm are 0 5698 5782 { 5699 5783 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); … … 5860 5944 #endif 5861 5945 #if H_3D_IV_MERGE 5946 #if SEC_ARP_REM_ENC_RESTRICT_K0035 5947 Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5948 #else 5862 5949 Bool TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5950 #endif 5863 5951 { 5864 5952 … … 5876 5964 pDisp->m_acNBDV = cMv; 5877 5965 pDisp->m_aVIdxCan = iViewIdx; 5878 5966 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 5879 5967 return true; 5880 } 5968 #endif 5969 } 5970 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 5881 5971 return false; 5882 } 5883 #endif 5884 5885 #if H_3D_SINGLE_DEPTH 5886 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index) 5887 { 5888 5972 #endif 5973 } 5974 #endif 5975 5976 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 5977 Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index ) 5978 { 5979 #if NEIGHBORING_PIX_AVAILABILITY_FIX 5980 UInt uiPartIdxLT, uiPartIdxRT; 5981 this->deriveLeftRightTopIdxAdi( uiPartIdxLT, uiPartIdxRT, 0, 0 ); 5982 UInt uiMidPart, uiPartNeighbor; 5983 TComDataCU* pcCUNeighbor; 5984 Bool bDepAvail = false; 5985 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 5986 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 5987 5988 Int xP, yP, nPSW, nPSH; 5989 this->getPartPosition( uiPartIdx, xP, yP, nPSW, nPSH ); 5990 5991 switch( index ) 5992 { 5993 case 0: // Mid Left 5994 uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSH>>1) / this->getPic()->getMinCUHeight() * this->getPic()->getNumPartInWidth(); 5995 pcCUNeighbor = this->getPULeft( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] ); 5996 if ( pcCUNeighbor ) 5997 { 5998 if( !this->getSlice()->getPPS()->getConstrainedIntraPred() ) 5999 { 6000 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6001 bDepAvail = true; 6002 } 6003 else if ( pcCUNeighbor->getPredictionMode( uiPartNeighbor ) == MODE_INTRA ) 6004 { 6005 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6006 bDepAvail = true; 6007 } 6008 } 6009 break; 6010 case 1: // Mid Above 6011 uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSW>>1) / this->getPic()->getMinCUWidth(); 6012 pcCUNeighbor = this->getPUAbove( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] ); 6013 if( pcCUNeighbor ) 6014 { 6015 if( !this->getSlice()->getPPS()->getConstrainedIntraPred() ) 6016 { 6017 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6018 bDepAvail = true; 6019 } 6020 else if ( pcCUNeighbor->getPredictionMode( uiPartNeighbor ) == MODE_INTRA ) 6021 { 6022 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6023 bDepAvail = true; 6024 } 6025 } 6026 break; 6027 default: 6028 break; 6029 } 6030 6031 return bDepAvail; 6032 #else 5889 6033 Bool bDepAvail = false; 5890 6034 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); … … 5912 6056 break; 5913 6057 default: 6058 break; 6059 } 6060 return bDepAvail; 6061 #endif 6062 } 6063 #else 6064 #if H_3D_SINGLE_DEPTH 6065 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index) 6066 { 6067 6068 Bool bDepAvail = false; 6069 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 6070 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 6071 6072 Int xP, yP, nPSW, nPSH; 6073 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 6074 UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight(); 6075 UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth(); 6076 switch(index) 6077 { 6078 case 0: // Mid Left 6079 if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) ) 6080 { 6081 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6082 bDepAvail = true; 6083 } 6084 break; 6085 case 1: // Mid Above 6086 if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) ) 6087 { 6088 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6089 bDepAvail = true; 6090 } 6091 break; 6092 default: 5914 6093 break; 5915 6094 } 5916 6095 return bDepAvail; 5917 6096 } 5918 5919 #endif 6097 #endif 6098 #endif 6099 5920 6100 #if H_3D_NBDV 5921 6101 //Notes from QC: … … 5923 6103 //TBD#2: set of DvMCP values need to be done as part of inter-view motion prediction process. Remove this comment once merge related integration is done 5924 6104 //To be checked: Parallel Merge features for NBDV, related to DV_DERIVATION_PARALLEL_B0096 and LGE_IVMP_PARALLEL_MERGE_B0136 are not integrated. The need of these features due to the adoption of CU-based NBDV is not clear. We need confirmation on this, especially by proponents 6105 #if SEC_ARP_REM_ENC_RESTRICT_K0035 6106 Void TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo 6107 #else 5925 6108 Bool TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo 6109 #endif 5926 6110 #if H_3D_NBDV_REF 5927 6111 , Bool bDepthRefine … … 5931 6115 //// ******* Init variables ******* ///// 5932 6116 // Init disparity struct for results 6117 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 5933 6118 pDInfo->bDV = false; 6119 #endif 5934 6120 pDInfo->m_aVIdxCan = -1; 5935 6121 … … 6026 6212 pDInfo->m_acDoNBDV = cColMv; 6027 6213 #endif //H_3D_NBDV_REF 6214 #if SEC_ARP_REM_ENC_RESTRICT_K0035 6215 return; 6216 #else 6028 6217 return true; 6218 #endif 6029 6219 } 6030 6220 } … … 6043 6233 #endif 6044 6234 ) ) 6235 #if SEC_ARP_REM_ENC_RESTRICT_K0035 6236 return; 6237 #else 6045 6238 return true; 6239 #endif 6046 6240 6047 6241 //// ******* Get disparity from above block ******* ///// … … 6055 6249 #endif 6056 6250 ) ) 6251 #if SEC_ARP_REM_ENC_RESTRICT_K0035 6252 return; 6253 #else 6057 6254 return true; 6255 #endif 6058 6256 } 6059 6257 … … 6101 6299 pDInfo->m_acDoNBDV = cDispVec; 6102 6300 #endif 6301 #if SEC_ARP_REM_ENC_RESTRICT_K0035 6302 return; 6303 #else 6103 6304 return true; 6305 #endif 6104 6306 } 6105 6307 } … … 6137 6339 pDInfo->m_acDoNBDV = defaultDV; 6138 6340 #endif 6341 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6139 6342 return true; 6140 } 6343 #endif 6344 } 6345 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6141 6346 return false; 6347 #endif 6142 6348 } 6143 6349 … … 6752 6958 Int iBaseAbsPartIdx; 6753 6959 6960 #if SEC_SHIFTED_IVMC_POS_K0036 6961 Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth * 2 ); 6962 Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2 ); 6963 #else 6754 6964 Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 ); 6755 6965 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 ); 6966 #endif 6756 6967 6757 6968 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComDataCU.h
r1133 r1163 110 110 // ------------------------------------------------------------------------------------------------------------------- 111 111 Bool* m_skipFlag; ///< array of skip flags 112 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 113 Bool* m_bDISFlag; 114 UInt* m_uiDISType; 115 #else 112 116 #if H_3D_SINGLE_DEPTH 113 117 Bool* m_singleDepthFlag; ///< array of single depth flags 114 118 Pel* m_apSingleDepthValue; 119 #endif 115 120 #endif 116 121 Char* m_pePartSize; ///< array of partition sizes … … 342 347 Void setSkipFlag ( UInt idx, Bool skip) { m_skipFlag[idx] = skip; } 343 348 Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth ); 349 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 350 Bool* getDISFlag () { return m_bDISFlag; } 351 Bool getDISFlag ( UInt idx) { return m_bDISFlag[idx]; } 352 Void setDISFlag ( UInt idx, Bool bDIS) { m_bDISFlag[idx] = bDIS; } 353 Void setDISFlagSubParts ( Bool bDIS, UInt absPartIdx, UInt depth ); 354 355 UInt* getDISType () { return m_uiDISType; } 356 UInt getDISType ( UInt idx) { return m_uiDISType[idx]; } 357 Void getDISType ( UInt idx, UInt uiDISType) { m_uiDISType[idx] = uiDISType; } 358 Void setDISTypeSubParts ( UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ); 359 #else 344 360 #if H_3D_SINGLE_DEPTH 345 361 Bool* getSingleDepthFlag () { return m_singleDepthFlag; } … … 353 369 Void setSingleDepthValueSubParts (Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ); 354 370 #endif 371 #endif 355 372 Char* getPredictionMode () { return m_pePredMode; } 356 373 PredMode getPredictionMode ( UInt uiIdx ) { return static_cast<PredMode>( m_pePredMode[uiIdx] ); } … … 484 501 ); 485 502 Bool xGetColDisMV ( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 503 #if SEC_ARP_REM_ENC_RESTRICT_K0035 504 Void getDisMvpCandNBDV ( DisInfo* pDInfo 505 #else 486 506 Bool getDisMvpCandNBDV ( DisInfo* pDInfo 507 #endif 487 508 #if H_3D_NBDV_REF 488 509 , Bool bDepthRefine = false … … 491 512 492 513 #if H_3D 514 #if SEC_ARP_REM_ENC_RESTRICT_K0035 515 Void getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 516 #else 493 517 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 518 #endif 494 519 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 495 520 #endif 521 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 522 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 523 #else 496 524 #if H_3D_SINGLE_DEPTH 497 525 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 526 #endif 498 527 #endif 499 528 #if H_3D_NBDV_REF -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComMotionInfo.h
r1084 r1163 63 63 typedef struct _DisCand 64 64 { 65 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 65 66 Bool bDV; 67 #endif 66 68 TComMv m_acNBDV; // DV from NBDV 67 69 #if H_3D_NBDV_REF -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r1133 r1163 1255 1255 #if H_3D_NBDV 1256 1256 DisInfo cDistparity; 1257 #if SEC_ARP_REM_ENC_RESTRICT_K0035 1258 cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV; 1259 cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; 1260 #else 1257 1261 cDistparity.bDV = pcCU->getDvInfo(uiPartAddr).bDV; 1258 1262 if( cDistparity.bDV ) … … 1262 1266 cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; 1263 1267 } 1268 #endif 1264 1269 #else 1265 1270 assert(0); // ARP can be applied only when a DV is available 1266 1271 #endif 1267 1272 #if SEC_ARP_REM_ENC_RESTRICT_K0035 1273 UChar dW = pcCU->getARPW ( uiPartAddr ); 1274 #else 1268 1275 UChar dW = cDistparity.bDV ? pcCU->getARPW ( uiPartAddr ) : 0; 1269 1276 #endif 1277 1278 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 1270 1279 if( cDistparity.bDV ) 1280 #endif 1271 1281 { 1272 1282 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); … … 1320 1330 pYuvB0->clear(); pYuvB1->clear(); 1321 1331 } 1322 1332 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 1323 1333 assert ( cDistparity.bDV ); 1324 1334 #endif 1325 1335 TComMv cNBDV = cDistparity.m_acNBDV; 1326 1336 pcCU->clipMv( cNBDV ); -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRdCost.cpp
r884 r1163 341 341 else if( eDFunc >= DF_HADS && eDFunc <= DF_HADS16N ) 342 342 { 343 #if !RWTH_DBBP_NO_SATD_K0028 343 344 rcDistParam.DistFunc = TComRdCost::xGetMaskedHADs; 345 #else 346 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 347 #endif 344 348 } 345 349 else if( eDFunc >= DF_VSD && eDFunc <= DF_VSD16N ) … … 441 445 if( m_bUseMask ) 442 446 { 447 #if !RWTH_DBBP_NO_SATD_K0028 443 448 rcDistParam.DistFunc = (bHADME)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD; 449 #else 450 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 451 #endif 444 452 } 445 453 #endif … … 464 472 if( m_bUseMask ) 465 473 { 474 #if !RWTH_DBBP_NO_SATD_K0028 466 475 rcDP.DistFunc = (bHadamard)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD; 476 #else 477 rcDP.DistFunc = TComRdCost::xGetMaskedSAD; 478 #endif 467 479 } 468 480 #endif … … 717 729 } 718 730 731 #if !RWTH_DBBP_NO_SATD_K0028 719 732 UInt TComRdCost::xGetMaskedHADs( DistParam* pcDtParam ) 720 733 { … … 834 847 return uiSum >> DISTORTION_PRECISION_ADJUSTMENT(pcDtParam->bitDepth-8); 835 848 } 849 #endif 836 850 837 851 UInt TComRdCost::xGetMaskedVSD( DistParam* pcDtParam ) -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRdCost.h
r872 r1163 320 320 static UInt xGetMaskedSSE ( DistParam* pcDtParam ); 321 321 static UInt xGetMaskedSAD ( DistParam* pcDtParam ); 322 #if !RWTH_DBBP_NO_SATD_K0028 322 323 static UInt xGetMaskedHADs ( DistParam* pcDtParam ); 324 #endif 323 325 static UInt xGetMaskedVSD ( DistParam* pcDtParam ); 324 326 #endif -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
r1133 r1163 140 140 , m_depthToDisparityF ( NULL ) 141 141 #endif 142 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 143 , m_bApplyDIS (false) 144 #else 142 145 #if H_3D_SINGLE_DEPTH 143 146 , m_bApplySingleDepthMode (false) 147 #endif 144 148 #endif 145 149 #endif … … 1099 1103 } 1100 1104 #endif 1105 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1106 m_bApplyDIS = pSrc->m_bApplyDIS; 1107 #else 1101 1108 #if H_3D_SINGLE_DEPTH 1102 1109 m_bApplySingleDepthMode = pSrc->m_bApplySingleDepthMode; 1110 #endif 1103 1111 #endif 1104 1112 #if H_3D_IC … … 4088 4096 m_intraSdcWedgeFlag = sps3dExt->getIntraSdcWedgeFlag ( depthFlag ) && lidG0 ; 4089 4097 m_qtPredFlag = sps3dExt->getQtPredFlag ( depthFlag ) && lidG0 && textOfCurViewAvailFlag; 4090 m_interSdcFlag = sps3dExt->getInterSdcFlag ( depthFlag ) && lidG0 ; 4098 m_interSdcFlag = sps3dExt->getInterSdcFlag ( depthFlag ) && lidG0 ; 4099 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 4100 m_depthIntraSkipFlag = sps3dExt->getDepthIntraSkipFlag ( depthFlag ) && lidG0 ; 4101 #else 4091 4102 m_intraSingleFlag = sps3dExt->getIntraSingleFlag ( depthFlag ) && lidG0 ; 4103 #endif 4092 4104 4093 4105 m_subPbSize = lidG0 ? ( 1 << ( sps3dExt->getLog2SubPbSizeMinus3 ( depthFlag ) + 3 ) ) : getSPS()->getMaxCUWidth(); … … 4112 4124 std::cout << "qtPredFlag :" << m_qtPredFlag << std::endl; 4113 4125 std::cout << "interSdcFlag :" << m_interSdcFlag << std::endl; 4126 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 4127 std::cout << "depthIntraSkipFlag :" << m_depthIntraSkipFlag << std::endl; 4128 #else 4114 4129 std::cout << "intraSingleFlag :" << m_intraSingleFlag << std::endl; 4130 #endif 4115 4131 std::cout << "subPbSize :" << m_subPbSize << std::endl; 4116 4132 std::cout << "mpiSubPbSize :" << m_mpiSubPbSize << std::endl; -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h
r1133 r1163 1574 1574 m_qtPredFlag [d] = false; 1575 1575 m_interSdcFlag [d] = false; 1576 m_intraSingleFlag [d] = false; 1576 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1577 m_depthIntraSkipFlag [d] = false; 1578 #else 1579 m_intraSingleFlag [d] = false; 1580 #endif 1577 1581 } 1578 1582 } … … 1617 1621 Bool getInterSdcFlag( Int d ) { return m_interSdcFlag[d]; } 1618 1622 1623 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1624 Void setDepthIntraSkipFlag( Int d, Bool flag ) { m_depthIntraSkipFlag[d] = flag; } 1625 Bool getDepthIntraSkipFlag( Int d ) { return m_depthIntraSkipFlag[d]; } 1626 #else 1619 1627 Void setIntraSingleFlag( Int d, Bool flag ) { m_intraSingleFlag[d] = flag; } 1620 1628 Bool getIntraSingleFlag( Int d ) { return m_intraSingleFlag[d]; } 1629 #endif 1621 1630 1622 1631 private: … … 1635 1644 Bool m_qtPredFlag [2]; 1636 1645 Bool m_interSdcFlag [2]; 1646 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1647 Bool m_depthIntraSkipFlag [2]; 1648 #else 1637 1649 Bool m_intraSingleFlag [2]; 1650 #endif 1638 1651 }; 1639 1652 … … 2377 2390 #endif 2378 2391 #endif 2392 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2393 Bool m_bApplyDIS; 2394 #else 2379 2395 #if H_3D_SINGLE_DEPTH 2380 2396 Bool m_bApplySingleDepthMode; 2397 #endif 2381 2398 #endif 2382 2399 #if H_3D_IC … … 2398 2415 Bool m_qtPredFlag ; 2399 2416 Bool m_interSdcFlag ; 2417 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2418 Bool m_depthIntraSkipFlag ; 2419 #else 2400 2420 Bool m_intraSingleFlag ; 2401 2421 #endif 2402 2422 Int m_mpiSubPbSize ; 2403 2423 Int m_subPbSize ; … … 2822 2842 Bool getQtPredFlag ( ) { return m_qtPredFlag ; }; 2823 2843 Bool getInterSdcFlag ( ) { return m_interSdcFlag ; }; 2844 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2845 Bool getDepthIntraSkipFlag ( ) { return m_depthIntraSkipFlag ; }; 2846 #else 2824 2847 Bool getIntraSingleFlag ( ) { return m_intraSingleFlag ; }; 2848 #endif 2825 2849 2826 2850 Int getMpiSubPbSize ( ) { return m_mpiSubPbSize ; }; -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h
r1133 r1163 69 69 70 70 #define MTK_I0093 1 71 72 #define RWTH_DBBP_NO_SATD_K0028 1 71 73 ///////////////////////////////////////////////////////////////////////////////////////// 72 74 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// … … 78 80 79 81 #if H_3D 82 #define SEC_DEPTH_INTRA_SKIP_MODE_K0033 1 // Depth intra skip mode 83 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 84 #define NEIGHBORING_PIX_AVAILABILITY_FIX 1 85 #endif 86 87 80 88 #define H_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 81 89 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units … … 117 125 #define SEC_ARP_VIEW_REF_CHECK_J0037 1 // Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1 118 126 127 #define SEC_ARP_REM_ENC_RESTRICT_K0035 1 // Removal of encoder restriction of ARP, JCT3V-K0035 128 119 129 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 120 130 // Unifying rounding offset, for IC part, JCT3V-D0135 … … 185 195 // SEC_SIMP_SHIFTED_DV_I0086 Simplification of Shifted DV candidate, JCT3V-I0086 186 196 187 197 #define SEC_SHIFTED_IVMC_POS_K0036 1 // Position Derivation for Shifted-IVMC, JCT3V-K0036 188 198 189 199 190 200 #define H_3D_TMVP 1 // QC_TMVP_C0047 191 201 // Sony_M23639 202 #if H_3D_TMVP 203 #define H_3D_TMVP_SCALING_FIX_K0053 1 // QC/CY for K0053 204 #endif 192 205 193 206 #define H_3D_DIM 1 // DIM, Depth intra modes, includes: … … 239 252 // SHARP_DLT_SIMP_J0029 1 // DLT(DepthValue2Idx[]) table derivation cleanup 240 253 254 #if !SEC_DEPTH_INTRA_SKIP_MODE_K0033 241 255 #define H_3D_SINGLE_DEPTH 1 // Single depth mode proposed in JCT3V-I0095 242 256 // HS_SP_SIMP_J0066 243 257 // SINGLE_DEPTH_SIMP_J0115 1 244 258 // MTK_SINGLE_DEPTH_VPS_FLAG_J0060 1 // Add VPS control flags and remove slice header control flag for single depth, JCT3V-J0060 259 #endif 245 260 246 261 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding … … 313 328 #define H_3D_OUTPUT_ACTIVE_TOOLS 0 314 329 330 #if !SEC_DEPTH_INTRA_SKIP_MODE_K0033 315 331 ///// ***** SINGLE DEPTH MODE ********* 316 332 #if H_3D_SINGLE_DEPTH 317 333 #define SINGLE_DEPTH_MODE_CAND_LIST_SIZE 2 // size of the sample candidate list 318 334 335 #endif 319 336 #endif 320 337
Note: See TracChangeset for help on using the changeset viewer.