Changeset 1289 in SHVCSoftware
- Timestamp:
- 18 Jul 2015, 00:52:46 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 34 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 -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1288 r1289 3870 3870 3871 3871 m_maxTempLayer = 1; 3872 for(Int i=0; i<m_iGOPSize; i++) 3872 for(Int i=0; i<m_iGOPSize; i++) 3873 3873 { 3874 3874 if(m_GOPList[i].m_temporalId >= m_maxTempLayer) … … 4273 4273 // set max CU width & height 4274 4274 #if SVC_EXTENSION 4275 g_uiMaxCUWidth = m_acLayerCfg[layerId].m_uiMaxCUWidth;4276 g_uiMaxCUHeight = m_acLayerCfg[layerId].m_uiMaxCUHeight;4277 4278 4275 // compute actual CU depth with respect to config depth and max transform size 4279 4276 g_uiAddCUDepth = 0; … … 4289 4286 g_uiMaxCUDepth = m_acLayerCfg[layerId].m_uiMaxCUDepth; 4290 4287 #else 4291 g_uiMaxCUWidth = m_uiMaxCUWidth;4292 g_uiMaxCUHeight = m_uiMaxCUHeight;4293 4294 4288 // compute actual CU depth with respect to config depth and max transform size 4295 4289 g_uiAddCUDepth = 0; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1288 r1289 436 436 m_acTEncTop[layer].setUseRDOQTS ( m_useRDOQTS ); 437 437 m_acTEncTop[layer].setRDpenalty ( m_rdPenalty ); 438 m_acTEncTop[layer].setMaxCUWidth ( m_acLayerCfg[layer].m_uiMaxCUWidth ); 439 m_acTEncTop[layer].setMaxCUHeight ( m_acLayerCfg[layer].m_uiMaxCUHeight ); 438 440 439 441 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MaxSize ); … … 864 866 m_cTEncTop.setUseRDOQTS ( m_useRDOQTS ); 865 867 m_cTEncTop.setRDpenalty ( m_rdPenalty ); 868 m_cTEncTop.setMaxCUWidth ( m_uiMaxCUWidth ); 869 m_cTEncTop.setMaxCUHeight ( m_uiMaxCUHeight ); 866 870 m_cTEncTop.setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize ); 867 871 m_cTEncTop.setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize ); … … 1680 1684 if( m_isField ) 1681 1685 { 1682 #if SVC_EXTENSION 1683 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 1684 acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 1685 #else 1686 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1687 acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1688 #endif 1686 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, true, NULL ); 1687 acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, true, NULL ); 1689 1688 } 1690 1689 else 1691 1690 { 1692 #if SVC_EXTENSION 1693 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 1694 acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 1695 #else 1696 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1697 acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1698 #endif 1691 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, true, NULL ); 1692 acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, true, NULL ); 1699 1693 } 1700 1694 } … … 2040 2034 if( m_isField ) 2041 2035 { 2042 pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );2043 cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );2036 pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, true ); 2037 cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, true); 2044 2038 } 2045 2039 else 2046 2040 { 2047 pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );2048 cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );2041 pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, true ); 2042 cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, true ); 2049 2043 } 2050 2044 … … 2135 2129 rpcPicYuvRec = new TComPicYuv; 2136 2130 2137 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL );2131 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, true, NULL ); 2138 2132 } 2139 2133 m_acListPicYuvRec[layer].pushBack( rpcPicYuvRec ); … … 2159 2153 Void TAppEncTop::xWriteRecon(UInt layer, Int iNumEncoded) 2160 2154 { 2161 #if SVC_EXTENSION2162 2155 ChromaFormat chromaFormatIdc = m_acLayerCfg[layer].getChromaFormatIDC(); 2163 2156 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ); 2164 2157 Int yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 2165 #endif2166 2158 2167 2159 const InputColourSpaceConversion ipCSC = (!m_outputInternalColourSpace) ? m_inputColourSpaceConvert : IPCOLOURSPACE_UNCHANGED; … … 2185 2177 if( !m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed() ) 2186 2178 { 2187 #if SVC_EXTENSION2188 2179 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_acLayerCfg[layer].getConfWinLeft() * xScal, m_acLayerCfg[layer].getConfWinRight() * xScal, 2189 m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal, NUM_CHROMA_FORMAT, m_isTopFieldFirst ); 2190 #else 2191 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_acLayerCfg[layer].getConfWinLeft(), m_acLayerCfg[layer].getConfWinRight(), m_acLayerCfg[layer].getConfWinTop(), m_acLayerCfg[layer].getConfWinBottom(), NUM_CHROMA_FORMAT, m_isTopFieldFirst ); 2192 #endif 2180 m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal, NUM_CHROMA_FORMAT, m_isTopFieldFirst ); 2193 2181 } 2194 2182 } … … 2271 2259 rpcPicYuvRec = new TComPicYuv; 2272 2260 2273 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );2261 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, true ); 2274 2262 2275 2263 } -
branches/SHM-dev/source/App/utils/convert_NtoMbit_YCbCr.cpp
r1246 r1289 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 105 105 106 106 TComPicYuv frame; 107 frame.create( width, height, chromaFormatIDC, 1, 1, 0);107 frame.create( width, height, chromaFormatIDC, width, height, 0, false); 108 108 109 109 Int pad[2] = {0, 0}; 110 110 111 111 TComPicYuv cPicYuvTrueOrg; 112 cPicYuvTrueOrg.create( width, height, chromaFormatIDC, 1, 1, 0);112 cPicYuvTrueOrg.create( width, height, chromaFormatIDC, width, height, 0, false ); 113 113 114 114 UInt num_frames_processed = 0; -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1260 r1289 425 425 Bool TComDataCU::isLastSubCUOfCtu(const UInt absPartIdx) 426 426 { 427 TComPic* pcPic = getPic(); 428 TComSlice * pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx()); 427 const TComSPS &sps=*(getSlice()->getSPS()); 429 428 430 429 #if SVC_EXTENSION 430 TComSlice * pcSlice = m_pcPic->getSlice(m_pcPic->getCurrSliceIdx()); 431 431 const UInt picWidth = pcSlice->getPicWidthInLumaSamples(); 432 432 const UInt picHeight = pcSlice->getPicHeightInLumaSamples(); 433 433 #else 434 const UInt picWidth = pcSlice->getSPS()->getPicWidthInLumaSamples();435 const UInt picHeight = pcSlice->getSPS()->getPicHeightInLumaSamples();434 const UInt picWidth = sps.getPicWidthInLumaSamples(); 435 const UInt picHeight = sps.getPicHeightInLumaSamples(); 436 436 #endif 437 const UInt granularityWidth = g_uiMaxCUWidth;437 const UInt granularityWidth = sps.getMaxCUWidth(); 438 438 439 439 const UInt cuPosX = getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[absPartIdx] ]; … … 461 461 { 462 462 463 const UInt maxCUWidth = pcPic->getPicSym()->getSPS().getMaxCUWidth(); 464 const UInt maxCUHeight= pcPic->getPicSym()->getSPS().getMaxCUHeight(); 463 465 m_pcPic = pcPic; 464 466 m_pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx()); 465 467 m_ctuRsAddr = ctuRsAddr; 466 m_uiCUPelX = ( ctuRsAddr % pcPic->getFrameWidthInCtus() ) * g_uiMaxCUWidth;467 m_uiCUPelY = ( ctuRsAddr / pcPic->getFrameWidthInCtus() ) * g_uiMaxCUHeight;468 m_uiCUPelX = ( ctuRsAddr % pcPic->getFrameWidthInCtus() ) * maxCUWidth; 469 m_uiCUPelY = ( ctuRsAddr / pcPic->getFrameWidthInCtus() ) * maxCUHeight; 468 470 m_absZIdxInCtu = 0; 469 471 m_dTotalCost = MAX_DOUBLE; … … 484 486 memset( m_puhDepth , 0, m_uiNumPartition * sizeof( *m_puhDepth ) ); 485 487 memset( m_puhTrIdx , 0, m_uiNumPartition * sizeof( *m_puhTrIdx ) ); 486 memset( m_puhWidth , g_uiMaxCUWidth,m_uiNumPartition * sizeof( *m_puhWidth ) );487 memset( m_puhHeight , g_uiMaxCUHeight,m_uiNumPartition * sizeof( *m_puhHeight ) );488 memset( m_puhWidth , maxCUWidth, m_uiNumPartition * sizeof( *m_puhWidth ) ); 489 memset( m_puhHeight , maxCUHeight, m_uiNumPartition * sizeof( *m_puhHeight ) ); 488 490 for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++) 489 491 { … … 510 512 memset( m_pbIPCMFlag , false, m_uiNumPartition * sizeof( *m_pbIPCMFlag ) ); 511 513 512 const UInt numCoeffY = g_uiMaxCUWidth*g_uiMaxCUHeight;514 const UInt numCoeffY = maxCUWidth*maxCUHeight; 513 515 for (UInt comp=0; comp<MAX_NUM_COMPONENT; comp++) 514 516 { … … 585 587 m_uiTotalBins = 0; 586 588 587 UChar uhWidth = g_uiMaxCUWidth>> uiDepth;588 UChar uhHeight = g_uiMaxCUHeight>> uiDepth;589 const UChar uhWidth = getSlice()->getSPS()->getMaxCUWidth() >> uiDepth; 590 const UChar uhHeight = getSlice()->getSPS()->getMaxCUHeight() >> uiDepth; 589 591 590 592 for (UInt ui = 0; ui < m_uiNumPartition; ui++) … … 656 658 657 659 m_pcPic = pcCU->getPic(); 658 m_pcSlice = m_pcPic->getSlice(m_pcPic->getCurrSliceIdx());660 m_pcSlice = pcCU->getSlice(); 659 661 m_ctuRsAddr = pcCU->getCtuRsAddr(); 660 662 m_absZIdxInCtu = pcCU->getZorderIdxInCtu() + uiPartOffset; 661 663 662 m_uiCUPelX = pcCU->getCUPelX() + ( g_uiMaxCUWidth>>uiDepth )*( uiPartUnitIdx & 1 ); 663 m_uiCUPelY = pcCU->getCUPelY() + ( g_uiMaxCUHeight>>uiDepth )*( uiPartUnitIdx >> 1 ); 664 const UChar uhWidth = getSlice()->getSPS()->getMaxCUWidth() >> uiDepth; 665 const UChar uhHeight = getSlice()->getSPS()->getMaxCUHeight() >> uiDepth; 666 667 m_uiCUPelX = pcCU->getCUPelX() + ( uhWidth )*( uiPartUnitIdx & 1 ); 668 m_uiCUPelY = pcCU->getCUPelY() + ( uhHeight)*( uiPartUnitIdx >> 1 ); 664 669 665 670 m_dTotalCost = MAX_DOUBLE; … … 693 698 694 699 memset( m_puhDepth, uiDepth, iSizeInUchar ); 695 696 UChar uhWidth = g_uiMaxCUWidth >> uiDepth;697 UChar uhHeight = g_uiMaxCUHeight >> uiDepth;698 700 memset( m_puhWidth, uhWidth, iSizeInUchar ); 699 701 memset( m_puhHeight, uhHeight, iSizeInUchar ); … … 744 746 Void TComDataCU::setOutsideCUPart( UInt uiAbsPartIdx, UInt uiDepth ) 745 747 { 746 UIntuiNumPartition = m_uiNumPartition >> (uiDepth << 1);747 UInt uiSizeInUchar= sizeof( UChar ) * uiNumPartition;748 749 UChar uhWidth = g_uiMaxCUWidth>> uiDepth;750 UChar uhHeight = g_uiMaxCUHeight>> uiDepth;748 const UInt uiNumPartition = m_uiNumPartition >> (uiDepth << 1); 749 const UInt uiSizeInUchar = sizeof( UChar ) * uiNumPartition; 750 const TComSPS &sps = *(getSlice()->getSPS()); 751 const UChar uhWidth = sps.getMaxCUWidth() >> uiDepth; 752 const UChar uhHeight = sps.getMaxCUHeight() >> uiDepth; 751 753 memset( m_puhDepth + uiAbsPartIdx, uiDepth, uiSizeInUchar ); 752 754 memset( m_puhWidth + uiAbsPartIdx, uhWidth, uiSizeInUchar ); … … 952 954 } 953 955 954 const UInt numCoeffY = g_uiMaxCUWidth*g_uiMaxCUHeight>> (uiDepth<<1);956 const UInt numCoeffY = (pcCU->getSlice()->getSPS()->getMaxCUWidth()*pcCU->getSlice()->getSPS()->getMaxCUHeight()) >> (uiDepth<<1); 955 957 const UInt offsetY = uiPartUnitIdx*numCoeffY; 956 958 for (UInt ch=0; ch<numValidComp; ch++) … … 1030 1032 memcpy( pCtu->getIPCMFlag() + m_absZIdxInCtu, m_pbIPCMFlag, iSizeInBool ); 1031 1033 1032 const UInt numCoeffY = ( g_uiMaxCUWidth*g_uiMaxCUHeight)>>(uhDepth<<1);1034 const UInt numCoeffY = (pCtu->getSlice()->getSPS()->getMaxCUWidth()*pCtu->getSlice()->getSPS()->getMaxCUHeight())>>(uhDepth<<1); 1033 1035 const UInt offsetY = m_absZIdxInCtu*m_pcPic->getMinCUWidth()*m_pcPic->getMinCUHeight(); 1034 1036 for (UInt comp=0; comp<numValidComp; comp++) … … 2954 2956 Void TComDataCU::clipMv (TComMv& rcMv) 2955 2957 { 2958 const TComSPS &sps=*(m_pcSlice->getSPS()); 2956 2959 Int iMvShift = 2; 2957 2960 Int iOffset = 8; 2958 2961 #if SVC_EXTENSION 2959 Int iHorMax = ( m_pcSlice->getPicWidthInLumaSamples() + iOffset - m_uiCUPelX - 1 ) << iMvShift;2962 Int iHorMax = ( m_pcSlice->getPicWidthInLumaSamples() + iOffset - (Int)m_uiCUPelX - 1 ) << iMvShift; 2960 2963 #else 2961 Int iHorMax = ( m_pcSlice->getSPS()->getPicWidthInLumaSamples() + iOffset -m_uiCUPelX - 1 ) << iMvShift;2964 Int iHorMax = ( sps.getPicWidthInLumaSamples() + iOffset - (Int)m_uiCUPelX - 1 ) << iMvShift; 2962 2965 #endif 2963 Int iHorMin = ( -(Int)g_uiMaxCUWidth- iOffset - (Int)m_uiCUPelX + 1 ) << iMvShift;2966 Int iHorMin = ( -(Int)sps.getMaxCUWidth() - iOffset - (Int)m_uiCUPelX + 1 ) << iMvShift; 2964 2967 2965 2968 #if SVC_EXTENSION 2966 Int iVerMax = ( m_pcSlice->getPicHeightInLumaSamples() + iOffset - m_uiCUPelY - 1 ) << iMvShift;2969 Int iVerMax = ( m_pcSlice->getPicHeightInLumaSamples() + iOffset - (Int)m_uiCUPelY - 1 ) << iMvShift; 2967 2970 #else 2968 Int iVerMax = ( m_pcSlice->getSPS()->getPicHeightInLumaSamples() + iOffset -m_uiCUPelY - 1 ) << iMvShift;2971 Int iVerMax = ( sps.getPicHeightInLumaSamples() + iOffset - (Int)m_uiCUPelY - 1 ) << iMvShift; 2969 2972 #endif 2970 Int iVerMin = ( -(Int)g_uiMaxCUHeight- iOffset - (Int)m_uiCUPelY + 1 ) << iMvShift;2973 Int iVerMin = ( -(Int)sps.getMaxCUHeight() - iOffset - (Int)m_uiCUPelY + 1 ) << iMvShift; 2971 2974 2972 2975 rcMv.setHor( min (iHorMax, max (iHorMin, rcMv.getHor())) ); … … 3483 3486 } 3484 3487 3485 #if LAYER_CTB 3486 UInt baseMaxCUHeight = baseColPic->getPicSym()->getMaxCUHeight(); 3487 UInt baseMaxCUWidth = baseColPic->getPicSym()->getMaxCUWidth(); 3488 UInt baseMaxCUHeight = baseColPic->getSlice(0)->getSPS()->getMaxCUHeight(); 3489 UInt baseMaxCUWidth = baseColPic->getSlice(0)->getSPS()->getMaxCUWidth(); 3488 3490 UInt baseMinUnitSize = baseColPic->getMinCUWidth(); 3489 3491 3490 3492 uiCUAddrBase = ( iBY / baseMaxCUHeight ) * baseColPic->getFrameWidthInCtus() + ( iBX / baseMaxCUWidth ); 3491 #else3492 uiCUAddrBase = (iBY/g_uiMaxCUHeight)*baseColPic->getFrameWidthInCtus() + (iBX/g_uiMaxCUWidth);3493 #endif3494 3493 3495 3494 assert(uiCUAddrBase < baseColPic->getNumberOfCtusInFrame()); 3496 3495 3496 UInt uiRasterAddrBase = ( iBY - (iBY/baseMaxCUHeight)*baseMaxCUHeight ) / baseMinUnitSize * baseColPic->getNumPartInCtuWidth() + ( iBX - (iBX/baseMaxCUWidth)*baseMaxCUWidth ) / baseMinUnitSize; 3497 3497 3498 #if LAYER_CTB 3498 UInt uiRasterAddrBase = ( iBY - (iBY/baseMaxCUHeight)*baseMaxCUHeight ) / baseMinUnitSize * baseColPic->getNumPartInCtuWidth() + ( iBX - (iBX/baseMaxCUWidth)*baseMaxCUWidth ) / baseMinUnitSize;3499 3500 3499 uiAbsPartIdxBase = g_auiLayerRasterToZscan[baseColPic->getLayerId()][uiRasterAddrBase]; 3501 3500 #else 3502 UInt uiRasterAddrBase = (iBY - (iBY/g_uiMaxCUHeight)*g_uiMaxCUHeight)/uiMinUnitSize*baseColPic->getNumPartInCtuWidth() + (iBX - (iBX/g_uiMaxCUWidth)*g_uiMaxCUWidth)/uiMinUnitSize;3503 3504 3501 uiAbsPartIdxBase = g_auiRasterToZscan[uiRasterAddrBase]; 3505 3502 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.cpp
r1287 r1289 177 177 UInt uiCurNumParts = pcPic->getNumPartitionsInCtu() >> (uiDepth<<1); 178 178 UInt uiQNumParts = uiCurNumParts>>2; 179 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 179 180 180 181 if( pcCU->getDepth(uiAbsZorderIdx) > uiDepth ) … … 187 188 if( ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) ) 188 189 #else 189 if( ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) )190 if( ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) ) 190 191 #endif 191 192 { … … 201 202 xSetEdgefilterPU ( pcCU, uiAbsZorderIdx ); 202 203 204 const UInt uiPelsInPart = sps.getMaxCUWidth() >> g_uiMaxCUDepth; 205 203 206 for( UInt uiPartIdx = uiAbsZorderIdx; uiPartIdx < uiAbsZorderIdx + uiCurNumParts; uiPartIdx++ ) 204 207 { 205 208 UInt uiBSCheck; 206 if( (g_uiMaxCUWidth >> g_uiMaxCUDepth)== 4 )209 if( uiPelsInPart == 4 ) 207 210 { 208 211 uiBSCheck = (edgeDir == EDGE_VER && uiPartIdx%2 == 0) || (edgeDir == EDGE_HOR && (uiPartIdx-((uiPartIdx>>2)<<2))/2 == 0); … … 219 222 } 220 223 221 UInt uiPelsInPart = g_uiMaxCUWidth >> g_uiMaxCUDepth;222 224 UInt PartIdxIncr = DEBLOCK_SMALLEST_BLOCK / uiPelsInPart ? DEBLOCK_SMALLEST_BLOCK / uiPelsInPart : 1 ; 223 225 … … 290 292 291 293 const TComRectangle &rect = rTu.getRect(COMPONENT_Y); 292 293 const UInt uiWidthInBaseUnits = rect.width / (g_uiMaxCUWidth >> g_uiMaxCUDepth); 294 const UInt uiHeightInBaseUnits = rect.height / (g_uiMaxCUWidth >> g_uiMaxCUDepth); 294 const TComSPS &sps=*(pcCU->getSlice()->getSPS()); 295 296 const UInt uiWidthInBaseUnits = rect.width / (sps.getMaxCUWidth() >> g_uiMaxCUDepth); 297 const UInt uiHeightInBaseUnits = rect.height / (sps.getMaxCUHeight() >> g_uiMaxCUDepth); 295 298 296 299 xSetEdgefilterMultiple( pcCU, rTu.GetAbsPartIdxCU(), uiTransDepthTotal, EDGE_VER, 0, m_stLFCUParam.bInternalEdge, uiWidthInBaseUnits, uiHeightInBaseUnits, &rect ); … … 559 562 560 563 561 Void TComLoopFilter::xEdgeFilterLuma( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir, Int iEdge ) 562 { 563 TComPicYuv* pcPicYuvRec = pcCU->getPic()->getPicYuvRec(); 564 Pel* piSrc = pcPicYuvRec->getAddr(COMPONENT_Y, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 565 Pel* piTmpSrc = piSrc; 564 Void TComLoopFilter::xEdgeFilterLuma( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge ) 565 { 566 TComPicYuv *pcPicYuvRec = pcCU->getPic()->getPicYuvRec(); 567 Pel *piSrc = pcPicYuvRec->getAddr(COMPONENT_Y, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 568 Pel *piTmpSrc = piSrc; 569 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 570 const Bool ppsTransquantBypassEnableFlag = pcCU->getSlice()->getPPS()->getTransquantBypassEnableFlag(); 571 566 572 #if SVC_EXTENSION 567 const Int bitDepthLuma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA);573 const Int bitDepthLuma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA); 568 574 #else 569 const Int bitDepthLuma = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA);575 const Int bitDepthLuma = sps.getBitDepth(CHANNEL_TYPE_LUMA); 570 576 #endif 571 577 572 const Bool lfCrossSliceBoundaryFlag=pcCU->getSlice()->getLFCrossSliceBoundaryFlag();578 const Bool lfCrossSliceBoundaryFlag = pcCU->getSlice()->getLFCrossSliceBoundaryFlag(); 573 579 574 580 Int iStride = pcPicYuvRec->getStride(COMPONENT_Y); … … 578 584 UInt uiNumParts = pcCU->getPic()->getNumPartInCtuWidth()>>uiDepth; 579 585 580 UInt uiPelsInPart = g_uiMaxCUWidth>> g_uiMaxCUDepth;586 UInt uiPelsInPart = sps.getMaxCUWidth() >> g_uiMaxCUDepth; 581 587 UInt uiBsAbsIdx = 0, uiBs = 0; 582 588 Int iOffset, iSrcStep; 583 589 584 Bool bPCMFilter = ( pcCU->getSlice()->getSPS()->getUsePCM() && pcCU->getSlice()->getSPS()->getPCMFilterDisableFlag())? true : false;590 Bool bPCMFilter = (sps.getUsePCM() && sps.getPCMFilterDisableFlag())? true : false; 585 591 Bool bPartPNoFilter = false; 586 592 Bool bPartQNoFilter = false; … … 622 628 else // (iDir == EDGE_HOR) 623 629 { 624 pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,! pcCU->getSlice()->getLFCrossSliceBoundaryFlag(), false, !m_bLFCrossTileBoundary);630 pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,!lfCrossSliceBoundaryFlag, false, !m_bLFCrossTileBoundary); 625 631 } 626 632 … … 651 657 Int d = d0 + d3; 652 658 653 if (bPCMFilter || p cCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())659 if (bPCMFilter || ppsTransquantBypassEnableFlag) 654 660 { 655 661 // Check if each of PUs is I_PCM with LF disabling … … 681 687 682 688 683 Void TComLoopFilter::xEdgeFilterChroma( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir, Int iEdge ) 684 { 685 TComPicYuv* pcPicYuvRec = pcCU->getPic()->getPicYuvRec(); 686 Int iStride = pcPicYuvRec->getStride(COMPONENT_Cb); 687 Pel* piSrcCb = pcPicYuvRec->getAddr( COMPONENT_Cb, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 688 Pel* piSrcCr = pcPicYuvRec->getAddr( COMPONENT_Cr, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 689 Void TComLoopFilter::xEdgeFilterChroma( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge ) 690 { 691 TComPicYuv *pcPicYuvRec = pcCU->getPic()->getPicYuvRec(); 692 Int iStride = pcPicYuvRec->getStride(COMPONENT_Cb); 693 Pel *piSrcCb = pcPicYuvRec->getAddr( COMPONENT_Cb, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 694 Pel *piSrcCr = pcPicYuvRec->getAddr( COMPONENT_Cr, pcCU->getCtuRsAddr(), uiAbsZorderIdx ); 695 696 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 689 697 #if SVC_EXTENSION 690 const Int bitDepthChroma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_CHROMA);691 #else 692 const Int bitDepthChroma = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA);698 const Int bitDepthChroma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_CHROMA); 699 #else 700 const Int bitDepthChroma = sps.getBitDepth(CHANNEL_TYPE_CHROMA); 693 701 #endif 702 703 const UInt uiPelsInPartChromaH = sps.getMaxCUWidth() >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleX(COMPONENT_Cb)); 704 const UInt uiPelsInPartChromaV = sps.getMaxCUHeight() >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleY(COMPONENT_Cb)); 705 694 706 Int iQP = 0; 695 707 Int iQP_P = 0; 696 708 Int iQP_Q = 0; 697 698 UInt uiPelsInPartChromaH = g_uiMaxCUWidth >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleX(COMPONENT_Cb));699 UInt uiPelsInPartChromaV = g_uiMaxCUWidth >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleY(COMPONENT_Cb));700 709 701 710 Int iOffset, iSrcStep; … … 777 786 else // (edgeDir == EDGE_HOR) 778 787 { 779 pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,! pcCU->getSlice()->getLFCrossSliceBoundaryFlag(), false, !m_bLFCrossTileBoundary);788 pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,!lfCrossSliceBoundaryFlag, false, !m_bLFCrossTileBoundary); 780 789 } 781 790 -
branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.h
r1287 r1289 105 105 ); 106 106 107 Void xEdgeFilterLuma ( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir,Int iEdge );108 Void xEdgeFilterChroma ( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir,Int iEdge );107 Void xEdgeFilterLuma ( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge ); 108 Void xEdgeFilterChroma ( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge ); 109 109 110 110 __inline Void xPelFilterLuma( Pel* piSrc, Int iOffset, Int tc, Bool sw, Bool bPartPNoFilter, Bool bPartQNoFilter, Int iThrCut, Bool bFilterSecondP, Bool bFilterSecondQ, const Int bitDepthLuma); -
branches/SHM-dev/source/Lib/TLibCommon/TComPattern.cpp
r1287 r1289 110 110 111 111 TComDataCU *pcCU=rTu.getCU(); 112 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 112 113 const UInt uiZorderIdxInPart=rTu.GetAbsPartIdxTU(); 113 114 const UInt uiTuWidth = rTu.getRect(compID).width; … … 116 117 const UInt uiTuHeight2 = uiTuHeight << 1; 117 118 118 const Int iBaseUnitSize = g_uiMaxCUWidth>> g_uiMaxCUDepth;119 const Int iBaseUnitSize = sps.getMaxCUWidth() >> g_uiMaxCUDepth; 119 120 const Int iUnitWidth = iBaseUnitSize >> pcCU->getPic()->getPicYuvRec()->getComponentScaleX(compID); 120 121 const Int iUnitHeight = iBaseUnitSize >> pcCU->getPic()->getPicYuvRec()->getComponentScaleY(compID); … … 126 127 const Int bitDepthForChannel = pcCU->getSlice()->getBitDepth(chType); 127 128 #else 128 const Int bitDepthForChannel = pcCU->getSlice()->getSPS()->getBitDepth(chType);129 const Int bitDepthForChannel = sps.getBitDepth(chType); 129 130 #endif 130 131 … … 164 165 Pel *piRoiOrigin = pcCU->getPic()->getPicYuvRec()->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu()+uiZorderIdxInPart); 165 166 #if O0043_BEST_EFFORT_DECODING 166 const Int bitDepthForChannelInStream = pcCU->getSlice()->getSPS()->getStreamBitDepth(chType);167 const Int bitDepthForChannelInStream = sps.getStreamBitDepth(chType); 167 168 fillReferenceSamples (bitDepthForChannelInStream, bitDepthForChannelInStream - bitDepthForChannel, pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits, 168 169 #else … … 202 203 //------------------------------------------------ 203 204 204 Bool useStrongIntraSmoothing = isLuma(chType) && pcCU->getSlice()->getSPS()->getUseStrongIntraSmoothing();205 Bool useStrongIntraSmoothing = isLuma(chType) && sps.getUseStrongIntraSmoothing(); 205 206 206 207 const Pel bottomLeft = piAdiTemp[stride * uiTuHeight2]; -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp
r1259 r1289 75 75 } 76 76 #if SVC_EXTENSION 77 Void TComPic::create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMax Width, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual, const UInt layerId )77 Void TComPic::create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual, const UInt layerId ) 78 78 { 79 79 const ChromaFormat chromaFormatIDC = vps.getChromaFormatIdc(&sps, layerId); 80 80 const Int iWidth = vps.getPicWidthInLumaSamples(&sps, layerId); 81 81 const Int iHeight = vps.getPicHeightInLumaSamples(&sps, layerId); 82 const UInt uiMaxCuWidth = sps.getMaxCUWidth(); 83 const UInt uiMaxCuHeight = sps.getMaxCUHeight(); 82 84 83 85 const Window& conformanceWindow = vps.getConformanceWindow( &sps, layerId ); 84 86 85 m_picSym.create( vps, sps, pps, uiMax Width, uiMaxHeight, uiMaxDepth, layerId );87 m_picSym.create( vps, sps, pps, uiMaxDepth, layerId ); 86 88 87 89 if (!bIsVirtual) 88 90 { 89 m_apcPicYuv[PIC_YUV_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth, &conformanceWindow );90 m_apcPicYuv[PIC_YUV_TRUE_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth, &conformanceWindow );91 } 92 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth, &conformanceWindow );91 m_apcPicYuv[PIC_YUV_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 92 m_apcPicYuv[PIC_YUV_TRUE_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 93 } 94 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 93 95 94 96 for( Int i = 0; i < MAX_LAYERS; i++ ) … … 96 98 if( m_bSpatialEnhLayer[i] ) 97 99 { 98 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth, &conformanceWindow );100 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 99 101 } 100 102 } … … 108 110 } 109 111 #else 110 Void TComPic::create( const TComSPS &sps, const TComPPS &pps, const UInt uiMax Width, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual)112 Void TComPic::create( const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual) 111 113 { 112 114 const ChromaFormat chromaFormatIDC=sps.getChromaFormatIdc(); 113 const Int iWidth = sps.getPicWidthInLumaSamples(); 114 const Int iHeight = sps.getPicHeightInLumaSamples(); 115 116 m_picSym.create( sps, pps, uiMaxWidth, uiMaxHeight, uiMaxDepth ); 115 const Int iWidth = sps.getPicWidthInLumaSamples(); 116 const Int iHeight = sps.getPicHeightInLumaSamples(); 117 const UInt uiMaxCuWidth = sps.getMaxCUWidth(); 118 const UInt uiMaxCuHeight = sps.getMaxCUHeight(); 119 120 m_picSym.create( sps, pps, uiMaxDepth ); 117 121 if (!bIsVirtual) 118 122 { 119 m_apcPicYuv[PIC_YUV_ORG ] = new TComPicYuv; m_apcPicYuv[PIC_YUV_ORG ]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth);120 m_apcPicYuv[PIC_YUV_TRUE_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth);121 } 122 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMax Width, uiMaxHeight, uiMaxDepth);123 m_apcPicYuv[PIC_YUV_ORG ] = new TComPicYuv; m_apcPicYuv[PIC_YUV_ORG ]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true ); 124 m_apcPicYuv[PIC_YUV_TRUE_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true ); 125 } 126 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true ); 123 127 124 128 // there are no SEI messages associated with this picture initially … … 256 260 } 257 261 258 Void TComPic::copyUpsampledMvField(UInt refLayerIdc , TComPic* pcPicBase)262 Void TComPic::copyUpsampledMvField(UInt refLayerIdc) 259 263 { 260 264 UInt numPartitions = 1<<(g_uiMaxCUDepth<<1); 261 UInt widthMinPU = g _uiMaxCUWidth/(1<<g_uiMaxCUDepth);262 UInt heightMinPU = g _uiMaxCUHeight/(1<<g_uiMaxCUDepth);263 Int unitNum = max (1, (Int)((16/widthMinPU)*(16/heightMinPU)) );265 UInt widthMinPU = getSlice(0)->getSPS()->getMaxCUWidth() / (1<<g_uiMaxCUDepth); 266 UInt heightMinPU = getSlice(0)->getSPS()->getMaxCUHeight() / (1<<g_uiMaxCUDepth); 267 Int unitNum = max( 1, (Int)((16/widthMinPU)*(16/heightMinPU)) ); 264 268 265 269 for(UInt cuIdx = 0; cuIdx < getPicSym()->getNumberOfCtusInFrame(); cuIdx++) //each LCU … … 270 274 { 271 275 //pixel position of each unit in up-sampled layer 272 UInt 273 UInt 276 UInt pelX = pcCUDes->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[absPartIdx] ]; 277 UInt pelY = pcCUDes->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[absPartIdx] ]; 274 278 UInt baseCUAddr, baseAbsPartIdx; 275 279 -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.h
r1259 r1289 99 99 100 100 #if SVC_EXTENSION 101 Void create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMax Width, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/, const UInt layerId );101 Void create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/, const UInt layerId ); 102 102 #else 103 Void create( const TComSPS &sps, const TComPPS &pps, const UInt uiMax Width, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/ );103 Void create( const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/ ); 104 104 #endif 105 105 … … 121 121 TComDataCU* getCtu( UInt ctuRsAddr ) { return m_picSym.getCtu( ctuRsAddr ); } 122 122 const TComDataCU* getCtu( UInt ctuRsAddr ) const { return m_picSym.getCtu( ctuRsAddr ); } 123 124 123 125 124 TComPicYuv* getPicYuvOrg() { return m_apcPicYuv[PIC_YUV_ORG]; } … … 186 185 187 186 #if SVC_EXTENSION 188 Void setLayerId (UInt layerId) { m_layerId = layerId;}189 UInt getLayerId () { return m_layerId;}190 UInt getLayerIdx() { return getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId); }191 Bool isSpatialEnhLayer(UInt refLayerIdc) { return m_bSpatialEnhLayer[refLayerIdc];}192 Void setSpatialEnhLayerFlag (UInt refLayerIdc, Bool b) { m_bSpatialEnhLayer[refLayerIdc] = b;}193 Void setFullPelBaseRec (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p;}194 TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc];}195 Bool isILR( UInt currLayerId ) { return ( m_bIsLongTerm && m_layerId < currLayerId );}196 Bool equalPictureSizeAndOffsetFlag(UInt refLayerIdc) { return m_equalPictureSizeAndOffsetFlag[refLayerIdc]; }197 Void setEqualPictureSizeAndOffsetFlag(UInt refLayerIdc, Bool b) { m_equalPictureSizeAndOffsetFlag[refLayerIdc] = b; }198 Void copyUpsampledMvField ( UInt refLayerIdc, TComPic* pcPicBase);199 Void initUpsampledMvField 187 Void setLayerId(UInt layerId) { m_layerId = layerId; } 188 UInt getLayerId() { return m_layerId; } 189 UInt getLayerIdx() { return getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId); } 190 Bool isSpatialEnhLayer(UInt refLayerIdc) { return m_bSpatialEnhLayer[refLayerIdc]; } 191 Void setSpatialEnhLayerFlag (UInt refLayerIdc, Bool b) { m_bSpatialEnhLayer[refLayerIdc] = b; } 192 Void setFullPelBaseRec (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p; } 193 TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc]; } 194 Bool isILR( UInt currLayerId ) { return ( m_bIsLongTerm && m_layerId < currLayerId ); } 195 Bool equalPictureSizeAndOffsetFlag(UInt refLayerIdc) { return m_equalPictureSizeAndOffsetFlag[refLayerIdc]; } 196 Void setEqualPictureSizeAndOffsetFlag(UInt refLayerIdc, Bool b) { m_equalPictureSizeAndOffsetFlag[refLayerIdc] = b; } 197 Void copyUpsampledMvField(UInt refLayerIdc); 198 Void initUpsampledMvField(); 200 199 Bool checkSameRefInfo(); 201 200 Void copyUpsampledPictureYuv(TComPicYuv* pcPicYuvIn, TComPicYuv* pcPicYuvOut); 202 201 #if CGS_3D_ASYMLUT 203 Void setFrameBit( Int n ) { m_nFrameBit = n;}204 Int getFrameBit() { return m_nFrameBit;}205 #endif 206 Bool isCurrAu() { return m_currAuFlag; }207 Void setCurrAuFlag(Bool x) {m_currAuFlag = x;}202 Void setFrameBit( Int n ) { m_nFrameBit = n; } 203 Int getFrameBit() { return m_nFrameBit; } 204 #endif 205 Bool isCurrAu() { return m_currAuFlag; } 206 Void setCurrAuFlag(Bool x) { m_currAuFlag = x; } 208 207 #endif //SVC_EXTENSION 209 208 };// END CLASS DEFINITION TComPic -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.cpp
r1259 r1289 50 50 :m_frameWidthInCtus(0) 51 51 ,m_frameHeightInCtus(0) 52 ,m_uiMaxCUWidth(0)53 ,m_uiMaxCUHeight(0)54 52 ,m_uiMinCUWidth(0) 55 53 ,m_uiMinCUHeight(0) … … 77 75 78 76 #if SVC_EXTENSION 79 Void TComPicSym::create ( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth, const UInt layerId )77 Void TComPicSym::create ( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId ) 80 78 { 81 79 UInt i; … … 88 86 const Int iPicHeight = vps.getPicHeightInLumaSamples(&sps, layerId); 89 87 #else 90 Void TComPicSym::create ( const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth )88 Void TComPicSym::create ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth ) 91 89 { 92 90 UInt i; … … 94 92 m_pps = pps; 95 93 96 const ChromaFormat chromaFormatIDC=sps.getChromaFormatIdc(); 97 const Int iPicWidth = sps.getPicWidthInLumaSamples(); 98 const Int iPicHeight = sps.getPicHeightInLumaSamples(); 99 #endif 94 const ChromaFormat chromaFormatIDC = sps.getChromaFormatIdc(); 95 const Int iPicWidth = sps.getPicWidthInLumaSamples(); 96 const Int iPicHeight = sps.getPicHeightInLumaSamples(); 97 #endif 98 99 const UInt uiMaxCuWidth = sps.getMaxCUWidth(); 100 const UInt uiMaxCuHeight = sps.getMaxCUHeight(); 100 101 101 102 m_uhTotalDepth = uiMaxDepth; 102 103 m_numPartitionsInCtu = 1<<(m_uhTotalDepth<<1); 103 104 104 m_uiMaxCUWidth = uiMaxWidth; 105 m_uiMaxCUHeight = uiMaxHeight; 106 107 m_uiMinCUWidth = uiMaxWidth >> m_uhTotalDepth; 108 m_uiMinCUHeight = uiMaxHeight >> m_uhTotalDepth; 109 110 m_numPartInCtuWidth = m_uiMaxCUWidth / m_uiMinCUWidth; // equivalent to 1<<m_uhTotalDepth 111 m_numPartInCtuHeight = m_uiMaxCUHeight / m_uiMinCUHeight; // equivalent to 1<<m_uhTotalDepth 112 113 m_frameWidthInCtus = ( iPicWidth %m_uiMaxCUWidth ) ? iPicWidth /m_uiMaxCUWidth + 1 : iPicWidth /m_uiMaxCUWidth; 114 m_frameHeightInCtus = ( iPicHeight%m_uiMaxCUHeight ) ? iPicHeight/m_uiMaxCUHeight + 1 : iPicHeight/m_uiMaxCUHeight; 105 m_uiMinCUWidth = uiMaxCuWidth >> m_uhTotalDepth; 106 m_uiMinCUHeight = uiMaxCuHeight >> m_uhTotalDepth; 107 108 m_numPartInCtuWidth = uiMaxCuWidth / m_uiMinCUWidth; // equivalent to 1<<m_uhTotalDepth 109 m_numPartInCtuHeight = uiMaxCuHeight / m_uiMinCUHeight; // equivalent to 1<<m_uhTotalDepth 110 111 m_frameWidthInCtus = ( iPicWidth %uiMaxCuWidth ) ? iPicWidth /uiMaxCuWidth + 1 : iPicWidth /uiMaxCuWidth; 112 m_frameHeightInCtus = ( iPicHeight%uiMaxCuHeight ) ? iPicHeight/uiMaxCuHeight + 1 : iPicHeight/uiMaxCuHeight; 115 113 116 114 m_numCtusInFrame = m_frameWidthInCtus * m_frameHeightInCtus; … … 123 121 { 124 122 m_pictureCtuArray[i] = new TComDataCU; 125 m_pictureCtuArray[i]->create( chromaFormatIDC, m_numPartitionsInCtu, m_uiMaxCUWidth, m_uiMaxCUHeight, false, m_uiMaxCUWidth >> m_uhTotalDepth123 m_pictureCtuArray[i]->create( chromaFormatIDC, m_numPartitionsInCtu, uiMaxCuWidth, uiMaxCuHeight, false, uiMaxCuWidth >> m_uhTotalDepth 126 124 #if ADAPTIVE_QP_SELECTION 127 125 , true … … 291 289 if (m_pps.getTilesEnabledFlag()) 292 290 { 293 minHeight = 64 / g_uiMaxCUHeight;294 minWidth = 256 / g_uiMaxCUWidth;291 minHeight = 64 / m_sps.getMaxCUHeight(); 292 minWidth = 256 / m_sps.getMaxCUWidth(); 295 293 } 296 294 } -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h
r1259 r1289 87 87 UInt m_frameHeightInCtus; 88 88 89 UInt m_uiMaxCUWidth;90 UInt m_uiMaxCUHeight;91 89 UInt m_uiMinCUWidth; 92 90 UInt m_uiMinCUHeight; … … 99 97 100 98 std::deque<TComSlice*> m_apSlices; 101 102 TComSlice** m_apcTComSlice;103 UInt m_uiNumAllocatedSlice;104 99 TComDataCU** m_pictureCtuArray; ///< array of CU data. 105 100 … … 133 128 public: 134 129 #if SVC_EXTENSION 135 Void create ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth, const UInt layerId );130 Void create ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId ); 136 131 #if CGS_3D_ASYMLUT 137 132 TComPPS* getPPSToUpdate() { return &m_pps; } 138 133 #endif 139 134 #else 140 Void create ( const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth );135 Void create ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth ); 141 136 #endif 142 137 Void destroy (); -
branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.cpp
r1287 r1289 76 76 } 77 77 78 Void TComPicYuv::create ( const Int iPicWidth, 79 const Int iPicHeight, 80 const ChromaFormat chromaFormatIDC, 81 const UInt uiMaxCUWidth, ///< used for generating offsets to CUs. Can use iPicWidth if no offsets are required 82 const UInt uiMaxCUHeight, ///< used for generating offsets to CUs. Can use iPicHeight if no offsets are required 83 const UInt uiMaxCUDepth, ///< used for generating offsets to CUs. Can use 0 if no offsets are required 78 84 #if SVC_EXTENSION 79 Void TComPicYuv::create( const Int iPicWidth, const Int iPicHeight, const ChromaFormat chromaFormatIDC, const UInt uiMaxCUWidth, const UInt uiMaxCUHeight, const UInt uiMaxCUDepth, const Window* conformanceWindow ) 85 const Bool bUseMargin, ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image. 86 const Window* conformanceWindow) 80 87 #else 81 Void TComPicYuv::create( const Int iPicWidth, const Int iPicHeight, const ChromaFormat chromaFormatIDC, 82 const UInt uiMaxCUWidth, const UInt uiMaxCUHeight, const UInt uiMaxCUDepth ) 88 const Bool bUseMargin) ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image. 83 89 #endif 84 90 { 91 #if SVC_EXTENSION 92 if(conformanceWindow != NULL) 93 { 94 m_conformanceWindow = *conformanceWindow; 95 } 96 #endif 97 85 98 m_iPicWidth = iPicWidth; 86 99 m_iPicHeight = iPicHeight; 87 100 m_chromaFormatIDC = chromaFormatIDC; 88 89 #if SVC_EXTENSION 90 if(conformanceWindow != NULL) 91 { 92 m_conformanceWindow = *conformanceWindow; 93 } 94 #endif 95 96 #if LAYER_CTB 97 m_iMarginX = uiMaxCUWidth + 16; // for 16-byte alignment 98 m_iMarginY = uiMaxCUHeight + 16; // margin for 8-tap filter and infinite padding 99 #else 100 m_iMarginX = g_uiMaxCUWidth + 16; // for 16-byte alignment 101 m_iMarginY = g_uiMaxCUHeight + 16; // margin for 8-tap filter and infinite padding 102 #endif 103 101 m_iMarginX = (bUseMargin?uiMaxCUWidth:0) + 16; // for 16-byte alignment 102 m_iMarginY = (bUseMargin?uiMaxCUHeight:0) + 16; // margin for 8-tap filter and infinite padding 104 103 m_bIsBorderExtended = false; 105 104 -
branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h
r1287 r1289 95 95 // Memory management 96 96 // ------------------------------------------------------------------------------------------------ 97 #if SVC_EXTENSION 98 Void create ( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, const Window* conformanceWindow = NULL); 99 #else 97 100 98 Void create (const Int iPicWidth, 101 99 const Int iPicHeight, 102 100 const ChromaFormat chromaFormatIDC, 103 const UInt uiMaxCUWidth, 104 const UInt uiMaxCUHeight, 105 const UInt uiMaxCUDepth ); 101 const UInt uiMaxCUWidth, ///< used for generating offsets to CUs. Can use iPicWidth if no offsets are required 102 const UInt uiMaxCUHeight, ///< used for generating offsets to CUs. Can use iPicHeight if no offsets are required 103 const UInt uiMaxCUDepth, ///< used for generating offsets to CUs. Can use 0 if no offsets are required 104 #if SVC_EXTENSION 105 const Bool bUseMargin, ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image. 106 const Window* conformanceWindow = NULL); 107 #else 108 const Bool bUseMargin); ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image. 106 109 #endif 107 110 -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp
r1287 r1289 249 249 // ==================================================================================================================== 250 250 251 UInt g_uiMaxCUWidth = MAX_CU_SIZE;252 UInt g_uiMaxCUHeight = MAX_CU_SIZE;253 251 UInt g_uiMaxCUDepth = MAX_CU_DEPTH; 254 252 UInt g_uiAddCUDepth = 0; -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.h
r1287 r1289 86 86 87 87 // global variable (CTU width/height, max. CU depth) 88 extern UInt g_uiMaxCUWidth;89 extern UInt g_uiMaxCUHeight;90 88 extern UInt g_uiMaxCUDepth; 91 89 extern UInt g_uiAddCUDepth; -
branches/SHM-dev/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
r1287 r1289 145 145 { 146 146 m_tempPicYuv = new TComPicYuv; 147 m_tempPicYuv->create( m_picWidth, m_picHeight, m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, maxCUDepth );147 m_tempPicYuv->create( m_picWidth, m_picHeight, m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, maxCUDepth, true ); 148 148 } 149 149 … … 729 729 const Pel *piPcm = pcCU->getPCMSample(compID) + uiOffset; 730 730 const UInt uiStride = pcPicYuvRec->getStride(compID); 731 const UInt uiWidth = ((g_uiMaxCUWidth >> uiDepth) >> csx); 732 const UInt uiHeight = ((g_uiMaxCUWidth >> uiDepth) >> csy); 731 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 732 const UInt uiWidth = ((sps.getMaxCUWidth() >> uiDepth) >> csx); 733 const UInt uiHeight = ((sps.getMaxCUHeight() >> uiDepth) >> csy); 733 734 734 735 if ( pcCU->isLosslessCoded(uiAbsZorderIdx) && !pcCU->getIPCMFlag(uiAbsZorderIdx) ) … … 741 742 uiPcmLeftShiftBit = pcCU->getSlice()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID)); 742 743 #else 743 uiPcmLeftShiftBit = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));744 uiPcmLeftShiftBit = sps.getBitDepth(toChannelType(compID)) - sps.getPCMBitDepth(toChannelType(compID)); 744 745 #endif 745 746 } -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1287 r1289 3790 3790 } 3791 3791 3792 pcIlpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc]);3792 pcIlpPic[refLayerIdc]->copyUpsampledMvField(refLayerIdc); 3793 3793 } 3794 3794 else -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp
r1287 r1289 204 204 205 205 //! decode CU block recursively 206 Void TDecCu::xDecodeCU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool &isLastCtuOfSliceSegment) 207 { 208 TComPic* pcPic = pcCU->getPic(); 206 Void TDecCu::xDecodeCU( TComDataCU*const pcCU, const UInt uiAbsPartIdx, const UInt uiDepth, Bool &isLastCtuOfSliceSegment) 207 { 208 TComPic* pcPic = pcCU->getPic(); 209 const TComSPS &sps = pcPic->getPicSym()->getSPS(); 210 const TComPPS &pps = pcPic->getPicSym()->getPPS(); 211 const UInt maxCuWidth = sps.getMaxCUWidth(); 212 const UInt maxCuHeight= sps.getMaxCUHeight(); 209 213 UInt uiCurNumParts = pcPic->getNumPartitionsInCtu() >> (uiDepth<<1); 210 214 UInt uiQNumParts = uiCurNumParts>>2; 211 215 216 212 217 Bool bBoundary = false; 213 218 UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ]; 214 UInt uiRPelX = uiLPelX + ( g_uiMaxCUWidth>>uiDepth) - 1;219 UInt uiRPelX = uiLPelX + (maxCuWidth>>uiDepth) - 1; 215 220 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 216 UInt uiBPelY = uiTPelY + ( g_uiMaxCUHeight>>uiDepth) - 1;217 218 TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx()); 219 220 #if SVC_EXTENSION 221 UInt uiBPelY = uiTPelY + (maxCuHeight>>uiDepth) - 1; 222 223 #if SVC_EXTENSION 224 TComSlice * pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx()); 225 221 226 if( ( uiRPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getPicHeightInLumaSamples() ) ) 222 227 #else 223 if( ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )228 if( ( uiRPelX < sps.getPicWidthInLumaSamples() ) && ( uiBPelY < sps.getPicHeightInLumaSamples() ) ) 224 229 #endif 225 230 { … … 234 239 { 235 240 UInt uiIdx = uiAbsPartIdx; 236 if( ( g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && pcCU->getSlice()->getPPS()->getUseDQP())241 if( (maxCuWidth>>uiDepth) == (maxCuWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression 237 242 { 238 243 setdQPFlag(true); … … 240 245 } 241 246 242 if( ( g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj() )247 if( (maxCuWidth>>uiDepth) == (maxCuWidth >> ( pps.getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj() ) // TODO: tidy expression 243 248 { 244 249 setIsChromaQpAdjCoded(true); … … 253 258 if ( !isLastCtuOfSliceSegment && ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) ) 254 259 #else 255 if ( !isLastCtuOfSliceSegment && ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) )260 if ( !isLastCtuOfSliceSegment && ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) ) 256 261 #endif 257 262 { … … 265 270 uiIdx += uiQNumParts; 266 271 } 267 if( ( g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && pcCU->getSlice()->getPPS()->getUseDQP())272 if( (maxCuWidth>>uiDepth) == (maxCuWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression 268 273 { 269 274 if ( getdQPFlag() ) … … 276 281 } 277 282 278 if( ( g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && pcCU->getSlice()->getPPS()->getUseDQP())283 if( (maxCuWidth>>uiDepth) >= (maxCuWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression 279 284 { 280 285 setdQPFlag(true); … … 282 287 } 283 288 284 if( ( g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj() )289 if( (maxCuWidth>>uiDepth) >= (maxCuWidth >> ( pps.getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj() ) // TODO: tidy expression 285 290 { 286 291 setIsChromaQpAdjCoded(true); 287 292 } 288 293 289 if (p cCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())294 if (pps.getTransquantBypassEnableFlag()) 290 295 { 291 296 m_pcEntropyDecoder->decodeCUTransquantBypassFlag( pcCU, uiAbsPartIdx, uiDepth ); … … 393 398 { 394 399 TComPic* pcPic = pCtu->getPic(); 400 TComSlice * pcSlice = pCtu->getSlice(); 401 const TComSPS &sps=*(pcSlice->getSPS()); 395 402 396 403 Bool bBoundary = false; 397 404 UInt uiLPelX = pCtu->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ]; 398 UInt uiRPelX = uiLPelX + ( g_uiMaxCUWidth>>uiDepth) - 1;405 UInt uiRPelX = uiLPelX + (sps.getMaxCUWidth()>>uiDepth) - 1; 399 406 UInt uiTPelY = pCtu->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 400 UInt uiBPelY = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1; 401 402 TComSlice * pcSlice = pCtu->getPic()->getSlice(pCtu->getPic()->getCurrSliceIdx()); 407 UInt uiBPelY = uiTPelY + (sps.getMaxCUHeight()>>uiDepth) - 1; 403 408 404 409 #if SVC_EXTENSION 405 410 if( ( uiRPelX >= pcSlice->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getPicHeightInLumaSamples() ) ) 406 411 #else 407 if( ( uiRPelX >= pcSlice->getSPS()->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getSPS()->getPicHeightInLumaSamples() ) )412 if( ( uiRPelX >= sps.getPicWidthInLumaSamples() ) || ( uiBPelY >= sps.getPicHeightInLumaSamples() ) ) 408 413 #endif 409 414 { … … 424 429 if( ( uiLPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getPicHeightInLumaSamples() ) ) 425 430 #else 426 if( ( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )431 if( ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) ) 427 432 #endif 428 433 { … … 534 539 535 540 TComDataCU *pcCU = rTu.getCU(); 541 const TComSPS &sps=*(pcCU->getSlice()->getSPS()); 536 542 const UInt uiAbsPartIdx=rTu.GetAbsPartIdxTU(); 537 543 … … 649 655 const Int clipbd = pcCU->getSlice()->getBitDepth(toChannelType(compID)); 650 656 #else 651 const Int clipbd = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID));657 const Int clipbd = sps.getBitDepth(toChannelType(compID)); 652 658 #endif 653 659 #if O0043_BEST_EFFORT_DECODING 654 const Int bitDepthDelta = pcCU->getSlice()->getSPS()->getStreamBitDepth(toChannelType(compID)) - clipbd;660 const Int bitDepthDelta = sps.getStreamBitDepth(toChannelType(compID)) - clipbd; 655 661 #endif 656 662 … … 836 842 const UInt uiPcmLeftShiftBit = pcCU->getSlice()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID)); 837 843 #else 838 const UInt uiPcmLeftShiftBit = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID)); 844 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 845 const UInt uiPcmLeftShiftBit = sps.getBitDepth(toChannelType(compID)) - sps.getPCMBitDepth(toChannelType(compID)); 839 846 #endif 840 847 … … 859 866 Void TDecCu::xReconPCM( TComDataCU* pcCU, UInt uiDepth ) 860 867 { 868 const UInt maxCuWidth = pcCU->getSlice()->getSPS()->getMaxCUWidth(); 869 const UInt maxCuHeight = pcCU->getSlice()->getSPS()->getMaxCUHeight(); 861 870 for (UInt ch=0; ch < pcCU->getPic()->getNumberValidComponents(); ch++) 862 871 { 863 872 const ComponentID compID = ComponentID(ch); 864 const UInt width = ( g_uiMaxCUWidth >>(uiDepth+m_ppcYuvResi[uiDepth]->getComponentScaleX(compID)));865 const UInt height = ( g_uiMaxCUHeight>>(uiDepth+m_ppcYuvResi[uiDepth]->getComponentScaleY(compID)));873 const UInt width = (maxCuWidth >>(uiDepth+m_ppcYuvResi[uiDepth]->getComponentScaleX(compID))); 874 const UInt height = (maxCuHeight>>(uiDepth+m_ppcYuvResi[uiDepth]->getComponentScaleY(compID))); 866 875 const UInt stride = m_ppcYuvResi[uiDepth]->getStride(compID); 867 876 Pel * pPCMChannel = pcCU->getPCMSample(compID); … … 878 887 { 879 888 const ChromaFormat format = pCU->getPic()->getChromaFormat(); 880 const UInt numValidComp=getNumberValidComponents(format); 889 const UInt numValidComp = getNumberValidComponents(format); 890 const UInt maxCuWidth = pCU->getSlice()->getSPS()->getMaxCUWidth(); 891 const UInt maxCuHeight = pCU->getSlice()->getSPS()->getMaxCUHeight(); 881 892 882 893 for (UInt componentIndex = 0; componentIndex < numValidComp; componentIndex++) … … 884 895 const ComponentID component = ComponentID(componentIndex); 885 896 886 const UInt width = g_uiMaxCUWidth >> (depth + getComponentScaleX(component, format));887 const UInt height = g_uiMaxCUHeight >> (depth + getComponentScaleY(component, format));897 const UInt width = maxCuWidth >> (depth + getComponentScaleX(component, format)); 898 const UInt height = maxCuHeight >> (depth + getComponentScaleY(component, format)); 888 899 889 900 Pel *source = m_ppcYuvReco[depth]->getAddr(component, 0, width); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.h
r1263 r1289 106 106 protected: 107 107 108 Void xDecodeCU ( TComDataCU* pcCU, UInt uiAbsPartIdx,UInt uiDepth, Bool &isLastCtuOfSliceSegment);108 Void xDecodeCU ( TComDataCU* const pcCU, const UInt uiAbsPartIdx, const UInt uiDepth, Bool &isLastCtuOfSliceSegment); 109 109 Void xFinishDecodeCU ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool &isLastCtuOfSliceSegment); 110 110 Bool xDecodeSliceEnd ( TComDataCU* pcCU, UInt uiAbsPartIdx ); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp
r1287 r1289 371 371 { 372 372 Bool bIpcmFlag = true; 373 const TComSPS &sps=*(pcCU->getSlice()->getSPS()); 373 374 374 375 pcCU->setPartSizeSubParts ( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 375 pcCU->setSizeSubParts ( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );376 pcCU->setSizeSubParts ( sps.getMaxCUWidth()>>uiDepth, sps.getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth ); 376 377 pcCU->setTrIdxSubParts ( 0, uiAbsPartIdx, uiDepth ); 377 378 pcCU->setIPCMFlagSubParts ( bIpcmFlag, uiAbsPartIdx, uiDepth ); … … 439 440 pcCU->setPredModeSubParts( MODE_INTER, uiAbsPartIdx, uiDepth ); 440 441 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 441 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );442 pcCU->setSizeSubParts( pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth, pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth ); 442 443 pcCU->setMergeFlagSubParts( true , uiAbsPartIdx, 0, uiDepth ); 443 444 } … … 515 516 } 516 517 #if RExt__DECODER_DEBUG_BIT_STATISTICS 517 const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__SPLIT_FLAG, g_aucConvertToBit[ g_uiMaxCUWidth>>uiDepth]+2);518 const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__SPLIT_FLAG, g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth]+2); 518 519 #endif 519 520 … … 537 538 UInt uiSymbol, uiMode = 0; 538 539 PartSize eMode; 540 const UChar cuWidth =UChar(pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth); 541 const UChar cuHeight=UChar(pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth); 539 542 540 543 #if RExt__DECODER_DEBUG_BIT_STATISTICS 541 const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__PART_SIZE, g_aucConvertToBit[ g_uiMaxCUWidth>>uiDepth]+2);544 const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__PART_SIZE, g_aucConvertToBit[cuWidth]+2); 542 545 #endif 543 546 … … 567 570 UInt uiMaxNumBits = 2; 568 571 569 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth)== 8 ) )572 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( cuWidth == 8 && cuHeight == 8 ) ) 570 573 { 571 574 uiMaxNumBits ++; … … 605 608 } 606 609 pcCU->setPartSizeSubParts( eMode, uiAbsPartIdx, uiDepth ); 607 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );610 pcCU->setSizeSubParts( cuWidth, cuHeight, uiAbsPartIdx, uiDepth ); 608 611 } 609 612 … … 643 646 } 644 647 #if RExt__DECODER_DEBUG_BIT_STATISTICS 645 const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__INTRA_DIR_ANG, g_aucConvertToBit[ g_uiMaxCUWidth>>depth]+2, CHANNEL_TYPE_LUMA);648 const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__INTRA_DIR_ANG, g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()>>depth]+2, CHANNEL_TYPE_LUMA); 646 649 #endif 647 650 for (j=0;j<partNum;j++) … … 696 699 UInt uiSymbol; 697 700 #if RExt__DECODER_DEBUG_BIT_STATISTICS 698 const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__INTRA_DIR_ANG, g_aucConvertToBit[ g_uiMaxCUWidth>>uiDepth]+2, CHANNEL_TYPE_CHROMA);701 const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__INTRA_DIR_ANG, g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth]+2, CHANNEL_TYPE_CHROMA); 699 702 #endif 700 703 … … 975 978 UInt symbol; 976 979 #if RExt__DECODER_DEBUG_BIT_STATISTICS 977 const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__CHROMA_QP_ADJUSTMENT, g_aucConvertToBit[ g_uiMaxCUWidth>>depth]+2, CHANNEL_TYPE_CHROMA);980 const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__CHROMA_QP_ADJUSTMENT, g_aucConvertToBit[cu->getSlice()->getSPS()->getMaxCUWidth()>>depth]+2, CHANNEL_TYPE_CHROMA); 978 981 #endif 979 982 … … 1869 1872 1870 1873 #if RExt__DECODER_DEBUG_BIT_STATISTICS 1871 const TComCodingStatisticsClassType ctype(STATS__EXPLICIT_RDPCM_BITS, g_aucConvertToBit[ g_uiMaxCUWidth>>rTu.GetTransformDepthTotal()]+2);1874 const TComCodingStatisticsClassType ctype(STATS__EXPLICIT_RDPCM_BITS, g_aucConvertToBit[cu->getSlice()->getSPS()->getMaxCUWidth()>>rTu.GetTransformDepthTotal()]+2); 1872 1875 #endif 1873 1876 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1288 r1289 254 254 } 255 255 256 rpcPic->create( vps, sps, pps, g_uiMaxCU Width, g_uiMaxCUHeight, g_uiMaxCUDepth, true, m_layerId);256 rpcPic->create( vps, sps, pps, g_uiMaxCUDepth, true, m_layerId); 257 257 #else //SVC_EXTENSION 258 rpcPic->create ( sps, pps, g_uiMaxCU Width, g_uiMaxCUHeight, g_uiMaxCUDepth, true);258 rpcPic->create ( sps, pps, g_uiMaxCUDepth, true); 259 259 #endif //SVC_EXTENSION 260 260 … … 303 303 } 304 304 305 rpcPic->create( vps, sps, pps, g_uiMaxCU Width, g_uiMaxCUHeight, g_uiMaxCUDepth, true, m_layerId);305 rpcPic->create( vps, sps, pps, g_uiMaxCUDepth, true, m_layerId); 306 306 #else //SVC_EXTENSION 307 rpcPic->create ( sps, pps, g_uiMaxCU Width, g_uiMaxCUHeight, g_uiMaxCUDepth, true);307 rpcPic->create ( sps, pps, g_uiMaxCUDepth, true); 308 308 #endif //SVC_EXTENSION 309 309 } … … 493 493 UInt refLayerId = 0; 494 494 495 pBLPic->create( *vps, *sps, *pps, sps->getMaxCU Width(), sps->getMaxCUHeight(), sps->getMaxCUDepth(), true, refLayerId);495 pBLPic->create( *vps, *sps, *pps, sps->getMaxCUDepth(), true, refLayerId); 496 496 497 497 // it is needed where the VPS is accessed through the slice … … 572 572 573 573 // TODO: remove the use of the following globals: 574 g_uiMaxCUWidth = sps->getMaxCUWidth();575 g_uiMaxCUHeight = sps->getMaxCUHeight();576 574 g_uiMaxCUDepth = sps->getMaxCUDepth(); 577 575 #if SVC_EXTENSION … … 613 611 m_cLoopFilter.create( sps->getMaxCUDepth() ); 614 612 m_cPrediction.initTempBuff(sps->getChromaFormatIdc()); 613 615 614 616 615 Bool isField = false; … … 702 701 703 702 // Check if any new SEI has arrived 704 if(!m_SEIs.empty())705 {706 // Currently only decoding Unit SEI message occurring between VCL NALUs copied707 SEIMessages &picSEI = m_pcPic->getSEIs();708 SEIMessages decodingUnitInfos = extractSeisByType (m_SEIs, SEI::DECODING_UNIT_INFO);709 picSEI.insert(picSEI.end(), decodingUnitInfos.begin(), decodingUnitInfos.end());710 deleteSEIs(m_SEIs);711 }703 if(!m_SEIs.empty()) 704 { 705 // Currently only decoding Unit SEI message occurring between VCL NALUs copied 706 SEIMessages &picSEI = m_pcPic->getSEIs(); 707 SEIMessages decodingUnitInfos = extractSeisByType (m_SEIs, SEI::DECODING_UNIT_INFO); 708 picSEI.insert(picSEI.end(), decodingUnitInfos.begin(), decodingUnitInfos.end()); 709 deleteSEIs(m_SEIs); 710 } 712 711 } 713 712 … … 2199 2198 if( m_layerId > 0 ) 2200 2199 { 2201 g_uiMaxCUWidth = sps->getMaxCUWidth();2202 g_uiMaxCUHeight = sps->getMaxCUHeight();2203 2200 g_uiMaxCUDepth = sps->getMaxCUDepth(); 2204 2201 g_uiAddCUDepth = max (0, sps->getLog2MinCodingBlockSize() - (Int)sps->getQuadtreeTULog2MinSize() ); … … 2210 2207 m_cIlpPic[j] = new TComPic; 2211 2208 2212 m_cIlpPic[j]->create(*vps, *sps, *slice->getPPS(), g_uiMaxCU Width, g_uiMaxCUHeight, g_uiMaxCUDepth, true, m_layerId);2209 m_cIlpPic[j]->create(*vps, *sps, *slice->getPPS(), g_uiMaxCUDepth, true, m_layerId); 2213 2210 2214 2211 for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCtusInFrame(); i++) … … 2389 2386 Int picHeight = pcSlice->getPicHeightInLumaSamples(); 2390 2387 m_pColorMappedPic = new TComPicYuv; 2391 m_pColorMappedPic->create( picWidth, picHeight, pcSlice->getChromaFormatIdc()/*CHROMA_420*/, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );2388 m_pColorMappedPic->create( picWidth, picHeight, pcSlice->getChromaFormatIdc()/*CHROMA_420*/, pcSlice->getSPS()->getMaxCUWidth(), pcSlice->getSPS()->getMaxCUHeight(), g_uiMaxCUDepth, true, NULL ); 2392 2389 } 2393 2390 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1287 r1289 145 145 146 146 Int m_maxTempLayer; ///< Max temporal layer 147 Bool m_useAMP; 147 Bool m_useAMP; 148 UInt m_maxCUWidth; 149 UInt m_maxCUHeight; 148 150 //======= Transform ============= 149 151 UInt m_uiQuadtreeTULog2MaxSize; … … 511 513 Int getMaxTempLayer () { return m_maxTempLayer; } 512 514 Void setMaxTempLayer ( Int maxTempLayer ) { m_maxTempLayer = maxTempLayer; } 515 Void setMaxCUWidth ( UInt u ) { m_maxCUWidth = u; } 516 Void setMaxCUHeight ( UInt u ) { m_maxCUHeight = u; } 517 513 518 //======== Transform ============= 514 519 Void setQuadtreeTULog2MaxSize ( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } … … 970 975 Void setTMVPConstraintsSEIEnabled(Int b) { m_TMVPConstraintsSEIEnabled = b; } 971 976 Int getTMVPConstraintsSEIEnabled() { return m_TMVPConstraintsSEIEnabled; } 972 973 977 #endif 974 978 #if P0123_ALPHA_CHANNEL_SEI -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp
r1287 r1289 372 372 TComPic* pcPic = rpcBestCU->getPic(); 373 373 DEBUG_STRING_NEW(sDebug) 374 const TComPPS &pps=*(rpcTempCU->getSlice()->getPPS()); 375 const TComSPS &sps=*(rpcTempCU->getSlice()->getSPS()); 376 const UInt maxCUWidth = sps.getMaxCUWidth(); 374 377 375 378 // get Original YUV data from picture … … 396 399 const UInt numberValidComponents = rpcBestCU->getPic()->getNumberValidComponents(); 397 400 398 if( ( g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( rpcTempCU->getSlice()->getPPS()->getMaxCuDQPDepth())) )401 if( (maxCUWidth>>uiDepth) >= (maxCUWidth >> ( pps.getMaxCuDQPDepth())) ) // TODO: tidy expression 399 402 { 400 403 Int idQP = m_pcEncCfg->getMaxDeltaQP(); … … 403 406 iMaxQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP ); 404 407 #else 405 iMinQP = Clip3( - rpcTempCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP );406 iMaxQP = Clip3( - rpcTempCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP );408 iMinQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP ); 409 iMaxQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP ); 407 410 #endif 408 411 } … … 423 426 const Int lowestQP = iMinQP; // For TQB, use this QP which is the lowest non TQB QP tested (rather than QP'=0) - that way delta QPs are smaller, and TQB can be tested at all CU levels. 424 427 425 if ( ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag()) )428 if ( (pps.getTransquantBypassEnableFlag()) ) 426 429 { 427 430 isAddLowestQP = true; // mark that the first iteration is to cost TQB mode. … … 439 442 ( uiBPelY < rpcBestCU->getSlice()->getPicHeightInLumaSamples() ) ) 440 443 #else 441 if ( ( uiRPelX < rpcBestCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) &&442 ( uiBPelY < rpcBestCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) )444 if ( ( uiRPelX < sps.getPicWidthInLumaSamples() ) && 445 ( uiBPelY < sps.getPicHeightInLumaSamples() ) ) 443 446 #endif 444 447 { … … 492 495 * block position 493 496 */ 494 Int lgMinCuSize = pcSlice->getSPS()->getLog2MinCodingBlockSize() +495 std::max<Int>(0, pcSlice->getSPS()->getLog2DiffMaxMinCodingBlockSize()-Int(pcSlice->getPPS()->getMaxCuChromaQpAdjDepth()));496 m_ChromaQpAdjIdc = ((uiLPelX >> lgMinCuSize) + (uiTPelY >> lgMinCuSize)) % (p cSlice->getPPS()->getChromaQpAdjTableSize() + 1);497 Int lgMinCuSize = sps.getLog2MinCodingBlockSize() + 498 std::max<Int>(0, sps.getLog2DiffMaxMinCodingBlockSize()-Int(pps.getMaxCuChromaQpAdjDepth())); 499 m_ChromaQpAdjIdc = ((uiLPelX >> lgMinCuSize) + (uiTPelY >> lgMinCuSize)) % (pps.getChromaQpAdjTableSize() + 1); 497 500 } 498 501 … … 591 594 592 595 //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 593 if( pcSlice->getSPS()->getUseAMP() && uiDepth < g_uiMaxCUDepth-g_uiAddCUDepth )596 if(sps.getUseAMP() && uiDepth < g_uiMaxCUDepth-g_uiAddCUDepth ) 594 597 { 595 598 #if AMP_ENC_SPEEDUP … … 720 723 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 721 724 { 722 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )725 if( rpcTempCU->getWidth(0) > ( 1 << sps.getQuadtreeTULog2MinSize() ) ) 723 726 { 724 727 Double tmpIntraCost; … … 731 734 732 735 // test PCM 733 if( pcPic->getSlice(0)->getSPS()->getUsePCM()734 && rpcTempCU->getWidth(0) <= (1<< pcPic->getSlice(0)->getSPS()->getPCMLog2MaxSize())735 && rpcTempCU->getWidth(0) >= (1<< pcPic->getSlice(0)->getSPS()->getPCMLog2MinSize()) )736 if(sps.getUsePCM() 737 && rpcTempCU->getWidth(0) <= (1<<sps.getPCMLog2MaxSize()) 738 && rpcTempCU->getWidth(0) >= (1<<sps.getPCMLog2MinSize()) ) 736 739 { 737 740 #if SVC_EXTENSION 738 741 UInt uiRawBits = getTotalBits(rpcBestCU->getWidth(0), rpcBestCU->getHeight(0), rpcBestCU->getPic()->getChromaFormat(), pcPic->getSlice(0)->getBitDepths().recon); 739 742 #else 740 UInt uiRawBits = getTotalBits(rpcBestCU->getWidth(0), rpcBestCU->getHeight(0), rpcBestCU->getPic()->getChromaFormat(), pcPic->getSlice(0)->getSPS()->getBitDepths().recon);743 UInt uiRawBits = getTotalBits(rpcBestCU->getWidth(0), rpcBestCU->getHeight(0), rpcBestCU->getPic()->getChromaFormat(), sps.getBitDepths().recon); 741 744 #endif 742 745 UInt uiBestBits = rpcBestCU->getTotalBits(); … … 799 802 } 800 803 801 if( ( g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( rpcTempCU->getSlice()->getPPS()->getMaxCuDQPDepth())) )804 if( (maxCUWidth>>uiDepth) == (maxCUWidth >> ( pps.getMaxCuDQPDepth())) ) // TODO: tidy expression 802 805 { 803 806 Int idQP = m_pcEncCfg->getMaxDeltaQP(); … … 806 809 iMaxQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP ); 807 810 #else 808 iMinQP = Clip3( - rpcTempCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP );809 iMaxQP = Clip3( - rpcTempCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP );811 iMinQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP ); 812 iMaxQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP ); 810 813 #endif 811 814 } 812 else if( ( g_uiMaxCUWidth>>uiDepth) > (g_uiMaxCUWidth >> ( rpcTempCU->getSlice()->getPPS()->getMaxCuDQPDepth())) )815 else if( (maxCUWidth>>uiDepth) > (maxCUWidth >> ( pps.getMaxCuDQPDepth())) ) // TODO: tidy expression 813 816 { 814 817 iMinQP = iBaseQP; … … 855 858 if( ( pcSubBestPartCU->getCUPelX() < pcSlice->getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < pcSlice->getPicHeightInLumaSamples() ) ) 856 859 #else 857 if( ( pcSubBestPartCU->getCUPelX() < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )860 if( ( pcSubBestPartCU->getCUPelX() < sps.getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < sps.getPicHeightInLumaSamples() ) ) 858 861 #endif 859 862 { … … 903 906 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 904 907 905 if( ( g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( rpcTempCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && rpcTempCU->getSlice()->getPPS()->getUseDQP())908 if( (maxCUWidth>>uiDepth) == (maxCUWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression 906 909 { 907 910 Bool hasResidual = false; … … 1045 1048 Void TEncCu::xEncodeCU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1046 1049 { 1047 TComPic* pcPic = pcCU->getPic(); 1048 1049 Bool bBoundary = false; 1050 UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ]; 1051 UInt uiRPelX = uiLPelX + (g_uiMaxCUWidth>>uiDepth) - 1; 1052 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 1053 UInt uiBPelY = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1; 1054 1055 TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx()); 1050 TComPic *const pcPic = pcCU->getPic(); 1051 TComSlice *const pcSlice = pcCU->getSlice(); 1052 const TComSPS &sps =*(pcSlice->getSPS()); 1053 const TComPPS &pps =*(pcSlice->getPPS()); 1054 1055 const UInt maxCUWidth = sps.getMaxCUWidth(); 1056 const UInt maxCUHeight = sps.getMaxCUHeight(); 1057 1058 Bool bBoundary = false; 1059 UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ]; 1060 const UInt uiRPelX = uiLPelX + (maxCUWidth>>uiDepth) - 1; 1061 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 1062 const UInt uiBPelY = uiTPelY + (maxCUHeight>>uiDepth) - 1; 1063 1056 1064 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1057 1065 if (m_pcEncCfg->getSkipPictureAtArcSwitch() && m_pcEncCfg->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncCfg->getAdaptiveResolutionChange()) … … 1064 1072 if( ( uiRPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getPicHeightInLumaSamples() ) ) 1065 1073 #else 1066 if( ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )1074 if( ( uiRPelX < sps.getPicWidthInLumaSamples() ) && ( uiBPelY < sps.getPicHeightInLumaSamples() ) ) 1067 1075 #endif 1068 1076 { … … 1077 1085 { 1078 1086 UInt uiQNumParts = ( pcPic->getNumPartitionsInCtu() >> (uiDepth<<1) )>>2; 1079 if( ( g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && pcCU->getSlice()->getPPS()->getUseDQP())1087 if( (maxCUWidth>>uiDepth) == (maxCUWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression 1080 1088 { 1081 1089 setdQPFlag(true); 1082 1090 } 1083 1091 1084 if( ( g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj())1092 if( (maxCUWidth>>uiDepth) == (maxCUWidth >> ( pps.getMaxCuChromaQpAdjDepth())) && pcSlice->getUseChromaQpAdj()) // TODO: tidy expression 1085 1093 { 1086 1094 setCodeChromaQpAdjFlag(true); … … 1095 1103 if( ( uiLPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getPicHeightInLumaSamples() ) ) 1096 1104 #else 1097 if( ( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )1105 if( ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) ) 1098 1106 #endif 1099 1107 { … … 1104 1112 } 1105 1113 1106 if( ( g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && pcCU->getSlice()->getPPS()->getUseDQP())1114 if( (maxCUWidth>>uiDepth) >= (maxCUWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression 1107 1115 { 1108 1116 setdQPFlag(true); 1109 1117 } 1110 1118 1111 if( ( g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj())1119 if( (maxCUWidth>>uiDepth) >= (maxCUWidth >> ( pps.getMaxCuChromaQpAdjDepth())) && pcSlice->getUseChromaQpAdj()) // TODO: tidy expression 1112 1120 { 1113 1121 setCodeChromaQpAdjFlag(true); 1114 1122 } 1115 1123 1116 if (p cCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())1124 if (pps.getTransquantBypassEnableFlag()) 1117 1125 { 1118 1126 m_pcEntropyCoder->encodeCUTransquantBypassFlag( pcCU, uiAbsPartIdx ); 1119 1127 } 1120 1128 1121 if( !pc CU->getSlice()->isIntra() )1129 if( !pcSlice->isIntra() ) 1122 1130 { 1123 1131 m_pcEntropyCoder->encodeSkipFlag( pcCU, uiAbsPartIdx ); … … 1639 1647 UInt uiDepth = pcCU->getDepth( 0 ); 1640 1648 1641 if( pcCU->getSlice()->getPPS()->getUseDQP() && (g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) ) 1649 const TComPPS &pps = *(pcCU->getSlice()->getPPS()); 1650 const TComSPS &sps = *(pcCU->getSlice()->getSPS()); 1651 if ( pps.getUseDQP() && (sps.getMaxCUWidth()>>uiDepth) >= (sps.getMaxCUWidth() >> ( pps.getMaxCuDQPDepth())) ) // TODO: tidy expression 1642 1652 { 1643 1653 if ( pcCU->getQtRootCbf( 0) ) … … 1755 1765 TCoeff* pCoeffY = pCtu->getCoeff(COMPONENT_Y); 1756 1766 TCoeff* pArlCoeffY = pCtu->getArlCoeff(COMPONENT_Y); 1757 1758 UInt uiMinCUWidth = g_uiMaxCUWidth >> g_uiMaxCUDepth; 1767 const TComSPS &sps = *(pCtu->getSlice()->getSPS()); 1768 1769 const UInt uiMinCUWidth = sps.getMaxCUWidth() >> g_uiMaxCUDepth; 1759 1770 UInt uiMinNumCoeffInCU = 1 << uiMinCUWidth; 1760 1771 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1287 r1289 210 210 m_Enc3DAsymLUTPicUpdate.create( m_pcCfg->getCGSMaxOctantDepth() , prevBitDepthLuma, prevBitDepthChroma, bitDepthLuma, bitDepthChroma , m_pcCfg->getCGSMaxYPartNumLog2() ); 211 211 m_Enc3DAsymLUTPPS.create( m_pcCfg->getCGSMaxOctantDepth(), prevBitDepthLuma, prevBitDepthChroma, bitDepthLuma, prevBitDepthChroma , m_pcCfg->getCGSMaxYPartNumLog2() ); 212 212 213 if(!m_pColorMappedPic) 213 214 { 214 215 m_pColorMappedPic = new TComPicYuv; 215 m_pColorMappedPic->create( m_ppcTEncTop[0]->getSourceWidth(), m_ppcTEncTop[0]->getSourceHeight(), m_ppcTEncTop[0]->getChromaFormatIDC(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );216 m_pColorMappedPic->create( m_ppcTEncTop[0]->getSourceWidth(), m_ppcTEncTop[0]->getSourceHeight(), m_ppcTEncTop[0]->getChromaFormatIDC(), pcTEncTop->getSPS()->getMaxCUWidth(), pcTEncTop->getSPS()->getMaxCUHeight(), g_uiMaxCUDepth, true, NULL ); 216 217 } 217 218 } … … 3162 3163 if (conversion!=IPCOLOURSPACE_UNCHANGED) 3163 3164 { 3164 cscd.create(pcPicD->getWidth(COMPONENT_Y), pcPicD->getHeight(COMPONENT_Y), pcPicD->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);3165 cscd.create(pcPicD->getWidth(COMPONENT_Y), pcPicD->getHeight(COMPONENT_Y), pcPicD->getChromaFormat(), pcPicD->getWidth(COMPONENT_Y), pcPicD->getHeight(COMPONENT_Y), 0, false); 3165 3166 #if SVC_EXTENSION 3166 3167 TVideoIOYuv::ColourSpaceConvert(*pcPicD, cscd, conversion, pcPic->getSlice(0)->getBitDepths().recon, false); … … 3385 3386 { 3386 3387 TComPicYuv &reconField=*(apcPicRecFields[fieldNum]); 3387 cscd[fieldNum].create(reconField.getWidth(COMPONENT_Y), reconField.getHeight(COMPONENT_Y), reconField.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);3388 cscd[fieldNum].create(reconField.getWidth(COMPONENT_Y), reconField.getHeight(COMPONENT_Y), reconField.getChromaFormat(), reconField.getWidth(COMPONENT_Y), reconField.getHeight(COMPONENT_Y), 0, false); 3388 3389 #if SVC_EXTENSION 3389 3390 TVideoIOYuv::ColourSpaceConvert(reconField, cscd[fieldNum], conversion, pcPicOrgFirstField->getSlice(0)->getBitDepths().recon, false); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h
r1287 r1289 194 194 195 195 #if !SVC_EXTENSION 196 Void printOutSummary ( UInt uiNumAllPicCoded, Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE );196 Void printOutSummary ( UInt uiNumAllPicCoded, Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths ); 197 197 #endif 198 198 Void preLoopFilterPicAll ( TComPic* pcPic, UInt64& ruiDist ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncPic.cpp
r1260 r1289 128 128 #if SVC_EXTENSION 129 129 // * \param vps reference to used VPS 130 Void TEncPic::create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual, const UInt layerId )130 Void TEncPic::create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual, const UInt layerId ) 131 131 { 132 TComPic::create( vps, sps, pps, uiMax Width, uiMaxHeight, uiMaxDepth, bIsVirtual, layerId );132 TComPic::create( vps, sps, pps, uiMaxDepth, bIsVirtual, layerId ); 133 133 134 134 const Int iWidth = vps.getPicWidthInLumaSamples(&sps, layerId); 135 135 const Int iHeight = vps.getPicHeightInLumaSamples(&sps, layerId); 136 136 #else 137 Void TEncPic::create( const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual )137 Void TEncPic::create( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual ) 138 138 { 139 TComPic::create( sps, pps, uiMax Width, uiMaxHeight, uiMaxDepth, bIsVirtual );140 const Int iWidth= sps.getPicWidthInLumaSamples();141 const Int iHeight= sps.getPicHeightInLumaSamples();139 TComPic::create( sps, pps, uiMaxDepth, bIsVirtual ); 140 const Int iWidth = sps.getPicWidthInLumaSamples(); 141 const Int iHeight = sps.getPicHeightInLumaSamples(); 142 142 #endif 143 144 const UInt uiMaxWidth = sps.getMaxCUWidth(); 145 const UInt uiMaxHeight = sps.getMaxCUHeight(); 143 146 m_uiMaxAQDepth = uiMaxAQDepth; 144 147 if ( uiMaxAQDepth > 0 ) -
branches/SHM-dev/source/Lib/TLibEncoder/TEncPic.h
r1259 r1289 106 106 107 107 #if SVC_EXTENSION 108 Void create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual /* = false*/, const UInt layerId );108 Void create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual /* = false*/, const UInt layerId ); 109 109 #else //SVC_EXTENSION 110 Void create( const TComSPS &sps, const TComPPS &pps, UInt uiMax Width, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual /* = false*/ );110 Void create( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual /* = false*/ ); 111 111 #endif //SVC_EXTENSION 112 112 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1287 r1289 204 204 Int bipredSearchRange, 205 205 Int iFastSearch, 206 const UInt maxCUWidth, 207 const UInt maxCUHeight, 206 208 TEncEntropy* pcEntropyCoder, 207 209 TComRdCost* pcRdCost, … … 250 252 initTempBuff(cform); 251 253 252 m_pTempPel = new Pel[ g_uiMaxCUWidth*g_uiMaxCUHeight];254 m_pTempPel = new Pel[maxCUWidth*maxCUHeight]; 253 255 254 256 const UInt uiNumLayersToAllocate = pcEncCfg->getQuadtreeTULog2MaxSize()-pcEncCfg->getQuadtreeTULog2MinSize()+1; … … 259 261 const UInt csy=::getComponentScaleY(ComponentID(ch), cform); 260 262 m_ppcQTTempCoeff[ch] = new TCoeff* [uiNumLayersToAllocate]; 261 m_pcQTTempCoeff[ch] = new TCoeff [( g_uiMaxCUWidth*g_uiMaxCUHeight)>>(csx+csy) ];263 m_pcQTTempCoeff[ch] = new TCoeff [(maxCUWidth*maxCUHeight)>>(csx+csy) ]; 262 264 #if ADAPTIVE_QP_SELECTION 263 265 m_ppcQTTempArlCoeff[ch] = new TCoeff*[uiNumLayersToAllocate]; 264 m_pcQTTempArlCoeff[ch] = new TCoeff [( g_uiMaxCUWidth*g_uiMaxCUHeight)>>(csx+csy) ];266 m_pcQTTempArlCoeff[ch] = new TCoeff [(maxCUWidth*maxCUHeight)>>(csx+csy) ]; 265 267 #endif 266 268 m_puhQTTempCbf[ch] = new UChar [uiNumPartitions]; … … 268 270 for (UInt layer = 0; layer < uiNumLayersToAllocate; layer++) 269 271 { 270 m_ppcQTTempCoeff[ch][layer] = new TCoeff[( g_uiMaxCUWidth*g_uiMaxCUHeight)>>(csx+csy)];272 m_ppcQTTempCoeff[ch][layer] = new TCoeff[(maxCUWidth*maxCUHeight)>>(csx+csy)]; 271 273 #if ADAPTIVE_QP_SELECTION 272 m_ppcQTTempArlCoeff[ch][layer] = new TCoeff[( g_uiMaxCUWidth*g_uiMaxCUHeight)>>(csx+csy) ];274 m_ppcQTTempArlCoeff[ch][layer] = new TCoeff[(maxCUWidth*maxCUHeight)>>(csx+csy) ]; 273 275 #endif 274 276 } … … 286 288 for( UInt ui = 0; ui < uiNumLayersToAllocate; ++ui ) 287 289 { 288 m_pcQTTempTComYuv[ui].create( g_uiMaxCUWidth, g_uiMaxCUHeight, pcEncCfg->getChromaFormatIdc() );289 } 290 m_pcQTTempTransformSkipTComYuv.create( g_uiMaxCUWidth, g_uiMaxCUHeight, pcEncCfg->getChromaFormatIdc() );290 m_pcQTTempTComYuv[ui].create( maxCUWidth, maxCUHeight, pcEncCfg->getChromaFormatIdc() ); 291 } 292 m_pcQTTempTransformSkipTComYuv.create( maxCUWidth, maxCUHeight, pcEncCfg->getChromaFormatIdc() ); 291 293 m_tmpYuvPred.create(MAX_CU_SIZE, MAX_CU_SIZE, pcEncCfg->getChromaFormatIdc()); 292 294 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.h
r1259 r1289 138 138 Int bipredSearchRange, 139 139 Int iFastSearch, 140 const UInt maxCUWidth, 141 const UInt maxCUHeight, 140 142 TEncEntropy* pcEntropyCoder, 141 143 TComRdCost* pcRdCost, -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r1288 r1289 68 68 { 69 69 m_apcPicYuvPred = new TComPicYuv; 70 m_apcPicYuvPred->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth );70 m_apcPicYuvPred->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true ); 71 71 } 72 72 … … 75 75 { 76 76 m_apcPicYuvResi = new TComPicYuv; 77 m_apcPicYuvResi->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth );77 m_apcPicYuvResi->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true ); 78 78 } 79 79 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1288 r1289 117 117 m_cGOPEncoder. create( ); 118 118 #endif 119 m_cSliceEncoder. create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );120 m_cCuEncoder. create( g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, m_chromaFormatIDC );119 m_cSliceEncoder. create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, g_uiMaxCUDepth ); 120 m_cCuEncoder. create( g_uiMaxCUDepth, m_maxCUWidth, m_maxCUHeight, m_chromaFormatIDC ); 121 121 if (m_bUseSAO) 122 122 { 123 m_cEncSAO.create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_saoOffsetBitShift[CHANNEL_TYPE_LUMA], m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] );123 m_cEncSAO.create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, g_uiMaxCUDepth, m_saoOffsetBitShift[CHANNEL_TYPE_LUMA], m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] ); 124 124 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK 125 125 m_cEncSAO.createEncData(getSaoCtuBoundary()); … … 140 140 { 141 141 m_cRateCtrl.init( m_framesToBeEncoded, m_RCTargetBitrate, m_iFrameRate, m_iGOPSize, m_iSourceWidth, m_iSourceHeight, 142 g_uiMaxCUWidth, g_uiMaxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList );142 m_maxCUWidth, m_maxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList ); 143 143 } 144 144 … … 258 258 259 259 // initialize encoder search class 260 m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_iFastSearch, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() );260 m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_iFastSearch, m_maxCUWidth, m_maxCUHeight, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() ); 261 261 262 262 m_iMaxRefPicNum = 0; … … 579 579 { 580 580 rpcPicYuvRec = new TComPicYuv; 581 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);581 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, g_uiMaxCUDepth, true); 582 582 } 583 583 rcListPicYuvRecOut.pushBack( rpcPicYuvRec ); … … 620 620 { 621 621 rpcPicYuvRec = new TComPicYuv; 622 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);622 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, g_uiMaxCUDepth, true); 623 623 } 624 624 rcListPicYuvRecOut.pushBack( rpcPicYuvRec ); … … 750 750 } 751 751 752 pcEPic->create( m_cVPS, m_cSPS, m_cPPS, g_uiMaxCU Width, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1, false, m_layerId);752 pcEPic->create( m_cVPS, m_cSPS, m_cPPS, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1, false, m_layerId); 753 753 #else //SVC_EXTENSION 754 pcEPic->create( m_cSPS, m_cPPS, g_uiMaxCU Width, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1, false);754 pcEPic->create( m_cSPS, m_cPPS, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1, false); 755 755 #endif //SVC_EXTENSION 756 756 rpcPic = pcEPic; … … 800 800 } 801 801 802 rpcPic->create( m_cVPS, m_cSPS, m_cPPS, g_uiMaxCU Width, g_uiMaxCUHeight, g_uiMaxCUDepth, false, m_layerId );802 rpcPic->create( m_cVPS, m_cSPS, m_cPPS, g_uiMaxCUDepth, false, m_layerId ); 803 803 #else //SVC_EXTENSION 804 rpcPic->create( m_cSPS, m_cPPS, g_uiMaxCU Width, g_uiMaxCUHeight, g_uiMaxCUDepth, false );804 rpcPic->create( m_cSPS, m_cPPS, g_uiMaxCUDepth, false ); 805 805 #endif //SVC_EXTENSION 806 806 } … … 887 887 m_cSPS.setPicHeightInLumaSamples ( m_iSourceHeight ); 888 888 m_cSPS.setConformanceWindow ( m_conformanceWindow ); 889 m_cSPS.setMaxCUWidth ( g_uiMaxCUWidth );890 m_cSPS.setMaxCUHeight ( g_uiMaxCUHeight );889 m_cSPS.setMaxCUWidth ( m_maxCUWidth ); 890 m_cSPS.setMaxCUHeight ( m_maxCUHeight ); 891 891 m_cSPS.setMaxCUDepth ( g_uiMaxCUDepth ); 892 892 m_cSPS.setChromaFormatIdc( m_chromaFormatIDC); … … 1430 1430 Void TEncCfg::xCheckGSParameters() 1431 1431 { 1432 Int iWidthInCU = ( m_iSourceWidth% g_uiMaxCUWidth ) ? m_iSourceWidth/g_uiMaxCUWidth + 1 : m_iSourceWidth/g_uiMaxCUWidth;1433 Int iHeightInCU = ( m_iSourceHeight% g_uiMaxCUHeight ) ? m_iSourceHeight/g_uiMaxCUHeight + 1 : m_iSourceHeight/g_uiMaxCUHeight;1432 Int iWidthInCU = ( m_iSourceWidth%m_maxCUWidth ) ? m_iSourceWidth/m_maxCUWidth + 1 : m_iSourceWidth/m_maxCUWidth; 1433 Int iHeightInCU = ( m_iSourceHeight%m_maxCUHeight ) ? m_iSourceHeight/m_maxCUHeight + 1 : m_iSourceHeight/m_maxCUHeight; 1434 1434 UInt uiCummulativeColumnWidth = 0; 1435 1435 UInt uiCummulativeRowHeight = 0; … … 1505 1505 if( m_layerId > 0 ) 1506 1506 { 1507 g_uiMaxCUWidth = m_cSPS.getMaxCUWidth();1508 g_uiMaxCUHeight = m_cSPS.getMaxCUHeight();1509 1507 g_uiMaxCUDepth = m_cSPS.getMaxCUDepth(); 1510 1508 g_uiAddCUDepth = max (0, m_cSPS.getLog2MinCodingBlockSize() - (Int)m_cSPS.getQuadtreeTULog2MinSize() ); … … 1515 1513 { 1516 1514 m_cIlpPic[j] = new TComPic; 1517 m_cIlpPic[j]->create(m_cVPS, m_cSPS, m_cPPS, g_uiMaxCU Width, g_uiMaxCUHeight, g_uiMaxCUDepth, true, m_layerId);1515 m_cIlpPic[j]->create(m_cVPS, m_cSPS, m_cPPS, g_uiMaxCUDepth, true, m_layerId); 1518 1516 for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCtusInFrame(); i++) 1519 1517 { -
branches/SHM-dev/source/Lib/TLibVideoIO/TVideoIOYuv.cpp
r1283 r1289 770 770 if (ipCSC!=IPCOLOURSPACE_UNCHANGED) 771 771 { 772 cPicYuvCSCd.create(pPicYuvUser->getWidth(COMPONENT_Y), pPicYuvUser->getHeight(COMPONENT_Y), pPicYuvUser->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);772 cPicYuvCSCd.create(pPicYuvUser->getWidth(COMPONENT_Y), pPicYuvUser->getHeight(COMPONENT_Y), pPicYuvUser->getChromaFormat(), pPicYuvUser->getWidth(COMPONENT_Y), pPicYuvUser->getHeight(COMPONENT_Y), 0, false); 773 773 Int internalBitDepth[MAX_NUM_CHANNEL_TYPE]; 774 774 for(UInt chType=0; chType<MAX_NUM_CHANNEL_TYPE; chType++) … … 814 814 { 815 815 dstPicYuv = new TComPicYuv; 816 dstPicYuv->create( pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), pPicYuv->getChromaFormat(), 1, 1, 0);816 dstPicYuv->create( pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), pPicYuv->getChromaFormat(), pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), 0, false ); 817 817 pPicYuv->copyToPic(dstPicYuv); 818 818 … … 869 869 if (ipCSC!=IPCOLOURSPACE_UNCHANGED) 870 870 { 871 cPicYuvTopCSCd .create(pPicYuvUserTop ->getWidth(COMPONENT_Y), pPicYuvUserTop ->getHeight(COMPONENT_Y), pPicYuvUserTop ->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);872 cPicYuvBottomCSCd.create(pPicYuvUserBottom->getWidth(COMPONENT_Y), pPicYuvUserBottom->getHeight(COMPONENT_Y), pPicYuvUserBottom->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);871 cPicYuvTopCSCd .create(pPicYuvUserTop ->getWidth(COMPONENT_Y), pPicYuvUserTop ->getHeight(COMPONENT_Y), pPicYuvUserTop ->getChromaFormat(), pPicYuvUserTop ->getWidth(COMPONENT_Y), pPicYuvUserTop ->getHeight(COMPONENT_Y), 0, false); 872 cPicYuvBottomCSCd.create(pPicYuvUserBottom->getWidth(COMPONENT_Y), pPicYuvUserBottom->getHeight(COMPONENT_Y), pPicYuvUserBottom->getChromaFormat(), pPicYuvUserBottom->getWidth(COMPONENT_Y), pPicYuvUserBottom->getHeight(COMPONENT_Y), 0, false); 873 873 Int internalBitDepth[MAX_NUM_CHANNEL_TYPE]; 874 874 for(UInt chType=0; chType<MAX_NUM_CHANNEL_TYPE; chType++) … … 914 914 { 915 915 dstPicYuv = new TComPicYuv; 916 dstPicYuv->create( pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), pPicYuv->getChromaFormat(), 1, 1, 0);916 dstPicYuv->create( pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), pPicYuv->getChromaFormat(), pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), 0, false ); 917 917 pPicYuv->copyToPic(dstPicYuv); 918 918
Note: See TracChangeset for help on using the changeset viewer.