Changeset 504 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib
- Timestamp:
- 22 Nov 2013, 00:12:45 (11 years ago)
- Location:
- branches/SHM-4.1-dev/source/Lib/TLibCommon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r494 r504 1834 1834 TComVPS *vps = getVPS(); 1835 1835 UInt retVal, layerId = getLayerId(); 1836 #if O0096_REP_FORMAT_INDEX 1837 if ( layerId == 0 ) 1838 { 1839 retVal = sps->getPicWidthInLumaSamples(); 1840 } 1841 else 1842 { 1843 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : layerId) )->getPicWidthVpsInLumaSamples(); 1844 } 1845 #else 1836 1846 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 1837 1847 { … … 1842 1852 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getPicWidthVpsInLumaSamples(); 1843 1853 } 1854 #endif 1844 1855 return retVal; 1845 1856 } … … 1849 1860 TComVPS *vps = getVPS(); 1850 1861 UInt retVal, layerId = getLayerId(); 1862 #if O0096_REP_FORMAT_INDEX 1863 if( layerId == 0 ) 1864 { 1865 retVal = sps->getPicHeightInLumaSamples(); 1866 } 1867 else 1868 { 1869 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : layerId) )->getPicHeightVpsInLumaSamples(); 1870 } 1871 #else 1851 1872 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 1852 1873 { … … 1857 1878 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getPicHeightVpsInLumaSamples(); 1858 1879 } 1880 #endif 1859 1881 return retVal; 1860 1882 } … … 1873 1895 UInt retVal, layerId = getLayerId(); 1874 1896 #endif 1897 #if O0096_REP_FORMAT_INDEX 1898 if( layerId == 0 ) 1899 { 1900 retVal = sps->getChromaFormatIdc(); 1901 } 1902 else 1903 { 1904 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : layerId) )->getChromaFormatVpsIdc(); 1905 } 1906 #else 1875 1907 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 1876 1908 { … … 1881 1913 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getChromaFormatVpsIdc(); 1882 1914 } 1915 #endif 1883 1916 return retVal; 1884 1917 } … … 1888 1921 TComVPS *vps = getVPS(); 1889 1922 UInt retVal, layerId = getLayerId(); 1923 #if O0096_REP_FORMAT_INDEX 1924 if( layerId == 0 ) 1925 { 1926 retVal = sps->getBitDepthY(); 1927 } 1928 else 1929 { 1930 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : layerId) )->getBitDepthVpsLuma(); 1931 } 1932 #else 1890 1933 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 1891 1934 { … … 1896 1939 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getBitDepthVpsLuma(); 1897 1940 } 1941 #endif 1898 1942 return retVal; 1899 1943 } … … 1903 1947 TComVPS *vps = getVPS(); 1904 1948 UInt retVal, layerId = getLayerId(); 1949 #if O0096_REP_FORMAT_INDEX 1950 if( layerId == 0 ) 1951 { 1952 retVal = sps->getBitDepthC(); 1953 } 1954 else 1955 { 1956 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : layerId) )->getBitDepthVpsChroma(); 1957 } 1958 #else 1905 1959 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 1906 1960 { … … 1911 1965 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getBitDepthVpsChroma(); 1912 1966 } 1967 #endif 1913 1968 return retVal; 1914 1969 } … … 2065 2120 ::memset(m_viewIdVal, 0, sizeof(m_viewIdVal)); 2066 2121 #endif 2122 #if O0092_0094_DEPENDENCY_CONSTRAINT 2123 for (Int i = 0; i < MAX_NUM_LAYER_IDS; i++) 2124 { 2125 m_numberRefLayers[i] = 0; 2126 for (Int j = 0; j < MAX_NUM_LAYER_IDS; j++) 2127 { 2128 m_recursiveRefLayerFlag[i][j] = 0; 2129 } 2130 } 2131 #endif 2067 2132 } 2068 2133 #else … … 2136 2201 } 2137 2202 return false; 2203 } 2204 #endif 2205 2206 #if O0092_0094_DEPENDENCY_CONSTRAINT 2207 Void TComVPS::setRefLayersFlags(Int currLayerId) 2208 { 2209 for (Int i = 0; i < getNumDirectRefLayers(currLayerId); i++) 2210 { 2211 UInt refLayerId = getRefLayerId(currLayerId, i); 2212 setRecursiveRefLayerFlag(currLayerId, refLayerId, true); 2213 for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++) 2214 { 2215 setRecursiveRefLayerFlag(currLayerId, k, (getRecursiveRefLayerFlag(currLayerId, k) | getRecursiveRefLayerFlag(refLayerId, k))); 2216 } 2217 } 2218 } 2219 2220 Void TComVPS::setNumRefLayers(Int currLayerId) 2221 { 2222 for (Int i = 0; i <= getMaxLayers(); i++) 2223 { 2224 UInt iNuhLId = getLayerIdInNuh(i); 2225 setRefLayersFlags(iNuhLId); 2226 for (UInt j = 0; j < MAX_NUM_LAYER_IDS; j++) 2227 { 2228 m_numberRefLayers[iNuhLId] += (getRecursiveRefLayerFlag(iNuhLId, j) == true ? 1 : 0); 2229 } 2230 } 2138 2231 } 2139 2232 #endif … … 2224 2317 #if REPN_FORMAT_IN_VPS 2225 2318 , m_updateRepFormatFlag (false) 2319 #if O0096_REP_FORMAT_INDEX 2320 , m_updateRepFormatIndex (0) 2321 #endif 2226 2322 #endif 2227 2323 #endif //SVC_EXTENSION -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h
r502 r504 563 563 #if M0457_PREDICTION_INDICATIONS 564 564 UInt m_directDepTypeLen; 565 #if O0096_DEFAULT_DEPENDENCY_TYPE 566 Bool m_defaultDirectDependencyTypeFlag; 567 UInt m_defaultDirectDependencyType; 568 #endif 565 569 UInt m_directDependencyType[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 566 570 #endif … … 626 630 Bool m_phaseAlignFlag; 627 631 #endif 632 633 #if O0092_0094_DEPENDENCY_CONSTRAINT 634 Int m_numberRefLayers[MAX_NUM_LAYER_IDS]; // number of direct and indirect reference layers of a coding layer 635 Bool m_recursiveRefLayerFlag[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; // flag to indicate if j-th layer is a direct or indirect reference layer of i-th layer 636 #endif 628 637 #endif //SVC_EXTENSION 629 638 public: … … 698 707 #endif 699 708 709 #if O0092_0094_DEPENDENCY_CONSTRAINT 710 Void setRefLayersFlags(Int currLayerId); 711 Bool getRecursiveRefLayerFlag(Int currLayerId, Int refLayerId) { return m_recursiveRefLayerFlag[currLayerId][refLayerId];} 712 Void setRecursiveRefLayerFlag(Int currLayerId, Int refLayerId, Bool x) { m_recursiveRefLayerFlag[currLayerId][refLayerId] = x; } 713 Int getNumRefLayers(Int currLayerId) { return m_numberRefLayers[currLayerId]; } 714 Void setNumRefLayers(Int currLayerId); 715 #endif 700 716 #if VPS_RENAME 701 717 UInt getMaxLayerId() { return m_maxLayerId; } … … 772 788 UInt getDirectDepTypeLen() { return m_directDepTypeLen; } 773 789 Void setDirectDepTypeLen(UInt x) { m_directDepTypeLen = x; } 774 790 #if O0096_DEFAULT_DEPENDENCY_TYPE 791 Bool getDefaultDirectDependencyTypeFlag() { return m_defaultDirectDependencyTypeFlag; } 792 Void setDefaultDirectDependecyTypeFlag(Bool x) { m_defaultDirectDependencyTypeFlag = x; } 793 UInt getDefaultDirectDependencyType() { return m_defaultDirectDependencyType; } 794 Void setDefaultDirectDependecyType(UInt x) { m_defaultDirectDependencyType = x; } 795 #endif 775 796 UInt getDirectDependencyType(Int currLayerId, Int refLayerId) { return m_directDependencyType[currLayerId][refLayerId]; } 776 797 Void setDirectDependencyType(Int currLayerId, Int refLayerId, UInt x) { m_directDependencyType[currLayerId][refLayerId] = x; } … … 1209 1230 #if REPN_FORMAT_IN_VPS 1210 1231 Bool m_updateRepFormatFlag; 1232 #if O0096_REP_FORMAT_INDEX 1233 UInt m_updateRepFormatIndex; 1234 #endif 1211 1235 #endif 1212 1236 #endif //SVC_EXTENSION … … 1392 1416 Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } 1393 1417 Void setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x; } 1418 #if O0096_REP_FORMAT_INDEX 1419 Int getUpdateRepFormatIndex() { return m_updateRepFormatIndex; } 1420 Void setUpdateRepFormatIndex(UInt index) { m_updateRepFormatIndex = index; } 1421 #endif 1394 1422 #endif 1395 1423 #endif //SVC_EXTENSION -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
r502 r504 168 168 #define O0062_POC_LSB_NOT_PRESENT_FLAG 1 ///< JCTVC-O0062: signal poc_lsb_not_present_flag for each layer in VPS extension 169 169 #define SHM_FIX7 1 ///< fix for SHVC WD ticket #7 170 171 #define O0092_0094_DEPENDENCY_CONSTRAINT 1 ///< JCTVC-O0092: constraint on the layer_id of SPS/PPS 172 #if O0092_0094_DEPENDENCY_CONSTRAINT 173 #define MAX_REF_LAYERS 7 174 #endif 175 #define O0096_REP_FORMAT_INDEX 1 ///< JCTVC-O0096: identify SPS rep_format() with an index into the lists of formats in VPS extension. 176 #define O0096_DEFAULT_DEPENDENCY_TYPE 1 ///< JCTVC-O0096: specify default dependency type for all direct reference layers 170 177 171 178 #else
Note: See TracChangeset for help on using the changeset viewer.