Changeset 468 in SHVCSoftware for branches/SHM-4.0-dev/source/App/TAppEncoder
- Timestamp:
- 14 Nov 2013, 09:02:43 (11 years ago)
- Location:
- branches/SHM-4.0-dev/source/App/TAppEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r467 r468 1269 1269 /* rules for input, output and internal bitdepths as per help text */ 1270 1270 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1271 for(Int layer = 0; layer < MAX_LAYERS; layer++){ 1271 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1272 { 1272 1273 if (!m_acLayerCfg[layer].m_internalBitDepthY) { m_acLayerCfg[layer].m_internalBitDepthY = m_acLayerCfg[layer].m_inputBitDepthY; } 1273 1274 if (!m_acLayerCfg[layer].m_internalBitDepthC) { m_acLayerCfg[layer].m_internalBitDepthC = m_acLayerCfg[layer].m_internalBitDepthY; } … … 1541 1542 // check range of parameters 1542 1543 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1543 for(UInt layer=0; layer<m_numLayers; layer++){ 1544 for(UInt layer=0; layer<m_numLayers; layer++) 1545 { 1544 1546 xConfirmPara( m_acLayerCfg[layer].m_inputBitDepthY < 8, "InputBitDepth must be at least 8" ); 1545 1547 xConfirmPara( m_acLayerCfg[layer].m_inputBitDepthC < 8, "InputBitDepthC must be at least 8" ); … … 2461 2463 printf("GOP size : %d\n", m_iGOPSize ); 2462 2464 #if O0194_DIFFERENT_BITDEPTH_EL_BL 2465 printf("Input bit depth Layer0 : (Y:%d, C:%d)\n", m_acLayerCfg[0].m_inputBitDepthY , m_acLayerCfg[0].m_inputBitDepthC ); 2466 printf("Input bit depth Layer1 : (Y:%d, C:%d)\n", m_acLayerCfg[1].m_internalBitDepthY, m_acLayerCfg[1].m_internalBitDepthC ); 2463 2467 printf("Internal bit depth Layer0 : (Y:%d, C:%d)\n", m_acLayerCfg[0].m_internalBitDepthY, m_acLayerCfg[0].m_internalBitDepthC ); 2464 2468 printf("Internal bit depth Layer1 : (Y:%d, C:%d)\n", m_acLayerCfg[1].m_internalBitDepthY, m_acLayerCfg[1].m_internalBitDepthC ); … … 2568 2572 printf("O0194_JOINT_US_BITSHIFT: %d ", O0194_JOINT_US_BITSHIFT); 2569 2573 printf("O0194_WEIGHTED_PREDICTION_CGS: %d ",O0194_WEIGHTED_PREDICTION_CGS); 2570 printf("O0194_REPN_FORMAT_IN_VPS_BUGFIX: %d ",O0194_REPN_FORMAT_IN_VPS_BUGFIX);2571 2574 printf("\n\n"); 2572 2575 -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncCfg.h
r467 r468 173 173 Int m_internalBitDepthC; ///< bit-depth codec operates at in chroma (input/output files will be converted) 174 174 #endif 175 175 176 // coding tools (PCM bit-depth) 176 177 Bool m_bPCMInputBitDepthFlag; ///< 0: PCM bit-depth is internal bit-depth. 1: PCM bit-depth is input bit-depth. -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r467 r468 273 273 274 274 #if O0194_DIFFERENT_BITDEPTH_EL_BL 275 for(UInt layer = 0; layer < MAX_LAYERS; layer++){ 275 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 276 { 276 277 xConfirmPara( m_iQP < -6 * ((Int)m_cAppEncCfg->getInternalBitDepthY(layer) - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 277 278 } -
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
r467 r468 146 146 repFormat->setChromaFormatVpsIdc ( 1 ); // Need modification to change for each layer - corresponds to 420 147 147 repFormat->setSeparateColourPlaneVpsFlag( 0 ); // Need modification to change for each layer 148 #if O0194_ REPN_FORMAT_IN_VPS_BUGFIX148 #if O0194_DIFFERENT_BITDEPTH_EL_BL 149 149 repFormat->setBitDepthVpsLuma ( getInternalBitDepthY(mapIdxToLayer[idx]) ); // Need modification to change for each layer 150 150 repFormat->setBitDepthVpsChroma ( getInternalBitDepthC(mapIdxToLayer[idx]) ); // Need modification to change for each layer … … 408 408 m_acTEncTop[layer].setWPBiPred ( m_useWeightedBiPred ); 409 409 #if O0194_WEIGHTED_PREDICTION_CGS 410 if (layer!=0){ 410 if (layer!=0) 411 { 411 412 // Enable weighted prediction for enhancement layer 412 413 m_acTEncTop[layer].setUseWP ( true ); … … 884 885 for(UInt layer=0; layer<m_numLayers; layer++) 885 886 { 887 #if O0194_DIFFERENT_BITDEPTH_EL_BL 888 //2 889 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 890 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 891 892 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 893 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 894 #endif 886 895 #if LAYER_CTB 887 896 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; … … 889 898 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 890 899 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 891 #endif892 #if O0194_DIFFERENT_BITDEPTH_EL_BL893 //2894 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY;895 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC;896 897 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY;898 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC;899 900 #endif 900 901 #if O0194_DIFFERENT_BITDEPTH_EL_BL … … 963 964 for(UInt layer=0; layer<m_numLayers; layer++) 964 965 { 966 #if O0194_DIFFERENT_BITDEPTH_EL_BL 967 //3 968 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 969 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 970 971 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 972 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 973 #endif 965 974 #if LAYER_CTB 966 975 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; … … 968 977 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 969 978 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 970 979 971 980 memcpy( g_auiZscanToRaster, g_auiLayerZscanToRaster[layer], sizeof( g_auiZscanToRaster ) ); 972 981 memcpy( g_auiRasterToZscan, g_auiLayerRasterToZscan[layer], sizeof( g_auiRasterToZscan ) ); 973 982 memcpy( g_auiRasterToPelX, g_auiLayerRasterToPelX[layer], sizeof( g_auiRasterToPelX ) ); 974 983 memcpy( g_auiRasterToPelY, g_auiLayerRasterToPelY[layer], sizeof( g_auiRasterToPelY ) ); 975 #endif976 #if O0194_DIFFERENT_BITDEPTH_EL_BL977 //3978 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY;979 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC;980 981 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY;982 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC;983 984 #endif 984 985 m_acTEncTop[layer].init(isFieldCoding); … … 1307 1308 for(UInt layer=0; layer<m_numLayers; layer++) 1308 1309 { 1310 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1311 //6 1312 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 1313 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 1314 1315 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 1316 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 1317 #endif 1309 1318 #if LAYER_CTB 1310 1319 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; … … 1313 1322 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 1314 1323 #endif 1315 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1316 //6 1317 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 1318 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 1319 1320 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 1321 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 1322 #endif 1324 1323 1325 // get buffers 1324 1326 xGetBuffer(pcPicYuvRec, layer); … … 1388 1390 for(UInt layer=0; layer<m_numLayers; layer++) 1389 1391 { 1392 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1393 //7 1394 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 1395 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 1396 1397 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 1398 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 1399 #endif 1390 1400 #if LAYER_CTB 1391 1401 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; … … 1398 1408 memcpy( g_auiRasterToPelX, g_auiLayerRasterToPelX[layer], sizeof( g_auiRasterToPelX ) ); 1399 1409 memcpy( g_auiRasterToPelY, g_auiLayerRasterToPelY[layer], sizeof( g_auiRasterToPelY ) ); 1400 #endif1401 #if O0194_DIFFERENT_BITDEPTH_EL_BL1402 //71403 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY;1404 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC;1405 1406 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY;1407 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC;1408 1410 #endif 1409 1411 // call encoding function for one frame
Note: See TracChangeset for help on using the changeset viewer.