- Timestamp:
- 25 Feb 2015, 10:53:42 (10 years ago)
- Location:
- branches/HTM-13.1-dev1-Samsung
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-13.1-dev1-Samsung/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg
r1124 r1145 194 194 InterSdcFlag : 1 # use of inter sdc 195 195 MpiFlag : 1 196 IntraSingleFlag : 1 # use of single depth mode 196 DepthIntraSkip : 1 197 197 198 #========== view synthesis optimization (VSO) ========== 198 199 -
branches/HTM-13.1-dev1-Samsung/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg
r1124 r1145 212 212 InterSdcFlag : 1 # use of inter sdc 213 213 MpiFlag : 1 214 IntraSingleFlag : 1 # use of single depth mode 214 DepthIntraSkip : 1 215 215 216 #========== view synthesis optimization (VSO) ========== 216 217 VSOConfig : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string -
branches/HTM-13.1-dev1-Samsung/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg
r1124 r1145 260 260 InterSdcFlag : 1 # use of inter sdc 261 261 MpiFlag : 1 262 DepthIntraSkip : 1 262 263 263 264 #========== view synthesis optimization (VSO) ========== -
branches/HTM-13.1-dev1-Samsung/cfg/3D-HEVC/NonCTC/rc/baseCfg_3view+depth_rate_control.cfg
r1124 r1145 273 273 InterSdcFlag : 1 # use of inter sdc 274 274 MpiFlag : 1 275 IntraSingleFlag : 1 # use of single depth mode 275 DepthIntraSkip : 1 276 276 277 #========== view synthesis optimization (VSO) ========== 277 278 VSOConfig : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string -
branches/HTM-13.1-dev1-Samsung/cfg/3D-HEVC/baseCfg_2view+depth.cfg
r1124 r1145 228 228 InterSdcFlag : 1 # use of inter sdc 229 229 MpiFlag : 1 230 IntraSingleFlag : 1 # use of single depth mode 230 DepthIntraSkip : 1 231 231 232 #========== view synthesis optimization (VSO) ========== 232 233 -
branches/HTM-13.1-dev1-Samsung/cfg/3D-HEVC/baseCfg_3view+depth.cfg
r1124 r1145 261 261 InterSdcFlag : 1 # use of inter sdc 262 262 MpiFlag : 1 263 IntraSingleFlag : 1 # use of single depth mode 263 DepthIntraSkip : 1 264 264 265 #========== view synthesis optimization (VSO) ========== 265 266 VSOConfig : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string -
branches/HTM-13.1-dev1-Samsung/cfg/3D-HEVC/fullCfg.cfg
r1124 r1145 337 337 InterSdcFlag : 1 # use of inter sdc 338 338 MpiFlag : 1 339 IntraSingleFlag : 1 # use of single depth mode 339 DepthIntraSkip : 1 340 340 341 #========== view synthesis optimization (VSO) ========== 341 342 VSOConfig : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string -
branches/HTM-13.1-dev1-Samsung/source/App/TAppEncoder/TAppEncCfg.cpp
r1133 r1145 785 785 ("QtPredFlag" , m_qtPredFlag , true , "Quad tree prediction from texture to depth") 786 786 ("InterSdcFlag" , m_interSdcFlag , true , "Inter depth DCs" ) 787 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 788 ("DepthIntraSkip" , m_depthIntraSkipFlag , true , "Depth intra skip mode" ) 789 #else 787 790 ("IntraSingleFlag" , m_intraSingleFlag , true , "Intra single mode" ) 791 #endif 788 792 #endif //H_3D 789 793 ; … … 2604 2608 printf( "QtPred:%d " , m_qtPredFlag ? 1 : 0 ); 2605 2609 printf( "InterSdc:%d " , m_interSdcFlag ? 1 : 0 ); 2610 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2611 printf( "DepthIntraSkip:%d " , m_depthIntraSkipFlag ? 1 : 0 ); 2612 #else 2606 2613 printf( "IntraSingle:%d " , m_intraSingleFlag ? 1 : 0 ); 2614 #endif 2607 2615 #endif 2608 2616 -
branches/HTM-13.1-dev1-Samsung/source/App/TAppEncoder/TAppEncCfg.h
r1133 r1145 484 484 Bool m_qtPredFlag; 485 485 Bool m_interSdcFlag; 486 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 487 Bool m_depthIntraSkipFlag; 488 #else 486 489 Bool m_intraSingleFlag; 487 490 #endif 488 491 #endif 489 492 // internal member functions -
branches/HTM-13.1-dev1-Samsung/source/App/TAppEncoder/TAppEncTop.cpp
r1133 r1145 196 196 m_sps3dExtension.setQtPredFlag ( d, m_qtPredFlag ); 197 197 m_sps3dExtension.setInterSdcFlag ( d, m_interSdcFlag ); 198 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 199 m_sps3dExtension.setDepthIntraSkipFlag ( d, m_depthIntraSkipFlag ); 200 #else 198 201 m_sps3dExtension.setIntraSingleFlag ( d, m_intraSingleFlag ); 202 #endif 199 203 } 200 204 } -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibCommon/ContextTables.h
r1084 r1145 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-dev1-Samsung/source/Lib/TLibCommon/TComDataCU.cpp
r1133 r1145 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; … … 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 { … … 5883 5963 #endif 5884 5964 5885 #if H_3D_SINGLE_DEPTH5886 Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index)5965 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 5966 Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index ) 5887 5967 { 5888 5968 … … 5912 5992 break; 5913 5993 default: 5994 break; 5995 } 5996 return bDepAvail; 5997 } 5998 #else 5999 #if H_3D_SINGLE_DEPTH 6000 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index) 6001 { 6002 6003 Bool bDepAvail = false; 6004 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 6005 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 6006 6007 Int xP, yP, nPSW, nPSH; 6008 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 6009 UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight(); 6010 UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth(); 6011 switch(index) 6012 { 6013 case 0: // Mid Left 6014 if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) ) 6015 { 6016 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6017 bDepAvail = true; 6018 } 6019 break; 6020 case 1: // Mid Above 6021 if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) ) 6022 { 6023 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6024 bDepAvail = true; 6025 } 6026 break; 6027 default: 5914 6028 break; 5915 6029 } 5916 6030 return bDepAvail; 5917 6031 } 5918 5919 #endif 6032 #endif 6033 #endif 6034 5920 6035 #if H_3D_NBDV 5921 6036 //Notes from QC: -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibCommon/TComDataCU.h
r1133 r1145 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] ); } … … 494 511 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 495 512 #endif 513 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 514 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 515 #else 496 516 #if H_3D_SINGLE_DEPTH 497 517 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 518 #endif 498 519 #endif 499 520 #if H_3D_NBDV_REF -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibCommon/TComSlice.cpp
r1133 r1145 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-dev1-Samsung/source/Lib/TLibCommon/TComSlice.h
r1133 r1145 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-dev1-Samsung/source/Lib/TLibCommon/TypeDef.h
r1133 r1145 78 78 79 79 #if H_3D 80 #define SEC_DEPTH_INTRA_SKIP_MODE_K0033 1 // Depth intra skip mode 81 80 82 #define H_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 81 83 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units … … 239 241 // SHARP_DLT_SIMP_J0029 1 // DLT(DepthValue2Idx[]) table derivation cleanup 240 242 243 #if !SEC_DEPTH_INTRA_SKIP_MODE_K0033 241 244 #define H_3D_SINGLE_DEPTH 1 // Single depth mode proposed in JCT3V-I0095 242 245 // HS_SP_SIMP_J0066 243 246 // SINGLE_DEPTH_SIMP_J0115 1 244 247 // MTK_SINGLE_DEPTH_VPS_FLAG_J0060 1 // Add VPS control flags and remove slice header control flag for single depth, JCT3V-J0060 248 #endif 245 249 246 250 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding … … 313 317 #define H_3D_OUTPUT_ACTIVE_TOOLS 0 314 318 319 #if !SEC_DEPTH_INTRA_SKIP_MODE_K0033 315 320 ///// ***** SINGLE DEPTH MODE ********* 316 321 #if H_3D_SINGLE_DEPTH 317 322 #define SINGLE_DEPTH_MODE_CAND_LIST_SIZE 2 // size of the sample candidate list 318 323 324 #endif 319 325 #endif 320 326 -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1133 r1145 1040 1040 READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 ); 1041 1041 READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 ); 1042 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1043 READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt->setDepthIntraSkipFlag( d, uiCode == 1 ); 1044 #else 1042 1045 READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 ); 1046 #endif 1043 1047 } 1044 1048 } … … 2984 2988 assert(0); 2985 2989 } 2990 2991 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2992 Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 2993 { 2994 assert(0); 2995 } 2996 #else 2986 2997 #if H_3D_SINGLE_DEPTH 2987 2998 Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) … … 2990 3001 } 2991 3002 #endif 3003 #endif 3004 2992 3005 Void TDecCavlc::parseCUTransquantBypassFlag( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 2993 3006 { -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecCAVLC.h
r1133 r1145 124 124 125 125 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 126 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 127 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 128 #else 126 129 #if H_3D_SINGLE_DEPTH 127 130 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 128 #endif 131 #endif 132 #endif 129 133 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 130 134 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecCu.cpp
r1133 r1145 520 520 return; 521 521 } 522 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 523 m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth ); 524 if(!pcCU->getDISFlag(uiAbsPartIdx)) 525 { 526 #else 522 527 #if H_3D_SINGLE_DEPTH 523 528 m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth ); 524 529 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 525 530 { 531 #endif 526 532 #endif 527 533 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); … … 554 560 m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP ); 555 561 setdQPFlag( bCodeDQP ); 562 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 563 } 564 #else 556 565 #if H_3D_SINGLE_DEPTH 557 566 } 567 #endif 558 568 #endif 559 569 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); … … 656 666 break; 657 667 case MODE_INTRA: 668 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 669 if( m_ppcCU[uiDepth]->getDISFlag(0) ) 670 { 671 xReconDIS( m_ppcCU[uiDepth], 0, uiDepth ); 672 } 673 #if H_3D_DIM_SDC 674 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 675 { 676 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 677 } 678 #endif 679 else 680 #else 658 681 #if H_3D_SINGLE_DEPTH 659 682 if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) ) … … 671 694 #endif 672 695 #endif 696 #endif 673 697 xReconIntraQT( m_ppcCU[uiDepth], uiDepth ); 674 698 break; … … 704 728 } 705 729 } 730 731 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 732 Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 733 { 734 UInt uiWidth = pcCU->getWidth ( 0 ); 735 UInt uiHeight = pcCU->getHeight ( 0 ); 736 737 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 738 739 UInt uiStride = pcRecoYuv->getStride (); 740 Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 741 742 743 AOF( uiWidth == uiHeight ); 744 AOF( uiAbsPartIdx == 0 ); 745 746 Bool bAboveAvail = false; 747 Bool bLeftAvail = false; 748 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 749 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, 750 m_pcPrediction->getPredicBuf (), 751 m_pcPrediction->getPredicBufWidth (), 752 m_pcPrediction->getPredicBufHeight (), 753 bAboveAvail, bLeftAvail 754 ); 755 756 if ( pcCU->getDISType(uiAbsPartIdx) == 0 ) 757 { 758 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 759 } 760 else if ( pcCU->getDISType(uiAbsPartIdx) == 1 ) 761 { 762 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 763 } 764 else if ( pcCU->getDISType(uiAbsPartIdx) == 2 ) 765 { 766 Pel pSingleDepth = 1 << ( g_bitDepthY - 1 ); 767 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 ); 768 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 769 { 770 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 771 { 772 piReco[ uiX ] = pSingleDepth; 773 } 774 piReco+= uiStride; 775 } 776 } 777 else if ( pcCU->getDISType(uiAbsPartIdx) == 3 ) 778 { 779 Pel pSingleDepth = 1 << ( g_bitDepthY - 1 ); 780 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 ); 781 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 782 { 783 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 784 { 785 piReco[ uiX ] = pSingleDepth; 786 } 787 piReco+= uiStride; 788 } 789 } 790 791 // clear UV 792 UInt uiStrideC = pcRecoYuv->getCStride(); 793 Pel *pRecCb = pcRecoYuv->getCbAddr(); 794 Pel *pRecCr = pcRecoYuv->getCrAddr(); 795 796 for (Int y=0; y<uiHeight/2; y++) 797 { 798 for (Int x=0; x<uiWidth/2; x++) 799 { 800 pRecCb[x] = 1<<(g_bitDepthC-1); 801 pRecCr[x] = 1<<(g_bitDepthC-1); 802 } 803 804 pRecCb += uiStrideC; 805 pRecCr += uiStrideC; 806 } 807 } 808 #else 706 809 #if H_3D_SINGLE_DEPTH 707 810 Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 772 875 } 773 876 #endif 877 #endif 878 774 879 #if H_3D_INTER_SDC 775 880 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecCu.h
r1084 r1145 123 123 Void setdQPFlag ( Bool b ) { m_bDecodeDQP = b; } 124 124 Void xFillPCMBuffer (TComDataCU* pCU, UInt depth); 125 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 126 Void xReconDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 #else 125 128 #if H_3D_SINGLE_DEPTH 126 129 Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 130 #endif 127 131 #endif 128 132 #if H_3D_DIM_SDC -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecEntropy.cpp
r1133 r1145 52 52 m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); 53 53 } 54 55 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 56 Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 57 { 58 if( !pcCU->getSlice()->getDepthIntraSkipFlag() ) 59 { 60 return; 61 } 62 63 m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth ); 64 } 65 #else 54 66 #if H_3D_SINGLE_DEPTH 55 67 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 63 75 } 64 76 #endif 77 #endif 78 65 79 Void TDecEntropy::decodeCUTransquantBypassFlag(TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 66 80 { -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecEntropy.h
r1133 r1145 85 85 public: 86 86 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 87 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 88 virtual Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 89 #else 87 90 #if H_3D_SINGLE_DEPTH 88 91 virtual Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 92 #endif 89 93 #endif 90 94 virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 171 175 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 172 176 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 177 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 178 Void decodeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 179 #else 173 180 #if H_3D_SINGLE_DEPTH 174 181 Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 182 #endif 175 183 #endif 176 184 Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecSbac.cpp
r1133 r1145 52 52 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 53 53 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 54 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 55 , m_cCUDISFlagSCModel ( 1, 1, NUM_DIS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 , m_cCUDISTypeSCModel ( 1, 1, NUM_DIS_TYPE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 57 #else 54 58 #if H_3D_SINGLE_DEPTH 55 59 , m_cCUSingleDepthFlagSCModel ( 1, 1, NUM_SINGLEDEPTH_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 60 , m_cSingleDepthValueSCModel ( 1, 1, NUM_SINGLE_DEPTH_VALUE_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 61 #endif 57 62 #endif 58 63 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 136 141 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 137 142 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 143 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 144 m_cCUDISFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_FLAG ); 145 m_cCUDISTypeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_TYPE ); 146 #else 138 147 #if H_3D_SINGLE_DEPTH 139 148 m_cCUSingleDepthFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 140 149 m_cSingleDepthValueSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 150 #endif 141 151 #endif 142 152 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 207 217 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 208 218 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 219 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 220 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG ); 221 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); 222 #else 209 223 #if H_3D_SINGLE_DEPTH 210 224 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 211 225 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 226 #endif 212 227 #endif 213 228 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 570 585 #endif 571 586 } 587 588 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 589 Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 590 { 591 pcCU->setDISFlagSubParts( false, uiAbsPartIdx, uiDepth ); 592 UInt uiSymbol = 0; 593 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) ); 594 if( uiSymbol ) 595 { 596 pcCU->setDISFlagSubParts( true, uiAbsPartIdx, uiDepth ); 597 pcCU->setSkipFlagSubParts( false, uiAbsPartIdx, uiDepth ); 598 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 599 pcCU->setPredModeSubParts( MODE_INTRA, uiAbsPartIdx, uiDepth ); 600 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 601 pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth ); 602 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 603 pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 604 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 605 pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth); 606 607 UInt uiUnaryIdx = 0; 608 UInt uiNumCand = 4; 609 610 if ( uiNumCand > 1 ) 611 { 612 for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx ) 613 { 614 UInt uiSymbol2 = 0; 615 if ( uiUnaryIdx==0 ) 616 { 617 m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) ); 618 } 619 else 620 { 621 m_pcTDecBinIf->decodeBinEP( uiSymbol2); 622 } 623 if( uiSymbol2 == 0 ) 624 { 625 break; 626 } 627 } 628 } 629 pcCU->setDISTypeSubParts(uiUnaryIdx, uiAbsPartIdx, 0, uiDepth); 630 } 631 } 632 #else 572 633 #if H_3D_SINGLE_DEPTH 573 634 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 616 677 } 617 678 } 618 619 #endif 679 #endif 680 #endif 681 620 682 /** parse merge flag 621 683 * \param pcCU -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecSbac.h
r1133 r1145 125 125 126 126 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 128 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 129 #else 127 130 #if H_3D_SINGLE_DEPTH 128 131 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 129 #endif 132 #endif 133 #endif 130 134 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 131 135 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 178 182 ContextModel3DBuffer m_cCUSplitFlagSCModel; 179 183 ContextModel3DBuffer m_cCUSkipFlagSCModel; 184 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 185 ContextModel3DBuffer m_cCUDISFlagSCModel; 186 ContextModel3DBuffer m_cCUDISTypeSCModel; 187 #else 180 188 #if H_3D_SINGLE_DEPTH 181 189 ContextModel3DBuffer m_cCUSingleDepthFlagSCModel; 182 190 ContextModel3DBuffer m_cSingleDepthValueSCModel; 191 #endif 183 192 #endif 184 193 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncCavlc.cpp
r1133 r1145 889 889 WRITE_FLAG( sps3dExt->getQtPredFlag( d ) ? 1 : 0 , "qt_pred_flag" ); 890 890 WRITE_FLAG( sps3dExt->getInterSdcFlag( d ) ? 1 : 0 , "inter_sdc_flag" ); 891 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 892 WRITE_FLAG( sps3dExt->getDepthIntraSkipFlag( d ) ? 1 : 0 , "depth_intra_skip_flag" ); 893 #else 891 894 WRITE_FLAG( sps3dExt->getIntraSingleFlag( d ) ? 1 : 0 , "intra_single_flag" ); 895 #endif 892 896 } 893 897 } … … 2435 2439 assert(0); 2436 2440 } 2441 2442 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2443 Void TEncCavlc::codeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2444 { 2445 assert(0); 2446 } 2447 #else 2437 2448 #if H_3D_SINGLE_DEPTH 2438 2449 Void TEncCavlc::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx ) … … 2441 2452 } 2442 2453 #endif 2454 #endif 2455 2443 2456 Void TEncCavlc::codeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2444 2457 { -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncCavlc.h
r1133 r1145 127 127 Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ); 128 128 Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 129 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 130 Void codeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 131 #else 129 132 #if H_3D_SINGLE_DEPTH 130 133 Void codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx ); 134 #endif 131 135 #endif 132 136 Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncCu.cpp
r1133 r1145 712 712 } 713 713 #endif 714 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 715 rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP ); 716 if( rpcBestCU->getSlice()->getDepthIntraSkipFlag() ) 717 { 718 xCheckRDCostDIS( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 719 rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP ); 720 } 721 #else 714 722 #if H_3D_SINGLE_DEPTH 715 723 rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP ); … … 719 727 rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP ); 720 728 } 729 #endif 721 730 #endif 722 731 if(!earlyDetectionSkipMode) … … 1577 1586 return; 1578 1587 } 1588 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1589 m_pcEntropyCoder->encodeDIS( pcCU, uiAbsPartIdx ); 1590 if(!pcCU->getDISFlag(uiAbsPartIdx)) 1591 { 1592 #else 1579 1593 #if H_3D_SINGLE_DEPTH 1580 1594 m_pcEntropyCoder->encodeSingleDepthMode( pcCU, uiAbsPartIdx ); 1581 1595 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 1582 1596 { 1597 #endif 1583 1598 #endif 1584 1599 m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx ); … … 1614 1629 m_pcEntropyCoder->encodeCoeff( pcCU, uiAbsPartIdx, uiDepth, pcCU->getWidth (uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), bCodeDQP ); 1615 1630 setdQPFlag( bCodeDQP ); 1631 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1632 } 1633 #else 1616 1634 #if H_3D_SINGLE_DEPTH 1617 1635 } 1636 #endif 1618 1637 #endif 1619 1638 // --- write terminating bit --- … … 2000 2019 2001 2020 rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth ); 2021 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2022 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2023 #else 2002 2024 #if H_3D_SINGLE_DEPTH 2003 2025 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2026 #endif 2004 2027 #endif 2005 2028 #if H_3D_VSP // possible bug fix … … 2042 2065 } 2043 2066 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2067 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2068 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2069 #else 2044 2070 #if H_3D_SINGLE_DEPTH 2045 2071 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2072 #endif 2046 2073 #endif 2047 2074 rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth ); … … 2193 2220 2194 2221 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2222 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2223 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2224 #else 2195 2225 #if H_3D_SINGLE_DEPTH 2196 2226 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2227 #endif 2197 2228 #endif 2198 2229 rpcTempCU->setPartSizeSubParts ( ePartSize, 0, uhDepth ); … … 2303 2334 } 2304 2335 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2336 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2337 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2338 #else 2305 2339 #if H_3D_SINGLE_DEPTH 2306 2340 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2341 #endif 2307 2342 #endif 2308 2343 rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth ); … … 2413 2448 } 2414 2449 } 2450 2451 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2452 Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize ) 2453 { 2454 UInt uiDepth = rpcTempCU->getDepth( 0 ); 2455 if( !rpcBestCU->getSlice()->getIsDepth() || (eSize != SIZE_2Nx2N)) 2456 { 2457 return; 2458 } 2459 2460 #if H_3D_VSO // M5 2461 if( m_pcRdCost->getUseRenModel() ) 2462 { 2463 UInt uiWidth = m_ppcOrigYuv[uiDepth]->getWidth (); 2464 UInt uiHeight = m_ppcOrigYuv[uiDepth]->getHeight (); 2465 Pel* piSrc = m_ppcOrigYuv[uiDepth]->getLumaAddr(); 2466 UInt uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride (); 2467 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2468 } 2469 #endif 2470 2471 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2472 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 2473 rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth ); 2474 rpcTempCU->setCUTransquantBypassSubParts( rpcTempCU->getCUTransquantBypass(0), 0, uiDepth ); 2475 2476 rpcTempCU->setTrIdxSubParts(0, 0, uiDepth); 2477 rpcTempCU->setCbfSubParts(0, 1, 1, 0, uiDepth); 2478 rpcTempCU->setDISFlagSubParts(true, 0, uiDepth); 2479 rpcTempCU->setLumaIntraDirSubParts (DC_IDX, 0, uiDepth); 2480 #if H_3D_DIM_SDC 2481 rpcTempCU->setSDCFlagSubParts( false, 0, uiDepth); 2482 #endif 2483 2484 UInt uiPreCalcDistC; 2485 m_pcPredSearch ->estIntraPredDIS ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, false ); 2486 2487 2488 m_ppcRecoYuvTemp[uiDepth]->copyToPicLuma(rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU() ); 2489 2490 2491 m_pcEntropyCoder->resetBits(); 2492 if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag()) 2493 { 2494 m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0, true ); 2495 } 2496 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); 2497 m_pcEntropyCoder->encodeDIS( rpcTempCU, 0, true ); 2498 2499 2500 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 2501 2502 rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits(); 2503 rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); 2504 2505 2506 #if H_3D_VSO // M6 2507 if( m_pcRdCost->getUseLambdaScaleVSO()) 2508 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 2509 else 2510 #endif 2511 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 2512 2513 2514 xCheckDQP( rpcTempCU ); 2515 xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth); 2516 } 2517 #else 2415 2518 #if H_3D_SINGLE_DEPTH 2416 2519 Void TEncCu::xCheckRDCostSingleDepth( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize ) … … 2479 2582 xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth); 2480 2583 } 2584 #endif 2481 2585 #endif 2482 2586 … … 2636 2740 2637 2741 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2742 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2743 rpcTempCU->setDISFlagSubParts( false, 0, uiDepth ); 2744 #else 2638 2745 #if H_3D_SINGLE_DEPTH 2639 2746 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth ); 2747 #endif 2640 2748 #endif 2641 2749 rpcTempCU->setPartSizeSubParts( eSize, 0, uiDepth ); … … 2666 2774 } 2667 2775 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); 2776 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2777 m_pcEntropyCoder->encodeDIS( rpcTempCU, 0, true ); 2778 if(!rpcTempCU->getDISFlag(0)) 2779 { 2780 #else 2668 2781 #if H_3D_SINGLE_DEPTH 2669 2782 m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0, true ); 2670 2783 if(!rpcTempCU->getSingleDepthFlag(0)) 2671 2784 { 2785 #endif 2672 2786 #endif 2673 2787 m_pcEntropyCoder->encodePredMode( rpcTempCU, 0, true ); … … 2683 2797 m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP ); 2684 2798 setdQPFlag( bCodeDQP ); 2799 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2800 } 2801 #else 2685 2802 #if H_3D_SINGLE_DEPTH 2686 2803 } 2687 #endif 2804 #endif 2805 #endif 2688 2806 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 2689 2807 … … 2713 2831 2714 2832 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2833 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2834 rpcTempCU->setDISFlagSubParts( false, 0, uiDepth ); 2835 #else 2715 2836 #if H_3D_SINGLE_DEPTH 2716 2837 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth ); 2838 #endif 2717 2839 #endif 2718 2840 rpcTempCU->setIPCMFlag(0, true); … … 2732 2854 } 2733 2855 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); 2856 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2857 m_pcEntropyCoder->encodeDIS( rpcTempCU, 0, true ); 2858 #else 2734 2859 #if H_3D_SINGLE_DEPTH 2735 2860 m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0, true ); 2861 #endif 2736 2862 #endif 2737 2863 m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0, true ); -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncCu.h
r1084 r1145 159 159 Void xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false ); 160 160 #endif 161 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 162 Void xCheckRDCostDIS ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ); 163 #else 161 164 #if H_3D_SINGLE_DEPTH 162 165 Void xCheckRDCostSingleDepth ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ); 166 #endif 163 167 #endif 164 168 #if H_3D_DIM -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncEntropy.cpp
r1133 r1145 111 111 m_pcEntropyCoderIf->codeSkipFlag( pcCU, uiAbsPartIdx ); 112 112 } 113 114 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 115 Void TEncEntropy::encodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 116 { 117 if ( !pcCU->getSlice()->getIsDepth() ) 118 { 119 return; 120 } 121 if( bRD ) 122 { 123 uiAbsPartIdx = 0; 124 } 125 m_pcEntropyCoderIf->codeDIS( pcCU, uiAbsPartIdx ); 126 } 127 #else 113 128 #if H_3D_SINGLE_DEPTH 114 129 Void TEncEntropy::encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) … … 125 140 } 126 141 #endif 142 #endif 143 127 144 /** encode merge flag 128 145 * \param pcCU -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncEntropy.h
r1133 r1145 82 82 virtual Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 83 83 virtual Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 84 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 85 virtual Void codeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 86 #else 84 87 #if H_3D_SINGLE_DEPTH 85 88 virtual Void codeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 89 #endif 86 90 #endif 87 91 virtual Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; … … 166 170 Void encodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 167 171 Void encodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 172 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 173 Void encodeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD=false ); 174 #else 168 175 #if H_3D_SINGLE_DEPTH 169 176 Void encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD=false ); 177 #endif 170 178 #endif 171 179 Void encodePUWise ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncSbac.cpp
r1133 r1145 58 58 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 59 59 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 60 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 61 , m_cCUDISFlagSCModel ( 1, 1, NUM_DIS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 62 , m_cCUDISTypeSCModel ( 1, 1, NUM_DIS_TYPE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 63 #else 60 64 #if H_3D_SINGLE_DEPTH 61 65 , m_cCUSingleDepthFlagSCModel ( 1, 1, NUM_SINGLEDEPTH_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 62 66 , m_cSingleDepthValueSCModel ( 1, 1, NUM_SINGLE_DEPTH_VALUE_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 67 #endif 63 68 #endif 64 69 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 134 139 135 140 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 141 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 142 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG ); 143 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); 144 #else 136 145 #if H_3D_SINGLE_DEPTH 137 146 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 138 147 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 148 #endif 139 149 #endif 140 150 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT); … … 214 224 curCost = m_cCUSplitFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 215 225 curCost += m_cCUSkipFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG ); 226 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 227 curCost += m_cCUDISFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DIS_FLAG ); 228 curCost += m_cCUDISTypeSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DIS_TYPE ); 229 #else 216 230 #if H_3D_SINGLE_DEPTH 217 231 curCost += m_cCUSingleDepthFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 218 232 curCost += m_cSingleDepthValueSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 233 #endif 219 234 #endif 220 235 curCost += m_cCUMergeFlagExtSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT); … … 287 302 288 303 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 304 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 305 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG ); 306 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); 307 #else 289 308 #if H_3D_SINGLE_DEPTH 290 309 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 291 310 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 292 #endif 311 #endif 312 #endif 293 313 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT); 294 314 m_cCUMergeIdxExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT); … … 446 466 m_pcBinIf->encodeBinsEP( bins, numBins ); 447 467 } 468 469 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 470 Void TEncSbac::codeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx ) 471 { 472 UInt uiSymbol = pcCU->getDISFlag(uiAbsPartIdx ) ? 1 : 0; 473 m_pcBinIf->encodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) ); 474 if(uiSymbol) 475 { 476 UInt uiUnaryIdx = (UInt) pcCU->getDISType(uiAbsPartIdx); 477 UInt uiNumCand = 4; 478 479 if ( uiNumCand > 1 ) 480 { 481 for( UInt ui = 0; ui < uiNumCand - 1; ++ui ) 482 { 483 const UInt uiSymbol2 = ui == uiUnaryIdx ? 0 : 1; 484 if ( ui == 0 ) 485 { 486 m_pcBinIf->encodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) ); 487 } 488 else 489 { 490 m_pcBinIf->encodeBinEP( uiSymbol2 ); 491 } 492 if( uiSymbol2 == 0 ) 493 { 494 break; 495 } 496 } 497 } 498 } 499 } 500 #else 448 501 #if H_3D_SINGLE_DEPTH 449 502 Void TEncSbac::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx ) … … 477 530 } 478 531 #endif 532 #endif 533 479 534 /** Coding of coeff_abs_level_minus3 480 535 * \param uiSymbol value of coeff_abs_level_minus3 -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncSbac.h
r1133 r1145 146 146 Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ); 147 147 Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 148 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 149 Void codeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 150 #else 148 151 #if H_3D_SINGLE_DEPTH 149 152 Void codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx ); 153 #endif 150 154 #endif 151 155 Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); … … 215 219 ContextModel3DBuffer m_cCUSplitFlagSCModel; 216 220 ContextModel3DBuffer m_cCUSkipFlagSCModel; 221 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 222 ContextModel3DBuffer m_cCUDISFlagSCModel; 223 ContextModel3DBuffer m_cCUDISTypeSCModel; 224 #else 217 225 #if H_3D_SINGLE_DEPTH 218 226 ContextModel3DBuffer m_cCUSingleDepthFlagSCModel; 219 227 ContextModel3DBuffer m_cSingleDepthValueSCModel; 228 #endif 220 229 #endif 221 230 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncSearch.cpp
r1133 r1145 915 915 } 916 916 m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true ); 917 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 918 m_pcEntropyCoder->encodeDIS(pcCU, 0, true ); 919 if(!pcCU->getDISFlag(uiAbsPartIdx)) 920 #else 917 921 #if H_3D_SINGLE_DEPTH 918 922 m_pcEntropyCoder->encodeSingleDepthMode(pcCU, 0, true ); 919 923 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 920 924 #endif 925 #endif 921 926 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 922 927 } 928 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 929 else 930 { 931 m_pcEntropyCoder->encodeDIS(pcCU, 0, true ); 932 } 933 #else 923 934 #if H_3D_SINGLE_DEPTH 924 935 else … … 926 937 m_pcEntropyCoder->encodeSingleDepthMode(pcCU, 0, true ); 927 938 } 928 #endif 939 #endif 940 #endif 941 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 942 if(!pcCU->getDISFlag(uiAbsPartIdx)) 943 { 944 #else 929 945 #if H_3D_SINGLE_DEPTH 930 946 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 931 947 { 932 948 #endif 949 #endif 933 950 m_pcEntropyCoder ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 934 951 … … 945 962 } 946 963 } 964 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 965 } 966 #else 947 967 #if H_3D_SINGLE_DEPTH 948 968 } 949 969 #endif 950 } 970 #endif 971 } 972 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 973 if(!pcCU->getDISFlag(uiAbsPartIdx)) 974 { 975 #else 951 976 #if H_3D_SINGLE_DEPTH 952 977 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 953 978 { 979 #endif 954 980 #endif 955 981 // luma prediction mode … … 995 1021 } 996 1022 } 1023 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1024 } 1025 #else 997 1026 #if H_3D_SINGLE_DEPTH 998 1027 } 1028 #endif 999 1029 #endif 1000 1030 } … … 1859 1889 dRDCost += dSingleCost; 1860 1890 } 1891 1892 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1893 Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode ) 1894 { 1895 UInt uiWidth = pcCU ->getWidth ( 0 ); 1896 UInt uiHeight = pcCU ->getHeight ( 0 ); 1897 UInt uiStride = pcOrgYuv ->getStride (); 1898 Pel* piOrg = pcOrgYuv ->getLumaAddr( uiAbsPartIdx ); 1899 Pel* piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1900 1901 AOF( uiWidth == uiHeight ); 1902 AOF( uiAbsPartIdx == 0 ); 1903 pcCU->setDISTypeSubParts(uiPredMode, uiAbsPartIdx, 0, pcCU->getDepth(0)); 1904 //===== reconstruction ===== 1905 1906 Bool bAboveAvail = false; 1907 Bool bLeftAvail = false; 1908 pcCU->getPattern()->initPattern ( pcCU, 0, 0 ); 1909 pcCU->getPattern()->initAdiPattern( pcCU, 0, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1910 1911 if ( uiPredMode == 0 ) 1912 { 1913 predIntraLumaAng( pcCU->getPattern(), VER_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1914 } 1915 else if ( uiPredMode == 1 ) 1916 { 1917 predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1918 } 1919 else if ( uiPredMode == 2 ) 1920 { 1921 Pel pSingleDepth = 1 << ( g_bitDepthY - 1 ); 1922 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 ); 1923 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 1924 { 1925 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1926 { 1927 piPred[ uiX ] = pSingleDepth; 1928 } 1929 piPred+= uiStride; 1930 } 1931 } 1932 else if ( uiPredMode == 3 ) 1933 { 1934 Pel pSingleDepth = 1 << ( g_bitDepthY - 1 ); 1935 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 ); 1936 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 1937 { 1938 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1939 { 1940 piPred[ uiX ] = pSingleDepth; 1941 } 1942 piPred+= uiStride; 1943 } 1944 } 1945 1946 // clear UV 1947 UInt uiStrideC = pcPredYuv->getCStride(); 1948 Pel *pRecCb = pcPredYuv->getCbAddr(); 1949 Pel *pRecCr = pcPredYuv->getCrAddr(); 1950 1951 for (Int y=0; y<uiHeight/2; y++) 1952 { 1953 for (Int x=0; x<uiWidth/2; x++) 1954 { 1955 pRecCb[x] = 1<<(g_bitDepthC-1); 1956 pRecCr[x] = 1<<(g_bitDepthC-1); 1957 } 1958 1959 pRecCb += uiStrideC; 1960 pRecCr += uiStrideC; 1961 } 1962 1963 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1964 //===== determine distortion ===== 1965 #if H_3D_VSO 1966 if ( m_pcRdCost->getUseVSO() ) 1967 ruiDist = m_pcRdCost->getDistPartVSO ( pcCU, uiAbsPartIdx, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false ); 1968 else 1969 #endif 1970 ruiDist = m_pcRdCost->getDistPart(g_bitDepthY, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight ); 1971 1972 //===== determine rate and r-d cost ===== 1973 m_pcEntropyCoder->resetBits(); 1974 m_pcEntropyCoder->encodeDIS( pcCU, 0, true ); 1975 UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); 1976 1977 #if H_3D_VSO 1978 if ( m_pcRdCost->getUseLambdaScaleVSO()) 1979 dRDCost = m_pcRdCost->calcRdCostVSO( uiBits, ruiDist ); 1980 else 1981 #endif 1982 dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist ); 1983 } 1984 #else 1861 1985 #if H_3D_SINGLE_DEPTH 1862 1986 Void TEncSearch::xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel *DepthNeighbor ) … … 1921 2045 } 1922 2046 #endif 2047 #endif 2048 1923 2049 #if H_3D_DIM_SDC 1924 2050 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ) … … 2861 2987 pcCU->setChromIntraDirSubParts( uiBestMode, 0, pcCU->getDepth( 0 ) ); 2862 2988 } 2989 2990 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2991 Void TEncSearch::estIntraPredDIS( TComDataCU* pcCU, 2992 TComYuv* pcOrgYuv, 2993 TComYuv* pcPredYuv, 2994 TComYuv* pcResiYuv, 2995 TComYuv* pcRecoYuv, 2996 UInt& ruiDistC, 2997 Bool bLumaOnly ) 2998 { 2999 UInt uiDepth = pcCU->getDepth(0); 3000 UInt uiWidth = pcCU->getWidth (0); 3001 UInt uiHeight = pcCU->getHeight(0); 3002 3003 3004 Pel* piOrg = pcOrgYuv ->getLumaAddr( 0, uiWidth ); 3005 UInt uiStride = pcPredYuv->getStride(); 3006 3007 Dist uiDist = 0; 3008 Double dCost = 0.0; 3009 Dist uiBestDist = 0; 3010 Double dBestCost = MAX_DOUBLE; 3011 UInt uiBestDISType = 0; 3012 3013 for( UInt uiPredMode = 0; uiPredMode < 4 ; uiPredMode++ ) 3014 { 3015 // set context models 3016 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] ); 3017 3018 // determine residual for partition 3019 uiDist = 0; 3020 dCost = 0.0; 3021 #if H_3D_VSO // M36 3022 if( m_pcRdCost->getUseRenModel() ) 3023 { 3024 m_pcRdCost->setRenModelData( pcCU, 0, piOrg, uiStride, uiWidth, uiHeight ); 3025 } 3026 #endif 3027 xIntraCodingDIS(pcCU, 0, pcOrgYuv, pcPredYuv, uiDist, dCost, uiPredMode); 3028 // check r-d cost 3029 if( dCost < dBestCost ) 3030 { 3031 uiBestDist = uiDist; 3032 dBestCost = dCost; 3033 uiBestDISType = pcCU->getDISType(0); 3034 // copy reconstruction 3035 pcPredYuv->copyPartToPartYuv(pcRecoYuv, 0, uiWidth, uiHeight); 3036 } 3037 } 3038 3039 3040 pcCU->setDISTypeSubParts(uiBestDISType, 0, 0, uiDepth); 3041 assert(uiBestDISType >= 0); 3042 3043 //===== reset context models ===== 3044 m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]); 3045 3046 //===== set distortion (rate and r-d costs are determined later) ===== 3047 pcCU->getTotalDistortion() = uiBestDist; 3048 } 3049 #else 2863 3050 #if H_3D_SINGLE_DEPTH 2864 3051 Void … … 2950 3137 2951 3138 #endif 3139 #endif 3140 2952 3141 Void 2953 3142 TEncSearch::estIntraPredQT( TComDataCU* pcCU, … … 7261 7450 } 7262 7451 m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true ); 7452 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 7453 m_pcEntropyCoder->encodeDIS ( pcCU, 0, true ); 7454 #else 7263 7455 #if H_3D_SINGLE_DEPTH 7264 7456 m_pcEntropyCoder->encodeSingleDepthMode ( pcCU, 0, true ); 7457 #endif 7265 7458 #endif 7266 7459 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncSearch.h
r1084 r1145 191 191 TComYuv* pcRecoYuv, 192 192 UInt uiPreCalcDistC ); 193 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 194 Void estIntraPredDIS ( TComDataCU* pcCU, 195 TComYuv* pcOrgYuv, 196 TComYuv* pcPredYuv, 197 TComYuv* pcResiYuv, 198 TComYuv* pcRecoYuv, 199 UInt& ruiDistC, 200 Bool bLumaOnly ); 201 #else 193 202 #if H_3D_SINGLE_DEPTH 194 203 Void estIntraPredSingleDepth ( TComDataCU* pcCU, … … 199 208 UInt& ruiDistC, 200 209 Bool bLumaOnly ); 201 #endif 210 #endif 211 #endif 202 212 203 213 /// encoder estimation - inter prediction (non-skip) … … 354 364 UInt uiAbsPartIdx, 355 365 UInt stateU0V1Both2 ); 366 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 367 Void xIntraCodingDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode ); 368 #else 356 369 #if H_3D_SINGLE_DEPTH 357 370 Void xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel * DepthNeighbor ); 371 #endif 358 372 #endif 359 373 #if H_3D_DIM
Note: See TracChangeset for help on using the changeset viewer.