Changeset 1386 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComSlice.h
- Timestamp:
- 13 Nov 2015, 16:29:39 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComSlice.h
r1321 r1386 292 292 Void checkDcOfMatrix(); 293 293 Void processRefMatrix(UInt sizeId, UInt listId , UInt refListId ); 294 Bool xParseScalingList( Char* pchFile);294 Bool xParseScalingList(const std::string &fileName); 295 295 #if NH_MV 296 296 Void inferFrom ( const TComScalingList& srcScLi ); … … 1384 1384 /// VPS EXTENSION 2 SYNTAX ELEMENTS 1385 1385 Int getDepthId ( Int layerIdInNuh) const { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPTH_ID ); } 1386 #if NH_3D 1386 #if NH_3D_VSO 1387 1387 Bool getVpsDepthFlag ( Int layerIdInNuh) const { return (getDepthId( layerIdInNuh ) > 0); } 1388 Int getLayerIdInNuh ( Int viewIndex, Bool depthFlag ) const; 1389 1388 Int getLayerIdInNuh ( Int viewIndex, Bool depthFlag, Int auxId ) const; 1389 #endif 1390 #if NH_3D 1390 1391 Void createCamPars ( Int iNumViews ); 1391 1392 Void initCamParaVPS ( Int vOIdxInVps, Int numCp, Bool cpInSliceSegmentHeaderFlag, Int* cpRefVoi, Int** aaiScale, Int** aaiOffset ); … … 1426 1427 #endif 1427 1428 1428 template <typename T, typename S, typename U> Void xPrintArray( const Char* name, Int numElemDim1, U idx, S numElemDim2, T vec, Bool printNumber, Bool printIdx = true ) const1429 template <typename T, typename S, typename U> Void xPrintArray( const TChar* name, Int numElemDim1, U idx, S numElemDim2, T vec, Bool printNumber, Bool printIdx = true ) const 1429 1430 { 1430 1431 std::cout << std::endl; … … 1810 1811 for (Int d = 0; d < 2; d++) 1811 1812 { 1812 m_iv MvPredFlag [d] = false;1813 m_ivMvScal ingFlag [d] = false;1814 m_log2 SubPbSizeMinus3 [d] = 3;1815 m_ivResPred Flag [d] = false;1816 m_depthRef inementFlag [d] = false;1817 m_v iewSynthesisPredFlag [d] = false;1818 m_d epthBasedBlkPartFlag [d] = false;1819 m_ mpiFlag [d] = false;1820 m_log2 MpiSubPbSizeMinus3[d] = 3;1821 m_intraContour Flag [d] = false;1822 m_intra SdcWedgeFlag [d] = false;1823 m_ qtPredFlag [d] = false;1824 m_inter SdcFlag [d] = false;1825 m_ depthIntraSkipFlag [d] = false;1813 m_ivDiMcEnabledFlag [d] = false; 1814 m_ivMvScalEnabledFlag [d] = false; 1815 m_log2IvmcSubPbSizeMinus3 [d] = 3; 1816 m_ivResPredEnabledFlag [d] = false; 1817 m_depthRefEnabledFlag [d] = false; 1818 m_vspMcEnabledFlag [d] = false; 1819 m_dbbpEnabledFlag [d] = false; 1820 m_texMcEnabledFlag [d] = false; 1821 m_log2TexmcSubPbSizeMinus3[d] = 3; 1822 m_intraContourEnabledFlag [d] = false; 1823 m_intraDcOnlyWedgeEnabledFlag [d] = false; 1824 m_cqtCuPartPredEnabledFlag [d] = false; 1825 m_interDcOnlyEnabledFlag [d] = false; 1826 m_skipIntraEnabledFlag [d] = false; 1826 1827 } 1827 1828 } 1828 1829 1829 Void setIv MvPredFlag( Int d, Bool flag ) { m_ivMvPredFlag[d] = flag; }1830 Bool getIv MvPredFlag( Int d ) const { return m_ivMvPredFlag[d]; }1831 1832 Void setIvMvScal ingFlag( Int d, Bool flag ) { m_ivMvScalingFlag[d] = flag; }1833 Bool getIvMvScal ingFlag( Int d ) const { return m_ivMvScalingFlag[d]; }1834 1835 Void setLog2 SubPbSizeMinus3( Int d, Int val ) { m_log2SubPbSizeMinus3[d] = val; }1836 Int getLog2 SubPbSizeMinus3( Int d ) const { return m_log2SubPbSizeMinus3[d]; }1837 1838 Void setIvResPred Flag( Int d, Bool flag ) { m_ivResPredFlag[d] = flag; }1839 Bool getIvResPred Flag( Int d ) const { return m_ivResPredFlag[d]; }1840 1841 Void setDepthRef inementFlag( Int d, Bool flag ) { m_depthRefinementFlag[d] = flag; }1842 Bool getDepthRef inementFlag( Int d ) const { return m_depthRefinementFlag[d]; }1843 1844 Void setV iewSynthesisPredFlag( Int d, Bool flag ) { m_viewSynthesisPredFlag[d] = flag; }1845 Bool getV iewSynthesisPredFlag( Int d ) const { return m_viewSynthesisPredFlag[d]; }1846 1847 Void setD epthBasedBlkPartFlag( Int d, Bool flag ) { m_depthBasedBlkPartFlag[d] = flag; }1848 Bool getD epthBasedBlkPartFlag( Int d ) const { return m_depthBasedBlkPartFlag[d]; }1849 1850 Void set MpiFlag( Int d, Bool flag ) { m_mpiFlag[d] = flag; }1851 Bool get MpiFlag( Int d ) const { return m_mpiFlag[d]; }1852 1853 Void setLog2 MpiSubPbSizeMinus3( Int d, Int val ) { m_log2MpiSubPbSizeMinus3[d] = val; }1854 Int getLog2 MpiSubPbSizeMinus3( Int d ) const { return m_log2MpiSubPbSizeMinus3[d]; }1855 1856 Void setIntraContour Flag( Int d, Bool flag ) { m_intraContourFlag[d] = flag; }1857 Bool getIntraContour Flag( Int d ) const { return m_intraContourFlag[d]; }1858 1859 Void setIntra SdcWedgeFlag( Int d, Bool flag ) { m_intraSdcWedgeFlag[d] = flag; }1860 Bool getIntra SdcWedgeFlag( Int d ) const { return m_intraSdcWedgeFlag[d]; }1861 1862 Void set QtPredFlag( Int d, Bool flag ) { m_qtPredFlag[d] = flag; }1863 Bool get QtPredFlag( Int d ) const { return m_qtPredFlag[d]; }1864 1865 Void setInter SdcFlag( Int d, Bool flag ) { m_interSdcFlag[d] = flag; }1866 Bool getInter SdcFlag( Int d ) const { return m_interSdcFlag[d]; }1867 1868 Void set DepthIntraSkipFlag( Int d, Bool flag ) { m_depthIntraSkipFlag[d] = flag; }1869 Bool get DepthIntraSkipFlag( Int d ) const { return m_depthIntraSkipFlag[d]; }1830 Void setIvDiMcEnabledFlag( Int d, Bool flag ) { m_ivDiMcEnabledFlag[d] = flag; } 1831 Bool getIvDiMcEnabledFlag( Int d ) const { return m_ivDiMcEnabledFlag[d]; } 1832 1833 Void setIvMvScalEnabledFlag( Int d, Bool flag ) { m_ivMvScalEnabledFlag[d] = flag; } 1834 Bool getIvMvScalEnabledFlag( Int d ) const { return m_ivMvScalEnabledFlag[d]; } 1835 1836 Void setLog2IvmcSubPbSizeMinus3( Int d, Int val ) { m_log2IvmcSubPbSizeMinus3[d] = val; } 1837 Int getLog2IvmcSubPbSizeMinus3( Int d ) const { return m_log2IvmcSubPbSizeMinus3[d]; } 1838 1839 Void setIvResPredEnabledFlag( Int d, Bool flag ) { m_ivResPredEnabledFlag[d] = flag; } 1840 Bool getIvResPredEnabledFlag( Int d ) const { return m_ivResPredEnabledFlag[d]; } 1841 1842 Void setDepthRefEnabledFlag( Int d, Bool flag ) { m_depthRefEnabledFlag[d] = flag; } 1843 Bool getDepthRefEnabledFlag( Int d ) const { return m_depthRefEnabledFlag[d]; } 1844 1845 Void setVspMcEnabledFlag( Int d, Bool flag ) { m_vspMcEnabledFlag[d] = flag; } 1846 Bool getVspMcEnabledFlag( Int d ) const { return m_vspMcEnabledFlag[d]; } 1847 1848 Void setDbbpEnabledFlag( Int d, Bool flag ) { m_dbbpEnabledFlag[d] = flag; } 1849 Bool getDbbpEnabledFlag( Int d ) const { return m_dbbpEnabledFlag[d]; } 1850 1851 Void setTexMcEnabledFlag( Int d, Bool flag ) { m_texMcEnabledFlag[d] = flag; } 1852 Bool getTexMcEnabledFlag( Int d ) const { return m_texMcEnabledFlag[d]; } 1853 1854 Void setLog2TexmcSubPbSizeMinus3( Int d, Int val ) { m_log2TexmcSubPbSizeMinus3[d] = val; } 1855 Int getLog2TexmcSubPbSizeMinus3( Int d ) const { return m_log2TexmcSubPbSizeMinus3[d]; } 1856 1857 Void setIntraContourEnabledFlag( Int d, Bool flag ) { m_intraContourEnabledFlag[d] = flag; } 1858 Bool getIntraContourEnabledFlag( Int d ) const { return m_intraContourEnabledFlag[d]; } 1859 1860 Void setIntraDcOnlyWedgeEnabledFlag( Int d, Bool flag ) { m_intraDcOnlyWedgeEnabledFlag[d] = flag; } 1861 Bool getIntraDcOnlyWedgeEnabledFlag( Int d ) const { return m_intraDcOnlyWedgeEnabledFlag[d]; } 1862 1863 Void setCqtCuPartPredEnabledFlag( Int d, Bool flag ) { m_cqtCuPartPredEnabledFlag[d] = flag; } 1864 Bool getCqtCuPartPredEnabledFlag( Int d ) const { return m_cqtCuPartPredEnabledFlag[d]; } 1865 1866 Void setInterDcOnlyEnabledFlag( Int d, Bool flag ) { m_interDcOnlyEnabledFlag[d] = flag; } 1867 Bool getInterDcOnlyEnabledFlag( Int d ) const { return m_interDcOnlyEnabledFlag[d]; } 1868 1869 Void setSkipIntraEnabledFlag( Int d, Bool flag ) { m_skipIntraEnabledFlag[d] = flag; } 1870 Bool getSkipIntraEnabledFlag( Int d ) const { return m_skipIntraEnabledFlag[d]; } 1870 1871 private: 1871 1872 1872 Bool m_iv MvPredFlag [2];1873 Bool m_ivMvScal ingFlag[2];1874 Int m_log2 SubPbSizeMinus3[2];1875 Bool m_ivResPred Flag[2];1876 Bool m_depthRef inementFlag[2];1877 Bool m_v iewSynthesisPredFlag[2];1878 Bool m_d epthBasedBlkPartFlag[2];1879 Bool m_ mpiFlag[2];1880 Int m_log2 MpiSubPbSizeMinus3[2];1881 Bool m_intraContour Flag[2];1882 Bool m_intra SdcWedgeFlag[2];1883 Bool m_ qtPredFlag[2];1884 Bool m_inter SdcFlag[2];1885 Bool m_ depthIntraSkipFlag[2];1873 Bool m_ivDiMcEnabledFlag [2]; 1874 Bool m_ivMvScalEnabledFlag [2]; 1875 Int m_log2IvmcSubPbSizeMinus3 [2]; 1876 Bool m_ivResPredEnabledFlag [2]; 1877 Bool m_depthRefEnabledFlag [2]; 1878 Bool m_vspMcEnabledFlag [2]; 1879 Bool m_dbbpEnabledFlag [2]; 1880 Bool m_texMcEnabledFlag [2]; 1881 Int m_log2TexmcSubPbSizeMinus3 [2]; 1882 Bool m_intraContourEnabledFlag [2]; 1883 Bool m_intraDcOnlyWedgeEnabledFlag[2]; 1884 Bool m_cqtCuPartPredEnabledFlag [2]; 1885 Bool m_interDcOnlyEnabledFlag [2]; 1886 Bool m_skipIntraEnabledFlag [2]; 1886 1887 }; 1887 1888 … … 1955 1956 #if NH_MV 1956 1957 UInt m_uiSpsMaxLatencyIncreasePlus1[MAX_TLAYER]; 1957 // Calling a member m_uiMaxLatencyIncrease although it is m_uiMaxLatencyIncreasePlus1 is really bad style.1958 1958 #else 1959 UInt m_uiMaxLatencyIncrease [MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit)1959 UInt m_uiMaxLatencyIncreasePlus1[MAX_TLAYER]; 1960 1960 #endif 1961 1961 … … 2135 2135 Bool getScalingListPresentFlag() const { return m_scalingListPresentFlag; } 2136 2136 Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } 2137 Void setScalingList( TComScalingList *scalingList);2138 2137 TComScalingList& getScalingList() { return m_scalingList; } 2139 2138 const TComScalingList& getScalingList() const { return m_scalingList; } … … 2146 2145 Int getSpsMaxLatencyPictures( Int i ) const { return ( getSpsMaxNumReorderPics(i) + getSpsMaxLatencyIncreasePlus1(i)-1); } 2147 2146 #else 2148 UInt getMaxLatencyIncrease (UInt tlayer) const { return m_uiMaxLatencyIncrease[tlayer];}2149 Void setMaxLatencyIncrease ( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui;}2147 UInt getMaxLatencyIncreasePlus1(UInt tlayer) const { return m_uiMaxLatencyIncreasePlus1[tlayer]; } 2148 Void setMaxLatencyIncreasePlus1( UInt ui , UInt tlayer) { m_uiMaxLatencyIncreasePlus1[tlayer] = ui; } 2150 2149 #endif 2151 2150 … … 2166 2165 const TComSPSRExt& getSpsRangeExtension() const { return m_spsRangeExtension; } 2167 2166 TComSPSRExt& getSpsRangeExtension() { return m_spsRangeExtension; } 2168 2169 // Sequence parameter set range extension syntax2170 // WAS: getUseResidualRotation and setUseResidualRotation2171 // Now getSpsRangeExtension().getTransformSkipRotationEnabledFlag and getSpsRangeExtension().setTransformSkipRotationEnabledFlag2172 2173 // WAS: getUseSingleSignificanceMapContext and setUseSingleSignificanceMapContext2174 // Now: getSpsRangeExtension().getTransformSkipContextEnabledFlag and getSpsRangeExtension().setTransformSkipContextEnabledFlag2175 2176 // WAS: getUseResidualDPCM and setUseResidualDPCM2177 // Now: getSpsRangeExtension().getRdpcmEnabledFlag and getSpsRangeExtension().setRdpcmEnabledFlag and2178 2179 // WAS: getUseExtendedPrecision and setUseExtendedPrecision2180 // Now: getSpsRangeExtension().getExtendedPrecisionProcessingFlag and getSpsRangeExtension().setExtendedPrecisionProcessingFlag2181 2182 // WAS: getDisableIntraReferenceSmoothing and setDisableIntraReferenceSmoothing2183 // Now: getSpsRangeExtension().getIntraSmoothingDisabledFlag and getSpsRangeExtension().setIntraSmoothingDisabledFlag2184 2185 // WAS: getUseHighPrecisionPredictionWeighting and setUseHighPrecisionPredictionWeighting2186 // Now: getSpsRangeExtension().getHighPrecisionOffsetsEnabledFlag and getSpsRangeExtension().setHighPrecisionOffsetsEnabledFlag2187 2188 // WAS: getUseGolombRiceParameterAdaptation and setUseGolombRiceParameterAdaptation2189 // Now: getSpsRangeExtension().getPersistentRiceAdaptationEnabledFlag and getSpsRangeExtension().setPersistentRiceAdaptationEnabledFlag2190 2191 // WAS: getAlignCABACBeforeBypass and setAlignCABACBeforeBypass2192 // Now: getSpsRangeExtension().getCabacBypassAlignmentEnabledFlag and getSpsRangeExtension().setCabacBypassAlignmentEnabledFlag2193 2194 2167 2195 2168 #if NH_MV … … 2274 2247 virtual ~TComRefPicListModification(); 2275 2248 2276 Void create();2277 Void destroy();2278 2249 2279 2250 Bool getRefPicListModificationFlagL0() const { return m_refPicListModificationFlagL0; } … … 2299 2270 Void setListEntryL0( Int i, Int val ) { m_RefPicSetIdxL0[i] = val; } 2300 2271 Void setListEntryL1( Int i, Int val ) { m_RefPicSetIdxL1[i] = val; } 2301 2302 2303 2272 #endif 2304 2273 }; 2274 2305 2275 2306 2276 /// PPS RExt class … … 2556 2526 const TComPPSRExt& getPpsRangeExtension() const { return m_ppsRangeExtension; } 2557 2527 TComPPSRExt& getPpsRangeExtension() { return m_ppsRangeExtension; } 2558 2559 // WAS: getTransformSkipLog2MaxSize and setTransformSkipLog2MaxSize2560 // Now: getPpsRangeExtension().getLog2MaxTransformSkipBlockSize and getPpsRangeExtension().setLog2MaxTransformSkipBlockSize2561 2562 // WAS: getUseCrossComponentPrediction and setUseCrossComponentPrediction2563 // Now: getPpsRangeExtension().getCrossComponentPredictionEnabledFlag and getPpsRangeExtension().setCrossComponentPredictionEnabledFlag2564 2565 // WAS: clearChromaQpAdjTable2566 // Now: getPpsRangeExtension().clearChromaQpOffsetList2567 2568 // WAS: getMaxCuChromaQpAdjDepth and setMaxCuChromaQpAdjDepth2569 // Now: getPpsRangeExtension().getDiffCuChromaQpOffsetDepth and getPpsRangeExtension().setDiffCuChromaQpOffsetDepth2570 2571 // WAS: getChromaQpAdjTableSize2572 // Now: getPpsRangeExtension().getChromaQpOffsetListLen2573 2574 // WAS: getChromaQpAdjTableAt and setChromaQpAdjTableAt2575 // Now: getPpsRangeExtension().getChromaQpOffsetListEntry and getPpsRangeExtension().setChromaQpOffsetListEntry2576 2577 // WAS: getSaoOffsetBitShift and setSaoOffsetBitShift2578 // Now: getPpsRangeExtension().getLog2SaoOffsetScale and getPpsRangeExtension().setLog2SaoOffsetScale2579 2580 2528 #if NH_MV 2581 2529 Void setLayerId( Int val ) { m_layerId = val; } … … 2753 2701 Int m_viewId; 2754 2702 Int m_viewIndex; 2755 #if NH_3D 2703 #if NH_3D_VSO 2756 2704 Bool m_isDepth; 2757 2705 #endif … … 2805 2753 Bool m_cpAvailableFlag; 2806 2754 Int m_numViews; 2755 #endif 2756 #if NH_3D_QTL 2807 2757 TComPic* m_ivPicsCurrPoc [2][MAX_NUM_LAYERS]; 2758 #endif 2759 #if NH_3D 2808 2760 Int** m_depthToDisparityB; 2809 2761 Int** m_depthToDisparityF; … … 2876 2828 Int getPOC() const { return m_iPOC; } 2877 2829 Int getSliceQp() const { return m_iSliceQp; } 2830 Bool getUseWeightedPrediction() const { return( (m_eSliceType==P_SLICE && testWeightPred()) || (m_eSliceType==B_SLICE && testWeightBiPred()) ); } 2878 2831 Bool getDependentSliceSegmentFlag() const { return m_dependentSliceSegmentFlag; } 2879 2832 Void setDependentSliceSegmentFlag(Bool val) { m_dependentSliceSegmentFlag = val; } … … 2892 2845 TComPic* getPic() { return m_pcPic; } 2893 2846 TComPic* getRefPic( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } 2894 Int getRefPOC( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } 2847 const TComPic* getRefPic( RefPicList e, Int iRefIdx) const { return m_apcRefPicList[e][iRefIdx]; } 2848 Int getRefPOC( RefPicList e, Int iRefIdx) const { return m_aiRefPOCList[e][iRefIdx]; } 2895 2849 #if NH_3D 2896 2850 Bool getInCmpPredAvailFlag( ) const { return m_inCmpPredAvailFlag; } … … 2901 2855 Int getNumCurCmpLIds( ) const { return (Int) m_inCmpRefViewIdcs.size(); } 2902 2856 TComPic* getIvPic( Bool depthFlag, Int viewIndex) const { return m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; } 2857 #endif 2858 #if NH_3D_QTL 2903 2859 TComPic* getTexturePic () { return m_ivPicsCurrPoc[0][ m_viewIndex ]; } 2860 2904 2861 #endif 2905 2862 #if NH_3D_IC … … 3180 3137 3181 3138 Void setEnableTMVPFlag( Bool b ) { m_enableTMVPFlag = b; } 3182 Bool getEnableTMVPFlag() 3139 Bool getEnableTMVPFlag() const { return m_enableTMVPFlag; } 3183 3140 3184 3141 Void setEncCABACTableIdx( SliceType idx ) { m_encCABACTableIdx = idx; } … … 3206 3163 Int getFirstTRefIdx ( RefPicList e ) { return m_aiFirstTRefIdx[e]; } 3207 3164 Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } 3208 Bool getArpRefPicAvailable ( RefPicList e, Int viewIdx) { return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; } 3165 3166 Bool getArpRefPicAvailable ( RefPicList e, Int viewIdx) { return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, false, 0 )]; } 3209 3167 IntAry1d getPocsInCurrRPSs() { return m_pocsInCurrRPSs; } 3210 #endif 3168 #endif 3169 #endif 3170 #if NH_3D_VSO 3211 3171 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 3212 3172 Bool getIsDepth () const { return m_isDepth; } 3173 #endif 3174 #if NH_3D 3213 3175 Void setCamparaSlice ( Int** aaiScale = 0, Int** aaiOffset = 0 ); 3214 3176 … … 3230 3192 Int getCpInvOff( Int j ) { return m_aaiCodedOffset[1][j]; } 3231 3193 3194 #endif 3195 #if NH_3D_QTL 3232 3196 Void setIvPicLists( TComPicLists* m_ivPicLists ); 3197 #endif 3198 #if NH_3D 3233 3199 Void setDepthToDisparityLUTs(); 3234 3200
Note: See TracChangeset for help on using the changeset viewer.