Changeset 521 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib
- Timestamp:
- 19 Dec 2013, 03:10:48 (11 years ago)
- Location:
- branches/SHM-4.1-dev/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/Lib/TLibCommon/CommonDef.h
r499 r521 40 40 41 41 #include <algorithm> 42 42 #include <vector> 43 43 #if _MSC_VER > 1000 44 44 // disable "signed and unsigned mismatch" … … 280 280 }; 281 281 282 #if OUTPUT_LAYER_SET_INDEX 283 class CommonDecoderParams 284 { 285 Int m_targetLayerId; 286 Int m_outputLayerSetIdx; 287 std::vector<Int> *m_targetDecLayerIdSet; 288 Bool m_valueCheckedFlag; 289 public: 290 CommonDecoderParams(): 291 m_targetLayerId(0) 292 , m_outputLayerSetIdx(-1) 293 , m_targetDecLayerIdSet(NULL) 294 , m_valueCheckedFlag(false) 295 {} 296 297 Void setTargetLayerId(const Int x) { m_targetLayerId = x; } 298 Int getTargetLayerId() { return m_targetLayerId;} 299 300 Void setOutputLayerSetIdx(const Int x) { m_outputLayerSetIdx = x; } 301 Int getOutputLayerSetIdx() { return m_outputLayerSetIdx;} 302 303 Void setTargetDecLayerIdSet(std::vector<Int> *x) { m_targetDecLayerIdSet = x; } 304 std::vector<Int>* getTargetDecLayerIdSet() { return m_targetDecLayerIdSet;} 305 306 Void setValueCheckedFlag(const Bool x) { m_valueCheckedFlag = x; } 307 Bool getValueCheckedFlag() { return m_valueCheckedFlag;} 308 309 }; 310 #endif 282 311 //! \} 283 312 -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
r520 r521 193 193 194 194 #define VPS_DPB_SIZE_TABLE 1 ///< JCTVC-O0217: DPB operations: signaling DPB-related parameters 195 #if VPS_DPB_SIZE_TABLE 196 #define OUTPUT_LAYER_SET_INDEX 1 ///< JCTVC-O0217: DPB operations: Inference/input of output layer set index 197 #endif 195 198 #else 196 199 #define SYNTAX_OUTPUT 0 -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r520 r521 694 694 #if SVC_EXTENSION 695 695 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder[m_layerId].getPrefetchedVPS(0) ); 696 #if OUTPUT_LAYER_SET_INDEX 697 // Following check should go wherever the VPS is activated 698 checkValueOfOutputLayerSetIdx( m_apcSlicePilot->getVPS()); 699 #endif 696 700 m_apcSlicePilot->initSlice( nalu.m_layerId ); 697 701 #else … … 805 809 } 806 810 #endif 807 808 811 #if REPN_FORMAT_IN_VPS 809 812 // Initialize ILRP if needed, only for the current layer … … 1860 1863 } 1861 1864 #endif 1862 1865 #if OUTPUT_LAYER_SET_INDEX 1866 Void TDecTop::checkValueOfOutputLayerSetIdx(TComVPS *vps) 1867 { 1868 CommonDecoderParams* params = this->getCommonDecoderParams(); 1869 if( params->getValueCheckedFlag() ) 1870 { 1871 return; // Already checked 1872 } 1873 if( params->getOutputLayerSetIdx() == -1 ) // Output layer set index not specified 1874 { 1875 Bool layerSetMatchFound = false; 1876 // Output layer set index not assigned. 1877 // Based on the value of targetLayerId, check if any of the output layer matches 1878 // Currently, the target layer ID in the encoder assumes that all the layers are decoded 1879 // Check if any of the output layer sets match this description 1880 for(Int i = 0; i < vps->getNumOutputLayerSets(); i++) 1881 { 1882 Bool layerSetMatchFlag = true; 1883 Int layerSetIdx = vps->getOutputLayerSetIdx( i ); 1884 if( vps->getNumLayersInIdList( layerSetIdx ) == params->getTargetLayerId() + 1 ) 1885 { 1886 for(Int j = 0; j < vps->getNumLayersInIdList( layerSetIdx ); j++) 1887 { 1888 if( vps->getLayerSetLayerIdList( layerSetIdx, j ) != j ) 1889 { 1890 layerSetMatchFlag = false; 1891 break; 1892 } 1893 } 1894 } 1895 else 1896 { 1897 layerSetMatchFlag = false; 1898 } 1899 1900 if( layerSetMatchFlag ) // Potential output layer set candidate found 1901 { 1902 // If target dec layer ID list is also included - check if they match 1903 if( params->getTargetDecLayerIdSet() ) 1904 { 1905 if( params->getTargetDecLayerIdSet()->size() ) 1906 { 1907 for(Int j = 0; j < vps->getNumLayersInIdList( layerSetIdx ); j++) 1908 { 1909 if( *(params->getTargetDecLayerIdSet()->begin() + j) != vps->getLayerIdInNuh(vps->getLayerSetLayerIdList( layerSetIdx, j ))) 1910 { 1911 layerSetMatchFlag = false; 1912 } 1913 } 1914 } 1915 } 1916 if( layerSetMatchFlag ) // The target dec layer ID list also matches, if present 1917 { 1918 // Match found 1919 layerSetMatchFound = true; 1920 params->setOutputLayerSetIdx( i ); 1921 params->setValueCheckedFlag( true ); 1922 break; 1923 } 1924 } 1925 } 1926 assert( layerSetMatchFound ); // No output layer set matched the value of either targetLayerId or targetdeclayerIdlist 1927 } 1928 else // Output layer set index is assigned - check if the values match 1929 { 1930 // Check if the target decoded layer is the highest layer in the list 1931 Int layerSetIdx = vps->getOutputLayerSetIdx( params->getOutputLayerSetIdx() ); // Index to the layer set 1932 assert( params->getTargetLayerId() == vps->getNumLayersInIdList( layerSetIdx ) - 1); 1933 1934 Bool layerSetMatchFlag = true; 1935 for(Int j = 0; j < vps->getNumLayersInIdList( layerSetIdx ); j++) 1936 { 1937 if( vps->getLayerSetLayerIdList( layerSetIdx, j ) != j ) 1938 { 1939 layerSetMatchFlag = false; 1940 break; 1941 } 1942 } 1943 1944 assert(layerSetMatchFlag); // Signaled output layer set index does not match targetOutputLayerId. 1945 1946 // Check if the targetdeclayerIdlist matches the output layer set 1947 if( params->getTargetDecLayerIdSet() ) 1948 { 1949 if( params->getTargetDecLayerIdSet()->size() ) 1950 { 1951 for(Int i = 0; i < vps->getNumLayersInIdList( layerSetIdx ); i++) 1952 { 1953 assert( *(params->getTargetDecLayerIdSet()->begin() + i) == vps->getLayerIdInNuh(vps->getLayerSetLayerIdList( layerSetIdx, i ))); 1954 } 1955 } 1956 } 1957 params->setValueCheckedFlag( true ); 1958 1959 } 1960 } 1961 #endif 1863 1962 //! \} -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecTop.h
r494 r521 134 134 TComPic* m_cIlpPic[MAX_NUM_REF]; ///< Inter layer Prediction picture = upsampled picture 135 135 #endif 136 #if OUTPUT_LAYER_SET_INDEX 137 CommonDecoderParams* m_commonDecoderParams; 138 #endif 136 139 #if AVC_SYNTAX || SYNTAX_OUTPUT 137 140 fstream* m_pBLSyntaxFile; … … 240 243 TComPic* getMotionPredIlp(TComSlice* pcSlice); 241 244 #endif 242 245 public: 246 #if OUTPUT_LAYER_SET_INDEX 247 CommonDecoderParams* getCommonDecoderParams() { return m_commonDecoderParams; } 248 Void setCommonDecoderParams(CommonDecoderParams* x) { m_commonDecoderParams = x; } 249 Void checkValueOfOutputLayerSetIdx(TComVPS *vps); 250 #endif 243 251 };// END CLASS DEFINITION TDecTop 244 252
Note: See TracChangeset for help on using the changeset viewer.