Changeset 1179 in 3DVCSoftware for trunk/source/Lib/TLibCommon
- Timestamp:
- 7 Apr 2015, 17:05:30 (10 years ago)
- Location:
- trunk/source/Lib/TLibCommon
- Files:
-
- 55 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/AccessUnit.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/CommonDef.h
r1134 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/ContextModel.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/ContextModel.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/ContextModel3DBuffer.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/ContextModel3DBuffer.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/ContextTables.h
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 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] = -
trunk/source/Lib/TLibCommon/NAL.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/SEI.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/SEI.h
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComBitCounter.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComBitStream.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComBitStream.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComCABACTables.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComCABACTables.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 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 ); … … 2323 2388 Int iPictureHeight = depthPicYuv->getHeight(); 2324 2389 2390 #if !HS_DBBP_CLEAN_K0048 2325 2391 Int iWidth = uiWidth; 2326 2392 Int iHeight = uiHeight; 2393 #endif 2327 2394 2328 2395 Bool depthRefineFlag = false; … … 2337 2404 } 2338 2405 2406 #if HS_DBBP_CLEAN_K0048 2407 Int depthPosX = Clip3(0, iPictureWidth - 1, iBlkX + ((cDv.getHor()+2)>>2)); 2408 Int depthPosY = Clip3(0, iPictureHeight - 1, iBlkY + ((cDv.getVer()+2)>>2)); 2409 #else 2339 2410 Int depthPosX = Clip3(0, iPictureWidth - iWidth, iBlkX + ((cDv.getHor()+2)>>2)); 2340 2411 Int depthPosY = Clip3(0, iPictureHeight- iHeight, iBlkY + ((cDv.getVer()+2)>>2)); 2412 #endif 2341 2413 2342 2414 pDepthPels = depthPicYuv->getLumaAddr() + depthPosX + depthPosY * uiDepthStride; … … 2382 2454 Void TComDataCU::setCbfSubParts( UInt uiCbf, TextType eTType, UInt uiAbsPartIdx, UInt uiDepth ) 2383 2455 { 2456 2384 2457 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1); 2385 2458 memset( m_puhCbf[g_aucConvertTxtTypeToIdx[eTType]] + uiAbsPartIdx, uiCbf, sizeof( UChar ) * uiCurrPartNumb ); … … 2427 2500 memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2428 2501 } 2502 2503 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2504 Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt absPartIdx, UInt depth ) 2505 { 2506 assert( sizeof( *m_bDISFlag) == 1 ); 2507 memset( m_bDISFlag + absPartIdx, bDIS, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2508 } 2509 2510 Void TComDataCU::setDISTypeSubParts(UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 2511 { 2512 setSubPartT( uiDISType, m_uiDISType, uiAbsPartIdx, uiDepth, uiPUIdx ); 2513 } 2514 #else 2429 2515 #if H_3D_SINGLE_DEPTH 2430 2516 Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth ) … … 2439 2525 } 2440 2526 #endif 2527 #endif 2528 2441 2529 Void TComDataCU::setPredModeSubParts( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ) 2442 2530 { … … 4109 4197 } 4110 4198 } 4199 #if !SHARP_SUBBLOCK_CLEAN_K0044 4111 4200 if (iPUHeight + iPUWidth == 12) 4112 4201 { … … 4117 4206 } 4118 4207 } 4208 #endif 4119 4209 4120 4210 iPartition ++; … … 5332 5422 } 5333 5423 5424 #if SONY_MV_V_CONST_C0078 5425 Void TComDataCU::checkMV_V (TComMv& rcMv, RefPicList eRefPicList, int iRefIdx ) 5426 { 5427 if ( getSlice()->getSPS()->getInterViewMvVertConstraintFlag() ) 5428 { 5429 if ( getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC() == getSlice()->getPOC() ) 5430 { 5431 //When inter_view_mv_vert_constraint_flag is equal to 1, 5432 //the vertical component of the motion vectors used for inter-layer prediction 5433 //shall be equal to or less than 56 in units of luma samples 5434 assert ( rcMv.getVer() <= (56<<2) ); 5435 } 5436 } 5437 } 5438 #endif 5439 5334 5440 UInt TComDataCU::getIntraSizeIdx(UInt uiAbsPartIdx) 5335 5441 { … … 5674 5780 } 5675 5781 5676 if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) 5782 if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) // CY: this condition equals to both bIsCurrRefLongTerm and bIsColRefLongTerm being 1 5677 5783 { 5678 5784 #if H_3D_TMVP 5785 #if !H_3D_FIX_TMVP_SCALING_VIEW_ID 5679 5786 Int iCurrViewId = m_pcSlice->getViewIndex (); 5680 5787 Int iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewIndex (); 5681 5788 Int iColViewId = pColCU->getSlice()->getViewIndex(); 5682 5789 Int iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewIndex(); 5683 iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId ); 5684 5790 #else 5791 Int iCurrViewId = m_pcSlice->getViewId (); 5792 Int iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId (); 5793 Int iColViewId = pColCU->getSlice()->getViewId(); 5794 Int iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId(); 5795 #endif 5796 #if H_3D_TMVP_SCALING_FIX_K0053 5797 iScale = 4096; 5798 if ( iCurrRefViewId != iCurrViewId && iColViewId != iColRefViewId ) 5799 #endif 5800 iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId ); 5801 #if H_3D_TMVP_FIX_TICKET_97 5802 if ( bMRG && iScale != 4096 && m_pcSlice->getIvMvScalingFlag( ) ) 5803 #else 5685 5804 if ( iScale != 4096 && m_pcSlice->getIvMvScalingFlag( ) ) 5805 #endif 5686 5806 { 5687 5807 rcMv = cColMv.scaleMv( iScale ); … … 5695 5815 #endif 5696 5816 } 5697 else 5817 else // CY: both bIsCurrRefLongTerm and bIsColRefLongTerm are 0 5698 5818 { 5699 5819 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); … … 5860 5980 #endif 5861 5981 #if H_3D_IV_MERGE 5982 #if SEC_ARP_REM_ENC_RESTRICT_K0035 5983 Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5984 #else 5862 5985 Bool TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5986 #endif 5863 5987 { 5864 5988 … … 5876 6000 pDisp->m_acNBDV = cMv; 5877 6001 pDisp->m_aVIdxCan = iViewIdx; 5878 6002 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 5879 6003 return true; 5880 } 6004 #endif 6005 } 6006 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 5881 6007 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 6008 #endif 6009 } 6010 #endif 6011 6012 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 6013 Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index ) 6014 { 6015 #if NEIGHBORING_PIX_AVAILABILITY_FIX 6016 UInt uiPartIdxLT, uiPartIdxRT; 6017 this->deriveLeftRightTopIdxAdi( uiPartIdxLT, uiPartIdxRT, 0, 0 ); 6018 UInt uiMidPart, uiPartNeighbor; 6019 TComDataCU* pcCUNeighbor; 6020 Bool bDepAvail = false; 6021 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 6022 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 6023 6024 Int xP, yP, nPSW, nPSH; 6025 this->getPartPosition( uiPartIdx, xP, yP, nPSW, nPSH ); 6026 6027 switch( index ) 6028 { 6029 case 0: // Mid Left 6030 uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSH>>1) / this->getPic()->getMinCUHeight() * this->getPic()->getNumPartInWidth(); 6031 pcCUNeighbor = this->getPULeft( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] ); 6032 if ( pcCUNeighbor ) 6033 { 6034 if( !this->getSlice()->getPPS()->getConstrainedIntraPred() ) 6035 { 6036 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6037 bDepAvail = true; 6038 } 6039 else if ( pcCUNeighbor->getPredictionMode( uiPartNeighbor ) == MODE_INTRA ) 6040 { 6041 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6042 bDepAvail = true; 6043 } 6044 } 6045 break; 6046 case 1: // Mid Above 6047 uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSW>>1) / this->getPic()->getMinCUWidth(); 6048 pcCUNeighbor = this->getPUAbove( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] ); 6049 if( pcCUNeighbor ) 6050 { 6051 if( !this->getSlice()->getPPS()->getConstrainedIntraPred() ) 6052 { 6053 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6054 bDepAvail = true; 6055 } 6056 else if ( pcCUNeighbor->getPredictionMode( uiPartNeighbor ) == MODE_INTRA ) 6057 { 6058 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6059 bDepAvail = true; 6060 } 6061 } 6062 break; 6063 default: 6064 break; 6065 } 6066 6067 return bDepAvail; 6068 #else 5889 6069 Bool bDepAvail = false; 5890 6070 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); … … 5912 6092 break; 5913 6093 default: 6094 break; 6095 } 6096 return bDepAvail; 6097 #endif 6098 } 6099 #else 6100 #if H_3D_SINGLE_DEPTH 6101 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index) 6102 { 6103 6104 Bool bDepAvail = false; 6105 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 6106 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 6107 6108 Int xP, yP, nPSW, nPSH; 6109 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 6110 UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight(); 6111 UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth(); 6112 switch(index) 6113 { 6114 case 0: // Mid Left 6115 if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) ) 6116 { 6117 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6118 bDepAvail = true; 6119 } 6120 break; 6121 case 1: // Mid Above 6122 if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) ) 6123 { 6124 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6125 bDepAvail = true; 6126 } 6127 break; 6128 default: 5914 6129 break; 5915 6130 } 5916 6131 return bDepAvail; 5917 6132 } 5918 5919 #endif 6133 #endif 6134 #endif 6135 5920 6136 #if H_3D_NBDV 5921 6137 //Notes from QC: … … 5923 6139 //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 6140 //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 6141 #if SEC_ARP_REM_ENC_RESTRICT_K0035 6142 Void TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo 6143 #else 5925 6144 Bool TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo 6145 #endif 5926 6146 #if H_3D_NBDV_REF 5927 6147 , Bool bDepthRefine … … 5931 6151 //// ******* Init variables ******* ///// 5932 6152 // Init disparity struct for results 6153 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 5933 6154 pDInfo->bDV = false; 6155 #endif 5934 6156 pDInfo->m_aVIdxCan = -1; 5935 6157 … … 6026 6248 pDInfo->m_acDoNBDV = cColMv; 6027 6249 #endif //H_3D_NBDV_REF 6250 #if SEC_ARP_REM_ENC_RESTRICT_K0035 6251 return; 6252 #else 6028 6253 return true; 6254 #endif 6029 6255 } 6030 6256 } … … 6043 6269 #endif 6044 6270 ) ) 6271 #if SEC_ARP_REM_ENC_RESTRICT_K0035 6272 return; 6273 #else 6045 6274 return true; 6275 #endif 6046 6276 6047 6277 //// ******* Get disparity from above block ******* ///// … … 6055 6285 #endif 6056 6286 ) ) 6287 #if SEC_ARP_REM_ENC_RESTRICT_K0035 6288 return; 6289 #else 6057 6290 return true; 6291 #endif 6058 6292 } 6059 6293 … … 6101 6335 pDInfo->m_acDoNBDV = cDispVec; 6102 6336 #endif 6337 #if SEC_ARP_REM_ENC_RESTRICT_K0035 6338 return; 6339 #else 6103 6340 return true; 6341 #endif 6104 6342 } 6105 6343 } … … 6137 6375 pDInfo->m_acDoNBDV = defaultDV; 6138 6376 #endif 6377 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6139 6378 return true; 6140 } 6379 #endif 6380 } 6381 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6141 6382 return false; 6383 #endif 6142 6384 } 6143 6385 … … 6712 6954 6713 6955 } 6956 #if !SHARP_SUBBLOCK_CLEAN_K0044 6714 6957 if (iSPHeight + iSPWidth == 12) 6715 6958 { … … 6720 6963 } 6721 6964 } 6965 #endif 6722 6966 iPartition ++; 6723 6967 } … … 6752 6996 Int iBaseAbsPartIdx; 6753 6997 6998 #if SEC_SHIFTED_IVMC_POS_K0036 6999 Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth * 2 ); 7000 Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2 ); 7001 #else 6754 7002 Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 ); 6755 7003 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 ); 7004 #endif 6756 7005 6757 7006 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); -
trunk/source/Lib/TLibCommon/TComDataCU.h
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 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 … … 308 313 TComPic* getPic () { return m_pcPic; } 309 314 TComSlice* getSlice () { return m_pcSlice; } 315 #if H_3D_DISABLE_CHROMA 316 Void setSlice ( TComSlice* pcSlice) { m_pcSlice = pcSlice; } 317 #endif 310 318 UInt& getAddr () { return m_uiCUAddr; } 311 319 UInt& getZorderIdxInCU () { return m_uiAbsIdxInLCU; } … … 342 350 Void setSkipFlag ( UInt idx, Bool skip) { m_skipFlag[idx] = skip; } 343 351 Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth ); 352 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 353 Bool* getDISFlag () { return m_bDISFlag; } 354 Bool getDISFlag ( UInt idx) { return m_bDISFlag[idx]; } 355 Void setDISFlag ( UInt idx, Bool bDIS) { m_bDISFlag[idx] = bDIS; } 356 Void setDISFlagSubParts ( Bool bDIS, UInt absPartIdx, UInt depth ); 357 358 UInt* getDISType () { return m_uiDISType; } 359 UInt getDISType ( UInt idx) { return m_uiDISType[idx]; } 360 Void getDISType ( UInt idx, UInt uiDISType) { m_uiDISType[idx] = uiDISType; } 361 Void setDISTypeSubParts ( UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ); 362 #else 344 363 #if H_3D_SINGLE_DEPTH 345 364 Bool* getSingleDepthFlag () { return m_singleDepthFlag; } … … 353 372 Void setSingleDepthValueSubParts (Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ); 354 373 #endif 374 #endif 355 375 Char* getPredictionMode () { return m_pePredMode; } 356 376 PredMode getPredictionMode ( UInt uiIdx ) { return static_cast<PredMode>( m_pePredMode[uiIdx] ); } … … 418 438 UChar getCbf ( UInt uiIdx, TextType eType ) { return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx]; } 419 439 UChar* getCbf ( TextType eType ) { return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]]; } 440 420 441 UChar getCbf ( UInt uiIdx, TextType eType, UInt uiTrDepth ) { return ( ( getCbf( uiIdx, eType ) >> uiTrDepth ) & 0x1 ); } 421 442 Void setCbf ( UInt uiIdx, TextType eType, UChar uh ) { m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx] = uh; } 443 422 444 Void clearCbf ( UInt uiIdx, TextType eType, UInt uiNumParts ); 423 445 UChar getQtRootCbf ( UInt uiIdx ) { return getCbf( uiIdx, TEXT_LUMA, 0 ) || getCbf( uiIdx, TEXT_CHROMA_U, 0 ) || getCbf( uiIdx, TEXT_CHROMA_V, 0 ); } … … 484 506 ); 485 507 Bool xGetColDisMV ( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 508 #if SEC_ARP_REM_ENC_RESTRICT_K0035 509 Void getDisMvpCandNBDV ( DisInfo* pDInfo 510 #else 486 511 Bool getDisMvpCandNBDV ( DisInfo* pDInfo 512 #endif 487 513 #if H_3D_NBDV_REF 488 514 , Bool bDepthRefine = false … … 491 517 492 518 #if H_3D 519 #if SEC_ARP_REM_ENC_RESTRICT_K0035 520 Void getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 521 #else 493 522 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 523 #endif 494 524 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 495 525 #endif 526 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 527 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 528 #else 496 529 #if H_3D_SINGLE_DEPTH 497 530 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 531 #endif 498 532 #endif 499 533 #if H_3D_NBDV_REF … … 591 625 592 626 Void clipMv ( TComMv& rcMv ); 627 #if SONY_MV_V_CONST_C0078 628 Void checkMV_V (TComMv& rcMv, RefPicList eRefPicList, int iRefIdx ); 629 #endif 593 630 Void getMvPredLeft ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldA.getMv(); } 594 631 Void getMvPredAbove ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldB.getMv(); } -
trunk/source/Lib/TLibCommon/TComInterpolationFilter.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComInterpolationFilter.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComList.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComLoopFilter.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComLoopFilter.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComMotionInfo.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 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 -
trunk/source/Lib/TLibCommon/TComMv.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPattern.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPattern.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPic.cpp
r976 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPic.h
r976 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPicSym.cpp
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPicSym.h
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPicYuv.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPicYuv.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPicYuvMD5.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 630 630 631 631 #if H_3D_DBBP 632 #if HS_DBBP_CLEAN_K0048 633 PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU) 634 #else 632 635 PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize) 636 #endif 633 637 { 634 638 // find virtual partitioning for this CU based on depth block … … 639 643 Int iSumDepth = 0; 640 644 Int iSubSample = 4; 645 #if HS_DBBP_CLEAN_K0048 646 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(); 647 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); 648 TComMv cDv = pcCU->getSlice()->getDepthRefinementFlag( ) ? pcCU->getDvInfo(0).m_acDoNBDV : pcCU->getDvInfo(0).m_acNBDV; 649 if( pcCU->getSlice()->getDepthRefinementFlag( ) ) 650 { 651 cDv.setVer(0); 652 } 653 Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2); 654 Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2); 655 UInt t=0; 656 657 for (Int y=0; y<uiSize; y+=iSubSample) 658 { 659 for (Int x=0; x<uiSize; x+=iSubSample) 660 { 661 if (iBlkX+x>iPictureWidth) 662 { 663 Int depthPel = pDepthPels[t]; 664 iSumDepth += depthPel; 665 } 666 else 667 { 668 Int depthPel = pDepthPels[x]; 669 t=x; 670 iSumDepth += depthPel; 671 } 672 } 673 674 // next row 675 if (!(iBlkY+y+4>iPictureHeight)) 676 pDepthPels += uiDepthStride*iSubSample; 677 #else 641 678 for (Int y=0; y<uiSize; y+=iSubSample) 642 679 { … … 650 687 // next row 651 688 pDepthPels += uiDepthStride*iSubSample; 689 #endif 652 690 } 653 691 … … 667 705 for (Int x=0; x<uiSize; x+=iSubSample) 668 706 { 707 #if HS_DBBP_CLEAN_K0048 708 Int depthPel = 0; 709 if (iBlkX+x>iPictureWidth) 710 { 711 depthPel = pDepthPels[t]; 712 } 713 else 714 { 715 depthPel = pDepthPels[x]; 716 t=x; 717 } 718 #else 669 719 Int depthPel = pDepthPels[x]; 720 #endif 670 721 671 722 // decide which segment this pixel belongs to … … 696 747 697 748 // next row 749 #if HS_DBBP_CLEAN_K0048 750 if (!(iBlkY+y+4>iPictureHeight)) 751 #endif 698 752 pDepthPels += uiDepthStride*iSubSample; 699 753 } … … 719 773 } 720 774 775 #if HS_DBBP_CLEAN_K0048 776 Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU) 777 #else 721 778 Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask ) 779 #endif 722 780 { 723 781 // segmentation of texture block --> mask IDs 724 782 Pel* pDepthBlockStart = pDepthPels; 725 783 726 784 // first compute average of depth block for thresholding 727 785 Int iSumDepth = 0; 728 786 Int uiMinDepth = MAX_INT; 729 787 Int uiMaxDepth = 0; 730 788 #if HS_DBBP_CLEAN_K0048 789 uiMinDepth = pDepthPels[ 0 ]; 790 uiMaxDepth = pDepthPels[ 0 ]; 791 iSumDepth = pDepthPels[ 0 ]; 792 UInt t=0; 793 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(); 794 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); 795 TComMv cDv = pcCU->getSlice()->getDepthRefinementFlag( ) ? pcCU->getDvInfo(0).m_acDoNBDV : pcCU->getDvInfo(0).m_acNBDV; 796 if( pcCU->getSlice()->getDepthRefinementFlag( ) ) 797 { 798 cDv.setVer(0); 799 } 800 Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2); 801 Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2); 802 if (iBlkX>(Int)(iPictureWidth - uiWidth)) 803 { 804 iSumDepth += pDepthPels[ iPictureWidth - iBlkX - 1 ]; 805 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]); 806 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]); 807 } 808 else 809 { 810 iSumDepth += pDepthPels[ uiWidth - 1 ]; 811 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiWidth - 1 ]); 812 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiWidth - 1 ]); 813 } 814 if (iBlkY>(Int)(iPictureHeight - uiHeight)) 815 { 816 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]; 817 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]); 818 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]); 819 } 820 else 821 { 822 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) ]; 823 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]); 824 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]); 825 } 826 if (iBlkY>(Int)(iPictureHeight - uiHeight) && iBlkX>(Int)(iPictureWidth - uiWidth)) 827 { 828 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]; 829 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]); 830 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]); 831 } 832 else if (iBlkY>(Int)(iPictureHeight - uiHeight)) 833 { 834 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]; 835 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]); 836 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]); 837 } 838 else if (iBlkX>(Int)(iPictureWidth - uiWidth)) 839 { 840 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]; 841 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]); 842 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]); 843 } 844 else 845 { 846 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]; 847 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 848 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 849 } 850 #else 731 851 iSumDepth = pDepthPels[ 0 ]; 732 852 iSumDepth += pDepthPels[ uiWidth - 1 ]; … … 743 863 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]); 744 864 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 745 746 865 #endif 866 747 867 // don't generate mask for blocks with small depth range (encoder decision) 748 868 if( uiMaxDepth - uiMinDepth < 10 ) … … 750 870 return false; 751 871 } 752 872 753 873 AOF(uiWidth==uiHeight); 754 874 Int iMean = iSumDepth >> 2; 755 875 756 876 // start again for segmentation 757 877 pDepthPels = pDepthBlockStart; 758 878 759 879 Bool bInvertMask = pDepthPels[0]>iMean; // top-left segment needs to be mapped to partIdx 0 760 880 761 881 // generate mask 762 882 UInt uiSumPix[2] = {0,0}; … … 765 885 for (Int x=0; x<uiHeight; x++) 766 886 { 887 #if HS_DBBP_CLEAN_K0048 888 Int depthPel = 0; 889 if (iBlkX+x>iPictureWidth) 890 { 891 depthPel = pDepthPels[t]; 892 } 893 else 894 { 895 depthPel = pDepthPels[x]; 896 t=x; 897 } 898 #else 767 899 Int depthPel = pDepthPels[x]; 768 900 #endif 901 769 902 // decide which segment this pixel belongs to 770 903 Int ucSegment = (Int)(depthPel>iMean); 771 904 772 905 if( bInvertMask ) 773 906 { 774 907 ucSegment = 1-ucSegment; 775 908 } 776 909 777 910 // count pixels for each segment 778 911 uiSumPix[ucSegment]++; 779 912 780 913 // set mask value 781 914 pMask[x] = (Bool)ucSegment; 782 915 } 783 916 784 917 // next row 785 pDepthPels += uiDepthStride; 918 #if HS_DBBP_CLEAN_K0048 919 if (!(iBlkY+y+1>iPictureHeight)) 920 #endif 921 pDepthPels += uiDepthStride; 786 922 pMask += MAX_CU_SIZE; 787 923 } 788 924 789 925 // don't generate valid mask for tiny segments (encoder decision) 790 926 // each segment needs to cover at least 1/8th of block … … 794 930 return false; 795 931 } 796 932 797 933 // all good 798 934 return true; … … 1157 1293 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 1158 1294 pcCU->clipMv(cMv); 1159 1295 #if SONY_MV_V_CONST_C0078 1296 pcCU->checkMV_V(cMv, eRefPicList, iRefIdx ); 1297 #endif 1160 1298 #if H_3D_ARP 1161 1299 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) … … 1255 1393 #if H_3D_NBDV 1256 1394 DisInfo cDistparity; 1395 #if SEC_ARP_REM_ENC_RESTRICT_K0035 1396 cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV; 1397 cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; 1398 #else 1257 1399 cDistparity.bDV = pcCU->getDvInfo(uiPartAddr).bDV; 1258 1400 if( cDistparity.bDV ) … … 1262 1404 cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; 1263 1405 } 1406 #endif 1264 1407 #else 1265 1408 assert(0); // ARP can be applied only when a DV is available 1266 1409 #endif 1267 1410 #if SEC_ARP_REM_ENC_RESTRICT_K0035 1411 UChar dW = pcCU->getARPW ( uiPartAddr ); 1412 #else 1268 1413 UChar dW = cDistparity.bDV ? pcCU->getARPW ( uiPartAddr ) : 0; 1269 1414 #endif 1415 1416 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 1270 1417 if( cDistparity.bDV ) 1418 #endif 1271 1419 { 1272 1420 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); … … 1320 1468 pYuvB0->clear(); pYuvB1->clear(); 1321 1469 } 1322 1470 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 1323 1471 assert ( cDistparity.bDV ); 1324 1472 #endif 1325 1473 TComMv cNBDV = cDistparity.m_acNBDV; 1326 1474 pcCU->clipMv( cNBDV ); -
trunk/source/Lib/TLibCommon/TComPrediction.h
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 175 175 176 176 #if H_3D_DBBP 177 #if HS_DBBP_CLEAN_K0048 178 PartSize getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU); 179 Bool getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU); 180 #else 177 181 PartSize getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize); 178 182 Bool getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask ); 183 #endif 179 184 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize ); 180 185 #endif -
trunk/source/Lib/TLibCommon/TComRdCost.cpp
r884 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 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 ) -
trunk/source/Lib/TLibCommon/TComRdCost.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 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 -
trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComRom.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 391 391 Bool g_tracePU = false; 392 392 Bool g_traceTU = false; 393 Bool g_disableNumbering = false; 393 394 Bool g_disableHLSTrace = false; 394 UInt64 g_stopAtCounter = 0;395 UInt64 g_stopAtCounter = 937234; 395 396 Bool g_traceCopyBack = false; 396 397 Bool g_decTraceDispDer = false; 397 398 Bool g_decTraceMvFromMerge = false; 398 399 Bool g_decTracePicOutput = false; 399 Bool g_stopAtPos = false; 400 Bool g_outputPos = false; 400 Bool g_stopAtPos = true; 401 Bool g_outputPos = true; 402 Bool g_traceCameraParameters = false; 403 Bool g_encNumberOfWrittenBits = true; 401 404 #endif 402 405 #endif … … 600 603 601 604 Bool stopFlag = false; 602 if ( g_stopAtPos && poc == 0 && layerId == 1)605 if ( g_stopAtPos && poc == 0 && layerId == 2 ) 603 606 { 604 607 Bool stopAtCU = true; 605 608 if ( stopAtCU ) // Stop at CU with specific size 606 609 { 607 stopFlag = ( cuPelX == 888 ) && ( cuPelY == 248 ) && ( cuWidth == 8 ) && ( cuHeight == 8);610 stopFlag = ( cuPelX == 0 ) && ( cuPelY == 0 ) && ( cuWidth == 8 ) && ( cuHeight == 8 ); 608 611 } 609 612 else … … 633 636 std::cout << "Break point here." << std::endl; 634 637 } 635 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 638 if ( !g_disableNumbering ) 639 { 640 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 641 } 636 642 fprintf( g_hTrace, "%-50s : %d\n", symbolName, val ); 637 643 fflush ( g_hTrace ); … … 739 745 assert( uiWidth == uiHeight ); 740 746 747 #if SHARP_DMM_CLEAN_K0042 748 Int posStart = 0, posEnd = 0; 749 #else 741 750 UChar uhStartX = 0, uhStartY = 0, uhEndX = 0, uhEndY = 0; 742 751 Int iStepStartX = 0, iStepStartY = 0, iStepEndX = 0, iStepEndY = 0; 752 #endif 743 753 744 754 UInt uiBlockSize = 0; … … 752 762 for( UInt uiOri = 0; uiOri < 6; uiOri++ ) 753 763 { 764 #if !SHARP_DMM_CLEAN_K0042 754 765 // init the edge line parameters for each of the 6 wedgelet types 755 766 switch( uiOri ) … … 762 773 case( 5 ): { uhStartX = (uiBlockSize-1); uhStartY = 0; uhEndX = 0; uhEndY = 0; iStepStartX = 0; iStepStartY = +1; iStepEndX = 0; iStepEndY = +1; break; } 763 774 } 764 775 #endif 776 777 #if SHARP_DMM_CLEAN_K0042 778 posEnd = (Int) racWedgeList.size(); 779 if (uiOri == 0 || uiOri == 4) 780 { 781 #endif 765 782 for( Int iK = 0; iK < uiBlockSize; iK += (uiWidth>=16 ?2:1)) 766 783 { 767 784 for( Int iL = 0; iL < uiBlockSize; iL += ((uiWidth>=16 && uiOri<4)?2:1) ) 768 785 { 786 #if SHARP_DMM_CLEAN_K0042 787 Int xS = iK; 788 Int yS = 0; 789 Int xE = (uiOri == 0) ? 0 : iL; 790 Int yE = (uiOri == 0) ? iL : uiBlockSize - 1; 791 cTempWedgelet.setWedgelet( xS, yS, xE, yE, uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 792 #else 769 793 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 794 #endif 770 795 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 771 796 } 772 797 } 798 #if SHARP_DMM_CLEAN_K0042 799 } 800 else 801 { 802 for (Int pos = posStart; pos < posEnd; pos++) 803 { 804 cTempWedgelet.generateWedgePatternByRotate(racWedgeList[pos], uiOri); 805 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 806 } 807 } 808 posStart = posEnd; 809 #endif 773 810 } 774 811 -
trunk/source/Lib/TLibCommon/TComRom.h
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 230 230 231 231 #ifndef ENC_DEC_TRACE 232 #define ENC_DEC_TRACE 0 232 #define ENC_DEC_TRACE 0 233 233 #endif 234 234 … … 257 257 extern Bool g_traceTU; 258 258 extern Bool g_disableHLSTrace; // USE g_HLSTraceEnable to toggle HLS trace. Not this one! 259 extern Bool g_disableNumbering; // Don't print numbers to trace file 259 260 extern UInt64 g_stopAtCounter; // Counter to set breakpoint. 260 261 extern Bool g_traceCopyBack; // Output samples on copy back … … 264 265 extern Bool g_stopAtPos; // Stop at position 265 266 extern Bool g_outputPos; // Output position 267 extern Bool g_traceCameraParameters; // Trace camera parameters 268 extern Bool g_encNumberOfWrittenBits;// Trace number of written bits 266 269 267 270 #define DTRACE_CU(x,y) writeToTraceFile( x,y, g_traceCU ); -
trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
r964 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h
r964 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 137 137 #endif 138 138 #if H_3D 139 #if HHI_INTER_COMP_PRED_K0052 140 , m_inCmpPredFlag ( false ) 141 #endif 142 #if HHI_CAM_PARA_K0052 143 , m_numViews ( 0 ) 144 #endif 139 145 , m_depthToDisparityB ( NULL ) 140 146 , m_depthToDisparityF ( NULL ) 141 147 #endif 148 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 149 , m_bApplyDIS (false) 150 #else 142 151 #if H_3D_SINGLE_DEPTH 143 152 , m_bApplySingleDepthMode (false) 153 #endif 144 154 #endif 145 155 #endif … … 181 191 m_iDefaultRefViewIdx = -1; 182 192 m_bDefaultRefViewIdxAvailableFlag = false; 193 #if HHI_INTER_COMP_PRED_K0052 194 m_ivMvPredFlag = false; 195 m_ivMvScalingFlag = false; 196 m_ivResPredFlag = false; 197 m_depthRefinementFlag = false; 198 m_viewSynthesisPredFlag = false; 199 m_depthBasedBlkPartFlag = false; 200 m_mpiFlag = false; 201 m_intraContourFlag = false; 202 m_intraSdcWedgeFlag = false; 203 m_qtPredFlag = false; 204 m_interSdcFlag = false; 205 m_depthIntraSkipFlag = false; 206 m_subPbSize = 1 << 6; 207 m_mpiSubPbSize = 1 << 6; 208 #endif 183 209 } 184 210 … … 188 214 m_puiSubstreamSizes = NULL; 189 215 #if H_3D 216 #if HHI_CAM_PARA_K0052 217 for( UInt i = 0; i < m_numViews; i++ ) 218 #else 190 219 for( UInt i = 0; i < getViewIndex(); i++ ) 220 #endif 191 221 { 192 222 if ( m_depthToDisparityB && m_depthToDisparityB[ i ] ) … … 198 228 { 199 229 delete[] m_depthToDisparityF [ i ]; 200 }230 } 201 231 } 202 232 … … 575 605 Int i; 576 606 607 #if HHI_RES_PRED_K0052 608 m_pocsInCurrRPSs.clear(); 609 #endif 610 577 611 for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++) 578 612 { … … 585 619 NumPocStCurr0++; 586 620 pcRefPic->setCheckLTMSBPresent(false); 621 #if HHI_RES_PRED_K0052 622 m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 623 #endif 587 624 } 588 625 } … … 598 635 NumPocStCurr1++; 599 636 pcRefPic->setCheckLTMSBPresent(false); 637 #if HHI_RES_PRED_K0052 638 m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 639 #endif 600 640 } 601 641 } … … 610 650 RefPicSetLtCurr[NumPocLtCurr] = pcRefPic; 611 651 NumPocLtCurr++; 652 #if HHI_RES_PRED_K0052 653 m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 654 #endif 612 655 } 613 656 if(pcRefPic==NULL) … … 619 662 620 663 Int numPocInterCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; 664 #if HHI_RES_PRED_K0052 665 assert( numPocInterCurr == (Int) m_pocsInCurrRPSs.size() ); 666 #endif 621 667 numPocTotalCurr = numPocInterCurr + getNumActiveRefLayerPics( ); 622 668 assert( numPocTotalCurr == getNumRpsCurrTempList() ); … … 791 837 Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset ) 792 838 { 839 #if HHI_CAM_PARA_K0052 840 Int voiInVps = m_pcVPS->getVoiInVps(getViewIndex() ); 841 if( m_pcVPS->getNumCp( voiInVps ) > 0 ) 842 { 843 if( m_pcVPS->getCpInSliceSegmentHeaderFlag( voiInVps ) ) 844 { 845 for( Int m = 0; m < m_pcVPS->getNumCp( voiInVps ); m++ ) 846 { 847 Int j = m_pcVPS->getCpRefVoi( voiInVps, m ); 848 Int jInVps = m_pcVPS->getVoiInVps( j ); 849 850 setCpScale ( jInVps , aaiScale [ jInVps ][ voiInVps ]); 851 setCpInvScale( jInVps , aaiScale [ voiInVps ][ jInVps ]); 852 setCpOff ( jInVps , aaiOffset[ jInVps ][ voiInVps ]); 853 setCpInvOff ( jInVps , aaiOffset[ voiInVps ][ jInVps ]); 854 } 855 } 856 } 857 #else 793 858 if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) ) 794 859 { … … 801 866 } 802 867 } 868 #endif 803 869 } 804 870 #endif … … 1099 1165 } 1100 1166 #endif 1167 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1168 m_bApplyDIS = pSrc->m_bApplyDIS; 1169 #else 1101 1170 #if H_3D_SINGLE_DEPTH 1102 1171 m_bApplySingleDepthMode = pSrc->m_bApplySingleDepthMode; 1172 #endif 1103 1173 #endif 1104 1174 #if H_3D_IC … … 2147 2217 { 2148 2218 m_numViews = 1; 2149 #if HHI_VIEW_ID_LIST_I5_J0107 2219 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052 2150 2220 #if H_3D 2151 2221 AOF( m_viewOIdxList.size() == 0 ); 2222 2152 2223 m_viewOIdxList.push_back( 0 ); 2153 2224 #endif … … 2170 2241 { 2171 2242 m_numViews++; 2172 #if HHI_VIEW_ID_LIST_I5_J0107 2243 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052 2173 2244 #if H_3D 2174 2245 m_viewOIdxList.push_back( getViewOrderIdx( lId ) ); … … 2210 2281 Int i = 0, j = 0; 2211 2282 2283 #if HHI_CAM_PARA_K0052 2284 m_numCp = new Int [ iNumViews ]; 2285 m_cpRefVoi = new Int*[ iNumViews ]; 2286 m_cpInSliceSegmentHeaderFlag = new Bool[ iNumViews ]; 2287 2288 m_cpPresentFlag = new Bool*[ iNumViews ]; 2289 #else 2212 2290 m_bCamParPresent = new Bool[ iNumViews ]; 2213 2291 m_bCamParInSliceHeader = new Bool[ iNumViews ]; 2292 #endif 2293 2214 2294 2215 2295 m_aaaiCodedScale = new Int**[ iNumViews ]; … … 2217 2297 for ( i = 0; i < iNumViews ; i++ ) 2218 2298 { 2299 #if HHI_CAM_PARA_K0052 2300 m_cpInSliceSegmentHeaderFlag[i] = false; 2301 #else 2219 2302 m_bCamParPresent[i] = false; 2220 2303 m_bCamParInSliceHeader[i] = false; 2304 #endif 2305 2221 2306 m_aaaiCodedScale[i] = new Int*[ 2 ]; 2222 2307 m_aaaiCodedOffset[i] = new Int*[ 2 ]; 2308 2309 #if HHI_CAM_PARA_K0052 2310 m_numCp [i] = 0; 2311 m_cpRefVoi[i] = new Int[ iNumViews ]; 2312 m_cpPresentFlag[i] = new Bool[ iNumViews ]; 2313 for ( j = 0; j < iNumViews; j++) 2314 { 2315 m_cpRefVoi[i][j] = 0; 2316 m_cpPresentFlag[i][j] = false; 2317 } 2318 #endif 2223 2319 for ( j = 0; j < 2; j++ ) 2224 2320 { … … 2239 2335 Int i = 0, j = 0; 2240 2336 2337 #if !HHI_CAM_PARA_K0052 2241 2338 if ( m_bCamParPresent != NULL ) 2242 2339 { … … 2247 2344 delete [] m_bCamParInSliceHeader; 2248 2345 } 2346 #else 2347 if ( m_numCp != NULL ) 2348 { 2349 delete [] m_numCp; 2350 } 2351 2352 if ( m_cpRefVoi != NULL ) 2353 { 2354 for ( i = 0; i < iNumViews ; i++ ) 2355 { 2356 delete [] m_cpRefVoi[i]; 2357 } 2358 delete[] m_cpRefVoi; 2359 } 2360 2361 if ( m_cpPresentFlag != NULL ) 2362 { 2363 for ( i = 0; i < iNumViews ; i++ ) 2364 { 2365 delete [] m_cpPresentFlag[i]; 2366 } 2367 delete[] m_cpPresentFlag; 2368 } 2369 2370 2371 if ( m_cpInSliceSegmentHeaderFlag != NULL ) 2372 { 2373 delete [] m_cpInSliceSegmentHeaderFlag; 2374 } 2375 #endif 2376 2249 2377 2250 2378 if ( m_aaaiCodedScale != NULL ) … … 2276 2404 2277 2405 2278 Void 2279 2406 #if !HHI_CAM_PARA_K0052 2407 Void TComVPS::initCamParaVPS( UInt uiViewIndex, Bool bCamParPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 2280 2408 { 2281 2409 AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); … … 2296 2424 } 2297 2425 } 2426 #endif 2298 2427 2299 2428 #endif // H_3D … … 2730 2859 #endif 2731 2860 #if H_3D 2861 #if !HHI_CAM_PARA_K0052 2732 2862 , m_bCamParInSliceHeader (false) 2863 #endif 2733 2864 #endif 2734 2865 { … … 3754 3885 { 3755 3886 Int layerIdInNuh = getRefPicLayerId( i ); 3887 #if HHI_RES_PRED_K0052 3888 TComPic* picV = getIvPic( getIsDepth(), getVPS()->getViewIndex( layerIdInNuh ) ); 3889 assert( picV != NULL ); 3890 std::vector<Int> pocsInCurrRPSsPicV = picV->getSlice(0)->getPocsInCurrRPSs(); 3891 Bool refRpRefAvailFlag = false; 3892 for (Int idx = 0; idx < pocsInCurrRPSsPicV.size(); idx++) 3893 { 3894 if ( pocsInCurrRPSsPicV[idx] == prevPOC ) 3895 { 3896 refRpRefAvailFlag = true; 3897 break; 3898 } 3899 } 3900 3901 if (getFirstTRefIdx(eRefPicList) >= 0 && refRpRefAvailFlag ) 3902 #else 3756 3903 Int viewIdx = getVPS()->getViewId( layerIdInNuh ); 3757 3904 TComPic*pcPicPrev = ivPicLists->getPic(viewIdx, 0, prevPOC); 3758 3905 if (getFirstTRefIdx(eRefPicList) >= 0 && pcPicPrev && pcPicPrev->getSlice( 0 )->isReferenced()) 3906 #endif 3759 3907 { 3760 3908 m_arpRefPicAvailable[eRefPicList][layerIdInNuh] = true; … … 3929 4077 #if H_3D_NBDV_REF 3930 4078 setupLUT = setupLUT || getDepthRefinementFlag( ); 3931 #endif 4079 #endif 3932 4080 3933 4081 #if H_3D_IV_MERGE … … 3939 4087 return; 3940 4088 4089 #if HHI_CAM_PARA_K0052 4090 m_numViews = getVPS()->getNumViews(); 4091 #endif 3941 4092 /// GT: Allocation should be moved to a better place later; 3942 4093 if ( m_depthToDisparityB == NULL ) 3943 4094 { 4095 #if HHI_CAM_PARA_K0052 4096 m_depthToDisparityB = new Int*[ m_numViews ]; 4097 for ( Int i = 0; i < getVPS()->getNumViews(); i++ ) 4098 #else 3944 4099 m_depthToDisparityB = new Int*[ getViewIndex() ]; 3945 4100 for ( Int i = 0; i < getViewIndex(); i++ ) 4101 #endif 3946 4102 { 3947 4103 m_depthToDisparityB[ i ] = new Int[ Int(1 << g_bitDepthY) ]; … … 3949 4105 } 3950 4106 4107 3951 4108 if ( m_depthToDisparityF == NULL ) 3952 4109 { 4110 #if HHI_CAM_PARA_K0052 4111 m_depthToDisparityF = new Int*[ m_numViews ]; 4112 for ( Int i = 0; i < m_numViews; i++ ) 4113 #else 3953 4114 m_depthToDisparityF= new Int*[ getViewIndex() ]; 3954 4115 for ( Int i = 0; i < getViewIndex(); i++ ) 4116 #endif 3955 4117 { 3956 4118 m_depthToDisparityF[ i ] = new Int[ Int(1 << g_bitDepthY) ]; … … 3963 4125 TComVPS* vps = getVPS(); 3964 4126 4127 #if HHI_CAM_PARA_K0052 4128 Int log2Div = g_bitDepthY - 1 + vps->getCpPrecision(); 4129 Int voiInVps = vps->getVoiInVps( getViewIndex() ); 4130 Bool camParaSH = vps->getCpInSliceSegmentHeaderFlag( voiInVps ); 4131 4132 Int* codScale = camParaSH ? m_aaiCodedScale [ 0 ] : vps->getCodedScale ( voiInVps ); 4133 Int* codOffset = camParaSH ? m_aaiCodedOffset[ 0 ] : vps->getCodedOffset ( voiInVps ); 4134 Int* invCodScale = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( voiInVps ); 4135 Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( voiInVps ); 4136 4137 4138 for (Int i = 0; i < voiInVps; i++) 4139 { 4140 Int iInVoi = vps->getVoiInVps( i ); 4141 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 4142 if ( g_traceCameraParameters ) 4143 { 4144 std::cout << std::endl << "Cp: " << codScale [ iInVoi ] << " " << codOffset[ iInVoi ] << " " 4145 << invCodScale[ iInVoi ] << " " << invCodOffset[ iInVoi ] << " " << log2Div; 4146 } 4147 #endif 4148 for ( Int d = 0; d <= ( ( 1 << g_bitDepthY ) - 1 ); d++ ) 4149 { 4150 Int offset = ( codOffset [ iInVoi ] << g_bitDepthY ) + ( ( 1 << log2Div ) >> 1 ); 4151 m_depthToDisparityB[ iInVoi ][ d ] = ( codScale [ iInVoi ] * d + offset ) >> log2Div; 4152 4153 Int invOffset = ( invCodOffset[ iInVoi ] << g_bitDepthY ) + ( ( 1 << log2Div ) >> 1 ); 4154 m_depthToDisparityF[ iInVoi ][ d ] = ( invCodScale[ iInVoi ] * d + invOffset ) >> log2Div; 4155 } 4156 } 4157 #else 3965 4158 Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision(); 4159 3966 4160 Int viewIndex = getViewIndex(); 3967 4161 … … 3984 4178 } 3985 4179 } 4180 #endif 3986 4181 } 3987 4182 #endif … … 4023 4218 4024 4219 #if H_3D 4025 4026 4220 Void TComSlice::init3dToolParameters() 4027 4221 { 4028 4222 Bool depthFlag = getIsDepth(); 4029 4223 4224 #if !HHI_INTER_COMP_PRED_K0052 4030 4225 Bool depthOfRefViewsAvailFlag = false; 4031 4226 Bool textOfCurViewAvailFlag = false; … … 4072 4267 } 4073 4268 } 4269 4074 4270 4075 4271 Bool lidG0 = ( getLayerId() > 0 ); … … 4088 4284 m_intraSdcWedgeFlag = sps3dExt->getIntraSdcWedgeFlag ( depthFlag ) && lidG0 ; 4089 4285 m_qtPredFlag = sps3dExt->getQtPredFlag ( depthFlag ) && lidG0 && textOfCurViewAvailFlag; 4090 m_interSdcFlag = sps3dExt->getInterSdcFlag ( depthFlag ) && lidG0 ; 4286 m_interSdcFlag = sps3dExt->getInterSdcFlag ( depthFlag ) && lidG0 ; 4287 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 4288 m_depthIntraSkipFlag = sps3dExt->getDepthIntraSkipFlag ( depthFlag ) && lidG0 ; 4289 #else 4091 4290 m_intraSingleFlag = sps3dExt->getIntraSingleFlag ( depthFlag ) && lidG0 ; 4291 #endif 4092 4292 4093 4293 m_subPbSize = lidG0 ? ( 1 << ( sps3dExt->getLog2SubPbSizeMinus3 ( depthFlag ) + 3 ) ) : getSPS()->getMaxCUWidth(); 4094 4294 m_mpiSubPbSize = 1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 ); 4295 #else 4296 Bool nRLLG0 = ( getVPS()->getNumRefListLayers( getLayerId() ) > 0 ); 4297 4298 TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension(); 4299 4300 m_ivMvPredFlag = sps3dExt->getIvMvPredFlag ( depthFlag ) && nRLLG0 ; 4301 m_ivMvScalingFlag = sps3dExt->getIvMvScalingFlag ( depthFlag ) ; 4302 m_ivResPredFlag = sps3dExt->getIvResPredFlag ( depthFlag ) && nRLLG0 ; 4303 #if HHI_CAM_PARA_K0052 4304 m_depthRefinementFlag = sps3dExt->getDepthRefinementFlag ( depthFlag ) && getInCompPredFlag() && m_cpAvailableFlag; 4305 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag() && m_cpAvailableFlag; 4306 #else 4307 m_depthRefinementFlag = sps3dExt->getDepthRefinementFlag ( depthFlag ) && getInCompPredFlag(); 4308 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag(); 4309 #endif 4310 m_depthBasedBlkPartFlag = sps3dExt->getDepthBasedBlkPartFlag( depthFlag ) && getInCompPredFlag(); 4311 m_mpiFlag = sps3dExt->getMpiFlag ( depthFlag ) && getInCompPredFlag(); 4312 m_intraContourFlag = sps3dExt->getIntraContourFlag ( depthFlag ) && getInCompPredFlag(); 4313 m_intraSdcWedgeFlag = sps3dExt->getIntraSdcWedgeFlag ( depthFlag ) ; 4314 m_qtPredFlag = sps3dExt->getQtPredFlag ( depthFlag ) && getInCompPredFlag(); 4315 m_interSdcFlag = sps3dExt->getInterSdcFlag ( depthFlag ) ; 4316 m_depthIntraSkipFlag = sps3dExt->getDepthIntraSkipFlag ( depthFlag ) ; 4317 4318 m_subPbSize = 1 << ( sps3dExt->getLog2SubPbSizeMinus3 ( depthFlag ) + 3 ); 4319 m_mpiSubPbSize = 1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 ); 4320 4321 #endif 4095 4322 4096 4323 #if H_3D_OUTPUT_ACTIVE_TOOLS … … 4098 4325 std::cout << "DepthFlag: :" << getIsDepth() << std::endl; 4099 4326 std::cout << "ViewOrderIdx: :" << getViewIndex() << std::endl; 4327 #if HHI_INTER_COMP_PRED_K0052 4328 std::cout << "InterCmpPredAvailableFlag:" << getInCmpPredAvailFlag() << std::endl; 4329 std::cout << "InterCompPredFlag :" << getInCompPredFlag() << std::endl; 4330 //std::cout << "TextOfCurViewAvailFlag :" << textOfCurViewAvailFlag << std::endl; 4331 #else 4100 4332 std::cout << "DepthOfRefViewsAvailFlag:" << depthOfRefViewsAvailFlag << std::endl; 4101 4333 std::cout << "TextOfCurViewAvailFlag :" << textOfCurViewAvailFlag << std::endl; 4334 #endif 4102 4335 4103 4336 std::cout << "ivMvPredFlag :" << m_ivMvPredFlag << std::endl; … … 4112 4345 std::cout << "qtPredFlag :" << m_qtPredFlag << std::endl; 4113 4346 std::cout << "interSdcFlag :" << m_interSdcFlag << std::endl; 4347 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 4348 std::cout << "depthIntraSkipFlag :" << m_depthIntraSkipFlag << std::endl; 4349 #else 4114 4350 std::cout << "intraSingleFlag :" << m_intraSingleFlag << std::endl; 4351 #endif 4115 4352 std::cout << "subPbSize :" << m_subPbSize << std::endl; 4116 4353 std::cout << "mpiSubPbSize :" << m_mpiSubPbSize << std::endl; -
trunk/source/Lib/TLibCommon/TComSlice.h
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 914 914 // VPS EXTENSION 2 SYNTAX ELEMENTS 915 915 #if H_3D 916 #if HHI_CAM_PARA_K0052 917 Int* m_numCp; 918 Int** m_cpRefVoi; 919 Bool** m_cpPresentFlag; 920 Int m_cpPrecision; 921 Bool* m_cpInSliceSegmentHeaderFlag; 922 #else 916 923 UInt m_uiCamParPrecision; 917 924 Bool* m_bCamParInSliceHeader; 918 925 Bool* m_bCamParPresent; 926 #endif 919 927 Int ***m_aaaiCodedScale ; 920 928 Int ***m_aaaiCodedOffset; 921 929 922 #if HHI_VIEW_ID_LIST_I5_J0107 930 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052 923 931 std::vector<Int> m_viewOIdxList; 924 932 #endif 925 933 #if HHI_INTER_COMP_PRED_K0052 934 std::vector< std::vector<Bool> > m_viewCompLayerPresentFlag; 935 std::vector< std::vector<Int> > m_viewCompLayerId; 936 #endif 926 937 #endif 927 938 … … 1152 1163 Int getNumViews() { return m_numViews; } 1153 1164 Void initNumViews(); 1154 #if HHI_VIEW_ID_LIST_I5_J0107 1165 #if HHI_INTER_COMP_PRED_K0052 1166 #if H_3D 1167 Void initViewCompLayer( ) 1168 { 1169 assert( m_viewCompLayerId.size() == 0 && m_viewCompLayerPresentFlag.size() == 0 ); 1170 for( Int i = 0; i < getNumViews(); i++ ) 1171 { 1172 m_viewCompLayerId .push_back( std::vector<Int>(0) ); 1173 m_viewCompLayerPresentFlag.push_back( std::vector<Bool>(0) ); 1174 1175 for( Int depFlag = 0; depFlag <= 1; depFlag++ ) 1176 { 1177 Int iViewOIdx = getViewOIdxList( i ); 1178 Int layerId = -1; 1179 for( Int j = 0; j <= getMaxLayersMinus1(); j++ ) 1180 { 1181 Int jNuhLId = getLayerIdInNuh( j ); 1182 if( getVpsDepthFlag( jNuhLId ) == ( (Bool) depFlag ) && getViewOrderIdx( jNuhLId ) == iViewOIdx 1183 && getDependencyId( jNuhLId ) == 0 && getAuxId( jNuhLId ) == 0 ) 1184 { 1185 layerId = jNuhLId; 1186 } 1187 } 1188 m_viewCompLayerPresentFlag[ i ].push_back( layerId != -1 ); 1189 m_viewCompLayerId [ i ].push_back( layerId ); 1190 } 1191 } 1192 }; 1193 #endif 1194 #endif 1195 1196 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052 1155 1197 Int getViewOIdxList( Int i ) { return m_viewOIdxList[i]; } 1156 #endif 1157 1198 #if HHI_CAM_PARA_K0052 1199 std::vector<Int> getViewOIdxList( ) { return m_viewOIdxList; } 1200 #endif 1201 #endif 1202 1203 #if HHI_INTER_COMP_PRED_K0052 1204 #if HHI_CAM_PARA_K0052 1205 Int getVoiInVps( Int viewOIdx ) 1206 #else 1207 Int getInvViewOIdxList( Int viewOIdx ) 1208 #endif 1209 { 1210 for ( Int i = 0; i < m_viewOIdxList.size(); i++ ) 1211 { 1212 if ( m_viewOIdxList[ i ] == viewOIdx ) 1213 { 1214 return i; 1215 } 1216 } 1217 assert( 0 ); 1218 return -1; 1219 }; 1220 1221 #if HHI_CAM_PARA_K0052 1222 Bool getViewCompLayerPresentFlag (Int i, Bool d ) { return m_viewCompLayerPresentFlag[ getVoiInVps(i) ][d]; } 1223 Bool getViewCompLayerId (Int i, Bool d ) { return m_viewCompLayerId [ getVoiInVps(i) ][d]; } 1224 #else 1225 Bool getViewCompLayerPresentFlag (Int i, Bool d ) { return m_viewCompLayerPresentFlag[ getInvViewOIdxList(i) ][d]; } 1226 Bool getViewCompLayerId (Int i, Bool d ) { return m_viewCompLayerId [ getInvViewOIdxList(i) ][d]; } 1227 #endif 1228 #endif 1158 1229 Bool getDependencyFlag( Int i, Int j ) { return m_dependencyFlag[i][j]; } 1159 1230 Int getNumDirectRefLayers( Int layerIdInNuh ) { return m_numDirectRefLayers[ layerIdInNuh ]; }; … … 1276 1347 Void createCamPars(Int iNumViews); 1277 1348 Void deleteCamPars(); 1349 #if HHI_CAM_PARA_K0052 1350 Void initCamParaVPS( Int vOIdxInVps, Int numCp, Bool cpInSliceSegmentHeaderFlag, Int* cpRefVoi, Int** aaiScale, Int** aaiOffset ); 1351 #else 1278 1352 Void initCamParaVPS ( UInt uiViewIndex, Bool bCamParPresent = false, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 1353 #endif 1354 1355 #if HHI_CAM_PARA_K0052 1356 1357 Void setCpPrecision( Int val ) { m_cpPrecision = val; } 1358 Int getCpPrecision( ) { return m_cpPrecision; } 1359 1360 Void setNumCp( Int i, Int val ) { m_numCp[i] = val; } 1361 Int getNumCp( Int i ) { return m_numCp[i]; } 1362 1363 Void setCpRefVoi( Int i, Int m, Int val ) { m_cpRefVoi[i][m] = val; } 1364 Int getCpRefVoi( Int i, Int m ) { return m_cpRefVoi[i][m]; } 1365 1366 Void setCpInSliceSegmentHeaderFlag( Int i, Bool flag ) { m_cpInSliceSegmentHeaderFlag[i] = flag; } 1367 Bool getCpInSliceSegmentHeaderFlag( Int i ) { return m_cpInSliceSegmentHeaderFlag[i]; } 1368 1369 Void setVpsCpScale( Int i, Int j, Int val ) { m_aaaiCodedScale [i][0][j] = val; } 1370 Int getVpsCpScale( Int i, Int j ) { return m_aaaiCodedScale[i][0][j]; } 1371 1372 Void setVpsCpOff( Int i, Int j, Int val ) { m_aaaiCodedOffset[i][0][j] = val; } 1373 Int getVpsCpOff( Int i, Int j ) { return m_aaaiCodedOffset[i][0][j]; } 1374 1375 Void setVpsCpInvScale( Int i, Int j, Int val ) { m_aaaiCodedScale[i][1][j] = val; } 1376 Int getVpsCpInvScale( Int i, Int j ) { return m_aaaiCodedScale[i][1][j]; } 1377 1378 Void setVpsCpInvOff( Int i, Int j, Int val ) { m_aaaiCodedOffset[i][1][j] = val; } 1379 Int getVpsCpInvOff( Int i, Int j ) { return m_aaaiCodedOffset[i][1][j]; } 1380 1381 // Derived 1382 Void deriveCpPresentFlag( ) 1383 { 1384 for( Int nInVps = 0; nInVps < getNumViews(); nInVps++ ) 1385 { 1386 for( Int mInVps = 0; mInVps < getNumViews(); mInVps++ ) 1387 { 1388 m_cpPresentFlag[nInVps][mInVps] = 0; 1389 } 1390 } 1391 1392 for( Int n = 1; n < getNumViews(); n++ ) 1393 { 1394 Int iInVps = getVoiInVps( getViewOIdxList( n ) ); 1395 for( Int m = 0; m < getNumCp( iInVps ); m++ ) 1396 { 1397 m_cpPresentFlag[ iInVps ][ getVoiInVps( getCpRefVoi( iInVps, m ) ) ] = 1; 1398 } 1399 } 1400 } 1401 1402 Void setCpPresentFlag( Int i, Int m, Bool flag ) { m_cpPresentFlag[i][m] = flag; } 1403 Bool getCpPresentFlag( Int i, Int m ) { return m_cpPresentFlag[i][m]; } 1404 1405 #else 1279 1406 UInt getCamParPrecision () { return m_uiCamParPrecision; } 1407 1280 1408 Bool getCamParPresent ( Int viewIndex ) { return m_bCamParPresent[viewIndex]; } 1281 1409 Void setCamParPresent ( Int viewIndex, Bool val ) { m_bCamParPresent[viewIndex] = val; } 1282 1410 Bool hasCamParInSliceHeader( Int viewIndex ) { return m_bCamParInSliceHeader[viewIndex]; } 1283 1411 Void setHasCamParInSliceHeader( Int viewIndex, Bool b ) { m_bCamParInSliceHeader[viewIndex] = b; } 1412 #endif 1413 1414 1284 1415 Int* getCodedScale ( Int viewIndex ) { return m_aaaiCodedScale [viewIndex][0]; } 1285 1416 Int* getCodedOffset ( Int viewIndex ) { return m_aaaiCodedOffset[viewIndex][0]; } … … 1574 1705 m_qtPredFlag [d] = false; 1575 1706 m_interSdcFlag [d] = false; 1576 m_intraSingleFlag [d] = false; 1707 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1708 m_depthIntraSkipFlag [d] = false; 1709 #else 1710 m_intraSingleFlag [d] = false; 1711 #endif 1577 1712 } 1578 1713 } … … 1617 1752 Bool getInterSdcFlag( Int d ) { return m_interSdcFlag[d]; } 1618 1753 1754 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1755 Void setDepthIntraSkipFlag( Int d, Bool flag ) { m_depthIntraSkipFlag[d] = flag; } 1756 Bool getDepthIntraSkipFlag( Int d ) { return m_depthIntraSkipFlag[d]; } 1757 #else 1619 1758 Void setIntraSingleFlag( Int d, Bool flag ) { m_intraSingleFlag[d] = flag; } 1620 1759 Bool getIntraSingleFlag( Int d ) { return m_intraSingleFlag[d]; } 1760 #endif 1621 1761 1622 1762 private: … … 1635 1775 Bool m_qtPredFlag [2]; 1636 1776 Bool m_interSdcFlag [2]; 1777 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1778 Bool m_depthIntraSkipFlag [2]; 1779 #else 1637 1780 Bool m_intraSingleFlag [2]; 1781 #endif 1638 1782 }; 1639 1783 … … 1740 1884 #if H_3D 1741 1885 TComSps3dExtension m_sps3dExtension; 1886 #if !HHI_CAM_PARA_K0052 1742 1887 UInt m_uiCamParPrecision; 1743 1888 Bool m_bCamParInSliceHeader; 1889 #endif 1744 1890 Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; 1745 1891 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; … … 1759 1905 Void setChromaFormatIdc (Int i) { m_chromaFormatIdc = i; } 1760 1906 1907 #if H_3D_DISABLE_CHROMA 1908 static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } 1909 static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } 1910 #else 1761 1911 static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc]; } 1762 1912 static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } 1913 #endif 1763 1914 1764 1915 // structure … … 2366 2517 UInt m_nARPStepNum; 2367 2518 Int m_aiFirstTRefIdx [2]; 2519 #if HHI_RES_PRED_K0052 2520 std::vector<Int> m_pocsInCurrRPSs; 2521 #endif 2368 2522 #endif 2369 2523 #if H_3D_IC … … 2372 2526 #endif 2373 2527 #if H_3D 2528 #if HHI_INTER_COMP_PRED_K0052 2529 std::vector<Int> m_inCmpRefViewIdcs; 2530 Bool m_inCmpPredAvailFlag; 2531 Bool m_inCmpPredFlag; 2532 #endif 2533 #if HHI_CAM_PARA_K0052 2534 Bool m_cpAvailableFlag; 2535 Int m_numViews; 2536 #endif 2374 2537 TComPic* m_ivPicsCurrPoc [2][MAX_NUM_LAYERS]; 2375 2538 Int** m_depthToDisparityB; … … 2377 2540 #endif 2378 2541 #endif 2542 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2543 Bool m_bApplyDIS; 2544 #else 2379 2545 #if H_3D_SINGLE_DEPTH 2380 2546 Bool m_bApplySingleDepthMode; 2547 #endif 2381 2548 #endif 2382 2549 #if H_3D_IC … … 2398 2565 Bool m_qtPredFlag ; 2399 2566 Bool m_interSdcFlag ; 2567 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2568 Bool m_depthIntraSkipFlag ; 2569 #else 2400 2570 Bool m_intraSingleFlag ; 2401 2571 #endif 2402 2572 Int m_mpiSubPbSize ; 2403 2573 Int m_subPbSize ; … … 2467 2637 Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } 2468 2638 #if H_3D 2639 #if HHI_INTER_COMP_PRED_K0052 2640 Bool getInCmpPredAvailFlag( ) { return m_inCmpPredAvailFlag; } 2641 #if HHI_CAM_PARA_K0052 2642 Bool getCpAvailableFlag( ) { return m_cpAvailableFlag; } 2643 #endif 2644 Bool getInCompPredFlag( ) { return m_inCmpPredFlag; } 2645 Void setInCompPredFlag( Bool b ) { m_inCmpPredFlag = b; } 2646 Int getInCmpRefViewIdcs( Int i ) { return m_inCmpRefViewIdcs [i]; } 2647 Int getNumCurCmpLIds( ) { return (Int) m_inCmpRefViewIdcs.size(); } 2648 #endif 2469 2649 TComPic* getIvPic ( Bool depthFlag, Int viewIndex){ return m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; } 2470 2650 #endif … … 2568 2748 UInt getTLayer () { return m_uiTLayer; } 2569 2749 Void setTLayer ( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } 2750 #if H_MV 2751 Int getTemporalId ( ) { return (Int) m_uiTLayer; } 2752 #endif 2570 2753 2571 2754 Void setTLayerInfo( UInt uiTLayer ); … … 2692 2875 Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } 2693 2876 Bool getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; } 2877 #if HHI_RES_PRED_K0052 2878 std::vector<Int> getPocsInCurrRPSs() { return m_pocsInCurrRPSs; }; 2879 #endif 2694 2880 #endif 2695 2881 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } … … 2700 2886 Int* getInvCodedScale () { return m_aaiCodedScale [1]; } 2701 2887 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } 2888 #if HHI_CAM_PARA_K0052 2889 Void setCpScale( Int j, Int val ) { m_aaiCodedScale[0][j] = val; } 2890 Int getCpScale( Int j ) { return m_aaiCodedScale[0][j]; } 2891 2892 Void setCpOff( Int j, Int val ) { m_aaiCodedOffset[0][j] = val; } 2893 Int getCpOff( Int j ) { return m_aaiCodedOffset[0][j]; } 2894 2895 Void setCpInvScale( Int j, Int val ) { m_aaiCodedScale[1][j] = val; } 2896 Int getCpInvScale( Int j ) { return m_aaiCodedScale[1][j]; } 2897 2898 Void setCpInvOff( Int j, Int val ) { m_aaiCodedOffset[1][j] = val; } 2899 Int getCpInvOff( Int j ) { return m_aaiCodedOffset[1][j]; } 2900 #endif 2901 2702 2902 #endif 2703 2903 #endif … … 2706 2906 Void setDepthToDisparityLUTs(); 2707 2907 2908 #if HHI_CAM_PARA_K0052 2909 Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ getVPS()->getVoiInVps( refViewIdx) ]; }; 2910 Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ getVPS()->getVoiInVps( refViewIdx) ]; }; 2911 #else 2708 2912 Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ refViewIdx ]; }; 2709 2913 Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; }; 2914 #endif 2710 2915 #endif 2711 2916 #if H_3D_IC … … 2810 3015 #if H_3D 2811 3016 // 3D-HEVC tool parameters 3017 #if HHI_INTER_COMP_PRED_K0052 3018 Void deriveInCmpPredAndCpAvailFlag() 3019 { 3020 Int numCurCmpLIds = getIsDepth() ? 1 : getNumActiveRefLayerPics(); 3021 std::vector<Int> curCmpLIds; 3022 if ( getIsDepth() ) 3023 { 3024 curCmpLIds.push_back( getLayerId() ); 3025 } 3026 else 3027 { 3028 for (Int i = 0; i < numCurCmpLIds; i++) 3029 { 3030 curCmpLIds.push_back( getRefPicLayerId( i ) ); 3031 } 3032 } 3033 3034 #if HHI_CAM_PARA_K0052 3035 m_cpAvailableFlag = true; 3036 m_inCmpRefViewIdcs.clear(); 3037 #endif 3038 Bool allRefCmpLayersAvailFlag = true; 3039 3040 for( Int i = 0; i <= numCurCmpLIds - 1; i++ ) 3041 { 3042 m_inCmpRefViewIdcs.push_back( getVPS()->getViewOrderIdx( curCmpLIds[ i ] )); 3043 #if HHI_CAM_PARA_K0052 3044 if( !getVPS()->getCpPresentFlag( getVPS()->getVoiInVps( getViewIndex() ), getVPS()->getVoiInVps( m_inCmpRefViewIdcs[ i ] ) ) ) 3045 { 3046 m_cpAvailableFlag = false; 3047 } 3048 #endif 3049 Bool refCmpCurLIdAvailFlag = false; 3050 if( getVPS()->getViewCompLayerPresentFlag( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) ) 3051 { 3052 Int j = getVPS()->getLayerIdInVps( getVPS()->getViewCompLayerId( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) ); 3053 if ( getVPS()->getDirectDependencyFlag( getVPS()->getLayerIdInVps( getLayerId() ) , j ) && 3054 getVPS()->getSubLayersVpsMaxMinus1( j ) >= getTemporalId() && 3055 ( getTemporalId() == 0 || getVPS()->getMaxTidIlRefPicsPlus1( j , getVPS()->getLayerIdInVps( getLayerId() ) ) > getTemporalId() ) 3056 ) 3057 { 3058 refCmpCurLIdAvailFlag = true; 3059 } 3060 } 3061 if( !refCmpCurLIdAvailFlag ) 3062 { 3063 allRefCmpLayersAvailFlag = false; 3064 } 3065 } 3066 3067 if( !allRefCmpLayersAvailFlag ) 3068 { 3069 m_inCmpPredAvailFlag = false; 3070 } 3071 else 3072 { 3073 TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension(); 3074 if( !getIsDepth() ) 3075 { 3076 m_inCmpPredAvailFlag = sps3dExt->getViewSynthesisPredFlag( getIsDepth() ) || 3077 sps3dExt->getDepthBasedBlkPartFlag( getIsDepth() ) || 3078 sps3dExt->getDepthRefinementFlag ( getIsDepth() ); 3079 } 3080 else 3081 { 3082 m_inCmpPredAvailFlag = sps3dExt->getIntraContourFlag( getIsDepth() ) || 3083 sps3dExt->getQtPredFlag( getIsDepth() ) || 3084 sps3dExt->getMpiFlag( getIsDepth() ); 3085 } 3086 } 3087 }; 3088 3089 #endif 3090 2812 3091 Void init3dToolParameters(); 3092 #if HHI_INTER_COMP_PRED_K0052 3093 Void checkInCompPredRefLayers() 3094 { 3095 if ( getInCompPredFlag() ) 3096 { 3097 for (Int i = 0; i < getNumCurCmpLIds(); i++ ) 3098 { 3099 assert( getIvPic(!getIsDepth(), getInCmpRefViewIdcs( i ) ) != NULL ); 3100 // It is a requirement of bitstream conformance that there 3101 // is a picture in the DPB with PicOrderCntVal equal to the PicOrderCntVal of the current picture, 3102 // and a nuh_layer_id value equal to ViewCompLayerId[ inCmpRefViewIdcs[ i ] ][ !DepthFlag ]. 3103 } 3104 } 3105 }; 3106 3107 #endif 2813 3108 Bool getIvMvPredFlag ( ) { return m_ivMvPredFlag ; }; 2814 3109 Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag ; }; … … 2822 3117 Bool getQtPredFlag ( ) { return m_qtPredFlag ; }; 2823 3118 Bool getInterSdcFlag ( ) { return m_interSdcFlag ; }; 3119 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 3120 Bool getDepthIntraSkipFlag ( ) { return m_depthIntraSkipFlag ; }; 3121 #else 2824 3122 Bool getIntraSingleFlag ( ) { return m_intraSingleFlag ; }; 3123 #endif 2825 3124 2826 3125 Int getMpiSubPbSize ( ) { return m_mpiSubPbSize ; }; -
trunk/source/Lib/TLibCommon/TComTrQuant.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComTrQuant.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComWedgelet.cpp
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 1,ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 177 177 } 178 178 179 #if SHARP_DMM_CLEAN_K0042 180 Void TComWedgelet::generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate) 181 { 182 Int stride = m_uiWidth; 183 Int sinc, offsetI, offsetJ; 184 185 sinc = 1; 186 offsetI = ( sinc) < 0 ? stride-1 : 0; // 0 187 offsetJ = (-sinc) < 0 ? stride-1 : 0; // stride - 1 188 189 for (Int y = 0; y < stride; y++) 190 { 191 for (Int x = 0; x < stride; x++) 192 { 193 Int i = offsetI + sinc * y; // y 194 Int j = offsetJ - sinc * x; // stride - 1 - x 195 m_pbPattern[(y * stride) + x] = !rcWedge.m_pbPattern[(j * stride) + i]; 196 } 197 } 198 Int blocksize = rcWedge.m_uiWidth * (rcWedge.m_eWedgeRes == HALF_PEL ? 2 : 1); 199 Int offsetX = (-sinc) < 0 ? blocksize - 1 : 0; 200 Int offsetY = ( sinc) < 0 ? blocksize - 1 : 0; 201 m_uhXs = offsetX - sinc * rcWedge.m_uhYs; 202 m_uhYs = offsetY + sinc * rcWedge.m_uhXs; 203 m_uhXe = offsetX - sinc * rcWedge.m_uhYe; 204 m_uhYe = offsetY + sinc * rcWedge.m_uhXe; 205 m_uhOri = rotate; 206 m_eWedgeRes = rcWedge.m_eWedgeRes; 207 m_bIsCoarse = rcWedge.m_bIsCoarse; 208 m_uiAng = rcWedge.m_uiAng; 209 m_uiWidth = rcWedge.m_uiWidth; 210 m_uiHeight = rcWedge.m_uiHeight; 211 } 212 #endif 213 179 214 Void TComWedgelet::xGenerateWedgePattern() 180 215 { … … 193 228 xDrawEdgeLine( uhXs, uhYs, uhXe, uhYe, pbTempPattern, iTempStride ); 194 229 230 #if SHARP_DMM_CLEAN_K0042 231 Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0; 232 Int endPos = uhYe>>shift; 233 for (Int y = 0; y <= endPos; y++) 234 { 235 for (Int x = 0; x < m_uiWidth && pbTempPattern[(y * m_uiWidth) + x] == 0; x++) 236 { 237 pbTempPattern[(y * m_uiWidth) + x] = true; 238 } 239 } 240 for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) 241 { 242 m_pbPattern[k] = pbTempPattern[k]; 243 }; 244 #else 195 245 switch( m_uhOri ) 196 246 { … … 252 302 break; 253 303 } 304 #endif 254 305 255 306 if( pbTempPattern ) … … 294 345 for( Int x = x0; x <= x1; x++ ) 295 346 { 347 #if SHARP_DMM_CLEAN_K0042 348 Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0; 349 Int stride = iPatternStride >> shift; 350 if( steep ) { pbPattern[((x>>shift) * stride) + (y>>shift)] = true; } 351 else { pbPattern[((y>>shift) * stride) + (x>>shift)] = true; } 352 #else 296 353 if( steep ) { pbPattern[(x * iPatternStride) + y] = true; } 297 354 else { pbPattern[(y * iPatternStride) + x] = true; } 355 #endif 298 356 299 357 error += deltaerr; -
trunk/source/Lib/TLibCommon/TComWedgelet.h
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 1,ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 124 124 Bool* getScaledPattern(UInt uiWidth); 125 125 126 #if SHARP_DMM_CLEAN_K0042 127 Void generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate); 128 #endif 126 129 Void setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false ); 127 130 Void findClosestAngle(); -
trunk/source/Lib/TLibCommon/TComWeightPrediction.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComWeightPrediction.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComYuv.cpp
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComYuv.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TypeDef.h
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 65 65 #define H_3D ( HEVC_EXT == 2) 66 66 67 #if H_MV 68 #define SONY_MV_V_CONST_C0078 1 // Control disparity vector search range via configuration file 69 #define H_MV_FIX_CONF_WINDOW 1 70 #endif 71 67 72 #define NTT_BUG_FIX_TK54 1 68 73 #define BUG_FIX_TK65 1 69 74 70 75 #define MTK_I0093 1 76 77 #define RWTH_DBBP_NO_SATD_K0028 1 71 78 ///////////////////////////////////////////////////////////////////////////////////////// 72 79 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// … … 78 85 79 86 #if H_3D 87 #define SEC_DEPTH_INTRA_SKIP_MODE_K0033 1 // Depth intra skip mode 88 89 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 90 #define NEIGHBORING_PIX_AVAILABILITY_FIX 1 91 #endif 92 93 80 94 #define H_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 81 95 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units … … 117 131 #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 132 133 #define SEC_ARP_REM_ENC_RESTRICT_K0035 1 // Removal of encoder restriction of ARP, JCT3V-K0035 134 119 135 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 120 136 // Unifying rounding offset, for IC part, JCT3V-D0135 … … 185 201 // SEC_SIMP_SHIFTED_DV_I0086 Simplification of Shifted DV candidate, JCT3V-I0086 186 202 187 203 #define SEC_SHIFTED_IVMC_POS_K0036 1 // Position Derivation for Shifted-IVMC, JCT3V-K0036 188 204 189 205 190 206 #define H_3D_TMVP 1 // QC_TMVP_C0047 191 207 // Sony_M23639 208 #if H_3D_TMVP 209 #define H_3D_TMVP_SCALING_FIX_K0053 1 // QC/CY for K0053 210 #endif 192 211 193 212 #define H_3D_DIM 1 // DIM, Depth intra modes, includes: … … 239 258 // SHARP_DLT_SIMP_J0029 1 // DLT(DepthValue2Idx[]) table derivation cleanup 240 259 260 #if !SEC_DEPTH_INTRA_SKIP_MODE_K0033 241 261 #define H_3D_SINGLE_DEPTH 1 // Single depth mode proposed in JCT3V-I0095 242 262 // HS_SP_SIMP_J0066 243 263 // SINGLE_DEPTH_SIMP_J0115 1 244 264 // MTK_SINGLE_DEPTH_VPS_FLAG_J0060 1 // Add VPS control flags and remove slice header control flag for single depth, JCT3V-J0060 265 #endif 245 266 246 267 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding … … 265 286 // SEC_DBBP_DMM4_THRESHOLD_I0076 Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076 266 287 // SEC_DBBP_VIEW_REF_CHECK_J0037 1 // Signaling dbbp_flag when the current slice has view reference picture(s), JCT3V-J0037 item4 288 #define HS_DBBP_CLEAN_K0048 1 267 289 268 290 #define H_3D_DDD 1 // Disparity derived depth coding … … 305 327 // Fixes 306 328 329 #define FIX_TICKET_95 1 // pps_scaling_list_ref_layer_id parsing 307 330 308 331 #if H_3D 332 #define H_3D_DISABLE_CHROMA 1 309 333 #define HHI_VIEW_ID_LIST_I5_J0107 0 334 #define HHI_INTER_COMP_PRED_K0052 1 335 #define HHI_RES_PRED_K0052 1 336 #define HHI_CAM_PARA_K0052 1 337 #define HHI_MOVE_SYN_K0052 1 338 #define H_3D_ANNEX_SELECTION_FIX 1 339 #define H_3D_TMVP_FIX_TICKET_97 1 340 #define H_3D_DIRECT_DEP_TYPE 1 341 #define H_3D_FIX_TMVP_SCALING_VIEW_ID 1 310 342 #endif 311 343 #define H_MV_FIX_REF_LAYER_PIC_FLAG 1 … … 313 345 #define H_3D_OUTPUT_ACTIVE_TOOLS 0 314 346 347 #if !SEC_DEPTH_INTRA_SKIP_MODE_K0033 315 348 ///// ***** SINGLE DEPTH MODE ********* 316 349 #if H_3D_SINGLE_DEPTH 317 350 #define SINGLE_DEPTH_MODE_CAND_LIST_SIZE 2 // size of the sample candidate list 318 351 352 #endif 319 353 #endif 320 354 … … 350 384 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 351 385 // LG_ZEROINTRADEPTHRESI_A0087 386 #define SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation 352 387 353 388 #define TICKET083_IVPFLAG_FIX 1 389 #define SHARP_SUBBLOCK_CLEAN_K0044 1 // Remove unused bipred restriction 390 354 391 #endif 355 392 ///// ***** VIEW SYNTHESIS PREDICTION *********
Note: See TracChangeset for help on using the changeset viewer.