Changeset 1196 in 3DVCSoftware
- Timestamp:
- 4 May 2015, 17:47:40 (10 years ago)
- Location:
- trunk/source
- Files:
-
- 48 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r1179 r1196 248 248 { 249 249 m_tDecTop[decIdx]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx ); 250 #if H_3D _ANNEX_SELECTION_FIX250 #if H_3D 251 251 m_tDecTop[decIdx]->setProfileIdc( ); 252 252 #endif … … 1053 1053 m_tDecTop[ decIdx ]->setLayerInitilizedFlags( m_layerInitilizedFlags ); 1054 1054 m_tDecTop[ decIdx ]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx ); 1055 #if H_3D _ANNEX_SELECTION_FIX1055 #if H_3D 1056 1056 m_tDecTop[ decIdx ]->setProfileIdc ( ); 1057 1057 #endif -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r1179 r1196 225 225 } 226 226 #endif 227 #if HHI_INTER_COMP_PRED_K0052228 227 #if H_3D 229 228 in>>entry.m_interCompPredFlag; 230 #endif231 229 #endif 232 230 return in; … … 482 480 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") 483 481 ("SearchRange,-sr", m_iSearchRange, 96, "Motion search range") 484 #if SONY_MV_V_CONST_C0078482 #if H_MV 485 483 ("DispSearchRangeRestriction", m_bUseDisparitySearchRangeRestriction, false, "restrict disparity search range") 486 484 ("VerticalDispSearchRange", m_iVerticalDisparitySearchRange, 56, "vertical disparity search range") … … 794 792 ("QtPredFlag" , m_qtPredFlag , true , "Quad tree prediction from texture to depth") 795 793 ("InterSdcFlag" , m_interSdcFlag , true , "Inter depth DCs" ) 796 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033797 794 ("DepthIntraSkip" , m_depthIntraSkipFlag , true , "Depth intra skip mode" ) 798 #else799 ("IntraSingleFlag" , m_intraSingleFlag , true , "Intra single mode" )800 #endif801 795 #endif //H_3D 802 796 ; … … 1559 1553 { 1560 1554 xConfirmPara( m_directRefLayers[i][j] < 0 || m_directRefLayers[i][j] >= i , "Reference layer id shall be greater than or equal to 0 and less than dependent layer id"); 1561 #if H_3D_DIRECT_DEP_TYPE1562 1555 xConfirmPara( m_dependencyTypes[i][j] < 0 || m_dependencyTypes[i][j] > 6 , "Dependency type shall be greater than or equal to 0 and less than 7"); 1563 #else1564 xConfirmPara( m_dependencyTypes[i][j] < 0 || m_dependencyTypes[i][j] > 2 , "Dependency type shall be greater than or equal to 0 and less than 3");1565 #endif1566 1556 } 1567 1557 } … … 1599 1589 xConfirmPara( m_iSearchRange < 0 , "Search Range must be more than 0" ); 1600 1590 xConfirmPara( m_bipredSearchRange < 0 , "Search Range must be more than 0" ); 1601 #if SONY_MV_V_CONST_C00781591 #if H_MV 1602 1592 xConfirmPara( m_iVerticalDisparitySearchRange <= 0 , "Vertical Disparity Search Range must be more than 0" ); 1603 1593 #endif … … 1716 1706 xConfirmPara( m_pchCameraParameterFile == 0 , "CameraParameterFile must be given"); 1717 1707 xConfirmPara( m_pchBaseViewCameraNumbers == 0 , "BaseViewCameraNumbers must be given" ); 1718 #if BUG_FIX_TK651719 #if HHI_CAM_PARA_K00521720 1708 xConfirmPara( m_iNumberOfViews != m_cCameraData.getBaseViewNumbers().size() , "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); 1721 #else1722 xConfirmPara( ( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size() ) && ( m_numberOfLayers != m_cCameraData.getBaseViewNumbers().size() ), "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );1723 #endif1724 #else1725 xConfirmPara( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size(), "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );1726 #endif1727 1709 xConfirmPara ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5, "CodedCamParsPrecision must be in range of 0..5" ); 1728 1710 #if H_3D_VSO … … 2477 2459 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 2478 2460 printf("Motion search range : %d\n", m_iSearchRange ); 2479 #if SONY_MV_V_CONST_C00782461 #if H_MV 2480 2462 printf("Disp search range restriction: %d\n", m_bUseDisparitySearchRangeRestriction ); 2481 2463 printf("Vertical disp search range : %d\n", m_iVerticalDisparitySearchRange ); … … 2632 2614 printf( "QtPred:%d " , m_qtPredFlag ? 1 : 0 ); 2633 2615 printf( "InterSdc:%d " , m_interSdcFlag ? 1 : 0 ); 2634 #if SEC_DEPTH_INTRA_SKIP_MODE_K00332635 2616 printf( "DepthIntraSkip:%d " , m_depthIntraSkipFlag ? 1 : 0 ); 2636 #else2637 printf( "IntraSingle:%d " , m_intraSingleFlag ? 1 : 0 );2638 #endif2639 2617 #endif 2640 2618 -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r1179 r1196 289 289 Int m_iSearchRange; ///< ME search range 290 290 Int m_bipredSearchRange; ///< ME search range for bipred refinement 291 #if SONY_MV_V_CONST_C0078291 #if H_MV 292 292 Bool m_bUseDisparitySearchRangeRestriction; ///< restrict vertical search range for inter-view prediction 293 293 Int m_iVerticalDisparitySearchRange; ///< ME vertical search range for inter-view prediction … … 488 488 Bool m_qtPredFlag; 489 489 Bool m_interSdcFlag; 490 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033491 490 Bool m_depthIntraSkipFlag; 492 #else493 Bool m_intraSingleFlag;494 #endif495 491 #endif 496 492 // internal member functions … … 543 539 Int iSpace = max(1, ENC_CFG_CONSOUT_SPACE - (Int) description.length() ); 544 540 545 for ( Int i = 0; i < iSpace; i++ ) 541 for ( Int i = 0; i < iSpace; i++ ) 542 { 546 543 description.append( " " ); 544 } 547 545 548 546 description.append( ":" ); 549 547 printf( "%s", description.c_str() ); 550 548 551 for(Int i=0;i<rpcVector.size();i++) 549 for(Int i=0;i<rpcVector.size();i++) 550 { 552 551 xPrintVectorElem( rpcVector[i] ); 552 } 553 553 554 554 printf("\n"); -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r1179 r1196 140 140 xSetVPSVUI ( vps ); 141 141 #if H_3D 142 #if HHI_CAM_PARA_K0052143 142 xSetCamPara ( vps ); 144 #endif145 #endif146 #if H_3D147 143 m_ivPicLists.setVPS ( &vps ); 148 144 xDeriveDltArray ( vps, dlt ); … … 201 197 m_sps3dExtension.setQtPredFlag ( d, m_qtPredFlag ); 202 198 m_sps3dExtension.setInterSdcFlag ( d, m_interSdcFlag ); 203 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033204 199 m_sps3dExtension.setDepthIntraSkipFlag ( d, m_depthIntraSkipFlag ); 205 #else206 m_sps3dExtension.setIntraSingleFlag ( d, m_intraSingleFlag );207 #endif208 200 } 209 201 } … … 229 221 //====== Camera Parameters ========= 230 222 m_cTEncTop.setCameraParameters ( &m_cCameraData ); 231 #if !HHI_CAM_PARA_K0052232 m_cTEncTop.setCamParPrecision ( m_cCameraData.getCamParsCodedPrecision () );233 m_cTEncTop.setCamParInSliceHeader ( m_cCameraData.getVaryingCameraParameters() );234 235 m_cTEncTop.setCodedScale ( m_cCameraData.getCodedScale () );236 m_cTEncTop.setCodedOffset ( m_cCameraData.getCodedOffset () );237 #endif238 223 #if H_3D_VSO 239 224 //====== VSO ========= … … 359 344 m_cTEncTop.setBipredSearchRange ( m_bipredSearchRange ); 360 345 361 #if SONY_MV_V_CONST_C0078346 #if H_MV 362 347 m_cTEncTop.setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction ); 363 348 m_cTEncTop.setVerticalDisparitySearchRange ( m_iVerticalDisparitySearchRange ); … … 651 636 } 652 637 #endif 653 #if H_3D_ANNEX_SELECTION_FIX654 638 #if H_3D 655 639 /// SET Profiles … … 692 676 } 693 677 #endif 694 #endif695 678 #if H_3D_VSO 696 679 if ( m_bUseVSO ) … … 799 782 { 800 783 #if H_3D 801 #if !HHI_CAM_PARA_K0052802 for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ )803 {804 m_vps->initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),805 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );806 }807 #endif808 784 #endif 809 785 … … 1143 1119 if (m_pchReconFileList[layerId]) 1144 1120 { 1145 #if H_MV_ALIGN_HM_151146 1121 m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_isTopFieldFirst ); 1147 #else1148 m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confLeft, m_confRight, m_confTop, m_confBottom, m_isTopFieldFirst );1149 #endif1150 1122 } 1151 1123 } … … 1200 1172 if (m_pchReconFileList[layerId]) 1201 1173 { 1202 #if H_MV_ALIGN_HM_151203 1174 m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRec, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom ); 1204 #else1205 m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom );1206 #endif1207 1175 } 1208 1176 } … … 1390 1358 1391 1359 1392 #if HHI_INTER_COMP_PRED_K00521393 1360 #if H_3D 1394 1361 vps.initViewCompLayer( ); 1395 1362 #endif 1396 #endif1397 1363 } 1398 1364 … … 1412 1378 Bool defaultDirectDependencyFlag = false; 1413 1379 1414 #if H_3D_DIRECT_DEP_TYPE1415 1380 Int directDepTypeLenMinus2 = 0; 1416 #endif1417 1381 for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ ) 1418 1382 { … … 1424 1388 vps.setDirectDependencyFlag( depLayer, refLayer, true); 1425 1389 Int curDirectDependencyType = m_dependencyTypes[depLayer][i]; 1426 #if H_3D_DIRECT_DEP_TYPE1427 1390 directDepTypeLenMinus2 = std::max( directDepTypeLenMinus2, gCeilLog2( curDirectDependencyType + 1 ) - 2 ); 1428 #endif1429 1391 if ( defaultDirectDependencyType != -1 ) 1430 1392 { … … 1444 1406 vps.setDefaultDirectDependencyType( defaultDirectDependencyFlag ? defaultDirectDependencyType : -1 ); 1445 1407 1446 #if H_3D_DIRECT_DEP_TYPE1447 1408 assert( directDepTypeLenMinus2 <= 1 ); 1448 1409 vps.setDirectDepTypeLenMinus2( directDepTypeLenMinus2 ); 1449 #endif1450 1410 1451 1411 … … 1495 1455 #endif 1496 1456 { 1497 #if !HHI_INTER_COMP_PRED_K00521498 Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 );1499 #endif1500 1457 Bool refLayerZero = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 ); 1501 #if HHI_INTER_COMP_PRED_K00521502 // refAlwaysIntra actually not needed, since TemporalIds need to be aligned within an AU.1503 // Thus, reference pictures of IRAP pictures have TemporalId equal to 0.1504 1458 maxTid = std::max( maxTid, refLayerZero ? 0 : geRef.m_temporalId ); 1505 #else1506 maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId );1507 #endif1508 1459 } 1509 1460 } … … 1513 1464 else 1514 1465 { 1515 #if HHI_INTER_COMP_PRED_K00521516 1466 if( m_depthFlag[ curLayerIdInVps ] && ( m_mpiFlag|| m_qtPredFlag || m_intraContourFlag ) ) 1517 1467 { … … 1552 1502 } 1553 1503 } 1554 #else1555 if( m_depthFlag[ curLayerIdInVps ] && ( m_mpiFlag|| m_qtPredFlag || m_intraContourFlag ) )1556 {1557 Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false );1558 if ( nuhLayerIdTex == refLayerIdInNuh )1559 {1560 maxTid = std::max( maxTid, vps.getSubLayersVpsMaxMinus1( refLayerIdInVps) + 1 );1561 }1562 }1563 if( !m_depthFlag[ curLayerIdInVps ] && vps.getNumRefListLayers( curLayerIdInNuh) > 0 && ( m_depthRefinementFlag || m_viewSynthesisPredFlag || m_depthBasedBlkPartFlag ) )1564 {1565 Int maxPresentTid =-1;1566 Bool allPresent = true;1567 for (Int i = 0; i < vps.getNumRefListLayers( curLayerIdInNuh); i++ )1568 {1569 Int nuhLayerIdDep = vps.getLayerIdInNuh( vps.getViewIndex( vps.getIdRefListLayer(curLayerIdInNuh, i ) ), true );1570 if ( nuhLayerIdDep== refLayerIdInNuh )1571 {1572 maxPresentTid= std::max( maxTid, vps.getSubLayersVpsMaxMinus1( refLayerIdInVps) + 1 );1573 }1574 else1575 {1576 allPresent = false;1577 }1578 }1579 1580 if ( allPresent )1581 {1582 maxTid= std::max( maxTid, maxPresentTid );1583 }1584 }1585 #endif1586 1504 } 1587 1505 } // if ( vps.getDirectDependencyFlag( curLayerIdInVps, refLayerIdInVps ) ) … … 1823 1741 // ToDo not supported yet. 1824 1742 //repFormat->setSeparateColourPlaneVpsFlag( ); 1825 #if H_MV_FIX_CONF_WINDOW1826 1743 Bool conformanceWindowVpsFlag = ( m_confWinBottom != 0 ) || ( m_confWinRight != 0 ) || ( m_confWinTop != 0 ) || ( m_confWinBottom != 0 ); 1827 1744 repFormat->setConformanceWindowVpsFlag( conformanceWindowVpsFlag ); … … 1833 1750 repFormat->setConfWinVpsBottomOffset ( m_confWinBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) ); 1834 1751 } 1835 #else1836 repFormat->setConformanceWindowVpsFlag( true );1837 repFormat->setConfWinVpsLeftOffset ( m_confWinLeft / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );1838 repFormat->setConfWinVpsRightOffset ( m_confWinRight / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );1839 repFormat->setConfWinVpsTopOffset ( m_confWinTop / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );1840 repFormat->setConfWinVpsBottomOffset ( m_confWinBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );1841 #endif1842 1752 assert( vps.getRepFormat( j ) == NULL ); 1843 1753 vps.setRepFormat( j , repFormat ); … … 1861 1771 1862 1772 repFormat->setConformanceWindowVpsFlag( true ); 1863 #if H_MV_ALIGN_HM_151864 1773 repFormat->setConfWinVpsLeftOffset ( m_confWinLeft / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) ); 1865 1774 repFormat->setConfWinVpsRightOffset ( m_confWinRight / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) ); 1866 1775 repFormat->setConfWinVpsTopOffset ( m_confWinTop / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) ); 1867 1776 repFormat->setConfWinVpsBottomOffset ( m_confWinBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) ); 1868 #else1869 repFormat->setConfWinVpsLeftOffset ( m_confLeft / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );1870 repFormat->setConfWinVpsRightOffset ( m_confRight / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );1871 repFormat->setConfWinVpsTopOffset ( m_confTop / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );1872 repFormat->setConfWinVpsBottomOffset ( m_confBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );1873 #endif1874 1777 assert( vps.getRepFormat( 0 ) == NULL ); 1875 1778 vps.setRepFormat( 0 , repFormat ); … … 2250 2153 } 2251 2154 2252 #if HHI_CAM_PARA_K00522253 2155 #if H_3D 2254 2156 Void TAppEncTop::xSetCamPara ( TComVPS& vps ) … … 2285 2187 } 2286 2188 #endif 2287 #endif2288 2189 2289 2190 -
trunk/source/App/TAppEncoder/TAppEncTop.h
r1179 r1196 142 142 Void xSetDpbSize ( TComVPS& vps ); 143 143 Void xSetVPSVUI ( TComVPS& vps ); 144 #if HHI_CAM_PARA_K0052145 144 #if H_3D 146 145 Void xSetCamPara ( TComVPS& vps ); 147 #endif148 146 #endif 149 147 GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc ); -
trunk/source/Lib/TAppCommon/TAppComCamPara.cpp
r1179 r1196 399 399 400 400 401 #if !HHI_CAM_PARA_K0052402 Void403 TAppComCamPara::xGetViewOrderIndices( const std::vector<Int>& raiId2SortedId, std::vector<Int>& raiVOIdx )404 {405 AOF( raiId2SortedId.size() );406 raiVOIdx = raiId2SortedId;407 Int iSize = (Int)raiId2SortedId.size();408 Int iOffs = raiId2SortedId[ 0 ];409 for( Int iIdx = 0; iIdx < iSize; iIdx++ )410 {411 raiVOIdx[ iIdx ] -= iOffs;412 }413 }414 #endif415 401 416 402 … … 960 946 961 947 962 #if !HHI_CAM_PARA_K0052963 Void964 TAppComCamPara::xSetPdmConversionParams()965 {966 AOF( m_aiViewOrderIndex[ 0 ] == 0 );967 if ( m_bSetupFromCoded || m_iNumberOfBaseViews < 2 )968 {969 return;970 }971 972 //--- determine (virtual) camera parameter shift between view order index 1 and base view (view order index 0) ---973 Double dCamPosShift, dPicPosShift;974 Int iMinAbsVOI = (1<<30);975 Int iMinAbsVOIId = 0;976 for( Int iBaseId = 1; iBaseId < m_iNumberOfBaseViews; iBaseId++ )977 {978 Int iAbsVOI = ( m_aiViewOrderIndex[ iBaseId ] < 0 ? -m_aiViewOrderIndex[ iBaseId ] : m_aiViewOrderIndex[ iBaseId ] );979 if( iAbsVOI < iMinAbsVOI )980 {981 iMinAbsVOI = iAbsVOI;982 iMinAbsVOIId = iBaseId;983 }984 }985 AOF( iMinAbsVOIId != 0 && iMinAbsVOI != 0 );986 xGetCameraShifts( 0, iMinAbsVOIId, m_uiFirstFrameId, dCamPosShift, dPicPosShift );987 988 //--- determine maximum absolute camera position shift, precision, and base scale ---989 Double dMaxAbsCamPosShift = 0.0;990 for( Int iTargetId = 1; iTargetId < m_iNumberOfBaseViews; iTargetId++ )991 {992 for( Int iBaseId = 0; iBaseId < iTargetId; iBaseId++ )993 {994 xGetCameraShifts( (UInt)iBaseId, (UInt)iTargetId, m_uiFirstFrameId, dCamPosShift, dPicPosShift );995 dCamPosShift = ( dCamPosShift < 0.0 ? -dCamPosShift : dCamPosShift );996 dMaxAbsCamPosShift = ( dCamPosShift > dMaxAbsCamPosShift ? dCamPosShift : dMaxAbsCamPosShift );997 }998 }999 }1000 #endif1001 948 1002 949 … … 1284 1231 1285 1232 //===== set derived parameters ===== 1286 #if !HHI_CAM_PARA_K00521287 xGetViewOrderIndices( m_aiBaseId2SortedId, m_aiViewOrderIndex );1288 #endif1289 1233 m_bCamParsVaryOverTime = xGetCamParsChangeFlag(); 1290 1234 -
trunk/source/Lib/TAppCommon/TAppComCamPara.h
r1179 r1196 85 85 86 86 // SPS and slice header related variables 87 #if !HHI_CAM_PARA_K005288 std::vector<Int> m_aiViewOrderIndex; ///< list of view order indices89 #endif90 87 UInt m_uiCamParsCodedPrecision; ///< precision for coding of camera parameters (x: max error in disparity is 2^(-x) luma samples) 91 88 Bool m_bCamParsVaryOverTime; ///< flag specifying whether camera parameters vary for given frame numbers … … 147 144 // getting conversion parameters for disparity to virtual depth conversion 148 145 Void xGetCameraShifts ( UInt uiSourceView, UInt uiTargetView, UInt uiFrame, Double& rdCamPosShift, Double& rdPicPosShift ); 149 #if !HHI_CAM_PARA_K0052150 Void xSetPdmConversionParams ();151 #endif152 146 153 147 public: … … 220 214 Bool getVaryingCameraParameters() { return m_bCamParsVaryOverTime; } 221 215 UInt getCamParsCodedPrecision () { return m_uiCamParsCodedPrecision; } 222 #if !HHI_CAM_PARA_K0052223 std::vector<Int>& getViewOrderIndex () { return m_aiViewOrderIndex; }224 #endif225 216 Int** getCodedScale () { return m_aaiCodedScale; } 226 217 Int** getCodedOffset () { return m_aaiCodedOffset; } -
trunk/source/Lib/TLibCommon/ContextTables.h
r1179 r1196 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_K003353 #if H_3D 54 54 #define NUM_DIS_FLAG_CTX 1 55 55 #define NUM_DIS_TYPE_CTX 1 56 #else57 #if H_3D_SINGLE_DEPTH58 #define NUM_SINGLEDEPTH_FLAG_CTX 159 #define NUM_SINGLE_DEPTH_VALUE_DATA_CTX 160 #endif61 56 #endif 62 57 #define NUM_MERGE_FLAG_EXT_CTX 1 ///< number of context models for merge flag of merge extended … … 158 153 { CNU, CNU, CNU, }, 159 154 }; 160 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033155 #if H_3D 161 156 static const UChar 162 157 INIT_DIS_FLAG[3][NUM_DIS_FLAG_CTX] = … … 173 168 { 137 }, 174 169 }; 175 #else176 #if H_3D_SINGLE_DEPTH177 static const UChar178 INIT_SINGLEDEPTH_FLAG[3][NUM_SINGLEDEPTH_FLAG_CTX] =179 {180 { 185 },181 { 185 },182 { 185 },183 };184 static const UChar185 INIT_SINGLE_DEPTH_VALUE_DATA[3][NUM_SINGLE_DEPTH_VALUE_DATA_CTX] =186 {187 { 137 },188 { 137 },189 { 137 },190 };191 #endif192 170 #endif 193 171 static const UChar -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r1179 r1196 60 60 61 61 m_skipFlag = NULL; 62 #if SEC_DEPTH_INTRA_SKIP_MODE_K003362 #if H_3D 63 63 m_bDISFlag = NULL; 64 64 m_uiDISType = NULL; 65 #else66 #if H_3D_SINGLE_DEPTH67 m_singleDepthFlag = NULL;68 m_apSingleDepthValue = NULL;69 #endif70 65 #endif 71 66 m_pePartSize = NULL; … … 158 153 m_pbDBBPFlag = NULL; 159 154 #endif 160 161 155 } 162 156 … … 186 180 187 181 m_skipFlag = new Bool[ uiNumPartition ]; 188 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033182 #if H_3D 189 183 m_bDISFlag = new Bool[ uiNumPartition ]; 190 184 m_uiDISType = (UInt*)xMalloc(UInt, uiNumPartition); 191 #else192 #if H_3D_SINGLE_DEPTH193 m_singleDepthFlag = new Bool[ uiNumPartition ];194 m_apSingleDepthValue = (Pel*)xMalloc(Pel, uiNumPartition);195 #endif196 185 #endif 197 186 m_pePartSize = new Char[ uiNumPartition ]; … … 337 326 338 327 if ( m_skipFlag ) { delete[] m_skipFlag; m_skipFlag = NULL; } 339 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033328 #if H_3D 340 329 if ( m_bDISFlag ) { delete[] m_bDISFlag; m_bDISFlag = NULL; } 341 330 if ( m_uiDISType ) { xFree(m_uiDISType); m_uiDISType = NULL; } 342 #else343 #if H_3D_SINGLE_DEPTH344 if ( m_singleDepthFlag ) { delete[] m_singleDepthFlag; m_singleDepthFlag = NULL; }345 if ( m_apSingleDepthValue ) { xFree(m_apSingleDepthValue); m_apSingleDepthValue = NULL; }346 #endif347 331 #endif 348 332 if ( m_pePartSize ) { delete[] m_pePartSize; m_pePartSize = NULL; } … … 506 490 TComDataCU * pcFrom = pcPic->getCU(getAddr()); 507 491 m_skipFlag[ui] = pcFrom->getSkipFlag(ui); 508 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033492 #if H_3D 509 493 m_bDISFlag[ui] = pcFrom->getDISFlag(ui); 510 494 m_uiDISType[ui] = pcFrom->getDISType(ui); 511 #else512 #if H_3D_SINGLE_DEPTH513 m_singleDepthFlag[ui] = pcFrom->getSingleDepthFlag(ui);514 m_apSingleDepthValue[ui] = pcFrom->getSingleDepthValue(ui);515 #endif516 495 #endif 517 496 m_pePartSize[ui] = pcFrom->getPartitionSize(ui); … … 566 545 { 567 546 memset( m_skipFlag + firstElement, false, numElements * sizeof( *m_skipFlag ) ); 568 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033547 #if H_3D 569 548 memset( m_bDISFlag + firstElement, false, numElements * sizeof( *m_bDISFlag ) ); 570 549 memset( m_uiDISType + firstElement, 0, numElements * sizeof( *m_uiDISType) ); 571 #else572 #if H_3D_SINGLE_DEPTH573 memset( m_singleDepthFlag + firstElement, false, numElements * sizeof( *m_singleDepthFlag ) );574 memset( m_apSingleDepthValue + firstElement, 0, numElements * sizeof( *m_apSingleDepthValue ) );575 #endif576 550 #endif 577 551 memset( m_pePartSize + firstElement, SIZE_NONE, numElements * sizeof( *m_pePartSize ) ); … … 758 732 m_puhTransformSkip[2][ui] = 0; 759 733 m_skipFlag[ui] = false; 760 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033734 #if H_3D 761 735 m_bDISFlag[ui] = false; 762 736 m_uiDISType[ui] = 0; 763 #else764 #if H_3D_SINGLE_DEPTH765 m_singleDepthFlag[ui] = false;766 m_apSingleDepthValue[ui] = 0;767 #endif768 737 #endif 769 738 m_pePartSize[ui] = SIZE_NONE; … … 891 860 memset( m_puhCbf[2], 0, iSizeInUchar ); 892 861 memset( m_puhDepth, uiDepth, iSizeInUchar ); 893 #if H_3D_NBDV && !SEC_ARP_REM_ENC_RESTRICT_K0035894 m_pDvInfo->bDV = false;895 #endif896 862 #if H_3D_ARP 897 863 memset( m_puhARPW, 0, iSizeInUchar ); … … 934 900 { 935 901 m_skipFlag[ui] = false; 936 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033902 #if H_3D 937 903 m_bDISFlag[ui] = false; 938 904 m_uiDISType[ui] = 0; 939 #else940 #if H_3D_SINGLE_DEPTH941 m_singleDepthFlag[ui] = false;942 m_apSingleDepthValue[ui]= 0;943 #endif944 905 #endif 945 906 m_pePartSize[ui] = SIZE_NONE; … … 964 925 m_puhTransformSkip[2][ui] = pcCU->getTransformSkip(uiPartOffset+ui,TEXT_CHROMA_V); 965 926 m_skipFlag[ui] = pcCU->getSkipFlag(uiPartOffset+ui); 966 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033927 #if H_3D 967 928 m_bDISFlag[ui] = pcCU->getDISFlag(uiPartOffset+ui); 968 929 m_uiDISType[ui] = pcCU->getDISType(uiPartOffset+ui); 969 #else970 #if H_3D_SINGLE_DEPTH971 m_singleDepthFlag[ui] = pcCU->getSingleDepthFlag(uiPartOffset+ui);972 m_apSingleDepthValue[ui] = pcCU->getSingleDepthValue(uiPartOffset+ui);973 #endif974 930 #endif 975 931 m_pePartSize[ui] = pcCU->getPartitionSize(uiPartOffset+ui); … … 1000 956 m_pbICFlag [ui] = pcCU->m_pbICFlag[uiPartOffset+ui]; 1001 957 #endif 1002 1003 1004 958 #if H_3D_DIM 1005 959 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 1118 1072 1119 1073 m_skipFlag=pcCU->getSkipFlag() + uiPart; 1120 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331074 #if H_3D 1121 1075 m_bDISFlag = pcCU->getDISFlag() + uiPart; 1122 1076 m_uiDISType = pcCU->getDISType() + uiPart; 1123 #else1124 #if H_3D_SINGLE_DEPTH1125 m_singleDepthFlag = pcCU->getSingleDepthFlag() + uiPart;1126 m_apSingleDepthValue = pcCU->getSingleDepthValue() + uiPart;1127 #endif1128 1077 #endif 1129 1078 m_phQP=pcCU->getQP() + uiPart; … … 1143 1092 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiPart; 1144 1093 #endif 1145 1146 1094 #if H_3D_ARP 1147 1095 m_puhARPW = pcCU->getARPW() + uiPart; … … 1150 1098 m_pbICFlag = pcCU->getICFlag() + uiPart; 1151 1099 #endif 1152 1153 1154 1100 m_puhLumaIntraDir = pcCU->getLumaIntraDir() + uiPart; 1155 1101 m_puhChromaIntraDir = pcCU->getChromaIntraDir() + uiPart; … … 1260 1206 1261 1207 m_skipFlag = pcCU->getSkipFlag () + uiAbsPartIdx; 1262 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331208 #if H_3D 1263 1209 m_bDISFlag = pcCU->getDISFlag () + uiAbsPartIdx; 1264 1210 m_uiDISType = pcCU->getDISType() + uiAbsPartIdx; 1265 #else1266 #if H_3D_SINGLE_DEPTH1267 m_singleDepthFlag = pcCU->getSingleDepthFlag () + uiAbsPartIdx;1268 m_apSingleDepthValue = pcCU->getSingleDepthValue () + uiAbsPartIdx;1269 #endif1270 1211 #endif 1271 1212 m_pePartSize = pcCU->getPartitionSize () + uiAbsPartIdx; … … 1295 1236 #endif 1296 1237 #if H_3D_SPIVMP 1297 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiAbsPartIdx; 1298 #endif 1299 1238 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiAbsPartIdx; 1239 #endif 1300 1240 m_apiMVPIdx[eRefPicList] = pcCU->getMVPIdx(eRefPicList) + uiAbsPartIdx; 1301 m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx; 1302 1241 m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx; 1303 1242 #if H_3D_ARP 1304 1243 m_puhARPW = pcCU->getARPW() + uiAbsPartIdx; 1305 #endif 1306 1307 1244 #endif 1308 1245 #if H_3D_DBBP 1309 1246 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiAbsPartIdx; … … 1340 1277 Int sizeInChar = sizeof( Char ) * uiNumPartition; 1341 1278 memcpy( m_skipFlag + uiOffset, pcCU->getSkipFlag(), sizeof( *m_skipFlag ) * uiNumPartition ); 1342 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331279 #if H_3D 1343 1280 memcpy( m_bDISFlag + uiOffset, pcCU->getDISFlag(), sizeof( *m_bDISFlag ) * uiNumPartition ); 1344 1281 memcpy( m_uiDISType + uiOffset, pcCU->getDISType(), sizeof( *m_uiDISType ) * uiNumPartition); 1345 #else1346 #if H_3D_SINGLE_DEPTH1347 memcpy( m_singleDepthFlag + uiOffset, pcCU->getSingleDepthFlag(), sizeof( *m_singleDepthFlag ) * uiNumPartition );1348 memcpy( m_apSingleDepthValue + uiOffset, pcCU->getSingleDepthValue(), sizeof( *m_apSingleDepthValue ) * uiNumPartition);1349 #endif1350 1282 #endif 1351 1283 memcpy( m_phQP + uiOffset, pcCU->getQP(), sizeInChar ); … … 1358 1290 memcpy( m_piVSPFlag + uiOffset, pcCU->getVSPFlag(), sizeof( Char ) * uiNumPartition ); 1359 1291 memcpy( m_pDvInfo + uiOffset, pcCU->getDvInfo(), sizeof( *m_pDvInfo ) * uiNumPartition ); 1360 1361 1292 #endif 1362 1293 #if H_3D_SPIVMP … … 1374 1305 memcpy( m_puhCbf[1] + uiOffset, pcCU->getCbf(TEXT_CHROMA_U), iSizeInUchar ); 1375 1306 memcpy( m_puhCbf[2] + uiOffset, pcCU->getCbf(TEXT_CHROMA_V), iSizeInUchar ); 1376 1377 1378 1379 1307 #if H_3D_DIM 1380 1308 for( Int i = 0; i < DIM_NUM_TYPE; i++ ) … … 1465 1393 1466 1394 memcpy( rpcCU->getSkipFlag() + m_uiAbsIdxInLCU, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition ); 1467 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331395 #if H_3D 1468 1396 memcpy( rpcCU->getDISFlag() + m_uiAbsIdxInLCU, m_bDISFlag, sizeof( *m_bDISFlag ) * m_uiNumPartition ); 1469 1397 memcpy( rpcCU->getDISType() + m_uiAbsIdxInLCU, m_uiDISType, sizeof( *m_uiDISType ) * m_uiNumPartition ); 1470 #else1471 #if H_3D_SINGLE_DEPTH1472 memcpy( rpcCU->getSingleDepthFlag() + m_uiAbsIdxInLCU, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * m_uiNumPartition );1473 memcpy( rpcCU->getSingleDepthValue() + m_uiAbsIdxInLCU, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * m_uiNumPartition);1474 #endif1475 1398 #endif 1476 1399 memcpy( rpcCU->getQP() + m_uiAbsIdxInLCU, m_phQP, sizeInChar ); … … 1478 1401 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof(* m_pDvInfo) * m_uiNumPartition ); 1479 1402 #endif 1480 1481 1482 1403 memcpy( rpcCU->getPartitionSize() + m_uiAbsIdxInLCU, m_pePartSize, sizeof( *m_pePartSize ) * m_uiNumPartition ); 1483 1404 memcpy( rpcCU->getPredictionMode() + m_uiAbsIdxInLCU, m_pePredMode, sizeof( *m_pePredMode ) * m_uiNumPartition ); … … 1585 1506 Int sizeInChar = sizeof( Char ) * uiQNumPart; 1586 1507 memcpy( rpcCU->getSkipFlag() + uiPartOffset, m_skipFlag, sizeof( *m_skipFlag ) * uiQNumPart ); 1587 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331508 #if H_3D 1588 1509 memcpy( rpcCU->getDISFlag() + uiPartOffset, m_bDISFlag, sizeof( *m_bDISFlag ) * uiQNumPart ); 1589 1510 memcpy( rpcCU->getDISType() + uiPartOffset, m_uiDISType, sizeof( *m_uiDISType ) * uiQNumPart ); 1590 #else1591 #if H_3D_SINGLE_DEPTH1592 memcpy( rpcCU->getSingleDepthFlag() + uiPartOffset, m_singleDepthFlag, sizeof( *m_singleDepthFlag ) * uiQNumPart );1593 memcpy( rpcCU->getSingleDepthValue() + uiPartOffset, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * uiQNumPart);1594 #endif1595 1511 #endif 1596 1512 memcpy( rpcCU->getQP() + uiPartOffset, m_phQP, sizeInChar ); … … 1616 1532 memcpy( rpcCU->getCbf(TEXT_CHROMA_U) + uiPartOffset, m_puhCbf[1], iSizeInUchar ); 1617 1533 memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2], iSizeInUchar ); 1618 1619 1620 1534 #if H_3D_DIM 1621 1535 for( Int i = 0; i < DMM_NUM_TYPE; i++ ) … … 2352 2266 { 2353 2267 return NULL; 2354 } 2355 2268 } 2356 2269 #if H_3D_FCO 2357 2270 TComPic* depthPic = getSlice()->getIvPic(true, getSlice()->getViewIndex() ); … … 2388 2301 Int iPictureHeight = depthPicYuv->getHeight(); 2389 2302 2390 #if !HS_DBBP_CLEAN_K00482391 Int iWidth = uiWidth;2392 Int iHeight = uiHeight;2393 #endif2394 2303 2395 2304 Bool depthRefineFlag = false; … … 2404 2313 } 2405 2314 2406 #if HS_DBBP_CLEAN_K00482407 2315 Int depthPosX = Clip3(0, iPictureWidth - 1, iBlkX + ((cDv.getHor()+2)>>2)); 2408 2316 Int depthPosY = Clip3(0, iPictureHeight - 1, iBlkY + ((cDv.getVer()+2)>>2)); 2409 #else2410 Int depthPosX = Clip3(0, iPictureWidth - iWidth, iBlkX + ((cDv.getHor()+2)>>2));2411 Int depthPosY = Clip3(0, iPictureHeight- iHeight, iBlkY + ((cDv.getVer()+2)>>2));2412 #endif2413 2317 2414 2318 pDepthPels = depthPicYuv->getLumaAddr() + depthPosX + depthPosY * uiDepthStride; … … 2500 2404 memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) ); 2501 2405 } 2502 2503 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2406 #if H_3D 2504 2407 Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt absPartIdx, UInt depth ) 2505 2408 { … … 2512 2415 setSubPartT( uiDISType, m_uiDISType, uiAbsPartIdx, uiDepth, uiPUIdx ); 2513 2416 } 2514 #else2515 #if H_3D_SINGLE_DEPTH2516 Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth )2517 {2518 assert( sizeof( *m_singleDepthFlag) == 1 );2519 memset( m_singleDepthFlag + absPartIdx, singleDepth, m_pcPic->getNumPartInCU() >> ( 2 * depth ) );2520 }2521 2522 Void TComDataCU::setSingleDepthValueSubParts(Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth )2523 {2524 setSubPartT<Pel>( singleDepthValue, m_apSingleDepthValue, uiAbsPartIdx, uiDepth, uiPUIdx );2525 }2526 #endif2527 2417 #endif 2528 2418 … … 3941 3831 #endif 3942 3832 #if H_3D_ARP 3943 Bool bARPFlag = getARPW(uiAbsPartIdx) >0 ? true : false;3833 Bool bARPFlag = getARPW(uiAbsPartIdx) > 0; 3944 3834 #endif 3945 3835 #if H_3D_DBBP … … 3974 3864 m_mergCands[MRG_A1].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 3975 3865 #if H_3D_VSP 3976 , 3977 (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 3866 , (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 3978 3867 #if H_3D_IC 3979 3868 && !bICFlag … … 3998 3887 m_mergCands[MRG_B1].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 3999 3888 #if H_3D_VSP 4000 , 4001 false 3889 , false 4002 3890 #endif 4003 3891 , false … … 4026 3914 m_mergCands[MRG_A0].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4027 3915 #if H_3D_VSP 4028 , 4029 false 3916 , false 4030 3917 #endif 4031 3918 , false … … 4040 3927 m_mergCands[MRG_B2].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc] 4041 3928 #if H_3D_VSP 4042 , 4043 false 3929 , false 4044 3930 #endif 4045 3931 , false … … 4068 3954 TComPic * pcTexPic = m_pcSlice->getTexturePic(); 4069 3955 #if H_3D_FCO 4070 #if H_3D_FCO4071 3956 if (pcTexPic && pcTexPic->getReconMark()) 4072 #else4073 if (pcTexturePic->getReconMark())4074 #endif4075 3957 { 4076 3958 #endif … … 4107 3989 Int iTexPosX, iTexPosY; 4108 3990 const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4109 3991 4110 3992 Int iCenterPosX = iCurrPosX + ( ( iWidth / iPUWidth ) >> 1 ) * iPUWidth + ( iPUWidth >> 1 ); 4111 3993 Int iCenterPosY = iCurrPosY + ( ( iHeight / iPUHeight ) >> 1 ) * iPUHeight + (iPUHeight >> 1); … … 4114 3996 if(iWidth == iPUWidth && iHeight == iPUHeight) 4115 3997 { 4116 4117 3998 iCenterPosX = iCurrPosX + (iWidth >> 1); 3999 iCenterPosY = iCurrPosY + (iHeight >> 1); 4118 4000 } 4119 4001 … … 4151 4033 if ( bSPIVMPFlag == true ) 4152 4034 { 4153 4154 4155 4156 4035 iInterDirSaved = (cMvFieldSaved[0].getRefIdx()!=-1 ? 1: 0) + (cMvFieldSaved[1].getRefIdx()!=-1 ? 2: 0); 4036 tmpDir = iInterDirSaved; 4037 tmpMV[0] = cMvFieldSaved[0]; 4038 tmpMV[1] = cMvFieldSaved[1]; 4157 4039 } 4158 4040 … … 4180 4062 TComMv cMv = cTexMvField.getMv() + cMvRounding; 4181 4063 cMv >>=2; 4182 #if !(NTT_BUG_FIX_TK54)4183 this->clipMv( cMv );4184 #endif4185 4064 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef); 4186 4065 } … … 4197 4076 } 4198 4077 } 4199 #if !SHARP_SUBBLOCK_CLEAN_K00444200 if (iPUHeight + iPUWidth == 12)4201 {4202 if (puhInterDirSP[iPartition] == 3)4203 {4204 puhInterDirSP[iPartition] = 1;4205 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1);4206 }4207 }4208 #endif4209 4078 4210 4079 iPartition ++; … … 4309 4178 if (!bRemoveSpa) 4310 4179 { 4311 Bool SPIVMPFlag = false;4180 Bool spiMvpFlag = false; 4312 4181 if(!m_pcSlice->getIsDepth()) 4313 4182 { 4314 SPIVMPFlag = true;4183 spiMvpFlag = true; 4315 4184 } 4316 4185 #if H_3D_DBBP 4317 SPIVMPFlag &= !bDBBPFlag;4318 #endif 4319 4320 m_mergCands[MRG_IVMC].setCand( tmpMV, ivCandDir[0], false, SPIVMPFlag);4186 spiMvpFlag &= !bDBBPFlag; 4187 #endif 4188 4189 m_mergCands[MRG_IVMC].setCand( tmpMV, ivCandDir[0], false, spiMvpFlag); 4321 4190 4322 4191 if ( mrgCandIdx == iCount ) … … 5422 5291 } 5423 5292 5424 #if SONY_MV_V_CONST_C00785425 Void TComDataCU::checkM V_V(TComMv& rcMv, RefPicList eRefPicList, int iRefIdx )5293 #if H_MV 5294 Void TComDataCU::checkMvVertRest (TComMv& rcMv, RefPicList eRefPicList, int iRefIdx ) 5426 5295 { 5427 5296 if ( getSlice()->getSPS()->getInterViewMvVertConstraintFlag() ) … … 5780 5649 } 5781 5650 5782 if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) // CY: this condition equals to both bIsCurrRefLongTerm and bIsColRefLongTerm being 15651 if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) 5783 5652 { 5784 5653 #if H_3D_TMVP 5785 #if !H_3D_FIX_TMVP_SCALING_VIEW_ID5786 Int iCurrViewId = m_pcSlice->getViewIndex ();5787 Int iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewIndex ();5788 Int iColViewId = pColCU->getSlice()->getViewIndex();5789 Int iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewIndex();5790 #else5791 5654 Int iCurrViewId = m_pcSlice->getViewId (); 5792 5655 Int iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId (); 5793 5656 Int iColViewId = pColCU->getSlice()->getViewId(); 5794 5657 Int iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId(); 5795 #endif5796 #if H_3D_TMVP_SCALING_FIX_K00535797 5658 iScale = 4096; 5798 5659 if ( iCurrRefViewId != iCurrViewId && iColViewId != iColRefViewId ) 5799 #endif 5660 { 5800 5661 iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId ); 5801 #if H_3D_TMVP_FIX_TICKET_97 5662 } 5802 5663 if ( bMRG && iScale != 4096 && m_pcSlice->getIvMvScalingFlag( ) ) 5803 #else5804 if ( iScale != 4096 && m_pcSlice->getIvMvScalingFlag( ) )5805 #endif5806 5664 { 5807 5665 rcMv = cColMv.scaleMv( iScale ); … … 5815 5673 #endif 5816 5674 } 5817 else // CY: both bIsCurrRefLongTerm and bIsColRefLongTerm are 05675 else 5818 5676 { 5819 5677 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); … … 5979 5837 } 5980 5838 #endif 5839 5981 5840 #if H_3D_IV_MERGE 5982 #if SEC_ARP_REM_ENC_RESTRICT_K00355983 5841 Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5984 #else 5985 Bool TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5986 #endif 5987 { 5988 5842 { 5989 5843 assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N); 5990 5844 … … 5992 5846 if ( getSlice()->getDefaultRefViewIdxAvailableFlag() ) 5993 5847 { 5994 Int iViewIdx = getSlice()->getDefaultRefViewIdx(); 5995 pDisp->m_aVIdxCan = iViewIdx; 5996 Int iDisp = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ]; 5997 5998 cMv.setHor(iDisp); 5999 cMv.setVer(0); 6000 pDisp->m_acNBDV = cMv; 6001 pDisp->m_aVIdxCan = iViewIdx; 6002 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6003 return true; 6004 #endif 6005 } 6006 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6007 return false; 6008 #endif 6009 } 6010 #endif 6011 6012 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 5848 Int iViewIdx = getSlice()->getDefaultRefViewIdx(); 5849 pDisp->m_aVIdxCan = iViewIdx; 5850 Int iDisp = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ]; 5851 5852 cMv.setHor(iDisp); 5853 cMv.setVer(0); 5854 pDisp->m_acNBDV = cMv; 5855 pDisp->m_aVIdxCan = iViewIdx; 5856 } 5857 } 5858 #endif 5859 5860 #if H_3D 6013 5861 Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index ) 6014 5862 { 6015 #if NEIGHBORING_PIX_AVAILABILITY_FIX6016 5863 UInt uiPartIdxLT, uiPartIdxRT; 6017 5864 this->deriveLeftRightTopIdxAdi( uiPartIdxLT, uiPartIdxRT, 0, 0 ); … … 6066 5913 6067 5914 return bDepAvail; 6068 #else 6069 Bool bDepAvail = false; 6070 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 6071 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 6072 6073 Int xP, yP, nPSW, nPSH; 6074 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 6075 UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight(); 6076 UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth(); 6077 switch(index) 6078 { 6079 case 0: // Mid Left 6080 if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) ) 6081 { 6082 *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ]; 6083 bDepAvail = true; 6084 } 6085 break; 6086 case 1: // Mid Above 6087 if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) ) 6088 { 6089 *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ]; 6090 bDepAvail = true; 6091 } 6092 break; 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: 6129 break; 6130 } 6131 return bDepAvail; 6132 } 6133 #endif 6134 #endif 6135 5915 } 5916 #endif 6136 5917 #if H_3D_NBDV 6137 5918 //Notes from QC: … … 6139 5920 //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 6140 5921 //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_K00356142 5922 Void TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo 6143 #else6144 Bool TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo6145 #endif6146 5923 #if H_3D_NBDV_REF 6147 5924 , Bool bDepthRefine … … 6151 5928 //// ******* Init variables ******* ///// 6152 5929 // Init disparity struct for results 6153 #if !SEC_ARP_REM_ENC_RESTRICT_K00356154 pDInfo->bDV = false;6155 #endif6156 5930 pDInfo->m_aVIdxCan = -1; 6157 5931 … … 6217 5991 if( bCheck ) 6218 5992 { 6219 #if !(NTT_BUG_FIX_TK54)6220 clipMv(cColMv);6221 #endif6222 5993 pDInfo->m_acNBDV = cColMv; 6223 5994 pDInfo->m_aVIdxCan = iTargetViewIdx; … … 6239 6010 #else 6240 6011 picDepth = getSlice()->getIvPic( true, iTargetViewIdx ); 6241 #if !BUG_FIX_TK656242 assert(picDepth != NULL);6243 #endif6244 6012 #endif 6245 6013 if (picDepth && bDepthRefine) 6014 { 6246 6015 estimateDVFromDM(iTargetViewIdx, uiPartIdx, picDepth, uiPartAddr, &cColMv ); 6247 6016 } 6248 6017 pDInfo->m_acDoNBDV = cColMv; 6249 6018 #endif //H_3D_NBDV_REF 6250 #if SEC_ARP_REM_ENC_RESTRICT_K00356251 6019 return; 6252 #else6253 return true;6254 #endif6255 6020 } 6256 6021 } … … 6269 6034 #endif 6270 6035 ) ) 6271 #if SEC_ARP_REM_ENC_RESTRICT_K00356272 6036 return; 6273 #else6274 return true;6275 #endif6276 6037 6277 6038 //// ******* Get disparity from above block ******* ///// … … 6285 6046 #endif 6286 6047 ) ) 6287 #if SEC_ARP_REM_ENC_RESTRICT_K00356288 6048 return; 6289 #else6290 return true;6291 #endif6292 6049 } 6293 6050 … … 6302 6059 { 6303 6060 TComMv cDispVec = cIDVInfo.m_acMvCand[iList][ curPos ]; 6304 #if !(NTT_BUG_FIX_TK54)6305 clipMv( cDispVec );6306 #endif6307 6061 pDInfo->m_acNBDV = cDispVec; 6308 6062 pDInfo->m_aVIdxCan = cIDVInfo.m_aVIdxCan[iList][ curPos ]; … … 6324 6078 #else 6325 6079 TComPic* picDepth = getSlice()->getIvPic( true, pDInfo->m_aVIdxCan ); 6326 #if !BUG_FIX_TK656327 assert(picDepth!=NULL);6328 #endif6329 6080 #endif 6330 6081 … … 6335 6086 pDInfo->m_acDoNBDV = cDispVec; 6336 6087 #endif 6337 #if SEC_ARP_REM_ENC_RESTRICT_K00356338 6088 return; 6339 #else6340 return true;6341 #endif6342 6089 } 6343 6090 } … … 6350 6097 if (getSlice()->getDefaultRefViewIdxAvailableFlag()) 6351 6098 { 6352 6099 pDInfo->m_aVIdxCan = getSlice()->getDefaultRefViewIdx(); 6353 6100 6354 6101 #if H_3D_NBDV_REF 6355 6102 TComPic* picDepth = NULL; 6356 6103 #if H_3D_FCO_VSP_DONBDV_E0163 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6104 picDepth = getSlice()->getIvPic(true, getSlice()->getViewIndex() ); 6105 if ( picDepth->getPicYuvRec() != NULL ) 6106 { 6107 defaultDV.setZero(); 6108 } 6109 else // Go back with virtual depth 6110 { 6111 picDepth = getSlice()->getIvPic( true, getSlice()->getDefaultRefViewIdx()); 6112 } 6113 6114 assert(picDepth != NULL); 6368 6115 #else 6369 picDepth = getSlice()->getIvPic( true, getSlice()->getDefaultRefViewIdx()); 6370 #endif 6371 if (picDepth && bDepthRefine) 6372 { 6373 estimateDVFromDM(getSlice()->getDefaultRefViewIdx(), uiPartIdx, picDepth, uiPartAddr, &defaultDV ); // from base view 6374 } 6375 pDInfo->m_acDoNBDV = defaultDV; 6376 #endif 6377 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6378 return true; 6379 #endif 6380 } 6381 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 6382 return false; 6383 #endif 6116 picDepth = getSlice()->getIvPic( true, getSlice()->getDefaultRefViewIdx()); 6117 #endif 6118 if (picDepth && bDepthRefine) 6119 { 6120 estimateDVFromDM(getSlice()->getDefaultRefViewIdx(), uiPartIdx, picDepth, uiPartAddr, &defaultDV ); // from base view 6121 } 6122 pDInfo->m_acDoNBDV = defaultDV; 6123 #endif 6124 } 6384 6125 } 6385 6126 … … 6423 6164 Pel iDisp = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT ); 6424 6165 cMvPred->setHor( iDisp ); 6425 #if !(NTT_BUG_FIX_TK54)6426 clipMv(*cMvPred);6427 #endif6428 6166 } 6429 6167 } … … 6451 6189 if (refViewIdx != m_pcSlice->getViewIndex()) 6452 6190 { 6453 #if !(NTT_BUG_FIX_TK54)6454 clipMv(cMvPred);6455 #endif6456 6191 pNbDvInfo->m_acNBDV = cMvPred; 6457 6192 pNbDvInfo->m_aVIdxCan = refViewIdx; … … 6472 6207 #else 6473 6208 picDepth = getSlice()->getIvPic (true, refViewIdx ); 6474 #if !BUG_FIX_TK656475 assert(picDepth != NULL);6476 #endif6477 6209 #endif 6478 6210 UInt uiPartIdx = 0; //Notes from MTK: Please confirm that using 0 as partition index and partition address is correct for CU-level DoNBDV … … 6480 6212 6481 6213 if (picDepth && bDepthRefine) 6214 { 6482 6215 estimateDVFromDM(refViewIdx, uiPartIdx, picDepth, uiPartAddr, &cMvPred ); 6483 6216 } 6484 6217 pNbDvInfo->m_acDoNBDV = cMvPred; 6485 6218 #endif … … 6870 6603 #endif 6871 6604 #endif 6872 #if !(NTT_BUG_FIX_TK54)6873 clipMv( cMv );6874 #endif6875 6605 paiPdmRefIdx [ uiCurrRefListId ] = iPdmRefIdx; 6876 6606 pacPdmMv [ uiCurrRefListId ] = cMv; … … 6904 6634 { 6905 6635 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 6906 Bool bLoop _stop = false;6907 for(Int iLoop = 0; iLoop < 2 && !bLoop _stop; ++iLoop)6636 Bool bLoopStop = false; 6637 for(Int iLoop = 0; iLoop < 2 && !bLoopStop; ++iLoop) 6908 6638 { 6909 6639 RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); … … 6931 6661 } 6932 6662 6933 #if !(NTT_BUG_FIX_TK54) 6934 clipMv( cMv ); 6935 #endif 6936 bLoop_stop = true; 6663 bLoopStop = true; 6937 6664 6938 6665 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx); … … 6954 6681 6955 6682 } 6956 #if !SHARP_SUBBLOCK_CLEAN_K00446957 if (iSPHeight + iSPWidth == 12)6958 {6959 if (puhInterDirSP[iPartition] == 3)6960 {6961 puhInterDirSP[iPartition] = 1;6962 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1);6963 }6964 }6965 #endif6966 6683 iPartition ++; 6967 6684 } … … 6996 6713 Int iBaseAbsPartIdx; 6997 6714 6998 #if SEC_SHIFTED_IVMC_POS_K00366999 6715 Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth * 2 ); 7000 6716 Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2 ); 7001 #else7002 Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 );7003 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 );7004 #endif7005 6717 7006 6718 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); … … 7048 6760 #endif 7049 6761 #endif 7050 #if !(NTT_BUG_FIX_TK54)7051 clipMv( cMv );7052 #endif7053 6762 paiPdmRefIdx [ (uiCurrRefListId + (iLoopCan<<2)) ] = iPdmRefIdx; 7054 6763 pacPdmMv [ (uiCurrRefListId + (iLoopCan<<2)) ] = cMv; … … 7104 6813 #endif 7105 6814 cMv.setVer( 0 ); 7106 #if !(NTT_BUG_FIX_TK54)7107 clipMv( cMv );7108 #endif7109 6815 pacPdmMv [iRefListId + 2 + (iLoopCan<<2)] = cMv; 7110 6816 } … … 7187 6893 { 7188 6894 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1); 7189 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; } 6895 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) 6896 { 6897 m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; 6898 } 7190 6899 } 7191 6900 #endif -
trunk/source/Lib/TLibCommon/TComDataCU.h
r1179 r1196 72 72 PartSize eVirtualPartSize; 73 73 UInt uiVirtualPartIndex; 74 } D BBPTmpData;74 } DbbpTmpData; 75 75 #endif 76 76 … … 110 110 // ------------------------------------------------------------------------------------------------------------------- 111 111 Bool* m_skipFlag; ///< array of skip flags 112 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033112 #if H_3D 113 113 Bool* m_bDISFlag; 114 114 UInt* m_uiDISType; 115 #else116 #if H_3D_SINGLE_DEPTH117 Bool* m_singleDepthFlag; ///< array of single depth flags118 Pel* m_apSingleDepthValue;119 #endif120 115 #endif 121 116 Char* m_pePartSize; ///< array of partition sizes … … 178 173 #endif 179 174 #if H_3D_VSP 180 Char* m_piVSPFlag; ///< array of VSP flags to indicate whehter a block uses VSP or not 181 ///< 0: non-VSP; 1: VSP 175 Char* m_piVSPFlag; ///< array of VSP flags to indicate whehter a block uses VSP or not ///< 0: non-VSP; 1: VSP 182 176 #endif 183 177 #if H_3D_SPIVMP 184 Bool* m_pbSPIVMPFlag; ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP 185 ///< 0: non-SPIVMP; 1: SPIVMP 178 Bool* m_pbSPIVMPFlag; ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP ///< 0: non-SPIVMP; 1: SPIVMP 186 179 #endif 187 180 #if H_3D_ARP … … 199 192 Bool* m_pbSDCFlag; 200 193 Pel* m_apSegmentDCOffset[2]; 201 Pel m_apDmmPredictor[2];194 Pel m_apDmmPredictor[2]; 202 195 #endif 203 196 #endif 204 197 #if H_3D_DBBP 205 198 Bool* m_pbDBBPFlag; ///< array of DBBP flags 206 D BBPTmpData m_sDBBPTmpData;199 DbbpTmpData m_sDBBPTmpData; 207 200 #endif 208 201 #if H_3D … … 252 245 Bool xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx 253 246 #if H_3D_TMVP 254 , 255 Bool bMRG = true 247 , Bool bMRG = true 256 248 #endif 257 249 ); … … 350 342 Void setSkipFlag ( UInt idx, Bool skip) { m_skipFlag[idx] = skip; } 351 343 Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth ); 352 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033344 #if H_3D 353 345 Bool* getDISFlag () { return m_bDISFlag; } 354 346 Bool getDISFlag ( UInt idx) { return m_bDISFlag[idx]; } … … 360 352 Void getDISType ( UInt idx, UInt uiDISType) { m_uiDISType[idx] = uiDISType; } 361 353 Void setDISTypeSubParts ( UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ); 362 #else363 #if H_3D_SINGLE_DEPTH364 Bool* getSingleDepthFlag () { return m_singleDepthFlag; }365 Bool getSingleDepthFlag (UInt idx) { return m_singleDepthFlag[idx]; }366 Void setSingleDepthFlag ( UInt idx, Bool singleDepth) { m_singleDepthFlag[idx] = singleDepth; }367 Void setSingleDepthFlagSubParts ( Bool singleDepth, UInt absPartIdx, UInt depth );368 369 Pel* getSingleDepthValue( ) { return m_apSingleDepthValue; }370 Pel getSingleDepthValue (UInt idx) { return m_apSingleDepthValue[idx]; }371 Void setSingleDepthValue ( UInt idx, Pel pDepthValue) { m_apSingleDepthValue[idx] = pDepthValue; }372 Void setSingleDepthValueSubParts (Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth );373 #endif374 354 #endif 375 355 Char* getPredictionMode () { return m_pePredMode; } … … 385 365 Void setDBBPFlag ( UInt uiIdx, Bool b ) { m_pbDBBPFlag[uiIdx] = b; } 386 366 Void setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 387 D BBPTmpData* getDBBPTmpData () { return &m_sDBBPTmpData; }367 DbbpTmpData* getDBBPTmpData () { return &m_sDBBPTmpData; } 388 368 #endif 389 369 … … 506 486 ); 507 487 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_K0035509 488 Void getDisMvpCandNBDV ( DisInfo* pDInfo 510 #else511 Bool getDisMvpCandNBDV ( DisInfo* pDInfo512 #endif513 489 #if H_3D_NBDV_REF 514 490 , Bool bDepthRefine = false … … 517 493 518 494 #if H_3D 519 #if SEC_ARP_REM_ENC_RESTRICT_K0035520 495 Void getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 521 #else522 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);523 #endif524 496 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 525 #endif 526 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 497 527 498 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index); 528 #else529 #if H_3D_SINGLE_DEPTH530 Bool getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);531 #endif532 499 #endif 533 500 #if H_3D_NBDV_REF … … 625 592 626 593 Void clipMv ( TComMv& rcMv ); 627 #if SONY_MV_V_CONST_C0078628 Void checkM V_V(TComMv& rcMv, RefPicList eRefPicList, int iRefIdx );594 #if H_MV 595 Void checkMvVertRest (TComMv& rcMv, RefPicList eRefPicList, int iRefIdx ); 629 596 #endif 630 597 Void getMvPredLeft ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldA.getMv(); } -
trunk/source/Lib/TLibCommon/TComMotionInfo.cpp
r1179 r1196 335 335 Int iStartPelY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIdx]]; 336 336 Int iEndPelX = iStartPelX + iWidth; 337 Int iEndPelY = iStartPelY + iHeight; 338 339 Int iCurrRaster, uiPartAddr; 337 Int iEndPelY = iStartPelY + iHeight; 340 338 341 339 for (Int i=iStartPelY; i<iEndPelY; i+=pcCU->getPic()->getMinCUHeight()) … … 343 341 for (Int j=iStartPelX; j < iEndPelX; j += pcCU->getPic()->getMinCUWidth()) 344 342 { 345 iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartInWidth() + j/pcCU->getPic()->getMinCUWidth();346 uiPartAddr = g_auiRasterToZscan[iCurrRaster];343 Int iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartInWidth() + j/pcCU->getPic()->getMinCUWidth(); 344 Int uiPartAddr = g_auiRasterToZscan[iCurrRaster]; 347 345 uiPartAddr -= pcCU->getZorderIdxInCU(); 348 346 -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r1179 r1196 63 63 typedef struct _DisCand 64 64 { 65 #if !SEC_ARP_REM_ENC_RESTRICT_K003566 Bool bDV;67 #endif68 65 TComMv m_acNBDV; // DV from NBDV 69 66 #if H_3D_NBDV_REF -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r1179 r1196 54 54 m_pDepthBlock = (Int*) malloc(MAX_NUM_SPU_W*MAX_NUM_SPU_W*sizeof(Int)); 55 55 if (m_pDepthBlock == NULL) 56 { 56 57 printf("ERROR: UKTGHU, No memory allocated.\n"); 58 } 57 59 #endif 58 60 } … … 62 64 #if H_3D_VSP 63 65 if (m_pDepthBlock != NULL) 64 free(m_pDepthBlock); 66 { 67 free(m_pDepthBlock); 68 } 65 69 m_cYuvDepthOnVsp.destroy(); 66 70 #endif … … 513 517 514 518 #if H_3D_DIM_DMM 515 if( dimType == DMM4_IDX && dmm4Segmentation == NULL ) { dmmSegmentation->destroy(); delete dmmSegmentation; } 519 if( dimType == DMM4_IDX && dmm4Segmentation == NULL ) 520 { 521 dmmSegmentation->destroy(); 522 delete dmmSegmentation; 523 } 516 524 #endif 517 525 } … … 630 638 631 639 #if H_3D_DBBP 632 #if HS_DBBP_CLEAN_K0048633 640 PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU) 634 #else635 PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize)636 #endif637 641 { 638 642 // find virtual partitioning for this CU based on depth block 639 643 // segmentation of texture block --> mask IDs 640 644 Pel* pDepthBlockStart = pDepthPels; 641 645 642 646 // first compute average of depth block for thresholding 643 647 Int iSumDepth = 0; 644 648 Int iSubSample = 4; 645 #if HS_DBBP_CLEAN_K0048646 649 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(); 647 650 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); … … 653 656 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 657 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); 658 655 659 UInt t=0; 656 660 657 661 for (Int y=0; y<uiSize; y+=iSubSample) 658 662 { 659 663 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 else667 {668 Int depthPel = pDepthPels[x];669 t=x;670 iSumDepth += depthPel;671 }672 }673 664 { 665 if (iBlkX+x>iPictureWidth) 666 { 667 Int depthPel = pDepthPels[t]; 668 iSumDepth += depthPel; 669 } 670 else 671 { 672 Int depthPel = pDepthPels[x]; 673 t=x; 674 iSumDepth += depthPel; 675 } 676 } 677 674 678 // next row 675 679 if (!(iBlkY+y+4>iPictureHeight)) 676 pDepthPels += uiDepthStride*iSubSample; 677 #else 678 for (Int y=0; y<uiSize; y+=iSubSample) 679 { 680 for (Int x=0; x<uiSize; x+=iSubSample) 681 { 682 Int depthPel = pDepthPels[x]; 683 684 iSumDepth += depthPel; 685 } 686 687 // next row 688 pDepthPels += uiDepthStride*iSubSample; 689 #endif 690 } 691 680 { 681 pDepthPels += uiDepthStride*iSubSample; 682 } 683 } 684 692 685 Int iSizeInBits = g_aucConvertToBit[uiSize] - g_aucConvertToBit[iSubSample]; // respect sub-sampling factor 693 686 Int iMean = iSumDepth >> iSizeInBits*2; // iMean /= (uiSize*uiSize); 694 687 695 688 // start again for segmentation 696 689 pDepthPels = pDepthBlockStart; 697 690 698 691 // start mapping process 699 692 Int matchedPartSum[2][2] = {{0,0},{0,0}}; // counter for each part size and boolean option 700 693 PartSize virtualPartSizes[2] = { SIZE_Nx2N, SIZE_2NxN}; 701 694 702 695 UInt uiHalfSize = uiSize>>1; 703 696 for (Int y=0; y<uiSize; y+=iSubSample) … … 705 698 for (Int x=0; x<uiSize; x+=iSubSample) 706 699 { 707 #if HS_DBBP_CLEAN_K0048708 700 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 719 Int depthPel = pDepthPels[x]; 720 #endif 721 701 if (iBlkX+x>iPictureWidth) 702 { 703 depthPel = pDepthPels[t]; 704 } 705 else 706 { 707 depthPel = pDepthPels[x]; 708 t=x; 709 } 710 722 711 // decide which segment this pixel belongs to 723 712 Int ucSegment = (Int)(depthPel>iMean); 724 713 725 714 // Matched Filter to find optimal (conventional) partitioning 726 715 727 716 // SIZE_Nx2N 728 717 if(x<uiHalfSize) // left … … 734 723 matchedPartSum[0][1-ucSegment]++; 735 724 } 736 725 737 726 // SIZE_2NxN 738 727 if(y<uiHalfSize) // top … … 745 734 } 746 735 } 747 736 748 737 // next row 749 #if HS_DBBP_CLEAN_K0048750 738 if (!(iBlkY+y+4>iPictureHeight)) 751 #endif 752 pDepthPels += uiDepthStride*iSubSample; 753 } 754 739 { 740 pDepthPels += uiDepthStride*iSubSample; 741 } 742 } 743 755 744 PartSize matchedPartSize = SIZE_NONE; 756 745 757 746 Int iMaxMatchSum = 0; 758 747 for(Int p=0; p<2; p++) // loop over partition … … 767 756 } 768 757 } 769 758 770 759 AOF( matchedPartSize != SIZE_NONE ); 771 760 772 761 return matchedPartSize; 773 762 } 774 763 775 #if HS_DBBP_CLEAN_K0048776 764 Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU) 777 #else778 Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask )779 #endif780 765 { 781 766 // segmentation of texture block --> mask IDs … … 786 771 Int uiMinDepth = MAX_INT; 787 772 Int uiMaxDepth = 0; 788 #if HS_DBBP_CLEAN_K0048789 773 uiMinDepth = pDepthPels[ 0 ]; 790 774 uiMaxDepth = pDepthPels[ 0 ]; 791 775 iSumDepth = pDepthPels[ 0 ]; 792 UInt t=0;776 793 777 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(); 794 778 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); … … 848 832 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 849 833 } 850 #else851 iSumDepth = pDepthPels[ 0 ];852 iSumDepth += pDepthPels[ uiWidth - 1 ];853 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) ];854 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ];855 856 uiMinDepth = pDepthPels[ 0 ];857 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiWidth - 1 ]);858 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);859 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);860 861 uiMaxDepth = pDepthPels[ 0 ];862 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiWidth - 1 ]);863 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);864 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);865 #endif866 834 867 835 // don't generate mask for blocks with small depth range (encoder decision) … … 880 848 881 849 // generate mask 850 UInt t=0; 882 851 UInt uiSumPix[2] = {0,0}; 883 852 for (Int y=0; y<uiHeight; y++) … … 885 854 for (Int x=0; x<uiHeight; x++) 886 855 { 887 #if HS_DBBP_CLEAN_K0048888 856 Int depthPel = 0; 889 857 if (iBlkX+x>iPictureWidth) … … 896 864 t=x; 897 865 } 898 #else899 Int depthPel = pDepthPels[x];900 #endif901 866 902 867 // decide which segment this pixel belongs to … … 916 881 917 882 // next row 918 #if HS_DBBP_CLEAN_K0048919 883 if (!(iBlkY+y+1>iPictureHeight)) 920 #endif921 884 pDepthPels += uiDepthStride; 922 885 pMask += MAX_CU_SIZE; … … 1003 966 } 1004 967 1005 if ( tmpTar ) { xFree(tmpTar); tmpTar = NULL; } 968 if ( tmpTar ) 969 { 970 xFree(tmpTar); 971 tmpTar = NULL; 972 } 1006 973 1007 974 // now combine chroma … … 1106 1073 } 1107 1074 1108 if ( tmpTarU ) { xFree(tmpTarU); tmpTarU = NULL; } 1109 if ( tmpTarV ) { xFree(tmpTarV); tmpTarV = NULL; } 1075 if( tmpTarU ) 1076 { 1077 xFree(tmpTarU); 1078 tmpTarU = NULL; 1079 } 1080 if ( tmpTarV ) 1081 { 1082 xFree(tmpTarV); 1083 tmpTarV = NULL; 1084 } 1110 1085 } 1111 1086 #endif … … 1293 1268 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 1294 1269 pcCU->clipMv(cMv); 1295 #if SONY_MV_V_CONST_C00781296 pcCU->checkM V_V(cMv, eRefPicList, iRefIdx );1270 #if H_MV 1271 pcCU->checkMvVertRest(cMv, eRefPicList, iRefIdx ); 1297 1272 #endif 1298 1273 #if H_3D_ARP … … 1393 1368 #if H_3D_NBDV 1394 1369 DisInfo cDistparity; 1395 #if SEC_ARP_REM_ENC_RESTRICT_K00351396 1370 cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV; 1397 1371 cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; 1398 1372 #else 1399 cDistparity.bDV = pcCU->getDvInfo(uiPartAddr).bDV;1400 if( cDistparity.bDV )1401 {1402 cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV;1403 assert(pcCU->getDvInfo(uiPartAddr).bDV == pcCU->getDvInfo(0).bDV);1404 cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan;1405 }1406 #endif1407 #else1408 1373 assert(0); // ARP can be applied only when a DV is available 1409 1374 #endif 1410 #if SEC_ARP_REM_ENC_RESTRICT_K00351411 1375 UChar dW = pcCU->getARPW ( uiPartAddr ); 1412 #else 1413 UChar dW = cDistparity.bDV ? pcCU->getARPW ( uiPartAddr ) : 0; 1414 #endif 1415 1416 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 1417 if( cDistparity.bDV ) 1418 #endif 1376 1419 1377 { 1420 1378 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); … … 1468 1426 pYuvB0->clear(); pYuvB1->clear(); 1469 1427 } 1470 #if !SEC_ARP_REM_ENC_RESTRICT_K00351471 assert ( cDistparity.bDV );1472 #endif1473 1428 TComMv cNBDV = cDistparity.m_acNBDV; 1474 1429 pcCU->clipMv( cNBDV ); … … 2438 2393 for( UInt k = 0; k < (patternStride * patternStride); k++ ) 2439 2394 { 2440 if( true == biSegPattern[k] ) { ptrDst[k] = valDC2; } 2441 else { ptrDst[k] = valDC1; } 2395 if( true == biSegPattern[k] ) 2396 { 2397 ptrDst[k] = valDC2; 2398 } 2399 else 2400 { 2401 ptrDst[k] = valDC1; 2402 } 2442 2403 } 2443 2404 } … … 2449 2410 for( UInt uiX = 0; uiX < patternStride; uiX++ ) 2450 2411 { 2451 if( true == biSegPattern[uiX] ) { piTemp[uiX] = valDC2; } 2452 else { piTemp[uiX] = valDC1; } 2412 if( true == biSegPattern[uiX] ) 2413 { 2414 piTemp[uiX] = valDC2; 2415 } 2416 else 2417 { 2418 piTemp[uiX] = valDC1; 2419 } 2453 2420 } 2454 2421 piTemp += dstStride; … … 2520 2487 Int iSumPix[2]; 2521 2488 memset(iSumPix, 0, sizeof(Int)*2); 2489 2522 2490 for( Int i = 0; i < uiNumSegments; i++ ) 2523 2491 { 2524 rpSegMeans[i] = 0; 2525 } 2526 if (orgDC == false) 2492 rpSegMeans[i] = 0; 2493 } 2494 2495 if ( !orgDC ) 2527 2496 { 2528 2497 Pel* pLeftTop = pOrig; … … 2544 2513 subSamplePix = 1; 2545 2514 } 2515 2546 2516 for (Int y=0; y<uiSize; y+=subSamplePix) 2547 2517 { … … 2563 2533 { 2564 2534 if( iSumPix[ucSeg] > 0 ) 2535 { 2565 2536 rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg]; 2537 } 2566 2538 else 2539 { 2567 2540 rpSegMeans[ucSeg] = 0; // this happens for zero-segments 2541 } 2568 2542 } 2569 2543 } -
trunk/source/Lib/TLibCommon/TComPrediction.h
r1179 r1196 121 121 Void xPredInterUniSubPU ( TComDataCU *cu, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU=4, Int heightSubPU=4 ); 122 122 #endif 123 124 Void xWeightedAverage ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst ); 125 123 Void xWeightedAverage ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst ); 126 124 Void xGetLLSPrediction ( TComPattern* pcPattern, Int* pSrc0, Int iSrcStride, Pel* pDst0, Int iDstStride, UInt uiWidth, UInt uiHeight, UInt uiExt0 ); 127 125 #if H_3D_IC … … 175 173 176 174 #if H_3D_DBBP 177 #if HS_DBBP_CLEAN_K0048178 175 PartSize getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU); 179 176 Bool getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU); 180 #else181 PartSize getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize);182 Bool getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask );183 #endif184 177 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize ); 185 178 #endif -
trunk/source/Lib/TLibCommon/TComRdCost.cpp
r1179 r1196 341 341 else if( eDFunc >= DF_HADS && eDFunc <= DF_HADS16N ) 342 342 { 343 #if !RWTH_DBBP_NO_SATD_K0028344 rcDistParam.DistFunc = TComRdCost::xGetMaskedHADs;345 #else346 343 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 347 #endif348 344 } 349 345 else if( eDFunc >= DF_VSD && eDFunc <= DF_VSD16N ) … … 445 441 if( m_bUseMask ) 446 442 { 447 #if !RWTH_DBBP_NO_SATD_K0028448 rcDistParam.DistFunc = (bHADME)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD;449 #else450 443 rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD; 451 #endif452 444 } 453 445 #endif … … 472 464 if( m_bUseMask ) 473 465 { 474 #if !RWTH_DBBP_NO_SATD_K0028475 rcDP.DistFunc = (bHadamard)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD;476 #else477 466 rcDP.DistFunc = TComRdCost::xGetMaskedSAD; 478 #endif479 467 } 480 468 #endif … … 729 717 } 730 718 731 #if !RWTH_DBBP_NO_SATD_K0028732 UInt TComRdCost::xGetMaskedHADs( DistParam* pcDtParam )733 {734 AOF(!pcDtParam->bApplyWeight);735 #if H_3D_IC736 AOF(!pcDtParam->bUseIC);737 #endif738 Pel* piOrg = pcDtParam->pOrg;739 Pel* piCur = pcDtParam->pCur;740 Int iRows = pcDtParam->iRows;741 Int iCols = pcDtParam->iCols;742 Int iStrideCur = pcDtParam->iStrideCur;743 Int iStrideOrg = pcDtParam->iStrideOrg;744 Int iStep = pcDtParam->iStep;745 746 Int x, y;747 748 UInt uiSum = 0;749 750 #if NS_HAD751 if( ( ( iRows % 8 == 0) && (iCols % 8 == 0) && ( iRows == iCols ) ) || ( ( iRows % 8 == 0 ) && (iCols % 8 == 0) && !pcDtParam->bUseNSHAD ) )752 #else753 if( ( iRows % 8 == 0) && (iCols % 8 == 0) )754 #endif755 {756 Int iOffsetOrg = iStrideOrg<<3;757 Int iOffsetCur = iStrideCur<<3;758 for ( y=0; y<iRows; y+= 8 )759 {760 for ( x=0; x<iCols; x+= 8 )761 {762 if( piOrg[x] != DBBP_INVALID_SHORT )763 {764 uiSum += xCalcHADs8x8( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );765 }766 }767 piOrg += iOffsetOrg;768 piCur += iOffsetCur;769 }770 }771 #if NS_HAD772 else if ( ( iCols > 8 ) && ( iCols > iRows ) && pcDtParam->bUseNSHAD )773 {774 Int iOffsetOrg = iStrideOrg<<2;775 Int iOffsetCur = iStrideCur<<2;776 for ( y=0; y<iRows; y+= 4 )777 {778 for ( x=0; x<iCols; x+= 16 )779 {780 if( piOrg[x] != DBBP_INVALID_SHORT )781 {782 uiSum += xCalcHADs16x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );783 }784 }785 piOrg += iOffsetOrg;786 piCur += iOffsetCur;787 }788 }789 else if ( ( iRows > 8 ) && ( iCols < iRows ) && pcDtParam->bUseNSHAD )790 {791 Int iOffsetOrg = iStrideOrg<<4;792 Int iOffsetCur = iStrideCur<<4;793 for ( y=0; y<iRows; y+= 16 )794 {795 for ( x=0; x<iCols; x+= 4 )796 {797 if( piOrg[x] != DBBP_INVALID_SHORT )798 {799 uiSum += xCalcHADs4x16( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );800 }801 }802 piOrg += iOffsetOrg;803 piCur += iOffsetCur;804 }805 }806 #endif807 else if( ( iRows % 4 == 0) && (iCols % 4 == 0) )808 {809 Int iOffsetOrg = iStrideOrg<<2;810 Int iOffsetCur = iStrideCur<<2;811 812 for ( y=0; y<iRows; y+= 4 )813 {814 for ( x=0; x<iCols; x+= 4 )815 {816 if( piOrg[x] != DBBP_INVALID_SHORT )817 {818 uiSum += xCalcHADs4x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );819 }820 }821 piOrg += iOffsetOrg;822 piCur += iOffsetCur;823 }824 }825 else if( ( iRows % 2 == 0) && (iCols % 2 == 0) )826 {827 Int iOffsetOrg = iStrideOrg<<1;828 Int iOffsetCur = iStrideCur<<1;829 for ( y=0; y<iRows; y+=2 )830 {831 for ( x=0; x<iCols; x+=2 )832 {833 if( piOrg[x] != DBBP_INVALID_SHORT )834 {835 uiSum += xCalcHADs2x2( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );836 }837 }838 piOrg += iOffsetOrg;839 piCur += iOffsetCur;840 }841 }842 else843 {844 assert(false);845 }846 847 return uiSum >> DISTORTION_PRECISION_ADJUSTMENT(pcDtParam->bitDepth-8);848 }849 #endif850 719 851 720 UInt TComRdCost::xGetMaskedVSD( DistParam* pcDtParam ) … … 2993 2862 UInt TComRdCost::getVSDEstimate( Int dDM, Pel* pOrg, Int iOrgStride, Pel* pVirRec, Pel* pVirOrg, Int iVirStride, Int x, Int y ) 2994 2863 { 2995 Double dD; 2996 Int iTemp; 2997 2998 dD = ( (Double) ( dDM >> DISTORTION_PRECISION_ADJUSTMENT( g_bitDepthY - 8 ) ) ) * m_dDisparityCoeff; 2864 Double dD = ( (Double) ( dDM >> DISTORTION_PRECISION_ADJUSTMENT( g_bitDepthY - 8 ) ) ) * m_dDisparityCoeff; 2999 2865 3000 2866 Double dDepthWeight = ( pOrg[x] >= ( (1<<(g_bitDepthY - 3)) + (1<<(g_bitDepthY - 2)) ) ? 4 : pOrg[x] > ((1<<g_bitDepthY) >> 4) ? (Float)(pOrg[x] - ((1<<g_bitDepthY) >> 4))/(Float)((1<<g_bitDepthY) >> 3) + 1 : 1.0 ); 3001 2867 Double dTemp = ( 0.5 * fabs(dD) * dDepthWeight * ( abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x-1+y*iVirStride ] ) + abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x+1+y*iVirStride ] ) ) ); 3002 iTemp = (Int) (((dTemp) < 0)? (Int)((dTemp) - 0.5) : (Int)((dTemp) + 0.5));2868 Int iTemp = (Int) (((dTemp) < 0)? (Int)((dTemp) - 0.5) : (Int)((dTemp) + 0.5)); 3003 2869 3004 2870 return (UInt) ( (iTemp*iTemp)>>1 ); -
trunk/source/Lib/TLibCommon/TComRdCost.h
r1179 r1196 320 320 static UInt xGetMaskedSSE ( DistParam* pcDtParam ); 321 321 static UInt xGetMaskedSAD ( DistParam* pcDtParam ); 322 #if !RWTH_DBBP_NO_SATD_K0028323 static UInt xGetMaskedHADs ( DistParam* pcDtParam );324 #endif325 322 static UInt xGetMaskedVSD ( DistParam* pcDtParam ); 326 323 #endif -
trunk/source/Lib/TLibCommon/TComRom.cpp
r1179 r1196 104 104 if( !g_dmmWedgeLists.empty() ) 105 105 { 106 for( UInt ui = 0; ui < g_dmmWedgeLists.size(); ui++ ) { g_dmmWedgeLists[ui].clear(); } 106 for( UInt ui = 0; ui < g_dmmWedgeLists.size(); ui++ ) 107 { 108 g_dmmWedgeLists[ui].clear(); 109 } 107 110 g_dmmWedgeLists.clear(); 108 111 } 109 112 if( !g_dmmWedgeRefLists.empty() ) 110 113 { 111 for( UInt ui = 0; ui < g_dmmWedgeRefLists.size(); ui++ ) { g_dmmWedgeRefLists[ui].clear(); } 114 for( UInt ui = 0; ui < g_dmmWedgeRefLists.size(); ui++ ) 115 { 116 g_dmmWedgeRefLists[ui].clear(); 117 } 112 118 g_dmmWedgeRefLists.clear(); 113 119 } … … 115 121 if( !g_dmmWedgeNodeLists.empty() ) 116 122 { 117 for( UInt ui = 0; ui < g_dmmWedgeNodeLists.size(); ui++ ) { g_dmmWedgeNodeLists[ui].clear(); } 123 for( UInt ui = 0; ui < g_dmmWedgeNodeLists.size(); ui++ ) 124 { 125 g_dmmWedgeNodeLists[ui].clear(); 126 } 118 127 g_dmmWedgeNodeLists.clear(); 119 128 } … … 745 754 assert( uiWidth == uiHeight ); 746 755 747 #if SHARP_DMM_CLEAN_K0042748 756 Int posStart = 0, posEnd = 0; 749 #else750 UChar uhStartX = 0, uhStartY = 0, uhEndX = 0, uhEndY = 0;751 Int iStepStartX = 0, iStepStartY = 0, iStepEndX = 0, iStepEndY = 0;752 #endif753 757 754 758 UInt uiBlockSize = 0; … … 762 766 for( UInt uiOri = 0; uiOri < 6; uiOri++ ) 763 767 { 764 #if !SHARP_DMM_CLEAN_K0042 765 // init the edge line parameters for each of the 6 wedgelet types 766 switch( uiOri ) 767 { 768 case( 0 ): { uhStartX = 0; uhStartY = 0; uhEndX = 0; uhEndY = 0; iStepStartX = +1; iStepStartY = 0; iStepEndX = 0; iStepEndY = +1; break; } 769 case( 1 ): { uhStartX = (uiBlockSize-1); uhStartY = 0; uhEndX = (uiBlockSize-1); uhEndY = 0; iStepStartX = 0; iStepStartY = +1; iStepEndX = -1; iStepEndY = 0; break; } 770 case( 2 ): { uhStartX = (uiBlockSize-1); uhStartY = (uiBlockSize-1); uhEndX = (uiBlockSize-1); uhEndY = (uiBlockSize-1); iStepStartX = -1; iStepStartY = 0; iStepEndX = 0; iStepEndY = -1; break; } 771 case( 3 ): { uhStartX = 0; uhStartY = (uiBlockSize-1); uhEndX = 0; uhEndY = (uiBlockSize-1); iStepStartX = 0; iStepStartY = -1; iStepEndX = +1; iStepEndY = 0; break; } 772 case( 4 ): { uhStartX = 0; uhStartY = 0; uhEndX = 0; uhEndY = (uiBlockSize-1); iStepStartX = +1; iStepStartY = 0; iStepEndX = +1; iStepEndY = 0; break; } 773 case( 5 ): { uhStartX = (uiBlockSize-1); uhStartY = 0; uhEndX = 0; uhEndY = 0; iStepStartX = 0; iStepStartY = +1; iStepEndX = 0; iStepEndY = +1; break; } 774 } 775 #endif 776 777 #if SHARP_DMM_CLEAN_K0042 768 778 769 posEnd = (Int) racWedgeList.size(); 779 770 if (uiOri == 0 || uiOri == 4) 780 771 { 781 #endif782 772 for( Int iK = 0; iK < uiBlockSize; iK += (uiWidth>=16 ?2:1)) 783 773 { 784 774 for( Int iL = 0; iL < uiBlockSize; iL += ((uiWidth>=16 && uiOri<4)?2:1) ) 785 775 { 786 #if SHARP_DMM_CLEAN_K0042787 776 Int xS = iK; 788 777 Int yS = 0; … … 790 779 Int yE = (uiOri == 0) ? iL : uiBlockSize - 1; 791 780 cTempWedgelet.setWedgelet( xS, yS, xE, yE, uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 792 #else793 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) );794 #endif795 781 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 796 782 } 797 783 } 798 #if SHARP_DMM_CLEAN_K0042799 784 } 800 785 else … … 807 792 } 808 793 posStart = posEnd; 809 #endif810 794 } 811 795 -
trunk/source/Lib/TLibCommon/TComRom.h
r1179 r1196 290 290 291 291 #if H_MV_ENC_DEC_TRAC 292 #define DTRACE_CU(x,y) 293 #define DTRACE_PU(x,y) 294 #define DTRACE_TU(x,y) 295 296 #define DTRACE_CU_S(x) 297 #define DTRACE_PU_S(x) 298 #define DTRACE_TU_S(x) 292 #define DTRACE_CU(x,y) ; 293 #define DTRACE_PU(x,y) ; 294 #define DTRACE_TU(x,y) ; 295 296 #define DTRACE_CU_S(x) ; 297 #define DTRACE_PU_S(x) ; 298 #define DTRACE_TU_S(x) ; 299 299 300 300 #endif -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r1179 r1196 137 137 #endif 138 138 #if H_3D 139 #if HHI_INTER_COMP_PRED_K0052140 139 , m_inCmpPredFlag ( false ) 141 #endif142 #if HHI_CAM_PARA_K0052143 140 , m_numViews ( 0 ) 144 #endif145 141 , m_depthToDisparityB ( NULL ) 146 142 , m_depthToDisparityF ( NULL ) 147 #endif 148 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 143 149 144 , m_bApplyDIS (false) 150 #else151 #if H_3D_SINGLE_DEPTH152 , m_bApplySingleDepthMode (false)153 #endif154 145 #endif 155 146 #endif … … 191 182 m_iDefaultRefViewIdx = -1; 192 183 m_bDefaultRefViewIdxAvailableFlag = false; 193 #if H HI_INTER_COMP_PRED_K0052184 #if H_3D 194 185 m_ivMvPredFlag = false; 195 186 m_ivMvScalingFlag = false; … … 214 205 m_puiSubstreamSizes = NULL; 215 206 #if H_3D 216 #if HHI_CAM_PARA_K0052217 207 for( UInt i = 0; i < m_numViews; i++ ) 218 #else219 for( UInt i = 0; i < getViewIndex(); i++ )220 #endif221 208 { 222 209 if ( m_depthToDisparityB && m_depthToDisparityB[ i ] ) … … 604 591 UInt NumPocLtCurr = 0; 605 592 Int i; 606 607 #if HHI_RES_PRED_K0052 593 #if H_3D 608 594 m_pocsInCurrRPSs.clear(); 609 595 #endif 610 611 596 for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++) 612 597 { … … 619 604 NumPocStCurr0++; 620 605 pcRefPic->setCheckLTMSBPresent(false); 621 #if H HI_RES_PRED_K0052606 #if H_3D 622 607 m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 623 608 #endif … … 635 620 NumPocStCurr1++; 636 621 pcRefPic->setCheckLTMSBPresent(false); 637 #if H HI_RES_PRED_K0052622 #if H_3D 638 623 m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 639 624 #endif … … 650 635 RefPicSetLtCurr[NumPocLtCurr] = pcRefPic; 651 636 NumPocLtCurr++; 652 #if H HI_RES_PRED_K0052637 #if H_3D 653 638 m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() ); 654 639 #endif … … 662 647 663 648 Int numPocInterCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; 664 #if H HI_RES_PRED_K0052649 #if H_3D 665 650 assert( numPocInterCurr == (Int) m_pocsInCurrRPSs.size() ); 666 651 #endif … … 837 822 Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset ) 838 823 { 839 #if HHI_CAM_PARA_K0052840 824 Int voiInVps = m_pcVPS->getVoiInVps(getViewIndex() ); 841 825 if( m_pcVPS->getNumCp( voiInVps ) > 0 ) … … 855 839 } 856 840 } 857 #else858 if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) )859 {860 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < m_viewIndex; uiBaseViewIndex++ )861 {862 m_aaiCodedScale [ 0 ][ uiBaseViewIndex ] = aaiScale [ uiBaseViewIndex ][ m_viewIndex ];863 m_aaiCodedScale [ 1 ][ uiBaseViewIndex ] = aaiScale [ m_viewIndex ][ uiBaseViewIndex ];864 m_aaiCodedOffset[ 0 ][ uiBaseViewIndex ] = aaiOffset[ uiBaseViewIndex ][ m_viewIndex ];865 m_aaiCodedOffset[ 1 ][ uiBaseViewIndex ] = aaiOffset[ m_viewIndex ][ uiBaseViewIndex ];866 }867 }868 #endif869 841 } 870 842 #endif … … 1165 1137 } 1166 1138 #endif 1167 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331139 #if H_3D 1168 1140 m_bApplyDIS = pSrc->m_bApplyDIS; 1169 #else1170 #if H_3D_SINGLE_DEPTH1171 m_bApplySingleDepthMode = pSrc->m_bApplySingleDepthMode;1172 #endif1173 1141 #endif 1174 1142 #if H_3D_IC … … 2217 2185 { 2218 2186 m_numViews = 1; 2219 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K00522220 2187 #if H_3D 2221 2188 AOF( m_viewOIdxList.size() == 0 ); … … 2223 2190 m_viewOIdxList.push_back( 0 ); 2224 2191 #endif 2225 #endif2226 2192 2227 2193 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) … … 2241 2207 { 2242 2208 m_numViews++; 2243 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K00522244 2209 #if H_3D 2245 2210 m_viewOIdxList.push_back( getViewOrderIdx( lId ) ); 2246 2211 #endif 2247 #endif2248 2212 } 2249 2213 } … … 2271 2235 } 2272 2236 } 2273 #if !BUG_FIX_TK652274 assert( foundLayerIdinNuh != -1 );2275 #endif2276 2237 return foundLayerIdinNuh; 2277 2238 } … … 2281 2242 Int i = 0, j = 0; 2282 2243 2283 #if HHI_CAM_PARA_K00522284 2244 m_numCp = new Int [ iNumViews ]; 2285 2245 m_cpRefVoi = new Int*[ iNumViews ]; … … 2287 2247 2288 2248 m_cpPresentFlag = new Bool*[ iNumViews ]; 2289 #else2290 m_bCamParPresent = new Bool[ iNumViews ];2291 m_bCamParInSliceHeader = new Bool[ iNumViews ];2292 #endif2293 2249 2294 2250 … … 2297 2253 for ( i = 0; i < iNumViews ; i++ ) 2298 2254 { 2299 #if HHI_CAM_PARA_K00522300 2255 m_cpInSliceSegmentHeaderFlag[i] = false; 2301 #else2302 m_bCamParPresent[i] = false;2303 m_bCamParInSliceHeader[i] = false;2304 #endif2305 2256 2306 2257 m_aaaiCodedScale[i] = new Int*[ 2 ]; 2307 2258 m_aaaiCodedOffset[i] = new Int*[ 2 ]; 2308 2259 2309 #if HHI_CAM_PARA_K00522310 2260 m_numCp [i] = 0; 2311 2261 m_cpRefVoi[i] = new Int[ iNumViews ]; … … 2316 2266 m_cpPresentFlag[i][j] = false; 2317 2267 } 2318 #endif2319 2268 for ( j = 0; j < 2; j++ ) 2320 2269 { … … 2335 2284 Int i = 0, j = 0; 2336 2285 2337 #if !HHI_CAM_PARA_K00522338 if ( m_bCamParPresent != NULL )2339 {2340 delete [] m_bCamParPresent;2341 }2342 if ( m_bCamParInSliceHeader != NULL )2343 {2344 delete [] m_bCamParInSliceHeader;2345 }2346 #else2347 2286 if ( m_numCp != NULL ) 2348 2287 { … … 2373 2312 delete [] m_cpInSliceSegmentHeaderFlag; 2374 2313 } 2375 #endif2376 2314 2377 2315 … … 2404 2342 2405 2343 2406 #if !HHI_CAM_PARA_K00522407 Void TComVPS::initCamParaVPS( UInt uiViewIndex, Bool bCamParPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )2408 {2409 AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) );2410 2411 m_uiCamParPrecision = ( ( uiViewIndex != 0 )? uiCamParPrecision : 0 );2412 m_bCamParPresent[ uiViewIndex ] = (( uiViewIndex != 0 )? bCamParPresent : false );2413 m_bCamParInSliceHeader[ uiViewIndex ] = ( (uiViewIndex != 0)? bCamParSlice : false );2414 2415 if( !m_bCamParInSliceHeader[ uiViewIndex ] )2416 {2417 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )2418 {2419 m_aaaiCodedScale [ uiViewIndex ][ 0 ][ uiBaseViewIndex ] = aaiScale [ uiBaseViewIndex ][ uiViewIndex ];2420 m_aaaiCodedScale [ uiViewIndex ][ 1 ][ uiBaseViewIndex ] = aaiScale [ uiViewIndex ][ uiBaseViewIndex ];2421 m_aaaiCodedOffset[ uiViewIndex ][ 0 ][ uiBaseViewIndex ] = aaiOffset[ uiBaseViewIndex ][ uiViewIndex ];2422 m_aaaiCodedOffset[ uiViewIndex ][ 1 ][ uiBaseViewIndex ] = aaiOffset[ uiViewIndex ][ uiBaseViewIndex ];2423 }2424 }2425 }2426 #endif2427 2344 2428 2345 #endif // H_3D … … 2804 2721 } 2805 2722 2723 #if H_3D 2724 Void TComVPS::initViewCompLayer() 2725 { 2726 assert( m_viewCompLayerId.size() == 0 && m_viewCompLayerPresentFlag.size() == 0 ); 2727 for( Int i = 0; i < getNumViews(); i++ ) 2728 { 2729 m_viewCompLayerId .push_back( std::vector<Int>(0) ); 2730 m_viewCompLayerPresentFlag.push_back( std::vector<Bool>(0) ); 2731 2732 for( Int depFlag = 0; depFlag <= 1; depFlag++ ) 2733 { 2734 Int iViewOIdx = getViewOIdxList( i ); 2735 Int layerId = -1; 2736 for( Int j = 0; j <= getMaxLayersMinus1(); j++ ) 2737 { 2738 Int jNuhLId = getLayerIdInNuh( j ); 2739 if( getVpsDepthFlag( jNuhLId ) == ( (Bool) depFlag ) && getViewOrderIdx( jNuhLId ) == iViewOIdx 2740 && getDependencyId( jNuhLId ) == 0 && getAuxId( jNuhLId ) == 0 ) 2741 { 2742 layerId = jNuhLId; 2743 } 2744 } 2745 m_viewCompLayerPresentFlag[ i ].push_back( layerId != -1 ); 2746 m_viewCompLayerId [ i ].push_back( layerId ); 2747 } 2748 } 2749 } 2750 2751 Int TComVPS::getVoiInVps(Int viewOIdx) 2752 { 2753 for ( Int i = 0; i < m_viewOIdxList.size(); i++ ) 2754 { 2755 if ( m_viewOIdxList[ i ] == viewOIdx ) 2756 { 2757 return i; 2758 } 2759 } 2760 assert( 0 ); 2761 return -1; 2762 } 2763 2764 Void TComVPS::deriveCpPresentFlag() 2765 { 2766 for( Int nInVps = 0; nInVps < getNumViews(); nInVps++ ) 2767 { 2768 for( Int mInVps = 0; mInVps < getNumViews(); mInVps++ ) 2769 { 2770 m_cpPresentFlag[nInVps][mInVps] = 0; 2771 } 2772 } 2773 2774 for( Int n = 1; n < getNumViews(); n++ ) 2775 { 2776 Int iInVps = getVoiInVps( getViewOIdxList( n ) ); 2777 for( Int m = 0; m < getNumCp( iInVps ); m++ ) 2778 { 2779 m_cpPresentFlag[ iInVps ][ getVoiInVps( getCpRefVoi( iInVps, m ) ) ] = 1; 2780 } 2781 } 2782 } 2783 #endif 2806 2784 2807 2785 #endif // H_MV … … 2858 2836 , m_interViewMvVertConstraintFlag (false) 2859 2837 #endif 2860 #if H_3D2861 #if !HHI_CAM_PARA_K00522862 , m_bCamParInSliceHeader (false)2863 #endif2864 #endif2865 2838 { 2866 2839 for ( Int i = 0; i < MAX_TLAYER; i++ ) … … 3885 3858 { 3886 3859 Int layerIdInNuh = getRefPicLayerId( i ); 3887 #if HHI_RES_PRED_K0052 3860 3888 3861 TComPic* picV = getIvPic( getIsDepth(), getVPS()->getViewIndex( layerIdInNuh ) ); 3889 3862 assert( picV != NULL ); … … 3900 3873 3901 3874 if (getFirstTRefIdx(eRefPicList) >= 0 && refRpRefAvailFlag ) 3902 #else3903 Int viewIdx = getVPS()->getViewId( layerIdInNuh );3904 TComPic*pcPicPrev = ivPicLists->getPic(viewIdx, 0, prevPOC);3905 if (getFirstTRefIdx(eRefPicList) >= 0 && pcPicPrev && pcPicPrev->getSlice( 0 )->isReferenced())3906 #endif3907 3875 { 3908 3876 m_arpRefPicAvailable[eRefPicList][layerIdInNuh] = true; … … 3917 3885 } 3918 3886 #endif 3887 3919 3888 #if H_3D_IC 3889 // This is an encoder only function and should be moved to TEncSlice or TEncSearch!! 3920 3890 Void TComSlice::xSetApplyIC(Bool bUseLowLatencyICEnc) 3921 3891 { … … 3981 3951 } 3982 3952 else 3983 { 3984 Int iMaxPelValue = ( 1 << g_bitDepthY ); 3985 Int *aiRefOrgHist; 3986 Int *aiCurrHist; 3987 aiRefOrgHist = (Int *) xMalloc( Int,iMaxPelValue ); 3988 aiCurrHist = (Int *) xMalloc( Int,iMaxPelValue ); 3989 memset( aiRefOrgHist, 0, iMaxPelValue*sizeof(Int) ); 3990 memset( aiCurrHist, 0, iMaxPelValue*sizeof(Int) ); 3991 // Reference Idx Number 3992 Int iNumRefIdx = getNumRefIdx( REF_PIC_LIST_0 ); 3993 TComPic* pcCurrPic = NULL; 3994 TComPic* pcRefPic = NULL; 3995 TComPicYuv* pcCurrPicYuv = NULL; 3996 TComPicYuv* pcRefPicYuvOrg = NULL; 3997 pcCurrPic = getPic(); 3998 pcCurrPicYuv = pcCurrPic->getPicYuvOrg(); 3999 Int iWidth = pcCurrPicYuv->getWidth(); 4000 Int iHeight = pcCurrPicYuv->getHeight(); 4001 4002 4003 // Get InterView Reference picture 4004 // !!!!! Assume only one Interview Reference Picture in L0 4005 for ( Int i = 0; i < iNumRefIdx; i++ ) 4006 { 4007 pcRefPic = getRefPic( REF_PIC_LIST_0, i ); 4008 if ( pcRefPic != NULL ) 4009 { 4010 if ( pcCurrPic->getViewIndex() != pcRefPic->getViewIndex() ) 4011 { 4012 pcRefPicYuvOrg = pcRefPic->getPicYuvOrg(); 4013 } 4014 } 4015 } 4016 4017 if ( pcRefPicYuvOrg != NULL ) 4018 { 4019 Pel* pCurrY = pcCurrPicYuv ->getLumaAddr(); 4020 Pel* pRefOrgY = pcRefPicYuvOrg ->getLumaAddr(); 4021 Int iCurrStride = pcCurrPicYuv->getStride(); 4022 Int iRefStride = pcRefPicYuvOrg->getStride(); 4023 Int iSumOrgSAD = 0; 4024 Double dThresholdOrgSAD = getIsDepth() ? 0.1 : 0.05; 4025 4026 // Histogram building - luminance 4027 for ( Int y = 0; y < iHeight; y++ ) 4028 { 4029 for ( Int x = 0; x < iWidth; x++ ) 4030 { 4031 aiCurrHist[pCurrY[x]]++; 4032 aiRefOrgHist[pRefOrgY[x]]++; 4033 } 4034 pCurrY += iCurrStride; 4035 pRefOrgY += iRefStride; 4036 } 4037 // Histogram SAD 4038 for ( Int i = 0; i < iMaxPelValue; i++ ) 4039 { 4040 iSumOrgSAD += abs( aiCurrHist[i] - aiRefOrgHist[i] ); 4041 } 4042 // Setting 4043 if ( iSumOrgSAD > Int( dThresholdOrgSAD * iWidth * iHeight ) ) 4044 { 4045 m_bApplyIC = true; 4046 } 4047 else 4048 { 4049 m_bApplyIC = false; 4050 } 4051 } 4052 4053 xFree( aiCurrHist ); 4054 xFree( aiRefOrgHist ); 4055 aiCurrHist = NULL; 4056 aiRefOrgHist = NULL; 3953 { 3954 TComPic* pcCurrPic = getPic(); 3955 TComPicYuv* pcCurrPicYuv = pcCurrPic->getPicYuvOrg(); 3956 3957 // Get InterView Reference picture 3958 // !!!!! Assume only one Interview Reference Picture in L0 3959 // GT: Is this assumption correct? 3960 3961 TComPicYuv* pcRefPicYuvOrg = NULL; 3962 for ( Int i = 0; i < getNumRefIdx( REF_PIC_LIST_0 ); i++ ) 3963 { 3964 TComPic* pcRefPic = getRefPic( REF_PIC_LIST_0, i ); 3965 if ( pcRefPic != NULL ) 3966 { 3967 if ( pcCurrPic->getViewIndex() != pcRefPic->getViewIndex() ) 3968 { 3969 pcRefPicYuvOrg = pcRefPic->getPicYuvOrg(); 3970 } 3971 } 3972 } 3973 3974 if ( pcRefPicYuvOrg != NULL ) 3975 { 3976 // Histogram building - luminance 3977 Int iMaxPelValue = ( 1 << g_bitDepthY ); 3978 Int *aiRefOrgHist = (Int *) xMalloc( Int,iMaxPelValue ); 3979 Int *aiCurrHist = (Int *) xMalloc( Int,iMaxPelValue ); 3980 memset( aiRefOrgHist, 0, iMaxPelValue*sizeof(Int) ); 3981 memset( aiCurrHist, 0, iMaxPelValue*sizeof(Int) ); 3982 3983 Int iWidth = pcCurrPicYuv->getWidth(); 3984 Int iHeight = pcCurrPicYuv->getHeight(); 3985 3986 Pel* pCurrY = pcCurrPicYuv ->getLumaAddr(); 3987 Pel* pRefOrgY = pcRefPicYuvOrg ->getLumaAddr(); 3988 Int iCurrStride = pcCurrPicYuv->getStride(); 3989 Int iRefStride = pcRefPicYuvOrg->getStride(); 3990 3991 for ( Int y = 0; y < iHeight; y++ ) 3992 { 3993 for ( Int x = 0; x < iWidth; x++ ) 3994 { 3995 aiCurrHist[pCurrY[x]]++; 3996 aiRefOrgHist[pRefOrgY[x]]++; 3997 } 3998 pCurrY += iCurrStride; 3999 pRefOrgY += iRefStride; 4000 } 4001 4002 // Histogram SAD 4003 Int iSumOrgSAD = 0; 4004 for ( Int i = 0; i < iMaxPelValue; i++ ) 4005 { 4006 iSumOrgSAD += abs( aiCurrHist[i] - aiRefOrgHist[i] ); 4007 } 4008 4009 // Setting 4010 Double dThresholdOrgSAD = getIsDepth() ? 0.1 : 0.05; 4011 4012 if ( iSumOrgSAD > Int( dThresholdOrgSAD * iWidth * iHeight ) ) 4013 { 4014 m_bApplyIC = true; 4015 } 4016 else 4017 { 4018 m_bApplyIC = false; 4019 } 4020 4021 xFree( aiCurrHist ); 4022 xFree( aiRefOrgHist ); 4023 } 4057 4024 }//if(bUseLowLatencyICEnc) 4058 4025 } … … 4087 4054 return; 4088 4055 4089 #if HHI_CAM_PARA_K00524090 4056 m_numViews = getVPS()->getNumViews(); 4091 #endif4092 4057 /// GT: Allocation should be moved to a better place later; 4093 4058 if ( m_depthToDisparityB == NULL ) 4094 4059 { 4095 #if HHI_CAM_PARA_K00524096 4060 m_depthToDisparityB = new Int*[ m_numViews ]; 4097 4061 for ( Int i = 0; i < getVPS()->getNumViews(); i++ ) 4098 #else4099 m_depthToDisparityB = new Int*[ getViewIndex() ];4100 for ( Int i = 0; i < getViewIndex(); i++ )4101 #endif4102 4062 { 4103 4063 m_depthToDisparityB[ i ] = new Int[ Int(1 << g_bitDepthY) ]; … … 4108 4068 if ( m_depthToDisparityF == NULL ) 4109 4069 { 4110 #if HHI_CAM_PARA_K00524111 4070 m_depthToDisparityF = new Int*[ m_numViews ]; 4112 4071 for ( Int i = 0; i < m_numViews; i++ ) 4113 #else4114 m_depthToDisparityF= new Int*[ getViewIndex() ];4115 for ( Int i = 0; i < getViewIndex(); i++ )4116 #endif4117 4072 { 4118 4073 m_depthToDisparityF[ i ] = new Int[ Int(1 << g_bitDepthY) ]; … … 4125 4080 TComVPS* vps = getVPS(); 4126 4081 4127 #if HHI_CAM_PARA_K00524128 4082 Int log2Div = g_bitDepthY - 1 + vps->getCpPrecision(); 4129 4083 Int voiInVps = vps->getVoiInVps( getViewIndex() ); … … 4155 4109 } 4156 4110 } 4157 #else4158 Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision();4159 4160 Int viewIndex = getViewIndex();4161 4162 Bool camParaSH = vps->hasCamParInSliceHeader( viewIndex );4163 4164 Int* codScale = camParaSH ? m_aaiCodedScale [ 0 ] : vps->getCodedScale ( viewIndex );4165 Int* codOffset = camParaSH ? m_aaiCodedOffset[ 0 ] : vps->getCodedOffset ( viewIndex );4166 Int* invCodScale = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( viewIndex );4167 Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( viewIndex );4168 4169 for (Int i = 0; i <= ( getViewIndex() - 1); i++)4170 {4171 for ( Int d = 0; d <= ( ( 1 << g_bitDepthY ) - 1 ); d++ )4172 {4173 Int offset = ( codOffset [ i ] << g_bitDepthY ) + ( ( 1 << log2Div ) >> 1 );4174 m_depthToDisparityB[ i ][ d ] = ( codScale [ i ] * d + offset ) >> log2Div;4175 4176 Int invOffset = ( invCodOffset[ i ] << g_bitDepthY ) + ( ( 1 << log2Div ) >> 1 );4177 m_depthToDisparityF[ i ][ d ] = ( invCodScale[ i ] * d + invOffset ) >> log2Div;4178 }4179 }4180 #endif4181 4111 } 4182 4112 #endif … … 4222 4152 Bool depthFlag = getIsDepth(); 4223 4153 4224 #if !HHI_INTER_COMP_PRED_K00524225 Bool depthOfRefViewsAvailFlag = false;4226 Bool textOfCurViewAvailFlag = false;4227 4228 TComVPS* vps = getVPS();4229 4230 if( !depthFlag )4231 {4232 depthOfRefViewsAvailFlag = true;4233 for( Int i = 0; i <= vps->getNumRefListLayers( getLayerId() ) - 1; i++)4234 {4235 Bool curDepthAvailableFlag = false;4236 for (Int j = 0; j <= vps->getMaxLayersMinus1(); j++ )4237 {4238 if ( vps->getDirectDependencyFlag( vps->getLayerIdInVps( getLayerId() ), j )4239 && vps->getVpsDepthFlag ( vps->getLayerIdInNuh( j ) ) == 14240 && vps->getViewOrderIdx( vps->getLayerIdInNuh( j ) ) == vps->getViewOrderIdx( vps->getIdRefListLayer( getLayerId(), i ) )4241 && vps->getDependencyId( vps->getLayerIdInNuh( j ) ) == 04242 && vps->getAuxId ( vps->getLayerIdInNuh( j ) ) == 04243 )4244 {4245 curDepthAvailableFlag = true;4246 }4247 }4248 if ( !curDepthAvailableFlag )4249 {4250 depthOfRefViewsAvailFlag = false;4251 }4252 }4253 }4254 else4255 {4256 for (Int j = 0; j <= vps->getMaxLayersMinus1(); j++ )4257 {4258 if ( vps->getDirectDependencyFlag( vps->getLayerIdInVps( getLayerId() ), j )4259 && vps->getVpsDepthFlag( vps->getLayerIdInNuh( j ) ) == 04260 && vps->getViewOrderIdx( vps->getLayerIdInNuh( j ) ) == getViewIndex()4261 && vps->getDependencyId( vps->getLayerIdInNuh( j ) ) == 04262 && vps->getAuxId ( vps->getLayerIdInNuh( j ) ) == 04263 )4264 {4265 textOfCurViewAvailFlag = true;4266 }4267 }4268 }4269 4270 4271 Bool lidG0 = ( getLayerId() > 0 );4272 Bool nRLLG0 = ( getVPS()->getNumRefListLayers( getLayerId() ) > 0 );4273 4274 TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension();4275 4276 m_ivMvPredFlag = sps3dExt->getIvMvPredFlag ( depthFlag ) && lidG0 && nRLLG0 ;4277 m_ivMvScalingFlag = sps3dExt->getIvMvScalingFlag ( depthFlag ) && lidG0 ;4278 m_ivResPredFlag = sps3dExt->getIvResPredFlag ( depthFlag ) && lidG0 && nRLLG0 ;4279 m_depthRefinementFlag = sps3dExt->getDepthRefinementFlag ( depthFlag ) && lidG0 && depthOfRefViewsAvailFlag;4280 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && lidG0 && nRLLG0 && depthOfRefViewsAvailFlag;4281 m_depthBasedBlkPartFlag = sps3dExt->getDepthBasedBlkPartFlag( depthFlag ) && lidG0 && depthOfRefViewsAvailFlag;4282 m_mpiFlag = sps3dExt->getMpiFlag ( depthFlag ) && lidG0 && textOfCurViewAvailFlag;4283 m_intraContourFlag = sps3dExt->getIntraContourFlag ( depthFlag ) && lidG0 && textOfCurViewAvailFlag;4284 m_intraSdcWedgeFlag = sps3dExt->getIntraSdcWedgeFlag ( depthFlag ) && lidG0 ;4285 m_qtPredFlag = sps3dExt->getQtPredFlag ( depthFlag ) && lidG0 && textOfCurViewAvailFlag;4286 m_interSdcFlag = sps3dExt->getInterSdcFlag ( depthFlag ) && lidG0 ;4287 #if SEC_DEPTH_INTRA_SKIP_MODE_K00334288 m_depthIntraSkipFlag = sps3dExt->getDepthIntraSkipFlag ( depthFlag ) && lidG0 ;4289 #else4290 m_intraSingleFlag = sps3dExt->getIntraSingleFlag ( depthFlag ) && lidG0 ;4291 #endif4292 4293 m_subPbSize = lidG0 ? ( 1 << ( sps3dExt->getLog2SubPbSizeMinus3 ( depthFlag ) + 3 ) ) : getSPS()->getMaxCUWidth();4294 m_mpiSubPbSize = 1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 );4295 #else4296 4154 Bool nRLLG0 = ( getVPS()->getNumRefListLayers( getLayerId() ) > 0 ); 4297 4155 … … 4301 4159 m_ivMvScalingFlag = sps3dExt->getIvMvScalingFlag ( depthFlag ) ; 4302 4160 m_ivResPredFlag = sps3dExt->getIvResPredFlag ( depthFlag ) && nRLLG0 ; 4303 #if HHI_CAM_PARA_K00524304 4161 m_depthRefinementFlag = sps3dExt->getDepthRefinementFlag ( depthFlag ) && getInCompPredFlag() && m_cpAvailableFlag; 4305 4162 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag() && m_cpAvailableFlag; 4306 #else4307 m_depthRefinementFlag = sps3dExt->getDepthRefinementFlag ( depthFlag ) && getInCompPredFlag();4308 m_viewSynthesisPredFlag = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag();4309 #endif4310 4163 m_depthBasedBlkPartFlag = sps3dExt->getDepthBasedBlkPartFlag( depthFlag ) && getInCompPredFlag(); 4311 4164 m_mpiFlag = sps3dExt->getMpiFlag ( depthFlag ) && getInCompPredFlag(); … … 4319 4172 m_mpiSubPbSize = 1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 ); 4320 4173 4321 #endif4322 4174 4323 4175 #if H_3D_OUTPUT_ACTIVE_TOOLS … … 4325 4177 std::cout << "DepthFlag: :" << getIsDepth() << std::endl; 4326 4178 std::cout << "ViewOrderIdx: :" << getViewIndex() << std::endl; 4327 #if HHI_INTER_COMP_PRED_K00524328 4179 std::cout << "InterCmpPredAvailableFlag:" << getInCmpPredAvailFlag() << std::endl; 4329 4180 std::cout << "InterCompPredFlag :" << getInCompPredFlag() << std::endl; 4330 //std::cout << "TextOfCurViewAvailFlag :" << textOfCurViewAvailFlag << std::endl;4331 #else4332 std::cout << "DepthOfRefViewsAvailFlag:" << depthOfRefViewsAvailFlag << std::endl;4333 std::cout << "TextOfCurViewAvailFlag :" << textOfCurViewAvailFlag << std::endl;4334 #endif4335 4181 4336 4182 std::cout << "ivMvPredFlag :" << m_ivMvPredFlag << std::endl; … … 4345 4191 std::cout << "qtPredFlag :" << m_qtPredFlag << std::endl; 4346 4192 std::cout << "interSdcFlag :" << m_interSdcFlag << std::endl; 4347 #if SEC_DEPTH_INTRA_SKIP_MODE_K00334348 4193 std::cout << "depthIntraSkipFlag :" << m_depthIntraSkipFlag << std::endl; 4349 #else4350 std::cout << "intraSingleFlag :" << m_intraSingleFlag << std::endl;4351 #endif4352 4194 std::cout << "subPbSize :" << m_subPbSize << std::endl; 4353 4195 std::cout << "mpiSubPbSize :" << m_mpiSubPbSize << std::endl; 4354 4196 #endif 4355 4197 } 4198 4199 Void TComSlice::deriveInCmpPredAndCpAvailFlag() 4200 { 4201 Int numCurCmpLIds = getIsDepth() ? 1 : getNumActiveRefLayerPics(); 4202 std::vector<Int> curCmpLIds; 4203 if ( getIsDepth() ) 4204 { 4205 curCmpLIds.push_back( getLayerId() ); 4206 } 4207 else 4208 { 4209 for (Int i = 0; i < numCurCmpLIds; i++) 4210 { 4211 curCmpLIds.push_back( getRefPicLayerId( i ) ); 4212 } 4213 } 4214 4215 m_cpAvailableFlag = true; 4216 m_inCmpRefViewIdcs.clear(); 4217 Bool allRefCmpLayersAvailFlag = true; 4218 4219 for( Int i = 0; i <= numCurCmpLIds - 1; i++ ) 4220 { 4221 m_inCmpRefViewIdcs.push_back( getVPS()->getViewOrderIdx( curCmpLIds[ i ] )); 4222 if( !getVPS()->getCpPresentFlag( getVPS()->getVoiInVps( getViewIndex() ), getVPS()->getVoiInVps( m_inCmpRefViewIdcs[ i ] ) ) ) 4223 { 4224 m_cpAvailableFlag = false; 4225 } 4226 Bool refCmpCurLIdAvailFlag = false; 4227 if( getVPS()->getViewCompLayerPresentFlag( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) ) 4228 { 4229 Int j = getVPS()->getLayerIdInVps( getVPS()->getViewCompLayerId( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) ); 4230 if ( getVPS()->getDirectDependencyFlag( getVPS()->getLayerIdInVps( getLayerId() ) , j ) && 4231 getVPS()->getSubLayersVpsMaxMinus1( j ) >= getTemporalId() && 4232 ( getTemporalId() == 0 || getVPS()->getMaxTidIlRefPicsPlus1( j , getVPS()->getLayerIdInVps( getLayerId() ) ) > getTemporalId() ) 4233 ) 4234 { 4235 refCmpCurLIdAvailFlag = true; 4236 } 4237 } 4238 if( !refCmpCurLIdAvailFlag ) 4239 { 4240 allRefCmpLayersAvailFlag = false; 4241 } 4242 } 4243 4244 if( !allRefCmpLayersAvailFlag ) 4245 { 4246 m_inCmpPredAvailFlag = false; 4247 } 4248 else 4249 { 4250 TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension(); 4251 if( !getIsDepth() ) 4252 { 4253 m_inCmpPredAvailFlag = sps3dExt->getViewSynthesisPredFlag( getIsDepth() ) || 4254 sps3dExt->getDepthBasedBlkPartFlag( getIsDepth() ) || 4255 sps3dExt->getDepthRefinementFlag ( getIsDepth() ); 4256 } 4257 else 4258 { 4259 m_inCmpPredAvailFlag = sps3dExt->getIntraContourFlag( getIsDepth() ) || 4260 sps3dExt->getQtPredFlag( getIsDepth() ) || 4261 sps3dExt->getMpiFlag( getIsDepth() ); 4262 } 4263 } 4264 } 4265 4266 Void TComSlice::checkInCompPredRefLayers() 4267 { 4268 if ( getInCompPredFlag() ) 4269 { 4270 for (Int i = 0; i < getNumCurCmpLIds(); i++ ) 4271 { 4272 assert( getIvPic(!getIsDepth(), getInCmpRefViewIdcs( i ) ) != NULL ); 4273 // It is a requirement of bitstream conformance that there 4274 // is a picture in the DPB with PicOrderCntVal equal to the PicOrderCntVal of the current picture, 4275 // and a nuh_layer_id value equal to ViewCompLayerId[ inCmpRefViewIdcs[ i ] ][ !DepthFlag ]. 4276 } 4277 } 4278 } 4279 4356 4280 #endif 4357 4281 -
trunk/source/Lib/TLibCommon/TComSlice.h
r1179 r1196 912 912 Int xGetDimBitOffset( Int j ); 913 913 Void xSetRefLayerFlags( Int currLayerId ); 914 914 915 // VPS EXTENSION 2 SYNTAX ELEMENTS 915 916 #if H_3D 916 #if HHI_CAM_PARA_K0052917 917 Int* m_numCp; 918 918 Int** m_cpRefVoi; … … 920 920 Int m_cpPrecision; 921 921 Bool* m_cpInSliceSegmentHeaderFlag; 922 #else923 UInt m_uiCamParPrecision;924 Bool* m_bCamParInSliceHeader;925 Bool* m_bCamParPresent;926 #endif927 922 Int ***m_aaaiCodedScale ; 928 923 Int ***m_aaaiCodedOffset; 929 924 930 #if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052931 925 std::vector<Int> m_viewOIdxList; 932 #endif933 #if HHI_INTER_COMP_PRED_K0052934 926 std::vector< std::vector<Bool> > m_viewCompLayerPresentFlag; 935 927 std::vector< std::vector<Int> > m_viewCompLayerId; 936 #endif937 928 #endif 938 929 … … 1021 1012 Void setVpsNonVuiExtensionLength( Int val ) { m_vpsNonVuiExtensionLength = val; } 1022 1013 Int getVpsNonVuiExtensionLength( ) { return m_vpsNonVuiExtensionLength; } 1023 1014 1015 // VPS Extension 1024 1016 Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } 1025 1017 Bool getSplittingFlag() { return m_splittingFlag; } … … 1163 1155 Int getNumViews() { return m_numViews; } 1164 1156 Void initNumViews(); 1165 #if HHI_INTER_COMP_PRED_K00521166 1157 #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 1158 Void initViewCompLayer( ); 1197 1159 Int getViewOIdxList( Int i ) { return m_viewOIdxList[i]; } 1198 #if HHI_CAM_PARA_K00521199 1160 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 1161 1162 Int getVoiInVps( Int viewOIdx );; 1163 1222 1164 Bool getViewCompLayerPresentFlag (Int i, Bool d ) { return m_viewCompLayerPresentFlag[ getVoiInVps(i) ][d]; } 1223 1165 Bool getViewCompLayerId (Int i, Bool d ) { return m_viewCompLayerId [ getVoiInVps(i) ][d]; } 1224 #else1225 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 #endif1228 1166 #endif 1229 1167 Bool getDependencyFlag( Int i, Int j ) { return m_dependencyFlag[i][j]; } … … 1347 1285 Void createCamPars(Int iNumViews); 1348 1286 Void deleteCamPars(); 1349 #if HHI_CAM_PARA_K00521350 1287 Void initCamParaVPS( Int vOIdxInVps, Int numCp, Bool cpInSliceSegmentHeaderFlag, Int* cpRefVoi, Int** aaiScale, Int** aaiOffset ); 1351 #else 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 1288 1356 1289 1357 1290 Void setCpPrecision( Int val ) { m_cpPrecision = val; } … … 1380 1313 1381 1314 // 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 } 1315 Void deriveCpPresentFlag( ); 1401 1316 1402 1317 Void setCpPresentFlag( Int i, Int m, Bool flag ) { m_cpPresentFlag[i][m] = flag; } 1403 1318 Bool getCpPresentFlag( Int i, Int m ) { return m_cpPresentFlag[i][m]; } 1404 1319 1405 #else1406 UInt getCamParPrecision () { return m_uiCamParPrecision; }1407 1408 Bool getCamParPresent ( Int viewIndex ) { return m_bCamParPresent[viewIndex]; }1409 Void setCamParPresent ( Int viewIndex, Bool val ) { m_bCamParPresent[viewIndex] = val; }1410 Bool hasCamParInSliceHeader( Int viewIndex ) { return m_bCamParInSliceHeader[viewIndex]; }1411 Void setHasCamParInSliceHeader( Int viewIndex, Bool b ) { m_bCamParInSliceHeader[viewIndex] = b; }1412 #endif1413 1320 1414 1321 … … 1705 1612 m_qtPredFlag [d] = false; 1706 1613 m_interSdcFlag [d] = false; 1707 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331708 1614 m_depthIntraSkipFlag [d] = false; 1709 #else1710 m_intraSingleFlag [d] = false;1711 #endif1712 1615 } 1713 1616 } … … 1752 1655 Bool getInterSdcFlag( Int d ) { return m_interSdcFlag[d]; } 1753 1656 1754 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331755 1657 Void setDepthIntraSkipFlag( Int d, Bool flag ) { m_depthIntraSkipFlag[d] = flag; } 1756 1658 Bool getDepthIntraSkipFlag( Int d ) { return m_depthIntraSkipFlag[d]; } 1757 #else1758 Void setIntraSingleFlag( Int d, Bool flag ) { m_intraSingleFlag[d] = flag; }1759 Bool getIntraSingleFlag( Int d ) { return m_intraSingleFlag[d]; }1760 #endif1761 1659 1762 1660 private: … … 1775 1673 Bool m_qtPredFlag [2]; 1776 1674 Bool m_interSdcFlag [2]; 1777 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331778 1675 Bool m_depthIntraSkipFlag [2]; 1779 #else1780 Bool m_intraSingleFlag [2];1781 #endif1782 1676 }; 1783 1677 … … 1884 1778 #if H_3D 1885 1779 TComSps3dExtension m_sps3dExtension; 1886 #if !HHI_CAM_PARA_K00521887 UInt m_uiCamParPrecision;1888 Bool m_bCamParInSliceHeader;1889 #endif1890 1780 Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; 1891 1781 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; … … 2517 2407 UInt m_nARPStepNum; 2518 2408 Int m_aiFirstTRefIdx [2]; 2519 #if HHI_RES_PRED_K00522520 2409 std::vector<Int> m_pocsInCurrRPSs; 2521 #endif2522 2410 #endif 2523 2411 #if H_3D_IC … … 2526 2414 #endif 2527 2415 #if H_3D 2528 #if HHI_INTER_COMP_PRED_K00522529 2416 std::vector<Int> m_inCmpRefViewIdcs; 2530 2417 Bool m_inCmpPredAvailFlag; 2531 2418 Bool m_inCmpPredFlag; 2532 #endif2533 #if HHI_CAM_PARA_K00522534 2419 Bool m_cpAvailableFlag; 2535 2420 Int m_numViews; 2536 #endif2537 2421 TComPic* m_ivPicsCurrPoc [2][MAX_NUM_LAYERS]; 2538 2422 Int** m_depthToDisparityB; … … 2540 2424 #endif 2541 2425 #endif 2542 #if SEC_DEPTH_INTRA_SKIP_MODE_K00332543 2426 Bool m_bApplyDIS; 2544 #else2545 #if H_3D_SINGLE_DEPTH2546 Bool m_bApplySingleDepthMode;2547 #endif2548 #endif2549 2427 #if H_3D_IC 2550 Int *m_aICEnableCandidate;2551 Int *m_aICEnableNum;2428 Int* m_aICEnableCandidate; 2429 Int* m_aICEnableNum; 2552 2430 #endif 2553 2431 Int m_iDefaultRefViewIdx; … … 2565 2443 Bool m_qtPredFlag ; 2566 2444 Bool m_interSdcFlag ; 2567 #if SEC_DEPTH_INTRA_SKIP_MODE_K00332568 2445 Bool m_depthIntraSkipFlag ; 2569 #else2570 Bool m_intraSingleFlag ;2571 #endif2572 2446 Int m_mpiSubPbSize ; 2573 2447 Int m_subPbSize ; … … 2637 2511 Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } 2638 2512 #if H_3D 2639 #if HHI_INTER_COMP_PRED_K00522640 2513 Bool getInCmpPredAvailFlag( ) { return m_inCmpPredAvailFlag; } 2641 #if HHI_CAM_PARA_K00522642 2514 Bool getCpAvailableFlag( ) { return m_cpAvailableFlag; } 2643 #endif2644 2515 Bool getInCompPredFlag( ) { return m_inCmpPredFlag; } 2645 2516 Void setInCompPredFlag( Bool b ) { m_inCmpPredFlag = b; } 2646 2517 Int getInCmpRefViewIdcs( Int i ) { return m_inCmpRefViewIdcs [i]; } 2647 2518 Int getNumCurCmpLIds( ) { return (Int) m_inCmpRefViewIdcs.size(); } 2648 #endif2649 2519 TComPic* getIvPic ( Bool depthFlag, Int viewIndex){ return m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; } 2650 2520 #endif … … 2875 2745 Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } 2876 2746 Bool getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; } 2877 #if HHI_RES_PRED_K00522878 2747 std::vector<Int> getPocsInCurrRPSs() { return m_pocsInCurrRPSs; }; 2879 #endif2880 2748 #endif 2881 2749 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } … … 2886 2754 Int* getInvCodedScale () { return m_aaiCodedScale [1]; } 2887 2755 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } 2888 #if HHI_CAM_PARA_K00522889 2756 Void setCpScale( Int j, Int val ) { m_aaiCodedScale[0][j] = val; } 2890 2757 Int getCpScale( Int j ) { return m_aaiCodedScale[0][j]; } … … 2898 2765 Void setCpInvOff( Int j, Int val ) { m_aaiCodedOffset[1][j] = val; } 2899 2766 Int getCpInvOff( Int j ) { return m_aaiCodedOffset[1][j]; } 2900 #endif2901 2767 2902 2768 #endif … … 2906 2772 Void setDepthToDisparityLUTs(); 2907 2773 2908 #if HHI_CAM_PARA_K00522909 2774 Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ getVPS()->getVoiInVps( refViewIdx) ]; }; 2910 2775 Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ getVPS()->getVoiInVps( refViewIdx) ]; }; 2911 #else2912 Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ refViewIdx ]; };2913 Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; };2914 #endif2915 2776 #endif 2916 2777 #if H_3D_IC … … 3015 2876 #if H_3D 3016 2877 // 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 2878 Void deriveInCmpPredAndCpAvailFlag(); 3091 2879 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 2880 Void checkInCompPredRefLayers();; 2881 3108 2882 Bool getIvMvPredFlag ( ) { return m_ivMvPredFlag ; }; 3109 2883 Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag ; }; … … 3117 2891 Bool getQtPredFlag ( ) { return m_qtPredFlag ; }; 3118 2892 Bool getInterSdcFlag ( ) { return m_interSdcFlag ; }; 3119 #if SEC_DEPTH_INTRA_SKIP_MODE_K00333120 2893 Bool getDepthIntraSkipFlag ( ) { return m_depthIntraSkipFlag ; }; 3121 #else3122 Bool getIntraSingleFlag ( ) { return m_intraSingleFlag ; };3123 #endif3124 2894 3125 2895 Int getMpiSubPbSize ( ) { return m_mpiSubPbSize ; }; -
trunk/source/Lib/TLibCommon/TComWedgelet.cpp
r1179 r1196 177 177 } 178 178 179 #if SHARP_DMM_CLEAN_K0042180 179 Void TComWedgelet::generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate) 181 180 { … … 210 209 m_uiHeight = rcWedge.m_uiHeight; 211 210 } 212 #endif213 211 214 212 Void TComWedgelet::xGenerateWedgePattern() … … 228 226 xDrawEdgeLine( uhXs, uhYs, uhXe, uhYe, pbTempPattern, iTempStride ); 229 227 230 #if SHARP_DMM_CLEAN_K0042231 228 Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0; 232 229 Int endPos = uhYe>>shift; … … 242 239 m_pbPattern[k] = pbTempPattern[k]; 243 240 }; 244 #else245 switch( m_uhOri )246 {247 case( 0 ): { for( UInt iX = 0; iX < uhXs; iX++ ) { UInt iY = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY++; } } } break;248 case( 1 ): { for( UInt iY = 0; iY < uhYs; iY++ ) { UInt iX = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX--; } } } break;249 case( 2 ): { for( UInt iX = uiTempBlockSize-1; iX > uhXs; iX-- ) { UInt iY = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY--; } } } break;250 case( 3 ): { for( UInt iY = uiTempBlockSize-1; iY > uhYs; iY-- ) { UInt iX = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX++; } } } break;251 case( 4 ):252 {253 if( (uhXs+uhXe) < uiTempBlockSize ) { for( UInt iY = 0; iY < uiTempBlockSize; iY++ ) { UInt iX = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX++; } } }254 else { for( UInt iY = 0; iY < uiTempBlockSize; iY++ ) { UInt iX = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX--; } } }255 }256 break;257 case( 5 ):258 {259 if( (uhYs+uhYe) < uiTempBlockSize ) { for( UInt iX = 0; iX < uiTempBlockSize; iX++ ) { UInt iY = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY++; } } }260 else { for( UInt iX = 0; iX < uiTempBlockSize; iX++ ) { UInt iY = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY--; } } }261 }262 }263 264 clear();265 switch( m_eWedgeRes )266 {267 case( FULL_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break;268 case( HALF_PEL ): // sub-sampling by factor 2269 {270 Int iStride = getStride();271 272 UInt uiOffX, uiOffY;273 switch( m_uhOri )274 {275 case( 0 ): { uiOffX = 0; uiOffY = 0; } break;276 case( 1 ): { uiOffX = 1; uiOffY = 0; } break;277 case( 2 ): { uiOffX = 1; uiOffY = 1; } break;278 case( 3 ): { uiOffX = 0; uiOffY = 1; } break;279 case( 4 ):280 {281 if( (uhXs+uhXe) < uiTempBlockSize ) { uiOffX = 0; uiOffY = 0; }282 else { uiOffX = 1; uiOffY = 0; }283 }284 break;285 case( 5 ):286 {287 if( (uhYs+uhYe) < uiTempBlockSize ) { uiOffX = 0; uiOffY = 0; }288 else { uiOffX = 0; uiOffY = 1; }289 }290 break;291 default: { uiOffX = 0; uiOffY = 0; } break;292 }293 294 for(Int iY = 0; iY < m_uiHeight; iY++)295 {296 for(Int iX = 0; iX < m_uiWidth; iX++)297 {298 m_pbPattern[(iY * iStride) + iX] = pbTempPattern[(((iY<<1)+uiOffY) * iTempStride) + ((iX<<1)+uiOffX)];299 }300 }301 }302 break;303 }304 #endif305 241 306 242 if( pbTempPattern ) … … 345 281 for( Int x = x0; x <= x1; x++ ) 346 282 { 347 #if SHARP_DMM_CLEAN_K0042348 283 Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0; 349 284 Int stride = iPatternStride >> shift; 350 285 if( steep ) { pbPattern[((x>>shift) * stride) + (y>>shift)] = true; } 351 286 else { pbPattern[((y>>shift) * stride) + (x>>shift)] = true; } 352 #else353 if( steep ) { pbPattern[(x * iPatternStride) + y] = true; }354 else { pbPattern[(y * iPatternStride) + x] = true; }355 #endif356 287 357 288 error += deltaerr; -
trunk/source/Lib/TLibCommon/TComWedgelet.h
r1179 r1196 124 124 Bool* getScaledPattern(UInt uiWidth); 125 125 126 #if SHARP_DMM_CLEAN_K0042127 126 Void generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate); 128 #endif129 127 Void setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false ); 130 128 Void findClosestAngle(); -
trunk/source/Lib/TLibCommon/TypeDef.h
r1179 r1196 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 72 #define NTT_BUG_FIX_TK54 1 73 #define BUG_FIX_TK65 1 74 75 #define MTK_I0093 1 76 77 #define RWTH_DBBP_NO_SATD_K0028 1 67 78 68 ///////////////////////////////////////////////////////////////////////////////////////// 79 69 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// … … 85 75 86 76 #if H_3D 87 #define SEC_DEPTH_INTRA_SKIP_MODE_K0033 1 // Depth intra skip mode88 89 #if SEC_DEPTH_INTRA_SKIP_MODE_K003390 #define NEIGHBORING_PIX_AVAILABILITY_FIX 191 #endif92 93 94 77 #define H_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 95 78 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units … … 129 112 // SHARP_ARP_CHROMA_I0104 130 113 // MTK_I0072_IVARP_SCALING_FIX 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 132 133 #define SEC_ARP_REM_ENC_RESTRICT_K0035 1 // Removal of encoder restriction of ARP, JCT3V-K0035 114 // SEC_ARP_VIEW_REF_CHECK_J0037 Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1 115 // SEC_ARP_REM_ENC_RESTRICT_K0035 Removal of encoder restriction of ARP, JCT3V-K0035 134 116 135 117 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 … … 200 182 // SEC_ADAPT_DISABLE_IVMP Disabling IVMP merge candidates when IC is enabled, JCT3V-H0070 201 183 // SEC_SIMP_SHIFTED_DV_I0086 Simplification of Shifted DV candidate, JCT3V-I0086 202 203 #define SEC_SHIFTED_IVMC_POS_K0036 1 // Position Derivation for Shifted-IVMC, JCT3V-K0036 184 // SEC_SHIFTED_IVMC_POS_K0036 Position Derivation for Shifted-IVMC, JCT3V-K0036 204 185 205 186 206 187 #define H_3D_TMVP 1 // QC_TMVP_C0047 207 188 // Sony_M23639 208 #if H_3D_TMVP 209 #define H_3D_TMVP_SCALING_FIX_K0053 1 // QC/CY for K0053 210 #endif 189 // H_3D_TMVP_SCALING_FIX_K0053 1 // QC/CY for K0053 190 211 191 212 192 #define H_3D_DIM 1 // DIM, Depth intra modes, includes: … … 249 229 // MTK_DLT_CODING_FIX_H0091 250 230 // HS_DMM_SIGNALLING_I0120 251 // SHARP_DMM1_I0110 //LUT size reduction for DMM1 proposed in JCT3V-I0110231 // SHARP_DMM1_I0110 LUT size reduction for DMM1 proposed in JCT3V-I0110 252 232 // FAST_SDC_OFFSET_DECISION_I0084 253 233 // SEPARATE_FLAG_I0085 … … 256 236 // MTK_DMM_SIM_J0035 257 237 // MTK_J0033 258 // SHARP_DLT_SIMP_J0029 1 // DLT(DepthValue2Idx[]) table derivation cleanup 259 260 #if !SEC_DEPTH_INTRA_SKIP_MODE_K0033 261 #define H_3D_SINGLE_DEPTH 1 // Single depth mode proposed in JCT3V-I0095 262 // HS_SP_SIMP_J0066 263 // SINGLE_DEPTH_SIMP_J0115 1 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 238 // SHARP_DLT_SIMP_J0029 DLT(DepthValue2Idx[]) table derivation cleanup 239 // SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation 240 266 241 267 242 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding … … 269 244 // SEC_INTER_SDC_G0101 Improved inter SDC with multiple DC candidates 270 245 271 #define H_3D_SPIVMP 1 // H_3D_SPIVMP //JCT3V-F0110: Sub-PU level inter-view motion prediction246 #define H_3D_SPIVMP 1 // H_3D_SPIVMP JCT3V-F0110: Sub-PU level inter-view motion prediction 272 247 // SEC_SPIVMP_MCP_SIZE_G0077, Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077 273 248 // QC_SPIVMP_MPI_G0119 Sub-PU level MPI merge candidate … … 280 255 // SEC_DBBP_FILTERING_H0104 281 256 // MTK_DBBP_SIGNALING_H0094 282 // H_3D_FIX_DBBP_IVMP 283 // SEC_DBBP_EXPLICIT_SIG_I0077 1 //Remove the partition derivation and signal dbbp_flag only when the partition mode is 2NxN/Nx2N, JCT3V-I0077257 // H_3D_FIX_DBBP_IVMP Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself. 258 // SEC_DBBP_EXPLICIT_SIG_I0077 Remove the partition derivation and signal dbbp_flag only when the partition mode is 2NxN/Nx2N, JCT3V-I0077 284 259 // Disallow DBBP in 8x8 CU, JCT3V-I0078 285 // SHARP_DBBP_SIMPLE_FLTER_I0109 1 // Simple condition and one dimensional filter for DBBP 286 // SEC_DBBP_DMM4_THRESHOLD_I0076 Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076 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 260 // SHARP_DBBP_SIMPLE_FLTER_I0109 Simple condition and one dimensional filter for DBBP 261 // SEC_DBBP_DMM4_THRESHOLD_I0076 Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076 262 // SEC_DBBP_VIEW_REF_CHECK_J0037 Signaling dbbp_flag when the current slice has view reference picture(s), JCT3V-J0037 item4 263 // RWTH_DBBP_NO_SATD_K0028 264 // HS_DBBP_CLEAN_K0048 289 265 290 266 #define H_3D_DDD 1 // Disparity derived depth coding 291 267 // LGE_DDD_REMOVAL_J0042_J0030 DDD removal 292 268 269 #define H_3D_DIS 1 // Depth intra skip 270 // SEC_DEPTH_INTRA_SKIP_MODE_K0033 Depth intra skip mode 271 293 272 #define H_3D_FCO 0 // Flexible coding order for 3D 294 #if H_3D_FCO295 #define H_3D_FCO 1296 #endif297 273 298 274 #define H_3D_FAST_INTRA_SDC 1 // I0123 … … 300 276 // OTHERS 301 277 // MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 // Progressive MV Compression, JCT3V-E0170 302 #define H_3D_REN_MAX_DEV_OUT 0 // Output maximal possible shift deviation 278 303 279 #define H_3D_FAST_TEXTURE_ENCODING 1 // Fast merge mode decision and early CU determination for texture component of dependent view, JCT3V-E0173 304 280 // MTK_FAST_TEXTURE_ENCODING_E0173 305 281 #if H_3D_DIM 306 #define H_3D_FAST_DEPTH_INTRA 1 // Fast DMM and RBC ModeSelection282 #define H_3D_FAST_DEPTH_INTRA 1 // Fast DMM Selection 307 283 // SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX 308 284 #endif 309 285 310 286 //HLS 311 //HHI_DEPENDENCY_SIGNALLING_I1_J0107 312 //HHI_TOOL_PARAMETERS_I2_J0107 313 //HHI_VPS_3D_EXTENSION_I3_J0107 287 // HHI_DEPENDENCY_SIGNALLING_I1_J0107 288 // HHI_TOOL_PARAMETERS_I2_J0107 289 // HHI_VPS_3D_EXTENSION_I3_J0107 290 // HHI_INTER_COMP_PRED_K0052 291 // HHI_RES_PRED_K0052 292 // HHI_CAM_PARA_K0052 293 // H_3D_DIRECT_DEP_TYPE 314 294 315 295 // Rate Control … … 319 299 #endif // H_3D 320 300 321 322 323 301 ///////////////////////////////////////////////////////////////////////////////////////// 324 302 /////////////////////////////////// DERIVED DEFINES /////////////////////////////////// 325 303 ///////////////////////////////////////////////////////////////////////////////////////// 326 304 327 // Fixes328 329 #define FIX_TICKET_95 1 // pps_scaling_list_ref_layer_id parsing330 331 305 #if H_3D 332 306 #define H_3D_DISABLE_CHROMA 1 333 #define HHI_VIEW_ID_LIST_I5_J0107 0334 #define HHI_INTER_COMP_PRED_K0052 1335 #define HHI_RES_PRED_K0052 1336 #define HHI_CAM_PARA_K0052 1337 #define HHI_MOVE_SYN_K0052 1338 #define H_3D_ANNEX_SELECTION_FIX 1339 #define H_3D_TMVP_FIX_TICKET_97 1340 #define H_3D_DIRECT_DEP_TYPE 1341 #define H_3D_FIX_TMVP_SCALING_VIEW_ID 1342 #endif343 #define H_MV_FIX_REF_LAYER_PIC_FLAG 1344 #define H_MV_FIX_NUM_VIEWS 1345 307 #define H_3D_OUTPUT_ACTIVE_TOOLS 0 346 347 #if !SEC_DEPTH_INTRA_SKIP_MODE_K0033 348 ///// ***** SINGLE DEPTH MODE ********* 349 #if H_3D_SINGLE_DEPTH 350 #define SINGLE_DEPTH_MODE_CAND_LIST_SIZE 2 // size of the sample candidate list 351 352 #endif 308 #define H_3D_REN_MAX_DEV_OUT 0 353 309 #endif 354 310 … … 384 340 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 385 341 // LG_ZEROINTRADEPTHRESI_A0087 386 #define SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation387 388 #define TICKET083_IVPFLAG_FIX 1389 #define SHARP_SUBBLOCK_CLEAN_K0044 1 // Remove unused bipred restriction390 342 391 343 #endif … … 434 386 // TBD: Check if integration is necessary. 435 387 436 #define H_MV_HLS_FIX 1 388 437 389 #define H_MV_HLS_PTL_LIMITS 0 438 390 #define H_MV_HLS7_GEN 0 // General changes (not tested) 439 #define H_MV_ALIGN_HM_15 1440 391 441 392 // POC -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1179 r1196 39 39 #include "SEIread.h" 40 40 #include "TDecSlice.h" 41 #if H_3D _ANNEX_SELECTION_FIX41 #if H_3D 42 42 #include "TDecTop.h" 43 43 #endif … … 93 93 TDecCavlc::TDecCavlc() 94 94 { 95 #if !HHI_CAM_PARA_K005296 #if H_3D97 m_aaiTempScale = new Int* [ MAX_NUM_LAYERS ];98 m_aaiTempOffset = new Int* [ MAX_NUM_LAYERS ];99 for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )100 {101 m_aaiTempScale [ uiVId ] = new Int [ MAX_NUM_LAYERS ];102 m_aaiTempOffset [ uiVId ] = new Int [ MAX_NUM_LAYERS ];103 }104 #endif105 #endif106 95 } 107 96 108 97 TDecCavlc::~TDecCavlc() 109 98 { 110 #if !HHI_CAM_PARA_K0052111 #if H_3D112 for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )113 {114 delete [] m_aaiTempScale [ uiVId ];115 delete [] m_aaiTempOffset [ uiVId ];116 }117 delete [] m_aaiTempScale;118 delete [] m_aaiTempOffset;119 #endif120 #endif121 99 } 122 100 … … 1048 1026 READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 ); 1049 1027 READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 ); 1050 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331051 1028 READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt->setDepthIntraSkipFlag( d, uiCode == 1 ); 1052 #else1053 READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 );1054 #endif1055 1029 } 1056 1030 } … … 1063 1037 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 1064 1038 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 ); 1065 #if FIX_TICKET_951066 1039 if (pcPPS->getPpsInferScalingListFlag()) 1067 1040 { 1068 1041 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode ); 1069 1042 } 1070 #else1071 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );1072 #endif1073 1043 1074 1044 UInt numRefLocOffsets;; … … 1336 1306 } 1337 1307 1338 #if HHI_INTER_COMP_PRED_K00521339 1308 #if H_3D 1340 1309 pcVPS->initViewCompLayer( ); 1341 #endif1342 1310 #endif 1343 1311 … … 1929 1897 Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS ) 1930 1898 { 1931 #if HHI_CAM_PARA_K00521932 1899 UInt uiCode; 1933 1900 READ_UVLC( uiCode, "cp_precision"); pcVPS->setCpPrecision( uiCode ) ; … … 1959 1926 } 1960 1927 pcVPS->deriveCpPresentFlag(); 1961 #else1962 UInt uiCode;1963 1964 UInt uiCamParPrecision = 0;1965 Bool bCamParSlice = false;1966 Bool bCamParPresentFlag = false;1967 1968 READ_UVLC( uiCamParPrecision, "cp_precision" );1969 #if HHI_VIEW_ID_LIST_I5_J01071970 for (Int n = 1; n < pcVPS->getNumViews(); n++)1971 {1972 Int viewIndex = pcVPS->getViewOIdxList( n );1973 #else1974 for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)1975 {1976 #endif1977 pcVPS->setCamParPresent ( viewIndex, false );1978 pcVPS->setHasCamParInSliceHeader( viewIndex, false );1979 READ_FLAG( uiCode, "cp_present_flag[i]" ); bCamParPresentFlag = ( uiCode == 1);1980 if ( bCamParPresentFlag )1981 {1982 READ_FLAG( uiCode, "cp_in_slice_segment_header_flag[i]" ); bCamParSlice = ( uiCode == 1);1983 if ( !bCamParSlice )1984 {1985 #if HHI_VIEW_ID_LIST_I5_J01071986 for( UInt m = 0; m < n; n++ )1987 {1988 Int uiBaseIndex = pcVPS->getViewOIdxList ( m );1989 Int iCode;1990 READ_SVLC( iCode, "vps_cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode;1991 READ_SVLC( iCode, "vps_cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode;1992 READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];1993 READ_SVLC( iCode, "vps_cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];1994 }1995 }1996 pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );1997 #else1998 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )1999 {2000 Int iCode;2001 READ_SVLC( iCode, "vps_cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode;2002 READ_SVLC( iCode, "vps_cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode;2003 READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];2004 READ_SVLC( iCode, "vps_cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];2005 }2006 }2007 pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );2008 #endif2009 }2010 }2011 #endif2012 1928 } 2013 1929 #endif … … 2070 1986 #endif 2071 1987 rpcSlice->setSPS(sps); 2072 #if !HHI_INTER_COMP_PRED_K00522073 #if H_3D2074 rpcSlice->init3dToolParameters();2075 #endif2076 #endif2077 1988 rpcSlice->setPPS(pps); 2078 1989 if( pps->getDependentSliceSegmentsEnabledFlag() && ( !firstSliceSegmentInPic )) … … 2468 2379 } 2469 2380 } 2470 #if HHI_INTER_COMP_PRED_K00522471 2381 #if H_3D 2472 2382 if ( getDecTop()->decProcAnnexI() ) … … 2481 2391 #endif 2482 2392 #endif 2483 #endif2484 2393 if(sps->getUseSAO()) 2485 2394 { … … 2488 2397 if( rpcSlice->getSPS()->getChromaFormatIdc() != 0 ) 2489 2398 { 2490 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);2491 }2399 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode); 2400 } 2492 2401 else 2493 2402 { 2494 2403 rpcSlice->setSaoEnabledFlagChroma( false ); 2495 2404 } 2496 2497 2405 #else 2498 2406 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode); … … 2662 2570 } 2663 2571 #if H_3D_IC 2664 #if H_3D_ANNEX_SELECTION_FIX2665 2572 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) 2666 2573 && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 2667 2574 && getDecTop()->decProcAnnexI() 2668 2575 ) 2669 #else2670 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )2671 #endif2672 2576 { 2673 2577 UInt uiCodeTmp = 0; … … 2766 2670 rpcSlice->setLFCrossSliceBoundaryFlag( (uiCode==1)?true:false); 2767 2671 2768 #if HHI_CAM_PARA_K00522769 2672 #if H_3D 2770 2673 if ( getDecTop()->decProcAnnexI() ) … … 2784 2687 } 2785 2688 #endif 2786 #endif2787 2689 } 2788 2690 … … 2808 2710 } 2809 2711 2810 #if !HHI_CAM_PARA_K00522811 #if H_3D2812 #if H_3D_FCO2813 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && rpcSlice->getIsDepth() )2814 #else2815 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && !rpcSlice->getIsDepth() )2816 #endif2817 {2818 UInt uiViewIndex = rpcSlice->getViewIndex();2819 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )2820 {2821 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode;2822 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode;2823 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ];2824 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ];2825 }2826 rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );2827 }2828 #endif2829 #endif2830 2712 2831 2713 if(pps->getSliceHeaderExtensionPresentFlag()) … … 3100 2982 assert(0); 3101 2983 } 3102 3103 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2984 #if H_3D 3104 2985 Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 3105 2986 { 3106 2987 assert(0); 3107 2988 } 3108 #else3109 #if H_3D_SINGLE_DEPTH3110 Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )3111 {3112 assert(0);3113 }3114 #endif3115 2989 #endif 3116 2990 -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r1179 r1196 52 52 // Class definition 53 53 // ==================================================================================================================== 54 #if H_3D _ANNEX_SELECTION_FIX54 #if H_3D 55 55 class TDecTop; 56 56 #endif 57 58 57 /// CAVLC decoder class 59 58 class TDecCavlc : public SyntaxElementParser, public TDecEntropyIf … … 66 65 void parseShortTermRefPicSet (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx); 67 66 68 69 #if !HHI_CAM_PARA_K005270 67 #if H_3D 71 Int** m_aaiTempScale;72 Int** m_aaiTempOffset;73 #endif74 #endif75 #if H_3D_ANNEX_SELECTION_FIX76 68 TDecTop* m_decTop; 77 69 #endif … … 118 110 Void parsePPS ( TComPPS* pcPPS); 119 111 #endif 120 #if H_3D _ANNEX_SELECTION_FIX112 #if H_3D 121 113 Void setDecTop ( TDecTop* decTop ) { m_decTop = decTop; }; 122 114 #endif … … 136 128 137 129 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 138 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033130 #if H_3D 139 131 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 140 #else141 #if H_3D_SINGLE_DEPTH142 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );143 #endif144 132 #endif 145 133 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 182 170 Void parseScalingList ( TComScalingList* scalingList ); 183 171 Void xDecodeScalingList ( TComScalingList *scalingList, UInt sizeId, UInt listId); 184 185 #if H_3D_ANNEX_SELECTION_FIX 172 #if H_3D 186 173 TDecTop* getDecTop() { return m_decTop; }; 187 174 #endif -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r1179 r1196 310 310 #if H_3D_NBDV 311 311 DisInfo DvInfo; 312 #if !SEC_ARP_REM_ENC_RESTRICT_K0035313 DvInfo.bDV = false;314 #endif315 312 DvInfo.m_acNBDV.setZero(); 316 313 DvInfo.m_aVIdxCan = 0; … … 347 344 if( pcCU->getSlice()->getIsDepth()) 348 345 { 349 #if SEC_ARP_REM_ENC_RESTRICT_K0035350 346 m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo); 351 #else352 DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);353 #endif354 347 } 355 348 else … … 359 352 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() ) //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done. 360 353 { 361 #if SEC_ARP_REM_ENC_RESTRICT_K0035362 354 m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true); 363 #else364 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);365 #endif366 355 } 367 356 else 368 357 #endif 369 358 { 370 #if SEC_ARP_REM_ENC_RESTRICT_K0035371 359 m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo); 372 #else373 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);374 #endif375 360 } 376 361 #if H_3D_IV_MERGE … … 545 530 return; 546 531 } 547 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033532 #if H_3D 548 533 m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth ); 549 534 if(!pcCU->getDISFlag(uiAbsPartIdx)) 550 535 { 551 #else552 #if H_3D_SINGLE_DEPTH553 m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );554 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))555 {556 #endif557 536 #endif 558 537 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); 559 538 m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth ); 560 539 561 #if !HHI_MOVE_SYN_K0052562 #if H_3D_DIM_SDC563 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );564 #endif565 #endif566 540 if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) 567 541 { … … 570 544 if(pcCU->getIPCMFlag(uiAbsPartIdx)) 571 545 { 572 #if HHI_MOVE_SYN_K0052573 546 #if H_3D_DIM_SDC 574 547 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 575 #endif576 548 #endif 577 549 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); … … 593 565 m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP ); 594 566 setdQPFlag( bCodeDQP ); 595 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 596 } 597 #else 598 #if H_3D_SINGLE_DEPTH 599 } 600 #endif 567 #if H_3D 568 } 601 569 #endif 602 570 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); … … 625 593 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 626 594 UInt uiBPelY = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1; 627 595 628 596 UInt uiCurNumParts = pcPic->getNumPartInCU() >> (uiDepth<<1); 629 597 TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx()); … … 633 601 bBoundary = true; 634 602 } 635 603 636 604 if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary ) 637 605 { … … 643 611 uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiIdx] ]; 644 612 uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ]; 645 613 646 614 Bool binSlice = (pcCU->getSCUAddr()+uiIdx+uiQNumParts>pcSlice->getSliceSegmentCurStartCUAddr())&&(pcCU->getSCUAddr()+uiIdx<pcSlice->getSliceSegmentCurEndCUAddr()); 647 615 if(binSlice&&( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) … … 649 617 xDecompressCU(pcCU, uiIdx, uiNextDepth ); 650 618 } 651 619 652 620 uiIdx += uiQNumParts; 653 621 } … … 657 625 // Residual reconstruction 658 626 m_ppcYuvResi[uiDepth]->clear(); 659 627 660 628 m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth ); 661 629 662 630 switch( m_ppcCU[uiDepth]->getPredictionMode(0) ) 663 631 { 664 632 case MODE_INTER: 665 633 #if H_3D_DBBP 666 667 668 669 670 671 634 if( m_ppcCU[uiDepth]->getDBBPFlag(0) ) 635 { 636 xReconInterDBBP( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); 637 } 638 else 639 { 672 640 #endif 673 641 #if H_3D_INTER_SDC … … 679 647 { 680 648 #endif 681 xReconInter( m_ppcCU[uiDepth], uiDepth );649 xReconInter( m_ppcCU[uiDepth], uiDepth ); 682 650 #if H_3D_INTER_SDC 683 651 } 684 652 #endif 685 653 #if H_3D_DBBP 686 687 #endif 688 689 690 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033691 692 693 694 654 } 655 #endif 656 break; 657 case MODE_INTRA: 658 #if H_3D 659 if( m_ppcCU[uiDepth]->getDISFlag(0) ) 660 { 661 xReconDIS( m_ppcCU[uiDepth], 0, uiDepth ); 662 } 695 663 #if H_3D_DIM_SDC 696 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 697 { 698 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 699 } 700 #endif 701 else 702 #else 703 #if H_3D_SINGLE_DEPTH 704 if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) ) 705 xReconIntraSingleDepth( m_ppcCU[uiDepth], 0, uiDepth ); 706 #if H_3D_DIM_SDC 707 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 708 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 709 #endif 710 else 711 #else 712 #if H_3D_DIM_SDC 713 if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 714 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 715 else 716 #endif 717 #endif 664 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 665 { 666 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 667 } 668 #endif 669 else 718 670 #endif 719 671 xReconIntraQT( m_ppcCU[uiDepth], uiDepth ); 720 721 722 723 672 break; 673 default: 674 assert(0); 675 break; 724 676 } 725 677 if ( m_ppcCU[uiDepth]->isLosslessCoded(0) && (m_ppcCU[uiDepth]->getIPCMFlag(0) == false)) … … 727 679 xFillPCMBuffer(m_ppcCU[uiDepth], uiDepth); 728 680 } 729 681 730 682 xCopyToPic( m_ppcCU[uiDepth], pcPic, uiAbsPartIdx, uiDepth ); 731 683 } … … 751 703 } 752 704 753 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033705 #if H_3D 754 706 Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 755 707 { … … 828 780 } 829 781 } 830 #else 831 #if H_3D_SINGLE_DEPTH 832 Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 833 { 834 UInt uiWidth = pcCU->getWidth ( 0 ); 835 UInt uiHeight = pcCU->getHeight ( 0 ); 836 837 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 838 839 UInt uiStride = pcRecoYuv->getStride (); 840 Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 841 842 843 AOF( uiWidth == uiHeight ); 844 AOF( uiAbsPartIdx == 0 ); 845 846 //construction of depth candidates 847 Pel testDepth; 848 Pel DepthNeighbours[2]; 849 Int index =0; 850 for( Int i = 0; (i < 2) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ ) 851 { 852 if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i)) 853 { 854 continue; 855 } 856 DepthNeighbours[index]=testDepth; 857 index++; 858 } 859 860 if(index==0) 861 { 862 DepthNeighbours[index]=1<<(g_bitDepthY-1); 863 index++; 864 } 865 866 if(index==1) 867 { 868 DepthNeighbours[index]=ClipY(DepthNeighbours[0] + 1 ); 869 index++; 870 } 871 872 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 873 { 874 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 875 { 876 piReco[ uiX ] =DepthNeighbours[(Int)pcCU->getSingleDepthValue(uiAbsPartIdx)]; 877 } 878 piReco += uiStride; 879 } 880 881 // clear UV 882 UInt uiStrideC = pcRecoYuv->getCStride(); 883 Pel *pRecCb = pcRecoYuv->getCbAddr(); 884 Pel *pRecCr = pcRecoYuv->getCrAddr(); 885 886 for (Int y=0; y<uiHeight/2; y++) 887 { 888 for (Int x=0; x<uiWidth/2; x++) 889 { 890 pRecCb[x] = 1<<(g_bitDepthC-1); 891 pRecCr[x] = 1<<(g_bitDepthC-1); 892 } 893 894 pRecCb += uiStrideC; 895 pRecCr += uiStrideC; 896 } 897 } 898 #endif 899 #endif 900 782 #endif 901 783 #if H_3D_INTER_SDC 902 784 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 962 844 // compute mask by segmenting depth block 963 845 Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE]; 964 #if HS_DBBP_CLEAN_K0048965 846 Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask, pcCU); 966 #else967 Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask);968 #endif969 847 AOF(bValidMask); 970 848 971 D BBPTmpData* pDBBPTmpData = pcCU->getDBBPTmpData();849 DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData(); 972 850 TComYuv* apSegPredYuv[2] = { m_ppcYuvReco[uiDepth], m_ppcYuvRecoDBBP[uiDepth] }; 973 851 -
trunk/source/Lib/TLibDecoder/TDecCu.h
r1179 r1196 123 123 Void setdQPFlag ( Bool b ) { m_bDecodeDQP = b; } 124 124 Void xFillPCMBuffer (TComDataCU* pCU, UInt depth); 125 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033125 #if H_3D 126 126 Void xReconDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 #else128 #if H_3D_SINGLE_DEPTH129 Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );130 #endif131 127 #endif 132 128 #if H_3D_DIM_SDC -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r1179 r1196 52 52 m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); 53 53 } 54 55 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 54 #if H_3D 56 55 Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 57 56 { … … 63 62 m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth ); 64 63 } 65 #else66 #if H_3D_SINGLE_DEPTH67 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )68 {69 if( !pcCU->getSlice()->getIntraSingleFlag() )70 {71 return;72 }73 74 m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );75 }76 #endif77 64 #endif 78 65 … … 161 148 { 162 149 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 163 #if !HHI_MOVE_SYN_K0052164 #if H_3D_DBBP165 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )166 {167 decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);168 }169 #endif170 #endif171 150 } 172 151 … … 176 155 { 177 156 decodeIntraDirModeLuma ( pcCU, uiAbsPartIdx, uiDepth ); 178 #if H HI_MOVE_SYN_K0052157 #if H_3D_DIM_SDC 179 158 decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 180 #endif181 #if H_3D_DIM_SDC182 159 #if H_3D_DISABLE_CHROMA 183 #if !HHI_MOVE_SYN_K0052184 if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )185 #else186 160 if(!pcCU->getSDCFlag(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 187 #endif188 161 #else 189 162 if(!pcCU->getSDCFlag(uiAbsPartIdx)) … … 247 220 #endif 248 221 #if H_3D_SPIVMP 249 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 250 TComMvField* pcMvFieldSP; 251 UChar* puhInterDirSP; 252 pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 253 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 222 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 223 TComMvField* pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 224 UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 254 225 #endif 255 226 for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ ) … … 265 236 pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx); 266 237 #endif 267 #if H HI_MOVE_SYN_K0052238 #if H_3D 268 239 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 269 240 { … … 475 446 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 476 447 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 477 #if H_3D_ARP478 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );479 #endif480 #if H_3D_IC481 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );482 #endif483 #if H_3D_DBBP484 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )485 #else486 448 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) 487 #endif488 449 { 489 450 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 490 451 if ( !isMerged ) 491 452 { 492 #if H_3D_VSP493 Int vspFlag[MRG_MAX_NUM_CANDS_MEM];494 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);495 #if H_3D_SPIVMP496 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);497 #endif498 pcSubCU->initAvailableFlags();499 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);500 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours501 #if H_3D_SPIVMP502 , pcMvFieldSP, puhInterDirSP503 #endif504 , numValidMergeCand );505 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag506 #if H_3D_SPIVMP507 , bSPIVMPFlag508 #endif509 , numValidMergeCand );510 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );511 512 #else513 #if H_3D514 pcSubCU->initAvailableFlags();515 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);516 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );517 518 #else519 453 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 520 #endif521 #endif522 454 isMerged = true; 523 455 } … … 527 459 { 528 460 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 529 #if H_3D_VSP530 Int vspFlag[MRG_MAX_NUM_CANDS_MEM];531 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);532 #if H_3D_SPIVMP533 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);534 #endif535 pcSubCU->initAvailableFlags();536 461 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 537 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours538 #if H_3D_SPIVMP539 , pcMvFieldSP, puhInterDirSP540 #endif541 ,numValidMergeCand, uiMergeIndex );542 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag543 #if H_3D_SPIVMP544 , bSPIVMPFlag545 #endif546 ,numValidMergeCand );547 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );548 #else549 #if H_3D550 pcSubCU->initAvailableFlags();551 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );552 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );553 #else554 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );555 #endif556 #endif557 462 } 558 463 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); … … 567 472 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 568 473 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 569 #if H_3D_VSP 570 #if H_3D_DBBP 571 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) ) 572 #else 573 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 ) 574 #endif 575 { 576 if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) ) 577 { 578 UInt dummy; 579 Int vspSize; 580 Int width, height; 581 pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 ); 582 pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize ); 583 pcCU->setVSPFlag( uiSubPartIdx, vspSize ); 584 } 585 } 586 #endif 587 } 588 } 589 #if H_3D_SPIVMP 590 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 591 if (bSPIVMPFlag[uiMergeIndex] != 0) 592 { 593 Int iWidth, iHeight; 594 UInt uiIdx; 595 pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true ); 596 597 UInt uiSPAddr; 598 599 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 600 601 pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 602 603 for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++) 604 { 605 pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr); 606 pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight); 607 pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight); 608 pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight); 609 } 610 } 611 #endif 474 } 475 } 612 476 } 613 477 else … … 623 487 } 624 488 } 625 #if H_3D_ARP626 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );627 #endif628 #if H_3D_IC629 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );630 #endif631 489 } 632 490 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) ) … … 706 564 } 707 565 708 #if H HI_MOVE_SYN_K0052566 #if H_3D 709 567 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 710 568 { … … 753 611 pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx); 754 612 } 755 756 613 #else 757 614 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) … … 798 655 } 799 656 #endif 657 800 658 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU) 801 659 { … … 869 727 if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 870 728 { 871 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )872 {873 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );874 }875 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )876 {877 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );878 }879 }880 else881 {729 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) ) 730 { 731 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth ); 732 } 733 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) ) 734 { 735 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth ); 736 } 737 } 738 else 739 { 882 740 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) ) 883 741 { … … 1131 989 { 1132 990 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 1133 #if HHI_MOVE_SYN_K00521134 991 if ( pcCU->isSkipped( uiAbsPartIdx ) ) 1135 992 { 1136 993 return; 1137 994 } 1138 #endif1139 995 1140 996 … … 1157 1013 Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1158 1014 { 1159 #if HHI_MOVE_SYN_K00521160 1015 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 1161 1016 { 1162 #endif1163 1017 m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 1164 #if HHI_MOVE_SYN_K0052 1165 } 1166 #endif 1018 } 1167 1019 } 1168 1020 #endif -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r1179 r1196 85 85 public: 86 86 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 87 #if SEC_DEPTH_INTRA_SKIP_MODE_K003387 #if H_3D 88 88 virtual Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 89 #else90 #if H_3D_SINGLE_DEPTH91 virtual Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;92 #endif93 89 #endif 94 90 virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 152 148 Void decodeMvdPU ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 153 149 Void decodeMVPIdxPU ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 154 #if HHI_MOVE_SYN_K0052 155 Void decodeMvsAMVP ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 156 #endif 150 #if H_3D 151 Void decodeMvsAMVP ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, 152 RefPicList eRefList ); 153 #endif 157 154 Void setEntropyDecoder ( TDecEntropyIf* p ); 158 155 Void setBitstream ( TComInputBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p); } … … 177 174 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 178 175 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 179 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033176 #if H_3D 180 177 Void decodeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 181 #else182 #if H_3D_SINGLE_DEPTH183 Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;184 #endif185 178 #endif 186 179 Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
trunk/source/Lib/TLibDecoder/TDecGop.h
r1179 r1196 63 63 // Class definition 64 64 // ==================================================================================================================== 65 #if H_3D _ANNEX_SELECTION_FIX65 #if H_3D 66 66 class TDecTop; 67 67 #endif … … 83 83 TDecSlice* m_pcSliceDecoder; 84 84 TComLoopFilter* m_pcLoopFilter; 85 #if H_3D _ANNEX_SELECTION_FIX85 #if H_3D 86 86 TDecTop* m_decTop; 87 87 #endif -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r1179 r1196 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_K003354 #if H_3D 55 55 , m_cCUDISFlagSCModel ( 1, 1, NUM_DIS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 56 , m_cCUDISTypeSCModel ( 1, 1, NUM_DIS_TYPE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 57 #else58 #if H_3D_SINGLE_DEPTH59 , m_cCUSingleDepthFlagSCModel ( 1, 1, NUM_SINGLEDEPTH_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels)60 , m_cSingleDepthValueSCModel ( 1, 1, NUM_SINGLE_DEPTH_VALUE_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels)61 #endif62 57 #endif 63 58 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 141 136 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 142 137 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 143 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033138 #if H_3D 144 139 m_cCUDISFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_FLAG ); 145 140 m_cCUDISTypeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_TYPE ); 146 #else147 #if H_3D_SINGLE_DEPTH148 m_cCUSingleDepthFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );149 m_cSingleDepthValueSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );150 #endif151 141 #endif 152 142 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 217 207 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 218 208 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 219 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033209 #if H_3D 220 210 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG ); 221 211 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); 222 #else223 #if H_3D_SINGLE_DEPTH224 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );225 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );226 #endif227 212 #endif 228 213 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 461 446 UInt uiSymbol; 462 447 463 448 m_pcTDecBinIf->decodeBinTrm(uiSymbol); 464 449 465 450 #if H_MV_ENC_DEC_TRAC 466 467 #endif 468 469 451 DTRACE_CU("pcm_flag", uiSymbol) 452 #endif 453 if (uiSymbol) 454 { 470 455 Bool bIpcmFlag = true; 471 456 … … 500 485 piPCMSample += uiWidth; 501 486 } 502 503 504 487 #if H_3D_DISABLE_CHROMA 505 488 if( pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 506 489 { 507 490 #endif 508 piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;509 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;510 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;511 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();512 513 for(uiY = 0; uiY < uiHeight; uiY++)514 {515 for(uiX = 0; uiX < uiWidth; uiX++)516 {517 UInt uiSample;518 m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);519 piPCMSample[uiX] = uiSample;520 }521 piPCMSample += uiWidth;522 }523 524 piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;525 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;526 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;527 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();528 529 for(uiY = 0; uiY < uiHeight; uiY++)530 {531 for(uiX = 0; uiX < uiWidth; uiX++)532 {533 UInt uiSample;534 m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);535 piPCMSample[uiX] = uiSample;536 }537 piPCMSample += uiWidth;538 }491 piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset; 492 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2; 493 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2; 494 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma(); 495 496 for(uiY = 0; uiY < uiHeight; uiY++) 497 { 498 for(uiX = 0; uiX < uiWidth; uiX++) 499 { 500 UInt uiSample; 501 m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample); 502 piPCMSample[uiX] = uiSample; 503 } 504 piPCMSample += uiWidth; 505 } 506 507 piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset; 508 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2; 509 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2; 510 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma(); 511 512 for(uiY = 0; uiY < uiHeight; uiY++) 513 { 514 for(uiX = 0; uiX < uiWidth; uiX++) 515 { 516 UInt uiSample; 517 m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample); 518 piPCMSample[uiX] = uiSample; 519 } 520 piPCMSample += uiWidth; 521 } 539 522 #if H_3D_DISABLE_CHROMA 540 523 } 541 524 #endif 542 543 544 525 m_pcTDecBinIf->start(); 545 526 } … … 594 575 #endif 595 576 } 596 597 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 577 #if H_3D 598 578 Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 599 579 { … … 639 619 } 640 620 } 641 #else 642 #if H_3D_SINGLE_DEPTH 643 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 644 { 645 pcCU->setSingleDepthFlagSubParts( false, uiAbsPartIdx, uiDepth ); 646 UInt uiSymbol = 0; 647 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSingleDepthFlagSCModel.get( 0, 0, 0 ) ); 648 if( uiSymbol ) 649 { 650 pcCU->setSingleDepthFlagSubParts( true, uiAbsPartIdx, uiDepth ); 651 pcCU->setSkipFlagSubParts( false, uiAbsPartIdx, uiDepth ); 652 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 653 pcCU->setPredModeSubParts( MODE_INTRA, uiAbsPartIdx, uiDepth ); 654 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 655 pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth ); 656 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 657 pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 658 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 659 pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth); 660 661 UInt absValDeltaDC = 0; 662 663 UInt uiUnaryIdx = 0; 664 UInt uiNumCand = SINGLE_DEPTH_MODE_CAND_LIST_SIZE; 665 if ( uiNumCand > 1 ) 666 { 667 for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx ) 668 { 669 UInt uiSymbol2 = 0; 670 if ( uiUnaryIdx==0 ) 671 { 672 m_pcTDecBinIf->decodeBin( uiSymbol2, m_cSingleDepthValueSCModel.get( 0, 0, 0 ) ); 673 } 674 else 675 { 676 m_pcTDecBinIf->decodeBinEP( uiSymbol2); 677 } 678 if( uiSymbol2 == 0 ) 679 { 680 break; 681 } 682 } 683 } 684 absValDeltaDC = uiUnaryIdx; 685 pcCU->setSingleDepthValueSubParts((Pel)absValDeltaDC,uiAbsPartIdx, 0, uiDepth); 686 } 687 } 688 #endif 689 #endif 690 621 #endif 691 622 /** parse merge flag 692 623 * \param pcCU … … 772 703 #if H_3D_QTLPC 773 704 Bool bParseSplitFlag = true; 774 775 776 705 Bool bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag(); 777 706 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); … … 810 739 #endif 811 740 pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx ); 812 741 813 742 return; 814 743 } … … 827 756 #if H_3D_QTLPC 828 757 Bool bParsePartSize = true; 829 758 830 759 Bool bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag(); 831 760 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); … … 859 788 #endif 860 789 861 790 862 791 if ( pcCU->isIntra( uiAbsPartIdx ) ) 863 792 { … … 866 795 { 867 796 #endif 868 uiSymbol = 1;797 uiSymbol = 1; 869 798 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 870 799 { … … 899 828 { 900 829 #endif 901 UInt uiMaxNumBits = 2; 902 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 903 { 904 uiMaxNumBits ++; 905 } 906 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 907 { 908 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 909 if ( uiSymbol ) 910 { 911 break; 912 } 913 uiMode++; 914 } 915 eMode = (PartSize) uiMode; 916 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 917 { 918 if (eMode == SIZE_2NxN) 919 { 920 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 921 if (uiSymbol == 0) 830 UInt uiMaxNumBits = 2; 831 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 832 { 833 uiMaxNumBits ++; 834 } 835 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 836 { 837 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 838 if ( uiSymbol ) 922 839 { 923 m_pcTDecBinIf->decodeBinEP(uiSymbol); 924 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 840 break; 925 841 } 926 } 927 else if (eMode == SIZE_Nx2N) 928 { 929 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 930 if (uiSymbol == 0) 842 uiMode++; 843 } 844 eMode = (PartSize) uiMode; 845 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 846 { 847 if (eMode == SIZE_2NxN) 931 848 { 932 m_pcTDecBinIf->decodeBinEP(uiSymbol); 933 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 849 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 850 if (uiSymbol == 0) 851 { 852 m_pcTDecBinIf->decodeBinEP(uiSymbol); 853 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 854 } 934 855 } 935 } 936 } 856 else if (eMode == SIZE_Nx2N) 857 { 858 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 859 if (uiSymbol == 0) 860 { 861 m_pcTDecBinIf->decodeBinEP(uiSymbol); 862 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 863 } 864 } 865 } 937 866 #if H_3D_QTLPC 938 867 } … … 1060 989 { 1061 990 #endif 1062 m_pcTDecBinIf->decodeBin( symbol, m_cCUIntraPredSCModel.get( 0, 0, 0) );1063 mpmPred[j] = symbol;991 m_pcTDecBinIf->decodeBin( symbol, m_cCUIntraPredSCModel.get( 0, 0, 0) ); 992 mpmPred[j] = symbol; 1064 993 #if H_MV_ENC_DEC_TRAC 1065 DTRACE_CU("prev_intra_luma_pred_flag", symbol)994 DTRACE_CU("prev_intra_luma_pred_flag", symbol) 1066 995 #endif 1067 996 #if H_3D_DIM … … 1075 1004 { 1076 1005 #endif 1077 Int preds[3] = {-1, -1, -1}; 1078 Int predNum = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds); 1079 if (mpmPred[j]) 1080 { 1081 m_pcTDecBinIf->decodeBinEP( symbol ); 1082 if (symbol) 1006 Int preds[3] = {-1, -1, -1}; 1007 Int predNum = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds); 1008 if (mpmPred[j]) 1083 1009 { 1084 1010 m_pcTDecBinIf->decodeBinEP( symbol ); 1085 symbol++; 1086 } 1011 if (symbol) 1012 { 1013 m_pcTDecBinIf->decodeBinEP( symbol ); 1014 symbol++; 1015 } 1087 1016 #if H_MV_ENC_DEC_TRAC 1088 DTRACE_CU("mpm_idx", symbol)1089 #endif 1090 intraPredMode = preds[symbol];1091 }1092 else1093 {1094 m_pcTDecBinIf->decodeBinsEP( symbol, 5 );1095 intraPredMode = symbol;1017 DTRACE_CU("mpm_idx", symbol) 1018 #endif 1019 intraPredMode = preds[symbol]; 1020 } 1021 else 1022 { 1023 m_pcTDecBinIf->decodeBinsEP( symbol, 5 ); 1024 intraPredMode = symbol; 1096 1025 #if H_MV_ENC_DEC_TRAC 1097 DTRACE_CU("rem_intra_luma_pred_mode", symbol)1026 DTRACE_CU("rem_intra_luma_pred_mode", symbol) 1098 1027 #endif 1099 //postponed sorting of MPMs (only in remaining branch)1100 if (preds[0] > preds[1])1101 {1102 std::swap(preds[0], preds[1]);1103 }1104