Changeset 884 in 3DVCSoftware
- Timestamp:
- 29 Mar 2014, 18:55:16 (11 years ago)
- Location:
- trunk/source
- Files:
-
- 43 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r872 r884 140 140 AOF( m_pScaleOffsetFile ); 141 141 } 142 #if !FIX_CAM_PARS_COLLECTOR143 m_cCamParsCollector.init( m_pScaleOffsetFile );144 #endif145 142 #endif 146 143 InputByteStream bytestream(bitstreamFile); … … 209 206 read(nalu, nalUnit); 210 207 #if H_MV 211 #if H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO212 208 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) 213 209 || !isNaluWithinTargetDecLayerIdSet(&nalu) 214 210 || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 215 211 || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0) 216 #if H_MV_HLS_7_MISC_P0130_EOS217 212 || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0) 218 #endif219 213 ) 220 #else221 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 )222 #endif223 214 { 224 215 bNewPicture = false; … … 248 239 } 249 240 250 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27251 241 if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() ) 252 242 { … … 254 244 exit(EXIT_FAILURE); 255 245 } 256 #endif257 246 m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 258 247 } 259 248 260 #if FIX_CAM_PARS_COLLECTOR261 249 #if H_3D 262 250 if (nalu.m_nalUnitType == NAL_UNIT_VPS ) 263 { 264 251 { 265 252 m_cCamParsCollector.init( m_pScaleOffsetFile, m_tDecTop[decIdx]->getPrefetchedVPS() ); 266 253 } 267 #endif268 254 #endif 269 255 bNewPicture = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag; -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r872 r884 388 388 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 389 389 ("LayerIdsInSet_%d", m_layerIdsInSets , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 390 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27391 390 ("DefaultTargetOutputLayerIdc" , m_defaultTargetOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet") 392 #else393 ("DefaultOneTargetOutputLayerFlag" , m_defaultOneTargetOutputLayerIdc , 0, "Output highest layer of layer sets by default")394 #endif395 391 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 396 392 397 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27398 393 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 399 394 ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 400 #else401 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers")402 #endif403 395 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier") 404 396 … … 521 513 #if H_3D_SPIVMP 522 514 ("SubPULog2Size", m_iSubPULog2Size, (Int)3, "Sub-PU size index: 2^n") 523 #endif524 #if QC_SPIVMP_MPI_G0119525 515 ("SubPUMPILog2Size", m_iSubPUMPILog2Size, (Int)3, "Sub-PU MPI size index: 2^n") 526 516 #endif … … 613 603 #if H_MV 614 604 615 // DBP Size616 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE617 ("SubLayerFlagInfoPresentFlag", m_subLayerFlagInfoPresentFlag , false , "SubLayerFlagInfoPresentFlag")618 #endif619 605 // VPS VUI 620 606 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") 621 607 ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false , "CrossLayerPicTypeAlignedFlag") // Could actually be derived by the encoder 622 608 ("CrossLayerIrapAlignedFlag" , m_crossLayerIrapAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 623 #if H_MV_HLS_7_MISC_P0068_21624 609 ("AllLayersIdrAlignedFlag" , m_allLayersIdrAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 625 #endif626 610 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false , "BitRatePresentVpsFlag ") 627 611 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false , "PicRatePresentVpsFlag ") … … 737 721 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 738 722 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 739 #if H_MV_HLS_7_SEI_P0204_26740 723 ("SubBitstreamPropSEIEnabled", m_subBistreamPropSEIEnabled, false ,"Enable signaling of sub-bitstream property SEI message") 741 724 ("SEISubBitstreamNumAdditionalSubStreams", m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled") … … 745 728 ("SEISubBitstreamAvgBitRate", m_sbPropAvgBitRate, std::vector< Int >(1,0) ,"Specifies average bit rate of the i-th sub-bitstream") 746 729 ("SEISubBitstreamMaxBitRate", m_sbPropMaxBitRate, std::vector< Int >(1,0) ,"Specifies maximum bit rate of the i-th sub-bitstream") 747 #endif748 730 #if H_3D 749 731 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") … … 1432 1414 } 1433 1415 1434 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271435 1416 xConfirmPara( m_defaultTargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." ); 1436 1417 … … 1463 1444 } 1464 1445 } 1465 #else 1466 xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" ); 1467 #endif 1446 1468 1447 xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" ); 1469 1448 … … 1552 1531 #endif 1553 1532 #if H_3D_SPIVMP 1554 #if SEC_SPIVMP_MCP_SIZE_G00771555 1533 xConfirmPara( m_iSubPULog2Size < 3, "SubPULog2Size must be 3 or greater."); 1556 #else1557 xConfirmPara( m_iSubPULog2Size < 2, "SubPULog2Size must be 2 or greater.");1558 #endif1559 1534 xConfirmPara( m_iSubPULog2Size > 6, "SubPULog2Size must be 6 or smaller."); 1560 1535 xConfirmPara( (1<<m_iSubPULog2Size) > m_uiMaxCUWidth, "SubPULog2Size must be log2(maxCUSize) or smaller."); 1561 #endif 1562 #if QC_SPIVMP_MPI_G0119 1536 1563 1537 xConfirmPara( m_iSubPUMPILog2Size < 3, "SubPUMPILog2Size must be 3 or greater."); 1564 1538 xConfirmPara( m_iSubPUMPILog2Size > 6, "SubPUMPILog2Size must be 6 or smaller."); … … 2252 2226 } 2253 2227 } 2254 #endif2255 #if H_MV_HLS_7_SEI_P0204_262256 2228 // Check input parameters for Sub-bitstream property SEI message 2257 2229 if( m_subBistreamPropSEIEnabled ) … … 2499 2471 #if H_3D_SPIVMP 2500 2472 printf(" SubPULog2Size:%d " , m_iSubPULog2Size ); 2501 #endif2502 #endif2503 #if QC_SPIVMP_MPI_G01192504 2473 printf(" SubPUMPILog2Size:%d " , m_iSubPUMPILog2Size ); 2474 #endif 2505 2475 #endif 2506 2476 #if H_3D_ARP -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r872 r884 89 89 Int m_vpsNumLayerSets; ///< Number of layer sets 90 90 std::vector< std::vector<Int> > m_layerIdsInSets; ///< LayerIds in vps of layer set 91 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_2792 91 Int m_defaultTargetOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet 93 #else94 Int m_defaultOneTargetOutputLayerIdc; ///< Output highest layer of layer sets by default when equal to 195 #endif96 92 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 97 93 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers 98 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_2799 94 std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets 100 #endif101 95 std::vector<Int> m_profileLevelTierIdx; ///< Indices of of profile level tier 102 96 … … 104 98 std::vector< std::vector<Int> > m_directRefLayers; ///< LayerIds of direct reference layers 105 99 std::vector< std::vector<Int> > m_dependencyTypes; ///< Dependency types of direct reference layers 106 107 // DBP Size108 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE109 Bool m_subLayerFlagInfoPresentFlag;110 #endif111 100 112 101 // VPS VUI … … 114 103 Bool m_crossLayerPicTypeAlignedFlag; 115 104 Bool m_crossLayerIrapAlignedFlag; 116 #if H_MV_HLS_7_MISC_P0068_21117 105 Bool m_allLayersIdrAlignedFlag; 118 #endif119 106 Bool m_bitRatePresentVpsFlag; 120 107 Bool m_picRatePresentVpsFlag; … … 141 128 #if H_3D_SPIVMP 142 129 Int m_iSubPULog2Size; 143 #endif144 #endif145 #if QC_SPIVMP_MPI_G0119146 130 Int m_iSubPUMPILog2Size; 131 #endif 147 132 #endif 148 133 #if H_3D_ARP /// < flag and number of weighting factors in ARP … … 440 425 Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units 441 426 Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units 442 #if H_MV _HLS_7_SEI_P0204_26427 #if H_MV 443 428 Bool m_subBistreamPropSEIEnabled; 444 429 Int m_sbPropNumAdditionalSubStreams; -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r872 r884 127 127 xSetRepFormat ( vps ); 128 128 xSetLayerSets ( vps ); 129 #if H_MV_HLS_7_FIX_SET_DPB_SIZE130 129 xSetDpbSize ( vps ); 131 #endif132 130 xSetVPSVUI ( vps ); 133 131 #if H_3D … … 187 185 #if H_3D_SPIVMP 188 186 m_cTEncTop.setSubPULog2Size (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size ); 189 #endif190 #if QC_SPIVMP_MPI_G0119191 187 m_cTEncTop.setSubPUMPILog2Size ( !isDepth ? 0 : m_iSubPUMPILog2Size ); 192 188 #endif … … 429 425 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 430 426 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 431 #if H_MV _HLS_7_SEI_P0204_26427 #if H_MV 432 428 m_cTEncTop.setSubBitstreamPropSEIEnabled( m_subBistreamPropSEIEnabled ); 433 429 if( m_subBistreamPropSEIEnabled ) … … 826 822 #endif 827 823 828 #if MTK_DDD_G0063824 #if H_3D_DDD 829 825 m_acTEncTopList[ layer ]->getSliceEncoder()->setDDDPar( m_cCameraData.getCodedScale()[0][ m_acTEncTopList[layer]->getViewIndex() ], 830 826 m_cCameraData.getCodedOffset()[0][ m_acTEncTopList[layer]->getViewIndex() ], … … 1506 1502 } 1507 1503 1508 #if H_MV_HLS_7_FIX_SET_DPB_SIZE1509 1504 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1510 1505 { … … 1520 1515 Bool subLayerFlagInfoPresentFlag = false; 1521 1516 1522 #if H_MV_HLS_7_HRD_P0156_71523 1517 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1524 #else1525 for( Int j = 0; j <= vps.getMaxTLayers() - 1 ; j++ )1526 #endif1527 1518 { 1528 1519 Bool subLayerDpbInfoPresentFlag = false; 1529 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271530 1520 assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() ); 1531 1521 for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ ) 1532 #else1533 assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() );1534 for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )1535 #endif1536 1522 { 1537 1523 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); … … 1576 1562 } 1577 1563 } 1578 #else 1579 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1580 { 1581 // These settings need to be verified 1582 1583 TComDpbSize* dpbSize = vps.getDpbSize(); 1584 1585 assert ( dpbSize != 0 ); 1586 1587 for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ ) 1588 { 1589 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1590 dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag ); 1591 if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ) 1592 { 1593 for( Int j = 0; j <= vps.getMaxTLayers() - 1 ; j++ ) 1594 { 1595 Int maxNumReorderPics = MIN_INT; 1596 Int maxDecPicBuffering = MIN_INT; 1597 Int maxLatencyIncrease = MIN_INT; 1598 1599 Int prevMaxNumReorderPics = MIN_INT; 1600 Int prevMaxDecPicBuffering = MIN_INT; 1601 Int prevMaxLatencyIncrease = MIN_INT; 1602 1603 assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() ); 1604 for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1605 { 1606 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); 1607 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 ); 1608 } 1609 1610 for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ ) 1611 { 1612 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] ); 1613 maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] ); 1614 } 1615 assert( maxNumReorderPics != MIN_INT ); 1616 dpbSize->setMaxVpsNumReorderPics( i, j, maxNumReorderPics ); 1617 1618 // To Be Done ! 1619 // dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode ); 1620 1621 if( j > 0 ) 1622 { 1623 dpbSize->setSubLayerDpbInfoPresentFlag( i, j, prevMaxDecPicBuffering == maxDecPicBuffering && prevMaxLatencyIncrease == maxLatencyIncrease && prevMaxNumReorderPics == maxNumReorderPics ); 1624 } 1625 1626 prevMaxNumReorderPics = maxNumReorderPics; 1627 prevMaxDecPicBuffering = maxDecPicBuffering; 1628 prevMaxLatencyIncrease = maxLatencyIncrease; 1629 } 1630 } 1631 } 1632 } 1633 #endif 1564 1634 1565 1635 1566 Void TAppEncTop::xSetLayerSets( TComVPS& vps ) … … 1637 1568 // Layer sets 1638 1569 vps.setVpsNumLayerSetsMinus1 ( m_vpsNumLayerSets - 1 ); 1639 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271640 vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() );1641 #endif1642 1570 1643 1571 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ ) … … 1656 1584 Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 1657 1585 // Additional output layer sets + profileLevelTierIdx 1658 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271659 1586 vps.setDefaultTargetOutputLayerIdc ( m_defaultTargetOutputLayerIdc ); 1660 1587 vps.setNumAddOutputLayerSets ( numAddOuputLayerSets ); 1661 1588 vps.initTargetLayerIdLists(); 1662 #else 1663 vps.setDefaultOneTargetOutputLayerIdc ( m_defaultOneTargetOutputLayerIdc ); 1664 vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets != 0 ); 1665 vps.setNumAddOutputLayerSetsMinus1 ( numAddOuputLayerSets - 1 ); 1666 #endif 1667 1668 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1589 1669 1590 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++) 1670 1591 { … … 1716 1637 vps.setAltOutputLayerFlag( olsIdx , false); 1717 1638 } 1718 #else 1719 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++) 1720 { 1721 if ( lsIdx > 0 ) 1722 { 1723 vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] ); 1724 } 1725 1726 vps.setOutputLayerSetIdxMinus1( lsIdx, lsIdx - 1 ); 1727 1728 for (Int i = 0; i < m_layerIdsInSets[ lsIdx ].size(); i++ ) 1729 { 1730 vps.setOutputLayerFlag( lsIdx, i, vps.inferOutputLayerFlag( lsIdx, i )); 1731 } 1732 } 1733 1734 for (Int addOutLs = 0; addOutLs < numAddOuputLayerSets; addOutLs++ ) 1735 { 1736 vps.setProfileLevelTierIdx( m_vpsNumLayerSets + addOutLs, m_profileLevelTierIdx[ addOutLs ] ); 1737 1738 Int refLayerSetIdx = m_outputLayerSetIdx[ addOutLs ]; 1739 vps.setOutputLayerSetIdxMinus1( m_vpsNumLayerSets + addOutLs, refLayerSetIdx - 1 ); 1740 1741 for (Int i = 0; i < m_layerIdsInSets[ refLayerSetIdx].size(); i++ ) 1742 { 1743 Bool outputLayerFlag = false; 1744 for (Int j = 0; j < m_layerIdsInAddOutputLayerSet[ addOutLs ].size(); j++ ) 1745 { 1746 if ( m_layerIdsInAddOutputLayerSet[addOutLs][ j ] == m_layerIdsInSets[ refLayerSetIdx][ i ] ) 1747 { 1748 outputLayerFlag = true; 1749 break; 1750 } 1751 } 1752 vps.setOutputLayerFlag( m_vpsNumLayerSets + addOutLs, i, outputLayerFlag ); 1753 } 1754 } 1755 vps.deriveTargetLayerIdLists(); 1756 #endif 1639 1757 1640 } 1758 1641 … … 1761 1644 vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag ); 1762 1645 1763 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1764 1646 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( ); 1765 1647 assert( pcVPSVUI ); 1766 #endif1767 1648 1768 1649 if ( m_vpsVuiPresentFlag ) 1769 1650 { 1770 #if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1771 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( );1772 1773 assert( pcVPSVUI );1774 #endif1775 1776 1651 // All this stuff could actually be derived by the encoder, 1777 1652 // however preliminary setting it from input parameters … … 1779 1654 pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag ); 1780 1655 pcVPSVUI->setCrossLayerIrapAlignedFlag ( m_crossLayerIrapAlignedFlag ); 1781 #if H_MV_HLS_7_MISC_P0068_211782 1656 pcVPSVUI->setAllLayersIdrAlignedFlag ( m_allLayersIdrAlignedFlag ); 1783 #endif1784 1657 pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag ); 1785 1658 pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag ); … … 1787 1660 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1788 1661 { 1789 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271790 1662 for( Int i = 0; i <= vps.getVpsNumLayerSetsMinus1(); i++ ) 1791 #else1792 for( Int i = 0; i <= vps.getVpsNumberLayerSetsMinus1(); i++ )1793 #endif1794 1663 { 1795 1664 for( Int j = 0; j <= vps.getMaxTLayers(); j++ ) … … 1909 1778 pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD 1910 1779 } 1911 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1912 1780 else 1913 1781 { 1914 1782 pcVPSVUI->setCrossLayerIrapAlignedFlag ( false ); 1915 1783 } 1916 #endif1917 1784 } 1918 1785 #endif … … 1970 1837 #endif 1971 1838 } 1972 #if QC_SPIVMP_MPI_G01191839 #if H_3D_SPIVMP 1973 1840 vps.setSubPUMPILog2Size( m_iSubPUMPILog2Size ); 1974 1841 #endif -
trunk/source/Lib/TLibCommon/ContextTables.h
r872 r884 94 94 95 95 #if H_3D_ARP 96 #if MTK_ARP_FLAG_CABAC_SIMP_G006197 96 #define NUM_ARPW_CTX 3 ///< number of context models for weighting factor index used by advanced residual prediction 98 #else99 #define NUM_ARPW_CTX 4 ///< number of context models for weighting factor index used by advanced residual prediction100 #endif101 97 #endif 102 98 103 99 #if H_3D_IC 104 #if MTK_IC_FLAG_CABAC_SIMP_G0061105 100 #define NUM_IC_FLAG_CTX 1 ///< number of context models for illumination compensation flag 106 #else107 #define NUM_IC_FLAG_CTX 3 ///< number of context models for illumination compensation flag108 #endif109 101 #endif 110 102 … … 112 104 113 105 #if H_3D_DIM 114 #if QC_GENERIC_SDC_G0122115 106 #define NUM_DEPTH_INTRA_MODE_CTX 1 ///< number of context models for depth intra modes 116 #else117 #define NUM_DEPTH_INTRA_MODE_CTX 8 ///< number of context models for depth intra modes118 #endif119 107 #define NUM_DDC_FLAG_CTX 2 ///< number of context models for deltaDC flag (DMM or RBC) 120 108 #define NUM_DDC_DATA_CTX 1 ///< number of context models for deltaDC data (DMM or RBC) … … 122 110 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 123 111 #endif 124 #if QC_GENERIC_SDC_G0122125 112 #define NUM_ANGLE_FLAG_CTX 3 126 #if !QC_SDC_UNIFY_G0130127 #define NUM_INTRASDC_FLAG_CTX 3128 #endif129 #endif130 113 #endif 131 114 132 115 #if H_3D_DIM_SDC 133 #define SDC_NUM_RESIDUAL_FLAG_CTX 1 134 #define SDC_NUM_RESIDUAL_CTX 1 135 #endif 136 137 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 138 #define NUM_INTER_SDC_FLAG_CTX 1 ///< number of context models for inter SDC flag 139 #define NUM_INTER_SDC_SIGN_FLAG_CTX 1 ///< number of context models for sign of inter SDC residual 140 #define NUM_INTER_SDC_RESIDUAL_CTX 1 ///< number of context models for abs of inter SDC residual 141 #endif 142 143 #if QC_SDC_UNIFY_G0130 116 #define SDC_NUM_RESIDUAL_FLAG_CTX 1 117 #define SDC_NUM_RESIDUAL_CTX 1 144 118 #define NUM_SDC_FLAG_CTX 1 ///< number of context 145 119 #endif … … 366 340 367 341 #if H_3D_ARP 368 #if MTK_ARP_FLAG_CABAC_SIMP_G0061369 342 static const UChar 370 343 INIT_ARPW[3][NUM_ARPW_CTX] = … … 374 347 { 162, 153, 162 }, 375 348 }; 376 #else 377 static const UChar 378 INIT_ARPW[3][NUM_ARPW_CTX] = 379 { 380 { 162, 153, 154, 162 }, 381 { 162, 153, 154, 162 }, 382 { 162, 153, 154, 162 }, 383 }; 384 #endif 349 385 350 #endif 386 351 #if H_3D_IC 387 #if MTK_IC_FLAG_CABAC_SIMP_G0061388 352 static const UChar 389 353 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = … … 393 357 { 154 }, 394 358 }; 395 #else 396 static const UChar 397 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 398 { 399 { 154, 154, 154, }, 400 { 154, 154, 154, }, 401 { 154, 154, 154, }, 402 }; 403 #endif 359 404 360 #endif 405 361 #if H_3D_DIM 406 #if QC_GENERIC_SDC_G0122407 362 static const UChar 408 363 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] = … … 412 367 { 154, } 413 368 }; 414 #else 415 static const UChar 416 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] = 417 { 418 {0, 0, 64, 168, 168, 124, CNU, 0}, 419 {0, 64, 0, 183, CNU, 108, 0, 0}, 420 {64, 0, CNU, CNU, 168, 109, 0, 0} 421 }; 422 #endif 423 424 #if QC_GENERIC_SDC_G0122 369 425 370 static const UChar 426 371 INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] = … … 430 375 { 155, 170, 157 }, 431 376 }; 432 #if !QC_SDC_UNIFY_G0130433 static const UChar434 INIT_INTRASDC_FLAG[3][NUM_INTRASDC_FLAG_CTX] =435 {436 { 214, 229, 230 },437 { 215, 202, 174 },438 { 213, 201, 246 },439 };440 #endif441 #endif442 377 443 378 static const UChar … … 482 417 #endif 483 418 484 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 485 static const UChar 486 INIT_INTER_SDC_FLAG[3][NUM_INTER_SDC_FLAG_CTX] = 487 { 488 { CNU }, 489 { 154 }, 490 { 154 }, 491 }; 492 493 static const UChar 494 INIT_INTER_SDC_SIGN_FLAG[3][NUM_INTER_SDC_SIGN_FLAG_CTX] = 495 { 496 { CNU }, 497 { 154 }, 498 { 154 }, 499 }; 500 501 static const UChar 502 INIT_INTER_SDC_RESIDUAL[3][NUM_INTER_SDC_RESIDUAL_CTX] = 503 { 504 { CNU }, 505 { 154 }, 506 { 154 }, 507 }; 508 #endif 419 509 420 //! \} 510 #if QC_SDC_UNIFY_G0130421 #if H_3D_DIM_SDC 511 422 static const UChar 512 423 INIT_SDC_FLAG[3][NUM_SDC_FLAG_CTX] = -
trunk/source/Lib/TLibCommon/SEI.h
r872 r884 72 72 SCALABLE_NESTING = 133, 73 73 REGION_REFRESH_INFO = 134, 74 #if H_MV _HLS_7_SEI_P0204_2674 #if H_MV 75 75 SUB_BITSTREAM_PROPERTY = 139, // Final PayloadType to be defined after finalization 76 76 #endif … … 366 366 }; 367 367 368 #if H_MV _HLS_7_SEI_P0204_26368 #if H_MV 369 369 class SEISubBitstreamProperty : public SEI 370 370 { -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r872 r884 123 123 #if H_3D_DIM_SDC 124 124 m_pbSDCFlag = NULL; 125 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101126 for( Int i = 0; i < 4; i++ )127 {128 m_apSegmentDCOffset[i] = NULL;129 }130 #else131 125 m_apSegmentDCOffset[0] = NULL; 132 126 m_apSegmentDCOffset[1] = NULL; 133 #endif134 127 #endif 135 128 #endif … … 153 146 #endif 154 147 #if H_3D_INTER_SDC 155 #if !QC_SDC_UNIFY_G0130156 m_pbInterSDCFlag = NULL;157 for( Int i = 0; i < 4; i++ )158 {159 m_apSegmentInterDCOffset[i] = NULL;160 }161 #endif162 #if !SEC_INTER_SDC_G0101163 m_pucInterSDCMask = NULL;164 #endif165 148 #endif 166 149 #if H_3D_DBBP … … 168 151 #endif 169 152 170 #if MTK_DDD_G0063153 #if H_3D_DDD 171 154 m_pucDisparityDerivedDepth = NULL; 172 155 m_pbUseDDD = NULL; … … 291 274 #if H_3D_DIM_SDC 292 275 m_pbSDCFlag = (Bool*)xMalloc(Bool, uiNumPartition); 293 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101294 for( Int i = 0; i < 4; i++ )295 {296 m_apSegmentDCOffset[i] = (Pel*)xMalloc(Pel, uiNumPartition);297 }298 #else299 276 m_apSegmentDCOffset[0] = (Pel*)xMalloc(Pel, uiNumPartition); 300 277 m_apSegmentDCOffset[1] = (Pel*)xMalloc(Pel, uiNumPartition); 301 278 #endif 302 279 #endif 303 #endif304 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130305 m_pbInterSDCFlag = (Bool* )xMalloc(Bool, uiNumPartition);306 for( Int i = 0; i < 4; i++ )307 {308 m_apSegmentInterDCOffset[i] = (Int*)xMalloc(Int, uiNumPartition);309 }310 #endif311 280 #if H_3D_DBBP 312 281 m_pbDBBPFlag = (Bool* )xMalloc(Bool, uiNumPartition); … … 318 287 m_acCUMvField[1].setNumPartition(uiNumPartition ); 319 288 } 320 #if !SEC_INTER_SDC_G0101321 #if H_3D_INTER_SDC322 m_pucInterSDCMask = (UChar* )xMalloc(UChar, g_uiMaxCUHeight*g_uiMaxCUWidth);323 #endif324 #endif325 289 m_sliceStartCU = (UInt* )xMalloc(UInt, uiNumPartition); 326 290 m_sliceSegmentStartCU = (UInt* )xMalloc(UInt, uiNumPartition); … … 329 293 m_pcPattern = (TComPattern*)xMalloc(TComPattern, 1); 330 294 331 #if MTK_DDD_G0063295 #if H_3D_DDD 332 296 m_pucDisparityDerivedDepth = (UChar* )xMalloc( UChar, uiNumPartition); 333 297 m_pbUseDDD = (Bool* ) xMalloc( Bool, uiNumPartition); … … 413 377 #endif 414 378 415 #if MTK_DDD_G0063379 #if H_3D_DDD 416 380 if ( m_pucDisparityDerivedDepth ) { xFree(m_pucDisparityDerivedDepth); m_pucDisparityDerivedDepth = NULL; } 417 381 if ( m_pbUseDDD ) { xFree(m_pbUseDDD); m_pbUseDDD = NULL; } … … 441 405 #if H_3D_DIM_SDC 442 406 if ( m_pbSDCFlag ) { xFree(m_pbSDCFlag); m_pbSDCFlag = NULL; } 443 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101444 for( Int i = 0; i < 4; i++ )445 {446 if ( m_apSegmentDCOffset[i] ) { xFree(m_apSegmentDCOffset[i]); m_apSegmentDCOffset[i] = NULL; }447 }448 #else449 407 if ( m_apSegmentDCOffset[0] ) { xFree(m_apSegmentDCOffset[0]); m_apSegmentDCOffset[0] = NULL; } 450 408 if ( m_apSegmentDCOffset[1] ) { xFree(m_apSegmentDCOffset[1]); m_apSegmentDCOffset[1] = NULL; } 451 #endif452 409 #endif 453 410 #endif 454 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130455 if ( m_pbInterSDCFlag ) { xFree(m_pbInterSDCFlag); m_pbInterSDCFlag = NULL; }456 for(Int i = 0; i < 4; i++ )457 {458 if ( m_apSegmentInterDCOffset[i] ) { xFree( m_apSegmentInterDCOffset[i] ); m_apSegmentInterDCOffset[i] = NULL; }459 }460 #endif461 411 #if H_3D_DBBP 462 412 if ( m_pbDBBPFlag ) { xFree(m_pbDBBPFlag); m_pbDBBPFlag = NULL; } 463 413 #endif 464 414 } 465 #if !SEC_INTER_SDC_G0101466 #if H_3D_INTER_SDC467 if ( m_pucInterSDCMask ) { xFree(m_pucInterSDCMask); m_pucInterSDCMask = NULL; }468 #endif469 #endif470 415 m_pcCUAboveLeft = NULL; 471 416 m_pcCUAboveRight = NULL; … … 560 505 #endif 561 506 562 #if MTK_DDD_G0063507 #if H_3D_DDD 563 508 m_pucDisparityDerivedDepth[ui] = pcFrom->m_pucDisparityDerivedDepth[ui]; 564 509 m_pbUseDDD[ui] = pcFrom->m_pbUseDDD[ui]; … … 593 538 #if H_3D_DIM_SDC 594 539 m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui]; 595 #endif596 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130597 m_pbInterSDCFlag[ui] = pcFrom->m_pbInterSDCFlag[ui];598 540 #endif 599 541 #if H_3D_DBBP … … 646 588 #endif 647 589 648 #if MTK_DDD_G0063590 #if H_3D_DDD 649 591 memset( m_pucDisparityDerivedDepth + firstElement, 0, numElements * sizeof( *m_pucDisparityDerivedDepth ) ); 650 592 memset( m_pbUseDDD + firstElement, 0, numElements * sizeof( *m_pbUseDDD ) ); … … 665 607 #if H_3D_DIM_SDC 666 608 memset( m_pbSDCFlag + firstElement, 0, numElements * sizeof( *m_pbSDCFlag ) ); 667 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101668 for( Int i = 0; i < 4; i++ )669 {670 memset( m_apSegmentDCOffset[i] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[i] ) );671 }672 #else673 609 memset( m_apSegmentDCOffset[0] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[0] ) ); 674 610 memset( m_apSegmentDCOffset[1] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[1] ) ); 675 611 #endif 676 #endif677 #endif678 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130679 memset( m_pbInterSDCFlag + firstElement, 0, numElements * sizeof( *m_pbInterSDCFlag ) );680 for( Int i = 0; i < 4; i++ )681 {682 memset( m_apSegmentInterDCOffset[i] + firstElement, 0, numElements * sizeof( *m_apSegmentInterDCOffset[i] ) );683 }684 612 #endif 685 613 #if H_3D_DBBP … … 834 762 #endif 835 763 836 #if MTK_DDD_G0063764 #if H_3D_DDD 837 765 m_pucDisparityDerivedDepth[ui] = 0; 838 766 m_pbUseDDD[ui] = 0; … … 853 781 #if H_3D_DIM_SDC 854 782 m_pbSDCFlag [ui] = false; 855 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101856 for( Int i = 0; i < 4; i++ )857 {858 m_apSegmentDCOffset[i][ui] = 0;859 }860 #else861 783 m_apSegmentDCOffset[0][ui] = 0; 862 784 m_apSegmentDCOffset[1][ui] = 0; 863 785 #endif 864 #endif865 #endif866 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130867 m_pbInterSDCFlag[ui] = false;868 for( Int i = 0; i < 4; i++ )869 {870 m_apSegmentInterDCOffset[i][ui] = 0;871 }872 786 #endif 873 787 #if H_3D_DBBP … … 955 869 #endif 956 870 957 #if MTK_DDD_G0063871 #if H_3D_DDD 958 872 memset( m_pucDisparityDerivedDepth, 0, iSizeInUchar ); 959 873 memset( m_pbUseDDD, 0, iSizeInBool ); … … 982 896 #if H_3D_DIM_SDC 983 897 memset( m_pbSDCFlag, 0, sizeof(Bool) * m_uiNumPartition ); 984 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101985 for( Int i = 0; i < 4; i++ )986 {987 memset( m_apSegmentDCOffset[i], 0, sizeof(Pel) * m_uiNumPartition );988 }989 #else990 898 memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition ); 991 899 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition ); 992 900 #endif 993 #endif994 #endif995 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130996 memset( m_pbInterSDCFlag, 0, sizeof( Bool ) * m_uiNumPartition );997 for( Int i = 0; i < 4; i++ )998 {999 memset( m_apSegmentInterDCOffset[i], 0, sizeof( Int ) * m_uiNumPartition );1000 }1001 901 #endif 1002 902 #if H_3D_DBBP … … 1056 956 #endif 1057 957 1058 #if MTK_DDD_G0063958 #if H_3D_DDD 1059 959 m_pucDisparityDerivedDepth[ui] = pcCU->m_pucDisparityDerivedDepth[uiPartOffset+ui]; 1060 960 m_pbUseDDD[ui] = pcCU->m_pbUseDDD[uiPartOffset+ui]; … … 1075 975 #if H_3D_DIM_SDC 1076 976 m_pbSDCFlag [ui] = pcCU->m_pbSDCFlag [ uiPartOffset + ui ]; 1077 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G01011078 for( Int i = 0; i < 4; i++ )1079 {1080 m_apSegmentDCOffset[i][ui] = pcCU->m_apSegmentDCOffset[i] [ uiPartOffset + ui ];1081 }1082 #else1083 977 m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0] [ uiPartOffset + ui ]; 1084 978 m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1] [ uiPartOffset + ui ]; 1085 979 #endif 1086 #endif1087 #endif1088 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G01301089 m_pbInterSDCFlag [ui] = pcCU->m_pbInterSDCFlag [ uiPartOffset + ui ];1090 for( Int i = 0; i < 4; i++ )1091 {1092 m_apSegmentInterDCOffset[i][ui] = pcCU->m_apSegmentInterDCOffset[i][ uiPartOffset + ui ];1093 }1094 980 #endif 1095 981 #if H_3D_DBBP … … 1216 1102 #endif 1217 1103 1218 #if MTK_DDD_G00631104 #if H_3D_DDD 1219 1105 m_pucDisparityDerivedDepth = pcCU->getDDDepth() + uiPart; 1220 1106 m_pbUseDDD = pcCU->getUseDDD() + uiPart; … … 1246 1132 #if H_3D_DIM_SDC 1247 1133 m_pbSDCFlag = pcCU->getSDCFlag() + uiPart; 1248 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G01011249 for( Int i = 0; i < 4; i++ )1250 {1251 m_apSegmentDCOffset[i] = pcCU->getSDCSegmentDCOffset(i) + uiPart;1252 }1253 #else1254 1134 m_apSegmentDCOffset[0] = pcCU->getSDCSegmentDCOffset(0) + uiPart; 1255 1135 m_apSegmentDCOffset[1] = pcCU->getSDCSegmentDCOffset(1) + uiPart; 1256 #endif1257 1136 #endif 1258 1137 #endif 1259 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G01301260 m_pbInterSDCFlag = pcCU->getInterSDCFlag() + uiPart;1261 for( Int i = 0; i < 4; i++ )1262 {1263 m_apSegmentInterDCOffset[i] = pcCU->getInterSDCSegmentDCOffset( i ) + uiPart;1264 }1265 #endif1266 1138 #if H_3D_DBBP 1267 1139 m_pbDBBPFlag = pcCU->getDBBPFlag() + uiPart; … … 1380 1252 #endif 1381 1253 1382 #if MTK_DDD_G00631254 #if H_3D_DDD 1383 1255 m_pucDisparityDerivedDepth = pcCU->getDDDepth() + uiAbsPartIdx; 1384 1256 m_pbUseDDD = pcCU->getUseDDD() + uiAbsPartIdx; … … 1445 1317 memcpy( m_puhCbf[2] + uiOffset, pcCU->getCbf(TEXT_CHROMA_V), iSizeInUchar ); 1446 1318 1447 #if MTK_DDD_G00631319 #if H_3D_DDD 1448 1320 memcpy( m_pucDisparityDerivedDepth + uiOffset, pcCU->getDDDepth(), iSizeInUchar ); 1449 1321 memcpy( m_pbUseDDD + uiOffset, pcCU->getUseDDD(), iSizeInBool ); … … 1465 1337 #if H_3D_DIM_SDC 1466 1338 memcpy( m_pbSDCFlag + uiOffset, pcCU->getSDCFlag(), iSizeInBool ); 1467 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G01011468 for( Int i = 0; i < 4; i++ )1469 {1470 memcpy( m_apSegmentDCOffset[i] + uiOffset, pcCU->getSDCSegmentDCOffset(i), sizeof( Pel ) * uiNumPartition);1471 }1472 #else1473 1339 memcpy( m_apSegmentDCOffset[0] + uiOffset, pcCU->getSDCSegmentDCOffset(0), sizeof( Pel ) * uiNumPartition); 1474 1340 memcpy( m_apSegmentDCOffset[1] + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition); 1475 1341 #endif 1476 #endif1477 #endif1478 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G01301479 memcpy( m_pbInterSDCFlag + uiOffset, pcCU->getInterSDCFlag(), iSizeInBool );1480 for( Int i = 0; i < 4; i++ )1481 {1482 memcpy( m_apSegmentInterDCOffset[i] + uiOffset, pcCU->getInterSDCSegmentDCOffset( i ), sizeof( Int ) * uiNumPartition);1483 }1484 1342 #endif 1485 1343 #if H_3D_DBBP … … 1559 1417 #endif 1560 1418 1561 #if MTK_DDD_G00631419 #if H_3D_DDD 1562 1420 memcpy( rpcCU->getDDDepth() + m_uiAbsIdxInLCU, m_pucDisparityDerivedDepth, iSizeInUchar ); 1563 1421 memcpy( rpcCU->getUseDDD() + m_uiAbsIdxInLCU, m_pbUseDDD, iSizeInBool ); … … 1602 1460 #if H_3D_DIM_SDC 1603 1461 memcpy( rpcCU->getSDCFlag() + m_uiAbsIdxInLCU, m_pbSDCFlag, iSizeInBool ); 1604 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G01011605 for( Int i = 0; i < 4; i++ )1606 {1607 memcpy( rpcCU->getSDCSegmentDCOffset(i) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[i], sizeof( Pel ) * m_uiNumPartition);1608 }1609 #else1610 1462 memcpy( rpcCU->getSDCSegmentDCOffset(0) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition); 1611 1463 memcpy( rpcCU->getSDCSegmentDCOffset(1) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition); 1612 1464 #endif 1613 #endif1614 #endif1615 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G01301616 memcpy( rpcCU->getInterSDCFlag() + m_uiAbsIdxInLCU, m_pbInterSDCFlag, iSizeInBool );1617 for( Int i = 0;i < 4; i++ )1618 {1619 memcpy( rpcCU->getInterSDCSegmentDCOffset( i ) + m_uiAbsIdxInLCU, m_apSegmentInterDCOffset[i], sizeof( Int ) * m_uiNumPartition);1620 }1621 1465 #endif 1622 1466 #if H_3D_DBBP … … 1707 1551 memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2], iSizeInUchar ); 1708 1552 1709 #if MTK_DDD_G00631553 #if H_3D_DDD 1710 1554 memcpy( rpcCU->getDDDepth() + uiPartOffset, m_pucDisparityDerivedDepth, iSizeInUchar ); 1711 1555 memcpy( rpcCU->getUseDDD() + uiPartOffset, m_pbUseDDD, iSizeInBool ); … … 1726 1570 #if H_3D_DIM_SDC 1727 1571 memcpy( rpcCU->getSDCFlag() + uiPartOffset, m_pbSDCFlag, iSizeInBool ); 1728 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G01011729 for( Int i = 0; i < 4; i++ )1730 {1731 memcpy( rpcCU->getSDCSegmentDCOffset(i) + uiPartOffset, m_apSegmentDCOffset[i], sizeof( Pel ) * uiQNumPart);1732 }1733 #else1734 1572 memcpy( rpcCU->getSDCSegmentDCOffset(0) + uiPartOffset, m_apSegmentDCOffset[0], sizeof( Pel ) * uiQNumPart); 1735 1573 memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart); 1736 1574 #endif 1737 #endif1738 #endif1739 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G01301740 memcpy( rpcCU->getInterSDCFlag() + uiPartOffset, m_pbInterSDCFlag, iSizeInBool );1741 for( Int i = 0; i < 4; i++ )1742 {1743 memcpy( rpcCU->getInterSDCSegmentDCOffset( i ) + uiPartOffset, m_apSegmentInterDCOffset[i], sizeof( Int ) * uiQNumPart);1744 }1745 1575 #endif 1746 1576 #if H_3D_DBBP … … 1791 1621 } 1792 1622 1793 #if MTK_DDD_G00631623 #if H_3D_DDD 1794 1624 Void TComDataCU::setDDDepthSubParts ( UChar ucDDD, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 1795 1625 { … … 2463 2293 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2464 2294 uiCtx = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0; 2465 2466 #if !MTK_ARP_FLAG_CABAC_SIMP_G0061 2467 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2468 uiCtx += ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1): 0; 2469 #endif 2470 return uiCtx; 2471 } 2472 #endif 2473 #if !MTK_IC_FLAG_CABAC_SIMP_G0061 2474 #if H_3D_IC 2475 UInt TComDataCU::getCtxICFlag( UInt uiAbsPartIdx ) 2476 { 2477 UInt uiCtx = 0; 2478 2479 TComDataCU* pcTempCU = NULL; 2480 UInt uiTempPartIdx = 0; 2481 2482 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2483 uiCtx = ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0; 2484 2485 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2486 uiCtx += ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0; 2487 2488 return uiCtx; 2489 } 2490 #endif 2295 return uiCtx; 2296 } 2491 2297 #endif 2492 2298 #if H_3D_DBBP … … 2569 2375 #endif 2570 2376 2571 #if H_3D_INTER_SDC 2572 #if !QC_SDC_UNIFY_G0130 2573 Void TComDataCU::setInterSDCFlagSubParts ( Bool bInterSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2574 { 2575 setSubPart( bInterSDCFlag, m_pbInterSDCFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 2576 } 2577 2578 UInt TComDataCU::getCtxInterSDCFlag( UInt uiAbsPartIdx ) 2377 #if H_3D_DIM_SDC 2378 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx ) 2579 2379 { 2580 2380 return 0; 2581 }2582 #endif2583 2584 #if !SEC_INTER_SDC_G01012585 Void TComDataCU::xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask )2586 {2587 UInt uiWidth = pcCU->getWidth ( 0 );2588 UInt uiHeight = pcCU->getHeight( 0 );2589 UInt uiPartitionSize = pcCU->getPartitionSize( 0 );2590 UInt uiXOffset = 0, uiYOffset = 0;2591 2592 switch( uiPartitionSize )2593 {2594 case SIZE_2NxN:2595 uiXOffset = uiWidth; uiYOffset = uiHeight >> 1; break;2596 case SIZE_2NxnU:2597 uiXOffset = uiWidth; uiYOffset = uiHeight >> 2; break;2598 case SIZE_2NxnD:2599 uiXOffset = uiWidth; uiYOffset = ( uiHeight >> 1 ) + ( uiHeight >> 2 ); break;2600 case SIZE_Nx2N:2601 uiXOffset = uiWidth >> 1; uiYOffset = uiHeight; break;2602 case SIZE_nLx2N:2603 uiXOffset = uiWidth >> 2; uiYOffset = uiHeight; break;2604 case SIZE_nRx2N:2605 uiXOffset = ( uiWidth >> 1 ) + ( uiWidth >> 2 ); uiYOffset = uiHeight; break;2606 case SIZE_NxN:2607 uiXOffset = uiWidth >> 1; uiYOffset = uiHeight >> 1; break;2608 default:2609 assert( uiPartitionSize == SIZE_2Nx2N );2610 uiXOffset = uiWidth; uiYOffset = uiHeight; break;2611 }2612 2613 UInt uiPelX, uiPelY;2614 2615 memset( pMask, 0, uiWidth*uiHeight );2616 2617 //mask2618 if( uiPartitionSize == SIZE_2NxN || uiPartitionSize == SIZE_2NxnD || uiPartitionSize == SIZE_2NxnU )2619 {2620 for( uiPelY = 0; uiPelY < uiYOffset; uiPelY++ )2621 {2622 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )2623 {2624 pMask[uiPelX + uiPelY*uiWidth] = 0;2625 }2626 }2627 2628 for( ; uiPelY < uiHeight; uiPelY++ )2629 {2630 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )2631 {2632 pMask[uiPelX + uiPelY*uiWidth] = 1;2633 }2634 }2635 }2636 else if( uiPartitionSize == SIZE_Nx2N || uiPartitionSize == SIZE_nLx2N || uiPartitionSize == SIZE_nRx2N )2637 {2638 for( uiPelY = 0; uiPelY < uiHeight; uiPelY++ )2639 {2640 for( uiPelX = 0; uiPelX < uiXOffset; uiPelX++ )2641 {2642 pMask[uiPelX + uiPelY*uiWidth] = 0;2643 }2644 2645 for( ; uiPelX < uiWidth; uiPelX++ )2646 {2647 pMask[uiPelX + uiPelY*uiWidth] = 1;2648 }2649 }2650 }2651 else if( uiPartitionSize == SIZE_NxN )2652 {2653 for( uiPelY = 0; uiPelY < uiYOffset; uiPelY++ )2654 {2655 for( uiPelX = 0; uiPelX < uiXOffset; uiPelX++ )2656 {2657 pMask[uiPelX + uiPelY*uiWidth] = 0;2658 }2659 2660 for( ; uiPelX < uiWidth; uiPelX++ )2661 {2662 pMask[uiPelX + uiPelY*uiWidth] = 1;2663 }2664 }2665 2666 for( ; uiPelY < uiHeight; uiPelY++ )2667 {2668 for( uiPelX = 0; uiPelX < uiXOffset; uiPelX++ )2669 {2670 pMask[uiPelX + uiPelY*uiWidth] = 2;2671 }2672 2673 for( ; uiPelX < uiWidth; uiPelX++ )2674 {2675 pMask[uiPelX + uiPelY*uiWidth] = 3;2676 }2677 }2678 }2679 2680 }2681 #endif2682 #endif2683 2684 #if QC_GENERIC_SDC_G01222685 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx )2686 {2687 #if QC_SDC_UNIFY_G01302688 return 0;2689 #else2690 TComDataCU* pcTempCU;2691 UInt uiTempPartIdx;2692 UInt uiCtx = 0;2693 2694 // Get BCBP of left PU2695 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );2696 uiCtx = ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0;2697 2698 // Get BCBP of above PU2699 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );2700 uiCtx += ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0;2701 2702 return uiCtx;2703 #endif2704 2381 } 2705 2382 … … 2947 2624 // check general CU information 2948 2625 if( !getSlice()->getIsDepth() || !isIntra(uiAbsPartIdx) || getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) 2626 { 2949 2627 return false; 2950 #if QC_GENERIC_SDC_G0122 2628 } 2629 2951 2630 if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) && !isDimDeltaDC( getLumaIntraDir( uiAbsPartIdx ) ) ) 2952 2631 { … … 2960 2639 2961 2640 return false; 2962 #endif2963 2641 // check prediction mode 2964 2642 UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); … … 3582 3260 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3583 3261 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3584 { 3585 #if MTK_NBDV_IVREF_FIX_G0067 3262 { 3586 3263 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1) 3587 #else3588 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() )3589 #endif3590 3264 { 3591 3265 return false; … … 3594 3268 Int refViewIdx = pDInfo->m_aVIdxCan; 3595 3269 TComPic* picDepth = getSlice()->getIvPic( true, refViewIdx ); 3596 3270 3597 3271 if( picDepth == NULL ) // No depth reference avail 3598 3272 { … … 3602 3276 3603 3277 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3604 3278 3605 3279 Bool refViewAvailFlag = false; 3606 3280 UChar predFlag[2] = {0, 0}; 3607 #if !MTK_RBIP_VSP_G0069 3608 Int refListIdY = 0; 3609 Int viewIdInRefListX = -1; 3610 #endif 3611 3281 3612 3282 for( Int iRefListIdX = 0; iRefListIdX < 2 && !refViewAvailFlag; iRefListIdX++ ) 3613 3283 { … … 3620 3290 refViewAvailFlag = true; 3621 3291 predFlag[iRefListIdX] = 1; 3622 #if !MTK_RBIP_VSP_G00693623 viewIdInRefListX = m_pcSlice->getRefPic(eRefPicListX, i)->getViewId();3624 refListIdY = 1 - iRefListIdX;3625 #endif3626 3292 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3627 3293 #if H_3D_NBDV … … 3631 3297 } 3632 3298 } 3633 3634 #if !MTK_RBIP_VSP_G00693635 if (m_pcSlice->isInterB() && refViewAvailFlag)3636 {3637 RefPicList eRefPicListY = RefPicList( refListIdY );3638 refViewAvailFlag = false;3639 for ( Int i = 0; i < m_pcSlice->getNumRefIdx(eRefPicListY) && !refViewAvailFlag; i++ )3640 {3641 Int viewIdxRefInListY = m_pcSlice->getRefPic(eRefPicListY, i)->getViewIndex();3642 if ( viewIdxRefInListY != refViewIdx && viewIdxRefInListY != m_pcSlice->getViewIndex() )3643 {3644 refViewAvailFlag = true;3645 predFlag[refListIdY] = 1;3646 TComMv cMv = pDInfo->m_acNBDV;3647 3648 Int viewIdInRefListY = m_pcSlice->getRefPic( eRefPicListY, i)->getViewId();3649 Int currViewId = m_pcSlice->getViewId();3650 3651 //// Following might be added here when MV-HEVC 5 HLS is included (and derivations above removed):3652 // Int viewIdInRefListX = m_pcSlice->getVPS()->getViewIdVal( refViewIdx );3653 3654 Int iScale = xGetDistScaleFactor( currViewId, viewIdInRefListY, currViewId, viewIdInRefListX );3655 3656 // Can iScale == 4096 happen?, I guess not since viewIdInRefListY is always unequal to viewIdInRefListX.3657 if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag() )3658 {3659 cMv = cMv.scaleMv( iScale );3660 }3661 else3662 {3663 3664 cMv = cMv;3665 }3666 clipMv( cMv );3667 pcMvFieldNeighbours[(iCount<<1)+refListIdY].setMvField( cMv, i );3668 #if H_3D_NBDV3669 pcMvFieldNeighbours[(iCount<<1)+refListIdY].getMv().setIDVFlag (false);3670 #endif3671 }3672 }3673 }3674 #endif3675 3299 3676 3300 // Set values to be returned … … 3791 3415 for ( Int currListPos = (ivCandDir[0] ? 1 : 0); currListPos < iCount; currListPos++ ) 3792 3416 { 3793 #if NTT_STORE_SPDV_VSP_G01483794 3417 if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] != 0 ) ) 3795 #else3796 if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] == 1 ) )3797 #endif3798 3418 { 3799 3419 continue; … … 4227 3847 UChar tmpDir; 4228 3848 4229 #if MTK_DDD_G00633849 #if H_3D_DDD 4230 3850 m_iUseDDDCandIdx = -1; 4231 3851 #endif … … 4311 3931 iPosLeftAbove[0] = numA1B1B0; 4312 3932 #if H_3D_VSP 4313 #if NTT_STORE_SPDV_VSP_G01484314 3933 if (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 4315 #else4316 if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 14317 #endif4318 3934 #if H_3D_IC 4319 3935 && !bICFlag … … 4338 3954 iPosLeftAbove[1] = numA1B1B0; 4339 3955 #if H_3D_VSP 4340 #if NTT_STORE_SPDV_VSP_G01484341 3956 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) != 0) 4342 #else4343 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1)4344 #endif4345 3957 #if H_3D_IC 4346 3958 && !bICFlag … … 4365 3977 { 4366 3978 #if H_3D_VSP 4367 #if NTT_STORE_SPDV_VSP_G01484368 3979 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) != 0) 4369 #else4370 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1)4371 #endif4372 3980 #if H_3D_IC 4373 3981 && !bICFlag … … 4390 3998 { 4391 3999 #if H_3D_VSP 4392 #if NTT_STORE_SPDV_VSP_G01484393 4000 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) != 0 4394 #else4395 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 14396 #endif4397 4001 #if H_3D_IC 4398 4002 && !bICFlag … … 4417 4021 { 4418 4022 #if H_3D_VSP 4419 #if NTT_STORE_SPDV_VSP_G01484420 4023 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) != 0) 4421 #else4422 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)4423 #endif4424 4024 #if H_3D_IC 4425 4025 && !bICFlag … … 4449 4049 if( bMPIFlag) 4450 4050 { 4451 #if QC_SPIVMP_MPI_G01194452 4051 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4453 4052 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); … … 4556 4155 } 4557 4156 #endif 4558 #else 4559 UInt uiPartIdxCenter; 4560 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); 4561 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4562 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4563 Int tRef[2]={-1, -1}; 4564 4565 #if H_3D_FCO 4566 TComPic * pcTexturePic = m_pcSlice->getTexturePic(); 4567 TComDataCU *pcTextureCU = 0; 4568 if ( pcTexturePic ) 4569 pcTextureCU = pcTexturePic->getCU( getAddr() ); 4570 #else 4571 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 4572 #endif 4573 4574 #if H_3D_FCO 4575 if ( pcTextureCU && pcTexturePic->getReconMark() && !pcTextureCU->isIntra( uiPartIdxCenter ) ) 4576 #else 4577 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) ) 4578 #endif 4579 { 4580 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, tmpMV[0] ); 4581 tRef[0] = getPic()->isTextRefValid( REF_PIC_LIST_0, tmpMV[0].getRefIdx() ); 4582 if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) ) 4583 { 4584 TComMv cMvPred = tmpMV[0].getMv(); 4585 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4586 cMvPred+=cAdd; 4587 cMvPred>>=2; 4588 clipMv(cMvPred); 4589 tmpMV[0].setMvField(cMvPred,tRef[0]); 4590 } 4591 if ( getSlice()->isInterB() ) 4592 { 4593 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, tmpMV[1] ); 4594 tRef[1] = getPic()->isTextRefValid( REF_PIC_LIST_1, tmpMV[1].getRefIdx() ); 4595 if( (tmpMV[1].getRefIdx()>=0) && ( tRef[1] >= 0) ) 4157 if( tmpDir != 0 ) 4158 { 4159 Int iCnloop = 0; 4160 Bool bRemoveSpa = false; //pruning 4161 4162 for(Int i = 0; i < 2; i ++) 4163 { 4164 iCnloop = iPosLeftAbove[i]; 4165 if ( iCnloop == -1 ) 4596 4166 { 4597 TComMv cMvPred = tmpMV[1].getMv(); 4598 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4599 cMvPred+=cAdd; 4600 cMvPred>>=2; 4601 clipMv(cMvPred); 4602 tmpMV[1].setMvField(cMvPred,tRef[1]); 4167 continue; 4603 4168 } 4604 } 4605 4606 tmpDir = 0; 4607 if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) ) 4608 { 4609 tmpDir += ((tmpMV[0].getRefIdx()>=0)?1:0); 4610 } 4611 if( (tmpMV[1].getRefIdx()>=0) && ( tRef[1] >= 0) ) 4612 { 4613 tmpDir += ((tmpMV[1].getRefIdx()>=0)?2:0); 4614 } 4615 #endif 4616 if( tmpDir != 0 ) 4617 { 4618 Int iCnloop = 0; 4619 Bool bRemoveSpa = false; //pruning 4620 4621 for(Int i = 0; i < 2; i ++) 4169 if(tmpDir == puhInterDirNeighbours[iCnloop] && tmpMV[0]==pcMvFieldNeighbours[(iCnloop<<1)] && tmpMV[1]==pcMvFieldNeighbours[(iCnloop<<1)+1]) 4622 4170 { 4623 iCnloop = iPosLeftAbove[i]; 4624 if ( iCnloop == -1 ) 4171 bRemoveSpa = true; 4172 break; 4173 } 4174 } 4175 4176 if (!bRemoveSpa) 4177 { 4178 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4179 } 4180 else 4181 { 4182 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (iCnloop-iCount), iCount3DV); 4183 if (iCnloop<numA1B1B0) 4184 { 4185 numA1B1B0--; 4186 } 4187 iCountHEVC--; 4188 4189 if (iPosLeftAbove[0] != -1) 4190 { 4191 if (iCnloop == iPosLeftAbove[0]) 4625 4192 { 4626 continue;4193 iPosLeftAbove[0] = -1; 4627 4194 } 4628 if(tmpDir == puhInterDirNeighbours[iCnloop] && tmpMV[0]==pcMvFieldNeighbours[(iCnloop<<1)] && tmpMV[1]==pcMvFieldNeighbours[(iCnloop<<1)+1])4195 else 4629 4196 { 4630 bRemoveSpa = true; 4631 break; 4632 } 4197 iPosLeftAbove[0]++; 4198 } 4633 4199 } 4634 4635 if (!bRemoveSpa) 4200 if (iPosLeftAbove[1] != -1) 4636 4201 { 4637 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4638 } 4639 else 4640 { 4641 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (iCnloop-iCount), iCount3DV); 4642 if (iCnloop<numA1B1B0) 4202 if (iCnloop == iPosLeftAbove[1]) 4643 4203 { 4644 numA1B1B0--;4204 iPosLeftAbove[1] = -1; 4645 4205 } 4646 iCountHEVC--; 4647 4648 if (iPosLeftAbove[0] != -1) 4206 else 4649 4207 { 4650 if (iCnloop == iPosLeftAbove[0])4208 if (iCnloop > iPosLeftAbove[1]) 4651 4209 { 4652 iPosLeftAbove[0] = -1; 4653 } 4654 else 4655 { 4656 iPosLeftAbove[0]++; 4657 } 4658 } 4659 if (iPosLeftAbove[1] != -1) 4660 { 4661 if (iCnloop == iPosLeftAbove[1]) 4662 { 4663 iPosLeftAbove[1] = -1; 4664 } 4665 else 4666 { 4667 if (iCnloop > iPosLeftAbove[1]) 4668 { 4669 iPosLeftAbove[1]++; 4670 } 4210 iPosLeftAbove[1]++; 4671 4211 } 4672 4212 } 4673 4213 } 4674 #if QC_SPIVMP_MPI_G0119 4675 pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tmpMV[0].getRefIdx()); 4676 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tmpMV[1].getRefIdx()); 4677 #else 4678 if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) ) 4214 } 4215 pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tmpMV[0].getRefIdx()); 4216 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tmpMV[1].getRefIdx()); 4217 4218 puhInterDirNeighbours[iCount] = tmpDir; 4219 4220 if ( mrgCandIdx == iCount ) 4221 { 4222 return; 4223 } 4224 iCount ++; 4225 } 4226 } 4227 #if H_3D_DDD 4228 if( m_pcSlice->getIsDepth() && m_pcSlice->getViewIndex() != 0 && bMPIFlag ) 4229 { 4230 UInt uiPartIdx; 4231 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 4232 TComSlice *pcTextureSlice = pcTextureCU->getSlice(); 4233 4234 4235 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4236 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4237 tmpDir = 0; 4238 4239 xDeriveCenterIdx( uiPUIdx, uiPartIdx); 4240 4241 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdx ) ) 4242 { 4243 4244 TComMvField cMVField; 4245 Int iDV = 0; 4246 Int iViewIdx = 0; 4247 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_0, cMVField ); 4248 if( cMVField.getRefIdx() >= 0 ) 4249 { 4250 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_0, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4679 4251 { 4680 pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tRef[0]); 4681 } 4682 if ( getSlice()->isInterB()) 4683 { 4684 if( (tmpMV[1].getRefIdx()>=0) && ( tRef[1] >= 0) ) 4252 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_0, cMVField.getRefIdx())->getViewIndex(); 4253 iDV = cMVField.getHor(); 4254 4255 4256 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, cMVField.getRefIdx() ); 4257 4258 if( iValidDepRef >= 0 ) 4685 4259 { 4686 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tRef[1]); 4260 const TComMv cAdd( 2, 2 ); 4261 cMVField.getMv() += cAdd; 4262 cMVField.getMv() >>= 2; 4263 clipMv( cMVField.getMv() ); 4264 tmpMV[ 0 ].setMvField( cMVField.getMv(), iValidDepRef ); 4265 tmpDir = 1; 4687 4266 } 4688 4267 } 4689 #endif 4690 puhInterDirNeighbours[iCount] = tmpDir; 4268 } 4269 4270 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_1, cMVField ); 4271 4272 if( !tmpDir && cMVField.getRefIdx() >= 0 ) 4273 { 4274 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_1, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4275 { 4276 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_1, cMVField.getRefIdx())->getViewIndex(); 4277 iDV = cMVField.getHor(); 4278 4279 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, cMVField.getRefIdx() ); 4280 4281 if( iValidDepRef >= 0 ) 4282 { 4283 const TComMv cAdd( 2, 2 ); 4284 cMVField.getMv() += cAdd; 4285 cMVField.getMv() >>= 2; 4286 clipMv( cMVField.getMv() ); 4287 tmpMV[ 1 ].setMvField( cMVField.getMv(), iValidDepRef ); 4288 tmpDir = 2; 4289 } 4290 } 4291 } 4292 if( tmpDir != 0 ) 4293 { 4294 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4295 m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV, iViewIdx ); 4296 m_iUseDDDCandIdx = iCount; 4297 4298 if( tmpDir == 1 ) 4299 { 4300 pcMvFieldNeighbours[ iCount << 1 ] = tmpMV[ 0 ]; 4301 } 4302 else if( tmpDir == 2 ) 4303 { 4304 pcMvFieldNeighbours[( iCount << 1 ) + 1 ] = tmpMV[ 1 ]; 4305 } 4306 4307 abCandIsInter [ iCount ] = true; 4308 puhInterDirNeighbours[ iCount ] = tmpDir; 4691 4309 4692 4310 if ( mrgCandIdx == iCount ) … … 4695 4313 } 4696 4314 iCount ++; 4697 } 4698 #if !QC_SPIVMP_MPI_G0119 4699 } 4700 #endif 4701 } 4702 #if MTK_DDD_G0063 4703 if( m_pcSlice->getIsDepth() && m_pcSlice->getViewIndex() != 0 && bMPIFlag ) 4704 { 4705 UInt uiPartIdx; 4706 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 4707 TComSlice *pcTextureSlice = pcTextureCU->getSlice(); 4708 4709 4710 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4711 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4712 tmpDir = 0; 4713 4714 xDeriveCenterIdx( uiPUIdx, uiPartIdx); 4715 4716 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdx ) ) 4717 { 4718 4719 TComMvField cMVField; 4720 #if !HTM10RC1_FIX 4721 UChar ucInterDir = pcTextureCU->getInterDir( uiPartIdx ); 4722 #endif 4723 Int iDV = 0; 4724 Int iViewIdx = 0; 4725 #if !HTM10RC1_FIX 4726 if( ucInterDir & 1 ) 4727 { 4728 #endif 4729 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_0, cMVField ); 4730 #if HTM10RC1_FIX 4731 if( cMVField.getRefIdx() >= 0 ) 4732 { 4733 #endif 4734 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_0, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4735 { 4736 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_0, cMVField.getRefIdx())->getViewIndex(); 4737 iDV = cMVField.getHor(); 4738 4739 4740 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, cMVField.getRefIdx() ); 4741 4742 if( iValidDepRef >= 0 ) 4743 { 4744 const TComMv cAdd( 2, 2 ); 4745 cMVField.getMv() += cAdd; 4746 cMVField.getMv() >>= 2; 4747 clipMv( cMVField.getMv() ); 4748 tmpMV[ 0 ].setMvField( cMVField.getMv(), iValidDepRef ); 4749 tmpDir = 1; 4750 } 4751 } 4752 } 4753 4754 #if !HTM10RC1_FIX 4755 if( !tmpDir && ( ucInterDir & 2 )) 4756 { 4757 #endif 4758 pcTextureCU->getMvField( pcTextureCU, uiPartIdx, REF_PIC_LIST_1, cMVField ); 4759 4760 #if HTM10RC1_FIX 4761 if( !tmpDir && cMVField.getRefIdx() >= 0 ) 4762 { 4763 #endif 4764 if( pcTextureSlice->getRefPOC( REF_PIC_LIST_1, cMVField.getRefIdx()) == pcTextureSlice->getPOC() ) 4765 { 4766 iViewIdx = pcTextureSlice->getRefPic( REF_PIC_LIST_1, cMVField.getRefIdx())->getViewIndex(); 4767 iDV = cMVField.getHor(); 4768 4769 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, cMVField.getRefIdx() ); 4770 4771 if( iValidDepRef >= 0 ) 4772 { 4773 const TComMv cAdd( 2, 2 ); 4774 cMVField.getMv() += cAdd; 4775 cMVField.getMv() >>= 2; 4776 clipMv( cMVField.getMv() ); 4777 tmpMV[ 1 ].setMvField( cMVField.getMv(), iValidDepRef ); 4778 tmpDir = 2; 4779 } 4780 } 4781 } 4782 if( tmpDir != 0 ) 4783 { 4784 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4785 m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV, iViewIdx ); 4786 m_iUseDDDCandIdx = iCount; 4787 4788 if( tmpDir == 1 ) 4789 { 4790 pcMvFieldNeighbours[ iCount << 1 ] = tmpMV[ 0 ]; 4791 } 4792 else if( tmpDir == 2 ) 4793 { 4794 pcMvFieldNeighbours[( iCount << 1 ) + 1 ] = tmpMV[ 1 ]; 4795 } 4796 4797 abCandIsInter [ iCount ] = true; 4798 puhInterDirNeighbours[ iCount ] = tmpDir; 4799 4800 if ( mrgCandIdx == iCount ) 4801 { 4802 return; 4803 } 4804 iCount ++; 4805 4806 Int iLeftAboveAvail = 0; 4807 if( iPosLeftAbove[ 0 ] != -1 ) 4808 { 4809 iPosLeftAbove[ 0 ] = iCount; 4810 iLeftAboveAvail = 1; 4811 } 4812 if( iPosLeftAbove[ 1 ] != -1 ) 4813 { 4814 iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail; 4815 } 4816 4817 } 4818 } 4819 4315 4316 Int iLeftAboveAvail = 0; 4317 if( iPosLeftAbove[ 0 ] != -1 ) 4318 { 4319 iPosLeftAbove[ 0 ] = iCount; 4320 iLeftAboveAvail = 1; 4321 } 4322 if( iPosLeftAbove[ 1 ] != -1 ) 4323 { 4324 iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail; 4325 } 4326 } 4327 } 4820 4328 } 4821 4329 #endif … … 4836 4344 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 4837 4345 4838 #if MTK_NBDV_IVREF_FIX_G00674839 4346 if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1) 4840 #else4841 if ( ivMvPredFlag )4842 #endif4843 4347 { 4844 4348 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP ); … … 4848 4352 //////// INTER VIEW MOTION COMP(IvMC) ///////// 4849 4353 /////////////////////////////////////////////// 4850 #if QC_DEPTH_MERGE_SIMP_G01274851 4354 if( getSlice()->getIsDepth() ) 4852 4355 { 4853 4356 ivCandDir[1] = ivCandDir[2] = ivCandDir[3] = 0; 4854 4357 } 4855 #endif 4358 4856 4359 if( ivCandDir[0] ) 4857 4360 { … … 4893 4396 for(; iCnloop >= 0; iCnloop --) 4894 4397 { 4895 #if MTK_DDD_G00634398 #if H_3D_DDD 4896 4399 if( iCnloop == m_iUseDDDCandIdx ) 4897 4400 { … … 4961 4464 if (bIvMC) 4962 4465 { 4963 #if QC_SPIVMP_MPI_G0119 4964 if(!m_pcSlice->getIsDepth()) 4965 #endif 4966 #if SEC_SPIVMP_MCP_SIZE_G0077 4967 if(getPartitionSize(0) == SIZE_2Nx2N) 4466 if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N ) 4467 { 4968 4468 pbSPIVMPFlag[iCount] = true; 4969 #else 4970 pbSPIVMPFlag[iCount] = true; 4971 #endif 4469 } 4972 4470 #if H_3D_DBBP 4973 4471 pbSPIVMPFlag[iCount] &= !bDBBPFlag; … … 5099 4597 #endif 5100 4598 5101 #if MTK_DDD_G00634599 #if H_3D_DDD 5102 4600 // early termination 5103 4601 if ( iCount >= getSlice()->getMaxNumMergeCand()) … … 5111 4609 //////// INTER VIEW DISP COMP (IvDC) //////// 5112 4610 ///////////////////////////////////////////// 5113 #if QC_DEPTH_MERGE_SIMP_G01275114 4611 if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 5115 #else5116 if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand())5117 #endif5118 4612 { 5119 4613 assert(iCount < getSlice()->getMaxNumMergeCand()); … … 5276 4770 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// 5277 4771 //////////////////////////////////////////////////// 5278 #if QC_DEPTH_MERGE_SIMP_G01275279 4772 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 5280 #else5281 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() )5282 #endif5283 4773 { 5284 4774 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) … … 6645 6135 #endif 6646 6136 #if H_3D_IV_MERGE 6647 #if SEC_DEPTH_DV_DERIVAITON_G00746648 6137 Bool TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 6649 #else 6650 Bool TComDataCU::getDispNeighBlocks (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 6651 #endif 6652 { 6653 #if SEC_DEPTH_DV_DERIVAITON_G0074 6138 { 6139 6654 6140 assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N); 6655 6141 … … 6662 6148 6663 6149 return true; 6664 #else6665 Pel pDepPos[3] = {0, 0, 0};6666 assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N);6667 Bool bDepAvail = false;6668 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr();6669 Int iDepStride = this->getPic()->getPicYuvRec()->getStride();6670 TComMv cMv;6671 6672 Int xP, yP, nPSW, nPSH;6673 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH);6674 6675 if(xP != 0 && yP != 0)6676 {6677 pDepPos[0] = pDepth[ (yP-1) * iDepStride + (xP-1) ];6678 bDepAvail = true;6679 }6680 6681 if(xP != 0)6682 {6683 pDepPos[1] = pDepth[ (yP+nPSH-1) * iDepStride + (xP-1) ];6684 bDepAvail = true;6685 }6686 6687 if(yP != 0)6688 {6689 pDepPos[2] = pDepth[ (yP-1) * iDepStride + (xP+nPSW-1) ];6690 bDepAvail = true;6691 }6692 6693 if (bDepAvail)6694 {6695 Pel pAvgDepth = (xP != 0 && yP != 0) ? ((5*pDepPos[0] + 5*pDepPos[1] + 6*pDepPos[2] + 8)>>4) : (xP == 0) ? pDepPos[2] : pDepPos[1];6696 Int iDisp = getSlice()->getDepthToDisparityB( 0 )[ pAvgDepth ];6697 cMv.setHor(iDisp);6698 cMv.setVer(0);6699 pDisp->m_acNBDV = cMv;6700 pDisp->m_aVIdxCan = 0;6701 return true;6702 }6703 else6704 {6705 cMv.setZero();6706 pDisp->m_acNBDV = cMv;6707 pDisp->m_aVIdxCan = 0;6708 return false;6709 }6710 #endif6711 6150 } 6712 6151 #endif … … 6725 6164 // Init disparity struct for results 6726 6165 pDInfo->bDV = false; 6727 #if MTK_NBDV_IVREF_FIX_G00676728 6166 pDInfo->m_aVIdxCan = -1; 6729 #endif 6167 6730 6168 // Init struct for disparities from MCP neighboring blocks 6731 6169 IDVInfo cIDVInfo; … … 7248 6686 { 7249 6687 Int iSubPUSize = 1<<getSlice()->getVPS()->getSubPULog2Size(getSlice()->getLayerId()); 7250 #if QC_SPIVMP_MPI_G01197251 6688 if( getSlice()->getIsDepth() ) 7252 6689 { 7253 6690 iSubPUSize = 1 << getSlice()->getVPS()->getSubPUMPILog2Size(); 7254 6691 } 7255 #endif 6692 7256 6693 iNumSPInOneLine = iPUWidth/iSubPUSize; 7257 6694 iNumSPInOneLine = iNumSPInOneLine < 1 ? 1: iNumSPInOneLine; … … 7310 6747 TComSlice* pcSlice = getSlice (); 7311 6748 Int iViewIndex = pDInfo->m_aVIdxCan; 7312 6749 7313 6750 //--- get base CU/PU and check prediction mode --- 7314 6751 TComPic* pcBasePic = pcSlice->getIvPic( bIsDepth, iViewIndex ); … … 7334 6771 7335 6772 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 7336 6773 7337 6774 Bool abPdmAvailable[8] = {false, false, false, false, false, false, false, false}; 7338 6775 #if H_3D_NBDV … … 7347 6784 //////////sub-PU IvMC/////////// 7348 6785 //////////////////////////////// 7349 #if QC_SPIVMP_MPI_G01197350 6786 if(!m_pcSlice->getIsDepth()) 7351 6787 { 7352 #endif 7353 #if SEC_SPIVMP_MCP_SIZE_G0077 7354 if( getPartitionSize(0) == SIZE_2Nx2N ) 7355 { 7356 #endif 7357 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 7358 getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 7359 7360 for (Int i=0; i<iNumSP; i++) 7361 { 7362 puhInterDirSP[i] = 0; 7363 pcMvFieldSP[2*i].getMv().set(0, 0); 7364 pcMvFieldSP[2*i+1].getMv().set(0,0); 7365 pcMvFieldSP[2*i].setRefIdx(-1); 7366 pcMvFieldSP[2*i+1].setRefIdx(-1); 7367 } 7368 7369 Int iBaseCUAddr; 7370 Int iBaseAbsPartIdx; 7371 TComDataCU* pcBaseCU; 7372 Int iPartition = 0; 7373 #if !KHU_SIMP_SPIVMP_G0147 7374 Int iInterDirLast = 0; 7375 TComMvField cMvFieldLast[2]; 7376 #endif 7377 7378 Int iDelX = iSPWidth/2; 7379 Int iDelY = iSPHeight/2; 7380 7381 #if KHU_SIMP_SPIVMP_G0147 7382 Int iCenterPosX = iCurrPosX + ( ( iWidth / iSPWidth ) >> 1 ) * iSPWidth + ( iSPWidth >> 1 ); 7383 Int iCenterPosY = iCurrPosY + ( ( iHeight / iSPHeight ) >> 1 ) * iSPHeight + (iSPHeight >> 1); 7384 Int iRefCenterCUAddr, iRefCenterAbsPartIdx; 7385 7386 if(iWidth == iSPWidth && iHeight == iSPHeight) 7387 { 7388 iCenterPosX = iCurrPosX + (iWidth >> 1); 7389 iCenterPosY = iCurrPosY + (iHeight >> 1); 7390 } 7391 7392 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 7393 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) ); 7394 7395 pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx ); 7396 TComDataCU* pcDefaultCU = pcBasePic->getCU( iRefCenterCUAddr ); 7397 if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA )) 7398 { 7399 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 7400 { 7401 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 7402 Bool stopLoop = false; 7403 for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop) 7404 { 7405 RefPicList eDefaultRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 7406 TComMvField cDefaultMvField; 7407 pcDefaultCU->getMvField( pcDefaultCU, iRefCenterAbsPartIdx, eDefaultRefPicList, cDefaultMvField ); 7408 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 7409 if (iDefaultRefIdx >= 0) 7410 { 7411 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eDefaultRefPicList, iDefaultRefIdx); 7412 if (iDefaultRefPOC != pcSlice->getPOC()) 7413 { 7414 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 7415 { 7416 if (iDefaultRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 7417 { 7418 abPdmAvailable[ uiCurrRefListId ] = true; 7419 TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer()); 7420 #if H_3D_NBDV 7421 #if H_3D_IV_MERGE 7422 if( !bIsDepth ) 7423 { 7424 #endif 7425 cMv.setIDVFlag (true); 7426 cMv.setIDVHor (cDv.getHor()); 7427 cMv.setIDVVer (cDv.getVer()); 7428 cMv.setIDVVId (iViewIndex); 7429 #if H_3D_IV_MERGE 7430 } 7431 #endif 7432 #endif 7433 clipMv( cMv ); 7434 paiPdmRefIdx [ uiCurrRefListId ] = iPdmRefIdx; 7435 pacPdmMv [ uiCurrRefListId ] = cMv; 7436 stopLoop = true; 7437 break; 7438 } 7439 } 7440 } 7441 } 7442 } 7443 } 7444 } 7445 availableMcDc[0] = ( abPdmAvailable[0]? 1 : 0) + (abPdmAvailable[1]? 2 : 0); 7446 7447 if(availableMcDc[0]) 7448 { 7449 #endif 7450 Int iBasePosX, iBasePosY; 7451 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iSPHeight) 7452 { 7453 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth) 7454 { 7455 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 )); 7456 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 )); 7457 7458 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx ); 7459 pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 7460 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 7461 { 7462 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 6788 if( getPartitionSize(0) == SIZE_2Nx2N ) 6789 { 6790 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 6791 getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 6792 6793 for (Int i=0; i<iNumSP; i++) 6794 { 6795 puhInterDirSP[i] = 0; 6796 pcMvFieldSP[2*i].getMv().set(0, 0); 6797 pcMvFieldSP[2*i+1].getMv().set(0,0); 6798 pcMvFieldSP[2*i].setRefIdx(-1); 6799 pcMvFieldSP[2*i+1].setRefIdx(-1); 6800 } 6801 6802 Int iBaseCUAddr; 6803 Int iBaseAbsPartIdx; 6804 TComDataCU* pcBaseCU; 6805 Int iPartition = 0; 6806 6807 Int iDelX = iSPWidth/2; 6808 Int iDelY = iSPHeight/2; 6809 6810 Int iCenterPosX = iCurrPosX + ( ( iWidth / iSPWidth ) >> 1 ) * iSPWidth + ( iSPWidth >> 1 ); 6811 Int iCenterPosY = iCurrPosY + ( ( iHeight / iSPHeight ) >> 1 ) * iSPHeight + (iSPHeight >> 1); 6812 Int iRefCenterCUAddr, iRefCenterAbsPartIdx; 6813 6814 if(iWidth == iSPWidth && iHeight == iSPHeight) 6815 { 6816 iCenterPosX = iCurrPosX + (iWidth >> 1); 6817 iCenterPosY = iCurrPosY + (iHeight >> 1); 6818 } 6819 6820 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 6821 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) ); 6822 6823 pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx ); 6824 TComDataCU* pcDefaultCU = pcBasePic->getCU( iRefCenterCUAddr ); 6825 if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA )) 6826 { 6827 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 7463 6828 { 7464 6829 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 7465 Bool bLoop_stop = false;7466 for(Int iLoop = 0; iLoop < 2 && ! bLoop_stop; ++iLoop)6830 Bool stopLoop = false; 6831 for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop) 7467 6832 { 7468 RefPicList e BaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId );7469 TComMvField c BaseMvField;7470 pc BaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField );7471 Int i BaseRefIdx = cBaseMvField.getRefIdx();7472 if (i BaseRefIdx >= 0)6833 RefPicList eDefaultRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 6834 TComMvField cDefaultMvField; 6835 pcDefaultCU->getMvField( pcDefaultCU, iRefCenterAbsPartIdx, eDefaultRefPicList, cDefaultMvField ); 6836 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 6837 if (iDefaultRefIdx >= 0) 7473 6838 { 7474 Int i BaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx);7475 if (i BaseRefPOC != pcSlice->getPOC())6839 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eDefaultRefPicList, iDefaultRefIdx); 6840 if (iDefaultRefPOC != pcSlice->getPOC()) 7476 6841 { 7477 6842 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 7478 6843 { 7479 if (i BaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx))6844 if (iDefaultRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 7480 6845 { 7481 6846 abPdmAvailable[ uiCurrRefListId ] = true; 7482 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 7483 6847 TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer()); 6848 #if H_3D_NBDV 6849 #if H_3D_IV_MERGE 7484 6850 if( !bIsDepth ) 7485 6851 { 6852 #endif 7486 6853 cMv.setIDVFlag (true); 7487 6854 cMv.setIDVHor (cDv.getHor()); 7488 6855 cMv.setIDVVer (cDv.getVer()); 7489 6856 cMv.setIDVVId (iViewIndex); 6857 #if H_3D_IV_MERGE 7490 6858 } 7491 6859 #endif 6860 #endif 7492 6861 clipMv( cMv ); 7493 bLoop_stop = true;7494 7495 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx);6862 paiPdmRefIdx [ uiCurrRefListId ] = iPdmRefIdx; 6863 pacPdmMv [ uiCurrRefListId ] = cMv; 6864 stopLoop = true; 7496 6865 break; 7497 6866 } … … 7502 6871 } 7503 6872 } 7504 7505 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0); 7506 if (puhInterDirSP[iPartition] == 0) 7507 { 7508 #if KHU_SIMP_SPIVMP_G0147 7509 puhInterDirSP[iPartition] = availableMcDc[0]; 7510 pcMvFieldSP[2*iPartition].setMvField(pacPdmMv[0], paiPdmRefIdx[0]); 7511 pcMvFieldSP[2*iPartition + 1].setMvField(pacPdmMv[1], paiPdmRefIdx[1]); 7512 #else 7513 if (iInterDirLast != 0) 6873 availableMcDc[0] = ( abPdmAvailable[0]? 1 : 0) + (abPdmAvailable[1]? 2 : 0); 6874 6875 if(availableMcDc[0]) 6876 { 6877 6878 Int iBasePosX, iBasePosY; 6879 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iSPHeight) 7514 6880 { 7515 puhInterDirSP[iPartition] = iInterDirLast; 7516 pcMvFieldSP[2*iPartition] = cMvFieldLast[0]; 7517 pcMvFieldSP[2*iPartition + 1] = cMvFieldLast[1]; 7518 } 7519 #endif 7520 } 7521 #if !KHU_SIMP_SPIVMP_G0147 7522 else 7523 { 7524 if (iInterDirLast ==0) 7525 { 7526 availableMcDc[0] = puhInterDirSP[iPartition]; 7527 paiPdmRefIdx [ 0 ] = pcMvFieldSP[2*iPartition].getRefIdx(); 7528 pacPdmMv [ 0 ] = pcMvFieldSP[2*iPartition].getMv(); 7529 paiPdmRefIdx [ 1 ] = pcMvFieldSP[2*iPartition+1].getRefIdx(); 7530 pacPdmMv [ 1 ] = pcMvFieldSP[2*iPartition+1].getMv(); 7531 7532 if (iPartition != 0) 6881 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth) 7533 6882 { 7534 for (Int iPart = iPartition-1; iPart >= 0; iPart--) 6883 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 )); 6884 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 )); 6885 6886 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx ); 6887 pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 6888 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 7535 6889 { 7536 puhInterDirSP[iPart] = puhInterDirSP[iPartition]; 7537 pcMvFieldSP[2*iPart] = pcMvFieldSP[2*iPartition]; 7538 pcMvFieldSP[2*iPart + 1] = pcMvFieldSP[2*iPartition + 1]; 6890 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 6891 { 6892 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 6893 Bool bLoop_stop = false; 6894 for(Int iLoop = 0; iLoop < 2 && !bLoop_stop; ++iLoop) 6895 { 6896 RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 6897 TComMvField cBaseMvField; 6898 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField ); 6899 Int iBaseRefIdx = cBaseMvField.getRefIdx(); 6900 if (iBaseRefIdx >= 0) 6901 { 6902 Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx); 6903 if (iBaseRefPOC != pcSlice->getPOC()) 6904 { 6905 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 6906 { 6907 if (iBaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 6908 { 6909 abPdmAvailable[ uiCurrRefListId ] = true; 6910 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 6911 6912 if( !bIsDepth ) 6913 { 6914 cMv.setIDVFlag (true); 6915 cMv.setIDVHor (cDv.getHor()); 6916 cMv.setIDVVer (cDv.getVer()); 6917 cMv.setIDVVId (iViewIndex); 6918 } 6919 6920 clipMv( cMv ); 6921 bLoop_stop = true; 6922 6923 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx); 6924 break; 6925 } 6926 } 6927 } 6928 } 6929 } 6930 } 7539 6931 } 6932 6933 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0); 6934 if (puhInterDirSP[iPartition] == 0) 6935 { 6936 puhInterDirSP[iPartition] = availableMcDc[0]; 6937 pcMvFieldSP[2*iPartition].setMvField(pacPdmMv[0], paiPdmRefIdx[0]); 6938 pcMvFieldSP[2*iPartition + 1].setMvField(pacPdmMv[1], paiPdmRefIdx[1]); 6939 6940 } 6941 iPartition ++; 7540 6942 } 7541 6943 } 7542 iInterDirLast = puhInterDirSP[iPartition]; 7543 cMvFieldLast[0] = pcMvFieldSP[2*iPartition]; 7544 cMvFieldLast[1] = pcMvFieldSP[2*iPartition + 1]; 7545 } 7546 #endif 7547 iPartition ++; 7548 7549 } 7550 } 7551 #if KHU_SIMP_SPIVMP_G0147 7552 } 7553 #endif 7554 #if SEC_SPIVMP_MCP_SIZE_G0077 7555 } 7556 #endif 7557 7558 iCurrPosX += ( iWidth >> 1 ); 7559 iCurrPosY += ( iHeight >> 1 ); 7560 #if QC_SPIVMP_MPI_G0119 7561 } 7562 #endif 6944 } 6945 } 6946 6947 iCurrPosX += ( iWidth >> 1 ); 6948 iCurrPosY += ( iHeight >> 1 ); 6949 } 7563 6950 #endif 7564 6951 … … 7568 6955 7569 6956 #if H_3D_SPIVMP 7570 #if QC_SPIVMP_MPI_G0119 7571 if(m_pcSlice->getIsDepth()) 7572 { 7573 iCurrPosX += ( iWidth >> 1 ); 7574 iCurrPosY += ( iHeight >> 1 ); 7575 } 7576 #if QC_DEPTH_MERGE_SIMP_G0127 7577 #if SEC_SPIVMP_MCP_SIZE_G0077 6957 if(m_pcSlice->getIsDepth()) 6958 { 6959 iCurrPosX += ( iWidth >> 1 ); 6960 iCurrPosY += ( iHeight >> 1 ); 6961 } 7578 6962 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7579 6963 #else 7580 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)7581 #endif7582 #else7583 #if SEC_SPIVMP_MCP_SIZE_G00777584 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < 2; iLoopCan ++)7585 #else7586 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < 2; iLoopCan ++)7587 #endif7588 #endif7589 #else7590 #if SEC_SPIVMP_MCP_SIZE_G00777591 for(Int iLoopCan = (getPartitionSize(uiPartAddr) == SIZE_2Nx2N ? 1 : 0); iLoopCan < 2; iLoopCan ++)7592 #else7593 for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)7594 #endif7595 #endif7596 #else7597 6964 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7598 6965 #endif … … 7601 6968 // iLoopCan == 1 --> IvMCShift 7602 6969 7603 #if !H_3D_SPIVMP || QC_SPIVMP_MPI_G01197604 6970 Int iBaseCUAddr; 7605 6971 Int iBaseAbsPartIdx; 7606 #endif7607 6972 7608 6973 Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 ); 7609 6974 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 ); 7610 6975 7611 #if H_3D_SPIVMP && !QC_SPIVMP_MPI_G01197612 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );7613 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );7614 #else7615 6976 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); 7616 6977 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); 7617 #endif7618 6978 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 7619 6979 7620 #if H_3D_SPIVMP && !QC_SPIVMP_MPI_G01197621 pcBaseCU = pcBasePic->getCU( iBaseCUAddr );7622 #else7623 6980 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 7624 #endif7625 6981 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 7626 6982 { … … 7676 7032 } 7677 7033 #if H_3D_SPIVMP 7678 #if QC_SPIVMP_MPI_G01197679 #if QC_DEPTH_MERGE_SIMP_G01277680 7034 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7681 7035 #else 7682 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < 2; iLoopCan ++)7683 #endif7684 #else7685 for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)7686 #endif7687 #else7688 7036 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7689 7037 #endif … … 7691 7039 availableMcDc[(iLoopCan << 1)] = ( abPdmAvailable[(iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[1 + (iLoopCan<<2)] ? 2 : 0); 7692 7040 } 7693 7694 7041 7042 7695 7043 //////////////////////////////// 7696 7044 /////// IvDC + IvDCShift /////// 7697 7045 //////////////////////////////// 7698 #if QC_DEPTH_MERGE_SIMP_G0127 7046 7699 7047 if( !getSlice()->getIsDepth() ) 7700 7048 { 7701 #endif 7702 for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ ) 7703 { 7704 RefPicList eRefPicListDMV = RefPicList( iRefListId ); 7705 Int iNumRefPics = pcSlice->getNumRefIdx( eRefPicListDMV ); 7706 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ ) 7707 { 7708 if(( pcSlice->getRefPOC( eRefPicListDMV, iPdmRefIdx ) == pcSlice->getPOC()) && (pcSlice->getRefPic( eRefPicListDMV, iPdmRefIdx )->getViewIndex() == pDInfo->m_aVIdxCan)) 7709 { 7710 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7049 for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ ) 7050 { 7051 RefPicList eRefPicListDMV = RefPicList( iRefListId ); 7052 Int iNumRefPics = pcSlice->getNumRefIdx( eRefPicListDMV ); 7053 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ ) 7054 { 7055 if(( pcSlice->getRefPOC( eRefPicListDMV, iPdmRefIdx ) == pcSlice->getPOC()) && (pcSlice->getRefPic( eRefPicListDMV, iPdmRefIdx )->getViewIndex() == pDInfo->m_aVIdxCan)) 7711 7056 { 7712 Int ioffsetDV = (iLoopCan == 0) ? 0 : 4; 7713 abPdmAvailable[ iRefListId + 2 + (iLoopCan<<2) ] = true; 7714 paiPdmRefIdx [ iRefListId + 2 + (iLoopCan<<2) ] = iPdmRefIdx; 7057 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7058 { 7059 Int ioffsetDV = (iLoopCan == 0) ? 0 : 4; 7060 abPdmAvailable[ iRefListId + 2 + (iLoopCan<<2) ] = true; 7061 paiPdmRefIdx [ iRefListId + 2 + (iLoopCan<<2) ] = iPdmRefIdx; 7715 7062 #if H_3D_NBDV_REF 7716 TComMv cMv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;7717 #endif 7718 cMv.setHor( cMv.getHor() + ioffsetDV );7063 TComMv cMv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 7064 #endif 7065 cMv.setHor( cMv.getHor() + ioffsetDV ); 7719 7066 #if H_3D_IV_MERGE 7720 if( bIsDepth ) 7721 cMv.setHor((cMv.getHor()+2)>>2); 7722 #endif 7723 cMv.setVer( 0 ); 7724 clipMv( cMv ); 7725 pacPdmMv [iRefListId + 2 + (iLoopCan<<2)] = cMv; 7067 if( bIsDepth ) 7068 { 7069 cMv.setHor((cMv.getHor()+2)>>2); 7070 } 7071 #endif 7072 cMv.setVer( 0 ); 7073 clipMv( cMv ); 7074 pacPdmMv [iRefListId + 2 + (iLoopCan<<2)] = cMv; 7075 } 7076 break; 7726 7077 } 7727 break; 7728 } 7729 } 7730 } 7731 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7732 { 7733 availableMcDc[1 + (iLoopCan << 1)] = ( abPdmAvailable[2 + (iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[3 + (iLoopCan<<2)] ? 2 : 0 ); 7734 } 7735 #if QC_DEPTH_MERGE_SIMP_G0127 7736 } 7737 #endif 7078 } 7079 } 7080 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7081 { 7082 availableMcDc[1 + (iLoopCan << 1)] = ( abPdmAvailable[2 + (iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[3 + (iLoopCan<<2)] ? 2 : 0 ); 7083 } 7084 } 7738 7085 return false; 7739 7086 } … … 7809 7156 #endif 7810 7157 7811 #if NTT_STORE_SPDV_VSP_G01487158 #if H_3D_VSP 7812 7159 Void TComDataCU::setMvFieldPUForVSP( TComDataCU* pcCU, UInt partAddr, Int width, Int height, RefPicList eRefPicList, Int iRefIdx, Int &vspSize ) 7813 7160 { … … 7943 7290 7944 7291 } 7945 #endif // NTT_STORE_SPDV_VSP_G01487292 #endif 7946 7293 7947 7294 //! \} -
trunk/source/Lib/TLibCommon/TComDataCU.h
r872 r884 192 192 #if H_3D_DIM_SDC 193 193 Bool* m_pbSDCFlag; 194 #if QC_SDC_UNIFY_G0130 && !SEC_INTER_SDC_G0101195 Pel* m_apSegmentDCOffset[4];196 #else197 194 Pel* m_apSegmentDCOffset[2]; 198 #endif199 #endif200 #endif201 #if H_3D_INTER_SDC202 #if !QC_SDC_UNIFY_G0130203 Bool* m_pbInterSDCFlag;204 Int* m_apSegmentInterDCOffset[4];205 #endif206 #if !SEC_INTER_SDC_G0101207 UChar* m_pucInterSDCMask;208 195 #endif 209 196 #endif … … 239 226 #endif 240 227 241 #if MTK_DDD_G0063228 #if H_3D_DDD 242 229 UChar* m_pucDisparityDerivedDepth; 243 230 Bool* m_pbUseDDD; … … 280 267 Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter ); 281 268 282 #if NTT_STORE_SPDV_VSP_G0148269 #if H_3D_VSP 283 270 Void xSetMvFieldForVSP ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, Int *shiftLUT, RefPicList refPicList, Int refIdx, Bool isDepth, Int &vspSize ); 284 271 #endif … … 499 486 #if H_3D 500 487 Void rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV); 501 #if SEC_DEPTH_DV_DERIVAITON_G0074502 488 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 503 #else504 Bool getDispNeighBlocks ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);505 #endif506 489 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 507 490 #endif … … 573 556 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 574 557 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 575 #if QC_GENERIC_SDC_G0122576 558 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 577 559 UInt getCtxAngleFlag ( UInt uiAbsPartIdx ); 578 #endif579 #endif580 #endif581 #if H_3D_INTER_SDC582 #if !QC_SDC_UNIFY_G0130583 Bool* getInterSDCFlag () { return m_pbInterSDCFlag; }584 Bool getInterSDCFlag ( UInt uiIdx ) { return m_pbInterSDCFlag[uiIdx]; }585 Void setInterSDCFlagSubParts ( Bool bInterSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );586 UInt getCtxInterSDCFlag ( UInt uiAbsPartIdx );587 Int* getInterSDCSegmentDCOffset( UInt uiSeg ) { return m_apSegmentInterDCOffset[uiSeg]; }588 Int getInterSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentInterDCOffset[uiSeg][uiPartIdx]; }589 Void setInterSDCSegmentDCOffset( Int pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentInterDCOffset[uiSeg][uiPartIdx] = pOffset; }590 591 #endif592 #if !SEC_INTER_SDC_G0101593 Void xSetInterSDCCUMask( TComDataCU *pcCU, UChar *pMask );594 595 UChar* getInterSDCMask () { return m_pucInterSDCMask; }596 560 #endif 597 561 #endif … … 701 665 Void setVSPFlag ( UInt uiIdx, Int n ) { m_piVSPFlag[uiIdx] = n; } 702 666 Void setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 703 #if NTT_STORE_SPDV_VSP_G0148704 667 Void setMvFieldPUForVSP ( TComDataCU* cu, UInt partAddr, Int width, Int height, RefPicList refPicList, Int refIdx, Int &vspSize ); 705 #endif706 668 #endif 707 669 Void deriveLeftRightTopIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); … … 743 705 UInt getCTXARPWFlag ( UInt uiAbsPartIdx ); 744 706 #endif 745 #if !MTK_IC_FLAG_CABAC_SIMP_G0061746 #if H_3D_IC747 UInt getCtxICFlag ( UInt uiAbsPartIdx );748 #endif749 #endif750 707 UInt getSliceStartCU ( UInt pos ) { return m_sliceStartCU[pos-m_uiAbsIdxInLCU]; } 751 708 UInt getSliceSegmentStartCU ( UInt pos ) { return m_sliceSegmentStartCU[pos-m_uiAbsIdxInLCU]; } … … 766 723 UInt getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra); 767 724 768 #if MTK_DDD_G0063725 #if H_3D_DDD 769 726 UChar* getDDDepth () { return m_pucDisparityDerivedDepth; } 770 727 UChar getDDDepth ( UInt uiIdx ) { return m_pucDisparityDerivedDepth[uiIdx]; } -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r872 r884 176 176 Void setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight ); 177 177 #endif 178 #if NTT_STORE_SPDV_VSP_G0148178 #if H_3D_VSP 179 179 Void setMv ( Int iIdx, TComMv const & rcMv ) { m_pcMv[iIdx] = rcMv; } 180 180 Void setRefIdx ( Int iIdx, Int iRefIdx ) { m_piRefIdx[iIdx] = iRefIdx; } -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r872 r884 416 416 417 417 #if H_3D_DIM 418 Void TComPrediction::predIntraLumaDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc 419 #if QC_GENERIC_SDC_G0122 420 , TComWedgelet* dmm4Segmentation 421 #endif 422 ) 418 Void TComPrediction::predIntraLumaDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc, TComWedgelet* dmm4Segmentation ) 423 419 { 424 420 assert( iWidth == iHeight ); … … 446 442 case( DMM4_IDX ): 447 443 { 448 #if QC_GENERIC_SDC_G0122449 444 if( dmm4Segmentation == NULL ) 450 445 { … … 457 452 dmmSegmentation = dmm4Segmentation; 458 453 } 459 #else460 dmmSegmentation = new TComWedgelet( iWidth, iHeight );461 xPredContourFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, dmmSegmentation );462 #endif463 454 } break; 464 455 default: assert(0); … … 511 502 512 503 #if H_3D_DIM_DMM 513 #if QC_GENERIC_SDC_G0122514 504 if( dimType == DMM4_IDX && dmm4Segmentation == NULL ) { dmmSegmentation->destroy(); delete dmmSegmentation; } 515 #else516 if( dimType == DMM4_IDX ) { dmmSegmentation->destroy(); delete dmmSegmentation; }517 #endif518 505 #endif 519 506 } … … 1103 1090 pcCU->clipMv(cMv); 1104 1091 1105 #if MTK_DDD_G00631092 #if H_3D_DDD 1106 1093 if( pcCU->getUseDDD( uiPartAddr ) ) 1107 1094 { … … 1182 1169 Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ) 1183 1170 { 1184 #if NTT_STORE_SPDV_VSP_G01481185 1171 Int vspSize = pcCU->getVSPFlag( uiPartAddr ) >> 1; 1186 1172 … … 1197 1183 } 1198 1184 xPredInterUniSubPU( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi, widthSubPU, heightSubPU ); 1199 1200 #else // NTT_STORE_SPDV_VSP_G0148 1201 // Get depth reference 1202 Int depthRefViewIdx = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; 1203 #if H_3D_FCO_VSP_DONBDV_E0163 1204 TComPic* pRefPicBaseDepth = 0; 1205 Bool bIsCurrDepthCoded = false; 1206 pRefPicBaseDepth = pcCU->getSlice()->getIvPic( true, pcCU->getSlice()->getViewIndex() ); 1207 if ( pRefPicBaseDepth->getPicYuvRec() != NULL ) 1208 { 1209 bIsCurrDepthCoded = true; 1210 } 1211 else 1212 { 1213 pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx ); 1214 } 1215 #else 1216 TComPic* pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx ); 1217 #endif 1218 assert(pRefPicBaseDepth != NULL); 1219 TComPicYuv* pcBaseViewDepthPicYuv = pRefPicBaseDepth->getPicYuvRec(); 1220 assert(pcBaseViewDepthPicYuv != NULL); 1221 1222 // Get texture reference 1223 Int iRefIdx = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr ); 1224 assert(iRefIdx >= 0); 1225 TComPic* pRefPicBaseTxt = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx ); 1226 TComPicYuv* pcBaseViewTxtPicYuv = pRefPicBaseTxt->getPicYuvRec(); 1227 assert(pcBaseViewTxtPicYuv != NULL); 1228 1229 // Initialize LUT according to the reference viewIdx 1230 Int txtRefViewIdx = pRefPicBaseTxt->getViewIndex(); 1231 Int* pShiftLUT = pcCU->getSlice()->getDepthToDisparityB( txtRefViewIdx ); 1232 assert( txtRefViewIdx < pcCU->getSlice()->getViewIndex() ); 1233 1234 // Do compensation 1235 TComMv cDv = pcCU->getDvInfo(uiPartAddr).m_acNBDV; 1236 pcCU->clipMv(cDv); 1237 1238 #if H_3D_FCO_VSP_DONBDV_E0163 1239 if ( bIsCurrDepthCoded ) 1240 { 1241 cDv.setZero(); 1242 } 1243 #endif 1244 // fetch virtual depth map 1245 pcBaseViewDepthPicYuv->extendPicBorder(); 1246 1247 Int vspSize=0; 1248 xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp,vspSize ); 1249 // sub-PU based compensation 1250 xPredInterLumaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 1251 xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 1252 #endif // NTT_STORE_SPDV_VSP_G0148 1253 } 1254 1255 #if NTT_STORE_SPDV_VSP_G0148 1185 } 1186 1256 1187 Void TComPrediction::xPredInterUniSubPU( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU, Int heightSubPU ) 1257 1188 { … … 1278 1209 } 1279 1210 } 1280 #endif // NTT_STORE_SPDV_VSP_G01481281 1211 1282 1212 #endif … … 2133 2063 #endif 2134 2064 2135 #if H_3D_VSP2136 #if !(NTT_STORE_SPDV_VSP_G0148)2137 // not fully support iRatioTxtPerDepth* != 12138 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )2139 {2140 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;2141 Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE;2142 2143 Int refDepStride = picRefDepth->getStride();2144 2145 Int refDepOffset = ( (mv->getHor()+2) >> 2 ) + ( (mv->getVer()+2) >> 2 ) * refDepStride;2146 Pel *refDepth = picRefDepth->getLumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr );2147 2148 if( ratioTxtPerDepthX!=1 || ratioTxtPerDepthY!=1 )2149 {2150 Int posX, posY;2151 refDepth = picRefDepth->getLumaAddr( );2152 cu->getPic()->getPicYuvRec()->getTopLeftSamplePos( cu->getAddr(), cu->getZorderIdxInCU() + partAddr, posX, posY ); // top-left position in texture2153 posX /= ratioTxtPerDepthX; // texture position -> depth postion2154 posY /= ratioTxtPerDepthY;2155 refDepOffset += posX + posY * refDepStride;2156 2157 width /= ratioTxtPerDepthX; // texture size -> depth size2158 height /= ratioTxtPerDepthY;2159 }2160 2161 refDepth += refDepOffset;2162 2163 Int depStride = yuvDepth->getStride();2164 Pel *depth = yuvDepth->getLumaAddr();2165 2166 if ((height % 8))2167 {2168 vspSize = 1; // 8x42169 }2170 else if ((width % 8))2171 {2172 vspSize = 0; // 4x82173 }2174 else2175 {2176 Bool ULvsBR, URvsBL;2177 ULvsBR = refDepth[0] < refDepth[refDepStride * (height-1) + width-1];2178 URvsBL = refDepth[width-1] < refDepth[refDepStride * (height-1)];2179 vspSize = ( ULvsBR ^ URvsBL ) ? 0 : 1;2180 }2181 Int subBlockW, subBlockH;2182 Int depStrideTmp = depStride * nTxtPerDepthY;2183 if (vspSize)2184 {2185 subBlockW = 8;2186 subBlockH = 4;2187 }2188 else2189 {2190 subBlockW = 4;2191 subBlockH = 8;2192 }2193 for( Int y=0; y<height; y+=subBlockH )2194 {2195 Pel *refDepthTmp[4];2196 refDepthTmp[0] = refDepth + refDepStride * y;2197 refDepthTmp[1] = refDepthTmp[0] + subBlockW - 1;2198 refDepthTmp[2] = refDepthTmp[0] + refDepStride * (subBlockH - 1);2199 refDepthTmp[3] = refDepthTmp[2] + subBlockW - 1;2200 for( Int x=0; x<width; x+=subBlockW )2201 {2202 Pel maxDepthVal;2203 maxDepthVal = refDepthTmp[0][x];2204 maxDepthVal = std::max( maxDepthVal, refDepthTmp[1][x]);2205 maxDepthVal = std::max( maxDepthVal, refDepthTmp[2][x]);2206 maxDepthVal = std::max( maxDepthVal, refDepthTmp[3][x]);2207 Pel *depthTmp = &depth[x+y*depStride];2208 for( Int sY=0; sY<subBlockH; sY+=nTxtPerDepthY )2209 {2210 for( Int sX=0; sX<subBlockW; sX+=nTxtPerDepthX )2211 {2212 depthTmp[sX] = maxDepthVal;2213 }2214 depthTmp += depStrideTmp;2215 }2216 }2217 }2218 }2219 2220 Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize)2221 {2222 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE;2223 Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE;2224 2225 nTxtPerDepthX = nTxtPerDepthX << vspSize;2226 nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);2227 2228 Int refStride = picRef->getStride();2229 Int dstStride = yuvDst->getStride();2230 Int depStride = yuvDepth->getStride();2231 Int refStrideBlock = refStride * nTxtPerDepthY;2232 Int dstStrideBlock = dstStride * nTxtPerDepthY;2233 Int depStrideBlock = depStride * nTxtPerDepthY;2234 2235 Pel *ref = picRef->getLumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr );2236 Pel *dst = yuvDst->getLumaAddr(partAddr);2237 Pel *depth = yuvDepth->getLumaAddr();2238 2239 #if H_3D_VSP_BLOCKSIZE == 12240 #if H_3D_VSP_CONSTRAINED2241 //get LUT based horizontal reference range2242 Int range = xGetConstrainedSize(width, height);2243 2244 // The minimum depth value2245 Int minRelativePos = MAX_INT;2246 Int maxRelativePos = MIN_INT;2247 2248 Pel* depthTemp, *depthInitial=depth;2249 for (Int yTxt = 0; yTxt < height; yTxt++)2250 {2251 for (Int xTxt = 0; xTxt < width; xTxt++)2252 {2253 if (depthPosX+xTxt < widthDepth)2254 {2255 depthTemp = depthInitial + xTxt;2256 }2257 else2258 {2259 depthTemp = depthInitial + (widthDepth - depthPosX - 1);2260 }2261 2262 Int disparity = shiftLUT[ *depthTemp ]; // << iShiftPrec;2263 Int disparityInt = disparity >> 2;2264 2265 if( disparity <= 0)2266 {2267 if (minRelativePos > disparityInt+xTxt)2268 {2269 minRelativePos = disparityInt+xTxt;2270 }2271 }2272 else2273 {2274 if (maxRelativePos < disparityInt+xTxt)2275 {2276 maxRelativePos = disparityInt+xTxt;2277 }2278 }2279 }2280 if (depthPosY+yTxt < heightDepth)2281 {2282 depthInitial = depthInitial + depStride;2283 }2284 }2285 2286 Int disparity_tmp = shiftLUT[ *depth ]; // << iShiftPrec;2287 if (disparity_tmp <= 0)2288 {2289 maxRelativePos = minRelativePos + range -1 ;2290 }2291 else2292 {2293 minRelativePos = maxRelativePos - range +1 ;2294 }2295 #endif2296 #endif // H_3D_VSP_BLOCKSIZE == 12297 2298 TComMv dv(0, 0);2299 2300 for ( Int yTxt = 0; yTxt < height; yTxt += nTxtPerDepthY )2301 {2302 for ( Int xTxt = 0; xTxt < width; xTxt += nTxtPerDepthX )2303 {2304 Pel repDepth = depth[ xTxt ];2305 assert( repDepth >= 0 && repDepth <= 255 );2306 2307 Int disparity = shiftLUT[ repDepth ]; // remove << iShiftPrec ??2308 Int xFrac = disparity & 0x3;2309 2310 dv.setHor( disparity );2311 cu->clipMv( dv );2312 2313 Int refOffset = xTxt + (dv.getHor() >> 2);2314 2315 #if H_3D_VSP_CONSTRAINED2316 if(refOffset<minRelativePos || refOffset>maxRelativePos)2317 {2318 xFrac = 0;2319 }2320 refOffset = Clip3(minRelativePos, maxRelativePos, refOffset);2321 #endif2322 2323 assert( ref[refOffset] >= 0 && ref[refOffset]<= 255 );2324 m_if.filterHorLuma( &ref[refOffset], refStride, &dst[xTxt], dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !isBi );2325 }2326 ref += refStrideBlock;2327 dst += dstStrideBlock;2328 depth += depStrideBlock;2329 }2330 2331 }2332 2333 Void TComPrediction::xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize)2334 {2335 #if (H_3D_VSP_BLOCKSIZE==1)2336 Int nTxtPerDepthX = 1;2337 Int nTxtPerDepthY = 1;2338 #else2339 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE >> 1;2340 Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE >> 1;2341 #endif2342 2343 nTxtPerDepthX = nTxtPerDepthX << vspSize;2344 nTxtPerDepthY = nTxtPerDepthY << (1-vspSize);2345 2346 Int refStride = picRef->getCStride();2347 Int dstStride = yuvDst->getCStride();2348 Int depStride = yuvDepth->getStride();2349 Int refStrideBlock = refStride * nTxtPerDepthY;2350 Int dstStrideBlock = dstStride * nTxtPerDepthY;2351 Int depStrideBlock = depStride * (nTxtPerDepthY<<1);2352 2353 Pel *refCb = picRef->getCbAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr );2354 Pel *refCr = picRef->getCrAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr );2355 Pel *dstCb = yuvDst->getCbAddr(partAddr);2356 Pel *dstCr = yuvDst->getCrAddr(partAddr);2357 Pel *depth = yuvDepth->getLumaAddr();2358 2359 #if H_3D_VSP_BLOCKSIZE == 12360 #if H_3D_VSP_CONSTRAINED2361 //get LUT based horizontal reference range2362 Int range = xGetConstrainedSize(width, height, false);2363 2364 // The minimum depth value2365 Int minRelativePos = MAX_INT;2366 Int maxRelativePos = MIN_INT;2367 2368 Int depthTmp;2369 for (Int yTxt=0; yTxt<height; yTxt++)2370 {2371 for (Int xTxt=0; xTxt<width; xTxt++)2372 {2373 depthTmp = m_pDepthBlock[xTxt+yTxt*width];2374 Int disparity = shiftLUT[ depthTmp ]; // << iShiftPrec;2375 Int disparityInt = disparity >> 3;//in chroma resolution2376 2377 if (disparityInt < 0)2378 {2379 if (minRelativePos > disparityInt+xTxt)2380 {2381 minRelativePos = disparityInt+xTxt;2382 }2383 }2384 else2385 {2386 if (maxRelativePos < disparityInt+xTxt)2387 {2388 maxRelativePos = disparityInt+xTxt;2389 }2390 }2391 }2392 }2393 2394 depthTmp = m_pDepthBlock[0];2395 Int disparity_tmp = shiftLUT[ depthTmp ]; // << iShiftPrec;2396 if ( disparity_tmp < 0 )2397 {2398 maxRelativePos = minRelativePos + range - 1;2399 }2400 else2401 {2402 minRelativePos = maxRelativePos - range + 1;2403 }2404 2405 #endif // H_3D_VSP_CONSTRAINED2406 #endif // H_3D_VSP_BLOCKSIZE == 12407 2408 TComMv dv(0, 0);2409 // luma size -> chroma size2410 height >>= 1;2411 width >>= 1;2412 2413 for ( Int yTxt = 0; yTxt < height; yTxt += nTxtPerDepthY )2414 {2415 for ( Int xTxt = 0; xTxt < width; xTxt += nTxtPerDepthX )2416 {2417 Pel repDepth = depth[ xTxt<<1 ];2418 assert( repDepth >= 0 && repDepth <= 255 );2419 2420 Int disparity = shiftLUT[ repDepth ]; // remove << iShiftPrec;2421 Int xFrac = disparity & 0x7;2422 2423 dv.setHor( disparity );2424 cu->clipMv( dv );2425 2426 Int refOffset = xTxt + (dv.getHor() >> 3);2427 2428 #if H_3D_VSP_CONSTRAINED2429 if(refOffset<minRelativePos || refOffset>maxRelativePos)2430 {2431 xFrac = 0;2432 }2433 refOffset = Clip3(minRelativePos, maxRelativePos, refOffset);2434 #endif2435 2436 assert( refCb[refOffset] >= 0 && refCb[refOffset]<= 255 );2437 assert( refCr[refOffset] >= 0 && refCr[refOffset]<= 255 );2438 2439 m_if.filterHorChroma( &refCb[refOffset], refStride, &dstCb[xTxt], dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !isBi );2440 m_if.filterHorChroma( &refCr[refOffset], refStride, &dstCr[xTxt], dstStride, nTxtPerDepthX, nTxtPerDepthY, xFrac, !isBi );2441 }2442 refCb += refStrideBlock;2443 refCr += refStrideBlock;2444 dstCb += dstStrideBlock;2445 dstCr += dstStrideBlock;2446 depth += depStrideBlock;2447 }2448 }2449 #endif2450 2451 #if H_3D_VSP_CONSTRAINED2452 Int TComPrediction::xGetConstrainedSize(Int nPbW, Int nPbH, Bool bLuma)2453 {2454 Int iSize = 0;2455 if (bLuma)2456 {2457 Int iArea = (nPbW+7) * (nPbH+7);2458 Int iAlpha = iArea / nPbH - nPbW - 7;2459 iSize = iAlpha + nPbW;2460 }2461 else // chroma2462 {2463 Int iArea = (nPbW+2) * (nPbH+2);2464 Int iAlpha = iArea / nPbH - nPbW - 4;2465 iSize = iAlpha + nPbW;2466 }2467 return iSize;2468 }2469 #endif // H_3D_VSP_CONSTRAINED2470 2471 #endif // H_3D_VSP2472 2473 2065 #if H_3D_DIM 2474 2066 Void TComPrediction::xPredBiSegDCs( Int* ptrSrc, UInt srcStride, Bool* biSegPattern, Int patternStride, Pel& predDC1, Pel& predDC2 ) … … 2485 2077 if( bL == bT ) 2486 2078 { 2487 #if SCU_HS_DEPTH_DC_PRED_G01432488 2079 const Int iTRR = ( patternStride * 2 - 1 ) - srcStride; 2489 2080 const Int iLBB = ( patternStride * 2 - 1 ) * srcStride - 1; 2490 2081 refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : (abs(ptrSrc[iTRR] - ptrSrc[-(Int)srcStride]) > abs(ptrSrc[iLBB] - ptrSrc[ -1]) ? ptrSrc[iTRR] : ptrSrc[iLBB]); 2491 #else2492 refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : 1<<( g_bitDepthY - 1 );2493 #endif2494 2082 refDC2 = ( ptrSrc[ -1] + ptrSrc[-(Int)srcStride] )>>1; 2495 2083 } … … 2593 2181 Int iSumPix[2]; 2594 2182 memset(iSumPix, 0, sizeof(Int)*2); 2595 #if QC_GENERIC_SDC_G01222596 2183 for( Int i = 0; i < uiNumSegments; i++ ) 2597 2184 { 2598 2185 rpSegMeans[i] = 0; 2599 2186 } 2600 #endif2601 2187 if (orgDC == false) 2602 2188 { … … 2613 2199 rpSegMeans[ucSegmentRB] = pOrig[uiStride * (uiSize-1) + (uiSize-1) ]; 2614 2200 } 2615 #if QC_GENERIC_SDC_G01222616 2201 else if( getDimType( uiIntraMode ) == DMM4_IDX ) 2617 2202 { … … 2647 2232 } 2648 2233 else 2649 #else2650 else if (uiIntraMode == PLANAR_IDX)2651 #endif2652 2234 { 2653 2235 Pel* pLeftTop = pOrig; -
trunk/source/Lib/TLibCommon/TComPrediction.h
r872 r884 80 80 81 81 #if H_3D_VSP 82 Int* m_pDepthBlock; ///< Store a depth block, local variable, to prevent memory allocation every time 83 #if H_3D_VSP_CONSTRAINED 84 Int xGetConstrainedSize(Int nPbW, Int nPbH, Bool bLuma = true); 85 #endif 86 TComYuv m_cYuvDepthOnVsp; 82 Int* m_pDepthBlock; ///< Store a depth block, local variable, to prevent memory allocation every time 83 TComYuv m_cYuvDepthOnVsp; 87 84 #endif 88 85 … … 121 118 122 119 #if H_3D_VSP 123 #if NTT_STORE_SPDV_VSP_G0148124 120 Void xPredInterUniSubPU ( TComDataCU *cu, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU=4, Int heightSubPU=4 ); 125 #else126 Void xGetVirtualDepth ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int txtPerDepthX=1, Int txtPerDepthY=1 );127 Void xPredInterLumaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize);128 Void xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize);129 #endif130 121 #endif 131 122 … … 172 163 // Depth intra 173 164 Void predIntraLumaDepth ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc = false 174 #if QC_GENERIC_SDC_G0122175 165 , TComWedgelet* dmm4Segmentation = NULL 176 #endif177 166 ); 178 167 #if H_3D_DIM_SDC -
trunk/source/Lib/TLibCommon/TComRdCost.cpp
r872 r884 599 599 cDtParam.uiComp = 255; // just for assert: to be sure it was set before use, since only values 0,1 or 2 are allowed. 600 600 601 #if SCU_HS_VSD_BUGFIX_IMPROV_G0163602 601 cDtParam.bitDepth = g_bitDepthY; 603 #endif 602 604 603 Dist dist = cDtParam.DistFunc( &cDtParam ); 605 604 … … 2985 2984 dD = ( (Double) ( dDM >> DISTORTION_PRECISION_ADJUSTMENT( g_bitDepthY - 8 ) ) ) * m_dDisparityCoeff; 2986 2985 2987 #if SCU_HS_VSD_BUGFIX_IMPROV_G01632988 2986 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 ); 2989 2987 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 ] ) ) ); 2990 #else2991 Double dTemp = ( 0.5 * fabs(dD) * ( abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x-1+y*iVirStride ] ) + abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x+1+y*iVirStride ] ) ) );2992 #endif2993 2988 iTemp = (Int) (((dTemp) < 0)? (Int)((dTemp) - 0.5) : (Int)((dTemp) + 0.5)); 2994 2989 -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r872 r884 112 112 , m_interLayerPredEnabledFlag (false) 113 113 , m_numInterLayerRefPicsMinus1 (0) 114 #if H_MV _HLS_7_POC_P0041114 #if H_MV 115 115 , m_sliceSegmentHeaderExtensionLength (0) 116 116 , m_pocResetIdc (0) … … 1284 1284 1285 1285 1286 1287 1286 /** Function for applying picture marking based on the Reference Picture Set in pReferencePictureSet. 1288 1287 */ … … 1340 1339 1341 1340 } 1342 #if H_MV _HLS_7_MISC_P0130_201341 #if H_MV 1343 1342 if( isReference ) // Current picture is in the temporal RPS 1344 1343 { … … 1727 1726 } 1728 1727 } 1729 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271730 m_vpsNumberLayerSetsMinus1 = -1;1731 #endif1732 1728 m_vpsNumProfileTierLevelMinus1 = -1; 1733 1729 1734 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271735 for ( Int i = 0; i < MAX_VPS_PROFILE_TIER_LEVEL; i++)1736 {1737 #if !H_MV_HLS_7_VPS_P0048_141738 m_profileRefMinus1[ i ] = -1;1739 #endif1740 }1741 1742 m_moreOutputLayerSetsThanDefaultFlag = false;1743 m_numAddOutputLayerSetsMinus1 = -1;1744 m_defaultOneTargetOutputLayerIdc = 0;1745 #else1746 1730 m_numAddOutputLayerSets = -1; 1747 1731 m_defaultTargetOutputLayerIdc = 0; 1748 #endif1749 1732 1750 1733 for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++) … … 1756 1739 m_outputLayerFlag[i][j] = false; 1757 1740 } 1758 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271759 1741 m_altOutputLayerFlag[ i ] = false; 1760 #endif 1761 } 1762 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1763 m_altOutputLayerFlag = false; 1764 #endif 1742 } 1765 1743 m_maxOneActiveRefLayerFlag = false; 1766 1744 m_directDepTypeLenMinus2 = 0; … … 1768 1746 1769 1747 m_avcBaseLayerFlag = false; 1770 #if H_MV_HLS_7_VPS_P0307_231771 1748 m_vpsNonVuiExtensionLength = 0; 1772 #else1773 m_vpsVuiOffset = 0;1774 #endif1775 1749 m_splittingFlag = false; 1776 1750 … … 1786 1760 { 1787 1761 m_vpsProfilePresentFlag [i] = false; 1788 #if !H_MV_HLS_7_VPS_P0048_141789 m_profileRefMinus1[i] = 0;1790 #endif1791 1762 m_outputLayerSetIdxMinus1 [i] = 0; 1792 1763 for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ ) … … 2099 2070 Int TComVPS::getNumOutputLayerSets() 2100 2071 { 2101 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_272102 2072 return getNumAddOutputLayerSets() + getVpsNumLayerSetsMinus1() + 1; 2103 #else2104 Int numOutputLayerSets = getVpsNumberLayerSetsMinus1( ) + 1;2105 if ( getMoreOutputLayerSetsThanDefaultFlag( ) )2106 {2107 numOutputLayerSets += (getNumAddOutputLayerSetsMinus1( ) + 1);2108 }2109 return numOutputLayerSets;2110 #endif2111 2073 } 2112 2074 … … 2156 2118 } 2157 2119 2158 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_272159 2120 Void TComVPS::initTargetLayerIdLists() 2160 2121 { … … 2176 2137 } 2177 2138 } 2178 #else 2179 Void TComVPS::deriveTargetLayerIdLists() 2180 { 2181 m_targetDecLayerIdLists.resize( getNumOutputLayerSets() ); 2182 m_targetOptLayerIdLists.resize( getNumOutputLayerSets() ); 2183 2184 for (Int targetOptLayerSetIdx = 0; targetOptLayerSetIdx < getNumOutputLayerSets(); targetOptLayerSetIdx++ ) 2185 { 2186 Int targetDecLayerSetIdx = getOutputLayerSetIdxMinus1( targetOptLayerSetIdx ) + 1; 2187 Int lsIdx = targetDecLayerSetIdx; 2188 2189 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 2190 { 2191 m_targetDecLayerIdLists[targetOptLayerSetIdx].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] ); 2192 if( getOutputLayerFlag( targetOptLayerSetIdx, j )) // This seems to be wrong in draft text 2193 { 2194 m_targetOptLayerIdLists[targetOptLayerSetIdx].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] ); 2195 } 2196 } 2197 } 2198 } 2199 #endif 2139 2140 Bool TComVPS::inferOutputLayerFlag( Int i, Int j ) 2141 { 2142 Bool outputLayerFlag; 2143 switch ( getDefaultTargetOutputLayerIdc( ) ) 2144 { 2145 case 0: 2146 outputLayerFlag = true; 2147 break; 2148 case 1: 2149 outputLayerFlag = ( j == m_layerSetLayerIdList[ getLayerSetIdxForOutputLayerSet( i ) ].size() - 1 ); 2150 break; 2151 case 2: 2152 if ( i == 0 && j == 0) 2153 { 2154 outputLayerFlag = true; // This is a software only fix for a bug in the spec. In spec outputLayerFlag is neither present nor inferred. 2155 } 2156 else 2157 { 2158 assert( 0 ); 2159 } 2160 break; 2161 default: 2162 assert( 0 ); 2163 break; 2164 } 2165 return outputLayerFlag; 2166 } 2167 2168 Int TComVPS::getMaxSubLayersInLayerSetMinus1( Int i ) 2169 { 2170 Int maxSLMinus1 = 0; 2171 Int optLsIdx = getLayerSetIdxForOutputLayerSet( i ); 2172 for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ ) 2173 { 2174 Int lId = m_layerSetLayerIdList[optLsIdx][k]; 2175 maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) )); 2176 } 2177 return maxSLMinus1; 2178 } 2200 2179 2201 2180 #endif // H_MV … … 2445 2424 , m_ppsInferScalingListFlag(false) 2446 2425 , m_ppsScalingListRefLayerId(0) 2447 #if H_MV_HLS_7_POC_P00412448 2426 , m_pocResetInfoPresentFlag(false) 2449 #endif2450 2427 #if H_3D 2451 2428 , m_pcDLT(NULL) … … 2455 2432 m_scalingList = new TComScalingList; 2456 2433 2457 #if H_MV _HLS_7_GEN_P0166_PPS_EXTENSION2434 #if H_MV 2458 2435 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ ) 2459 2436 { … … 2461 2438 } 2462 2439 #endif 2463 2464 2440 } 2465 2441 … … 2980 2956 // Consider to check here: 2981 2957 // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer0 and RefPicSetInterLayer1 that is a RASL picture. " 2982 #if H_MV_HLS_7_MISC_P0130_202983 2958 assert( picRef->getSlice(0)->getDiscardableFlag() == false ); // "There shall be no picture that has discardable_flag equal to 1 in RefPicSetInterLayer0 or RefPicSetInterLayer1". 2984 #endif2985 2959 } 2986 2960 } … … 3018 2992 { 3019 2993 break; 3020 }2994 } 3021 2995 } 3022 2996 … … 3028 3002 if ( pcPic ) 3029 3003 { 3030 if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() ) 3031 { 3032 Bool remainingInterLayerReferencesFlag = false; 3033 for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ ) 3004 if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() ) 3034 3005 { 3035 TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS(); 3036 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) ) 3006 Bool remainingInterLayerReferencesFlag = false; 3007 for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ ) 3008 { 3009 TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS(); 3010 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) ) 3011 { 3012 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ ) 3013 { 3014 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ], k ) ) 3015 { 3016 remainingInterLayerReferencesFlag = true; 3017 } 3018 } 3019 } 3020 } 3021 if( !remainingInterLayerReferencesFlag ) 3037 3022 { 3038 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ ) 3039 { 3040 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ], k ) ) 3041 { 3042 remainingInterLayerReferencesFlag = true; 3023 pcPic->getSlice(0)->setReferenced( false ); 3043 3024 } 3044 3025 } 3045 } 3046 } 3047 if( !remainingInterLayerReferencesFlag ) 3048 { 3049 pcPic->getSlice(0)->setReferenced( false ); 3050 } 3051 } 3052 } 3053 } 3054 } 3026 } 3027 } 3028 } 3055 3029 } 3056 3030 … … 3157 3131 Int numActiveRefLayerPics; 3158 3132 3159 #if H_MV_HLS_7_MISC_P0079_183160 3133 if( getLayerId() == 0 || getNumRefLayerPics() == 0 ) 3161 #else3162 if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerId() ) == 0 )3163 #endif3164 3134 { 3165 3135 numActiveRefLayerPics = 0; … … 3175 3145 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 ) 3176 3146 { 3177 #if H_MV_HLS_7_MISC_P0079_183178 3147 numActiveRefLayerPics = 1; 3179 #else3180 numActiveRefLayerPics = getRefLayerPicFlag( 0 ) ? 1 : 0;3181 #endif3182 3148 } 3183 3149 else … … 3207 3173 for ( Int refListIdx = 0; refListIdx < ((m_eSliceType==B_SLICE) ? 2 : 1); refListIdx++ ) 3208 3174 { 3209 #if MTK_ARP_REF_SELECTION_G00533210 3175 Int diffPOC=MAX_INT; 3211 3176 Int idx=-1; 3212 #endif3213 3177 for(Int i = 0; i < getNumRefIdx(RefPicList(refListIdx)); i++ ) 3214 3178 { 3215 3179 if ( getRefPic(RefPicList(refListIdx), i)->getPOC() != getPOC() ) 3216 3180 { 3217 #if MTK_ARP_REF_SELECTION_G00533218 3181 if( abs(getRefPic(RefPicList(refListIdx), i)->getPOC() - getPOC()) < diffPOC) 3219 3182 { … … 3221 3184 idx=i; 3222 3185 } 3223 #else3224 setFirstTRefIdx (RefPicList(refListIdx), i);3225 break;3226 #endif3227 3186 } 3228 #if MTK_ARP_REF_SELECTION_G00533229 3187 if(idx>=0) 3230 3188 { 3231 3189 setFirstTRefIdx (RefPicList(refListIdx), idx); 3232 3190 } 3233 #endif3234 3191 } 3235 3192 } … … 3368 3325 #endif 3369 3326 3370 #if MTK_DDD_G00633327 #if H_3D_DDD 3371 3328 if( getIsDepth() && getViewIndex() > 0 ) 3372 3329 { … … 3426 3383 } 3427 3384 3428 #if MTK_DDD_G00633385 #if H_3D_DDD 3429 3386 InitializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i ); 3430 3387 #endif … … 3434 3391 #endif 3435 3392 3436 #if MTK_DDD_G00633393 #if H_3D_DDD 3437 3394 Void TComSlice::InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ) 3438 3395 { … … 3837 3794 { 3838 3795 m_crossLayerIrapAlignedFlag = true; 3839 #if H_MV_HLS_7_MISC_P0068_213840 3796 m_allLayersIdrAlignedFlag = false; 3841 #endif3842 3797 m_bitRatePresentVpsFlag = false; 3843 3798 m_picRatePresentVpsFlag = false; … … 3866 3821 m_minHorizontalCtuOffsetPlus1 [i][j] = -1; 3867 3822 } 3868 #if H_MV_HLS_7_MISC_P0182_133869 3823 m_baseLayerParameterSetCompatibilityFlag[i] = false; 3870 #endif3871 3824 } 3872 3825 for ( Int i = 0; i < MAX_NUM_VIDEO_SIGNAL_INFO; i++ ) … … 3889 3842 if ( m_vpsVuiBspHrdParameters ) delete m_vpsVuiBspHrdParameters; 3890 3843 m_vpsVuiBspHrdParameters = NULL; 3844 } 3845 3846 Void TComVPSVUI::inferVpsVui( Bool encoderFlag ) 3847 { 3848 // inference of syntax elements that differ from default inference (as done in constructor), when VPS VUI is not present 3849 if (!encoderFlag ) 3850 { 3851 setCrossLayerIrapAlignedFlag( false ); 3852 } 3853 else 3854 { 3855 assert( !getCrossLayerIrapAlignedFlag() ); 3856 } 3891 3857 } 3892 3858 … … 3955 3921 setMatrixCoefficients ( videoSignalInfo->getMatrixCoeffsVps () ); 3956 3922 } 3957 #endif 3923 3924 TComDpbSize::TComDpbSize() 3925 { 3926 for (Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++ ) 3927 { 3928 m_subLayerFlagInfoPresentFlag[i] = false; 3929 3930 for (Int j = 0; j < MAX_TLAYER; j++ ) 3931 { 3932 m_subLayerDpbInfoPresentFlag [i][j] = ( j == 0) ; 3933 m_maxVpsNumReorderPics [i][j] = 0; 3934 m_maxVpsLatencyIncreasePlus1 [i][j] = 0; 3935 3936 for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 3937 { 3938 m_maxVpsDecPicBufferingMinus1[i][k][j] = 0; 3939 } 3940 } 3941 } 3942 } 3943 #endif -
trunk/source/Lib/TLibCommon/TComSlice.h
r872 r884 473 473 Bool m_crossLayerPicTypeAlignedFlag; 474 474 Bool m_crossLayerIrapAlignedFlag; 475 #if H_MV_HLS_7_MISC_P0068_21476 475 Bool m_allLayersIdrAlignedFlag; 477 #endif478 476 Bool m_bitRatePresentVpsFlag; 479 477 Bool m_picRatePresentVpsFlag; … … 484 482 Int m_constantPicRateIdc [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 485 483 Int m_avgPicRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 486 #if H_MV_HLS_7_VPS_P0076_15487 484 Bool m_videoSignalInfoIdxPresentFlag; 488 485 Int m_vpsNumVideoSignalInfoMinus1; 489 486 TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO]; 490 487 Int m_vpsVideoSignalInfoIdx [MAX_NUM_VIDEO_SIGNAL_INFO]; 491 #endif492 488 Bool m_tilesNotInUseFlag; 493 489 Bool m_tilesInUseFlag [MAX_NUM_LAYERS]; … … 500 496 Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 501 497 Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 502 #if !H_MV_HLS_7_VPS_P0076_15503 Bool m_videoSignalInfoIdxPresentFlag;504 Int m_vpsNumVideoSignalInfoMinus1;505 TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO];506 Int m_vpsVideoSignalInfoIdx [MAX_NUM_VIDEO_SIGNAL_INFO];507 #endif508 498 Bool m_vpsVuiBspHrdPresentFlag; 509 499 TComVpsVuiBspHrdParameters* m_vpsVuiBspHrdParameters; 510 #if H_MV_HLS_7_MISC_P0182_13511 500 Bool m_baseLayerParameterSetCompatibilityFlag[MAX_NUM_LAYERS]; 512 #endif513 501 514 502 public: … … 521 509 Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; } 522 510 523 #if H_MV_HLS_7_MISC_P0068_21524 511 Void setAllLayersIdrAlignedFlag( Bool flag ) { m_allLayersIdrAlignedFlag = flag; } 525 512 Bool getAllLayersIdrAlignedFlag( ) { return m_allLayersIdrAlignedFlag; } 526 #endif527 513 528 514 Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; } … … 550 536 Int getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; } 551 537 552 #if H_MV_HLS_7_VPS_P0076_15553 538 Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } 554 539 Bool getVideoSignalInfoIdxPresentFlag( ) { return m_videoSignalInfoIdxPresentFlag; } … … 562 547 Void setVpsVideoSignalInfoIdx( Int i, Int val ) { m_vpsVideoSignalInfoIdx[i] = val; } 563 548 Int getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; } 564 #endif565 549 566 550 Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; } … … 593 577 Void setMinHorizontalCtuOffsetPlus1( Int i, Int j, Int val ) { m_minHorizontalCtuOffsetPlus1[i][j] = val; } 594 578 Int getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; } 595 #if !H_MV_HLS_7_VPS_P0076_15 596 Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } 597 Bool getVideoSignalInfoIdxPresentFlag( ) { return m_videoSignalInfoIdxPresentFlag; } 598 599 Void setVideoSignalInfo( Int i, TComVideoSignalInfo* val ) { m_videoSignalInfo[i] = val; } 600 TComVideoSignalInfo* getVideoSignalInfo( Int i ) { return m_videoSignalInfo[i]; } 601 602 Void setVpsNumVideoSignalInfoMinus1( Int val ) { m_vpsNumVideoSignalInfoMinus1 = val; } 603 Int getVpsNumVideoSignalInfoMinus1( ) { return m_vpsNumVideoSignalInfoMinus1; } 604 605 Void setVpsVideoSignalInfoIdx( Int i, Int val ) { m_vpsVideoSignalInfoIdx[i] = val; } 606 Int getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; } 607 #endif 579 608 580 Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; } 609 581 Bool getVpsVuiBspHrdPresentFlag( ) { return m_vpsVuiBspHrdPresentFlag; } … … 612 584 TComVpsVuiBspHrdParameters* getVpsVuiBspHrdParameters( ) { return m_vpsVuiBspHrdParameters; } 613 585 614 #if H_MV_HLS_7_MISC_P0182_13615 586 Void setBaseLayerParameterSetCompatibilityFlag( Int i, Bool flag ) { m_baseLayerParameterSetCompatibilityFlag[i] = flag; } 616 587 Bool getBaseLayerParameterSetCompatibilityFlag( Int i ) { return m_baseLayerParameterSetCompatibilityFlag[i]; } 617 #endif 618 619 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 620 Void inferVpsVui( Bool encoderFlag ) 621 { 622 // inference of syntax elements that differ from default inference (as done in constructor), when VPS VUI is not present 623 if (!encoderFlag ) 624 { 625 setCrossLayerIrapAlignedFlag( false ); 626 } 627 else 628 { 629 assert( !getCrossLayerIrapAlignedFlag() ); 630 } 631 632 } 633 #endif 588 589 Void inferVpsVui( Bool encoderFlag ); 634 590 }; 635 591 … … 686 642 687 643 public: 688 TComDpbSize( ) 689 { 690 for (Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++ ) 691 { 692 m_subLayerFlagInfoPresentFlag[i] = false; 693 694 for (Int j = 0; j < MAX_TLAYER; j++ ) 695 { 696 m_subLayerDpbInfoPresentFlag [i][j] = ( j == 0) ; 697 m_maxVpsNumReorderPics [i][j] = 0; 698 m_maxVpsLatencyIncreasePlus1 [i][j] = 0; 699 700 for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 701 { 702 m_maxVpsDecPicBufferingMinus1[i][k][j] = 0; 703 } 704 } 705 } 706 } 644 TComDpbSize( ); 707 645 708 646 Void setSubLayerFlagInfoPresentFlag( Int i, Bool flag ) { m_subLayerFlagInfoPresentFlag[i] = flag; } … … 768 706 /// VPS EXTENSION SYNTAX ELEMENTS 769 707 Bool m_avcBaseLayerFlag; 770 #if H_MV_HLS_7_VPS_P0307_23771 708 Int m_vpsNonVuiExtensionLength; 772 #else773 Int m_vpsVuiOffset;774 #endif775 709 Bool m_splittingFlag; 776 710 Bool m_scalabilityMaskFlag [MAX_NUM_SCALABILITY_TYPES]; … … 788 722 Int m_maxTidIlRefPicsPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 789 723 Bool m_allRefLayersActiveFlag; 790 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27791 Int m_vpsNumberLayerSetsMinus1;792 #endif793 724 Int m_vpsNumProfileTierLevelMinus1; 794 725 Bool m_vpsProfilePresentFlag [MAX_VPS_OP_SETS_PLUS1]; 795 726 796 #if !H_MV_HLS_7_VPS_P0048_14797 Int m_profileRefMinus1 [MAX_VPS_PROFILE_TIER_LEVEL];798 #endif799 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27800 727 Int m_numAddOutputLayerSets; 801 728 Int m_defaultTargetOutputLayerIdc; 802 #else803 Bool m_moreOutputLayerSetsThanDefaultFlag;804 Int m_numAddOutputLayerSetsMinus1;805 Int m_defaultOneTargetOutputLayerIdc;806 #endif807 729 808 730 Int m_outputLayerSetIdxMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; 809 731 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 810 732 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; 811 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27812 733 Bool m_altOutputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS]; 813 #else814 Bool m_altOutputLayerFlag;815 #endif816 734 Bool m_repFormatIdxPresentFlag; 817 735 Int m_vpsNumRepFormatsMinus1; … … 869 787 #if H_3D_SPIVMP 870 788 Int m_iSubPULog2Size [MAX_NUM_LAYERS ]; 871 #endif872 #endif873 #if QC_SPIVMP_MPI_G0119874 789 Int m_iSubPUMPILog2Size; 790 #endif 875 791 #endif 876 792 #if H_3D_VSP … … 974 890 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } 975 891 976 #if H_MV_HLS_7_VPS_P0307_23977 892 Void setVpsNonVuiExtensionLength( Int val ) { m_vpsNonVuiExtensionLength = val; } 978 893 Int getVpsNonVuiExtensionLength( ) { return m_vpsNonVuiExtensionLength; } 979 #else980 Void setVpsVuiOffset( Int val ) { m_vpsVuiOffset = val; }981 Int getVpsVuiOffset( ) { return m_vpsVuiOffset; }982 #endif983 894 984 895 Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } … … 988 899 Void setScalabilityMaskFlag( Int scalType, Bool val ) { m_scalabilityMaskFlag[scalType] = val; } 989 900 Bool getScalabilityMaskFlag( Int scalType ) { return m_scalabilityMaskFlag[scalType]; } 901 990 902 Int getNumScalabilityTypes( ); 991 903 … … 1009 921 Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } 1010 922 Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } 923 1011 924 Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } 1012 925 Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } 926 1013 927 Void setVpsSubLayersMaxMinus1PresentFlag( Bool flag ) { m_vpsSubLayersMaxMinus1PresentFlag = flag; } 1014 928 Bool getVpsSubLayersMaxMinus1PresentFlag( ) { return m_vpsSubLayersMaxMinus1PresentFlag; } 929 1015 930 Void setSubLayersVpsMaxMinus1( Int i, Int val ) { m_subLayersVpsMaxMinus1[i] = val; } 1016 931 Int getSubLayersVpsMaxMinus1( Int i ) { return m_subLayersVpsMaxMinus1[i]; } 1017 932 Void checkSubLayersVpsMaxMinus1( Int i ) { assert( m_subLayersVpsMaxMinus1[i] >= 0 && m_subLayersVpsMaxMinus1[i] <= m_uiMaxTLayers - 1 ); } 933 1018 934 Void setMaxTidRefPresentFlag( Bool flag ) { m_maxTidRefPresentFlag = flag; } 1019 935 Bool getMaxTidRefPresentFlag( ) { return m_maxTidRefPresentFlag; } 936 1020 937 Void setMaxTidIlRefPicsPlus1( Int i, Int j, Int val ) { m_maxTidIlRefPicsPlus1[i][j] = val; } 1021 938 Int getMaxTidIlRefPicsPlus1( Int i, Int j ) { return m_maxTidIlRefPicsPlus1[i][j]; } 939 1022 940 Void setAllRefLayersActiveFlag( Bool flag ) { m_allRefLayersActiveFlag = flag; } 1023 941 Bool getAllRefLayersActiveFlag( ) { return m_allRefLayersActiveFlag; } 1024 942 1025 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271026 Void setVpsNumberLayerSetsMinus1( Int val ) { m_vpsNumberLayerSetsMinus1 = val; }1027 Int getVpsNumberLayerSetsMinus1( ) { return m_vpsNumberLayerSetsMinus1; }1028 #endif1029 1030 943 Void setVpsNumProfileTierLevelMinus1( Int val ) { m_vpsNumProfileTierLevelMinus1 = val; } 1031 944 Int getVpsNumProfileTierLevelMinus1( ) { return m_vpsNumProfileTierLevelMinus1; } … … 1034 947 Bool getVpsProfilePresentFlag( Int idx ) { return m_vpsProfilePresentFlag[idx]; } 1035 948 1036 #if !H_MV_HLS_7_VPS_P0048_141037 Void setProfileRefMinus1( Int profileTierLevelIdx, Int val ) { m_profileRefMinus1[ profileTierLevelIdx ] = val; }1038 Int getProfileRefMinus1( Int profileTierLevelIdx ) { return m_profileRefMinus1[ profileTierLevelIdx ]; }1039 Void checkProfileRefMinus1( Int i ) { assert( getProfileRefMinus1( i ) + 1 <= i ); }; // The value of profile_ref_minus1[ i ] + 1 shall be less than or equal to i.1040 #endif1041 1042 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271043 Void setMoreOutputLayerSetsThanDefaultFlag( Bool flag ) { m_moreOutputLayerSetsThanDefaultFlag = flag; }1044 Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag; }1045 #endif1046 1047 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271048 949 Void setNumAddOutputLayerSets( Int val ) { m_numAddOutputLayerSets = val; } 1049 950 Int getNumAddOutputLayerSets( ) { return m_numAddOutputLayerSets; } 1050 #else 1051 Void setNumAddOutputLayerSetsMinus1( Int val ) { m_numAddOutputLayerSetsMinus1 = val; } 1052 Int getNumAddOutputLayerSetsMinus1( ) { return m_numAddOutputLayerSetsMinus1; } 1053 #endif 1054 1055 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 951 1056 952 Void setDefaultTargetOutputLayerIdc( Int val ) { m_defaultTargetOutputLayerIdc = val; } 1057 953 Int getDefaultTargetOutputLayerIdc( ) { return m_defaultTargetOutputLayerIdc; } 1058 #else1059 Void setDefaultOneTargetOutputLayerIdc( Int val ) { m_defaultOneTargetOutputLayerIdc = val; }1060 Int getDefaultOneTargetOutputLayerIdc( ) { return m_defaultOneTargetOutputLayerIdc; }1061 Void checkDefaultOneTargetOutputLayerIdc( ) { assert( m_defaultOneTargetOutputLayerIdc >= 0 && m_defaultOneTargetOutputLayerIdc <= 1 ); }1062 #endif1063 954 1064 955 Void setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val ) { m_outputLayerSetIdxMinus1[ outLayerSetIdx ] = val; } … … 1067 958 Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } 1068 959 Bool getOutputLayerFlag( Int outLayerSetIdx, Int i ) { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; } 1069 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1070 Bool inferOutputLayerFlag( Int i, Int j ) 1071 { 1072 Bool outputLayerFlag; 1073 switch ( getDefaultTargetOutputLayerIdc( ) ) 1074 { 1075 case 0: 1076 outputLayerFlag = true; 1077 break; 1078 case 1: 1079 outputLayerFlag = ( j == m_layerSetLayerIdList[ getLayerSetIdxForOutputLayerSet( i ) ].size() - 1 ); 1080 break; 1081 case 2: 1082 if ( i == 0 && j == 0) 1083 { 1084 outputLayerFlag = true; // This is a software only fix for a bug in the spec. In spec outputLayerFlag neither present nor inferred. 1085 } 1086 else 1087 { 1088 assert( 0 ); 1089 } 1090 break; 1091 default: 1092 assert( 0 ); 1093 break; 1094 } 1095 return outputLayerFlag; 1096 } 1097 #else 1098 Bool inferOutputLayerFlag( Int layerSetIdx, Int i ) { return ( getDefaultOneTargetOutputLayerIdc( ) == 0 || ( ( getDefaultOneTargetOutputLayerIdc( ) == 1 ) && ( i == m_layerSetLayerIdList[layerSetIdx].size() - 1 ) )); } 1099 #endif 960 961 Bool inferOutputLayerFlag( Int i, Int j ); 1100 962 1101 963 Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx ] = val; } 1102 964 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 1103 965 1104 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271105 966 Void setAltOutputLayerFlag( Int i, Bool flag ) { m_altOutputLayerFlag[i] = flag; } 1106 967 Bool getAltOutputLayerFlag( Int i ) { return m_altOutputLayerFlag[i]; } 1107 #else1108 Void setAltOutputLayerFlag( Bool flag ) { m_altOutputLayerFlag = flag; }1109 Bool getAltOutputLayerFlag( ) { return m_altOutputLayerFlag; }1110 #endif1111 968 1112 969 Void setRepFormatIdxPresentFlag( Bool flag ) { m_repFormatIdxPresentFlag = flag; } … … 1121 978 Void setRepFormat( Int i, TComRepFormat* val ) { m_repFormat[i] = val; } 1122 979 TComRepFormat* getRepFormat( Int i ) { return m_repFormat[i]; } 980 1123 981 Void setMaxOneActiveRefLayerFlag( Bool flag) { m_maxOneActiveRefLayerFlag = flag; } 1124 982 Bool getMaxOneActiveRefLayerFlag( ) { return m_maxOneActiveRefLayerFlag; } … … 1134 992 Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } 1135 993 Bool getPocLsbNotPresentFlag( Int i ) { return m_pocLsbNotPresentFlag[i]; } 994 1136 995 Void setDirectDepTypeLenMinus2( Int val) { m_directDepTypeLenMinus2 = val; } 1137 996 Int getDirectDepTypeLenMinus2( ) { return m_directDepTypeLenMinus2; } … … 1142 1001 Void setDefaultDirectDependencyType( Int val ) { m_defaultDirectDependencyType = val; } 1143 1002 Int getDefaultDirectDependencyType( ) { return m_defaultDirectDependencyType; } 1003 1144 1004 Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } 1145 1005 Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } … … 1167 1027 1168 1028 Int getProfileLevelTierIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; 1169 1170 #if H_MV_HLS_7_VPS_P0306_221171 1029 Int getVpsRepFormatIdxLen() { return gCeilLog2( getVpsNumRepFormatsMinus1() + 1 ); }; 1172 #endif 1030 1173 1031 Int getNumLayersInIdList ( Int lsIdx ); 1174 1032 … … 1178 1036 Void deriveLayerSetLayerIdList(); 1179 1037 1180 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271181 1038 Int getLayerSetIdxForOutputLayerSet( Int i ) { return ( i <= getVpsNumLayerSetsMinus1() ) ? i : getOutputLayerSetIdxMinus1( i ) + 1 ; }; 1182 1039 … … 1189 1046 Int getNumOutputLayersInOutputLayerSet( Int i ) { return (Int) getTargetOptLayerIdList( i ).size(); }; 1190 1047 Int getOlsHighestOutputLayerId( Int i ) { return getTargetOptLayerIdList( i ).back(); }; 1191 #else 1192 Void deriveTargetLayerIdLists(); 1193 std::vector<Int> getTargetDecLayerIdList( Int targetOptLayerSetIdx ) { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; 1194 std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx ) { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; 1195 #endif 1196 1197 #if H_MV_HLS_7_HRD_P0156_7 1198 Int getMaxSubLayersInLayerSetMinus1( Int i ) 1199 { 1200 Int maxSLMinus1 = 0; 1201 Int optLsIdx = getLayerSetIdxForOutputLayerSet( i ); 1202 for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ ) 1203 { 1204 Int lId = m_layerSetLayerIdList[optLsIdx][k]; 1205 maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) )); 1206 } 1207 return maxSLMinus1; 1208 } 1209 #endif 1048 1049 Int getMaxSubLayersInLayerSetMinus1( Int i ); 1210 1050 1211 1051 // inference … … 1232 1072 UInt getCamParPrecision () { return m_uiCamParPrecision; } 1233 1073 Bool getCamParPresent ( Int viewIndex ) { return m_bCamParPresent[viewIndex]; } 1234 #if FIX_CAM_PARS_COLLECTOR1235 1074 Void setCamParPresent ( Int viewIndex, Bool val ) { m_bCamParPresent[viewIndex] = val; } 1236 #endif1237 1075 Bool hasCamParInSliceHeader( Int viewIndex ) { return m_bCamParInSliceHeader[viewIndex]; } 1238 1076 Void setHasCamParInSliceHeader( Int viewIndex, Bool b ) { m_bCamParInSliceHeader[viewIndex] = b; } … … 1248 1086 Int getSubPULog2Size(Int layerIdInVps) { return m_iSubPULog2Size[layerIdInVps]; } 1249 1087 Void setSubPULog2Size(Int layerIdInVps, Int u) { m_iSubPULog2Size[layerIdInVps] = u;} 1250 #endif1251 #endif1252 #if QC_SPIVMP_MPI_G01191253 1088 Int getSubPUMPILog2Size( ) { return m_iSubPUMPILog2Size; } 1254 1089 Void setSubPUMPILog2Size( Int u ) { m_iSubPUMPILog2Size = u; } 1090 #endif 1255 1091 #endif 1256 1092 #if H_3D_VSP … … 1940 1776 Int m_ppsScalingListRefLayerId; 1941 1777 1942 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION1943 1778 Bool m_ppsExtensionTypeFlag[PS_EX_T_MAX_NUM]; 1944 #endif1945 #if H_MV_HLS_7_POC_P00411946 1779 Bool m_pocResetInfoPresentFlag; 1947 #endif1948 1780 #endif 1949 1781 … … 2088 1920 Int getPpsScalingListRefLayerId( ) { return m_ppsScalingListRefLayerId; } 2089 1921 2090 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION2091 1922 Void setPpsExtensionTypeFlag( Int i, Bool flag ) { m_ppsExtensionTypeFlag[i] = flag; } 2092 1923 Bool getPpsExtensionTypeFlag( Int i ) { return m_ppsExtensionTypeFlag[i]; } 2093 #endif 2094 2095 #if H_MV_HLS_7_POC_P0041 1924 2096 1925 Void setPocResetInfoPresentFlag( Bool flag ) { m_pocResetInfoPresentFlag = flag; } 2097 1926 Bool getPocResetInfoPresentFlag( ) { return m_pocResetInfoPresentFlag; } 2098 #endif2099 2100 1927 #endif 2101 1928 }; … … 2243 2070 Int m_interLayerPredLayerIdc [MAX_NUM_LAYERS]; 2244 2071 2245 #if H_MV_HLS_7_POC_P00412246 2072 Int m_sliceSegmentHeaderExtensionLength; 2247 2073 Int m_pocResetIdc; … … 2252 2078 Int m_pocMsbVal; 2253 2079 Bool m_pocMsbValRequiredFlag; 2254 #endif2255 2080 2256 2081 #if H_3D … … 2278 2103 #endif 2279 2104 2280 #if MTK_DDD_G00632105 #if H_3D_DDD 2281 2106 Int m_aiDDDInvScale [MAX_NUM_LAYERS]; 2282 2107 Int m_aiDDDInvOffset[MAX_NUM_LAYERS]; … … 2600 2425 Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } 2601 2426 2602 #if H_MV_HLS_7_POC_P00412603 2427 Void setSliceSegmentHeaderExtensionLength( Int val ) { m_sliceSegmentHeaderExtensionLength = val; } 2604 2428 Int getSliceSegmentHeaderExtensionLength( ) { return m_sliceSegmentHeaderExtensionLength; } … … 2637 2461 return getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA; 2638 2462 } 2639 #endif2640 2463 2641 2464 // Additional variables derived in slice header semantics … … 2658 2481 2659 2482 #endif 2660 #if MTK_DDD_G00632483 #if H_3D_DDD 2661 2484 Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); 2662 2485 Int getDepthFromDV( Int iDV, Int iBaseViewIdx ) -
trunk/source/Lib/TLibCommon/TypeDef.h
r872 r884 76 76 #if H_3D 77 77 #define H_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 78 // HHI_QTLPC_RAU_OFF_C0160 // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 78 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 79 // MTK_TEX_DEP_PAR_G0055 Texture-partition-dependent depth partition. JCT3V-G0055 79 80 80 81 #define H_3D_VSO 1 // VSO, View synthesis optimization, includes: … … 83 84 // SAIT_VSO_EST_A0033, JCT3V-A0033 modification 3 84 85 // LGE_WVSO_A0119 86 // SCU_HS_VSD_BUGFIX_IMPROV_G0163 85 87 #define H_3D_NBDV 1 // Neighboring block disparity derivation 86 88 // QC_JCT3V-A0097 … … 102 104 // SHARP_ARP_REF_CHECK_F0105 ARP reference picture selection and DPB check 103 105 // LGE_ARP_CTX_F0161 JCT3V-F0161 106 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061 107 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 108 104 109 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 105 110 // Unifying rounding offset, for IC part, JCT3V-D0135 … … 109 114 // LGE_IC_CTX_F0160 //JCT3V-F0160 110 115 // SEC_ONLY_TEXTURE_IC_F0151 116 // MTK_IC_FLAG_CABAC_SIMP_G0061 117 // SEC_IC_ARP_SIG_G0072, Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121 111 118 112 119 #if H_3D_NBDV … … 133 140 // MTK_VSP_SIMPLIFICATION_F0111 1. Inherited VSP also use NBDV of current CU, 2. VSP cannot be inherited from above LCU rowss 134 141 // LGE_SHARP_VSP_INHERIT_F0104 142 // NTT_STORE_SPDV_VSP_G0148 Storing Sub-PU based DV for VSP 143 // Restricted bi-prediction for VSP 135 144 136 145 #define H_3D_IV_MERGE 1 // Inter-view motion merge candidate … … 145 154 // ETRIKHU_MERGE_REUSE_F0093 QC_DEPTH_IV_MRG_F0125, JCT3V-F0125: Depth oriented Inter-view MV candidate 146 155 // EC_MPI_ENABLING_MERGE_F0150, MPI flag in VPS and enabling in Merge mode 156 // MTK_NBDV_IVREF_FIX_G0067 , Disable IvMC, VSP when IVREF is not available, JCT3V-G0067 157 // SEC_DEPTH_DV_DERIVAITON_G0074, Simplification of DV derivation for depth, JCT3V-G0074 158 // QC_DEPTH_MERGE_SIMP_G0127 Remove DV candidate and shifting candidate for depth coding 159 147 160 #define H_3D_TMVP 1 // QC_TMVP_C0047 148 161 // Sony_M23639 … … 173 186 // SEC_DMM3_RBC_F0147 Removal of DMM3 and RBC from DMMs 174 187 // QC_DIM_DELTADC_UNIFY_F0132 Unify delta DC coding in depth intra modes 188 // Unify intra SDC and inter SDC 189 // QC_GENERIC_SDC_G0122 Generalize SDC to all depth intra modes 190 // SCU_HS_DEPTH_DC_PRED_G0143 191 // HS_TSINGHUA_SDC_SPLIT_G0111 192 // QC_PKU_SDC_SPLIT_G0123 Intra SDC Split 193 194 175 195 176 196 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding 177 // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding 197 // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding 198 // SEC_INTER_SDC_G0101 Improved inter SDC with multiple DC candidates 199 178 200 #define H_3D_SPIVMP 1 // H_3D_SPIVMP // JCT3V-F0110: Sub-PU level inter-view motion prediction 201 // SEC_SPIVMP_MCP_SIZE_G0077, Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077 202 // QC_SPIVMP_MPI_G0119 Sub-PU level MPI merge candidate 203 // Simplification on Sub-PU level temporal interview motion prediction 204 205 206 #define H_3D_DBBP 1 // DBBP: Depth-based Block Partitioning and Merging 207 208 #define H_3D_DDD 1 // Disparity derived depth coding 209 179 210 #define H_3D_FCO 0 // Flexible coding order for 3D 180 211 … … 258 289 259 290 291 ///// ***** DEPTH BASED BLOCK PARTITIONING ********* 292 #if H_3D_DBBP 293 #define DBBP_INVALID_SHORT (-4) 294 #define RWTH_DBBP_PACK_MODE SIZE_2NxN 295 #endif 296 297 260 298 ///// ***** FCO ********* 261 299 #if H_3D_FCO … … 269 307 #endif 270 308 271 272 309 ///////////////////////////////////////////////////////////////////////////////////////// 273 /////////////////////////////////// HTM-10.0 Integrations//////////////////////////////310 /////////////////////////////////// TBD ////////////////////////////// 274 311 ///////////////////////////////////////////////////////////////////////////////////////// 275 #if H_3D 276 #if H_3D_QTLPC 277 #define MTK_TEX_DEP_PAR_G0055 1 // Texture-partition-dependent depth partition. JCT3V-G0055 278 #endif 279 280 #define MTK_DDD_G0063 1 // Disparity derived depth coding 281 #define HTM10RC1_FIX 1 // Fix of DDD 282 283 284 #if H_3D_VSP 285 #define MTK_RBIP_VSP_G0069 1 // Restricted bi-prediction for VSP 286 #define NTT_STORE_SPDV_VSP_G0148 1 // Storing Sub-PU based DV for VSP 287 #endif 288 289 #define H_3D_DBBP 1 // DBBP: Depth-based Block Partitioning and Merging 290 291 #if H_3D_DBBP 292 #define DBBP_INVALID_SHORT (-4) 293 #define RWTH_DBBP_PACK_MODE SIZE_2NxN 294 #endif 295 296 #if H_3D_DIM 297 #define QC_PKU_SDC_SPLIT_G0123 1 // Intra SDC Split 298 #if QC_PKU_SDC_SPLIT_G0123 299 #define HS_TSINGHUA_SDC_SPLIT_G0111 1 300 #endif 301 #define SCU_HS_DEPTH_DC_PRED_G0143 1 302 #define QC_GENERIC_SDC_G0122 1 // Generalize SDC to all depth intra modes 303 #if H_3D_DIM_SDC && H_3D_INTER_SDC 304 #define QC_SDC_UNIFY_G0130 1 // Unify intra SDC and inter SDC 305 #define QC_SDC_UNIFY_G0130_FIX 1 // Fix bug of G0130 306 #define QC_SDC_UNIFY_G0130_FIX2 1 // Fix bug of G0130 307 #endif 308 #define SEC_INTER_SDC_G0101 1 // Improved inter SDC with multiple DC candidates 309 #endif 310 311 #define KHU_SIMP_SPIVMP_G0147 1 // Simplification on Sub-PU level temporal interview motion prediction 312 313 #if H_3D_SPIVMP 314 #define QC_SPIVMP_MPI_G0119 1 // Sub-PU level MPI merge candidate 315 #endif 316 317 #define QC_DEPTH_MERGE_SIMP_G0127 1 // Remove DV candidate and shifting candidate for depth coding 318 #define SEC_IC_ARP_SIG_G0072 1 // Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121 319 #define SCU_HS_VSD_BUGFIX_IMPROV_G0163 1 320 #define SEC_SPIVMP_MCP_SIZE_G0077 1 // Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077 321 #define SEC_DEPTH_DV_DERIVAITON_G0074 1 // Simplification of DV derivation for depth, JCT3V-G0074 322 #define MTK_ARP_REF_SELECTION_G0053 1 // ARP Reference picture selection in JCT3V-G0053 323 #define MTK_ARP_FLAG_CABAC_SIMP_G0061 1 // Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061 324 #define MTK_IC_FLAG_CABAC_SIMP_G0061 1 // Use only 1 context for IC flag in JCT3V-G0061 325 #define MTK_NBDV_IVREF_FIX_G0067 1 // Disable IvMC, VSP when IVREF is not available, JCT3V-G0067 326 #endif 327 328 ///////////////////////////////////////////////////////////////////////////////////////// 329 /////////////////////////////////// HTM-10.1 Integrations ////////////////////////////// 330 ///////////////////////////////////////////////////////////////////////////////////////// 331 332 333 // TBD 312 334 313 // #define H_MV_HLS_7_POC_P0041_3 0 // (POC/P0041/POC reset) #3 It was remarked that we should require each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. This was agreed. Decision: Adopt (with constraint for discardable_flag as described above) 335 314 // #define H_MV_HLS_7_POC_P0041_FIXES 0 // (POC/P0041/Fixes) For each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. … … 343 322 // #define H_MV_HLS_7_VPS_P0300_27 0 // Output part only. (VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt. 344 323 345 346 #define H_MV_HLS_7_VPS_P0306_22 1 // (VPS/P0306/ue(v) coded syntax elements) #22 Several minor modifications to the VPS syntax, consistent with eliminating the previous intention to avoid ue(v) parsing in the VPS 347 #define H_MV_HLS_7_SEI_P0204_26 1 // (SEI/P0204/sub-bitstream SEI) #26 Add sub-bitstream property SEI message. Decision: Adopt 348 #define H_MV_HLS_7_MISC_P0130_20 1 // (MISC/P0130/discardable not in inter-layer RPS) #20 Add constraint restricting pictures marked as discardable from being present in the temporal or inter-layer RPS, 349 #define H_MV_HLS_7_VPS_P0125_24 1 // (VPS/P0125/VPS extension offset ) #24 Decision: Keep it as a reserved FFFF value. 350 #define H_MV_HLS_7_VPS_P0307_23 1 // (VPS/P0307/VPS VUI extension) #23 Decision: Adopt modification in P0307. 351 #define H_MV_HLS_7_POC_P0041 1 // Syntax related to POC reset 352 353 354 #define H_MV_HLS7_GEN 0 // General changes (not tested) 355 #define H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1 // Output layer sets, various 356 // (VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt. 357 // (VPS/P0156/Num of output_layer_flag) #10 Proposal 3: The output_layer_flag[ i ][ j ] is signalled for j equal to 0 to NumLayersInIdList[ lsIdx ] inclusive. It was remarked that we might be able to just assume that the top layer is always output; however, this was not entirely clear , so the safe thing to do may be to also send the flag for this layer. 358 // (VPS/P0295/Default output layer sets) #5 Discussion from (P0110). Decision: Three-state approach (text in P0295, decoder shall allow 3 to be present and shall treat 3 the same as the value 2). 359 360 361 #define H_MV_HLS_7_HRD_P0156_7 1 // (HRD/P0156/MaxSubLayersInLayerSetMinus1) #7 Proposal 1: signal, in the VPS extension, the DPB parameters for an output layer set for sub-DPBs only up to the maximum temporal sub-layers in the corresponding layer set 362 #define H_MV_HLS_7_VPS_P0048_14 1 // (VPS/P0048/profile_ref_minus1 rem) #14 Remove profile_ref_minus1 from the VPS extension, from JCTVC-P0048 363 #define H_MV_HLS_7_VPS_P0076_15 1 // (VPS/P0076/video signal info move) #15 Move video signal information syntax structure earlier in the VPS VUI. 364 #define H_MV_HLS_7_SPS_P0155_16_32 1 // (SPS/P0155/sps_sub_layer_ordering_info) #16, #32 Not signal the sps_max_num_reorder_pics[], sps_max_latency_increase_plus1[], and sps_max_dec_pic_buffering_minus1[] syntax elements in the SPS when nuh_layer_id > 0. 365 #define H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 1 // (GEN/P0166/pps_extension) #17 Add PPS extension type flags for conditional presence of syntax extensions per extension type, aligned with the SPS extension type flags, from JCTVC-P0166. Further align the SPS extension type flags syntax between RExt and MV-HEVC/SHVC 366 #define H_MV_HLS_7_FIX_SET_DPB_SIZE 1 // Fix derivation dpb size parameters 367 #define H_MV_HLS_7_RESERVED_FLAGS 1 // Added flags 368 // (SPS/P0312/SHVC reserved flag) The flag will be used for the syntax vert_phase_position_enable_flag in SHVC draft 369 // (VPS/O0215/SHVC reserved flag): this flag will be used for the syntax cross_layer_phase_alignment_flag in SHVC draft. 370 // (VPS VUI/O0199,P0312/SHVC reserved flags) the 3 reserved bits will be used for the syntaxes single_layer_for_non_irap_flag, higher_layer_irap_skip_flag and vert_phase_position_not_in_use_flag in SHVC draft. 371 #define H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO 1 // Discard VPS with nuh_layer_Id > 0 372 #define H_MV_HLS_7_MISC_P0130_EOS 1 // (MISC/P0130/EOS NAL layer id) #19 Require that end of bitstream NAL unit shall have nuh_layer_id equal to 0, from JCTVC-P0130. Decoders shall allow an end of bitstream NAL unit with nuh_layer_id > 0 to be present, and shall ignore the NAL unit. 373 #define H_MV_HLS_7_MISC_P0182_13 1 // (MISC/P0182/BL PS Compatibility flag) #13 Define the flag (in VPS VUI) with the proposed semantics, without specifying an associated extraction process. Editors to select the position in the VPS VUI. 374 #define H_MV_HLS_7_MISC_P0068_21 1 // (MISC/P0068/all irap idr flag) #21 Add flag in VUI to indicate that all IRAP pictures are IDRs and that all layer pictures in an AU are IDR aligned, from JCTVC-P0068 proposal 1. 375 #define H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1 // Fix inference of cross_layer_irap_aligned_flag 376 #define H_MV_HLS_7_MISC_P0079_18 1 // (MISC/P0079/NumActiveRefLayerPics) #18 Modification of derivation of variable NumActiveRefLayerPics. 377 #define FIX_CAM_PARS_COLLECTOR 1 378 #define UPDATE_HM13 1 // Only some parts in H_3D parts are marked! 379 #if H_3D 380 #define H_3D_FIX_G0148_BRACE 1 381 #endif 324 #define H_MV_HLS7_GEN 0 // General changes (not tested) 325 326 327 382 328 ///////////////////////////////////////////////////////////////////////////////////////// 383 329 /////////////////////////////////// HM RELATED DEFINES //////////////////////////////// … … 416 362 #define MAX_NUM_BITSTREAM_PARTITIONS 100 ///< Maximum value is actually not specified 417 363 #define MAX_NUM_BSP_SCHED_COMBINATION 100 ///< Maximum value is actually not specified 418 #if H_MV_HLS_7_SEI_P0204_26419 364 #define MAX_SUB_STREAMS 1024 420 #endif421 365 #else 422 366 #define MAX_NUM_LAYER_IDS 64 … … 909 853 #if H_MV 910 854 911 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION912 855 enum PpsExtensionTypes 913 856 { … … 921 864 922 865 //Below for sps, would be good if this could be aligned 923 #endif924 866 925 867 enum PsExtensionTypes -
trunk/source/Lib/TLibDecoder/SEIread.cpp
r872 r884 99 99 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 100 100 break; 101 #if H_MV _HLS_7_SEI_P0204_26101 #if H_MV 102 102 case SEI::SUB_BITSTREAM_PROPERTY: 103 103 fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n"); … … 245 245 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps); 246 246 break; 247 #if H_MV _HLS_7_SEI_P0204_26247 #if H_MV 248 248 case SEI::SUB_BITSTREAM_PROPERTY: 249 249 sei = new SEISubBitstreamProperty; … … 777 777 778 778 } 779 #if H_MV _HLS_7_SEI_P0204_26779 #if H_MV 780 780 Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei) 781 781 { -
trunk/source/Lib/TLibDecoder/SEIread.h
r872 r884 73 73 Void xParseSEISOPDescription (SEISOPDescription &sei, UInt payloadSize); 74 74 Void xParseSEIScalableNesting (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps); 75 #if H_MV _HLS_7_SEI_P0204_2675 #if H_MV 76 76 Void xParseSEISubBitstreamProperty (SEISubBitstreamProperty &sei); 77 77 Void xResizeSubBitstreamPropertySeiArrays(SEISubBitstreamProperty &sei); -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r872 r884 366 366 367 367 READ_FLAG( uiCode, "pps_extension_flag"); 368 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION369 368 if (uiCode) 370 369 { … … 383 382 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) ) 384 383 { 385 #if H_MV_HLS_7_POC_P0041386 384 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 387 #endif388 385 } 389 386 … … 406 403 #endif 407 404 } 408 #else409 if (uiCode)410 {411 #if H_3D412 parsePPSExtension( pcPPS, pcVPS );413 READ_FLAG( uiCode, "pps_extension2_flag");414 if ( uiCode )415 {416 #endif417 while ( xMoreRbspData() )418 {419 READ_FLAG( uiCode, "pps_extension_data_flag");420 }421 #if H_3D422 }423 #endif424 }425 #endif426 405 } 427 406 … … 849 828 assert(uiCode <= 12); 850 829 851 #if H_MV _HLS_7_SPS_P0155_16_32830 #if H_MV 852 831 if ( pcSPS->getLayerId() == 0 ) 853 832 { … … 888 867 } 889 868 } 890 #if H_MV _HLS_7_SPS_P0155_16_32869 #if H_MV 891 870 } 892 871 #endif … … 1053 1032 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode ); 1054 1033 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode ); 1055 #if H_MV_HLS_7_RESERVED_FLAGS1056 1034 READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" ); 1057 #endif1058 1035 } 1059 1036 } … … 1092 1069 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 1093 1070 1094 #if H_MV_HLS_7_VPS_P0125_241095 1071 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); 1096 #else1097 #if H_MV && !H_MV_HLS7_GEN1098 READ_CODE( 16, uiCode, "vps_extension_offset" );1099 #else1100 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff);1101 #endif1102 #endif1103 1072 parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1); 1104 1073 UInt subLayerOrderingInfoPresentFlag; … … 1212 1181 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false ); 1213 1182 1214 #if !H_MV_HLS_7_VPS_P0307_231215 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 );1216 if ( pcVPS->getVpsVuiPresentFlag() )1217 {1218 READ_CODE( 16, uiCode, "vps_vui_offset" ); pcVPS->setVpsVuiOffset( uiCode );1219 }1220 #endif1221 1222 1183 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); 1223 1184 … … 1325 1286 1326 1287 READ_FLAG( uiCode, "all_ref_layers_active_flag" ); pcVPS->setAllRefLayersActiveFlag( uiCode == 1 ); 1327 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1328 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); pcVPS->setVpsNumberLayerSetsMinus1 ( uiCode ); 1329 #endif 1330 1331 #if !H_MV_HLS_7_VPS_P0306_22 1332 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1333 #else 1288 1334 1289 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1335 #endif 1290 1336 1291 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1337 1292 { 1338 1293 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1339 #if !H_MV_HLS_7_VPS_P0048_141340 if( !pcVPS->getVpsProfilePresentFlag( i ) )1341 {1342 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );1343 pcVPS->checkProfileRefMinus1( i );1344 }1345 #endif1346 1294 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1347 1295 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1348 1296 { 1349 1297 TComPTL temp = *pcVPS->getPTL( i ); 1350 #if H_MV_HLS_7_VPS_P0048_141351 1298 *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 ); 1352 #else1353 *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );1354 #endif1355 1299 pcVPS->getPTL( i )->copyLevelFrom( &temp ); 1356 1300 } 1357 1301 } 1358 1302 1359 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271360 1303 READ_UVLC( uiCode, "num_add_output_layer_sets" ); pcVPS->setNumAddOutputLayerSets( uiCode ); 1361 1304 pcVPS->initTargetLayerIdLists( ); … … 1365 1308 } 1366 1309 1367 #else1368 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;1369 1370 READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 );1371 1372 if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )1373 {1374 READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1" ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode );1375 numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1);1376 }1377 1378 if( numOutputLayerSets > 1)1379 {1380 READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode );1381 pcVPS->checkDefaultOneTargetOutputLayerIdc();1382 }1383 #endif1384 1385 1310 pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 1386 1311 pcVPS->setOutputLayerSetIdxMinus1(0, -1); 1387 1312 1388 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271389 1313 pcVPS->deriveTargetLayerIdList( 0 ); 1390 1314 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1391 1315 { 1392 1316 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1393 #else1394 for( Int i = 1; i < numOutputLayerSets; i++ )1395 {1396 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )1397 #endif1398 1317 { 1399 1318 READ_UVLC( uiCode, "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode ); 1400 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271401 1319 } 1402 1320 … … 1416 1334 } 1417 1335 pcVPS->deriveTargetLayerIdList( i ); 1418 #else 1419 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ ) 1420 { 1421 READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 ); 1422 } 1423 } 1424 else 1425 { // These inference rules would also be helpful in spec text 1426 pcVPS->setOutputLayerSetIdxMinus1(i, i - 1 ); 1427 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ ) 1428 { 1429 pcVPS->setOutputLayerFlag(i,j, pcVPS->inferOutputLayerFlag( i, j )); 1430 } 1431 } 1432 #endif 1336 1433 1337 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1434 1338 { … … 1436 1340 } 1437 1341 1438 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271439 1342 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1440 1343 { … … 1442 1345 } 1443 1346 } 1444 #else1445 }1446 if( pcVPS->getMaxLayersMinus1() > 0 )1447 {1448 READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 );1449 }1450 #endif1451 1452 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271453 pcVPS->deriveTargetLayerIdLists();1454 #endif1455 1347 1456 1348 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1457 1349 if ( pcVPS->getRepFormatIdxPresentFlag() ) 1458 1350 { 1459 #if H_MV_HLS_7_VPS_P0306_221460 1351 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1461 #else1462 READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );1463 #endif1464 1352 } 1465 1353 … … 1479 1367 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1480 1368 { 1481 #if H_MV_HLS_7_VPS_P0306_221482 1369 READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1483 #else1484 READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );1485 #endif1486 1370 } 1487 1371 } … … 1500 1384 } 1501 1385 1502 #if H_MV_HLS_7_RESERVED_FLAGS1503 1386 READ_FLAG( uiCode, "vps_reserved_zero_flag" ); 1504 #endif1505 1387 parseDpbSize( pcVPS ); 1506 1388 … … 1531 1413 } 1532 1414 1533 #if H_MV_HLS_7_VPS_P0307_231534 1415 READ_UVLC( uiCode, "vps_non_vui_extension_length" ); pcVPS->setVpsNonVuiExtensionLength( uiCode ); 1535 1416 for ( Int i = 1; i <= pcVPS->getVpsNonVuiExtensionLength(); i++ ) … … 1538 1419 } 1539 1420 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); 1540 #endif1541 #if !H_MV_HLS_7_RESERVED_FLAGS1542 READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" );1543 #endif1544 1421 if( pcVPS->getVpsVuiPresentFlag() ) 1545 1422 { … … 1547 1424 parseVPSVUI( pcVPS ); 1548 1425 } 1549 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1550 1426 { 1551 1427 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); … … 1553 1429 pcVPSVUI->inferVpsVui( false ); 1554 1430 } 1555 #endif1556 1431 1557 1432 pcVPS->checkVPSExtensionSyntax(); … … 1601 1476 READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 ); 1602 1477 } 1603 #if H_MV_HLS_7_MISC_P0068_211604 1478 if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ) 1605 1479 { 1606 1480 READ_FLAG( uiCode, "all_layers_idr_aligned_flag" ); pcVPSVUI->setAllLayersIdrAlignedFlag( uiCode == 1 ); 1607 1481 } 1608 #endif1609 1482 READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 ); 1610 1483 READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 ); 1611 1484 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1612 1485 { 1613 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271614 1486 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1615 #else1616 for( Int i = 0; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ )1617 #endif1618 1487 { 1619 1488 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) … … 1641 1510 } 1642 1511 1643 #if H_MV_HLS_7_VPS_P0076_151644 1512 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 ); 1645 1513 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1675 1543 } 1676 1544 } 1677 #endif1678 1545 1679 1546 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); … … 1712 1579 } 1713 1580 1714 #if H_MV_HLS_7_RESERVED_FLAGS1715 1581 READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" ); 1716 #endif1717 1718 1582 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); 1719 1583 … … 1737 1601 } 1738 1602 1739 #if !H_MV_HLS_7_VPS_P0076_151740 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );1741 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )1742 {1743 READ_CODE( 4, uiCode, "vps_num_video_signal_info_minus1" ); pcVPSVUI->setVpsNumVideoSignalInfoMinus1( uiCode );1744 }1745 else1746 {1747 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );1748 }1749 1750 for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ )1751 {1752 assert( pcVPSVUI->getVideoSignalInfo( i ) == NULL );1753 TComVideoSignalInfo* curVideoSignalInfo = new TComVideoSignalInfo();1754 parseVideoSignalInfo( curVideoSignalInfo );1755 pcVPSVUI->setVideoSignalInfo(i, curVideoSignalInfo );1756 }1757 1758 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )1759 {1760 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1761 {1762 READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );1763 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );1764 }1765 }1766 else1767 {1768 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1769 {1770 pcVPSVUI->setVpsVideoSignalInfoIdx( i, pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i );1771 }1772 }1773 #endif1774 1603 READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 ); 1775 1604 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1777 1606 parseVpsVuiBspHrdParameters( pcVPS ); 1778 1607 } 1779 #if H_MV_HLS_7_MISC_P0182_131780 1608 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1781 1609 { … … 1785 1613 } 1786 1614 } 1787 #endif1788 1615 } 1789 1616 … … 1864 1691 { 1865 1692 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 ); 1866 #if H_MV_HLS_7_HRD_P0156_71867 1693 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1868 #else1869 for( Int j = 0; j <= vps->getMaxTLayers() - 1 ; j++ )1870 #endif1871 1694 { 1872 1695 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1876 1699 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1877 1700 { 1878 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271879 1701 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1880 #else1881 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )1882 #endif1883 1702 { 1884 1703 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); … … 1933 1752 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1934 1753 #if H_3D_SPIVMP 1935 #if SEC_SPIVMP_MCP_SIZE_G00771936 1754 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3); 1937 #else1938 READ_UVLC (uiCode, "log2_sub_PU_size_minus2"); pcVPS->setSubPULog2Size(i, uiCode+2);1939 #endif1940 1755 #endif 1941 1756 #endif … … 1965 1780 if (i!=1) 1966 1781 { 1967 #if SEC_SPIVMP_MCP_SIZE_G00771968 1782 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3); 1969 #else1970 READ_UVLC (uiCode, "log2_sub_PU_size_minus2[i]"); pcVPS->setSubPULog2Size(i, uiCode+2);1971 #endif1972 1783 } 1973 1784 #endif … … 1991 1802 for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++) 1992 1803 { 1993 #if FIX_CAM_PARS_COLLECTOR1994 1804 pcVPS->setCamParPresent ( viewIndex, false ); 1995 1805 pcVPS->setHasCamParInSliceHeader( viewIndex, false ); 1996 #endif1997 1806 READ_FLAG( uiCode, "cp_present_flag[i]" ); bCamParPresentFlag = ( uiCode == 1); 1998 1807 if ( bCamParPresentFlag ) … … 2013 1822 } 2014 1823 } 2015 #if QC_SPIVMP_MPI_G01192016 1824 READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3"); pcVPS->setSubPUMPILog2Size( uiCode + 3 ); 2017 #endif2018 1825 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 2019 1826 } … … 2728 2535 if(pps->getSliceHeaderExtensionPresentFlag()) 2729 2536 { 2730 #if !H_MV_HLS_7_POC_P00412731 READ_UVLC(uiCode,"slice_header_extension_length");2732 for(Int i=0; i<uiCode; i++)2733 {2734 UInt ignore;2735 READ_CODE(8,ignore,"slice_header_extension_data_byte");2736 }2737 }2738 #else2739 2537 #if H_MV 2740 2538 READ_UVLC( uiCode, "slice_segment_header_extension_length" ); rpcSlice->setSliceSegmentHeaderExtensionLength( uiCode ); … … 2806 2604 } 2807 2605 } 2808 #endif2809 2606 #endif 2810 2607 } … … 3103 2900 #endif 3104 2901 #if H_3D_INTER_SDC 3105 #if QC_SDC_UNIFY_G01303106 2902 Void TDecCavlc::parseDeltaDC( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 3107 2903 { … … 3113 2909 assert(0); 3114 2910 } 3115 #else 3116 Void TDecCavlc::parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 3117 { 3118 assert(0); 3119 } 3120 3121 Void TDecCavlc::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) 3122 { 3123 assert(0); 3124 } 3125 #endif 2911 3126 2912 #endif 3127 2913 #if H_3D_DBBP -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r872 r884 124 124 #endif 125 125 #if H_3D_INTER_SDC 126 #if QC_SDC_UNIFY_G0130127 126 Void parseDeltaDC ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ); 128 127 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 129 #else130 Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );131 Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );132 #endif133 128 #endif 134 129 #if H_3D_DBBP -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r872 r884 293 293 294 294 295 #if MTK_DDD_G0063295 #if H_3D_DDD 296 296 pcCU->setUseDDD( false, uiAbsPartIdx, uiDepth ); 297 297 #endif … … 339 339 if( pcCU->getSlice()->getIsDepth()) 340 340 { 341 #if SEC_DEPTH_DV_DERIVAITON_G0074342 341 DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo); 343 #else344 DvInfo.bDV = m_ppcCU[uiDepth]->getDispNeighBlocks(0, 0, &DvInfo);345 #endif346 342 } 347 343 else … … 414 410 m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, uiDepth ); 415 411 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx); 416 417 #if !SEC_IC_ARP_SIG_G0072 412 #if H_3D_ARP 413 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth ); 414 #endif 418 415 #if H_3D_IC 419 416 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 420 #endif421 #endif422 #if H_3D_ARP423 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );424 #endif425 #if SEC_IC_ARP_SIG_G0072426 #if H_3D_IC427 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );428 #endif429 417 #endif 430 418 … … 466 454 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 467 455 468 #if MTK_DDD_G0063456 #if H_3D_DDD 469 457 if( uiMergeIndex == m_ppcCU[uiDepth]->getUseDDDCandIdx() ) 470 458 { … … 484 472 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 485 473 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 486 #if NTT_STORE_SPDV_VSP_G0148474 #if H_3D_VSP 487 475 if( pcCU->getVSPFlag( uiAbsPartIdx ) != 0 ) 488 476 { … … 551 539 m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth ); 552 540 553 #if QC_SDC_UNIFY_G0130541 #if H_3D_DIM_SDC 554 542 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 555 543 #endif … … 573 561 // prediction mode ( Intra : direction mode, Inter : Mv, reference idx ) 574 562 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 575 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130576 m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );577 #endif578 563 // Coefficient decoding 579 564 Bool bCodeDQP = getdQPFlag(); … … 663 648 #endif 664 649 #if H_3D_INTER_SDC 665 #if QC_SDC_UNIFY_G0130666 650 if( m_ppcCU[uiDepth]->getSDCFlag( 0 ) ) 667 #else668 if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) )669 #endif670 651 { 671 652 xReconInterSDC( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); … … 730 711 UInt uiWidth = pcCU->getWidth ( 0 ); 731 712 UInt uiHeight = pcCU->getHeight( 0 ); 732 #if !SEC_INTER_SDC_G0101733 UChar* pMask = pcCU->getInterSDCMask();734 735 memset( pMask, 0, uiWidth*uiHeight );736 pcCU->xSetInterSDCCUMask( pcCU, pMask );737 #endif738 713 739 714 Pel *pResi; … … 746 721 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 747 722 { 748 #if SEC_INTER_SDC_G0101749 723 pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( 0, 0 ); 750 #else751 UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];752 #if QC_SDC_UNIFY_G0130753 pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( uiSeg, 0 );754 #else755 pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 );756 #endif757 #endif758 724 } 759 725 pResi += uiResiStride; … … 929 895 #endif 930 896 931 #if H_3D && UPDATE_HM13897 #if H_3D 932 898 Bool useDltFlag = (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()); 933 899 … … 955 921 { 956 922 #if H_3D 957 #if UPDATE_HM13958 923 if ( useDltFlag ) 959 #else960 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )961 #endif962 924 { 963 925 pReco [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); … … 1151 1113 UInt uiWidth = pcCU->getWidth ( 0 ); 1152 1114 UInt uiHeight = pcCU->getHeight ( 0 ); 1153 #if QC_PKU_SDC_SPLIT_G01231154 #if HS_TSINGHUA_SDC_SPLIT_G01111155 #if QC_GENERIC_SDC_G01221156 1115 TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight ); 1157 #endif1158 #else1159 #if QC_GENERIC_SDC_G01221160 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );1161 #endif1162 #endif1163 #endif1164 #if QC_PKU_SDC_SPLIT_G01231165 1116 UInt numParts = 1; 1166 UInt i = 0;1167 1117 UInt sdcDepth = 0; 1168 1118 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; … … 1181 1131 UInt uiLumaPredMode = 0; 1182 1132 1183 #if HS_TSINGHUA_SDC_SPLIT_G01111184 1133 if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1) 1185 1134 { … … 1188 1137 uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()); 1189 1138 } 1190 #else 1191 if (uiWidth == 64) 1192 { 1193 numParts = 4; 1194 sdcDepth = 1; 1195 uiWidth = uiHeight = 32; 1196 } 1197 #endif 1198 1199 for ( i = 0; i < numParts; i++ ) 1139 1140 for ( Int i = 0; i < numParts; i++ ) 1200 1141 { 1201 1142 uiStride = pcRecoYuv->getStride (); … … 1203 1144 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1204 1145 piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); 1205 1146 1206 1147 uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1207 1148 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); … … 1211 1152 1212 1153 AOF( uiWidth == uiHeight ); 1213 #else 1214 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 1215 TComYuv* pcPredYuv = m_ppcYuvReco[uiDepth]; 1216 TComYuv* pcResiYuv = m_ppcYuvResi[uiDepth]; 1217 1218 UInt uiStride = pcRecoYuv->getStride (); 1219 Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 1220 Pel* piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1221 Pel* piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); 1222 1223 UInt uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1224 Pel* piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1225 UInt uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1226 1227 UInt uiLumaPredMode = pcCU->getLumaIntraDir ( uiAbsPartIdx ); 1228 1229 AOF( uiWidth == uiHeight ); 1230 AOF( uiAbsPartIdx == 0 ); 1231 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 1232 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1233 #endif 1234 1235 //===== init availability pattern ===== 1236 Bool bAboveAvail = false; 1237 Bool bLeftAvail = false; 1238 #if QC_PKU_SDC_SPLIT_G0123 1239 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1240 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1241 #else 1242 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 1243 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1244 #endif 1245 #if !QC_PKU_SDC_SPLIT_G0123 1246 #if QC_GENERIC_SDC_G0122 1247 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1248 #endif 1249 #endif 1250 #if HS_TSINGHUA_SDC_SPLIT_G0111 1251 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1252 #endif 1253 //===== get prediction signal ===== 1254 #if H_3D_DIM 1255 if( isDimMode( uiLumaPredMode ) ) 1256 { 1257 m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight 1258 #if QC_GENERIC_SDC_G0122 1259 , false, dmm4Segmentation 1260 #endif 1261 ); 1262 #if HS_TSINGHUA_SDC_SPLIT_G0111 1263 Bool* dmm4PatternSplit = dmm4Segmentation->getPattern(); 1264 Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern(); 1265 for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 1266 { 1267 dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k]; 1268 } 1269 #endif 1270 } 1271 else 1272 { 1273 #endif 1274 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1275 #if H_3D_DIM 1276 } 1277 #endif 1278 #if QC_PKU_SDC_SPLIT_G0123 1154 1155 //===== init availability pattern ===== 1156 Bool bAboveAvail = false; 1157 Bool bLeftAvail = false; 1158 1159 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1160 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1161 1162 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1163 //===== get prediction signal ===== 1164 if( isDimMode( uiLumaPredMode ) ) 1165 { 1166 m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, false, dmm4Segmentation ); 1167 Bool* dmm4PatternSplit = dmm4Segmentation->getPattern(); 1168 Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern(); 1169 for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 1170 { 1171 dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k]; 1172 } 1173 } 1174 else 1175 { 1176 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1177 } 1178 1279 1179 if ( numParts > 1 ) 1280 1180 { … … 1292 1192 } 1293 1193 uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 ); 1294 #if HS_TSINGHUA_SDC_SPLIT_G01111295 1194 dmm4Segmentation->destroy(); delete dmm4Segmentation; 1296 #endif1297 1195 } 1298 1196 uiAbsPartIdx = 0; … … 1309 1207 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1310 1208 uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1311 #endif1312 1209 // number of segments depends on prediction mode 1313 1210 UInt uiNumSegments = 1; … … 1326 1223 uiMaskStride = pcWedgelet->getStride(); 1327 1224 } 1328 #if QC_GENERIC_SDC_G01221329 1225 if( getDimType( uiLumaPredMode ) == DMM4_IDX ) 1330 1226 { 1331 1227 uiNumSegments = 2; 1332 #if HS_TSINGHUA_SDC_SPLIT_G01111333 1228 pbMask = dmm4SegmentationOrg->getPattern(); 1334 1229 uiMaskStride = dmm4SegmentationOrg->getStride(); 1335 #else 1336 pbMask = dmm4Segmentation->getPattern(); 1337 uiMaskStride = dmm4Segmentation->getStride(); 1338 #endif 1339 } 1340 #endif 1230 } 1341 1231 // get DC prediction for each segment 1342 1232 Pel apDCPredValues[2]; … … 1400 1290 pRecCr += uiStrideC; 1401 1291 } 1402 #if QC_GENERIC_SDC_G01221403 #if HS_TSINGHUA_SDC_SPLIT_G01111404 1292 dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg; 1405 #else1406 dmm4Segmentation->destroy(); delete dmm4Segmentation;1407 #endif1408 #endif1409 1293 } 1410 1294 #endif -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r872 r884 111 111 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 112 112 113 #if SEC_IC_ARP_SIG_G0072114 113 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 ) 115 #else116 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )117 #endif118 114 { 119 115 return; … … 272 268 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 273 269 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 274 #if !SEC_IC_ARP_SIG_G0072 270 #if H_3D_ARP 271 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 272 #endif 275 273 #if H_3D_IC 276 274 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 277 #endif278 #endif279 #if H_3D_ARP280 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );281 #endif282 #if SEC_IC_ARP_SIG_G0072283 #if H_3D_IC284 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );285 #endif286 275 #endif 287 276 #if H_3D_DBBP … … 362 351 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 363 352 364 #if MTK_DDD_G0063353 #if H_3D_DDD 365 354 if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() ) 366 355 { … … 384 373 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 385 374 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 386 #if NTT_STORE_SPDV_VSP_G0148375 #if H_3D_VSP 387 376 #if H_3D_DBBP 388 377 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) ) … … 440 429 } 441 430 } 442 #if !SEC_IC_ARP_SIG_G0072 431 #if H_3D_ARP 432 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 433 #endif 443 434 #if H_3D_IC 444 435 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 445 436 #endif 446 #endif447 #if H_3D_ARP448 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );449 #endif450 #if SEC_IC_ARP_SIG_G0072451 #if H_3D_IC452 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );453 #endif454 #endif455 437 } 456 438 #if H_3D_VSP 457 #if NTT_STORE_SPDV_VSP_G0148458 439 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0)) 459 #else460 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == false))461 #endif462 440 #else 463 441 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) ) … … 797 775 UInt uiLumaOffset = uiMinCoeffSize*uiAbsPartIdx; 798 776 UInt uiChromaOffset = uiLumaOffset>>2; 799 #if QC_SDC_UNIFY_G0130800 777 #if H_3D_DIM_SDC 801 778 if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx) ) … … 807 784 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 808 785 } 809 #endif810 786 811 787 #if H_3D_INTER_SDC … … 817 793 } 818 794 #endif 819 #if QC_SDC_UNIFY_G0130_FIX820 795 if( pcCU->getSlice()->getIsDepth() && ( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) ) ) 821 #else822 if( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) )823 #endif824 796 { 825 797 Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1; … … 842 814 } 843 815 } 844 #else845 #if H_3D_DIM_SDC846 if( pcCU->getSDCFlag( uiAbsPartIdx ) )847 {848 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );849 assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );850 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );851 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );852 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );853 return;854 }855 #endif856 857 #if H_3D_INTER_SDC858 if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )859 {860 assert( !pcCU->isSkipped( uiAbsPartIdx ) );861 assert( !pcCU->isIntra( uiAbsPartIdx) );862 assert( pcCU->getSlice()->getIsDepth() );863 864 decodeInterSDCResidualData( pcCU, uiAbsPartIdx, uiDepth );865 return;866 }867 #endif868 816 #endif 869 817 … … 893 841 894 842 #if H_3D_INTER_SDC 895 #if QC_SDC_UNIFY_G0130896 843 Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 897 844 { … … 904 851 } 905 852 906 #if SEC_INTER_SDC_G0101907 853 if( !pcCU->getSlice()->getIsDepth() || pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N || pcCU->isSkipped( uiAbsPartIdx ) ) 908 #else909 if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) )910 #endif911 854 { 912 855 return; 913 856 } 914 857 915 #if SEC_INTER_SDC_G0101916 858 assert( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) ); 917 #else918 assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );919 #endif920 921 859 m_pcEntropyDecoderIf->parseSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 922 860 } 923 924 #else925 Void TDecEntropy::decodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )926 {927 pcCU->setInterSDCFlagSubParts( false, uiAbsPartIdx, 0, uiDepth);928 929 if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) )930 {931 return;932 }933 934 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || pcCU->isSkipped( uiAbsPartIdx ) )935 {936 return;937 }938 939 m_pcEntropyDecoderIf->parseInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );940 }941 942 Void TDecEntropy::decodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )943 {944 if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) )945 {946 return;947 }948 949 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || !pcCU->getInterSDCFlag( uiAbsPartIdx ) )950 {951 return;952 }953 954 UInt uiNumSegments = ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ? 1 : ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 );955 956 // decode residual data for each segment957 for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ )958 {959 m_pcEntropyDecoderIf->parseInterSDCResidualData( pcCU, uiAbsPartIdx, uiDepth, uiSeg );960 }961 }962 #endif963 861 #endif 964 862 #if H_3D_DBBP -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r872 r884 96 96 #endif 97 97 #if H_3D_INTER_SDC 98 #if QC_SDC_UNIFY_G013099 98 virtual Void parseDeltaDC ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) = 0; 100 99 virtual Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 101 #else102 virtual Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;103 virtual Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0;104 #endif105 100 #endif 106 101 #if H_3D_DBBP … … 187 182 #endif 188 183 #if H_3D_INTER_SDC 189 #if QC_SDC_UNIFY_G0130190 184 Void decodeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 191 #else192 Void decodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );193 Void decodeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );194 #endif195 185 #endif 196 186 #if H_3D_DBBP -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r872 r884 86 86 , m_cDdcFlagSCModel ( 1, 1, NUM_DDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 87 87 , m_cDdcDataSCModel ( 1, 1, NUM_DDC_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 88 #if QC_GENERIC_SDC_G012289 88 , m_cAngleFlagSCModel ( 1, 1, NUM_ANGLE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 90 #if !QC_SDC_UNIFY_G013091 , m_cIntraSdcFlagSCModel ( 1, 1, NUM_INTRASDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels)92 #endif93 #endif94 89 #if H_3D_DIM_DMM 95 90 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 100 95 #endif 101 96 #endif 102 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 103 , m_cInterSDCFlagSCModel ( 1, 1, NUM_INTER_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 104 , m_cInterSDCResidualSCModel ( 1, 1, NUM_INTER_SDC_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 105 , m_cInterSDCResidualSignFlagSCModel ( 1, 1, NUM_INTER_SDC_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 106 #endif 107 #if QC_SDC_UNIFY_G0130 97 #if H_3D_DIM_SDC 108 98 , m_cSDCFlagSCModel ( 1, 1, NUM_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 109 99 #endif … … 180 170 m_cDdcFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DDC_FLAG ); 181 171 m_cDdcDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DDC_DATA ); 182 #if QC_GENERIC_SDC_G0122183 172 m_cAngleFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 184 #if !QC_SDC_UNIFY_G0130185 m_cIntraSdcFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTRASDC_FLAG );186 #endif187 #endif188 173 #if H_3D_DIM_DMM 189 174 m_cDmm1DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM1_DATA ); … … 194 179 #endif 195 180 #endif 196 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 197 m_cInterSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG ); 198 m_cInterSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 199 m_cInterSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 200 #endif 201 #if QC_SDC_UNIFY_G0130 181 #if H_3D_DIM_SDC 202 182 m_cSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_FLAG ); 203 183 #endif … … 260 240 m_cDdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG ); 261 241 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 262 #if QC_GENERIC_SDC_G0122263 242 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 264 #if !QC_SDC_UNIFY_G0130265 m_cIntraSdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG );266 #endif267 #endif268 243 #if H_3D_DIM_DMM 269 244 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); … … 274 249 #endif 275 250 #endif 276 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 277 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 278 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 279 m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 280 #endif 281 #if QC_SDC_UNIFY_G0130 251 #if H_3D_DIM_SDC 282 252 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 283 253 #endif … … 817 787 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 818 788 819 #if MTK_TEX_DEP_PAR_G0055820 789 Bool depthDependent = false; 821 790 UInt uiTexturePart = uiMode; 822 #endif823 791 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC()) 824 792 { 825 793 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 826 794 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 827 #if !MTK_TEX_DEP_PAR_G0055828 if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN)829 #else830 795 if(pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth ) 831 796 { … … 834 799 } 835 800 if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N) 836 #endif837 801 { 838 802 bParsePartSize = false; … … 879 843 if(bParsePartSize) 880 844 { 881 #endif882 #if MTK_TEX_DEP_PAR_G0055883 845 if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N) 884 846 { … … 920 882 } 921 883 } 922 #if MTK_TEX_DEP_PAR_G0055884 #if H_3D_QTLPC 923 885 } 924 886 else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD) … … 985 947 } 986 948 else 949 { 987 950 assert(0); 988 #endif 951 } 989 952 #if H_MV_ENC_DEC_TRAC 990 953 DTRACE_CU("part_mode", eMode ) 991 954 #endif 992 #if H_3D_QTLPC993 955 } 994 956 #endif … … 1041 1003 } 1042 1004 if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE ) 1043 #if H_3D_DIM_SDC1044 #if QC_GENERIC_SDC_G01221045 if( 1 ) // This should be cleaned up.1046 #else1047 if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )1048 #endif1049 #endif1050 1005 { 1051 1006 #endif … … 1063 1018 #if H_3D_DIM 1064 1019 if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE ) 1065 #if H_3D_DIM_SDC1066 #if QC_GENERIC_SDC_G01221067 if( 1 ) // This should be cleaned up.1068 #else1069 if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )1070 #endif1071 #endif1072 1020 { 1073 1021 #endif … … 1171 1119 } 1172 1120 1173 #if !QC_SDC_UNIFY_G01301174 if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )1175 {1176 UInt symbol;1177 #if QC_GENERIC_SDC_G01221178 UInt uiNumSegments = isDimMode( dir ) ? 2 : 1;1179 #else1180 UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2;1181 #endif1182 1183 if( pcCU->getSDCFlag( absPartIdx ) )1184 {1185 assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N);1186 pcCU->setTrIdxSubParts(0, absPartIdx, depth);1187 pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth);1188 }1189 1190 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) );1191 1192 if( symbol )1193 {1194 if( !pcCU->getSDCFlag( absPartIdx ) )1195 {1196 dir += symbol;1197 }1198 }1199 for( UInt segment = 0; segment < uiNumSegments; segment++ )1200 {1201 Pel valDeltaDC = 0;1202 if( symbol )1203 {1204 xParseDimDeltaDC( valDeltaDC, uiNumSegments );1205 }1206 1207 if( pcCU->getSDCFlag( absPartIdx ) )1208 {1209 pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx );1210 }1211 else1212 {1213 pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC );1214 }1215 }1216 }1217 #endif1218 1121 pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth ); 1219 1122 } 1220 1123 1221 #if QC_GENERIC_SDC_G01221222 1124 Void TDecSbac::parseIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) 1223 1125 { … … 1234 1136 uiIsDimMode = uiSymbol ? 0 : 1; 1235 1137 pcCU->setLumaIntraDirSubParts( 0, absPartIdx, depth ); 1236 #if !QC_SDC_UNIFY_G0130 1237 if( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ) //SDC is allowed only in this case 1238 { 1239 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraSdcFlagSCModel.get( 0, 0, pcCU->getCtxSDCFlag( absPartIdx ) ) ); 1240 } 1241 else 1242 { 1243 uiSymbol = 0; 1244 } 1245 1246 pcCU->setSDCFlagSubParts( uiSymbol, absPartIdx, depth ); 1247 #endif 1138 1248 1139 //decode DMM index 1249 1140 if( uiIsDimMode ) … … 1260 1151 } 1261 1152 } 1262 #else1263 Void TDecSbac::parseIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx, UInt depth )1264 {1265 UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );1266 UInt dir = 0;1267 Bool sdcFlag = 0;1268 UInt symbol = 1;1269 UInt modeCode = 0 ;1270 UInt binNum = 0;1271 UInt ctxDepthMode = 0;1272 1273 if( puIdx == 2 )1274 {1275 {1276 ctxDepthMode = puIdx*3 + binNum;1277 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );1278 modeCode = (modeCode<<1) + symbol;1279 binNum++;1280 }1281 if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;}1282 else if( modeCode == 1 ) { dir = 0; sdcFlag = 0;}1283 }1284 else if( puIdx == 0 )1285 {1286 while( binNum < 1 && symbol )1287 {1288 ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);1289 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );1290 modeCode = (modeCode<<1) + symbol;1291 binNum++;1292 }1293 if( modeCode == 0 )1294 {1295 dir = 0;1296 sdcFlag = 0;1297 }1298 else if ( modeCode == 1 )1299 {1300 dir = (2*DMM1_IDX+DIM_OFFSET);1301 sdcFlag = 0;1302 }1303 }1304 else1305 {1306 while( binNum < 4 && symbol )1307 {1308 ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);1309 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );1310 modeCode = (modeCode<<1) + symbol;1311 binNum++;1312 }1313 if ( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;}1314 else if ( modeCode == 2 ) { dir = 5; sdcFlag = 0;}1315 else if ( modeCode == 6 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}1316 else if ( modeCode == 14 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}1317 else if ( modeCode == 15 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}1318 1319 }1320 pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );1321 #if H_3D_DIM_SDC1322 pcCU->setSDCFlagSubParts( sdcFlag, absPartIdx, depth );1323 #endif1324 }1325 #endif1326 1153 #endif 1327 1154 … … 2189 2016 if( 1 == uiW ) 2190 2017 { 2191 #if MTK_ARP_FLAG_CABAC_SIMP_G00612192 2018 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) ); 2193 #else2194 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 3 ) );2195 #endif2196 2019 uiW += ( 1 == uiCode ? 1 : 0 ); 2197 2020 } … … 2213 2036 { 2214 2037 UInt uiSymbol = 0; 2215 #if MTK_IC_FLAG_CABAC_SIMP_G00612216 2038 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) ); 2217 #else2218 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx );2219 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) );2220 #endif2221 2039 #if !H_MV_ENC_DEC_TRAC 2222 2040 DTRACE_CABAC_VL( g_nSymbolCounter++ ); … … 2236 2054 2237 2055 #if H_3D_INTER_SDC 2238 #if QC_SDC_UNIFY_G01302239 2056 Void TDecSbac::parseDeltaDC( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) 2240 2057 { … … 2267 2084 else 2268 2085 { 2269 #if SEC_INTER_SDC_G01012270 2086 uiNumSegments = 1; 2271 #else2272 PartSize cPartSize = pcCU->getPartitionSize( absPartIdx );2273 uiNumSegments = ( cPartSize == SIZE_2Nx2N ) ? 1 : ( cPartSize == SIZE_NxN ? 4 : 2 );2274 #endif2275 2087 symbol = 1; 2276 2088 } … … 2323 2135 } 2324 2136 } 2325 #else 2326 Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2327 { 2328 UInt uiSymbol = 0; 2329 UInt uiCtxInterSDCFlag = pcCU->getCtxInterSDCFlag( uiAbsPartIdx ); 2330 2331 m_pcTDecBinIf->decodeBin( uiSymbol, m_cInterSDCFlagSCModel.get( 0, 0, uiCtxInterSDCFlag ) ); 2332 2333 if( uiSymbol ) 2334 { 2335 pcCU->setInterSDCFlagSubParts( true, uiAbsPartIdx, 0, uiDepth ); 2336 pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth ); 2337 pcCU->setCbfSubParts( 1, 1, 1, uiAbsPartIdx, uiDepth ); 2338 } 2339 else 2340 { 2341 pcCU->setInterSDCFlagSubParts( false, uiAbsPartIdx, 0, uiDepth); 2342 } 2343 } 2344 2345 Void TDecSbac::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) 2346 { 2347 UInt uiAbsIdx = 0; 2348 UInt uiSign = 0; 2349 Int iIdx = 0; 2350 2351 xReadExGolombLevel( uiAbsIdx, m_cInterSDCResidualSCModel.get( 0, 0, 0 ) ); 2352 2353 uiAbsIdx++; 2354 m_pcTDecBinIf->decodeBin( uiSign, m_cInterSDCResidualSignFlagSCModel.get( 0, 0, 0 ) ); 2355 iIdx = (Int)( uiSign ? -1 : 1 ) * uiAbsIdx; 2356 2357 pcCU->setInterSDCSegmentDCOffset( iIdx, uiSegment, uiAbsPartIdx ); 2358 } 2359 #endif 2137 2360 2138 #endif 2361 2139 -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r872 r884 112 112 #endif 113 113 #if H_3D_INTER_SDC 114 #if QC_SDC_UNIFY_G0130115 114 Void parseDeltaDC ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ); 116 115 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 117 #else118 Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );119 Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );120 #endif121 116 #endif 122 117 #if H_3D_DBBP … … 218 213 ContextModel3DBuffer m_cDdcFlagSCModel; 219 214 ContextModel3DBuffer m_cDdcDataSCModel; 220 #if QC_GENERIC_SDC_G0122221 215 ContextModel3DBuffer m_cAngleFlagSCModel; 222 #if !QC_SDC_UNIFY_G0130223 ContextModel3DBuffer m_cIntraSdcFlagSCModel;224 #endif225 #endif226 216 #if H_3D_DIM_DMM 227 217 ContextModel3DBuffer m_cDmm1DataSCModel; … … 232 222 #endif 233 223 #endif 234 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 235 ContextModel3DBuffer m_cInterSDCFlagSCModel; 236 ContextModel3DBuffer m_cInterSDCResidualSCModel; 237 ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel; 238 #endif 239 #if QC_SDC_UNIFY_G0130 224 #if H_3D_DIM_SDC 240 225 ContextModel3DBuffer m_cSDCFlagSCModel; 241 226 #endif -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r872 r884 51 51 m_aaiCodedOffset = new Int* [ MAX_NUM_LAYERS ]; 52 52 m_aaiCodedScale = new Int* [ MAX_NUM_LAYERS ]; 53 #if !FIX_CAM_PARS_COLLECTOR54 m_aiViewId = new Int [ MAX_NUM_LAYERS ];55 56 m_bViewReceived = new Bool [ MAX_NUM_LAYERS ];57 #endif58 53 for( UInt uiId = 0; uiId < MAX_NUM_LAYERS; uiId++ ) 59 54 { … … 65 60 m_iLog2Precision = LOG2_DISP_PREC_LUT; 66 61 m_uiBitDepthForLUT = 8; // fixed 67 #if FIX_CAM_PARS_COLLECTOR68 62 m_receivedIdc = NULL; 69 63 m_vps = NULL; 70 #endif71 64 } 72 65 … … 80 73 delete [] m_aaiCodedOffset; 81 74 delete [] m_aaiCodedScale; 82 #if !FIX_CAM_PARS_COLLECTOR83 delete [] m_aiViewId;84 delete [] m_bViewReceived;85 #endif86 75 87 76 xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 88 77 xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 89 #if FIX_CAM_PARS_COLLECTOR90 78 xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 ); 91 #endif 92 } 93 94 95 #if FIX_CAM_PARS_COLLECTOR 79 } 80 81 96 82 Void 97 83 CamParsCollector::init( FILE* pCodedScaleOffsetFile, TComVPS* vps) … … 159 145 } 160 146 } 161 #else162 Void163 CamParsCollector::init( FILE* pCodedScaleOffsetFile )164 {165 m_bInitialized = true;166 m_pCodedScaleOffsetFile = pCodedScaleOffsetFile;167 m_uiCamParsCodedPrecision = 0;168 m_bCamParsVaryOverTime = false;169 m_iLastViewIndex = -1;170 m_iLastPOC = -1;171 m_uiMaxViewIndex = 0;172 }173 #endif174 175 147 176 148 … … 206 178 CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT) 207 179 { 208 #if FIX_CAM_PARS_COLLECTOR209 180 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 210 #else211 Int iLog2DivLuma = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 );212 #endif213 181 Int iLog2DivChroma = iLog2DivLuma + 1; 214 182 … … 252 220 } 253 221 254 #if !FIX_CAM_PARS_COLLECTOR255 Void256 CamParsCollector::setSlice( TComSlice* pcSlice )257 {258 259 if( pcSlice == 0 )260 {261 AOF( xIsComplete() );262 if( m_bCamParsVaryOverTime || m_iLastPOC == 0 )263 {264 xOutput( m_iLastPOC );265 }266 return;267 }268 269 if ( pcSlice->getIsDepth())270 {271 return;272 }273 274 Bool bFirstAU = ( pcSlice->getPOC() == 0 );275 Bool bFirstSliceInAU = ( pcSlice->getPOC() != Int ( m_iLastPOC ) );276 Bool bFirstSliceInView = ( pcSlice->getViewIndex() != UInt( m_iLastViewIndex ) || bFirstSliceInAU );277 278 AOT( bFirstSliceInAU && pcSlice->getViewIndex() != 0 );279 AOT( !bFirstSliceInAU && pcSlice->getViewIndex() < UInt( m_iLastViewIndex ) );280 281 AOT( !bFirstSliceInAU && pcSlice->getViewIndex() > UInt( m_iLastViewIndex + 1 ) );282 283 AOT( !bFirstAU && pcSlice->getViewIndex() > m_uiMaxViewIndex );284 285 if ( !bFirstSliceInView )286 {287 if( m_bCamParsVaryOverTime ) // check consistency of slice parameters here288 {289 UInt uiViewIndex = pcSlice->getViewIndex();290 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )291 {292 AOF( m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedScale () [ uiBaseViewIndex ] );293 AOF( m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedOffset () [ uiBaseViewIndex ] );294 AOF( m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedScale () [ uiBaseViewIndex ] );295 AOF( m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedOffset() [ uiBaseViewIndex ] );296 }297 }298 return;299 }300 301 if( bFirstSliceInAU )302 {303 if( !bFirstAU )304 {305 AOF( xIsComplete() );306 xOutput( m_iLastPOC );307 }308 ::memset( m_bViewReceived, false, MAX_NUM_LAYERS * sizeof( Bool ) );309 }310 311 UInt uiViewIndex = pcSlice->getViewIndex();312 m_bViewReceived[ uiViewIndex ] = true;313 if( bFirstAU )314 {315 m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, uiViewIndex );316 m_aiViewId[ uiViewIndex ] = pcSlice->getViewId();317 318 if( uiViewIndex == 1 )319 {320 m_uiCamParsCodedPrecision = pcSlice->getVPS()->getCamParPrecision ();321 m_bCamParsVaryOverTime = pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex );322 }323 else if( uiViewIndex > 1 )324 {325 AOF( m_uiCamParsCodedPrecision == pcSlice->getVPS()->getCamParPrecision () );326 AOF( m_bCamParsVaryOverTime == pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ) );327 }328 329 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )330 {331 if( m_bCamParsVaryOverTime )332 {333 m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ] = pcSlice->getCodedScale () [ uiBaseIndex ];334 m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ] = pcSlice->getCodedOffset () [ uiBaseIndex ];335 m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ] = pcSlice->getInvCodedScale () [ uiBaseIndex ];336 m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ] = pcSlice->getInvCodedOffset() [ uiBaseIndex ];337 xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);338 xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);339 }340 else341 {342 m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ] = pcSlice->getVPS()->getCodedScale (uiViewIndex) [ uiBaseIndex ];343 m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ] = pcSlice->getVPS()->getCodedOffset (uiViewIndex) [ uiBaseIndex ];344 m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ] = pcSlice->getVPS()->getInvCodedScale (uiViewIndex) [ uiBaseIndex ];345 m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ] = pcSlice->getVPS()->getInvCodedOffset(uiViewIndex) [ uiBaseIndex ];346 xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );347 xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );348 }349 }350 }351 else352 {353 AOF( m_aiViewId[ uiViewIndex ] == pcSlice->getViewId() );354 if( m_bCamParsVaryOverTime )355 {356 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )357 {358 m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ] = pcSlice->getCodedScale () [ uiBaseIndex ];359 m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ] = pcSlice->getCodedOffset () [ uiBaseIndex ];360 m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ] = pcSlice->getInvCodedScale () [ uiBaseIndex ];361 m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ] = pcSlice->getInvCodedOffset() [ uiBaseIndex ];362 363 xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );364 xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );365 }366 }367 }368 369 m_iLastViewIndex = (Int)pcSlice->getViewIndex();370 m_iLastPOC = (Int)pcSlice->getPOC();371 }372 373 #else374 222 Void 375 223 CamParsCollector::setSlice( TComSlice* pcSlice ) … … 440 288 } 441 289 } 442 #endif443 290 444 291 … … 454 301 #endif 455 302 456 #if !FIX_CAM_PARS_COLLECTOR457 Bool458 CamParsCollector::xIsComplete()459 {460 for( UInt uiView = 0; uiView <= m_uiMaxViewIndex; uiView++ )461 {462 if( m_bViewReceived[ uiView ] == 0 )463 {464 return false;465 }466 }467 return true;468 }469 #endif470 303 471 304 Void … … 474 307 if( m_pCodedScaleOffsetFile ) 475 308 { 476 #if FIX_CAM_PARS_COLLECTOR477 309 if( iPOC == m_firstReceivedPoc ) 478 #else479 if( iPOC == 0 )480 #endif481 310 { 482 311 fprintf( m_pCodedScaleOffsetFile, "# ViewIndex ViewId\n" ); 483 312 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" ); 484 #if FIX_CAM_PARS_COLLECTOR485 313 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ ) 486 314 { 487 315 fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) ); 488 #else489 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )490 {491 fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_aiViewId[ uiViewIndex ] );492 #endif493 316 } 494 317 fprintf( m_pCodedScaleOffsetFile, "\n\n"); … … 496 319 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" ); 497 320 } 498 #if FIX_CAM_PARS_COLLECTOR499 321 if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime ) 500 #else501 if( iPOC == 0 || m_bCamParsVaryOverTime )502 #endif503 322 { 504 323 Int iS = iPOC; … … 510 329 if( uiViewIndex != uiBaseIndex ) 511 330 { 512 #if FIX_CAM_PARS_COLLECTOR513 331 if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 ) 514 332 { … … 516 334 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() ); 517 335 } 518 #else519 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",520 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_uiCamParsCodedPrecision );521 #endif522 523 336 } 524 337 } … … 641 454 for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++) 642 455 { 643 #if H_MV _HLS_7_SPS_P0155_16_32456 #if H_MV 644 457 numReorderPics[temporalLayer] = ( getLayerId() == 0 ) ? pcSlice->getSPS()->getNumReorderPics(temporalLayer) : pcSlice->getVPS()->getNumReorderPics(temporalLayer); 645 458 #else … … 647 460 #endif 648 461 } 649 #if H_MV _HLS_7_SPS_P0155_16_32462 #if H_MV 650 463 if ( getLayerId() == 0 ) 651 464 { -
trunk/source/Lib/TLibDecoder/TDecTop.h
r872 r884 71 71 ~CamParsCollector (); 72 72 73 #if FIX_CAM_PARS_COLLECTOR74 73 Void init ( FILE* pCodedScaleOffsetFile, TComVPS* vps ); 75 #else76 Void init ( FILE* pCodedScaleOffsetFile );77 #endif78 74 79 75 Void uninit (); … … 87 83 #endif 88 84 89 #if MTK_DDD_G006385 #if H_3D_DDD 90 86 Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];} 91 87 Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];} … … 94 90 95 91 private: 96 #if FIX_CAM_PARS_COLLECTOR97 92 Void xResetReceivedIdc( Bool overWriteFlag ); 98 #else99 Bool xIsComplete ();100 #endif101 93 Void xOutput ( Int iPOC ); 102 94 … … 108 100 Int** m_aaiCodedScale; 109 101 110 #if !FIX_CAM_PARS_COLLECTOR111 Int* m_aiViewId;112 #else113 102 TComVPS* m_vps; 114 103 Int** m_receivedIdc; … … 116 105 Int m_lastPoc; 117 106 Int m_firstReceivedPoc; 118 #endif 119 120 121 #if !FIX_CAM_PARS_COLLECTOR 122 Bool* m_bViewReceived; 123 UInt m_uiCamParsCodedPrecision; 124 #endif 107 108 125 109 Bool m_bCamParsVaryOverTime; 126 #if !FIX_CAM_PARS_COLLECTOR127 Int m_iLastViewIndex;128 Int m_iLastPOC;129 UInt m_uiMaxViewIndex;130 #endif131 132 110 133 111 UInt m_uiBitDepthForLUT; -
trunk/source/Lib/TLibEncoder/NALwrite.cpp
r872 r884 91 91 vector<uint8_t>& rbsp = nalu.m_Bitstream.getFIFO(); 92 92 93 #if H_MV _HLS_7_MISC_P0130_EOS// This will handle situation when writing NAL with zero payload93 #if H_MV // This will handle situation when writing NAL with zero payload 94 94 if (rbsp.size() == 0) return; 95 95 #endif -
trunk/source/Lib/TLibEncoder/SEIwrite.cpp
r872 r884 93 93 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 94 94 break; 95 #if H_MV _HLS_7_SEI_P0204_2695 #if H_MV 96 96 case SEI::SUB_BITSTREAM_PROPERTY: 97 97 fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n"); … … 151 151 xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps); 152 152 break; 153 #if H_MV _HLS_7_SEI_P0204_26153 #if H_MV 154 154 case SEI::SUB_BITSTREAM_PROPERTY: 155 155 xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei)); … … 589 589 } 590 590 591 #if H_MV _HLS_7_SEI_P0204_26591 #if H_MV 592 592 Void SEIWriter::xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei) 593 593 { -
trunk/source/Lib/TLibEncoder/SEIwrite.h
r872 r884 66 66 Void xWriteSEISOPDescription(const SEISOPDescription& sei); 67 67 Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps); 68 #if H_MV _HLS_7_SEI_P0204_2668 #if H_MV 69 69 Void xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei); 70 70 #endif -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r872 r884 272 272 WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag"); 273 273 274 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION275 274 #if !H_MV 276 275 WRITE_FLAG( 0, "pps_extension_flag" ); … … 290 289 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) ) 291 290 { 292 #if H_MV_HLS_7_POC_P0041293 291 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" ); 294 #endif295 292 } 296 293 … … 303 300 304 301 #endif 305 #else 306 #if !H_3D 307 WRITE_FLAG( 0, "pps_extension_flag" ); 308 #else 309 WRITE_FLAG( 1, "pps_extension_flag" ); 310 codePPSExtension( pcPPS ); 311 WRITE_FLAG( 0, "pps_extension2_flag" ); 312 #endif 313 #endif 302 314 303 } 315 304 … … 725 714 #endif 726 715 WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" ); 727 #if H_MV _HLS_7_SPS_P0155_16_32716 #if H_MV 728 717 if ( pcSPS->getLayerId() == 0 ) 729 718 { … … 741 730 } 742 731 } 743 #if H_MV _HLS_7_SPS_P0155_16_32732 #if H_MV 744 733 } 745 734 #endif … … 871 860 WRITE_SVLC( pcSPS->getScaledRefLayerRightOffset( j ), "scaled_ref_layer_right_offset" ); 872 861 WRITE_SVLC( pcSPS->getScaledRefLayerBottomOffset( j ), "scaled_ref_layer_bottom_offset" ); 873 #if H_MV_HLS_7_RESERVED_FLAGS874 862 WRITE_FLAG( 0, "sps_multilayer_ext_reserved_zero_flag[ j ]" ); 875 #endif876 863 } 877 864 } … … 904 891 WRITE_FLAG( pcVPS->getTemporalNestingFlag(), "vps_temporal_id_nesting_flag" ); 905 892 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 906 #if H_MV_HLS_7_VPS_P0125_24907 893 WRITE_CODE( 0xffff, 16, "vps_reserved_ffff_16bits" ); 908 #else909 #if H_MV && !H_MV_HLS7_GEN910 WRITE_CODE( 0xffff, 16, "vps_extension_offset" );911 #else912 WRITE_CODE( 0xffff, 16, "vps_reserved_ffff_16bits" );913 #endif914 #endif915 894 codePTL( pcVPS->getPTL(), true, pcVPS->getMaxTLayers() - 1 ); 916 895 const Bool subLayerOrderingInfoPresentFlag = 1; … … 1010 989 { 1011 990 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 1012 #if !H_MV_HLS_7_VPS_P0307_231013 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );1014 if ( pcVPS->getVpsVuiPresentFlag() )1015 {1016 WRITE_CODE( pcVPS->getVpsVuiOffset( ), 16, "vps_vui_offset" ); // TBD1017 }1018 #endif1019 1020 991 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 1021 992 1022 993 for( Int type = 0; type < MAX_NUM_SCALABILITY_TYPES; type++ ) 1023 994 { … … 1042 1013 { 1043 1014 WRITE_CODE( pcVPS->getLayerIdInNuh( i ), 6, "layer_id_in_nuh[i]"); 1044 }1015 } 1045 1016 else 1046 1017 { 1047 1018 assert( pcVPS->getLayerIdInNuh( i ) == i ); 1048 }1019 } 1049 1020 1050 1021 assert( pcVPS->getLayerIdInVps( pcVPS->getLayerIdInNuh( i ) ) == i ); … … 1064 1035 1065 1036 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1037 WRITE_CODE( pcVPS->getViewIdLen( ), 4, "view_id_len" ); 1038 1039 if ( pcVPS->getViewIdLen( ) > 0 ) 1040 { 1041 for( Int i = 0; i < pcVPS->getNumViews(); i++ ) 1042 { 1043 WRITE_CODE( pcVPS->getViewIdVal( i ), pcVPS->getViewIdLen( ), "view_id_val[i]" ); 1044 } 1045 } 1046 else 1047 { 1048 for( Int i = 0; i < pcVPS->getNumViews(); i++ ) 1049 { 1050 assert( pcVPS->getViewIdVal( i ) == 0 ); 1051 } 1052 } 1082 1053 1083 1054 … … 1122 1093 1123 1094 WRITE_FLAG( pcVPS->getAllRefLayersActiveFlag( ) ? 1 : 0 , "all_ref_layers_active_flag" ); 1124 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271125 WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( ) , 10, "vps_number_layer_sets_minus1" );1126 #endif1127 1128 #if !H_MV_HLS_7_VPS_P0306_221129 WRITE_CODE( pcVPS->getVpsNumProfileTierLevelMinus1( ), 6, "vps_num_profile_tier_level_minus1" );1130 #else1131 1095 WRITE_UVLC( pcVPS->getVpsNumProfileTierLevelMinus1( ), "vps_num_profile_tier_level_minus1" ); 1132 #endif1133 1096 1134 1097 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1135 1098 { 1136 1099 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" ); 1137 #if !H_MV_HLS_7_VPS_P0048_141138 if( !pcVPS->getVpsProfilePresentFlag( i ) )1139 {1140 WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" );1141 pcVPS->checkProfileRefMinus1( i );1142 }1143 #endif1144 1100 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 1145 1101 } 1146 1102 1147 1148 1149 1150 1151 1152 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271153 1103 WRITE_UVLC( pcVPS->getNumAddOutputLayerSets( ), "num_add_output_layer_sets" ); 1154 1104 … … 1157 1107 WRITE_CODE( pcVPS->getDefaultTargetOutputLayerIdc( ), 2, "default_target_output_layer_idc" ); 1158 1108 } 1159 #else 1160 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 1161 1162 WRITE_FLAG( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" ); 1163 1164 if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ) 1165 { 1166 WRITE_CODE( pcVPS->getNumAddOutputLayerSetsMinus1( ) , 10, "num_add_output_layer_sets_minus1" ); 1167 numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1 ); 1168 } 1169 1170 if( numOutputLayerSets > 1) 1171 { 1172 WRITE_CODE( pcVPS->getDefaultOneTargetOutputLayerIdc( ), 2, "default_one_target_output_layer_idc" ); 1173 pcVPS->checkDefaultOneTargetOutputLayerIdc(); 1174 } 1175 #endif 1109 1176 1110 1177 1111 assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 )); 1178 1112 assert( pcVPS->getOutputLayerSetIdxMinus1( 0 ) == -1 ); 1179 1113 1180 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271181 1182 1114 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1183 1115 { 1184 1116 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1185 #else1186 for( Int i = 1; i < numOutputLayerSets; i++ )1187 {1188 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )1189 #endif1190 1117 { 1191 1118 WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ), "output_layer_set_idx_minus1[i]" ); 1192 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271193 1119 } 1194 1120 … … 1208 1134 } 1209 1135 1210 #else1211 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ )1212 {1213 WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" );1214 }1215 }1216 else1217 { // These inference rules would also be helpful in spec text1218 assert( pcVPS->getOutputLayerSetIdxMinus1(i ) == i - 1 );1219 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )1220 {1221 assert( pcVPS->getOutputLayerFlag( i , j ) == pcVPS->inferOutputLayerFlag( i, j ));1222 }1223 }1224 #endif1225 1136 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1226 1137 { 1227 1138 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" ); 1228 1139 } 1229 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271230 1140 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1231 1141 { … … 1233 1143 } 1234 1144 } 1235 #else1236 }1237 1238 if( pcVPS->getMaxLayersMinus1() > 0 )1239 {1240 WRITE_FLAG( pcVPS->getAltOutputLayerFlag( ) ? 1 : 0 , "alt_output_layer_flag" );1241 }1242 #endif1243 1244 1245 1246 1247 1145 1248 1146 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); 1249 1147 if ( pcVPS->getRepFormatIdxPresentFlag() ) 1250 1148 { 1251 #if H_MV_HLS_7_VPS_P0306_221252 1149 WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" ); 1253 #else1254 WRITE_CODE( pcVPS->getVpsNumRepFormatsMinus1( ), 4, "vps_num_rep_formats_minus1" );1255 #endif1256 1150 } 1257 1151 … … 1269 1163 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1270 1164 { 1271 #if H_MV_HLS_7_VPS_P0306_221272 1165 WRITE_CODE( pcVPS->getVpsRepFormatIdx(i), pcVPS->getVpsRepFormatIdxLen(), "vps_rep_format_idx[i]" ); 1273 #else1274 WRITE_CODE( pcVPS->getVpsRepFormatIdx( i ), 8, "vps_rep_format_idx" );1275 #endif1276 1166 } 1277 1167 } … … 1289 1179 } 1290 1180 } 1291 #if H_MV_HLS_7_RESERVED_FLAGS1292 1181 WRITE_FLAG( 0, "vps_reserved_zero_flag" ); 1293 #endif1294 1182 codeDpbSize( pcVPS ); 1295 1183 … … 1321 1209 } 1322 1210 } 1323 #if H_MV_HLS_7_VPS_P0307_231324 1211 WRITE_UVLC( 0, "vps_non_vui_extension_length" ); 1325 1212 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 1326 #endif 1327 #if !H_MV_HLS_7_RESERVED_FLAGS 1328 WRITE_FLAG ( 0, "vps_shvc_reserved_zero_flag" ); 1329 #endif 1330 if( pcVPS->getVpsVuiPresentFlag() ) 1331 { 1332 m_pcBitIf->writeAlignOne(); // vps_vui_alignment_bit_equal_to_one 1333 codeVPSVUI( pcVPS ); 1334 } 1335 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1336 { 1337 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 1338 assert( pcVPSVUI ); 1339 pcVPSVUI->inferVpsVui( true ); 1340 } 1341 #endif 1342 } 1213 if( pcVPS->getVpsVuiPresentFlag() ) 1214 { 1215 m_pcBitIf->writeAlignOne(); // vps_vui_alignment_bit_equal_to_one 1216 codeVPSVUI( pcVPS ); 1217 } 1218 { 1219 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 1220 assert( pcVPSVUI ); 1221 pcVPSVUI->inferVpsVui( true ); 1222 } 1223 } 1224 1343 1225 Void TEncCavlc::codeVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) 1344 1226 { … … 1359 1241 { 1360 1242 WRITE_FLAG( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ? 1 : 0 , "sub_layer_flag_info_present_flag" ); 1361 #if H_MV_HLS_7_HRD_P0156_71362 1243 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1363 #else1364 for( Int j = 0; j <= vps->getMaxTLayers() - 1 ; j++ )1365 #endif1366 1244 { 1367 1245 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1371 1249 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1372 1250 { 1373 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271374 1251 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1375 #else1376 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) // Preliminary fix does not match with spec1377 #endif1378 1252 { 1379 1253 WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" ); … … 1395 1269 if ( j > 0 ) 1396 1270 { 1397 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271398 1271 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ ) 1399 #else1400 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )1401 #endif1402 1272 { 1403 1273 assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); … … 1451 1321 WRITE_FLAG( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" ); 1452 1322 } 1453 #if H_MV_HLS_7_MISC_P0068_211454 1323 if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ) 1455 1324 { 1456 1325 WRITE_FLAG( pcVPSVUI->getAllLayersIdrAlignedFlag( ) ? 1 : 0 , "all_layers_idr_aligned_flag" ); 1457 1326 } 1458 #endif1459 1327 WRITE_FLAG( pcVPSVUI->getBitRatePresentVpsFlag( ) ? 1 : 0 , "bit_rate_present_vps_flag" ); 1460 1328 WRITE_FLAG( pcVPSVUI->getPicRatePresentVpsFlag( ) ? 1 : 0 , "pic_rate_present_vps_flag" ); 1461 1329 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1462 1330 { 1463 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271464 1331 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1465 #else1466 for( Int i = 0; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ )1467 #endif1468 1332 { 1469 1333 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) … … 1491 1355 } 1492 1356 1493 #if H_MV_HLS_7_VPS_P0076_151494 1357 WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" ); 1495 1358 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1525 1388 } 1526 1389 } 1527 #endif1528 1390 WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" ); 1529 1391 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1560 1422 } 1561 1423 } 1562 #if H_MV_HLS_7_RESERVED_FLAGS1563 1424 WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" ); 1564 #endif1565 1425 WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1566 1426 … … 1584 1444 } 1585 1445 1586 #if !H_MV_HLS_7_VPS_P0076_15 1587 WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" ); 1588 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) 1589 { 1590 WRITE_CODE( pcVPSVUI->getVpsNumVideoSignalInfoMinus1( ), 4, "vps_num_video_signal_info_minus1" ); 1591 } 1592 else 1593 { 1594 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 1595 } 1596 1597 for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ ) 1598 { 1599 assert( pcVPSVUI->getVideoSignalInfo( i ) != NULL ); 1600 TComVideoSignalInfo* curVideoSignalInfo = pcVPSVUI->getVideoSignalInfo( i ); 1601 codeVideoSignalInfo( curVideoSignalInfo ); 1602 } 1603 1604 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1605 { 1606 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1607 { 1608 WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" ); 1609 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() ); 1610 } 1611 } 1612 else 1613 { 1614 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1615 { 1616 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) ); 1617 } 1618 } 1619 #endif 1446 1620 1447 WRITE_FLAG( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ? 1 : 0 , "vps_vui_bsp_hrd_present_flag" ); 1621 1448 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1623 1450 codeVpsVuiBspHrdParameters( pcVPS ); 1624 1451 } 1625 #if H_MV_HLS_7_MISC_P0182_131626 1452 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1627 1453 { … … 1630 1456 WRITE_FLAG( pcVPSVUI->getBaseLayerParameterSetCompatibilityFlag( i ) ? 1 : 0 , "base_layer_parameter_set_compatibility_flag" ); 1631 1457 } 1632 } 1633 #endif 1458 } 1634 1459 } 1635 1460 … … 1705 1530 WRITE_FLAG( pcVPS->getIvMvPredFlag ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]"); 1706 1531 #if H_3D_SPIVMP 1707 #if SEC_SPIVMP_MCP_SIZE_G00771708 1532 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]"); 1709 #else1710 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-2, "log2_sub_PU_size_minus2[i]");1711 #endif1712 1533 #endif 1713 1534 #endif … … 1734 1555 if (i!=1) 1735 1556 { 1736 #if SEC_SPIVMP_MCP_SIZE_G00771737 1557 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]"); 1738 #else1739 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-2, "log2_sub_PU_size_minus2[i]");1740 #endif1741 1558 } 1742 1559 #endif … … 1771 1588 } 1772 1589 } 1773 #if QC_SPIVMP_MPI_G01191774 1590 WRITE_UVLC( pcVPS->getSubPUMPILog2Size( ) - 3, "log2_sub_PU_MPI_size_minus3"); 1775 #endif1776 1591 #if H_3D_TMVP 1777 1592 WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 , "iv_mv_scaling_flag" ); … … 2235 2050 #endif 2236 2051 2237 #if !H_MV_HLS_7_POC_P0041 2238 #if PPS_FIX_DEPTH 2239 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag() || pcSlice->getIsDepth() ) 2240 #else 2241 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) 2242 #endif 2243 { 2244 WRITE_UVLC(0,"slice_header_extension_length"); 2245 } 2246 #endif 2247 2248 #if H_MV_HLS_7_POC_P0041 2052 2249 2053 #if !H_MV 2250 2054 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) … … 2354 2158 } 2355 2159 #endif 2356 #endif2357 2160 } 2358 2161 … … 2824 2627 2825 2628 #if H_3D_INTER_SDC 2826 #if QC_SDC_UNIFY_G01302827 2629 Void TEncCavlc::codeDeltaDC( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2828 2630 { … … 2834 2636 assert(0); 2835 2637 } 2836 #else 2837 Void TEncCavlc::codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2838 { 2839 assert(0); 2840 } 2841 2842 Void TEncCavlc::codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) 2843 { 2844 assert(0); 2845 } 2846 #endif 2638 2847 2639 #endif 2848 2640 -
trunk/source/Lib/TLibEncoder/TEncCavlc.h
r872 r884 133 133 #endif 134 134 #if H_3D_INTER_SDC 135 #if QC_SDC_UNIFY_G0130136 135 Void codeDeltaDC ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 137 136 Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 138 #else139 Void codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx );140 Void codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );141 #endif142 137 #endif 143 138 #if H_3D_DBBP -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r872 r884 347 347 348 348 Bool m_useStrongIntraSmoothing; ///< enable the use of strong intra smoothing (bi_linear interpolation) for 32x32 blocks when reference samples are flat. 349 #if H_MV _HLS_7_SEI_P0204_26349 #if H_MV 350 350 Bool m_subBistreamPropSEIEnabled; 351 351 Int m_numAdditionalSubStreams; … … 397 397 #if H_3D_SPIVMP 398 398 Int m_iSubPULog2Size; 399 #endif400 #if QC_SPIVMP_MPI_G0119401 399 Int m_iSubPUMPILog2Size; 402 400 #endif … … 507 505 Int getSubPULog2Size () { return m_iSubPULog2Size;} 508 506 Void setSubPULog2Size (Int u) { m_iSubPULog2Size = u; } 509 #endif510 #if QC_SPIVMP_MPI_G0119511 507 Int getSubPUMPILog2Size () { return m_iSubPUMPILog2Size;} 512 508 Void setSubPUMPILog2Size (Int u) { m_iSubPUMPILog2Size = u; } … … 789 785 Int getScalableNestingSEIEnabled() { return m_scalableNestingSEIEnabled; } 790 786 791 #if H_MV _HLS_7_SEI_P0204_26787 #if H_MV 792 788 Bool getSubBitstreamPropSEIEnabled() { return m_subBistreamPropSEIEnabled;} 793 789 Void setSubBitstreamPropSEIEnabled(Bool x) { m_subBistreamPropSEIEnabled = x;} -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r872 r884 547 547 bTryNx2N = false; 548 548 bTry2NxN = false; 549 #if MTK_TEX_DEP_PAR_G0055550 549 if( pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize(uiCUIdx) != SIZE_2Nx2N) 551 550 { … … 555 554 bTryNx2N = true; 556 555 } 557 #endif558 556 } 559 557 } … … 582 580 if (rpcTempCU->getSlice()->getIsDepth() ) 583 581 { 584 #if SEC_DEPTH_DV_DERIVAITON_G0074585 582 DvInfo.bDV = rpcTempCU->getDispforDepth(0, 0, &DvInfo); 586 #else587 DvInfo.bDV = rpcTempCU->getDispNeighBlocks(0, 0, &DvInfo);588 #endif589 583 } 590 584 else … … 1533 1527 #endif 1534 1528 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx ); 1535 #if !SEC_IC_ARP_SIG_G0072 1529 #if H_3D_ARP 1530 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1531 #endif 1536 1532 #if H_3D_IC 1537 1533 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx ); 1538 1534 #endif 1539 #endif1540 #if H_3D_ARP1541 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );1542 #endif1543 #if SEC_IC_ARP_SIG_G00721544 #if H_3D_IC1545 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx );1546 #endif1547 #endif1548 1535 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1549 1536 return; … … 1553 1540 m_pcEntropyCoder->encodePartSize( pcCU, uiAbsPartIdx, uiDepth ); 1554 1541 1555 #if QC_SDC_UNIFY_G01301542 #if H_3D_DIM_SDC 1556 1543 m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false ); 1557 1544 #endif … … 1570 1557 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 1571 1558 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1572 #if !SEC_IC_ARP_SIG_G0072 1559 1560 #if H_3D_ARP 1561 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1562 #endif 1573 1563 #if H_3D_IC 1574 1564 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx ); 1575 1565 #endif 1576 #endif1577 #if H_3D_ARP1578 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );1579 #endif1580 #if SEC_IC_ARP_SIG_G00721581 #if H_3D_IC1582 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx );1583 #endif1584 #endif1585 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G01301586 m_pcEntropyCoder->encodeInterSDCFlag( pcCU, uiAbsPartIdx, false );1587 #endif1588 1589 1566 // Encode Coefficients 1590 1567 Bool bCodeDQP = getdQPFlag(); … … 1809 1786 #if H_3D_ARP 1810 1787 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 1811 #if SEC_IC_ARP_SIG_G00721812 1788 if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV || bICFlag ) 1813 #else1814 if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV )1815 #endif1816 1789 { 1817 1790 nARPWMax = 0; … … 1821 1794 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM*sizeof(Int) ); 1822 1795 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level 1823 #if !UPDATE_HM131824 rpcTempCU->setCUTransquantBypassSubParts( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uhDepth );1825 #endif1826 1796 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1827 1797 #if H_3D_IC … … 1856 1826 #endif 1857 1827 1858 #if MTK_DDD_G00631828 #if H_3D_DDD 1859 1829 Int iDDDCand = rpcTempCU->getUseDDDCandIdx(); 1860 1830 UChar ucDDDepth = rpcTempCU->getDDTmpDepth(); … … 1895 1865 rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth ); 1896 1866 #endif 1897 #if MTK_DDD_G00631867 #if H_3D_DDD 1898 1868 if( rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewIndex() != 0 && iDDDCand == uiMergeCand ) 1899 1869 { … … 1925 1895 else 1926 1896 #endif 1927 #if NTT_STORE_SPDV_VSP_G01481928 1897 #if H_3D_VSP 1898 { 1929 1899 if ( vspFlag[uiMergeCand] ) 1930 1900 { … … 1959 1929 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 1960 1930 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 1961 #if NTT_STORE_SPDV_VSP_G01481931 #if H_3D_VSP 1962 1932 } 1963 1933 } … … 1992 1962 1993 1963 rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth ); 1994 #if NTT_STORE_SPDV_VSP_G0148// possible bug fix1964 #if H_3D_VSP // possible bug fix 1995 1965 if( rpcTempCU->getSkipFlag(0) ) 1996 1966 { … … 2007 1977 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual ) 2008 1978 { 2009 #if SEC_INTER_SDC_G01012010 1979 for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ ) 2011 1980 { … … 2039 2008 xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth ); 2040 2009 } 2041 #else2042 if( rpcTempCU != rpcTempCUPre )2043 {2044 rpcTempCU->initEstData( uhDepth, orgQP, bTransquantBypassFlag );2045 rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth );2046 }2047 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );2048 rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );2049 rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth );2050 #if H_3D_VSO //M22051 if( m_pcRdCost->getUseRenModel() )2052 { //Reset2053 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth ();2054 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight ();2055 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr ();2056 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride ();2057 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );2058 }2059 #endif2060 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU,2061 m_ppcOrigYuv[uhDepth],2062 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],2063 m_ppcResiYuvTemp[uhDepth],2064 m_ppcRecoYuvTemp[uhDepth],2065 uhDepth );2066 2067 xCheckDQP( rpcTempCU );2068 xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth );2069 #endif2070 2010 } 2071 2011 #endif … … 2142 2082 { 2143 2083 2144 #if UPDATE_HM132145 2084 #if H_3D 2146 2085 const Bool bTransquantBypassFlag = rpcTempCU->getCUTransquantBypass(0); 2147 #endif2148 2086 #endif 2149 2087 #if H_3D_FAST_TEXTURE_ENCODING … … 2157 2095 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 2158 2096 2159 #if SEC_IC_ARP_SIG_G00722160 2097 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV || rpcTempCU->getICFlag(0) ) 2161 #else2162 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV )2163 #endif2164 2098 { 2165 2099 nARPWMax = 0; … … 2170 2104 if( bFirstTime == false && rpcTempCU->getSlice()->getVPS()->getUseAdvRP( iLayerId ) ) 2171 2105 { 2172 #if UPDATE_HM132173 2106 rpcTempCU->initEstData( rpcTempCU->getDepth(0), rpcTempCU->getQP(0),bTransquantBypassFlag ); 2174 #else2175 rpcTempCU->initEstData( rpcTempCU->getDepth(0), rpcTempCU->getQP(0) );2176 #endif2177 2107 } 2178 2108 #endif … … 2194 2124 rpcTempCU->setPartSizeSubParts ( ePartSize, 0, uhDepth ); 2195 2125 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 2196 #if MTK_DDD_G00632126 #if H_3D_DDD 2197 2127 rpcTempCU->setUseDDD( false, 0, uhDepth ); 2198 2128 #endif … … 2256 2186 #endif 2257 2187 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false ); 2258 #if NTT_STORE_SPDV_VSP_G0148// possible bug fix2188 #if H_3D_VSP // possible bug fix 2259 2189 if( rpcTempCU->getQtRootCbf(0)==0 ) 2260 2190 { … … 2276 2206 xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth); 2277 2207 #if H_3D_INTER_SDC 2278 #if SEC_INTER_SDC_G0101 // ONLY_2NX2N_SDC2279 2208 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && ePartSize == SIZE_2Nx2N) 2280 #else 2281 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() ) 2282 #endif 2283 { 2284 #if SEC_INTER_SDC_G0101 2209 { 2285 2210 for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ ) 2286 2211 { … … 2288 2213 { 2289 2214 Int orgQP = rpcBestCU->getQP( 0 ); 2290 #if UPDATE_HM132291 2215 rpcTempCU->initEstData( uhDepth, orgQP ,bTransquantBypassFlag ); 2292 #else2293 rpcTempCU->initEstData( uhDepth, orgQP );2294 #endif2295 2216 rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth ); 2296 2217 } … … 2320 2241 xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth); 2321 2242 } 2322 #else 2323 if( rpcTempCU != rpcTempCUPre ) 2324 { 2325 Int orgQP = rpcBestCU->getQP( 0 ); 2326 rpcTempCU->initEstData( uhDepth, orgQP ); 2327 rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth ); 2328 } 2329 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2330 rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth ); 2331 rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth ); 2332 #if H_3D_VSO // M3 2333 if( m_pcRdCost->getUseRenModel() ) 2334 { 2335 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth ( ); 2336 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight( ); 2337 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr( ); 2338 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride(); 2339 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2340 } 2341 #endif 2342 2343 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 2344 m_ppcOrigYuv[uhDepth], 2345 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth], 2346 m_ppcResiYuvTemp[uhDepth], 2347 m_ppcRecoYuvTemp[uhDepth], 2348 uhDepth ); 2349 2350 xCheckDQP( rpcTempCU ); 2351 xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth); 2352 #endif 2243 2353 2244 } 2354 2245 #endif … … 2593 2484 m_pcEntropyCoder->encodePredMode( rpcTempCU, 0, true ); 2594 2485 m_pcEntropyCoder->encodePartSize( rpcTempCU, 0, uiDepth, true ); 2595 #if QC_SDC_UNIFY_G01302486 #if H_3D_DIM_SDC 2596 2487 m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true ); 2597 2488 #endif … … 2650 2541 m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0, true ); 2651 2542 m_pcEntropyCoder->encodePartSize ( rpcTempCU, 0, uiDepth, true ); 2652 #if QC_SDC_UNIFY_G01302543 #if H_3D_DIM_SDC 2653 2544 m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true ); 2654 2545 #endif -
trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
r872 r884 151 151 Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 152 152 { 153 #if SEC_IC_ARP_SIG_G0072154 153 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 ) 155 #else156 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )157 #endif158 154 { 159 155 return; … … 670 666 UInt uiLumaOffset = uiMinCoeffSize*uiAbsPartIdx; 671 667 UInt uiChromaOffset = uiLumaOffset>>2; 672 #if QC_SDC_UNIFY_G0130673 668 #if H_3D_DIM_SDC 674 669 if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx ) ) … … 680 675 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 681 676 } 682 #endif 683 684 #if H_3D_INTER_SDC 677 685 678 if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx ) ) 686 679 { … … 689 682 assert( pcCU->getSlice()->getIsDepth() ); 690 683 } 691 #endif 692 #if QC_SDC_UNIFY_G0130_FIX 684 693 685 if( pcCU->getSlice()->getIsDepth() && ( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) ) ) 694 #else695 if( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) )696 #endif697 686 { 698 687 Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1; … … 715 704 } 716 705 } 717 #else718 #if H_3D_DIM_SDC719 if( pcCU->getSDCFlag( uiAbsPartIdx ) )720 {721 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );722 assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );723 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );724 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );725 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );726 return;727 }728 #endif729 730 #if H_3D_INTER_SDC731 if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )732 {733 assert( !pcCU->isSkipped( uiAbsPartIdx ) );734 assert( !pcCU->isIntra( uiAbsPartIdx) );735 assert( pcCU->getSlice()->getIsDepth() );736 737 encodeInterSDCResidualData( pcCU, uiAbsPartIdx, false );738 return;739 }740 #endif741 706 #endif 742 707 … … 799 764 800 765 #if H_3D_INTER_SDC 801 #if QC_SDC_UNIFY_G0130802 766 Void TEncEntropy::encodeDeltaDC ( TComDataCU* pcCU, UInt absPartIdx ) 803 767 { … … 813 777 } 814 778 815 #if SEC_INTER_SDC_G0101816 779 if( !pcCU->getSlice()->getIsDepth() || pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N || pcCU->isSkipped( uiAbsPartIdx ) ) 817 #else 818 if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) ) 819 #endif 820 { 821 return; 822 } 823 824 #if SEC_INTER_SDC_G0101 780 { 781 return; 782 } 783 825 784 assert( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) ); 826 #else827 assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );828 #endif829 785 830 786 if( bRD ) … … 835 791 m_pcEntropyCoderIf->codeSDCFlag( pcCU, uiAbsPartIdx ); 836 792 } 837 #else 838 Void TEncEntropy::encodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 839 { 840 if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) 841 { 842 return; 843 } 844 845 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || pcCU->isSkipped( uiAbsPartIdx ) ) 846 { 847 return; 848 } 849 850 if( bRD ) 851 { 852 uiAbsPartIdx = 0; 853 } 854 855 m_pcEntropyCoderIf->codeInterSDCFlag( pcCU, uiAbsPartIdx ); 856 } 857 858 Void TEncEntropy::encodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 859 { 860 if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) 861 { 862 return; 863 } 864 865 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || !pcCU->getInterSDCFlag( uiAbsPartIdx ) ) 866 { 867 return; 868 } 869 870 if( bRD ) 871 { 872 uiAbsPartIdx = 0; 873 } 874 875 // number of segments depends on prediction mode for INTRA 876 UInt uiNumSegments = ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ? 1 : ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 ); 877 878 // encode residual data for each segment 879 for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ ) 880 { 881 m_pcEntropyCoderIf->codeInterSDCResidualData( pcCU, uiAbsPartIdx, uiSeg ); 882 } 883 } 884 #endif 793 885 794 #endif 886 795 #if H_3D_DBBP -
trunk/source/Lib/TLibEncoder/TEncEntropy.h
r872 r884 95 95 #endif 96 96 #if H_3D_INTER_SDC 97 #if QC_SDC_UNIFY_G013098 97 virtual Void codeDeltaDC ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 99 98 virtual Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 100 #else101 virtual Void codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;102 virtual Void codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) = 0;103 #endif104 99 #endif 105 100 #if H_3D_DBBP … … 190 185 #endif 191 186 #if H_3D_INTER_SDC 192 #if QC_SDC_UNIFY_G0130193 187 Void encodeDeltaDC ( TComDataCU* pcCU, UInt absPartIdx ); 194 188 Void encodeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 195 #else196 Void encodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );197 Void encodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD );198 #endif199 189 #endif 200 190 #if H_3D_DBBP -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r872 r884 296 296 } 297 297 298 #if H_MV _HLS_7_SEI_P0204_26298 #if H_MV 299 299 SEISubBitstreamProperty *TEncGOP::xCreateSEISubBitstreamProperty( TComSPS *sps) 300 300 { … … 365 365 delete sei; 366 366 } 367 #if H_MV _HLS_7_SEI_P0204_26367 #if H_MV 368 368 if( m_pcCfg->getSubBitstreamPropSEIEnabled() ) 369 369 { -
trunk/source/Lib/TLibEncoder/TEncGOP.h
r872 r884 212 212 213 213 SEIToneMappingInfo* xCreateSEIToneMappingInfo(); 214 #if H_MV _HLS_7_SEI_P0204_26214 #if H_MV 215 215 SEISubBitstreamProperty *xCreateSEISubBitstreamProperty( TComSPS *sps); 216 216 #endif -
trunk/source/Lib/TLibEncoder/TEncSbac.cpp
r872 r884 92 92 , m_cDdcFlagSCModel ( 1, 1, NUM_DDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 93 93 , m_cDdcDataSCModel ( 1, 1, NUM_DDC_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 94 #if QC_GENERIC_SDC_G012295 94 , m_cAngleFlagSCModel ( 1, 1, NUM_ANGLE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 96 #if !QC_SDC_UNIFY_G013097 , m_cIntraSdcFlagSCModel ( 1, 1, NUM_INTRASDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels)98 #endif99 #endif100 95 #if H_3D_DIM_DMM 101 96 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 106 101 #endif 107 102 #endif 108 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 109 , m_cInterSDCFlagSCModel ( 1, 1, NUM_INTER_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 110 , m_cInterSDCResidualSCModel ( 1, 1, NUM_INTER_SDC_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 111 , m_cInterSDCResidualSignFlagSCModel ( 1, 1, NUM_INTER_SDC_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 112 #endif 113 #if QC_SDC_UNIFY_G0130 103 #if H_3D_DIM_SDC 114 104 , m_cSDCFlagSCModel ( 1, 1, NUM_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 115 105 #endif … … 178 168 m_cDdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG ); 179 169 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 180 #if QC_GENERIC_SDC_G0122181 170 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 182 #if !QC_SDC_UNIFY_G0130183 m_cIntraSdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG );184 #endif185 #endif186 171 #if H_3D_DIM_DMM 187 172 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); … … 192 177 #endif 193 178 #endif 194 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 195 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 196 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 197 m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 198 #endif 199 #if QC_SDC_UNIFY_G0130 179 #if H_3D_DIM_SDC 200 180 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 201 181 #endif … … 240 220 curCost += m_cCUICFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_IC_FLAG ); 241 221 #endif 242 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 243 curCost += m_cInterSDCFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_INTER_SDC_FLAG ); 244 curCost += m_cInterSDCResidualSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 245 curCost += m_cInterSDCResidualSignFlagSCModel.calcCost( curSliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 246 #endif 247 #if QC_SDC_UNIFY_G0130 222 #if H_3D_DIM_SDC 248 223 curCost += m_cSDCFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SDC_FLAG ); 249 224 #endif … … 279 254 curCost += m_cDdcFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DDC_FLAG ); 280 255 curCost += m_cDdcDataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DDC_DATA ); 281 #if QC_GENERIC_SDC_G0122282 256 curCost += m_cAngleFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 283 #if !QC_SDC_UNIFY_G0130284 curCost += m_cIntraSdcFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_INTRASDC_FLAG );285 #endif286 #endif287 257 #if H_3D_DIM_DMM 288 258 curCost += m_cDmm1DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM1_DATA ); … … 348 318 m_cDdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG ); 349 319 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 350 #if QC_GENERIC_SDC_G0122351 320 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 352 #if !QC_SDC_UNIFY_G0130353 m_cIntraSdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG );354 #endif355 #endif356 321 #if H_3D_DIM_DMM 357 322 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); … … 362 327 #endif 363 328 #endif 364 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 365 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 366 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 367 m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 368 #endif 369 #if QC_SDC_UNIFY_G0130 329 #if H_3D_DIM_SDC 370 330 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 371 331 #endif … … 672 632 this->m_cDepthIntraModeSCModel .copyFrom( &pSrc->m_cDepthIntraModeSCModel ); 673 633 this->m_cDdcFlagSCModel .copyFrom( &pSrc->m_cDdcFlagSCModel ); 674 #if QC_GENERIC_SDC_G0122675 634 this->m_cAngleFlagSCModel .copyFrom( &pSrc->m_cAngleFlagSCModel ); 676 #if !QC_SDC_UNIFY_G0130677 this->m_cIntraSdcFlagSCModel .copyFrom( &pSrc->m_cIntraSdcFlagSCModel );678 #endif679 #endif680 635 } 681 636 #endif … … 728 683 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 729 684 730 #if MTK_TEX_DEP_PAR_G0055731 685 Bool depthDependent = false; 732 686 UInt uiTexturePart = eSize; 733 #endif734 687 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC() ) 735 688 { … … 737 690 UInt uiCUIdx = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU(); 738 691 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); 739 #if !MTK_TEX_DEP_PAR_G0055740 if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) != SIZE_NxN)741 #else742 692 if(pcTextureCU->getDepth(uiCUIdx) == uiDepth ) 743 693 { … … 746 696 } 747 697 if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) == SIZE_2Nx2N) 748 #endif749 698 { 750 699 assert( eSize == SIZE_2Nx2N ); … … 768 717 DTRACE_CU("part_mode", eSize ) 769 718 #endif 770 #if MTK_TEX_DEP_PAR_G0055719 #if H_3D_QTLPC 771 720 if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N) 772 721 { … … 838 787 } 839 788 } 840 #if MTK_TEX_DEP_PAR_G0055789 #if H_3D_QTLPC 841 790 } 842 791 else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD) … … 1050 999 if( nBinNum > 1 ) 1051 1000 { 1052 #if MTK_ARP_FLAG_CABAC_SIMP_G00611053 1001 m_pcBinIf->encodeBin( ( iW == iMaxW ) ? 1 : 0, m_cCUPUARPWSCModel.get( 0, 0, 2 ) ); 1054 #else1055 m_pcBinIf->encodeBin( ( iW == iMaxW ) ? 1 : 0, m_cCUPUARPWSCModel.get( 0, 0, 3 ) );1056 #endif1057 1002 } 1058 1003 #if H_MV_ENC_DEC_TRAC … … 1072 1017 // get context function is here 1073 1018 UInt uiSymbol = pcCU->getICFlag( uiAbsPartIdx ) ? 1 : 0; 1074 #if MTK_IC_FLAG_CABAC_SIMP_G00611075 1019 m_pcBinIf->encodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) ); 1076 #else1077 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx ) ;1078 m_pcBinIf->encodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) );1079 #endif1080 1020 #if !H_MV_ENC_DEC_TRAC 1081 1021 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 1082 1022 DTRACE_CABAC_T( "\tICFlag" ); 1083 DTRACE_CABAC_T( "\tuiCtxIC: ");1084 DTRACE_CABAC_V( uiCtxIC );1085 1023 DTRACE_CABAC_T( "\tuiSymbol: "); 1086 1024 DTRACE_CABAC_V( uiSymbol ); … … 1167 1105 } 1168 1106 if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE ) 1169 #if H_3D_DIM_SDC 1170 #if QC_GENERIC_SDC_G0122 1171 if( 1 ) 1172 #else 1173 if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) ) 1174 #endif 1175 #endif 1176 { 1177 #endif 1178 predNum[j] = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds[j]); 1179 for(UInt i = 0; i < predNum[j]; i++) 1180 { 1181 if(dir[j] == preds[j][i]) 1182 { 1183 predIdx[j] = i; 1184 } 1185 } 1186 m_pcBinIf->encodeBin((predIdx[j] != -1)? 1 : 0, m_cCUIntraPredSCModel.get( 0, 0, 0 ) ); 1107 { 1108 #endif 1109 predNum[j] = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds[j]); 1110 for(UInt i = 0; i < predNum[j]; i++) 1111 { 1112 if(dir[j] == preds[j][i]) 1113 { 1114 predIdx[j] = i; 1115 } 1116 } 1117 m_pcBinIf->encodeBin((predIdx[j] != -1)? 1 : 0, m_cCUIntraPredSCModel.get( 0, 0, 0 ) ); 1187 1118 #if H_MV_ENC_DEC_TRAC 1188 DTRACE_CU("prev_intra_luma_pred_flag", (predIdx[j] != -1)? 1 : 0);1119 DTRACE_CU("prev_intra_luma_pred_flag", (predIdx[j] != -1)? 1 : 0); 1189 1120 #endif 1190 1121 #if H_3D_DIM … … 1197 1128 #if H_3D_DIM 1198 1129 if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE ) 1199 #if H_3D_DIM_SDC1200 #if QC_GENERIC_SDC_G01221201 if( 1 )1202 #else1203 if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )1204 #endif1205 #endif1206 1130 { 1207 1131 #endif … … 1301 1225 default: break; 1302 1226 } 1303 #if !QC_SDC_UNIFY_G0130 1304 if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) ) 1305 { 1306 UInt dimDeltaDC; 1307 Pel deltaDC; 1308 #if QC_GENERIC_SDC_G0122 1309 UInt uiNumSegments = isDimMode( dir ) ? 2 : 1; 1310 #else 1311 UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2; 1312 #endif 1313 if( pcCU->getSDCFlag( absPartIdx ) ) 1314 { 1315 if( uiNumSegments==1 ) 1316 { 1317 dimDeltaDC = pcCU->getSDCSegmentDCOffset(0, absPartIdx) ? 1 : 0; 1318 } 1319 else 1320 { 1321 dimDeltaDC = ( pcCU->getSDCSegmentDCOffset(0, absPartIdx) || pcCU->getSDCSegmentDCOffset(1, absPartIdx) ) ? 1 : 0; 1322 } 1323 } 1324 else 1325 { 1326 dimDeltaDC = isDimDeltaDC( dir ); 1327 } 1328 1329 m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) ); 1330 1331 if( dimDeltaDC ) 1332 { 1333 for( UInt segment = 0; segment < uiNumSegments; segment++ ) 1334 { 1335 deltaDC = pcCU->getSDCFlag( absPartIdx ) ? pcCU->getSDCSegmentDCOffset(segment, absPartIdx) : pcCU->getDimDeltaDC( dimType, segment, absPartIdx ); 1336 xCodeDimDeltaDC( deltaDC, uiNumSegments ); 1337 } 1338 } 1339 } 1340 #endif 1341 } 1342 1343 #if QC_GENERIC_SDC_G0122 1227 } 1228 1344 1229 Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx ) 1345 1230 { … … 1350 1235 m_pcBinIf->encodeBin( isDimMode( dir ) ? 0 : 1, m_cAngleFlagSCModel.get( 0, 0, pcCU->getCtxAngleFlag( absPartIdx ) ) ); 1351 1236 } 1352 #if !QC_SDC_UNIFY_G01301353 if( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ) //SDC is allowed only in this case1354 {1355 m_pcBinIf->encodeBin( pcCU->getSDCFlag( absPartIdx ) ? 1 : 0, m_cIntraSdcFlagSCModel.get( 0, 0, pcCU->getCtxSDCFlag( absPartIdx ) ) );1356 }1357 #endif1358 1237 if( isDimMode( dir ) ) 1359 1238 { … … 1370 1249 } 1371 1250 } 1372 #else1373 Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx )1374 {1375 UInt codeWordTable[3][7] = {{0, 0, 0, 1, 0, 0, 0},{0, 2, 6, 14, 15, 0, 0},{0, 1, 0, 0, 0, 0, 0}};1376 UInt codeWordLenTable[3][7] = {{0, 1, 0, 1, 0, 0, 0},{1, 2, 3, 4, 4, 0, 0},{1, 1, 0, 0, 0, 0, 0}};1377 UInt dir = pcCU->getLumaIntraDir( absPartIdx );1378 UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );1379 UInt codeIdx = 0;1380 1381 if( dir < NUM_INTRA_MODE )1382 {1383 codeIdx = 1;1384 }1385 if( isDimMode( dir ) )1386 {1387 switch( getDimType( dir ) )1388 {1389 case DMM1_IDX: codeIdx = 3; break;1390 case DMM4_IDX: codeIdx = 4; break;1391 default: break;1392 }1393 }1394 1395 #if H_3D_DIM_SDC1396 if( pcCU->getSDCFlag( absPartIdx ) )1397 {1398 switch( dir )1399 {1400 case PLANAR_IDX: codeIdx = 0; break;1401 default: codeIdx = 2; break;1402 }1403 }1404 #endif1405 //mode coding1406 for( UInt i = 0; i < codeWordLenTable[puIdx][codeIdx]; i++ )1407 {1408 UInt bit = codeWordTable[puIdx][codeIdx] & ( 1<<(codeWordLenTable[puIdx][codeIdx] - i - 1) );1409 UInt ctxDepthMode = puIdx*3 + ( (i >= 2) ? 2 : i );1410 m_pcBinIf->encodeBin( bit!=0 , m_cDepthIntraModeSCModel.get(0, 0, ctxDepthMode) );1411 }1412 }1413 #endif1414 1251 #endif 1415 1252 … … 2446 2283 2447 2284 #if H_3D_INTER_SDC 2448 #if QC_SDC_UNIFY_G01302449 2285 Void TEncSbac::codeDeltaDC( TComDataCU* pcCU, UInt absPartIdx ) 2450 2286 { … … 2482 2318 else //all-zero inter SDC is not allowed 2483 2319 { 2484 #if SEC_INTER_SDC_G01012485 2320 uiNumSegments = 1; 2486 #else2487 PartSize cPartSize = pcCU->getPartitionSize( absPartIdx );2488 uiNumSegments = ( cPartSize == SIZE_2Nx2N ) ? 1 : ( cPartSize == SIZE_NxN ? 4 : 2 );2489 #endif2490 2321 dimDeltaDC = 1; 2491 2322 } … … 2519 2350 m_pcBinIf->encodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2520 2351 } 2521 #else 2522 Void TEncSbac::codeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2523 { 2524 UInt uiSymbol = pcCU->getInterSDCFlag( uiAbsPartIdx ) ? 1 : 0; 2525 UInt uiCtxInterSDCFlag = pcCU->getCtxInterSDCFlag( uiAbsPartIdx ); 2526 2527 m_pcBinIf->encodeBin( uiSymbol, m_cInterSDCFlagSCModel.get( 0, 0, uiCtxInterSDCFlag ) ); 2528 } 2529 2530 Void TEncSbac::codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) 2531 { 2532 Pel segmentDCOffset = pcCU->getInterSDCSegmentDCOffset( uiSegment, uiAbsPartIdx ); 2533 2534 UInt uiSign = segmentDCOffset < 0 ? 1 : 0; 2535 UInt uiAbsIdx = abs( segmentDCOffset ); 2536 2537 assert( uiAbsIdx > 0 ); 2538 uiAbsIdx--; 2539 xWriteExGolombLevel( uiAbsIdx, m_cInterSDCResidualSCModel.get( 0, 0, 0 ) ); 2540 m_pcBinIf->encodeBin( uiSign, m_cInterSDCResidualSignFlagSCModel.get( 0, 0, 0 ) ); 2541 } 2542 #endif 2352 2543 2353 #endif 2544 2354 -
trunk/source/Lib/TLibEncoder/TEncSbac.h
r872 r884 162 162 #endif 163 163 #if H_3D_INTER_SDC 164 #if QC_SDC_UNIFY_G0130165 164 Void codeDeltaDC ( TComDataCU* pcCU, UInt absPartIdx ); 166 165 Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 167 #else168 Void codeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx );169 Void codeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );170 #endif171 166 #endif 172 167 #if H_3D_DBBP … … 262 257 ContextModel3DBuffer m_cDdcFlagSCModel; 263 258 ContextModel3DBuffer m_cDdcDataSCModel; 264 #if QC_GENERIC_SDC_G0122265 259 ContextModel3DBuffer m_cAngleFlagSCModel; 266 #if !QC_SDC_UNIFY_G0130267 ContextModel3DBuffer m_cIntraSdcFlagSCModel;268 #endif269 #endif270 260 #if H_3D_DIM_DMM 271 261 ContextModel3DBuffer m_cDmm1DataSCModel; … … 276 266 #endif 277 267 #endif 278 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 279 ContextModel3DBuffer m_cInterSDCFlagSCModel; 280 ContextModel3DBuffer m_cInterSDCResidualSCModel; 281 ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel; 282 #endif 283 #if QC_SDC_UNIFY_G0130 268 #if H_3D_DIM_SDC 284 269 ContextModel3DBuffer m_cSDCFlagSCModel; 285 270 #endif -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r872 r884 920 920 m_pcEntropyCoder ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 921 921 922 #if QC_SDC_UNIFY_G0130922 #if H_3D_DIM_SDC 923 923 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 924 924 #endif … … 939 939 { 940 940 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 ); 941 #if QC_SDC_UNIFY_G0130_FIX941 #if H_3D_DIM_SDC 942 942 if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( 0 ) ) && getDimType( pcCU->getLumaIntraDir( 0 ) ) < DIM_NUM_TYPE ) 943 943 { … … 956 956 { 957 957 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiPart * uiQNumParts ); 958 #if QC_SDC_UNIFY_G0130_FIX958 #if H_3D_DIM_SDC 959 959 if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiPart * uiQNumParts ) ) && getDimType( pcCU->getLumaIntraDir( uiPart * uiQNumParts ) ) < DIM_NUM_TYPE ) 960 960 { … … 967 967 { 968 968 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiAbsPartIdx ); 969 #if QC_SDC_UNIFY_G0130_FIX969 #if H_3D_DIM_SDC 970 970 if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiAbsPartIdx ) ) && getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx ) ) < DIM_NUM_TYPE ) 971 971 { … … 975 975 } 976 976 } 977 #if QC_SDC_UNIFY_G0130 && !QC_SDC_UNIFY_G0130_FIX 978 Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1; 979 UInt uiPartOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth( uiAbsPartIdx ) << 1 ) ) >> 2; 980 981 if( !pcCU->getSDCFlag( uiAbsPartIdx ) ) 982 { 983 for( Int iPart = 0; iPart < iPartNum; iPart++ ) 984 { 985 if( getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx + uiPartOffset*iPart ) ) < DIM_NUM_TYPE ) 986 { 987 m_pcEntropyCoder->encodeDeltaDC( pcCU, uiAbsPartIdx + uiPartOffset*iPart ); 988 } 989 } 990 } 991 #endif 977 992 978 } 993 979 if( bChroma ) … … 1875 1861 1876 1862 #if H_3D_DIM_SDC 1877 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, 1878 #if QC_GENERIC_SDC_G0122 1879 Bool bZeroResidual, Int iSDCDeltaResi 1880 #else 1881 Bool bResidual 1882 #endif 1883 ) 1863 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ) 1884 1864 { 1885 1865 UInt uiLumaPredMode = pcCU ->getLumaIntraDir( uiAbsPartIdx ); 1886 1866 UInt uiWidth = pcCU ->getWidth ( 0 ); 1887 1867 UInt uiHeight = pcCU ->getHeight ( 0 ); 1888 #if QC_PKU_SDC_SPLIT_G01231889 #if HS_TSINGHUA_SDC_SPLIT_G01111890 #if QC_GENERIC_SDC_G01221891 1868 TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight ); 1892 #endif1893 #else1894 #if QC_GENERIC_SDC_G01221895 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );1896 #endif1897 #endif1898 #endif1899 #if QC_PKU_SDC_SPLIT_G01231900 1869 UInt numParts = 1; 1901 UInt i = 0;1902 1870 UInt sdcDepth = 0; 1903 1871 UInt uiStride; … … 1910 1878 UInt uiRecIPredStride; 1911 1879 1912 #if HS_TSINGHUA_SDC_SPLIT_G01111913 1880 if ( ( uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) > 1 ) 1914 1881 { … … 1917 1884 uiWidth = uiHeight = ( 1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ); 1918 1885 } 1919 #else 1920 if (uiWidth == 64) 1921 { 1922 numParts = 4; 1923 sdcDepth = 1; 1924 uiWidth = uiHeight = 32; 1925 } 1926 #endif 1927 1928 for ( i = 0; i < numParts; i++ ) 1886 1887 for ( Int i = 0; i < numParts; i++ ) 1929 1888 { 1930 1889 uiStride = pcOrgYuv ->getStride (); … … 1938 1897 1939 1898 AOF( uiWidth == uiHeight ); 1940 #else 1941 UInt uiStride = pcOrgYuv ->getStride (); 1942 Pel* piOrg = pcOrgYuv ->getLumaAddr( uiAbsPartIdx ); 1943 Pel* piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1944 Pel* piReco = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1945 1946 UInt uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1947 Pel* piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1948 UInt uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1949 1950 AOF( uiWidth == uiHeight ); 1951 AOF( uiAbsPartIdx == 0 ); 1952 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 1953 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1954 #endif 1955 #if !QC_GENERIC_SDC_G0122 1956 AOF( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) ); 1957 AOF( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || uiWidth < 64 ); 1958 #endif 1959 1960 //===== init availability pattern ===== 1961 Bool bAboveAvail = false; 1962 Bool bLeftAvail = false; 1963 #if QC_PKU_SDC_SPLIT_G0123 1964 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1965 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1966 #else 1967 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 1968 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1969 1970 #endif 1971 #if !QC_PKU_SDC_SPLIT_G0123 1972 #if QC_GENERIC_SDC_G0122 1973 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1974 #endif 1975 #endif 1976 #if HS_TSINGHUA_SDC_SPLIT_G0111 1977 #if QC_GENERIC_SDC_G0122 1978 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1979 #endif 1980 #endif 1981 //===== get prediction signal ===== 1982 #if H_3D_DIM 1983 if( isDimMode( uiLumaPredMode ) ) 1984 { 1985 #if HS_TSINGHUA_SDC_SPLIT_G0111 1986 UInt dimType = getDimType ( uiLumaPredMode ); 1987 UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx); 1988 if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX ) 1989 { 1990 if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used. 1991 patternID = 1349; // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16 1992 else 1993 patternID = patternID >> 1; // Other cases 1994 pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID); 1995 } 1996 #endif 1997 predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true 1998 #if QC_GENERIC_SDC_G0122 1999 , dmm4Segmentation 2000 #endif 2001 ); 2002 #if HS_TSINGHUA_SDC_SPLIT_G0111 2003 Bool* dmm4PatternSplit = dmm4Segmentation->getPattern(); 2004 Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern(); 2005 for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 2006 { 2007 dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k]; 2008 } 2009 #endif 2010 } 2011 else 2012 { 2013 #endif 2014 predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 2015 #if H_3D_DIM 2016 } 2017 #endif 2018 #if QC_PKU_SDC_SPLIT_G0123 1899 1900 //===== init availability pattern ===== 1901 Bool bAboveAvail = false; 1902 Bool bLeftAvail = false; 1903 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1904 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1905 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1906 //===== get prediction signal ===== 1907 if( isDimMode( uiLumaPredMode ) ) 1908 { 1909 UInt dimType = getDimType ( uiLumaPredMode ); 1910 UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx); 1911 if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX ) 1912 { 1913 if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used. 1914 { 1915 patternID = 1349; // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16 1916 } 1917 else 1918 { 1919 patternID = patternID >> 1; // Other cases 1920 } 1921 pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID); 1922 } 1923 predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true , dmm4Segmentation ); 1924 Bool* dmm4PatternSplit = dmm4Segmentation->getPattern(); 1925 Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern(); 1926 for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 1927 { 1928 dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k]; 1929 } 1930 } 1931 else 1932 { 1933 predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 1934 } 2019 1935 if ( numParts > 1 ) 2020 1936 { … … 2031 1947 } 2032 1948 uiAbsPartIdx += ( ( uiWidth * uiWidth ) >> 4 ); 2033 #if HS_TSINGHUA_SDC_SPLIT_G01112034 1949 dmm4Segmentation->destroy(); delete dmm4Segmentation; 2035 #endif2036 1950 } 2037 1951 uiAbsPartIdx = 0; … … 2040 1954 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 2041 1955 piReco = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 2042 1956 2043 1957 uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 2044 1958 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); … … 2050 1964 uiHeight = pcCU->getHeight( 0 ); 2051 1965 } 2052 #endif2053 1966 // number of segments depends on prediction mode 2054 1967 UInt uiNumSegments = 1; 2055 1968 Bool* pbMask = NULL; 2056 1969 UInt uiMaskStride = 0; 2057 1970 2058 1971 if( getDimType( uiLumaPredMode ) == DMM1_IDX ) 2059 1972 { 2060 1973 Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx); 2061 1974 2062 1975 WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 2063 1976 TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx )); 2064 1977 2065 1978 uiNumSegments = 2; 2066 1979 pbMask = pcWedgelet->getPattern(); 2067 1980 uiMaskStride = pcWedgelet->getStride(); 2068 1981 } 2069 #if QC_GENERIC_SDC_G01222070 1982 if( getDimType( uiLumaPredMode ) == DMM4_IDX ) 2071 1983 { 2072 1984 uiNumSegments = 2; 2073 #if HS_TSINGHUA_SDC_SPLIT_G0111 2074 pbMask = dmm4SegmentationOrg->getPattern(); 1985 pbMask = dmm4SegmentationOrg->getPattern(); 2075 1986 uiMaskStride = dmm4SegmentationOrg->getStride(); 2076 #else 2077 pbMask = dmm4Segmentation->getPattern(); 2078 uiMaskStride = dmm4Segmentation->getStride(); 2079 #endif 2080 } 2081 #endif 2082 1987 } 1988 2083 1989 // get DC prediction for each segment 2084 1990 Pel apDCPredValues[2]; 2085 1991 analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode ); 2086 1992 2087 1993 // get original DC for each segment 2088 1994 Pel apDCOrigValues[2]; 2089 1995 analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode, true ); 2090 1996 2091 1997 for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ ) 2092 1998 { 2093 1999 // remap reconstructed value to valid depth values 2094 #if QC_GENERIC_SDC_G01222095 2000 Pel pDCRec = ( !bZeroResidual ) ? apDCOrigValues[uiSegment] : apDCPredValues[uiSegment]; 2096 #else2097 Pel pDCRec = bResidual?apDCOrigValues[uiSegment]:apDCPredValues[uiSegment];2098 #endif2099 2001 // get residual (idx) 2100 2002 #if H_3D_DIM_DLT … … 2103 2005 Pel pResidualIdx = pDCRec - apDCPredValues[uiSegment]; 2104 2006 #endif 2105 #if QC_GENERIC_SDC_G01222106 2007 if( !bZeroResidual ) 2107 2008 { … … 2113 2014 } 2114 2015 } 2115 #endif2116 2016 // save SDC DC offset 2117 2017 pcCU->setSDCSegmentDCOffset(pResidualIdx, uiSegment, uiAbsPartIdx); 2118 2018 } 2119 2019 2120 2020 // reconstruct residual based on mask + DC residuals 2121 2021 Pel apDCResiValues[2]; … … 2132 2032 #endif 2133 2033 } 2134 2034 2135 2035 //===== reconstruction ===== 2136 2036 Bool* pMask = pbMask; … … 2138 2038 Pel* pReco = piReco; 2139 2039 Pel* pRecIPred = piRecIPred; 2140 2040 2141 2041 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 2142 2042 { … … 2147 2047 2148 2048 Pel pResiDC = apDCResiValues[ucSegment]; 2149 2049 2150 2050 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResiDC ); 2151 2051 pRecIPred[ uiX ] = pReco[ uiX ]; … … 2156 2056 pMask += uiMaskStride; 2157 2057 } 2158 2058 2159 2059 // clear UV 2160 2060 UInt uiStrideC = pcPredYuv->getCStride(); 2161 2061 Pel *pRecCb = pcPredYuv->getCbAddr(); 2162 2062 Pel *pRecCr = pcPredYuv->getCrAddr(); 2163 2063 2164 2064 for (Int y=0; y<uiHeight/2; y++) 2165 2065 { … … 2169 2069 pRecCr[x] = 128; 2170 2070 } 2171 2071 2172 2072 pRecCb += uiStrideC; 2173 2073 pRecCr += uiStrideC; 2174 2074 } 2175 2075 2176 2076 //===== determine distortion ===== 2177 2077 #if H_3D_VSO … … 2181 2081 #endif 2182 2082 ruiDist = m_pcRdCost->getDistPart(g_bitDepthY, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight ); 2183 2083 2184 2084 //===== determine rate and r-d cost ===== 2185 2085 m_pcEntropyCoder->resetBits(); 2186 2086 2187 2087 // encode reduced intra header 2188 #if QC_SDC_UNIFY_G01302189 2088 if( !pcCU->getSlice()->isIntra() ) 2190 2089 { … … 2197 2096 } 2198 2097 2199 #if QC_SDC_UNIFY_G0130_FIX22200 2098 m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth( 0 ), true ); 2201 #else2202 m_pcEntropyCoder->encodePartSize( pcCU, 0, true );2203 #endif2204 2099 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 2205 #else 2206 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 2207 #endif 2208 2100 2209 2101 // encode pred direction + DC residual data 2210 2102 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 2211 #if QC_SDC_UNIFY_G01302212 2103 Bool bDummy = false; 2213 2104 m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth( 0 ), uiWidth, uiHeight, bDummy ); 2214 #endif2215 2105 UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); 2216 2106 2217 2107 #if H_3D_VSO 2218 2108 if ( m_pcRdCost->getUseLambdaScaleVSO()) … … 2221 2111 #endif 2222 2112 dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist ); 2223 #if QC_GENERIC_SDC_G01222224 #if HS_TSINGHUA_SDC_SPLIT_G01112225 2113 dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg; 2226 #else2227 dmm4Segmentation->destroy(); delete dmm4Segmentation;2228 #endif2229 #endif2230 2114 } 2231 2115 #endif … … 3093 2977 case( DMM4_IDX ): 3094 2978 { 3095 #if !QC_GENERIC_SDC_G01223096 if( uiWidth > 4 )3097 #endif3098 2979 { 3099 2980 biSegmentation = new TComWedgelet( uiWidth, uiHeight ); … … 3151 3032 { 3152 3033 pcCU->setSDCFlagSubParts( (uiSDC != 0), uiPartOffset, uiDepth + uiInitTrDepth ); 3153 #if QC_GENERIC_SDC_G01223154 3034 for( Int iSDCDeltaResi = -2; iSDCDeltaResi <= 2; iSDCDeltaResi++ ) 3155 3035 { … … 3158 3038 continue; 3159 3039 } 3160 #endif3161 3040 #endif 3162 3041 … … 3169 3048 bTestZeroResi |= pcCU->getSDCFlag(uiPartOffset); 3170 3049 #endif 3171 #if QC_GENERIC_SDC_G01223172 3050 if( uiSDC != 0 && iSDCDeltaResi != 0 ) 3173 3051 { 3174 3052 bTestZeroResi = false; 3175 3053 } 3176 #endif3177 3054 #endif 3178 3055 … … 3205 3082 3206 3083 // start encoding with SDC 3207 #if QC_GENERIC_SDC_G01223208 3084 xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi ); 3209 #else3210 xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, (testZeroResi!=0));3211 #endif3212 3085 } 3213 3086 else … … 3282 3155 #if H_3D_DIM_ENC || H_3D_DIM_SDC 3283 3156 } 3284 #endif3285 #if QC_GENERIC_SDC_G01223286 3157 } // SDC residual loop 3287 3158 #endif … … 3885 3756 for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand ) 3886 3757 { 3887 3888 3889 3890 3891 3892 #if H_3D_VSP && NTT_STORE_SPDV_VSP_G01483893 3894 3758 UInt uiCostCand = MAX_UINT; 3759 UInt uiBitsCand = 0; 3760 3761 PartSize ePartSize = pcCU->getPartitionSize( 0 ); 3762 3763 #if H_3D_VSP 3764 pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3765 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3895 3766 #endif 3896 3767 3897 3768 #if H_3D_SPIVMP 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 #endif 3916 #if NTT_STORE_SPDV_VSP_G01483769 pcCU->setSPIVMPFlagSubParts( pbSPIVMPFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx )); 3770 if (pbSPIVMPFlag[uiMergeCand]) 3771 { 3772 UInt uiSPAddr; 3773 3774 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 3775 3776 pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 3777 3778 for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++) 3779 { 3780 pcCU->getSPAbsPartIdx(uiAbsPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr); 3781 pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight); 3782 pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight); 3783 } 3784 } 3785 else 3786 #endif 3787 #if H_3D_VSP 3917 3788 #if H_3D_DBBP 3918 3789 if ( vspFlag[uiMergeCand] && !pcCU->getDBBPFlag(0) ) … … 3950 3821 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx ); 3951 3822 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx ); 3952 3953 #if NTT_STORE_SPDV_VSP_G0148 3954 } 3955 #endif 3956 #if H_3D_VSP && !NTT_STORE_SPDV_VSP_G0148 3957 pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3958 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3959 #endif 3960 3961 #if MTK_DDD_G0063 3823 #if H_3D_VSP 3824 } 3825 #endif 3826 3827 #if H_3D_DDD 3962 3828 if( uiMergeCand == pcCU->getUseDDDCandIdx() ) 3963 3829 { 3964 3965 3830 pcCU->setUseDDD( true, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3831 pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3966 3832 } 3967 3833 else 3968 3834 { 3969 3835 pcCU->setUseDDD( false, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3970 3836 } 3971 3837 #endif … … 3975 3841 if (uiMergeCand == m_pcEncCfg->getMaxNumMergeCand() -1) 3976 3842 { 3977 3843 uiBitsCand--; 3978 3844 } 3979 3845 uiCostCand = uiCostCand + m_pcRdCost->getCost( uiBitsCand ); … … 3986 3852 uiMergeIndex = uiMergeCand; 3987 3853 } 3988 3854 } 3989 3855 } 3990 3856 … … 4577 4443 { 4578 4444 uiLastMode = 1; 4579 4580 4581 4582 4445 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMv( cMv[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4446 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllRefIdx( iRefIdx[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4447 TempMv = cMv[1] - cMvPred[1][iRefIdx[1]]; 4448 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvd ( TempMv, ePartSize, uiPartAddr, 0, iPartIdx ); 4583 4449 pcCU->setInterDirSubParts( 2, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4584 4450 4585 4451 pcCU->setMVPIdxSubParts( aaiMvpIdx[1][iRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4586 4452 pcCU->setMVPNumSubParts( aaiMvpNum[1][iRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); … … 4667 4533 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMRGIndex].m_acDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4668 4534 #endif 4669 #if MTK_DDD_G00634535 #if H_3D_DDD 4670 4536 if( uiMRGIndex == pcCU->getUseDDDCandIdx() ) 4671 4537 { … … 4703 4569 else 4704 4570 #endif 4705 #if NTT_STORE_SPDV_VSP_G01484571 #if H_3D_VSP 4706 4572 #if H_3D_DBBP 4707 4573 if ( vspFlag[uiMRGIndex] && !pcCU->getDBBPFlag(uiPartAddr) ) … … 4735 4601 } 4736 4602 else 4737 #if H_3D_FIX_G0148_BRACE4738 4603 { 4739 #endif4740 4604 #endif 4741 4605 pcCU->setInterDirSubParts ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4742 4606 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4743 4607 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4744 #if H_3D _FIX_G0148_BRACE4608 #if H_3D 4745 4609 } 4746 4610 #endif … … 4758 4622 pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4759 4623 #endif 4760 #if MTK_DDD_G00634624 #if H_3D_DDD 4761 4625 pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4762 4626 #endif … … 5616 5480 m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true); 5617 5481 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, true ); 5618 #if !SEC_IC_ARP_SIG_G0072 5482 #if H_3D_ARP 5483 m_pcEntropyCoder->encodeARPW( pcCU, 0 ); 5484 #endif 5619 5485 #if H_3D_IC 5620 5486 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 5621 #endif5622 #endif5623 #if H_3D_ARP5624 m_pcEntropyCoder->encodeARPW( pcCU, 0 );5625 #endif5626 #if SEC_IC_ARP_SIG_G00725627 #if H_3D_IC5628 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );5629 #endif5630 5487 #endif 5631 5488 uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); … … 5882 5739 5883 5740 #if H_3D_INTER_SDC 5884 #if SEC_INTER_SDC_G01015885 5741 Void TEncSearch::encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, TComYuv* pcRec, Int uiOffest, const UInt uiDepth ) 5886 #else5887 Void TEncSearch::encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, TComYuv* pcRec, const UInt uiDepth )5888 #endif5889 5742 { 5890 5743 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( 0 ) ) … … 5892 5745 return; 5893 5746 } 5894 #if QC_SDC_UNIFY_G01305895 5747 pcCU->setSDCFlagSubParts( true, 0, uiDepth ); 5896 #else 5897 pcCU->setInterSDCFlagSubParts( true, 0, 0, uiDepth ); 5898 #endif 5899 5900 UInt uiWidth = pcCU->getWidth ( 0 ); 5901 UInt uiHeight = pcCU->getHeight( 0 ); 5902 #if SEC_INTER_SDC_G0101 5903 UInt uiSegSize = 0; 5904 #else 5905 UChar* pMask = pcCU->getInterSDCMask(); 5906 memset( pMask, 0, uiWidth*uiHeight ); 5907 5908 pcCU->xSetInterSDCCUMask( pcCU, pMask ); 5909 5910 UInt uiSegSize[4] = { 0, 0, 0, 0 }; 5911 #endif 5748 5749 UInt uiWidth = pcCU->getWidth ( 0 ); 5750 UInt uiHeight = pcCU->getHeight( 0 ); 5751 UInt uiSegSize = 0; 5752 5912 5753 Pel *pPred, *pOrg; 5913 5754 UInt uiPredStride = pcPred->getStride(); 5914 5755 UInt uiOrgStride = pcOrg->getStride(); 5915 5756 UInt uiPelX, uiPelY; 5916 #if !SEC_INTER_SDC_G01015917 UInt uiPartitionSize = pcCU->getPartitionSize( 0 );5918 UInt uiSegmentNum = ( uiPartitionSize == SIZE_2Nx2N ) ? 1 : ( uiPartitionSize == SIZE_NxN ? 4 : 2 );5919 #endif5920 5757 5921 5758 pPred = pcPred->getLumaAddr( 0 ); 5922 5759 pOrg = pcOrg->getLumaAddr( 0 ); 5923 #if SEC_INTER_SDC_G01015924 5760 Int pResDC = 0; 5925 #else5926 Int pResDC[4] = { 0, 0, 0, 0};5927 #endif5928 5761 5929 5762 //calculate dc value for prediction and original signal, and calculate residual and reconstruction … … 5932 5765 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 5933 5766 { 5934 #if SEC_INTER_SDC_G01015935 5767 pResDC += (Int)( pOrg [uiPelX] - pPred[uiPelX] ); 5936 5768 uiSegSize++; 5937 #else5938 UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];5939 pResDC[uiSeg] += (Int)( pOrg [uiPelX] - pPred[uiPelX] );5940 uiSegSize[uiSeg]++;5941 #endif5942 5769 } 5943 5770 pOrg += uiOrgStride; … … 5945 5772 } 5946 5773 5947 #if SEC_INTER_SDC_G01015948 5774 Int iResiOffset = ( pResDC > 0 ? ( uiSegSize >> 1 ) : -1*( uiSegSize >> 1 ) ); 5949 5775 pResDC = ( pResDC + iResiOffset ) / (Int) uiSegSize; 5950 5776 5951 5777 pcCU->setSDCSegmentDCOffset( pResDC + uiOffest, 0, 0 ); 5952 #else 5953 for( UInt uiSeg = 0; uiSeg < uiSegmentNum; uiSeg++ ) 5954 { 5955 Int iResiOffset = ( pResDC [uiSeg] > 0 ? ( uiSegSize[uiSeg] >> 1 ) : -1*( uiSegSize[uiSeg] >> 1 ) ); 5956 pResDC [uiSeg] = ( pResDC [uiSeg] + iResiOffset ) / (Int) uiSegSize[uiSeg]; 5957 #if QC_SDC_UNIFY_G0130 5958 pcCU->setSDCSegmentDCOffset( pResDC[uiSeg], uiSeg, 0 ); 5959 #else 5960 pcCU->setInterSDCSegmentDCOffset( pResDC[uiSeg], uiSeg, 0 ); 5961 #endif 5962 } 5963 #endif 5778 5964 5779 5965 5780 Pel *pRec; … … 5972 5787 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 5973 5788 { 5974 #if SEC_INTER_SDC_G01015975 5789 pRec[ uiPelX ] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, pPred[uiPelX] + pcCU->getSDCSegmentDCOffset(0, 0) ); 5976 #else5977 UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];5978 assert( uiSeg < uiSegmentNum );5979 5980 pRec[ uiPelX ] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, pPred[uiPelX] + pResDC[uiSeg] );5981 #endif5982 5790 } 5983 5791 pPred += uiPredStride; … … 6019 5827 #endif 6020 5828 6021 #if QC_SDC_UNIFY_G01305829 #if H_3D_DIM_SDC 6022 5830 Bool bNonSkip = false; 6023 5831 #else 6024 5832 Bool bNonSkip = true; 6025 5833 #endif 6026 #if SEC_INTER_SDC_G01016027 5834 bNonSkip |= ( pcCU->getSDCSegmentDCOffset( 0, 0 ) != 0 ) ? 1 : 0; 6028 #else6029 for( UInt uiSeg = 0; uiSeg < uiSegmentNum; uiSeg++ )6030 {6031 #if QC_SDC_UNIFY_G01306032 bNonSkip |= ( pcCU->getSDCSegmentDCOffset( uiSeg, 0 ) != 0 ) ? 1 : 0;6033 #else6034 bNonSkip &= ( pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 ) != 0 ) ? 1 : 0;6035 #endif6036 }6037 #endif6038 6039 5835 if( !bNonSkip ) 6040 5836 { … … 7176 6972 m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true); 7177 6973 m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, true); 7178 #if !SEC_IC_ARP_SIG_G0072 6974 #if H_3D_ARP 6975 m_pcEntropyCoder->encodeARPW( pcCU, 0 ); 6976 #endif 7179 6977 #if H_3D_IC 7180 6978 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 7181 #endif7182 #endif7183 #if H_3D_ARP7184 m_pcEntropyCoder->encodeARPW( pcCU, 0 );7185 #endif7186 #if SEC_IC_ARP_SIG_G00727187 #if H_3D_IC7188 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );7189 #endif7190 6979 #endif 7191 6980 ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits(); … … 7201 6990 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 7202 6991 m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 7203 #if QC_SDC_UNIFY_G01306992 #if H_3D_DIM_SDC 7204 6993 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 7205 6994 #endif 7206 6995 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 7207 #if !SEC_IC_ARP_SIG_G0072 6996 #if H_3D_ARP 6997 m_pcEntropyCoder->encodeARPW( pcCU , 0 ); 6998 #endif 7208 6999 #if H_3D_IC 7209 7000 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 7210 #endif7211 #endif7212 #if H_3D_ARP7213 m_pcEntropyCoder->encodeARPW( pcCU , 0 );7214 #endif7215 #if SEC_IC_ARP_SIG_G00727216 #if H_3D_IC7217 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );7218 #endif7219 #endif7220 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G01307221 m_pcEntropyCoder->encodeInterSDCFlag( pcCU, 0, true );7222 7001 #endif 7223 7002 Bool bDummy = false; -
trunk/source/Lib/TLibEncoder/TEncSearch.h
r872 r884 218 218 TComYuv* pcResi, 219 219 TComYuv* pcRec, 220 #if SEC_INTER_SDC_G0101221 220 Int uiOffset, 222 #endif223 221 const UInt uiDepth ); 224 222 #endif … … 355 353 #endif 356 354 #if H_3D_DIM_SDC 357 Void xIntraCodingSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, 358 #if QC_GENERIC_SDC_G0122 359 Bool bZeroResidual, Int iSDCDeltaResi 360 #else 361 Bool bResidual 362 #endif 363 ); 355 Void xIntraCodingSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ); 364 356 #endif 365 357 #endif -
trunk/source/Lib/TLibEncoder/TEncSlice.h
r872 r884 107 107 UInt m_uiSliceIdx; 108 108 std::vector<TEncSbac*> CTXMem; 109 #if MTK_DDD_G0063109 #if H_3D_DDD 110 110 Int m_iDDDScale; 111 111 Int m_iDDDOffset; … … 146 146 Void setCtxMem( TEncSbac* sb, Int b ) { CTXMem[b] = sb; } 147 147 148 #if MTK_DDD_G0063148 #if H_3D_DDD 149 149 Void setDDDPar( Int iScale, Int iOffset, UInt uiPrecision ){ m_iDDDScale = iScale; m_iDDDOffset = iOffset; m_uiDDDPrecision = uiPrecision; } 150 150 #endif -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r872 r884 667 667 m_cSPS.setSPSId( getLayerIdInVps() ); 668 668 m_cSPS.setLayerId( getLayerId() ); 669 #endif670 #if H_MV_HLS_7_VPS_P0048_14671 669 // Code below needs to be moved to VPS 672 670 #endif … … 832 830 m_cPPS.setSPSId( getLayerIdInVps() ); 833 831 834 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION835 #if H_MV836 832 m_cPPS.setPpsExtensionTypeFlag ( PPS_EX_T_MV ,true ); 837 833 #if H_3D 838 834 m_cPPS.setPpsExtensionTypeFlag ( PPS_EX_T_3D ,true ); 839 #endif840 #endif841 835 #endif 842 836 #endif
Note: See TracChangeset for help on using the changeset viewer.