Changeset 983 in 3DVCSoftware for branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibCommon
- Timestamp:
- 11 Jul 2014, 03:49:39 (11 years ago)
- Location:
- branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibCommon
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibCommon/ContextTables.h
r976 r983 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 53 #if MTK_SINGLE_DEPTH_MODE_I0095 54 #define NUM_SINGLEDEPTH_FLAG_CTX 1 55 #define NUM_SINGLE_DEPTH_VALUE_DATA_CTX 1 56 #endif 54 57 #define NUM_MERGE_FLAG_EXT_CTX 1 ///< number of context models for merge flag of merge extended 55 58 #define NUM_MERGE_IDX_EXT_CTX 1 ///< number of context models for merge index of merge extended … … 150 153 { CNU, CNU, CNU, }, 151 154 }; 152 155 #if MTK_SINGLE_DEPTH_MODE_I0095 156 static const UChar 157 INIT_SINGLEDEPTH_FLAG[3][NUM_SINGLEDEPTH_FLAG_CTX] = 158 { 159 { 185 }, 160 { 185 }, 161 { 185 }, 162 }; 163 static const UChar 164 INIT_SINGLE_DEPTH_VALUE_DATA[3][NUM_SINGLE_DEPTH_VALUE_DATA_CTX] = 165 { 166 { 137 }, 167 { 137 }, 168 { 137 }, 169 }; 170 #endif 153 171 static const UChar 154 172 INIT_MERGE_FLAG_EXT[3][NUM_MERGE_FLAG_EXT_CTX] = -
branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp
r976 r983 60 60 61 61 m_skipFlag = NULL; 62 62 #if MTK_SINGLE_DEPTH_MODE_I0095 63 m_singleDepthFlag = NULL; 64 m_apSingleDepthValue = NULL; 65 #endif 63 66 m_pePartSize = NULL; 64 67 m_pePredMode = NULL; … … 182 185 183 186 m_skipFlag = new Bool[ uiNumPartition ]; 184 187 #if MTK_SINGLE_DEPTH_MODE_I0095 188 m_singleDepthFlag = new Bool[ uiNumPartition ]; 189 m_apSingleDepthValue = (Pel*)xMalloc(Pel, uiNumPartition); 190 #endif 185 191 m_pePartSize = new Char[ uiNumPartition ]; 186 192 memset( m_pePartSize, SIZE_NONE,uiNumPartition * sizeof( *m_pePartSize ) ); … … 329 335 330 336 if ( m_skipFlag ) { delete[] m_skipFlag; m_skipFlag = NULL; } 331 337 #if MTK_SINGLE_DEPTH_MODE_I0095 338 if ( m_singleDepthFlag ) { delete[] m_singleDepthFlag; m_singleDepthFlag = NULL; } 339 if ( m_apSingleDepthValue ) { xFree(m_apSingleDepthValue); m_apSingleDepthValue = NULL; } 340 #endif 332 341 if ( m_pePartSize ) { delete[] m_pePartSize; m_pePartSize = NULL; } 333 342 if ( m_pePredMode ) { delete[] m_pePredMode; m_pePredMode = NULL; } … … 494 503 TComDataCU * pcFrom = pcPic->getCU(getAddr()); 495 504 m_skipFlag[ui] = pcFrom->getSkipFlag(ui); 505 #if MTK_SINGLE_DEPTH_MODE_I0095 506 m_singleDepthFlag[ui] = pcFrom->getSingleDepthFlag(ui); 507 m_apSingleDepthValue[ui] = pcFrom->getSingleDepthValue(ui); 508 #endif 496 509 m_pePartSize[ui] = pcFrom->getPartitionSize(ui); 497 510 m_pePredMode[ui] = pcFrom->getPredictionMode(ui); … … 550 563 { 551 564 memset( m_skipFlag + firstElement, false, numElements * sizeof( *m_skipFlag ) ); 552 565 #if MTK_SINGLE_DEPTH_MODE_I0095 566 memset( m_singleDepthFlag + firstElement, false, numElements * sizeof( *m_singleDepthFlag ) ); 567 memset( m_apSingleDepthValue + firstElement, 0, numElements * sizeof( *m_apSingleDepthValue ) ); 568 #endif 553 569 memset( m_pePartSize + firstElement, SIZE_NONE, numElements * sizeof( *m_pePartSize ) ); 554 570 memset( m_pePredMode + firstElement, MODE_NONE, numElements * sizeof( *m_pePredMode ) ); … … 738 754 m_puhTransformSkip[2][ui] = 0; 739 755 m_skipFlag[ui] = false; 756 #if MTK_SINGLE_DEPTH_MODE_I0095 757 m_singleDepthFlag[ui] = false; 758 m_apSingleDepthValue[ui] = 0; 759 #endif 740 760 m_pePartSize[ui] = SIZE_NONE; 741 761 m_pePredMode[ui] = MODE_NONE; … … 913 933 { 914 934 m_skipFlag[ui] = false; 935 #if MTK_SINGLE_DEPTH_MODE_I0095 936 m_singleDepthFlag[ui] = false; 937 m_apSingleDepthValue[ui]= 0; 938 #endif 915 939 m_pePartSize[ui] = SIZE_NONE; 916 940 m_pePredMode[ui] = MODE_NONE; … … 934 958 m_puhTransformSkip[2][ui] = pcCU->getTransformSkip(uiPartOffset+ui,TEXT_CHROMA_V); 935 959 m_skipFlag[ui] = pcCU->getSkipFlag(uiPartOffset+ui); 960 #if MTK_SINGLE_DEPTH_MODE_I0095 961 m_singleDepthFlag[ui] = pcCU->getSingleDepthFlag(uiPartOffset+ui); 962 m_apSingleDepthValue[ui] = pcCU->getSingleDepthValue(uiPartOffset+ui); 963 #endif 936 964 m_pePartSize[ui] = pcCU->getPartitionSize(uiPartOffset+ui); 937 965 m_pePredMode[ui] = pcCU->getPredictionMode(uiPartOffset+ui); … … 1083 1111 1084 1112 m_skipFlag=pcCU->getSkipFlag() + uiPart; 1085 1113 #if MTK_SINGLE_DEPTH_MODE_I0095 1114 m_singleDepthFlag = pcCU->getSingleDepthFlag() + uiPart; 1115 m_apSingleDepthValue = pcCU->getSingleDepthValue() + uiPart; 1116 #endif 1086 1117 m_phQP=pcCU->getQP() + uiPart; 1087 1118 m_pePartSize = pcCU->getPartitionSize() + uiPart; … … 1221 1252 1222 1253 m_skipFlag = pcCU->getSkipFlag () + uiAbsPartIdx; 1223 1254 #if MTK_SINGLE_DEPTH_MODE_I0095 1255 m_singleDepthFlag = pcCU->getSingleDepthFlag () + uiAbsPartIdx; 1256 m_apSingleDepthValue = pcCU->getSingleDepthValue () + uiAbsPartIdx; 1257 #endif 1224 1258 m_pePartSize = pcCU->getPartitionSize () + uiAbsPartIdx; 1225 1259 #if H_3D_NBDV … … 1297 1331 Int sizeInChar = sizeof( Char ) * uiNumPartition; 1298 1332 memcpy( m_skipFlag + uiOffset, pcCU->getSkipFlag(), sizeof( *m_skipFlag ) * uiNumPartition ); 1333 #if MTK_SINGLE_DEPTH_MODE_I0095 1334 memcpy( m_singleDepthFlag + uiOffset, pcCU->getSingleDepthFlag(), sizeof( *m_singleDepthFlag ) * uiNumPartition ); 1335 memcpy( m_apSingleDepthValue + uiOffset, pcCU->getSingleDepthValue(), sizeof( *m_apSingleDepthValue ) * uiNumPartition); 1336 #endif 1299 1337 memcpy( m_phQP + uiOffset, pcCU->getQP(), sizeInChar ); 1300 1338 memcpy( m_pePartSize + uiOffset, pcCU->getPartitionSize(), sizeof( *m_pePartSize ) * uiNumPartition ); … … 1417 1455 1418 1456 memcpy( rpcCU->getSkipFlag() + m_uiAbsIdxInLCU, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition ); 1419 1457 #if MTK_SINGLE_DEPTH_MODE_I0095 1458 memcpy( rpcCU->getSingleDepthFlag() + m_uiAbsIdxInLCU, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * m_uiNumPartition ); 1459 memcpy( rpcCU->getSingleDepthValue() + m_uiAbsIdxInLCU, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * m_uiNumPartition); 1460 #endif 1420 1461 memcpy( rpcCU->getQP() + m_uiAbsIdxInLCU, m_phQP, sizeInChar ); 1421 1462 #if H_3D_NBDV … … 1533 1574 Int sizeInChar = sizeof( Char ) * uiQNumPart; 1534 1575 memcpy( rpcCU->getSkipFlag() + uiPartOffset, m_skipFlag, sizeof( *m_skipFlag ) * uiQNumPart ); 1535 1576 #if MTK_SINGLE_DEPTH_MODE_I0095 1577 memcpy( rpcCU->getSingleDepthFlag() + uiPartOffset, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * uiQNumPart ); 1578 memcpy( rpcCU->getSingleDepthValue() + uiPartOffset, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * uiQNumPart); 1579 #endif 1536 1580 memcpy( rpcCU->getQP() + uiPartOffset, m_phQP, sizeInChar ); 1537 1581 memcpy( rpcCU->getPartitionSize() + uiPartOffset, m_pePartSize, sizeof( *m_pePartSize ) * uiQNumPart ); … … 2453 2497 memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2454 2498 } 2455 2499 #if MTK_SINGLE_DEPTH_MODE_I0095 2500 Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth ) 2501 { 2502 assert( sizeof( *m_singleDepthFlag) == 1 ); 2503 memset( m_singleDepthFlag + absPartIdx, singleDepth, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2504 } 2505 2506 Void TComDataCU::setSingleDepthValueSubParts(Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 2507 { 2508 setSubPartT<Pel>( singleDepthValue, m_apSingleDepthValue, uiAbsPartIdx, uiDepth, uiPUIdx ); 2509 } 2510 #endif 2456 2511 Void TComDataCU::setPredModeSubParts( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ) 2457 2512 { … … 6092 6147 } 6093 6148 #endif 6149 6150 #if MTK_SINGLE_DEPTH_MODE_I0095 6151 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index) 6152 { 6153 6154 Bool bDepAvail = false; 6155 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 6156 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 6157 6158 Int xP, yP, nPSW, nPSH; 6159 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 6160 UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight(); 6161 UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth(); 6162 switch(index) 6163 { 6164 case 0: // Mid Left 6165 if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) ) 6166 { 6167 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6168 bDepAvail = true; 6169 } 6170 break; 6171 case 1: // Mid Above 6172 if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) ) 6173 { 6174 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6175 bDepAvail = true; 6176 } 6177 break; 6178 case 2: // Above 6179 if(yP != 0) 6180 { 6181 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP) ]; 6182 bDepAvail = true; 6183 } 6184 break; 6185 case 3: // Left 6186 if(xP != 0) 6187 { 6188 *pNeighDepth = pDepth[ (yP) * iDepStride + (xP-1) ]; 6189 bDepAvail = true; 6190 } 6191 break; 6192 case 4: // Above_Left 6193 if(xP != 0 && yP != 0) 6194 { 6195 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP-1) ]; 6196 bDepAvail = true; 6197 } 6198 break; 6199 default: 6200 break; 6201 } 6202 return bDepAvail; 6203 } 6204 6205 #endif 6094 6206 #if H_3D_NBDV 6095 6207 //Notes from QC: -
branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibCommon/TComDataCU.h
r976 r983 110 110 // ------------------------------------------------------------------------------------------------------------------- 111 111 Bool* m_skipFlag; ///< array of skip flags 112 #if MTK_SINGLE_DEPTH_MODE_I0095 113 Bool* m_singleDepthFlag; ///< array of single depth flags 114 Pel* m_apSingleDepthValue; 115 #endif 112 116 Char* m_pePartSize; ///< array of partition sizes 113 117 Char* m_pePredMode; ///< array of prediction modes … … 347 351 Void setSkipFlag ( UInt idx, Bool skip) { m_skipFlag[idx] = skip; } 348 352 Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth ); 349 353 #if MTK_SINGLE_DEPTH_MODE_I0095 354 Bool* getSingleDepthFlag () { return m_singleDepthFlag; } 355 Bool getSingleDepthFlag (UInt idx) { return m_singleDepthFlag[idx]; } 356 Void setSingleDepthFlag ( UInt idx, Bool singleDepth) { m_singleDepthFlag[idx] = singleDepth; } 357 Void setSingleDepthFlagSubParts ( Bool singleDepth, UInt absPartIdx, UInt depth ); 358 359 Pel* getSingleDepthValue( ) { return m_apSingleDepthValue; } 360 Pel getSingleDepthValue (UInt idx) { return m_apSingleDepthValue[idx]; } 361 Void setSingleDepthValue ( UInt idx, Pel pDepthValue) { m_apSingleDepthValue[idx] = pDepthValue; } 362 Void setSingleDepthValueSubParts (Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ); 363 #endif 350 364 Char* getPredictionMode () { return m_pePredMode; } 351 365 PredMode getPredictionMode ( UInt uiIdx ) { return static_cast<PredMode>( m_pePredMode[uiIdx] ); } … … 489 503 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 490 504 #endif 491 505 #if MTK_SINGLE_DEPTH_MODE_I0095 506 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 507 #endif 492 508 #if H_3D_NBDV_REF 493 509 Pel getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT ); -
branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibCommon/TComSlice.cpp
r976 r983 139 139 , m_depthToDisparityF ( NULL ) 140 140 #endif 141 #if MTK_SINGLE_DEPTH_MODE_I0095 142 , m_bApplySingleDepthMode (false) 143 #endif 141 144 #endif 142 145 { … … 1091 1094 m_interLayerPredLayerIdc[ layer ] = pSrc->m_interLayerPredLayerIdc[ layer ]; 1092 1095 } 1096 #endif 1097 #if MTK_SINGLE_DEPTH_MODE_I0095 1098 m_bApplySingleDepthMode = pSrc->m_bApplySingleDepthMode; 1093 1099 #endif 1094 1100 #if H_3D_IC -
branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibCommon/TComSlice.h
r976 r983 2205 2205 UInt m_aiDDDShift [MAX_NUM_LAYERS]; 2206 2206 #endif 2207 2207 #if MTK_SINGLE_DEPTH_MODE_I0095 2208 Bool m_bApplySingleDepthMode; 2209 #endif 2208 2210 public: 2209 2211 TComSlice(); … … 2275 2277 #if H_3D 2276 2278 TComPic* getTexturePic () { return m_ivPicsCurrPoc[0][ m_viewIndex ]; } 2279 #endif 2280 #if MTK_SINGLE_DEPTH_MODE_I0095 2281 Void setApplySingleDepthMode( Bool b ) { m_bApplySingleDepthMode = b; } 2282 Bool getApplySingleDepthMode() { return m_bApplySingleDepthMode; } 2277 2283 #endif 2278 2284 #if H_3D_IC -
branches/HTM-11.2-dev3-MediaTek/source/Lib/TLibCommon/TypeDef.h
r976 r983 215 215 // MTK_DLT_CODING_FIX_H0091 216 216 217 #define MTK_SINGLE_DEPTH_MODE_I0095 1 // Single depth mode proposed in JCT3V-I0095 218 #if MTK_SINGLE_DEPTH_MODE_I0095 219 #define MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE 2 // size of the sample candidate list 220 #endif 217 221 218 222 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding … … 381 385 382 386 // OTHERS 383 //#define H_MV_HLS_8_HSB_Q0041_03 0 // #3 (HS /Q0041/hybrid scalability) The proposed text was endorsed, with non-editorial open issues considered as follows 384 :// #define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution 387 //#define H_MV_HLS_8_HSB_Q0041_03 0 // #3 (HS /Q0041/hybrid scalability) The proposed text was endorsed, with non-editorial open issues considered as follows ?// #define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution 385 388 //#define H_MV_HLS_8_MIS_Q0078_24 0 // #24 (MISC /Q0078/scan and pic type) , Items 3 b,c and 4, clarifying which pictures in an output layer sets are applied the values of general_progressive_source_flag, general_interlaced_source_flag, general_non_packed_constraint_flag and general_frame_only_constraint_flag. 386 389 //#define H_MV_HLS_7_HRD_P0138_6 0 // (HRD/P0138/HRD parameters for bitstreams excluding) #6 Decision: Adopt (as revised in updated contribution, with the specification of a flag in the BP SEI (HRD/P0192/sub-DPB) #12 Establish sub-DPBs based on the representation format indicated at the VPS level. It was suggested that the expressed shared capacity limit would need to be less than or equal to the sum of the individual capacity limits. Decision: Adopt as modified. Further study is encouraged on profile/level constraint selections.
Note: See TracChangeset for help on using the changeset viewer.