Changeset 1316 in SHVCSoftware for branches/SHM-dev/source/Lib
- Timestamp:
- 21 Jul 2015, 20:08:08 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComChromaFormat.cpp
r1259 r1316 132 132 //set the significance map context selection parameters 133 133 134 if (pcCU->getSlice()->getSPS()->get UseSingleSignificanceMapContext()134 if (pcCU->getSlice()->getSPS()->getSpsRangeExtension().getTransformSkipContextEnabledFlag() 135 135 && (pcCU->getCUTransquantBypass(uiAbsPartIdx) || (pcCU->getTransformSkip(uiAbsPartIdx, component) != 0))) 136 136 { -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1315 r1316 284 284 Void setExplicitRdpcmModePartRange ( UInt rdpcmMode, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); 285 285 286 Bool isRDPCMEnabled ( UInt uiAbsPartIdx ) { return getSlice()->getSPS()->get UseResidualDPCM(isIntra(uiAbsPartIdx) ? RDPCM_SIGNAL_IMPLICIT : RDPCM_SIGNAL_EXPLICIT); }286 Bool isRDPCMEnabled ( UInt uiAbsPartIdx ) { return getSlice()->getSPS()->getSpsRangeExtension().getRdpcmEnabledFlag(isIntra(uiAbsPartIdx) ? RDPCM_SIGNAL_IMPLICIT : RDPCM_SIGNAL_EXPLICIT); } 287 287 288 288 Void setCrossComponentPredictionAlphaPartRange ( Char alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1295 r1316 1816 1816 } 1817 1817 1818 //! get AC and DC values for weighted pred 1819 Void TComSlice::getWpAcDcParam(WPACDCParam *&wp) 1820 { 1821 wp = m_weightACDCParam; 1822 } 1823 1818 1824 //! init AC and DC values for weighted pred 1819 1825 Void TComSlice::initWpAcDcParam() … … 1856 1862 Void TComSlice::initWpScaling(const TComSPS *sps) 1857 1863 { 1858 const Bool bUseHighPrecisionPredictionWeighting = sps->get UseHighPrecisionPredictionWeighting();1864 const Bool bUseHighPrecisionPredictionWeighting = sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag(); 1859 1865 for ( Int e=0 ; e<NUM_REF_PIC_LIST_01 ; e++ ) 1860 1866 { … … 2040 2046 // ------------------------------------------------------------------------------------------------ 2041 2047 2048 TComSPSRExt::TComSPSRExt() 2049 : m_transformSkipRotationEnabledFlag (false) 2050 , m_transformSkipContextEnabledFlag (false) 2051 // m_rdpcmEnabledFlag initialized below 2052 , m_extendedPrecisionProcessingFlag (false) 2053 , m_intraSmoothingDisabledFlag (false) 2054 , m_highPrecisionOffsetsEnabledFlag (false) 2055 , m_persistentRiceAdaptationEnabledFlag(false) 2056 , m_cabacBypassAlignmentEnabledFlag (false) 2057 { 2058 for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++) 2059 { 2060 m_rdpcmEnabledFlag[signallingModeIndex] = false; 2061 } 2062 } 2063 2042 2064 TComSPS::TComSPS() 2043 2065 : m_SPSId ( 0) … … 2062 2084 , m_pcmLog2MaxSize ( 5) 2063 2085 , m_uiPCMLog2MinSize ( 7) 2064 , m_useExtendedPrecision (false)2065 , m_useHighPrecisionPredictionWeighting(false)2066 , m_useResidualRotation (false)2067 , m_useSingleSignificanceMapContext(false)2068 , m_useGolombRiceParameterAdaptation(false)2069 , m_alignCABACBeforeBypass (false)2070 2086 , m_bPCMFilterDisableFlag (false) 2071 , m_disableIntraReferenceSmoothing(false)2072 2087 , m_uiBitsForPOC ( 8) 2073 2088 , m_numLongTermRefPicSPS ( 0) … … 2106 2121 } 2107 2122 2108 for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++)2109 {2110 m_useResidualDPCM[signallingModeIndex] = false;2111 }2112 2113 2123 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 2114 2124 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); … … 2244 2254 const Int TComSPS::m_winUnitY[]={1,2,1,1}; 2245 2255 2256 TComPPSRExt::TComPPSRExt() 2257 : m_log2MaxTransformSkipBlockSize (2) 2258 , m_crossComponentPredictionEnabledFlag(false) 2259 , m_diffCuChromaQpOffsetDepth (0) 2260 , m_chromaQpOffsetListLen (0) 2261 // m_ChromaQpAdjTableIncludingNullEntry initialized below 2262 // m_log2SaoOffsetScale initialized below 2263 { 2264 m_ChromaQpAdjTableIncludingNullEntry[0].u.comp.CbOffset = 0; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0. This is initialised here and never subsequently changed. 2265 m_ChromaQpAdjTableIncludingNullEntry[0].u.comp.CrOffset = 0; 2266 for(Int ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++) 2267 { 2268 m_log2SaoOffsetScale[ch] = 0; 2269 } 2270 } 2271 2246 2272 TComPPS::TComPPS() 2247 2273 : m_PPSId (0) … … 2252 2278 , m_bSliceChromaQpFlag (false) 2253 2279 , m_uiMaxCuDQPDepth (0) 2254 , m_MaxCuChromaQpAdjDepth (0)2255 , m_ChromaQpAdjTableSize (0)2256 2280 , m_chromaCbQpOffset (0) 2257 2281 , m_chromaCrQpOffset (0) 2258 2282 , m_numRefIdxL0DefaultActive (1) 2259 2283 , m_numRefIdxL1DefaultActive (1) 2260 , m_useCrossComponentPrediction (false)2261 2284 , m_TransquantBypassEnableFlag (false) 2262 2285 , m_useTransformSkip (false) 2263 , m_transformSkipLog2MaxSize (2)2264 2286 , m_dependentSliceSegmentsEnabledFlag(false) 2265 2287 , m_tilesEnabledFlag (false) … … 2290 2312 #endif //SVC_EXTENSION 2291 2313 { 2292 for(Int ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++)2293 {2294 m_saoOffsetBitShift[ch] = 0;2295 }2296 m_ChromaQpAdjTableIncludingNullEntry[0].u.comp.CbOffset = 0; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0. This is initialised here and never subsequently changed.2297 m_ChromaQpAdjTableIncludingNullEntry[0].u.comp.CrOffset = 0;2298 2299 2314 #if SVC_EXTENSION 2300 2315 ::memset(m_scaledRefLayerOffsetPresentFlag, 0, sizeof(m_scaledRefLayerOffsetPresentFlag)); -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1295 r1316 1304 1304 }; 1305 1305 1306 /// SPS RExt class 1307 class TComSPSRExt // Names aligned to text specification 1308 { 1309 private: 1310 Bool m_transformSkipRotationEnabledFlag; 1311 Bool m_transformSkipContextEnabledFlag; 1312 Bool m_rdpcmEnabledFlag[NUMBER_OF_RDPCM_SIGNALLING_MODES]; 1313 Bool m_extendedPrecisionProcessingFlag; 1314 Bool m_intraSmoothingDisabledFlag; 1315 Bool m_highPrecisionOffsetsEnabledFlag; 1316 Bool m_persistentRiceAdaptationEnabledFlag; 1317 Bool m_cabacBypassAlignmentEnabledFlag; 1318 1319 public: 1320 TComSPSRExt(); 1321 1322 Bool settingsDifferFromDefaults() const 1323 { 1324 return getTransformSkipRotationEnabledFlag() 1325 || getTransformSkipContextEnabledFlag() 1326 || getRdpcmEnabledFlag(RDPCM_SIGNAL_IMPLICIT) 1327 || getRdpcmEnabledFlag(RDPCM_SIGNAL_EXPLICIT) 1328 || getExtendedPrecisionProcessingFlag() 1329 || getIntraSmoothingDisabledFlag() 1330 || getHighPrecisionOffsetsEnabledFlag() 1331 || getPersistentRiceAdaptationEnabledFlag() 1332 || getCabacBypassAlignmentEnabledFlag(); 1333 } 1334 1335 1336 Bool getTransformSkipRotationEnabledFlag() const { return m_transformSkipRotationEnabledFlag; } 1337 Void setTransformSkipRotationEnabledFlag(const Bool value) { m_transformSkipRotationEnabledFlag = value; } 1338 1339 Bool getTransformSkipContextEnabledFlag() const { return m_transformSkipContextEnabledFlag; } 1340 Void setTransformSkipContextEnabledFlag(const Bool value) { m_transformSkipContextEnabledFlag = value; } 1341 1342 Bool getRdpcmEnabledFlag(const RDPCMSignallingMode signallingMode) const { return m_rdpcmEnabledFlag[signallingMode]; } 1343 Void setRdpcmEnabledFlag(const RDPCMSignallingMode signallingMode, const Bool value) { m_rdpcmEnabledFlag[signallingMode] = value; } 1344 1345 Bool getExtendedPrecisionProcessingFlag() const { return m_extendedPrecisionProcessingFlag; } 1346 Void setExtendedPrecisionProcessingFlag(Bool value) { m_extendedPrecisionProcessingFlag = value; } 1347 1348 Bool getIntraSmoothingDisabledFlag() const { return m_intraSmoothingDisabledFlag; } 1349 Void setIntraSmoothingDisabledFlag(Bool bValue) { m_intraSmoothingDisabledFlag=bValue; } 1350 1351 Bool getHighPrecisionOffsetsEnabledFlag() const { return m_highPrecisionOffsetsEnabledFlag; } 1352 Void setHighPrecisionOffsetsEnabledFlag(Bool value) { m_highPrecisionOffsetsEnabledFlag = value; } 1353 1354 Bool getPersistentRiceAdaptationEnabledFlag() const { return m_persistentRiceAdaptationEnabledFlag; } 1355 Void setPersistentRiceAdaptationEnabledFlag(const Bool value) { m_persistentRiceAdaptationEnabledFlag = value; } 1356 1357 Bool getCabacBypassAlignmentEnabledFlag() const { return m_cabacBypassAlignmentEnabledFlag; } 1358 Void setCabacBypassAlignmentEnabledFlag(const Bool value) { m_cabacBypassAlignmentEnabledFlag = value; } 1359 }; 1306 1360 1307 1361 /// SPS class … … 1345 1399 BitDepths m_bitDepths; 1346 1400 Int m_qpBDOffset[MAX_NUM_CHANNEL_TYPE]; 1347 Bool m_useExtendedPrecision;1348 Bool m_useHighPrecisionPredictionWeighting;1349 Bool m_useResidualRotation;1350 Bool m_useSingleSignificanceMapContext;1351 Bool m_useGolombRiceParameterAdaptation;1352 Bool m_alignCABACBeforeBypass;1353 Bool m_useResidualDPCM[NUMBER_OF_RDPCM_SIGNALLING_MODES];1354 1401 Int m_pcmBitDepths[MAX_NUM_CHANNEL_TYPE]; 1355 1402 Bool m_bPCMFilterDisableFlag; 1356 Bool m_disableIntraReferenceSmoothing;1357 1403 1358 1404 UInt m_uiBitsForPOC; … … 1377 1423 Bool m_vuiParametersPresentFlag; 1378 1424 TComVUI m_vuiParameters; 1425 1426 TComSPSRExt m_spsRangeExtension; 1379 1427 1380 1428 static const Int m_winUnitX[MAX_CHROMA_FORMAT_IDC+1]; … … 1486 1534 #endif 1487 1535 const BitDepths& getBitDepths() const { return m_bitDepths; } 1488 Int getMaxLog2TrDynamicRange(ChannelType channelType) const { return get UseExtendedPrecision() ? std::max<Int>(15, Int(m_bitDepths.recon[channelType] + 6)) : 15; }1536 Int getMaxLog2TrDynamicRange(ChannelType channelType) const { return getSpsRangeExtension().getExtendedPrecisionProcessingFlag() ? std::max<Int>(15, Int(m_bitDepths.recon[channelType] + 6)) : 15; } 1489 1537 1490 1538 Int getDifferentialLumaChromaBitDepth() const { return Int(m_bitDepths.recon[CHANNEL_TYPE_LUMA]) - Int(m_bitDepths.recon[CHANNEL_TYPE_CHROMA]); } 1491 1539 Int getQpBDOffset(ChannelType type) const { return m_qpBDOffset[type]; } 1492 1540 Void setQpBDOffset(ChannelType type, Int i) { m_qpBDOffset[type] = i; } 1493 Bool getUseExtendedPrecision() const { return m_useExtendedPrecision; }1494 Void setUseExtendedPrecision(Bool value) { m_useExtendedPrecision = value; }1495 Bool getUseHighPrecisionPredictionWeighting() const { return m_useHighPrecisionPredictionWeighting; }1496 Void setUseHighPrecisionPredictionWeighting(Bool value) { m_useHighPrecisionPredictionWeighting = value; }1497 1541 1498 1542 Void setUseSAO(Bool bVal) { m_bUseSAO = bVal; } 1499 1543 Bool getUseSAO() const { return m_bUseSAO; } 1500 1501 Bool getUseResidualRotation() const { return m_useResidualRotation; }1502 Void setUseResidualRotation(const Bool value) { m_useResidualRotation = value; }1503 1504 Bool getUseSingleSignificanceMapContext() const { return m_useSingleSignificanceMapContext; }1505 Void setUseSingleSignificanceMapContext(const Bool value) { m_useSingleSignificanceMapContext = value; }1506 1507 Bool getUseGolombRiceParameterAdaptation() const { return m_useGolombRiceParameterAdaptation; }1508 Void setUseGolombRiceParameterAdaptation(const Bool value) { m_useGolombRiceParameterAdaptation = value; }1509 1510 Bool getAlignCABACBeforeBypass() const { return m_alignCABACBeforeBypass; }1511 Void setAlignCABACBeforeBypass(const Bool value) { m_alignCABACBeforeBypass = value; }1512 1513 Bool getUseResidualDPCM(const RDPCMSignallingMode signallingMode) const { return m_useResidualDPCM[signallingMode]; }1514 Void setUseResidualDPCM(const RDPCMSignallingMode signallingMode, const Bool value) { m_useResidualDPCM[signallingMode] = value; }1515 1544 1516 1545 UInt getMaxTLayers() const { return m_uiMaxTLayers; } … … 1523 1552 Void setPCMFilterDisableFlag( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } 1524 1553 Bool getPCMFilterDisableFlag() const { return m_bPCMFilterDisableFlag; } 1525 Void setDisableIntraReferenceSmoothing(Bool bValue) { m_disableIntraReferenceSmoothing=bValue; }1526 Bool getDisableIntraReferenceSmoothing() const { return m_disableIntraReferenceSmoothing; }1527 1554 1528 1555 Bool getScalingListFlag() const { return m_scalingListEnabledFlag; } … … 1548 1575 const TComPTL* getPTL() const { return &m_pcPTL; } 1549 1576 TComPTL* getPTL() { return &m_pcPTL; } 1577 1578 const TComSPSRExt& getSpsRangeExtension() const { return m_spsRangeExtension; } 1579 TComSPSRExt& getSpsRangeExtension() { return m_spsRangeExtension; } 1580 1581 // Sequence parameter set range extension syntax 1582 // WAS: getUseResidualRotation and setUseResidualRotation 1583 // Now getSpsRangeExtension().getTransformSkipRotationEnabledFlag and getSpsRangeExtension().setTransformSkipRotationEnabledFlag 1584 1585 // WAS: getUseSingleSignificanceMapContext and setUseSingleSignificanceMapContext 1586 // Now: getSpsRangeExtension().getTransformSkipContextEnabledFlag and getSpsRangeExtension().setTransformSkipContextEnabledFlag 1587 1588 // WAS: getUseResidualDPCM and setUseResidualDPCM 1589 // Now: getSpsRangeExtension().getRdpcmEnabledFlag and getSpsRangeExtension().setRdpcmEnabledFlag and 1590 1591 // WAS: getUseExtendedPrecision and setUseExtendedPrecision 1592 // Now: getSpsRangeExtension().getExtendedPrecisionProcessingFlag and getSpsRangeExtension().setExtendedPrecisionProcessingFlag 1593 1594 // WAS: getDisableIntraReferenceSmoothing and setDisableIntraReferenceSmoothing 1595 // Now: getSpsRangeExtension().getIntraSmoothingDisabledFlag and getSpsRangeExtension().setIntraSmoothingDisabledFlag 1596 1597 // WAS: getUseHighPrecisionPredictionWeighting and setUseHighPrecisionPredictionWeighting 1598 // Now: getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag and getSpsRangeExtension().setHighPrecisionOffsetsEnabledFlag 1599 1600 // WAS: getUseGolombRiceParameterAdaptation and setUseGolombRiceParameterAdaptation 1601 // Now: getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag and getSpsRangeExtension().setPersistentRiceAdaptationEnabledFlag 1602 1603 // WAS: getAlignCABACBeforeBypass and setAlignCABACBeforeBypass 1604 // Now: getSpsRangeExtension().getCabacBypassAlignmentEnabledFlag and getSpsRangeExtension().setCabacBypassAlignmentEnabledFlag 1550 1605 1551 1606 #if SVC_EXTENSION … … 1602 1657 }; 1603 1658 1659 1660 1661 /// PPS RExt class 1662 class TComPPSRExt // Names aligned to text specification 1663 { 1664 private: 1665 Int m_log2MaxTransformSkipBlockSize; 1666 Bool m_crossComponentPredictionEnabledFlag; 1667 1668 // Chroma QP Adjustments 1669 Int m_diffCuChromaQpOffsetDepth; 1670 Int m_chromaQpOffsetListLen; // size (excludes the null entry used in the following array). 1671 ChromaQpAdj m_ChromaQpAdjTableIncludingNullEntry[1+MAX_QP_OFFSET_LIST_SIZE]; //!< Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise 1672 1673 UInt m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE]; 1674 1675 public: 1676 TComPPSRExt(); 1677 1678 Bool settingsDifferFromDefaults(const bool bTransformSkipEnabledFlag) const 1679 { 1680 return (bTransformSkipEnabledFlag && (getLog2MaxTransformSkipBlockSize() !=2)) 1681 || (getCrossComponentPredictionEnabledFlag() ) 1682 || (getChromaQpOffsetListEnabledFlag() ) 1683 || (getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA) !=0 ) 1684 || (getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) !=0 ); 1685 } 1686 1687 UInt getLog2MaxTransformSkipBlockSize() const { return m_log2MaxTransformSkipBlockSize; } 1688 Void setLog2MaxTransformSkipBlockSize( UInt u ) { m_log2MaxTransformSkipBlockSize = u; } 1689 1690 Bool getCrossComponentPredictionEnabledFlag() const { return m_crossComponentPredictionEnabledFlag; } 1691 Void setCrossComponentPredictionEnabledFlag(Bool value) { m_crossComponentPredictionEnabledFlag = value; } 1692 1693 Void clearChromaQpOffsetList() { m_chromaQpOffsetListLen = 0; } 1694 1695 UInt getDiffCuChromaQpOffsetDepth () const { return m_diffCuChromaQpOffsetDepth; } 1696 Void setDiffCuChromaQpOffsetDepth ( UInt u ) { m_diffCuChromaQpOffsetDepth = u; } 1697 1698 Bool getChromaQpOffsetListEnabledFlag() const { return getChromaQpOffsetListLen()>0; } 1699 Int getChromaQpOffsetListLen() const { return m_chromaQpOffsetListLen; } 1700 1701 const ChromaQpAdj& getChromaQpOffsetListEntry( Int cuChromaQpOffsetIdxPlus1 ) const 1702 { 1703 assert(cuChromaQpOffsetIdxPlus1 < m_chromaQpOffsetListLen+1); 1704 return m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1]; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise 1705 } 1706 1707 Void setChromaQpOffsetListEntry( Int cuChromaQpOffsetIdxPlus1, Int cbOffset, Int crOffset ) 1708 { 1709 assert (cuChromaQpOffsetIdxPlus1 != 0 && cuChromaQpOffsetIdxPlus1 <= MAX_QP_OFFSET_LIST_SIZE); 1710 m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1].u.comp.CbOffset = cbOffset; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise 1711 m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1].u.comp.CrOffset = crOffset; 1712 m_chromaQpOffsetListLen = max(m_chromaQpOffsetListLen, cuChromaQpOffsetIdxPlus1); 1713 } 1714 1715 // Now: getPpsRangeExtension().getLog2SaoOffsetScale and getPpsRangeExtension().setLog2SaoOffsetScale 1716 UInt getLog2SaoOffsetScale(ChannelType type) const { return m_log2SaoOffsetScale[type]; } 1717 Void setLog2SaoOffsetScale(ChannelType type, UInt uiBitShift) { m_log2SaoOffsetScale[type] = uiBitShift; } 1718 1719 }; 1720 1721 1604 1722 /// PPS class 1605 1723 class TComPPS … … 1616 1734 UInt m_uiMaxCuDQPDepth; 1617 1735 1618 // Chroma QP Adjustments1619 Int m_MaxCuChromaQpAdjDepth;1620 Int m_ChromaQpAdjTableSize; // size (excludes the null entry used in the following array).1621 ChromaQpAdj m_ChromaQpAdjTableIncludingNullEntry[1+MAX_QP_OFFSET_LIST_SIZE]; //!< Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise1622 1623 1736 Int m_chromaCbQpOffset; 1624 1737 Int m_chromaCrQpOffset; … … 1630 1743 Bool m_useWeightedBiPred; //!< Use of Weighting Bi-Prediction (B_SLICE) 1631 1744 Bool m_OutputFlagPresentFlag; //!< Indicates the presence of output_flag in slice header 1632 Bool m_useCrossComponentPrediction;1633 UInt m_saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];1634 1745 Bool m_TransquantBypassEnableFlag; //!< Indicates presence of cu_transquant_bypass_flag in CUs. 1635 1746 Bool m_useTransformSkip; 1636 Int m_transformSkipLog2MaxSize;1637 1747 Bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices 1638 1748 Bool m_tilesEnabledFlag; //!< Indicates the presence of tiles … … 1662 1772 UInt m_log2ParallelMergeLevelMinus2; 1663 1773 Int m_numExtraSliceHeaderBits; 1774 1775 TComPPSRExt m_ppsRangeExtension; 1664 1776 1665 1777 #if SVC_EXTENSION … … 1724 1836 } 1725 1837 1726 Void setMaxCuChromaQpAdjDepth ( UInt u ) { m_MaxCuChromaQpAdjDepth = u; }1727 UInt getMaxCuChromaQpAdjDepth () const { return m_MaxCuChromaQpAdjDepth; }1728 Void clearChromaQpAdjTable() { m_ChromaQpAdjTableSize = 0; }1729 Int getChromaQpAdjTableSize() const { return m_ChromaQpAdjTableSize; }1730 1731 const ChromaQpAdj& getChromaQpAdjTableAt( Int cuChromaQpOffsetIdxPlus1 ) const1732 {1733 assert(cuChromaQpOffsetIdxPlus1 < m_ChromaQpAdjTableSize+1);1734 return m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1]; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise1735 }1736 1737 Void setChromaQpAdjTableAt( Int cuChromaQpOffsetIdxPlus1, Int cbOffset, Int crOffset )1738 {1739 assert (cuChromaQpOffsetIdxPlus1 != 0 && cuChromaQpOffsetIdxPlus1 <= MAX_QP_OFFSET_LIST_SIZE);1740 m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1].u.comp.CbOffset = cbOffset; // Array includes entry [0] for the null offset used when cu_chroma_qp_offset_flag=0, and entries [cu_chroma_qp_offset_idx+1...] otherwise1741 m_ChromaQpAdjTableIncludingNullEntry[cuChromaQpOffsetIdxPlus1].u.comp.CrOffset = crOffset;1742 m_ChromaQpAdjTableSize = max(m_ChromaQpAdjTableSize, cuChromaQpOffsetIdxPlus1);1743 }1744 1745 1838 Void setNumRefIdxL0DefaultActive(UInt ui) { m_numRefIdxL0DefaultActive=ui; } 1746 1839 UInt getNumRefIdxL0DefaultActive() const { return m_numRefIdxL0DefaultActive; } … … 1753 1846 Void setWPBiPred( Bool b ) { m_useWeightedBiPred = b; } 1754 1847 1755 Bool getUseCrossComponentPrediction() const { return m_useCrossComponentPrediction; }1756 Void setUseCrossComponentPrediction(Bool value) { m_useCrossComponentPrediction = value; }1757 1758 UInt getSaoOffsetBitShift(ChannelType type) const { return m_saoOffsetBitShift[type]; }1759 Void setSaoOffsetBitShift(ChannelType type, UInt uiBitShift) { m_saoOffsetBitShift[type] = uiBitShift; }1760 1761 1848 Void setOutputFlagPresentFlag( Bool b ) { m_OutputFlagPresentFlag = b; } 1762 1849 Bool getOutputFlagPresentFlag() const { return m_OutputFlagPresentFlag; } … … 1766 1853 Bool getUseTransformSkip() const { return m_useTransformSkip; } 1767 1854 Void setUseTransformSkip( Bool b ) { m_useTransformSkip = b; } 1768 UInt getTransformSkipLog2MaxSize() const { return m_transformSkipLog2MaxSize; }1769 Void setTransformSkipLog2MaxSize( UInt u ) { m_transformSkipLog2MaxSize = u; }1770 1855 1771 1856 Void setLoopFilterAcrossTilesEnabledFlag(Bool b) { m_loopFilterAcrossTilesEnabledFlag = b; } … … 1818 1903 Bool getSliceHeaderExtensionPresentFlag() const { return m_sliceHeaderExtensionPresentFlag; } 1819 1904 Void setSliceHeaderExtensionPresentFlag(Bool val) { m_sliceHeaderExtensionPresentFlag = val; } 1905 1906 const TComPPSRExt& getPpsRangeExtension() const { return m_ppsRangeExtension; } 1907 TComPPSRExt& getPpsRangeExtension() { return m_ppsRangeExtension; } 1908 1909 // WAS: getTransformSkipLog2MaxSize and setTransformSkipLog2MaxSize 1910 // Now: getPpsRangeExtension().getLog2MaxTransformSkipBlockSize and getPpsRangeExtension().setLog2MaxTransformSkipBlockSize 1911 1912 // WAS: getUseCrossComponentPrediction and setUseCrossComponentPrediction 1913 // Now: getPpsRangeExtension().getCrossComponentPredictionEnabledFlag and getPpsRangeExtension().setCrossComponentPredictionEnabledFlag 1914 1915 // WAS: clearChromaQpAdjTable 1916 // Now: getPpsRangeExtension().clearChromaQpOffsetList 1917 1918 // WAS: getMaxCuChromaQpAdjDepth and setMaxCuChromaQpAdjDepth 1919 // Now: getPpsRangeExtension().getDiffCuChromaQpOffsetDepth and getPpsRangeExtension().setDiffCuChromaQpOffsetDepth 1920 1921 // WAS: getChromaQpAdjTableSize 1922 // Now: getPpsRangeExtension().getChromaQpOffsetListLen 1923 1924 // WAS: getChromaQpAdjTableAt and setChromaQpAdjTableAt 1925 // Now: getPpsRangeExtension().getChromaQpOffsetListEntry and getPpsRangeExtension().setChromaQpOffsetListEntry 1926 1927 // WAS: getSaoOffsetBitShift and setSaoOffsetBitShift 1928 // Now: getPpsRangeExtension().getLog2SaoOffsetScale and getPpsRangeExtension().setLog2SaoOffsetScale 1929 1820 1930 #if SVC_EXTENSION 1821 1931 Int getExtensionFlag() const { return m_extensionFlag; } … … 2257 2367 } 2258 2368 2259 WPACDCParam* getWpAcDcParam() { return &m_weightACDCParam[0]; } 2260 2369 Void getWpAcDcParam( WPACDCParam *&wp ); 2261 2370 Void initWpAcDcParam(); 2262 2371 -
branches/SHM-dev/source/Lib/TLibCommon/TComTU.cpp
r1259 r1316 237 237 { 238 238 // rotation only for 4x4 intra, and is only used for non-transformed blocks (the latter is not checked here) 239 return getCU()->getSlice()->getSPS()->get UseResidualRotation()239 return getCU()->getSlice()->getSPS()->getSpsRangeExtension().getTransformSkipRotationEnabledFlag() 240 240 && mRect[compID].width == 4 241 241 && getCU()->isIntra(GetAbsPartIdxTU()); -
branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp
r1307 r1316 109 109 chromaQpOffset += cu.getSlice()->getSliceChromaQpDelta(compID); 110 110 111 chromaQpOffset += cu.getSlice()->getPPS()->get ChromaQpAdjTableAt(cu.getChromaQpAdj(0)).u.offset[Int(compID)-1];111 chromaQpOffset += cu.getSlice()->getPPS()->getPpsRangeExtension().getChromaQpOffsetListEntry(cu.getChromaQpAdj(0)).u.offset[Int(compID)-1]; 112 112 } 113 113 … … 1206 1206 // Represents scaling through forward transform 1207 1207 Int iTransformShift = getTransformShift(channelBitDepth, uiLog2TrSize, maxLog2TrDynamicRange); 1208 if (useTransformSkip && pcCU->getSlice()->getSPS()->get UseExtendedPrecision())1208 if (useTransformSkip && pcCU->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag()) 1209 1209 { 1210 1210 iTransformShift = std::max<Int>(0, iTransformShift); … … 1294 1294 // Represents scaling through forward transform 1295 1295 Int iTransformShift = getTransformShift(channelBitDepth, uiLog2TrSize, maxLog2TrDynamicRange); 1296 if (useTransformSkip && pcCU->getSlice()->getSPS()->get UseExtendedPrecision())1296 if (useTransformSkip && pcCU->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag()) 1297 1297 { 1298 1298 iTransformShift = std::max<Int>(0, iTransformShift); … … 1356 1356 1357 1357 // Represents scaling through forward transform 1358 const Bool bClipTransformShiftTo0 = (pcCU->getTransformSkip(uiAbsPartIdx, compID) != 0) && pcCU->getSlice()->getSPS()->get UseExtendedPrecision();1358 const Bool bClipTransformShiftTo0 = (pcCU->getTransformSkip(uiAbsPartIdx, compID) != 0) && pcCU->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag(); 1359 1359 const Int originalTransformShift = getTransformShift(channelBitDepth, uiLog2TrSize, maxLog2TrDynamicRange); 1360 1360 const Int iTransformShift = bClipTransformShiftTo0 ? std::max<Int>(0, originalTransformShift) : originalTransformShift; … … 1708 1708 UInt absPartIdxTU = rTu.GetAbsPartIdxTU(); 1709 1709 UInt uiTrMode=rTu.GetTransformDepthRel(); 1710 if( (pcCU->getCbf(absPartIdxTU, compID, uiTrMode) == 0) && (isLuma(compID) || !pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction()) )1710 if( (pcCU->getCbf(absPartIdxTU, compID, uiTrMode) == 0) && (isLuma(compID) || !pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) ) 1711 1711 { 1712 1712 return; … … 2052 2052 2053 2053 Int iTransformShift = getTransformShift(channelBitDepth, rTu.GetEquivalentLog2TrSize(component), maxLog2TrDynamicRange); 2054 if (rTu.getCU()->getSlice()->getSPS()->get UseExtendedPrecision())2054 if (rTu.getCU()->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag()) 2055 2055 { 2056 2056 iTransformShift = std::max<Int>(0, iTransformShift); … … 2109 2109 2110 2110 Int iTransformShift = getTransformShift(channelBitDepth, rTu.GetEquivalentLog2TrSize(component), maxLog2TrDynamicRange); 2111 if (rTu.getCU()->getSlice()->getSPS()->get UseExtendedPrecision())2111 if (rTu.getCU()->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag()) 2112 2112 { 2113 2113 iTransformShift = std::max<Int>(0, iTransformShift); … … 2173 2173 const UInt uiLog2TrSize = rTu.GetEquivalentLog2TrSize(compID); 2174 2174 2175 const Bool extendedPrecision = pcCU->getSlice()->getSPS()->get UseExtendedPrecision();2175 const Bool extendedPrecision = pcCU->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag(); 2176 2176 const Int maxLog2TrDynamicRange = pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID)); 2177 2177 #if SVC_EXTENSION … … 2189 2189 // Represents scaling through forward transform 2190 2190 Int iTransformShift = getTransformShift(channelBitDepth, uiLog2TrSize, maxLog2TrDynamicRange); 2191 if ((pcCU->getTransformSkip(uiAbsPartIdx, compID) != 0) && pcCU->getSlice()->getSPS()->getUseExtendedPrecision())2191 if ((pcCU->getTransformSkip(uiAbsPartIdx, compID) != 0) && extendedPrecision) 2192 2192 { 2193 2193 iTransformShift = std::max<Int>(0, iTransformShift); 2194 2194 } 2195 2195 2196 const Bool bUseGolombRiceParameterAdaptation = pcCU->getSlice()->getSPS()->get UseGolombRiceParameterAdaptation();2196 const Bool bUseGolombRiceParameterAdaptation = pcCU->getSlice()->getSPS()->getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag(); 2197 2197 const UInt initialGolombRiceParameter = m_pcEstBitsSbac->golombRiceAdaptationStatistics[rTu.getGolombRiceStatisticsIndex(compID)] / RExt__GOLOMB_RICE_INCREMENT_DIVISOR; 2198 2198 UInt uiGoRiceParam = initialGolombRiceParameter; -
branches/SHM-dev/source/Lib/TLibCommon/TComWeightPrediction.cpp
r1287 r1316 226 226 227 227 const UInt numValidComponent = pcCU->getPic()->getNumberValidComponents(); 228 const Bool bUseHighPrecisionPredictionWeighting = pcSlice->getSPS()->get UseHighPrecisionPredictionWeighting();228 const Bool bUseHighPrecisionPredictionWeighting = pcSlice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag(); 229 229 230 230 if ( bBiDir ) -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1307 r1316 363 363 { 364 364 case PPS_EXT__REXT: 365 assert(!bSkipTrailingExtensionBits);366 367 if (pcPPS->getUseTransformSkip())368 365 { 369 READ_UVLC( uiCode, "log2_max_transform_skip_block_size_minus2"); 370 pcPPS->setTransformSkipLog2MaxSize(uiCode+2); 366 TComPPSRExt &ppsRangeExtension = pcPPS->getPpsRangeExtension(); 367 assert(!bSkipTrailingExtensionBits); 368 369 if (pcPPS->getUseTransformSkip()) 370 { 371 READ_UVLC( uiCode, "log2_max_transform_skip_block_size_minus2"); 372 ppsRangeExtension.setLog2MaxTransformSkipBlockSize(uiCode+2); 373 } 374 375 READ_FLAG( uiCode, "cross_component_prediction_enabled_flag"); 376 ppsRangeExtension.setCrossComponentPredictionEnabledFlag(uiCode != 0); 377 378 READ_FLAG( uiCode, "chroma_qp_offset_list_enabled_flag"); 379 if (uiCode == 0) 380 { 381 ppsRangeExtension.clearChromaQpOffsetList(); 382 ppsRangeExtension.setDiffCuChromaQpOffsetDepth(0); 383 } 384 else 385 { 386 READ_UVLC(uiCode, "diff_cu_chroma_qp_offset_depth"); ppsRangeExtension.setDiffCuChromaQpOffsetDepth(uiCode); 387 UInt tableSizeMinus1 = 0; 388 READ_UVLC(tableSizeMinus1, "chroma_qp_offset_list_len_minus1"); 389 assert(tableSizeMinus1 < MAX_QP_OFFSET_LIST_SIZE); 390 391 for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx <= (tableSizeMinus1); cuChromaQpOffsetIdx++) 392 { 393 Int cbOffset; 394 Int crOffset; 395 READ_SVLC(cbOffset, "cb_qp_offset_list[i]"); 396 assert(cbOffset >= -12 && cbOffset <= 12); 397 READ_SVLC(crOffset, "cr_qp_offset_list[i]"); 398 assert(crOffset >= -12 && crOffset <= 12); 399 // table uses +1 for index (see comment inside the function) 400 ppsRangeExtension.setChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1, cbOffset, crOffset); 401 } 402 assert(ppsRangeExtension.getChromaQpOffsetListLen() == tableSizeMinus1 + 1); 403 } 404 405 READ_UVLC( uiCode, "log2_sao_offset_scale_luma"); 406 ppsRangeExtension.setLog2SaoOffsetScale(CHANNEL_TYPE_LUMA, uiCode); 407 READ_UVLC( uiCode, "log2_sao_offset_scale_chroma"); 408 ppsRangeExtension.setLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA, uiCode); 371 409 } 372 373 READ_FLAG( uiCode, "cross_component_prediction_enabled_flag");374 pcPPS->setUseCrossComponentPrediction(uiCode != 0);375 376 READ_FLAG( uiCode, "chroma_qp_offset_list_enabled_flag");377 if (uiCode == 0)378 {379 pcPPS->clearChromaQpAdjTable();380 pcPPS->setMaxCuChromaQpAdjDepth(0);381 }382 else383 {384 READ_UVLC(uiCode, "diff_cu_chroma_qp_offset_depth"); pcPPS->setMaxCuChromaQpAdjDepth(uiCode);385 UInt tableSizeMinus1 = 0;386 READ_UVLC(tableSizeMinus1, "chroma_qp_offset_list_len_minus1");387 assert(tableSizeMinus1 < MAX_QP_OFFSET_LIST_SIZE);388 389 for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx <= (tableSizeMinus1); cuChromaQpOffsetIdx++)390 {391 Int cbOffset;392 Int crOffset;393 READ_SVLC(cbOffset, "cb_qp_offset_list[i]");394 assert(cbOffset >= -12 && cbOffset <= 12);395 READ_SVLC(crOffset, "cr_qp_offset_list[i]");396 assert(crOffset >= -12 && crOffset <= 12);397 // table uses +1 for index (see comment inside the function)398 pcPPS->setChromaQpAdjTableAt(cuChromaQpOffsetIdx+1, cbOffset, crOffset);399 }400 assert(pcPPS->getChromaQpAdjTableSize() == tableSizeMinus1 + 1);401 }402 403 READ_UVLC( uiCode, "log2_sao_offset_scale_luma");404 pcPPS->setSaoOffsetBitShift(CHANNEL_TYPE_LUMA, uiCode);405 READ_UVLC( uiCode, "log2_sao_offset_scale_chroma");406 pcPPS->setSaoOffsetBitShift(CHANNEL_TYPE_CHROMA, uiCode);407 410 break; 408 411 … … 986 989 case SPS_EXT__REXT: 987 990 assert(!bSkipTrailingExtensionBits); 988 989 READ_FLAG( uiCode, "transform_skip_rotation_enabled_flag"); pcSPS->setUseResidualRotation (uiCode != 0); 990 READ_FLAG( uiCode, "transform_skip_context_enabled_flag"); pcSPS->setUseSingleSignificanceMapContext (uiCode != 0); 991 READ_FLAG( uiCode, "implicit_rdpcm_enabled_flag"); pcSPS->setUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT, (uiCode != 0)); 992 READ_FLAG( uiCode, "explicit_rdpcm_enabled_flag"); pcSPS->setUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT, (uiCode != 0)); 993 READ_FLAG( uiCode, "extended_precision_processing_flag"); pcSPS->setUseExtendedPrecision (uiCode != 0); 994 READ_FLAG( uiCode, "intra_smoothing_disabled_flag"); pcSPS->setDisableIntraReferenceSmoothing (uiCode != 0); 995 READ_FLAG( uiCode, "high_precision_offsets_enabled_flag"); pcSPS->setUseHighPrecisionPredictionWeighting (uiCode != 0); 996 READ_FLAG( uiCode, "persistent_rice_adaptation_enabled_flag"); pcSPS->setUseGolombRiceParameterAdaptation (uiCode != 0); 997 READ_FLAG( uiCode, "cabac_bypass_alignment_enabled_flag"); pcSPS->setAlignCABACBeforeBypass (uiCode != 0); 991 { 992 TComSPSRExt &spsRangeExtension = pcSPS->getSpsRangeExtension(); 993 READ_FLAG( uiCode, "transform_skip_rotation_enabled_flag"); spsRangeExtension.setTransformSkipRotationEnabledFlag(uiCode != 0); 994 READ_FLAG( uiCode, "transform_skip_context_enabled_flag"); spsRangeExtension.setTransformSkipContextEnabledFlag (uiCode != 0); 995 READ_FLAG( uiCode, "implicit_rdpcm_enabled_flag"); spsRangeExtension.setRdpcmEnabledFlag(RDPCM_SIGNAL_IMPLICIT, (uiCode != 0)); 996 READ_FLAG( uiCode, "explicit_rdpcm_enabled_flag"); spsRangeExtension.setRdpcmEnabledFlag(RDPCM_SIGNAL_EXPLICIT, (uiCode != 0)); 997 READ_FLAG( uiCode, "extended_precision_processing_flag"); spsRangeExtension.setExtendedPrecisionProcessingFlag (uiCode != 0); 998 READ_FLAG( uiCode, "intra_smoothing_disabled_flag"); spsRangeExtension.setIntraSmoothingDisabledFlag (uiCode != 0); 999 READ_FLAG( uiCode, "high_precision_offsets_enabled_flag"); spsRangeExtension.setHighPrecisionOffsetsEnabledFlag (uiCode != 0); 1000 READ_FLAG( uiCode, "persistent_rice_adaptation_enabled_flag"); spsRangeExtension.setPersistentRiceAdaptationEnabledFlag (uiCode != 0); 1001 READ_FLAG( uiCode, "cabac_bypass_alignment_enabled_flag"); spsRangeExtension.setCabacBypassAlignmentEnabledFlag (uiCode != 0); 1002 } 998 1003 break; 999 1004 #if SVC_EXTENSION … … 1850 1855 } 1851 1856 1852 if (pps->get ChromaQpAdjTableSize() > 0)1857 if (pps->getPpsRangeExtension().getChromaQpOffsetListEnabledFlag()) 1853 1858 { 1854 1859 READ_FLAG(uiCode, "cu_chroma_qp_offset_enabled_flag"); pcSlice->setUseChromaQpAdj(uiCode != 0); … … 2483 2488 READ_SVLC( wp[COMPONENT_Y].iOffset, iNumRef==0?"luma_offset_l0[i]":"luma_offset_l1[i]" ); 2484 2489 #if SVC_EXTENSION 2485 Int range=sps->get UseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128;2490 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128; 2486 2491 #else 2487 Int range=sps->get UseHighPrecisionPredictionWeighting() ? (1<<sps->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128;2492 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<sps->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128; 2488 2493 #endif 2489 2494 assert( wp[0].iOffset >= -range ); … … 2500 2505 { 2501 2506 #if SVC_EXTENSION 2502 Int range=sps->get UseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;2507 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128; 2503 2508 #else 2504 Int range=sps->get UseHighPrecisionPredictionWeighting() ? (1<<sps->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;2509 Int range=sps->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<sps->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128; 2505 2510 #endif 2506 2511 for ( Int j=1 ; j<numValidComp ; j++ ) -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp
r1315 r1316 244 244 } 245 245 246 if( uiDepth == pps.get MaxCuChromaQpAdjDepth() && pcCU->getSlice()->getUseChromaQpAdj() )246 if( uiDepth == pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth() && pcCU->getSlice()->getUseChromaQpAdj() ) 247 247 { 248 248 setIsChromaQpAdjCoded(true); … … 286 286 } 287 287 288 if( uiDepth <= pps.get MaxCuChromaQpAdjDepth() && pcCU->getSlice()->getUseChromaQpAdj() )288 if( uiDepth <= pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth() && pcCU->getSlice()->getUseChromaQpAdj() ) 289 289 { 290 290 setIsChromaQpAdjCoded(true); … … 576 576 Bool bLeftAvail = false; 577 577 578 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->get DisableIntraReferenceSmoothing());578 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 579 579 580 580 #ifdef DEBUG_STRING -
branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp
r1315 r1316 851 851 TComDataCU *pcCU = rTu.getCU(); 852 852 853 if( isLuma(compID) || !pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction() )853 if( isLuma(compID) || !pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() ) 854 854 { 855 855 return; … … 983 983 #endif 984 984 985 Int tableSize = cu->getSlice()->getPPS()->getChromaQpAdjTableSize();986 987 / * cu_chroma_qp_adjustment_flag */985 Int chromaQpOffsetListLen = cu->getSlice()->getPPS()->getPpsRangeExtension().getChromaQpOffsetListLen(); 986 987 // cu_chroma_qp_offset_flag 988 988 m_pcTDecBinIf->decodeBin( symbol, m_ChromaQpAdjFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) ); 989 989 990 if (symbol && tableSize> 1)991 { 992 / * cu_chroma_qp_adjustment_idc */993 xReadUnaryMaxSymbol( symbol, &m_ChromaQpAdjIdcSCModel.get( 0, 0, 0 ), 0, tableSize- 1 RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) );990 if (symbol && chromaQpOffsetListLen > 1) 991 { 992 // cu_chroma_qp_offset_idx 993 xReadUnaryMaxSymbol( symbol, &m_ChromaQpAdjIdcSCModel.get( 0, 0, 0 ), 0, chromaQpOffsetListLen - 1 RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) ); 994 994 symbol++; 995 995 } … … 1113 1113 } 1114 1114 1115 if (!TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(component), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize()))1115 if (!TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(component), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize())) 1116 1116 { 1117 1117 return; … … 1286 1286 1287 1287 const ChannelType channelType = toChannelType(compID); 1288 const Bool extendedPrecision = sps.get UseExtendedPrecision();1289 1290 const Bool alignCABACBeforeBypass = sps.get AlignCABACBeforeBypass();1288 const Bool extendedPrecision = sps.getSpsRangeExtension().getExtendedPrecisionProcessingFlag(); 1289 1290 const Bool alignCABACBeforeBypass = sps.getSpsRangeExtension().getCabacBypassAlignmentEnabledFlag(); 1291 1291 const Int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(channelType); 1292 1292 … … 1351 1351 //-------------------------------------------------------------------------------------------------- 1352 1352 1353 const Bool bUseGolombRiceParameterAdaptation = sps.get UseGolombRiceParameterAdaptation();1353 const Bool bUseGolombRiceParameterAdaptation = sps.getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag(); 1354 1354 UInt ¤tGolombRiceStatistic = m_golombRiceAdaptationStatistics[rTu.getGolombRiceStatisticsIndex(compID)]; 1355 1355 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1307 r1316 433 433 434 434 #if RExt__HIGH_BIT_DEPTH_SUPPORT==0 435 if (sps->get UseExtendedPrecision() || sps->getBitDepth(CHANNEL_TYPE_LUMA)>12 || sps->getBitDepth(CHANNEL_TYPE_CHROMA)>12 )435 if (sps->getSpsRangeExtension().getExtendedPrecisionProcessingFlag() || sps->getBitDepth(CHANNEL_TYPE_LUMA)>12 || sps->getBitDepth(CHANNEL_TYPE_CHROMA)>12 ) 436 436 { 437 437 printf("High bit depth support must be enabled at compile-time in order to decode this bitstream\n"); … … 604 604 // Initialise the various objects for the new set of settings 605 605 #if SVC_EXTENSION 606 m_cSAO.create( pSlice->getPicWidthInLumaSamples(), pSlice->getPicHeightInLumaSamples(), pSlice->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->get SaoOffsetBitShift(CHANNEL_TYPE_LUMA), pps->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA) );606 m_cSAO.create( pSlice->getPicWidthInLumaSamples(), pSlice->getPicHeightInLumaSamples(), pSlice->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) ); 607 607 #else 608 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->get SaoOffsetBitShift(CHANNEL_TYPE_LUMA), pps->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA) );608 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA), pps->getPpsRangeExtension().getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA) ); 609 609 #endif 610 610 m_cLoopFilter.create( sps->getMaxTotalCUDepth() ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1307 r1316 228 228 Bool pps_extension_flags[NUM_PPS_EXTENSION_FLAGS]={false}; 229 229 230 pps_extension_flags[PPS_EXT__REXT] = ( 231 ( pcPPS->getUseTransformSkip() && (pcPPS->getTransformSkipLog2MaxSize() != 2)) 232 || pcPPS->getUseCrossComponentPrediction() 233 || ( pcPPS->getChromaQpAdjTableSize() > 0 ) 234 || ( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_LUMA) !=0 ) || ( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA) !=0 ) 235 ) 236 ; 230 pps_extension_flags[PPS_EXT__REXT] = pcPPS->getPpsRangeExtension().settingsDifferFromDefaults(pcPPS->getUseTransformSkip()); 237 231 238 232 // Other PPS extension flags checked here. … … 277 271 { 278 272 case PPS_EXT__REXT: 279 280 if (pcPPS->getUseTransformSkip())281 273 { 282 WRITE_UVLC( pcPPS->getTransformSkipLog2MaxSize()-2, "log2_max_transform_skip_block_size_minus2"); 274 const TComPPSRExt &ppsRangeExtension = pcPPS->getPpsRangeExtension(); 275 if (pcPPS->getUseTransformSkip()) 276 { 277 WRITE_UVLC( ppsRangeExtension.getLog2MaxTransformSkipBlockSize()-2, "log2_max_transform_skip_block_size_minus2"); 278 } 279 280 WRITE_FLAG((ppsRangeExtension.getCrossComponentPredictionEnabledFlag() ? 1 : 0), "cross_component_prediction_enabled_flag" ); 281 282 WRITE_FLAG(UInt(ppsRangeExtension.getChromaQpOffsetListEnabledFlag()), "chroma_qp_offset_list_enabled_flag" ); 283 if (ppsRangeExtension.getChromaQpOffsetListEnabledFlag()) 284 { 285 WRITE_UVLC(ppsRangeExtension.getDiffCuChromaQpOffsetDepth(), "diff_cu_chroma_qp_offset_depth"); 286 WRITE_UVLC(ppsRangeExtension.getChromaQpOffsetListLen() - 1, "chroma_qp_offset_list_len_minus1"); 287 /* skip zero index */ 288 for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx < ppsRangeExtension.getChromaQpOffsetListLen(); cuChromaQpOffsetIdx++) 289 { 290 WRITE_SVLC(ppsRangeExtension.getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CbOffset, "cb_qp_offset_list[i]"); 291 WRITE_SVLC(ppsRangeExtension.getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CrOffset, "cr_qp_offset_list[i]"); 292 } 293 } 294 295 WRITE_UVLC( ppsRangeExtension.getLog2SaoOffsetScale(CHANNEL_TYPE_LUMA), "log2_sao_offset_scale_luma" ); 296 WRITE_UVLC( ppsRangeExtension.getLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA), "log2_sao_offset_scale_chroma" ); 283 297 } 284 285 WRITE_FLAG((pcPPS->getUseCrossComponentPrediction() ? 1 : 0), "cross_component_prediction_enabled_flag" );286 287 WRITE_FLAG(UInt(pcPPS->getChromaQpAdjTableSize() > 0), "chroma_qp_offset_list_enabled_flag" );288 if (pcPPS->getChromaQpAdjTableSize() > 0)289 {290 WRITE_UVLC(pcPPS->getMaxCuChromaQpAdjDepth(), "diff_cu_chroma_qp_offset_depth");291 WRITE_UVLC(pcPPS->getChromaQpAdjTableSize() - 1, "chroma_qp_offset_list_len_minus1");292 /* skip zero index */293 for (Int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx < pcPPS->getChromaQpAdjTableSize(); cuChromaQpOffsetIdx++)294 {295 WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(cuChromaQpOffsetIdx+1).u.comp.CbOffset, "cb_qp_offset_list[i]");296 WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(cuChromaQpOffsetIdx+1).u.comp.CrOffset, "cr_qp_offset_list[i]");297 }298 }299 300 WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_LUMA), "log2_sao_offset_scale_luma" );301 WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA), "log2_sao_offset_scale_chroma" );302 298 break; 299 303 300 #if SVC_EXTENSION 304 301 case PPS_EXT__MLAYER: … … 713 710 Bool sps_extension_flags[NUM_SPS_EXTENSION_FLAGS]={false}; 714 711 715 sps_extension_flags[SPS_EXT__REXT] = ( 716 pcSPS->getUseResidualRotation() 717 || pcSPS->getUseSingleSignificanceMapContext() 718 || pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT) 719 || pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT) 720 || pcSPS->getUseExtendedPrecision() 721 || pcSPS->getDisableIntraReferenceSmoothing() 722 || pcSPS->getUseHighPrecisionPredictionWeighting() 723 || pcSPS->getUseGolombRiceParameterAdaptation() 724 || pcSPS->getAlignCABACBeforeBypass() 725 ); 712 sps_extension_flags[SPS_EXT__REXT] = pcSPS->getSpsRangeExtension().settingsDifferFromDefaults(); 726 713 727 714 // Other SPS extension flags checked here. … … 762 749 { 763 750 case SPS_EXT__REXT: 764 765 WRITE_FLAG( (pcSPS->getUseResidualRotation() ? 1 : 0), "transform_skip_rotation_enabled_flag"); 766 WRITE_FLAG( (pcSPS->getUseSingleSignificanceMapContext() ? 1 : 0), "transform_skip_context_enabled_flag"); 767 WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT) ? 1 : 0), "implicit_rdpcm_enabled_flag" ); 768 WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT) ? 1 : 0), "explicit_rdpcm_enabled_flag" ); 769 WRITE_FLAG( (pcSPS->getUseExtendedPrecision() ? 1 : 0), "extended_precision_processing_flag" ); 770 WRITE_FLAG( (pcSPS->getDisableIntraReferenceSmoothing() ? 1 : 0), "intra_smoothing_disabled_flag" ); 771 WRITE_FLAG( (pcSPS->getUseHighPrecisionPredictionWeighting() ? 1 : 0), "high_precision_offsets_enabled_flag" ); 772 WRITE_FLAG( (pcSPS->getUseGolombRiceParameterAdaptation() ? 1 : 0), "persistent_rice_adaptation_enabled_flag" ); 773 WRITE_FLAG( (pcSPS->getAlignCABACBeforeBypass() ? 1 : 0), "cabac_bypass_alignment_enabled_flag" ); 751 { 752 const TComSPSRExt &spsRangeExtension=pcSPS->getSpsRangeExtension(); 753 754 WRITE_FLAG( (spsRangeExtension.getTransformSkipRotationEnabledFlag() ? 1 : 0), "transform_skip_rotation_enabled_flag"); 755 WRITE_FLAG( (spsRangeExtension.getTransformSkipContextEnabledFlag() ? 1 : 0), "transform_skip_context_enabled_flag"); 756 WRITE_FLAG( (spsRangeExtension.getRdpcmEnabledFlag(RDPCM_SIGNAL_IMPLICIT) ? 1 : 0), "implicit_rdpcm_enabled_flag" ); 757 WRITE_FLAG( (spsRangeExtension.getRdpcmEnabledFlag(RDPCM_SIGNAL_EXPLICIT) ? 1 : 0), "explicit_rdpcm_enabled_flag" ); 758 WRITE_FLAG( (spsRangeExtension.getExtendedPrecisionProcessingFlag() ? 1 : 0), "extended_precision_processing_flag" ); 759 WRITE_FLAG( (spsRangeExtension.getIntraSmoothingDisabledFlag() ? 1 : 0), "intra_smoothing_disabled_flag" ); 760 WRITE_FLAG( (spsRangeExtension.getHighPrecisionOffsetsEnabledFlag() ? 1 : 0), "high_precision_offsets_enabled_flag" ); 761 WRITE_FLAG( (spsRangeExtension.getPersistentRiceAdaptationEnabledFlag() ? 1 : 0), "persistent_rice_adaptation_enabled_flag" ); 762 WRITE_FLAG( (spsRangeExtension.getCabacBypassAlignmentEnabledFlag() ? 1 : 0), "cabac_bypass_alignment_enabled_flag" ); 774 763 break; 764 } 775 765 #if SVC_EXTENSION 776 766 case SPS_EXT__MLAYER: … … 1299 1289 } 1300 1290 1301 if (pcSlice->getPPS()->get ChromaQpAdjTableSize() > 0)1291 if (pcSlice->getPPS()->getPpsRangeExtension().getChromaQpOffsetListEnabledFlag()) 1302 1292 { 1303 1293 WRITE_FLAG(pcSlice->getUseChromaQpAdj(), "cu_chroma_qp_offset_enabled_flag"); … … 1715 1705 1716 1706 #if SVC_EXTENSION 1717 Int range=pcSlice->getSPS()->get UseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;1707 Int range=pcSlice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128; 1718 1708 #else 1719 Int range=pcSlice->getSPS()->get UseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;1709 Int range=pcSlice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag() ? (1<<pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128; 1720 1710 #endif 1721 1711 Int pred = ( range - ( ( range*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1311 r1316 177 177 Int m_iMaxDeltaQP; // Max. absolute delta QP (1:default) 178 178 Int m_iMaxCuDQPDepth; // Max. depth for a minimum CuDQP (0:default) 179 Int m_ maxCUChromaQpAdjustmentDepth;179 Int m_diffCuChromaQpOffsetDepth; ///< If negative, then do not apply chroma qp offsets. 180 180 181 181 Int m_chromaCbQpOffset; // Chroma Cb QP Offset (0:default) … … 186 186 Bool m_bUseAdaptQpSelect; 187 187 #endif 188 Bool m_ useExtendedPrecision;189 Bool m_ useHighPrecisionPredictionWeighting;188 Bool m_extendedPrecisionProcessingFlag; 189 Bool m_highPrecisionOffsetsEnabledFlag; 190 190 Bool m_bUseAdaptiveQP; 191 191 Int m_iQPAdaptationRange; … … 206 206 Bool m_bUseCbfFastMode; 207 207 Bool m_useEarlySkipDetection; 208 Bool m_ useCrossComponentPrediction;208 Bool m_crossComponentPredictionEnabledFlag; 209 209 Bool m_reconBasedCrossCPredictionEstimate; 210 UInt m_ saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE];210 UInt m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE]; 211 211 Bool m_useTransformSkip; 212 212 Bool m_useTransformSkipFast; 213 UInt m_ transformSkipLog2MaxSize;214 Bool m_ useResidualRotation;215 Bool m_ useSingleSignificanceMapContext;216 Bool m_ useGolombRiceParameterAdaptation;217 Bool m_ alignCABACBeforeBypass;218 Bool m_ useResidualDPCM[NUMBER_OF_RDPCM_SIGNALLING_MODES];213 UInt m_log2MaxTransformSkipBlockSize; 214 Bool m_transformSkipRotationEnabledFlag; 215 Bool m_transformSkipContextEnabledFlag; 216 Bool m_persistentRiceAdaptationEnabledFlag; 217 Bool m_cabacBypassAlignmentEnabledFlag; 218 Bool m_rdpcmEnabledFlag[NUMBER_OF_RDPCM_SIGNALLING_MODES]; 219 219 Int* m_aidQP; 220 220 UInt m_uiDeltaQpRD; … … 235 235 Bool m_bPCMInputBitDepthFlag; 236 236 Bool m_bPCMFilterDisableFlag; 237 Bool m_ disableIntraReferenceSmoothing;237 Bool m_intraSmoothingDisabledFlag; 238 238 Bool m_loopFilterAcrossTilesEnabledFlag; 239 239 Bool m_tileUniformSpacingFlag; … … 551 551 Void setMaxCuDQPDepth ( Int i ) { m_iMaxCuDQPDepth = i; } 552 552 553 Int get MaxCUChromaQpAdjustmentDepth () const { return m_maxCUChromaQpAdjustmentDepth; }554 Void set MaxCUChromaQpAdjustmentDepth (Int value) { m_maxCUChromaQpAdjustmentDepth = value; }553 Int getDiffCuChromaQpOffsetDepth () const { return m_diffCuChromaQpOffsetDepth; } 554 Void setDiffCuChromaQpOffsetDepth (Int value) { m_diffCuChromaQpOffsetDepth = value; } 555 555 556 556 Void setChromaCbQpOffset ( Int i ) { m_chromaCbQpOffset = i; } … … 565 565 #endif 566 566 567 Bool get UseExtendedPrecision () const { return m_useExtendedPrecision; }568 Void set UseExtendedPrecision (Bool value) { m_useExtendedPrecision= value; }569 570 Bool get UseHighPrecisionPredictionWeighting() const { return m_useHighPrecisionPredictionWeighting; }571 Void set UseHighPrecisionPredictionWeighting(Bool value) { m_useHighPrecisionPredictionWeighting = value; }567 Bool getExtendedPrecisionProcessingFlag () const { return m_extendedPrecisionProcessingFlag; } 568 Void setExtendedPrecisionProcessingFlag (Bool value) { m_extendedPrecisionProcessingFlag = value; } 569 570 Bool getHighPrecisionOffsetsEnabledFlag() const { return m_highPrecisionOffsetsEnabledFlag; } 571 Void setHighPrecisionOffsetsEnabledFlag(Bool value) { m_highPrecisionOffsetsEnabledFlag = value; } 572 572 573 573 Void setUseAdaptiveQP ( Bool b ) { m_bUseAdaptiveQP = b; } … … 662 662 UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } 663 663 664 Bool get UseCrossComponentPrediction () const { return m_useCrossComponentPrediction; }665 Void set UseCrossComponentPrediction (const Bool value) { m_useCrossComponentPrediction= value; }664 Bool getCrossComponentPredictionEnabledFlag () const { return m_crossComponentPredictionEnabledFlag; } 665 Void setCrossComponentPredictionEnabledFlag (const Bool value) { m_crossComponentPredictionEnabledFlag = value; } 666 666 Bool getUseReconBasedCrossCPredictionEstimate () const { return m_reconBasedCrossCPredictionEstimate; } 667 667 Void setUseReconBasedCrossCPredictionEstimate (const Bool value) { m_reconBasedCrossCPredictionEstimate = value; } 668 Void set SaoOffsetBitShift(ChannelType type, UInt uiBitShift) { m_saoOffsetBitShift[type] = uiBitShift; }668 Void setLog2SaoOffsetScale(ChannelType type, UInt uiBitShift) { m_log2SaoOffsetScale[type] = uiBitShift; } 669 669 670 670 Bool getUseTransformSkip () { return m_useTransformSkip; } 671 671 Void setUseTransformSkip ( Bool b ) { m_useTransformSkip = b; } 672 Bool get UseResidualRotation () const { return m_useResidualRotation; }673 Void set UseResidualRotation (const Bool value) { m_useResidualRotation= value; }674 Bool get UseSingleSignificanceMapContext () const { return m_useSingleSignificanceMapContext; }675 Void set UseSingleSignificanceMapContext (const Bool value) { m_useSingleSignificanceMapContext= value; }676 Bool get UseGolombRiceParameterAdaptation () const { return m_useGolombRiceParameterAdaptation; }677 Void set UseGolombRiceParameterAdaptation (const Bool value) { m_useGolombRiceParameterAdaptation= value; }678 Bool get AlignCABACBeforeBypass () const { return m_alignCABACBeforeBypass; }679 Void set AlignCABACBeforeBypass (const Bool value) { m_alignCABACBeforeBypass= value; }680 Bool get UseResidualDPCM (const RDPCMSignallingMode signallingMode) const { return m_useResidualDPCM[signallingMode]; }681 Void set UseResidualDPCM (const RDPCMSignallingMode signallingMode, const Bool value) { m_useResidualDPCM[signallingMode] = value; }672 Bool getTransformSkipRotationEnabledFlag () const { return m_transformSkipRotationEnabledFlag; } 673 Void setTransformSkipRotationEnabledFlag (const Bool value) { m_transformSkipRotationEnabledFlag = value; } 674 Bool getTransformSkipContextEnabledFlag () const { return m_transformSkipContextEnabledFlag; } 675 Void setTransformSkipContextEnabledFlag (const Bool value) { m_transformSkipContextEnabledFlag = value; } 676 Bool getPersistentRiceAdaptationEnabledFlag () const { return m_persistentRiceAdaptationEnabledFlag; } 677 Void setPersistentRiceAdaptationEnabledFlag (const Bool value) { m_persistentRiceAdaptationEnabledFlag = value; } 678 Bool getCabacBypassAlignmentEnabledFlag () const { return m_cabacBypassAlignmentEnabledFlag; } 679 Void setCabacBypassAlignmentEnabledFlag (const Bool value) { m_cabacBypassAlignmentEnabledFlag = value; } 680 Bool getRdpcmEnabledFlag (const RDPCMSignallingMode signallingMode) const { return m_rdpcmEnabledFlag[signallingMode]; } 681 Void setRdpcmEnabledFlag (const RDPCMSignallingMode signallingMode, const Bool value) { m_rdpcmEnabledFlag[signallingMode] = value; } 682 682 Bool getUseTransformSkipFast () { return m_useTransformSkipFast; } 683 683 Void setUseTransformSkipFast ( Bool b ) { m_useTransformSkipFast = b; } 684 UInt get TransformSkipLog2MaxSize () const { return m_transformSkipLog2MaxSize; }685 Void set TransformSkipLog2MaxSize ( UInt u ) { m_transformSkipLog2MaxSize = u; }686 Void setDisableIntraReferenceSmoothing (Bool bValue) { m_disableIntraReferenceSmoothing=bValue; }687 Bool getDisableIntraReferenceSmoothing () const { return m_disableIntraReferenceSmoothing; }684 UInt getLog2MaxTransformSkipBlockSize () const { return m_log2MaxTransformSkipBlockSize; } 685 Void setLog2MaxTransformSkipBlockSize ( UInt u ) { m_log2MaxTransformSkipBlockSize = u; } 686 Bool getIntraSmoothingDisabledFlag () const { return m_intraSmoothingDisabledFlag; } 687 Void setIntraSmoothingDisabledFlag (Bool bValue) { m_intraSmoothingDisabledFlag=bValue; } 688 688 689 689 Int* getdQPs () { return m_aidQP; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp
r1314 r1316 97 97 } 98 98 99 m_bEncodeDQP = false;100 m_ CodeChromaQpAdjFlag= false;101 m_ ChromaQpAdjIdc= 0;99 m_bEncodeDQP = false; 100 m_stillToCodeChromaQpOffsetFlag = false; 101 m_cuChromaQpOffsetIdxPlus1 = 0; 102 102 103 103 // initialize partition order. … … 486 486 } 487 487 488 m_ ChromaQpAdjIdc= 0;488 m_cuChromaQpOffsetIdxPlus1 = 0; 489 489 if (pcSlice->getUseChromaQpAdj()) 490 490 { … … 495 495 */ 496 496 Int lgMinCuSize = sps.getLog2MinCodingBlockSize() + 497 std::max<Int>(0, sps.getLog2DiffMaxMinCodingBlockSize()-Int(pps.get MaxCuChromaQpAdjDepth()));498 m_ ChromaQpAdjIdc = ((uiLPelX >> lgMinCuSize) + (uiTPelY >> lgMinCuSize)) % (pps.getChromaQpAdjTableSize() + 1);497 std::max<Int>(0, sps.getLog2DiffMaxMinCodingBlockSize()-Int(pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth())); 498 m_cuChromaQpOffsetIdxPlus1 = ((uiLPelX >> lgMinCuSize) + (uiTPelY >> lgMinCuSize)) % (pps.getPpsRangeExtension().getChromaQpOffsetListLen() + 1); 499 499 } 500 500 … … 1095 1095 } 1096 1096 1097 if( uiDepth == pps.get MaxCuChromaQpAdjDepth() && pcSlice->getUseChromaQpAdj())1097 if( uiDepth == pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth() && pcSlice->getUseChromaQpAdj()) 1098 1098 { 1099 1099 setCodeChromaQpAdjFlag(true); … … 1122 1122 } 1123 1123 1124 if( uiDepth <= pps.get MaxCuChromaQpAdjDepth() && pcSlice->getUseChromaQpAdj())1124 if( uiDepth <= pps.getPpsRangeExtension().getDiffCuChromaQpOffsetDepth() && pcSlice->getUseChromaQpAdj()) 1125 1125 { 1126 1126 setCodeChromaQpAdjFlag(true); … … 1357 1357 rpcTempCU->setPredModeSubParts( MODE_INTER, 0, uhDepth ); // interprets depth relative to CTU level 1358 1358 rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag, 0, uhDepth ); 1359 rpcTempCU->setChromaQpAdjSubParts( bTransquantBypassFlag ? 0 : m_ ChromaQpAdjIdc, 0, uhDepth );1359 rpcTempCU->setChromaQpAdjSubParts( bTransquantBypassFlag ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth ); 1360 1360 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level 1361 1361 rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to CTU level … … 1453 1453 rpcTempCU->setPartSizeSubParts ( ePartSize, 0, uhDepth ); 1454 1454 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 1455 rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_ ChromaQpAdjIdc, 0, uhDepth );1455 rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth ); 1456 1456 1457 1457 #if SVC_EXTENSION … … 1508 1508 rpcTempCU->setPartSizeSubParts( eSize, 0, uiDepth ); 1509 1509 rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth ); 1510 rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_ ChromaQpAdjIdc, 0, uiDepth );1510 rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uiDepth ); 1511 1511 1512 1512 Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE * MAX_CU_SIZE]; … … 1573 1573 rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth ); 1574 1574 rpcTempCU->setTrIdxSubParts ( 0, 0, uiDepth ); 1575 rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_ ChromaQpAdjIdc, 0, uiDepth );1575 rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uiDepth ); 1576 1576 1577 1577 m_pcPredSearch->IPCMSearch( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth]); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.h
r1307 r1316 81 81 // Data : encoder control 82 82 Bool m_bEncodeDQP; 83 Bool m_ CodeChromaQpAdjFlag;84 Int m_ ChromaQpAdjIdc;83 Bool m_stillToCodeChromaQpOffsetFlag; //indicates whether chroma QP offset flag needs to coded at this particular CU granularity. 84 Int m_cuChromaQpOffsetIdxPlus1; // if 0, then cu_chroma_qp_offset_flag will be 0, otherwise cu_chroma_qp_offset_flag will be 1. 85 85 86 86 // Access channel … … 162 162 Void setdQPFlag ( Bool b ) { m_bEncodeDQP = b; } 163 163 164 Bool getCodeChromaQpAdjFlag() { return m_ CodeChromaQpAdjFlag; }165 Void setCodeChromaQpAdjFlag( Bool b ) { m_ CodeChromaQpAdjFlag = b; }164 Bool getCodeChromaQpAdjFlag() { return m_stillToCodeChromaQpOffsetFlag; } 165 Void setCodeChromaQpAdjFlag( Bool b ) { m_stillToCodeChromaQpOffsetFlag = b; } 166 166 167 167 #if ADAPTIVE_QP_SELECTION -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp
r1315 r1316 839 839 TComDataCU *pcCU = rTu.getCU(); 840 840 841 if( isLuma(compID) || !pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction() )841 if( isLuma(compID) || !pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() ) 842 842 { 843 843 return; … … 915 915 { 916 916 Int internalIdc = cu->getChromaQpAdj( absPartIdx ); 917 Int tableSize = cu->getSlice()->getPPS()->getChromaQpAdjTableSize();917 Int chromaQpOffsetListLen = cu->getSlice()->getPPS()->getPpsRangeExtension().getChromaQpOffsetListLen(); 918 918 /* internal_idc == 0 => flag = 0 919 919 * internal_idc > 1 => code idc value (if table size warrents) */ 920 920 m_pcBinIf->encodeBin( internalIdc > 0, m_ChromaQpAdjFlagSCModel.get( 0, 0, 0 ) ); 921 921 922 if (internalIdc > 0 && tableSize> 1)923 { 924 xWriteUnaryMaxSymbol( internalIdc - 1, &m_ChromaQpAdjIdcSCModel.get( 0, 0, 0 ), 0, tableSize- 1 );922 if (internalIdc > 0 && chromaQpOffsetListLen > 1) 923 { 924 xWriteUnaryMaxSymbol( internalIdc - 1, &m_ChromaQpAdjIdcSCModel.get( 0, 0, 0 ), 0, chromaQpOffsetListLen - 1 ); 925 925 } 926 926 } … … 1013 1013 } 1014 1014 1015 if (!TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(component), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize()))1015 if (!TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(component), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize())) 1016 1016 { 1017 1017 return; … … 1252 1252 1253 1253 const ChannelType channelType = toChannelType(compID); 1254 const Bool extendedPrecision = sps.get UseExtendedPrecision();1255 1256 const Bool alignCABACBeforeBypass = sps.get AlignCABACBeforeBypass();1254 const Bool extendedPrecision = sps.getSpsRangeExtension().getExtendedPrecisionProcessingFlag(); 1255 1256 const Bool alignCABACBeforeBypass = sps.getSpsRangeExtension().getCabacBypassAlignmentEnabledFlag(); 1257 1257 const Int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(channelType); 1258 1258 … … 1309 1309 //-------------------------------------------------------------------------------------------------- 1310 1310 1311 const Bool bUseGolombRiceParameterAdaptation = sps.get UseGolombRiceParameterAdaptation();1311 const Bool bUseGolombRiceParameterAdaptation = sps.getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag(); 1312 1312 UInt ¤tGolombRiceStatistic = m_golombRiceAdaptationStatistics[rTu.getGolombRiceStatisticsIndex(compID)]; 1313 1313 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1315 r1316 968 968 TCoeff* pcCoeff = bRealCoeff ? pcCU->getCoeff(component) : m_ppcQTTempCoeff[component][uiQTLayer]; 969 969 970 if (isChroma(component) && (pcCU->getCbf( rTu.GetAbsPartIdxTU(), COMPONENT_Y, uiTrMode ) != 0) && pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction() )970 if (isChroma(component) && (pcCU->getCbf( rTu.GetAbsPartIdxTU(), COMPONENT_Y, uiTrMode ) != 0) && pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() ) 971 971 { 972 972 m_pcEntropyCoder->encodeCrossComponentPrediction( rTu, component ); … … 1173 1173 #endif 1174 1174 { 1175 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, sps.get DisableIntraReferenceSmoothing());1175 const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(compID, uiChFinalMode, uiWidth, uiHeight, chFmt, sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 1176 1176 1177 1177 initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, compID, bUseFilteredPredictions DEBUG_STRING_PASS_INTO(sDebug) ); … … 1234 1234 } 1235 1235 1236 if (pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction())1236 if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 1237 1237 { 1238 1238 if (bUseCrossCPrediction) … … 1307 1307 Pel* pRecIPred = piRecIPred; 1308 1308 1309 if (pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction())1309 if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 1310 1310 { 1311 1311 if (bUseCrossCPrediction) … … 1465 1465 Bool checkTransformSkip = pcCU->getSlice()->getPPS()->getUseTransformSkip(); 1466 1466 Int bestModeId[MAX_NUM_COMPONENT] = { 0, 0, 0}; 1467 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize());1467 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize()); 1468 1468 checkTransformSkip &= (!pcCU->getCUTransquantBypass(0)); 1469 1469 … … 1533 1533 } 1534 1534 1535 if (pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction())1535 if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 1536 1536 { 1537 1537 const Int xOffset = rTu.getRect( COMPONENT_Y ).x0; … … 1600 1600 dSingleCost = m_pcRdCost->calcRdCost( uiSingleBits, uiSingleDistLuma ); 1601 1601 1602 if (pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction())1602 if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 1603 1603 { 1604 1604 const Int xOffset = rTu.getRect( COMPONENT_Y ).x0; … … 1673 1673 dRDCost += dSplitCost; 1674 1674 1675 if (pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction())1675 if (pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 1676 1676 { 1677 1677 const Int xOffset = rTu.getRect( COMPONENT_Y ).x0; … … 1947 1947 1948 1948 Bool checkTransformSkip = pcCU->getSlice()->getPPS()->getUseTransformSkip(); 1949 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Cb), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize());1949 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Cb), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize()); 1950 1950 1951 1951 if ( m_pcEncCfg->getUseTransformSkipFast() ) 1952 1952 { 1953 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize());1953 checkTransformSkip &= TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(COMPONENT_Y), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize()); 1954 1954 1955 1955 if (checkTransformSkip) … … 1995 1995 1996 1996 const Bool checkCrossComponentPrediction = (pcCU->getIntraDir(CHANNEL_TYPE_CHROMA, subTUAbsPartIdx) == DM_CHROMA_IDX) 1997 && pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction()1997 && pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() 1998 1998 && (pcCU->getCbf(subTUAbsPartIdx, COMPONENT_Y, uiTrDepth) != 0); 1999 1999 … … 2323 2323 #endif 2324 2324 2325 const Bool bUseFilter=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, uiMode, puRect.width, puRect.height, chFmt, sps.get DisableIntraReferenceSmoothing());2325 const Bool bUseFilter=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, uiMode, puRect.width, puRect.height, chFmt, sps.getSpsRangeExtension().getIntraSmoothingDisabledFlag()); 2326 2326 2327 2327 predIntraAng( COMPONENT_Y, uiMode, piOrg, uiStride, piPred, uiStride, tuRecurseWithPU, bAboveAvail, bLeftAvail, bUseFilter, TComPrediction::UseDPCMForFirstPassIntraEstimation(tuRecurseWithPU, uiMode) ); … … 2435 2435 xSetIntraResultLumaQT( pcRecoYuv, tuRecurseWithPU ); 2436 2436 2437 if (pps.get UseCrossComponentPrediction())2437 if (pps.getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 2438 2438 { 2439 2439 const Int xOffset = tuRecurseWithPU.getRect( COMPONENT_Y ).x0; … … 2511 2511 xSetIntraResultLumaQT( pcRecoYuv, tuRecurseWithPU ); 2512 2512 2513 if (pps.get UseCrossComponentPrediction())2513 if (pps.getPpsRangeExtension().getCrossComponentPredictionEnabledFlag()) 2514 2514 { 2515 2515 const Int xOffset = tuRecurseWithPU.getRect( COMPONENT_Y ).x0; … … 4762 4762 4763 4763 checkTransformSkip[compID] = pcCU->getSlice()->getPPS()->getUseTransformSkip() && 4764 TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(compID), pcCU->getSlice()->getPPS()->get TransformSkipLog2MaxSize()) &&4764 TUCompRectHasAssociatedTransformSkipFlag(rTu.getRect(compID), pcCU->getSlice()->getPPS()->getPpsRangeExtension().getLog2MaxTransformSkipBlockSize()) && 4765 4765 (!pcCU->isLosslessCoded(0)); 4766 4766 … … 4783 4783 #endif 4784 4784 const Bool isCrossCPredictionAvailable = isChroma(compID) 4785 && pcCU->getSlice()->getPPS()->get UseCrossComponentPrediction()4785 && pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() 4786 4786 && (pcCU->getCbf(subTUAbsPartIdx, COMPONENT_Y, uiTrMode) != 0); 4787 4787 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r1307 r1316 502 502 rpcSlice->setSliceChromaQpDelta( COMPONENT_Cb, 0 ); 503 503 rpcSlice->setSliceChromaQpDelta( COMPONENT_Cr, 0 ); 504 rpcSlice->setUseChromaQpAdj( rpcSlice->getPPS()->get ChromaQpAdjTableSize() > 0);504 rpcSlice->setUseChromaQpAdj( rpcSlice->getPPS()->getPpsRangeExtension().getChromaQpOffsetListEnabledFlag() ); 505 505 rpcSlice->setNumRefIdx(REF_PIC_LIST_0,m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive); 506 506 rpcSlice->setNumRefIdx(REF_PIC_LIST_1,m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1309 r1316 121 121 if (m_bUseSAO) 122 122 { 123 m_cEncSAO.create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, m_maxTotalCUDepth, m_ saoOffsetBitShift[CHANNEL_TYPE_LUMA], m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] );123 m_cEncSAO.create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, m_maxTotalCUDepth, m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA], m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA] ); 124 124 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK 125 125 m_cEncSAO.createEncData(getSaoCtuBoundary()); … … 949 949 } 950 950 951 m_cSPS.setUseExtendedPrecision(m_useExtendedPrecision);952 m_cSPS.setUseHighPrecisionPredictionWeighting(m_useHighPrecisionPredictionWeighting);953 954 951 m_cSPS.setUseSAO( m_bUseSAO ); 955 m_cSPS.setUseResidualRotation(m_useResidualRotation);956 m_cSPS.setUseSingleSignificanceMapContext(m_useSingleSignificanceMapContext);957 m_cSPS.setUseGolombRiceParameterAdaptation(m_useGolombRiceParameterAdaptation);958 m_cSPS.setAlignCABACBeforeBypass(m_alignCABACBeforeBypass);959 960 for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++)961 {962 m_cSPS.setUseResidualDPCM(RDPCMSignallingMode(signallingModeIndex), m_useResidualDPCM[signallingModeIndex]);963 }964 952 965 953 m_cSPS.setMaxTLayers( m_maxTempLayer ); … … 976 964 977 965 m_cSPS.setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag ); 978 m_cSPS.setDisableIntraReferenceSmoothing( m_disableIntraReferenceSmoothing );979 966 m_cSPS.setScalingListFlag ( (m_useScalingListId == SCALING_LIST_OFF) ? 0 : 1 ); 980 967 m_cSPS.setUseStrongIntraSmoothing( m_useStrongIntraSmoothing ); … … 1032 1019 m_cSPS.getVuiParameters()->setHrdParametersPresentFlag( true ); 1033 1020 } 1021 1022 // Set up SPS range extension settings 1023 m_cSPS.getSpsRangeExtension().setTransformSkipRotationEnabledFlag(m_transformSkipRotationEnabledFlag); 1024 m_cSPS.getSpsRangeExtension().setTransformSkipContextEnabledFlag(m_transformSkipContextEnabledFlag); 1025 for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++) 1026 { 1027 m_cSPS.getSpsRangeExtension().setRdpcmEnabledFlag(RDPCMSignallingMode(signallingModeIndex), m_rdpcmEnabledFlag[signallingModeIndex]); 1028 } 1029 m_cSPS.getSpsRangeExtension().setExtendedPrecisionProcessingFlag(m_extendedPrecisionProcessingFlag); 1030 m_cSPS.getSpsRangeExtension().setIntraSmoothingDisabledFlag( m_intraSmoothingDisabledFlag ); 1031 m_cSPS.getSpsRangeExtension().setHighPrecisionOffsetsEnabledFlag(m_highPrecisionOffsetsEnabledFlag); 1032 m_cSPS.getSpsRangeExtension().setPersistentRiceAdaptationEnabledFlag(m_persistentRiceAdaptationEnabledFlag); 1033 m_cSPS.getSpsRangeExtension().setCabacBypassAlignmentEnabledFlag(m_cabacBypassAlignmentEnabledFlag); 1034 1034 } 1035 1035 … … 1066 1066 } 1067 1067 1068 if ( m_maxCUChromaQpAdjustmentDepth >= 0 ) 1069 { 1070 m_cPPS.setMaxCuChromaQpAdjDepth(m_maxCUChromaQpAdjustmentDepth); 1071 m_cPPS.setChromaQpAdjTableAt(1, 6, 6); 1068 if ( m_diffCuChromaQpOffsetDepth >= 0 ) 1069 { 1070 m_cPPS.getPpsRangeExtension().setDiffCuChromaQpOffsetDepth(m_diffCuChromaQpOffsetDepth); 1071 m_cPPS.getPpsRangeExtension().clearChromaQpOffsetList(); 1072 m_cPPS.getPpsRangeExtension().setChromaQpOffsetListEntry(1, 6, 6); 1072 1073 /* todo, insert table entries from command line (NB, 0 should not be touched) */ 1073 1074 } 1074 1075 else 1075 1076 { 1076 m_cPPS.setMaxCuChromaQpAdjDepth(0); 1077 m_cPPS.clearChromaQpAdjTable(); 1078 } 1077 m_cPPS.getPpsRangeExtension().setDiffCuChromaQpOffsetDepth(0); 1078 m_cPPS.getPpsRangeExtension().clearChromaQpOffsetList(); 1079 } 1080 m_cPPS.getPpsRangeExtension().setCrossComponentPredictionEnabledFlag(m_crossComponentPredictionEnabledFlag); 1081 m_cPPS.getPpsRangeExtension().setLog2SaoOffsetScale(CHANNEL_TYPE_LUMA, m_log2SaoOffsetScale[CHANNEL_TYPE_LUMA ]); 1082 m_cPPS.getPpsRangeExtension().setLog2SaoOffsetScale(CHANNEL_TYPE_CHROMA, m_log2SaoOffsetScale[CHANNEL_TYPE_CHROMA]); 1079 1083 1080 1084 m_cPPS.setQpOffset(COMPONENT_Cb, m_chromaCbQpOffset ); … … 1085 1089 m_cPPS.setUseWP( m_useWeightedPred ); 1086 1090 m_cPPS.setWPBiPred( m_useWeightedBiPred ); 1087 m_cPPS.setUseCrossComponentPrediction(m_useCrossComponentPrediction);1088 m_cPPS.setSaoOffsetBitShift(CHANNEL_TYPE_LUMA, m_saoOffsetBitShift[CHANNEL_TYPE_LUMA ]);1089 m_cPPS.setSaoOffsetBitShift(CHANNEL_TYPE_CHROMA, m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA]);1090 1091 m_cPPS.setOutputFlagPresentFlag( false ); 1091 1092 m_cPPS.setSignHideFlag(getSignHideFlag()); … … 1145 1146 m_cPPS.setTransquantBypassEnableFlag(getTransquantBypassEnableFlag()); 1146 1147 m_cPPS.setUseTransformSkip( m_useTransformSkip ); 1147 m_cPPS. setTransformSkipLog2MaxSize( m_transformSkipLog2MaxSize );1148 m_cPPS.getPpsRangeExtension().setLog2MaxTransformSkipBlockSize( m_log2MaxTransformSkipBlockSize ); 1148 1149 1149 1150 if (m_sliceSegmentMode != NO_SLICES) -
branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r1287 r1316 112 112 } 113 113 114 const Int fixedBitShift = (slice->getSPS()->get UseHighPrecisionPredictionWeighting())?RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION:0;114 const Int fixedBitShift = (slice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag())?RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION:0; 115 115 weightACDCParam[compID].iDC = (((iOrgDC<<fixedBitShift)+(iSample>>1)) / iSample); 116 116 weightACDCParam[compID].iAC = iOrgAC; … … 204 204 { 205 205 const Int numComp = slice->getPic()->getPicYuvOrg()->getNumberValidComponents(); 206 const Bool bUseHighPrecisionWeighting = slice->getSPS()->get UseHighPrecisionPredictionWeighting();206 const Bool bUseHighPrecisionWeighting = slice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag(); 207 207 const Int numPredDir = slice->isInterP() ? 1 : 2; 208 208 … … 215 215 for ( Int refIdxTemp = 0; refIdxTemp < slice->getNumRefIdx(eRefPicList); refIdxTemp++ ) 216 216 { 217 WPACDCParam *currWeightACDCParam = slice->getWpAcDcParam(); 218 WPACDCParam *refWeightACDCParam = slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->getWpAcDcParam(); 217 WPACDCParam *currWeightACDCParam, *refWeightACDCParam; 218 slice->getWpAcDcParam(currWeightACDCParam); 219 slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->getWpAcDcParam(refWeightACDCParam); 219 220 220 221 #if SVC_EXTENSION … … 225 226 if( validILRPic ) 226 227 { 227 refWeightACDCParam = slice->getWpAcDcParam();228 slice->getWpAcDcParam(refWeightACDCParam); 228 229 } 229 230 #endif … … 332 333 const Int iDefaultWeight = ((Int)1<<log2Denom); 333 334 const Int iNumPredDir = slice->isInterP() ? 1 : 2; 334 const Bool useHighPrecisionPredictionWeighting = slice->getSPS()->get UseHighPrecisionPredictionWeighting();335 const Bool useHighPrecisionPredictionWeighting = slice->getSPS()->getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag(); 335 336 336 337 assert (iNumPredDir <= Int(NUM_REF_PIC_LIST_01));
Note: See TracChangeset for help on using the changeset viewer.