Changeset 1289 in SHVCSoftware for branches/SHM-dev/source/App/TAppDecoder
- Timestamp:
- 18 Jul 2015, 00:52:46 (9 years ago)
- Location:
- branches/SHM-dev/source/App/TAppDecoder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1287 r1289 56 56 //! \{ 57 57 58 #if Q0074_COLOUR_REMAPPING_SEI59 static Void applyColourRemapping(TComPicYuv& pic, const SEIColourRemappingInfo* colourRemappingInfoSEI, const BitDepths& bitDpeths, UInt layerId=0 );60 static std::vector<SEIColourRemappingInfo> storeCriSEI; //Persistent Colour Remapping Information SEI61 static SEIColourRemappingInfo *seiColourRemappingInfoPrevious=NULL ;62 #endif63 64 58 // ==================================================================================================================== 65 59 // Constructor / destructor / initialization / destroy … … 68 62 #if SVC_EXTENSION 69 63 TAppDecTop::TAppDecTop() 64 #if Q0074_COLOUR_REMAPPING_SEI 65 : seiColourRemappingInfoPrevious(NULL) 66 #endif 70 67 { 71 68 for(UInt layer=0; layer < MAX_LAYERS; layer++) … … 78 75 TAppDecTop::TAppDecTop() 79 76 : m_iPOCLastDisplay(-MAX_INT) 77 #if Q0074_COLOUR_REMAPPING_SEI 78 , seiColourRemappingInfoPrevious(NULL) 79 #endif 80 80 { 81 81 } … … 939 939 SEIMessages colourRemappingInfo = getSeisByType(pcPic->getSEIs(), SEI::COLOUR_REMAPPING_INFO ); 940 940 const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL; 941 const TComSPS *sps = pcPic->getSlice(0)->getSPS(); 942 941 943 if (colourRemappingInfo.size() > 1) 942 944 { … … 945 947 if (seiColourRemappingInfo) 946 948 { 947 applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfo);949 xApplyColourRemapping(sps, *pcPic->getPicYuvRec(), seiColourRemappingInfo); 948 950 } 949 951 else // using the last CRI SEI received … … 951 953 const SEIColourRemappingInfo *seiColourRemappingInfoCopy; 952 954 seiColourRemappingInfoCopy = seiColourRemappingInfoPrevious; 953 applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfoCopy);955 xApplyColourRemapping(sps, *pcPic->getPicYuvRec(), seiColourRemappingInfoCopy); 954 956 } 955 957 … … 1164 1166 SEIMessages colourRemappingInfo = getSeisByType(pcPic->getSEIs(), SEI::COLOUR_REMAPPING_INFO ); 1165 1167 const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL; 1168 const TComSPS *sps = pcPic->getSlice(0)->getSPS(); 1169 1166 1170 if (colourRemappingInfo.size() > 1) 1167 1171 { … … 1170 1174 if (seiColourRemappingInfo) 1171 1175 { 1172 applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfo);1176 xApplyColourRemapping( sps, *pcPic->getPicYuvRec(), seiColourRemappingInfo ); 1173 1177 } 1174 1178 else // using the last CRI SEI received … … 1176 1180 const SEIColourRemappingInfo *seiColourRemappingInfoCopy; 1177 1181 seiColourRemappingInfoCopy = seiColourRemappingInfoPrevious; 1178 applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfoCopy);1182 xApplyColourRemapping( sps, *pcPic->getPicYuvRec(), seiColourRemappingInfoCopy ); 1179 1183 } 1180 1184 … … 1286 1290 if( m_colourRemapSEIEnabled ) 1287 1291 { 1292 const TComSPS *sps = pic->getSlice(0)->getSPS(); 1288 1293 SEIMessages colourRemappingInfo = getSeisByType(pic->getSEIs(), SEI::COLOUR_REMAPPING_INFO ); 1289 1294 const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL; 1295 1290 1296 if (colourRemappingInfo.size() > 1) 1291 1297 { … … 1296 1302 { 1297 1303 //printf ("\n\nColour Remapping is applied to POC : %d and LayerId : %d ",pic->getPOC(), pic->getLayerId()); 1298 #if SVC_EXTENSION 1299 applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfo, pic->getSlice(0)->getBitDepths(), pic->getLayerId()); 1300 #else 1301 applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfo, pic->getSlice(0)->getBitDepths()); 1302 #endif 1304 xApplyColourRemapping( sps, *pic->getPicYuvRec(), seiColourRemappingInfo, pic->getLayerId() ); 1303 1305 } 1304 1306 else // using the last CRI SEI received … … 1306 1308 const SEIColourRemappingInfo *seiColourRemappingInfoCopy; 1307 1309 seiColourRemappingInfoCopy = seiColourRemappingInfoPrevious; 1308 #if SVC_EXTENSION 1309 applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfoCopy, pic->getSlice(0)->getBitDepths(), pic->getLayerId()); 1310 #else 1311 applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfoCopy, pic->getSlice(0)->getBitDepths()); 1312 #endif 1310 xApplyColourRemapping( sps, *pic->getPicYuvRec(), seiColourRemappingInfoCopy, pic->getLayerId() ); 1313 1311 } 1314 1312 … … 1846 1844 1847 1845 #if Q0074_COLOUR_REMAPPING_SEI 1848 Void xInitColourRemappingLut( const BitDepths &bitDepths, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI )1846 Void TAppDecTop::xInitColourRemappingLut( const BitDepths &bitDepths, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI ) 1849 1847 { 1850 1848 for ( Int c=0 ; c<3 ; c++ ) … … 1903 1901 } 1904 1902 1905 static Void applyColourRemapping(TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, const BitDepths& bitDpeths, UInt layerId ) 1906 { 1903 Void TAppDecTop::xApplyColourRemapping( const TComSPS *sps, TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, UInt layerId ) 1904 { 1905 const BitDepths& bitDpeths = sps->getBitDepths(); 1906 1907 1907 if( !storeCriSEI.size() ) 1908 { 1908 1909 #if SVC_EXTENSION 1909 1910 storeCriSEI.resize(MAX_LAYERS); … … 1911 1912 storeCriSEI.resize(1); 1912 1913 #endif 1914 } 1913 1915 1914 1916 if ( pCriSEI ) //if a CRI SEI has just been retrieved, keep it in memory (persistence management) 1917 { 1915 1918 storeCriSEI[layerId] = *pCriSEI; 1919 } 1916 1920 1917 1921 if( !storeCriSEI[layerId].m_colourRemapCancelFlag && pCriSEI) … … 1928 1932 1929 1933 TComPicYuv picColourRemapped; 1934 1930 1935 #if SVC_EXTENSION 1931 1936 #if AUXILIARY_PICTURES 1932 picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );1933 #else 1934 picColourRemapped.create( pic.getWidth(), pic.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );1935 #endif 1936 #else 1937 picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);1937 picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), g_uiMaxCUDepth, true, NULL ); 1938 #else 1939 picColourRemapped.create( pic.getWidth(), pic.getHeight(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), g_uiMaxCUDepth, true, NULL ); 1940 #endif 1941 #else 1942 picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), g_uiMaxCUDepth, true ); 1938 1943 #endif 1939 1944 YUVOut[0] = picColourRemapped.getAddr(COMPONENT_Y); -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h
r1287 r1289 73 73 74 74 // for output control 75 std::ofstream m_seiMessageFileStream; ///< Used for outputing SEI messages. 76 75 77 #if SVC_EXTENSION 76 78 #if CONFORMANCE_BITSTREAM_MODE 77 TVideoIOYuv 79 TVideoIOYuv m_confReconFile[63]; ///< decode YUV files 78 80 #endif 79 81 Int m_aiPOCLastDisplay [MAX_LAYERS]; ///< last POC in display order … … 81 83 Int m_iPOCLastDisplay; ///< last POC in display order 82 84 #endif 83 std::ofstream m_seiMessageFileStream; ///< Used for outputing SEI messages. 85 #if Q0074_COLOUR_REMAPPING_SEI 86 std::vector<SEIColourRemappingInfo> storeCriSEI; //Persistent Colour Remapping Information SEI 87 SEIColourRemappingInfo *seiColourRemappingInfoPrevious; 88 #endif 84 89 85 90 public: … … 98 103 #if Q0074_COLOUR_REMAPPING_SEI 99 104 Void xInitColourRemappingLut( const BitDepths &bitDepths, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI ); 105 Void xApplyColourRemapping( const TComSPS *sps, TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, UInt layerId = 0 ); 100 106 #endif 101 107 #if SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.