Changeset 468 in SHVCSoftware for branches/SHM-4.0-dev/source/App
- Timestamp:
- 14 Nov 2013, 09:02:43 (11 years ago)
- Location:
- branches/SHM-4.0-dev/source/App
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/App/TAppDecoder/TAppDecTop.cpp
r467 r468 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 6 * Copyright (c) 2010-2013, ITU/ISO/IEC … … 80 80 m_pchBitstreamFile = NULL; 81 81 } 82 #if SVC_EXTENSION 82 #if SVC_EXTENSION 83 83 for( Int i = 0; i < m_tgtLayerId; i++ ) 84 84 { … … 88 88 m_pchReconFile[i] = NULL; 89 89 } 90 } 90 } 91 91 #if AVC_BASE 92 92 if( m_pchBLReconFile ) … … 240 240 if ( m_pchReconFile[curLayerId] && !openedReconFile[curLayerId] ) 241 241 { 242 if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; } 242 if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; } 243 243 if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; } 244 244 … … 247 247 openedReconFile[curLayerId] = true; 248 248 } 249 if ( bNewPicture && bNewPOC && 249 if ( bNewPicture && bNewPOC && 250 250 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL 251 251 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP … … 281 281 } 282 282 #endif 283 pcBLPic.destroy(); 283 pcBLPic.destroy(); 284 284 285 285 for(UInt layer = layerIdmin; layer <= m_tgtLayerId; layer++) … … 290 290 m_acTDecTop[layer].deletePicBuffer(); 291 291 } 292 292 293 293 // destroy internal classes 294 294 xDestroyDecLib(); … … 399 399 openedReconFile = true; 400 400 } 401 if ( bNewPicture && 401 if ( bNewPicture && 402 402 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL 403 403 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP … … 415 415 } 416 416 } 417 417 418 418 #if SYNTAX_OUTPUT 419 419 if( streamSyntaxFile.is_open() ) … … 422 422 } 423 423 #endif 424 424 425 425 xFlushOutput( pcListPic ); 426 426 // delete buffers 427 427 m_cTDecTop.deletePicBuffer(); 428 428 429 429 // destroy internal classes 430 430 xDestroyDecLib(); … … 440 440 #if SVC_EXTENSION 441 441 // initialize global variables 442 initROM(); 442 initROM(); 443 443 444 444 for(UInt layer = 0; layer <= m_tgtLayerId; layer++) … … 450 450 m_acTDecTop[layer].create(); 451 451 452 m_acTDecTop[layer].setLayerDec(m_apcTDecTop); 452 m_acTDecTop[layer].setLayerDec(m_apcTDecTop); 453 453 } 454 454 #else … … 479 479 m_cTVideoIOYuvReconFile. close(); 480 480 } 481 481 482 482 // destroy decoder class 483 483 m_cTDecTop.destroy(); … … 571 571 572 572 #else 573 #if O0194_REPN_FORMAT_IN_VPS_BUGFIX 573 #if O0194_DIFFERENT_BITDEPTH_EL_BL 574 // Compile time bug-fix 574 575 m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 575 576 #else … … 732 733 { 733 734 return; 734 } 735 } 735 736 TComList<TComPic*>::iterator iterPic = pcListPic->begin(); 736 737 … … 768 769 769 770 #else 770 #if O0194_REPN_FORMAT_IN_VPS_BUGFIX 771 #if O0194_DIFFERENT_BITDEPTH_EL_BL 772 // Compile time bug-fix 771 773 m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 772 774 #else … … 926 928 pcPic = NULL; 927 929 } 928 #endif 930 #endif 929 931 #endif 930 932 iterPic++; -
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.