Changeset 1284 in SHVCSoftware
- Timestamp:
- 17 Jul 2015, 00:34:10 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1281 r1284 4313 4313 g_bitDepth [channelType] = m_internalBitDepth[channelType]; 4314 4314 #endif 4315 g_PCMBitDepth[channelType] = m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[channelType] : m_internalBitDepth[channelType];4316 4315 g_maxTrDynamicRange[channelType] = m_useExtendedPrecision? std::max<Int>(15, (g_bitDepth[channelType] + 6)) : 15; 4317 4316 } … … 4439 4438 printf("MSB-extended bit depth : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] ); 4440 4439 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 4441 printf("PCM sample bit depth : (Y:%d, C:%d)\n", g_PCMBitDepth[CHANNEL_TYPE_LUMA], g_PCMBitDepth[CHANNEL_TYPE_CHROMA] ); 4440 printf("PCM sample bit depth : (Y:%d, C:%d)\n", m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA], 4441 m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 4442 4442 printf("Extended precision processing : %s\n", (m_useExtendedPrecision ? "Enabled" : "Disabled") ); 4443 4443 #endif -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r1235 r1284 109 109 Bool m_resamplePhaseSetPresentFlag [MAX_LAYERS]; 110 110 111 Int m_inputBitDepth [MAX_NUM_CHANNEL_TYPE];///< bit-depth of input file112 Int m_outputBitDepth [MAX_NUM_CHANNEL_TYPE];///< bit-depth of output file111 Int m_inputBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input file 112 Int m_outputBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of output file 113 113 Int m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input samples after MSB extension 114 114 Int m_internalBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth codec operates at (input/output files will be converted) -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1273 r1284 220 220 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 221 221 222 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA];223 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA];224 225 222 // Set this to be used in Upsampling filter in function "TComUpsampleFilter::upsampleBasePic" 226 223 g_bitDepthLayer[CHANNEL_TYPE_LUMA][m_acLayerCfg[layer].m_layerId] = g_bitDepth[CHANNEL_TYPE_LUMA]; … … 475 472 m_acTEncTop[layer].setPCMLog2MinSize ( m_uiPCMLog2MinSize); 476 473 m_acTEncTop[layer].setUsePCM ( m_usePCM ); 474 475 for( UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++ ) 476 { 477 m_acTEncTop[layer].setPCMBitDepth ((ChannelType)channelType, m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_MSBExtendedBitDepth[channelType] : m_acLayerCfg[layer].m_internalBitDepth[channelType]); 478 } 477 479 m_acTEncTop[layer].setPCMLog2MaxSize ( m_pcmLog2MaxSize); 478 480 m_acTEncTop[layer].setMaxNumMergeCand ( m_maxNumMergeCand ); … … 898 900 m_cTEncTop.setPCMLog2MinSize ( m_uiPCMLog2MinSize); 899 901 m_cTEncTop.setUsePCM ( m_usePCM ); 902 903 // set internal bit-depth and constants 904 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 905 { 906 //#if O0043_BEST_EFFORT_DECODING 907 //g_bitDepthInStream[channelType] = g_bitDepth[channelType] = m_internalBitDepth[channelType]; 908 //#else 909 //g_bitDepth [channelType] = m_internalBitDepth[channelType]; 910 //#endif 911 m_cTEncTop.setPCMBitDepth((ChannelType)channelType, m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[channelType] : m_internalBitDepth[channelType]); 912 //g_maxTrDynamicRange[channelType] = m_useExtendedPrecision? std::max<Int>(15, (g_bitDepth[channelType] + 6)) : 15; 913 } 914 900 915 m_cTEncTop.setPCMLog2MaxSize ( m_pcmLog2MaxSize); 901 916 m_cTEncTop.setMaxNumMergeCand ( m_maxNumMergeCand ); … … 1083 1098 { 1084 1099 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1085 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];1086 1100 } 1087 1101 … … 1183 1197 { 1184 1198 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1185 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];1186 1199 } 1187 1200 #if LAYER_CTB … … 1224 1237 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1225 1238 1226 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA];1227 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA];1228 1229 1239 vps->setLayerIdIncludedFlag(true, setId, layerId); 1230 1240 } … … 1243 1253 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1244 1254 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1245 1246 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA];1247 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA];1248 1255 1249 1256 if (layerId <= setId) … … 1699 1706 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1700 1707 1701 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA];1702 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA];1703 1704 1708 // allocate original YUV buffer 1705 1709 pcPicYuvOrg[layer] = new TComPicYuv; … … 1739 1743 { 1740 1744 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1741 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];1742 1745 } 1743 1746 #if LAYER_CTB … … 1824 1827 { 1825 1828 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1826 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];1827 1829 } 1828 1830 #if LAYER_CTB … … 1897 1899 { 1898 1900 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1899 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];1900 1901 } 1901 1902 -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp
r1259 r1284 550 550 Int g_bitDepthInStream [MAX_NUM_CHANNEL_TYPE] = {8, 8}; // In the encoder, this is the same as g_bitDepth. In the decoder, this can vary from g_bitDepth if the decoder is forced to use 'best-effort decoding' at a particular bit-depth. 551 551 #endif 552 Int g_PCMBitDepth[MAX_NUM_CHANNEL_TYPE] = {8, 8}; // PCM bit-depth553 552 554 553 // ==================================================================================================================== -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.h
r1259 r1284 159 159 160 160 extern Int g_bitDepth [MAX_NUM_CHANNEL_TYPE]; 161 extern Int g_PCMBitDepth[MAX_NUM_CHANNEL_TYPE];162 161 #if O0043_BEST_EFFORT_DECODING 163 162 extern Int g_bitDepthInStream [MAX_NUM_CHANNEL_TYPE]; // In the encoder, this is the same as g_bitDepth. In the decoder, this can vary from g_bitDepth if the decoder is forced to use 'best-effort decoding' at a particular bit-depth. -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1273 r1284 212 212 Bool m_bUseConstrainedIntraPred; 213 213 Bool m_usePCM; 214 Int m_PCMBitDepth[MAX_NUM_CHANNEL_TYPE]; 214 215 UInt m_pcmLog2MaxSize; 215 216 UInt m_uiPCMLog2MinSize; … … 223 224 224 225 Bool m_bPCMInputBitDepthFlag; 225 UInt m_uiPCMBitDepthLuma;226 UInt m_uiPCMBitDepthChroma;227 226 Bool m_bPCMFilterDisableFlag; 228 227 Bool m_disableIntraReferenceSmoothing; … … 458 457 , m_colourRemapSEIFileRoot(NULL) 459 458 #endif 460 {} 459 { 460 m_PCMBitDepth[CHANNEL_TYPE_LUMA]=8; 461 m_PCMBitDepth[CHANNEL_TYPE_CHROMA]=8; 462 } 461 463 462 464 virtual ~TEncCfg() … … 614 616 Void setPCMFilterDisableFlag ( Bool b ) { m_bPCMFilterDisableFlag = b; } 615 617 Void setUsePCM ( Bool b ) { m_usePCM = b; } 618 Void setPCMBitDepth( const ChannelType chType, Int pcmBitDepthForChannel ) { m_PCMBitDepth[chType] = pcmBitDepthForChannel; } 616 619 Void setPCMLog2MaxSize ( UInt u ) { m_pcmLog2MaxSize = u; } 617 620 Void setPCMLog2MinSize ( UInt u ) { m_uiPCMLog2MinSize = u; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1276 r1284 901 901 902 902 m_cSPS.setMaxTrSize ( 1 << m_uiQuadtreeTULog2MaxSize ); 903 903 904 904 m_cSPS.setUseAMP ( m_useAMP ); 905 905 … … 913 913 m_cSPS.setQpBDOffset (ChannelType(channelType), (6 * (g_bitDepth[channelType] - 8))); 914 914 #endif 915 m_cSPS.setPCMBitDepth (ChannelType(channelType), g_PCMBitDepth[channelType] );915 m_cSPS.setPCMBitDepth (ChannelType(channelType), m_PCMBitDepth[channelType] ); 916 916 } 917 917
Note: See TracChangeset for help on using the changeset viewer.