Changeset 1200 in SHVCSoftware for branches/SHM-dev/source
- Timestamp:
- 8 Jul 2015, 20:22:40 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1177 r1200 289 289 #endif 290 290 { 291 #if O0194_DIFFERENT_BITDEPTH_EL_BL 292 //Bug fix: The bit depth was not set correctly for each layer when doing DBF 291 // Set bitdepth for each layer when doing DBF 293 292 g_bitDepth[CHANNEL_TYPE_LUMA] = g_bitDepthLayer[CHANNEL_TYPE_LUMA][curLayerId]; 294 293 g_bitDepth[CHANNEL_TYPE_CHROMA] = g_bitDepthLayer[CHANNEL_TYPE_CHROMA][curLayerId]; 295 #endif 294 296 295 if (!loopFiltered[curLayerId] || bitstreamFile) 297 296 { -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1182 r1200 822 822 Bool* cfg_RCForceIntraQP [MAX_LAYERS]; 823 823 #endif 824 #if O0194_DIFFERENT_BITDEPTH_EL_BL 824 825 825 Int* cfg_InputBitDepth [MAX_NUM_CHANNEL_TYPE][MAX_LAYERS]; 826 826 Int* cfg_InternalBitDepth [MAX_NUM_CHANNEL_TYPE][MAX_LAYERS]; 827 827 Int* cfg_OutputBitDepth [MAX_NUM_CHANNEL_TYPE][MAX_LAYERS]; 828 #endif 828 829 829 Int* cfg_maxTidIlRefPicsPlus1[MAX_LAYERS]; 830 830 #if Q0074_COLOUR_REMAPPING_SEI … … 915 915 cfg_RCForceIntraQP[layer] = &m_acLayerCfg[layer].m_RCForceIntraQP; 916 916 #endif 917 #if O0194_DIFFERENT_BITDEPTH_EL_BL 917 918 918 cfg_InputBitDepth [CHANNEL_TYPE_LUMA][layer] = &m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_LUMA]; 919 919 cfg_InternalBitDepth[CHANNEL_TYPE_LUMA][layer] = &m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA]; … … 922 922 cfg_InputBitDepth [CHANNEL_TYPE_CHROMA][layer] = &m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_CHROMA]; 923 923 cfg_OutputBitDepth [CHANNEL_TYPE_CHROMA][layer] = &m_acLayerCfg[layer].m_outputBitDepth[CHANNEL_TYPE_CHROMA]; 924 #endif 924 925 925 cfg_maxTidIlRefPicsPlus1[layer] = &m_acLayerCfg[layer].m_maxTidIlRefPicsPlus1; 926 926 #if AUXILIARY_PICTURES … … 1088 1088 #endif 1089 1089 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") 1090 #if !O0194_DIFFERENT_BITDEPTH_EL_BL1091 ("InputBitDepth", m_inputBitDepthY, 8, "Bit-depth of input file")1092 ("OutputBitDepth", m_outputBitDepthY, 0, "Bit-depth of output file (default:InternalBitDepth)")1093 ("InternalBitDepth", m_internalBitDepthY, 0, "Bit-depth the codec operates at. (default:InputBitDepth)"1094 "If different to InputBitDepth, source data will be converted")1095 ("InputBitDepthC", m_inputBitDepthC, 0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)")1096 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")1097 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")1098 #endif1099 1090 ("NumRefLocationOffsets%d", cfg_numRefLayerLocationOffsets, 0, MAX_LAYERS, "Number of reference layer offset sets ") 1100 1091 ("RefLocationOffsetLayerId%d", cfg_refLocationOffsetLayerIdPtr, string(""), MAX_LAYERS, "Layer ID of reference location offset") … … 1125 1116 ("SEIColourRemappingInfoFileRoot%d", cfg_colourRemapSEIFileRoot, string(""), MAX_LAYERS, "Colour Remapping Information SEI parameters file name for layer %d") 1126 1117 #endif 1127 #if O0194_DIFFERENT_BITDEPTH_EL_BL1128 1118 ("InputBitDepth%d", cfg_InputBitDepth[CHANNEL_TYPE_LUMA], 8, MAX_LAYERS, "Bit-depth of input file for layer %d") 1129 1119 ("InternalBitDepth%d", cfg_InternalBitDepth[CHANNEL_TYPE_LUMA], 0, MAX_LAYERS, "Bit-depth the codec operates at. (default:InputBitDepth) for layer %d " … … 1133 1123 ("InternalBitDepthC%d", cfg_InternalBitDepth[CHANNEL_TYPE_CHROMA], 0, MAX_LAYERS, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth) for layer %d") 1134 1124 ("OutputBitDepthC%d", cfg_OutputBitDepth[CHANNEL_TYPE_CHROMA], 0, MAX_LAYERS, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 1135 #endif 1125 1136 1126 ("MaxTidRefPresentFlag", m_maxTidRefPresentFlag, false, "max_tid_ref_present_flag (0: not present, 1: present) " ) 1137 1127 ("MaxTidIlRefPicsPlus1%d", cfg_maxTidIlRefPicsPlus1, 7, MAX_LAYERS, "allowed maximum temporal_id for inter-layer prediction") … … 1832 1822 1833 1823 /* rules for input, output and internal bitdepths as per help text */ 1834 #if O0194_DIFFERENT_BITDEPTH_EL_BL1835 for( Int layer = 0; layer < MAX_LAYERS; layer++)1824 #if SVC_EXTENSION 1825 for( Int layer = 0; layer < MAX_LAYERS; layer++ ) 1836 1826 { 1837 1827 if( m_acLayerCfg[layer].m_layerId < 0 ) … … 1854 1844 m_acLayerCfg[layer].m_useHighPrecisionPredictionWeighting = false; 1855 1845 m_acLayerCfg[layer].m_useExtendedPrecision = false; 1856 } 1857 #else 1858 /* rules for input, output and internal bitdepths as per help text */ 1859 if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] == 0) { m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] = m_inputBitDepth [CHANNEL_TYPE_LUMA ]; } 1860 if (m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] == 0) { m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; } 1861 if (m_internalBitDepth [CHANNEL_TYPE_LUMA ] == 0) { m_internalBitDepth [CHANNEL_TYPE_LUMA ] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; } 1862 if (m_internalBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_internalBitDepth [CHANNEL_TYPE_CHROMA] = m_internalBitDepth [CHANNEL_TYPE_LUMA ]; } 1863 if (m_inputBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_inputBitDepth [CHANNEL_TYPE_CHROMA] = m_inputBitDepth [CHANNEL_TYPE_LUMA ]; } 1864 if (m_outputBitDepth [CHANNEL_TYPE_LUMA ] == 0) { m_outputBitDepth [CHANNEL_TYPE_LUMA ] = m_internalBitDepth [CHANNEL_TYPE_LUMA ]; } 1865 if (m_outputBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_outputBitDepth [CHANNEL_TYPE_CHROMA] = m_internalBitDepth [CHANNEL_TYPE_CHROMA]; } 1866 1867 m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat); 1868 m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat))); 1869 #endif 1870 1871 #if SVC_EXTENSION 1872 for( Int layer = 0; layer < MAX_LAYERS; layer++) 1873 { 1846 1874 1847 if( m_acLayerCfg[layer].m_layerSwitchOffBegin < m_acLayerCfg[layer].m_layerSwitchOffEnd ) 1875 1848 { … … 1972 1945 } 1973 1946 #else 1947 /* rules for input, output and internal bitdepths as per help text */ 1948 if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] == 0) { m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] = m_inputBitDepth [CHANNEL_TYPE_LUMA ]; } 1949 if (m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] == 0) { m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; } 1950 if (m_internalBitDepth [CHANNEL_TYPE_LUMA ] == 0) { m_internalBitDepth [CHANNEL_TYPE_LUMA ] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; } 1951 if (m_internalBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_internalBitDepth [CHANNEL_TYPE_CHROMA] = m_internalBitDepth [CHANNEL_TYPE_LUMA ]; } 1952 if (m_inputBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_inputBitDepth [CHANNEL_TYPE_CHROMA] = m_inputBitDepth [CHANNEL_TYPE_LUMA ]; } 1953 if (m_outputBitDepth [CHANNEL_TYPE_LUMA ] == 0) { m_outputBitDepth [CHANNEL_TYPE_LUMA ] = m_internalBitDepth [CHANNEL_TYPE_LUMA ]; } 1954 if (m_outputBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_outputBitDepth [CHANNEL_TYPE_CHROMA] = m_internalBitDepth [CHANNEL_TYPE_CHROMA]; } 1955 1956 m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat); 1957 m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat))); 1958 1974 1959 if (extendedProfile >= 1000 && extendedProfile <= 2316) 1975 1960 { … … 4275 4260 g_auiLayerMaxCUDepth[layerId] = m_acLayerCfg[layerId].m_uiMaxCUDepth; 4276 4261 4277 #if O0194_DIFFERENT_BITDEPTH_EL_BL4278 4262 // set internal bit-depth to constant value to make sure to be updated later 4279 4263 g_bitDepthY = -1; … … 4282 4266 g_uiPCMBitDepthLuma = -1; 4283 4267 g_uiPCMBitDepthChroma = -1; 4284 #else4285 // set internal bit-depth and constants4286 g_bitDepthY = m_internalBitDepthY;4287 g_bitDepthC = m_internalBitDepthC;4288 4289 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_inputBitDepthY : m_internalBitDepthY;4290 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_inputBitDepthC : m_internalBitDepthC;4291 #endif4292 4268 } 4293 4269 #else … … 4443 4419 printf("QP adaptation : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) ); 4444 4420 printf("GOP size : %d\n", m_iGOPSize ); 4445 #if ! O0194_DIFFERENT_BITDEPTH_EL_BL4421 #if !SVC_EXTENSION 4446 4422 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] ); 4447 4423 printf("MSB-extended bit depth : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] ); … … 4456 4432 printf("Single significance map context : %s\n", (m_useSingleSignificanceMapContext ? "Enabled" : "Disabled") ); 4457 4433 printf("Cross-component prediction : %s\n", (m_useCrossComponentPrediction ? (m_reconBasedCrossCPredictionEstimate ? "Enabled (reconstructed-residual-based estimate)" : "Enabled (encoder-side-residual-based estimate)") : "Disabled") ); 4458 #if ! O0194_DIFFERENT_BITDEPTH_EL_BL4434 #if !SVC_EXTENSION 4459 4435 printf("High-precision prediction weight : %s\n", (m_useHighPrecisionPredictionWeighting ? "Enabled" : "Disabled") ); 4460 4436 #endif … … 4494 4470 4495 4471 printf("TOOL CFG: "); 4496 #if ! O0194_DIFFERENT_BITDEPTH_EL_BL4472 #if !SVC_EXTENSION 4497 4473 printf("IBD:%d ", ((g_bitDepth[CHANNEL_TYPE_LUMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA]) || (g_bitDepth[CHANNEL_TYPE_CHROMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA]))); 4498 4474 #endif … … 4560 4536 printf("ENCODER_FAST_MODE: %d ", ENCODER_FAST_MODE); 4561 4537 printf("REF_IDX_MFM: %d ", REF_IDX_MFM); 4562 printf("O0194_DIFFERENT_BITDEPTH_EL_BL: %d ", O0194_DIFFERENT_BITDEPTH_EL_BL);4563 4538 printf("O0194_JOINT_US_BITSHIFT: %d ", O0194_JOINT_US_BITSHIFT); 4564 4539 #else -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1182 r1200 229 229 230 230 // coding tools (bit-depth) 231 #if ! O0194_DIFFERENT_BITDEPTH_EL_BL231 #if !SVC_EXTENSION 232 232 Int m_inputBitDepth [MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input file 233 233 Int m_outputBitDepth [MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of output file … … 236 236 Bool m_useExtendedPrecision; 237 237 Bool m_useHighPrecisionPredictionWeighting; 238 #endif 238 239 239 //coding tools (chroma format) 240 #if !SVC_EXTENSION241 240 ChromaFormat m_chromaFormatIDC; 242 241 #endif … … 540 539 Int getNumLayer() {return m_numLayers; } 541 540 Int getGOPSize() {return m_iGOPSize; } 542 #if O0194_DIFFERENT_BITDEPTH_EL_BL 541 543 542 UInt getInternalBitDepth(Int iLayer, ChannelType type) {return m_acLayerCfg[iLayer].m_internalBitDepth[type]; } 544 Bool getPCMInputBitDepthFlag() {return m_bPCMInputBitDepthFlag; } 545 #else 546 UInt getInternalBitDepth( ChannelType type ) {return m_internalBitDepth[type]; } 547 #endif 543 Bool getPCMInputBitDepthFlag() {return m_bPCMInputBitDepthFlag; } 544 548 545 #if !LAYER_CTB 549 546 UInt getMaxCUWidth() {return m_uiMaxCUWidth; } -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r1182 r1200 221 221 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 222 222 printf("PTL index : %d\n", m_layerPTLIdx ); 223 #if O0194_DIFFERENT_BITDEPTH_EL_BL223 #if SVC_EXTENSION 224 224 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] ); 225 225 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); … … 411 411 } 412 412 413 #if O0194_DIFFERENT_BITDEPTH_EL_BL413 #if SVC_EXTENSION 414 414 xConfirmPara( m_iQP < -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 415 415 #else -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1199 r1200 108 108 && m_acLayerCfg[layer].getChromaFormatIDC() == m_acLayerCfg[idx].getChromaFormatIDC() 109 109 #endif 110 #if O0194_DIFFERENT_BITDEPTH_EL_BL111 110 && m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA] == m_acLayerCfg[idx].m_internalBitDepth[CHANNEL_TYPE_LUMA] && m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA] == m_acLayerCfg[idx].m_internalBitDepth[CHANNEL_TYPE_CHROMA] 112 #endif113 111 ) 114 112 { … … 174 172 #endif 175 173 repFormat->setSeparateColourPlaneVpsFlag ( 0 ); // Need modification to change for each layer 176 #if O0194_DIFFERENT_BITDEPTH_EL_BL 174 177 175 repFormat->setBitDepthVpsLuma ( getInternalBitDepth(mapIdxToLayer[idx], CHANNEL_TYPE_LUMA) ); // Need modification to change for each layer 178 176 repFormat->setBitDepthVpsChroma ( getInternalBitDepth(mapIdxToLayer[idx], CHANNEL_TYPE_CHROMA) ); // Need modification to change for each layer 179 #else180 repFormat->setBitDepthVpsLuma ( getInternalBitDepth(CHANNEL_TYPE_LUMA) ); // Need modification to change for each layer181 repFormat->setBitDepthVpsChroma ( getInternalBitDepth(CHANNEL_TYPE_CHROMA) ); // Need modification to change for each layer182 #endif183 177 184 178 repFormat->getConformanceWindowVps().setWindow ( m_acLayerCfg[mapIdxToLayer[idx]].m_confWinLeft, … … 223 217 for(UInt layer=0; layer<m_numLayers; layer++) 224 218 { 225 #if O0194_DIFFERENT_BITDEPTH_EL_BL226 219 //1 227 220 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA]; … … 237 230 #if O0194_WEIGHTED_PREDICTION_CGS 238 231 m_acTEncTop[layer].setInterLayerWeightedPredFlag ( m_useInterLayerWeightedPred ); 239 #endif240 232 #endif 241 233 … … 1103 1095 for(UInt layer=0; layer<m_numLayers; layer++) 1104 1096 { 1105 #if O0194_DIFFERENT_BITDEPTH_EL_BL1106 1097 //2 1107 1098 for( UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) … … 1110 1101 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1111 1102 } 1112 #endif 1103 1113 1104 #if LAYER_CTB 1114 1105 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; … … 1118 1109 #endif 1119 1110 // Video I/O 1120 #if O0194_DIFFERENT_BITDEPTH_EL_BL1121 1111 m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(), false, m_acLayerCfg[layer].m_inputBitDepth, m_acLayerCfg[layer].m_MSBExtendedBitDepth, m_acLayerCfg[layer].m_internalBitDepth ); // read mode 1122 #else1123 m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(), false, m_inputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth ); // read mode1124 #endif1125 1112 m_acTVideoIOYuvInputFile[layer].skipFrames(m_FrameSkip, m_acLayerCfg[layer].getSourceWidth() - m_acLayerCfg[layer].getPad()[0], m_acLayerCfg[layer].getSourceHeight() - m_acLayerCfg[layer].getPad()[1], m_acLayerCfg[layer].m_InputChromaFormatIDC); 1126 1113 1127 if (!m_acLayerCfg[layer].getReconFile().empty()) 1128 { 1129 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1114 if( !m_acLayerCfg[layer].getReconFile().empty() ) 1115 { 1130 1116 m_acTVideoIOYuvReconFile[layer].open((Char *)m_acLayerCfg[layer].getReconFile().c_str(), true, m_acLayerCfg[layer].m_outputBitDepth, m_acLayerCfg[layer].m_MSBExtendedBitDepth, m_acLayerCfg[layer].m_internalBitDepth ); // write mode 1131 #else1132 m_acTVideoIOYuvReconFile[layer].open((Char *)m_acLayerCfg[layer].getReconFile().c_str(), true, m_outputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth ); // write mode1133 #endif1134 1117 } 1135 1118 … … 1212 1195 for(UInt layer=0; layer<m_numLayers; layer++) 1213 1196 { 1214 #if O0194_DIFFERENT_BITDEPTH_EL_BL1215 1197 //3 1216 1198 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) … … 1219 1201 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1220 1202 } 1221 #endif1222 1203 #if LAYER_CTB 1223 1204 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; … … 1255 1236 Int layerId = m_layerSetLayerIdList[setId][i]; 1256 1237 Int layerIdx = vps->getLayerIdxInVps(m_layerSetLayerIdList[setId][i]); 1257 #if O0194_DIFFERENT_BITDEPTH_EL_BL1258 1238 //4 1259 1239 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA]; … … 1262 1242 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1263 1243 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1264 #endif1265 1244 1266 1245 vps->setLayerIdIncludedFlag(true, setId, layerId); … … 1276 1255 for (Int layerIdx = 0; layerIdx <= vps->getMaxLayers(); layerIdx++) 1277 1256 { 1278 #if O0194_DIFFERENT_BITDEPTH_EL_BL1279 1257 //4 1280 1258 UInt layerId = vps->getLayerIdInNuh(layerIdx); … … 1284 1262 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1285 1263 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1286 #endif 1264 1287 1265 if (layerId <= setId) 1288 1266 { … … 1726 1704 for(UInt layer=0; layer<m_numLayers; layer++) 1727 1705 { 1728 #if O0194_DIFFERENT_BITDEPTH_EL_BL1729 1706 //5 1730 1707 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA]; … … 1733 1710 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1734 1711 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1735 #endif 1712 1736 1713 // allocate original YUV buffer 1737 1714 pcPicYuvOrg[layer] = new TComPicYuv; … … 1767 1744 for(UInt layer=0; layer<m_numLayers; layer++) 1768 1745 { 1769 #if O0194_DIFFERENT_BITDEPTH_EL_BL1770 1746 //6 1771 1747 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) … … 1774 1750 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1775 1751 } 1776 #endif1777 1752 #if LAYER_CTB 1778 1753 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; … … 1854 1829 1855 1830 // loop through frames in one GOP 1856 for 1831 for( UInt iPicIdInGOP=0; iPicIdInGOP < (bFirstFrame? 1:m_iGOPSize); iPicIdInGOP++ ) 1857 1832 { 1858 1833 // layer by layer for each frame 1859 for(UInt layer=0; layer<m_numLayers; layer++) 1860 { 1861 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1834 for( UInt layer=0; layer<m_numLayers; layer++ ) 1835 { 1862 1836 //7 1863 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++)1837 for( UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++ ) 1864 1838 { 1865 1839 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1866 1840 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1867 1841 } 1868 #endif1869 1842 #if LAYER_CTB 1870 1843 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; … … 1926 1899 1927 1900 iTotalNumEncoded = 0; 1928 for(UInt layer=0; layer<m_numLayers; layer++) 1929 { 1930 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1901 for( UInt layer=0; layer<m_numLayers; layer++ ) 1902 { 1931 1903 //8 1932 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++)1904 for( UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++ ) 1933 1905 { 1934 1906 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1935 1907 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1936 1908 } 1937 #endif 1909 1938 1910 // write bistream to file if necessary 1939 1911 iNumEncoded = m_acTEncTop[layer].getNumPicRcvd(); -
branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h
r1177 r1200 140 140 extern Int g_bitDepth[MAX_NUM_CHANNEL_TYPE]; 141 141 142 #if O0194_DIFFERENT_BITDEPTH_EL_BL142 #if SVC_EXTENSION 143 143 extern Int g_bitDepthLayer[MAX_NUM_CHANNEL_TYPE][MAX_LAYERS]; 144 144 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp
r1029 r1200 678 678 UInt g_predefSetIntraModes[NUM_INTRA_MODE-1] = {26,10,18,34,2,22,14,30,6,24,12,28,8,20,16,32,4,17,19,15,21,13,23,11,25,9,27,7,29,5,31,3,33,0,2}; 679 679 #endif 680 #if O0194_DIFFERENT_BITDEPTH_EL_BL681 680 Int g_bitDepthLayer[MAX_NUM_CHANNEL_TYPE][MAX_LAYERS]; 682 #endif683 681 #if O0194_WEIGHTED_PREDICTION_CGS 684 682 void * g_refWeightACDCParam; // type=wpACDCParam -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1199 r1200 515 515 ); 516 516 517 #if O0194_DIFFERENT_BITDEPTH_EL_BL518 517 Bool sameBitDepths = ( g_bitDepthLayer[CHANNEL_TYPE_LUMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId] ) && ( g_bitDepthLayer[CHANNEL_TYPE_CHROMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId] ); 519 518 … … 525 524 #endif 526 525 ) // ratio 1x 527 #else528 if(!( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) || (!scalingOffset)) // ratio 1x529 #endif530 526 { 531 527 UInt predType = m_pcVPS->getDirectDependencyType( m_layerId, refLayerId ) + 1; -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1199 r1200 58 58 #define O0164_MULTI_LAYER_HRD 1 ///< JCTVC-O0164: Multi-layer HRD operation 59 59 60 #define O0194_DIFFERENT_BITDEPTH_EL_BL 1 ///< JCTVC-O0194: Support for different bitdepth values for BL and EL, add required configuration parameters (and Some bugfixes when REPN_FORMAT_IN_VPS (JCTVC-N0092) is enabled)61 #if O0194_DIFFERENT_BITDEPTH_EL_BL62 60 #define O0194_JOINT_US_BITSHIFT 1 ///< JCTVC-O0194: Joint Upsampling and bit-shift 63 #endif64 61 #define Q0048_CGS_3D_ASYMLUT 1 ///< JCTVC-Q0048: Colour gamut scalability with look-up table 65 62 #if Q0048_CGS_3D_ASYMLUT -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1199 r1200 1790 1790 1791 1791 #if REPN_FORMAT_IN_VPS 1792 #if O0194_DIFFERENT_BITDEPTH_EL_BL1793 1792 g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcSlice->getLayerId()] = pcSlice->getBitDepthY(); 1794 1793 g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcSlice->getLayerId()] = pcSlice->getBitDepthC(); 1795 #endif 1794 1796 1795 assert( pcSlice->getSliceQp() >= -pcSlice->getQpBDOffsetY() ); 1797 1796 #else -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1199 r1200 567 567 pBLPic->getSlice(0)->setVPS( activeVPS ); 568 568 569 #if O0194_DIFFERENT_BITDEPTH_EL_BL570 569 g_bitDepthLayer[CHANNEL_TYPE_LUMA][0] = repFormat->getBitDepthVpsLuma(); 571 570 g_bitDepthLayer[CHANNEL_TYPE_CHROMA][0] = repFormat->getBitDepthVpsChroma(); 572 #endif573 571 } 574 572 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1199 r1200 611 611 612 612 #if SVC_EXTENSION //Temporal solution, should be modified 613 if( m_layerId > 0)614 { 615 for( UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )613 if( m_layerId > 0 ) 614 { 615 for( UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ ) 616 616 { 617 617 const Window scalEL = getPPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); … … 621 621 622 622 TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( i ); 623 #if O0194_DIFFERENT_BITDEPTH_EL_BL 623 624 624 UInt refLayerId = m_cVPS.getRefLayerId(m_layerId, i); 625 625 Bool sameBitDepths = ( g_bitDepthLayer[CHANNEL_TYPE_LUMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId] ) && ( g_bitDepthLayer[CHANNEL_TYPE_CHROMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId] ); … … 644 644 #endif 645 645 ) 646 #else647 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight()648 || !equalOffsets649 || !zeroPhase650 )651 #endif652 646 { 653 647 pcEPic->setSpatialEnhLayerFlag( i, true ); … … 658 652 } 659 653 } 660 #endif 661 662 #if SVC_EXTENSION 654 663 655 pcEPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 , 664 656 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics, &m_cSPS); … … 673 665 674 666 #if SVC_EXTENSION //Temporal solution, should be modified 675 if( m_layerId > 0)676 { 677 for( UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )667 if( m_layerId > 0 ) 668 { 669 for( UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ ) 678 670 { 679 671 const Window scalEL = getPPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); … … 683 675 684 676 TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( i ); 685 #if O0194_DIFFERENT_BITDEPTH_EL_BL 677 686 678 UInt refLayerId = m_cVPS.getRefLayerId(m_layerId, i); 687 679 Bool sameBitDepths = ( g_bitDepthLayer[CHANNEL_TYPE_LUMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId] ) && ( g_bitDepthLayer[CHANNEL_TYPE_CHROMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId] ); … … 696 688 || pcEncTopBase->getSPS()->getMaxCUWidth() != m_cSPS.getMaxCUWidth() || pcEncTopBase->getSPS()->getMaxCUHeight() != m_cSPS.getMaxCUHeight() || pcEncTopBase->getSPS()->getMaxCUDepth() != m_cSPS.getMaxCUDepth() 697 689 #endif 698 ) 699 #else 700 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() 701 || !equalOffsets 702 || !zeroPhase 703 ) 704 #endif 690 ) 705 691 { 706 692 rpcPic->setSpatialEnhLayerFlag( i, true ); … … 711 697 } 712 698 } 713 #endif 714 715 #if SVC_EXTENSION 699 716 700 rpcPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics, &m_cSPS); 717 701 #else //SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.