Changeset 1290 in SHVCSoftware for branches/SHM-dev/source/App
- Timestamp:
- 18 Jul 2015, 01:59:29 (10 years ago)
- Location:
- branches/SHM-dev/source/App
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1289 r1290 1935 1935 #if SVC_EXTENSION 1936 1936 #if AUXILIARY_PICTURES 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 );1937 picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), true, NULL ); 1938 #else 1939 picColourRemapped.create( pic.getWidth(), pic.getHeight(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), true, NULL ); 1940 #endif 1941 #else 1942 picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxTotalCUDepth(), true ); 1943 1943 #endif 1944 1944 YUVOut[0] = picColourRemapped.getAddr(COMPONENT_Y); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1289 r1290 2852 2852 #endif 2853 2853 2854 // set global varibles2854 // compute actual CU depth with respect to config depth and max transform size 2855 2855 #if SVC_EXTENSION 2856 for(Int layer = 0; layer < m_numLayers; layer++) 2857 { 2858 xSetGlobal(layer); 2859 } 2860 #else 2861 xSetGlobal(); 2856 for(Int layerIdx = 0; layerIdx < m_numLayers; layerIdx++) 2857 { 2858 UInt uiAddCUDepth = 0; 2859 while( (m_acLayerCfg[layerIdx].m_uiMaxCUWidth>>m_acLayerCfg[layerIdx].m_uiMaxCUDepth) > ( 1 << ( m_acLayerCfg[layerIdx].m_uiQuadtreeTULog2MinSize + uiAddCUDepth ) ) ) 2860 { 2861 uiAddCUDepth++; 2862 } 2863 2864 m_acLayerCfg[layerIdx].m_uiMaxTotalCUDepth = m_acLayerCfg[layerIdx].m_uiMaxCUDepth + uiAddCUDepth + getMaxCUDepthOffset(m_acLayerCfg[layerIdx].m_chromaFormatIDC, m_acLayerCfg[layerIdx].m_uiQuadtreeTULog2MinSize); // if minimum TU larger than 4x4, allow for additional part indices for 4:2:2 SubTUs. 2865 uiAddCUDepth++; 2866 m_acLayerCfg[layerIdx].m_uiLog2DiffMaxMinCodingBlockSize = m_acLayerCfg[layerIdx].m_uiMaxCUDepth - 1; 2867 } 2868 #else 2869 UInt uiAddCUDepth = 0; 2870 while( (m_uiMaxCUWidth>>m_uiMaxCUDepth) > ( 1 << ( m_uiQuadtreeTULog2MinSize + uiAddCUDepth ) ) ) 2871 { 2872 uiAddCUDepth++; 2873 } 2874 2875 m_uiMaxTotalCUDepth = m_uiMaxCUDepth + uiAddCUDepth + getMaxCUDepthOffset(m_chromaFormatIDC, m_uiQuadtreeTULog2MinSize); // if minimum TU larger than 4x4, allow for additional part indices for 4:2:2 SubTUs. 2876 uiAddCUDepth++; 2877 m_uiLog2DiffMaxMinCodingBlockSize = m_uiMaxCUDepth - 1; 2862 2878 #endif 2863 2879 … … 4234 4250 } 4235 4251 4236 /** \todo use of global variables should be removed later4237 */4238 #if LAYER_CTB4239 Void TAppEncCfg::xSetGlobal(UInt layerId)4240 {4241 // set max CU width & height4242 g_auiLayerMaxCUWidth[layerId] = m_acLayerCfg[layerId].m_uiMaxCUWidth;4243 g_auiLayerMaxCUHeight[layerId] = m_acLayerCfg[layerId].m_uiMaxCUHeight;4244 4245 // compute actual CU depth with respect to config depth and max transform size4246 g_auiLayerAddCUDepth[layerId] = 0;4247 while( (m_acLayerCfg[layerId].m_uiMaxCUWidth>>m_acLayerCfg[layerId].m_uiMaxCUDepth) > ( 1 << ( m_acLayerCfg[layerId].m_uiQuadtreeTULog2MinSize + g_auiLayerAddCUDepth[layerId] ) ) ) g_auiLayerAddCUDepth[layerId]++;4248 4249 m_acLayerCfg[layerId].m_uiMaxCUDepth += g_auiLayerAddCUDepth[layerId];4250 g_auiLayerAddCUDepth[layerId]++;4251 g_auiLayerMaxCUDepth[layerId] = m_acLayerCfg[layerId].m_uiMaxCUDepth;4252 4253 // set internal bit-depth to constant value to make sure to be updated later4254 g_bitDepthY = -1;4255 g_bitDepthC = -1;4256 4257 g_uiPCMBitDepthLuma = -1;4258 g_uiPCMBitDepthChroma = -1;4259 }4260 #else4261 #if SVC_EXTENSION4262 Void TAppEncCfg::xSetGlobal(UInt layerId)4263 #else4264 Void TAppEncCfg::xSetGlobal()4265 #endif4266 {4267 #if SVC_EXTENSION4268 // Check for layerIdx equal to 0, it has to pe extended to other layers.4269 UInt layerIdx = 0;4270 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[layerIdx].m_chromaFormatIDC;4271 #endif4272 4273 // set max CU width & height4274 #if SVC_EXTENSION4275 // compute actual CU depth with respect to config depth and max transform size4276 g_uiAddCUDepth = 0;4277 while( (m_acLayerCfg[layerId].m_uiMaxCUWidth>>m_acLayerCfg[layerId].m_uiMaxCUDepth) > ( 1 << ( m_acLayerCfg[layerId].m_uiQuadtreeTULog2MinSize + g_uiAddCUDepth ) ) )4278 {4279 g_uiAddCUDepth++;4280 }4281 4282 g_uiAddCUDepth+=getMaxCUDepthOffset(m_chromaFormatIDC, m_acLayerCfg[layerId].m_uiQuadtreeTULog2MinSize); // if minimum TU larger than 4x4, allow for additional part indices for 4:2:2 SubTUs.4283 4284 m_acLayerCfg[layerId].m_uiMaxCUDepth += g_uiAddCUDepth;4285 g_uiAddCUDepth++;4286 g_uiMaxCUDepth = m_acLayerCfg[layerId].m_uiMaxCUDepth;4287 #else4288 // compute actual CU depth with respect to config depth and max transform size4289 g_uiAddCUDepth = 0;4290 while( (m_uiMaxCUWidth>>m_uiMaxCUDepth) > ( 1 << ( m_uiQuadtreeTULog2MinSize + g_uiAddCUDepth ) ) )4291 {4292 g_uiAddCUDepth++;4293 }4294 4295 g_uiAddCUDepth+=getMaxCUDepthOffset(m_chromaFormatIDC, m_uiQuadtreeTULog2MinSize); // if minimum TU larger than 4x4, allow for additional part indices for 4:2:2 SubTUs.4296 4297 m_uiMaxCUDepth += g_uiAddCUDepth;4298 g_uiAddCUDepth++;4299 g_uiMaxCUDepth = m_uiMaxCUDepth;4300 #endif4301 }4302 #endif4303 4304 4252 const Char *profileToString(const Profile::Name profile) 4305 4253 { … … 4395 4343 printf("Profile : %s\n", profileToString(m_profile) ); 4396 4344 } 4397 4398 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); 4345 printf("CU size / depth / total-depth : %d / %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth, m_uiMaxTotalCUDepth ); 4399 4346 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); 4400 4347 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1259 r1290 216 216 UInt m_uiMaxCUWidth; ///< max. CU width in pixel 217 217 UInt m_uiMaxCUHeight; ///< max. CU height in pixel 218 UInt m_uiMaxCUDepth; ///< max. CU depth 218 UInt m_uiMaxCUDepth; ///< max. CU depth (as specified by command line) 219 UInt m_uiMaxTotalCUDepth; ///< max. total CU depth - includes depth of transform-block structure 220 UInt m_uiLog2DiffMaxMinCodingBlockSize; ///< difference between largest and smallest CU depth 219 221 220 222 // transfom unit (TU) definition -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r1235 r1290 247 247 } 248 248 printf("\n"); 249 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth );249 printf("CU size / depth / total-depth : %d / %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth, m_uiMaxTotalCUDepth ); 250 250 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); 251 251 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r1284 r1290 65 65 UInt m_uiMaxCUWidth; ///< max. CU width in pixel 66 66 UInt m_uiMaxCUHeight; ///< max. CU height in pixel 67 UInt m_uiMaxCUDepth; ///< max. CU depth 67 UInt m_uiMaxCUDepth; ///< max. CU depth (as specified by command line) 68 UInt m_uiMaxTotalCUDepth; ///< max. total CU depth - includes depth of transform-block structure 69 UInt m_uiLog2DiffMaxMinCodingBlockSize; ///< difference between largest and smallest CU depth 68 70 69 71 // transfom unit (TU) definition -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1289 r1290 438 438 m_acTEncTop[layer].setMaxCUWidth ( m_acLayerCfg[layer].m_uiMaxCUWidth ); 439 439 m_acTEncTop[layer].setMaxCUHeight ( m_acLayerCfg[layer].m_uiMaxCUHeight ); 440 m_acTEncTop[layer].setMaxTotalCUDepth ( m_acLayerCfg[layer].m_uiMaxTotalCUDepth ); 441 m_acTEncTop[layer].setLog2DiffMaxMinCodingBlockSize ( m_acLayerCfg[layer].m_uiLog2DiffMaxMinCodingBlockSize ); 440 442 441 443 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MaxSize ); … … 868 870 m_cTEncTop.setMaxCUWidth ( m_uiMaxCUWidth ); 869 871 m_cTEncTop.setMaxCUHeight ( m_uiMaxCUHeight ); 872 m_cTEncTop.setMaxTotalCUDepth ( m_uiMaxTotalCUDepth ); 873 m_cTEncTop.setLog2DiffMaxMinCodingBlockSize ( m_uiLog2DiffMaxMinCodingBlockSize ); 870 874 m_cTEncTop.setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize ); 871 875 m_cTEncTop.setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize ); … … 1684 1688 if( m_isField ) 1685 1689 { 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_uiMax CUDepth, 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_uiMax CUDepth, true, NULL );1690 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_uiMaxTotalCUDepth, true, NULL ); 1691 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_uiMaxTotalCUDepth, true, NULL ); 1688 1692 } 1689 1693 else 1690 1694 { 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_uiMax CUDepth, 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_uiMax CUDepth, true, NULL );1695 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_uiMaxTotalCUDepth, true, NULL ); 1696 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_uiMaxTotalCUDepth, true, NULL ); 1693 1697 } 1694 1698 } … … 2034 2038 if( m_isField ) 2035 2039 { 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);2040 pcPicYuvOrg->create ( m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, true ); 2041 cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, true); 2038 2042 } 2039 2043 else 2040 2044 { 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 );2045 pcPicYuvOrg->create ( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, true ); 2046 cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, true ); 2043 2047 } 2044 2048 … … 2129 2133 rpcPicYuvRec = new TComPicYuv; 2130 2134 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_uiMax CUDepth, true, NULL );2135 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_uiMaxTotalCUDepth, true, NULL ); 2132 2136 } 2133 2137 m_acListPicYuvRec[layer].pushBack( rpcPicYuvRec ); … … 2259 2263 rpcPicYuvRec = new TComPicYuv; 2260 2264 2261 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMax CUDepth, true );2265 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, true ); 2262 2266 2263 2267 }
Note: See TracChangeset for help on using the changeset viewer.