Changeset 189 in SHVCSoftware for trunk/source/App/TAppEncoder
- Timestamp:
- 13 May 2013, 16:58:44 (12 years ago)
- Location:
- trunk/source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-2.0-dev/source (added) merged: 133-167,169-182,184-188
- Property svn:mergeinfo changed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r125 r189 66 66 TAppEncCfg::TAppEncCfg() 67 67 : m_pBitstreamFile() 68 #if AVC_BASE 69 , m_avcBaseLayerFlag(0) 70 #endif 68 71 , m_pColumnWidth() 69 72 , m_pRowHeight() … … 89 92 { 90 93 m_aidQP = NULL; 94 #if J0149_TONE_MAPPING_SEI 95 m_startOfCodedInterval = NULL; 96 m_codedPivotValue = NULL; 97 m_targetPivotValue = NULL; 98 #endif 91 99 } 92 100 #endif … … 102 110 delete[] m_aidQP; 103 111 } 112 #if J0149_TONE_MAPPING_SEI 113 if ( m_startOfCodedInterval ) 114 { 115 delete[] m_startOfCodedInterval; 116 m_startOfCodedInterval = NULL; 117 } 118 if ( m_codedPivotValue ) 119 { 120 delete[] m_codedPivotValue; 121 m_codedPivotValue = NULL; 122 } 123 if ( m_targetPivotValue ) 124 { 125 delete[] m_targetPivotValue; 126 m_targetPivotValue = NULL; 127 } 128 #endif 104 129 free(m_pchInputFile); 105 130 #endif … … 119 144 Void TAppEncCfg::destroy() 120 145 { 146 #if VPS_EXTN_DIRECT_REF_LAYERS 147 for(Int layer = 0; layer < MAX_LAYERS; layer++) 148 { 149 if( m_acLayerCfg[layer].m_numDirectRefLayers > 0 ) 150 { 151 delete [] m_acLayerCfg[layer].m_refLayerIds; 152 } 153 } 154 #endif 121 155 } 122 156 … … 297 331 string* cfg_refLayerIdsPtr [MAX_LAYERS]; 298 332 #endif 333 #if SCALED_REF_LAYER_OFFSETS 334 Int* cfg_scaledRefLayerLeftOffset [MAX_LAYERS]; 335 Int* cfg_scaledRefLayerTopOffset [MAX_LAYERS]; 336 Int* cfg_scaledRefLayerRightOffset [MAX_LAYERS]; 337 Int* cfg_scaledRefLayerBottomOffset [MAX_LAYERS]; 338 #endif 299 339 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 300 340 { … … 311 351 cfg_refLayerIdsPtr [layer] = &cfg_refLayerIds[layer]; 312 352 #endif 313 } 353 #if SCALED_REF_LAYER_OFFSETS 354 cfg_scaledRefLayerLeftOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerLeftOffset; 355 cfg_scaledRefLayerTopOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerTopOffset; 356 cfg_scaledRefLayerRightOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerRightOffset; 357 cfg_scaledRefLayerBottomOffset[layer] = &m_acLayerCfg[layer].m_scaledRefLayerBottomOffset; 358 #endif 359 } 360 #if AVC_BASE 361 string cfg_BLInputFile; 362 #endif 314 363 #if AVC_SYNTAX 315 364 string cfg_BLSyntaxFile; … … 324 373 string cfg_RowHeight; 325 374 string cfg_ScalingListFile; 375 #if J0149_TONE_MAPPING_SEI 376 string cfg_startOfCodedInterval; 377 string cfg_codedPivotValue; 378 string cfg_targetPivotValue; 379 #endif 326 380 #if SIGNAL_BITRATE_PICRATE_IN_VPS 327 381 string cfg_bitRateInfoPresentFlag; … … 361 415 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 362 416 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 363 417 #if SCALED_REF_LAYER_OFFSETS 418 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffset, 0, MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" 419 " top-left luma sample of the EL picture, in units of two luma samples") 420 ("ScaledRefLayerTopOffset%d", cfg_scaledRefLayerTopOffset, 0, MAX_LAYERS, "Vertical offset of top-left luma sample of scaled base layer picture with respect to" 421 " top-left luma sample of the EL picture, in units of two luma samples") 422 ("ScaledRefLayerRightOffset%d", cfg_scaledRefLayerRightOffset, 0, MAX_LAYERS, "Horizontal offset of bottom-right luma sample of scaled base layer picture with respect to" 423 " bottom-right luma sample of the EL picture, in units of two luma samples") 424 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffset,0, MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to" 425 " bottom-right luma sample of the EL picture, in units of two luma samples") 426 #endif 364 427 #if AVC_BASE 365 ("InputBLFile,-ibl", *cfg_InputFile[0], string(""), "Base layer rec YUV input file name") 428 ("AvcBase,-avc", m_avcBaseLayerFlag, 0, "avc_base_layer_flag") 429 ("InputBLFile,-ibl", cfg_BLInputFile, string(""), "Base layer rec YUV input file name") 366 430 #if AVC_SYNTAX 367 431 ("InputBLSyntaxFile,-ibs", cfg_BLSyntaxFile, string(""), "Base layer syntax input file name") … … 369 433 #endif 370 434 #if REF_IDX_FRAMEWORK 371 ("EnableElRapB,-use-rap-b", m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture _")435 ("EnableElRapB,-use-rap-b", m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture)") 372 436 #endif 373 437 #else … … 430 494 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 431 495 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 496 #if !L0034_COMBINED_LIST_CLEANUP 432 497 ("ListCombination,-lc", m_bUseLComb, true, "Combined reference list for uni-prediction estimation in B-slices") 498 #endif 433 499 // motion options 434 500 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") … … 488 554 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 ) 489 555 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false ) 556 #if L0386_DB_METRIC 557 ("DeblockingFilterMetric", m_DeblockingFilterMetric, false ) 558 #endif 490 559 491 560 // Coding tools … … 602 671 ("SEIBufferingPeriod", m_bufferingPeriodSEIEnabled, 0, "Control generation of buffering period SEI messages") 603 672 ("SEIPictureTiming", m_pictureTimingSEIEnabled, 0, "Control generation of picture timing SEI messages") 673 #if J0149_TONE_MAPPING_SEI 674 ("SEIToneMappingInfo", m_toneMappingInfoSEIEnabled, false, "Control generation of Tone Mapping SEI messages") 675 ("SEIToneMapId", m_toneMapId, 0, "Specifies Id of Tone Mapping SEI message for a given session") 676 ("SEIToneMapCancelFlag", m_toneMapCancelFlag, false, "Indicates that Tone Mapping SEI message cancels the persistance or follows") 677 ("SEIToneMapPersistenceFlag", m_toneMapPersistenceFlag, true, "Specifies the persistence of the Tone Mapping SEI message") 678 ("SEIToneMapCodedDataBitDepth", m_toneMapCodedDataBitDepth, 8, "Specifies Coded Data BitDepth of Tone Mapping SEI messages") 679 ("SEIToneMapTargetBitDepth", m_toneMapTargetBitDepth, 8, "Specifies Output BitDepth of Tome mapping function") 680 ("SEIToneMapModelId", m_toneMapModelId, 0, "Specifies Model utilized for mapping coded data into target_bit_depth range\n" 681 "\t0: linear mapping with clipping\n" 682 "\t1: sigmoidal mapping\n" 683 "\t2: user-defined table mapping\n" 684 "\t3: piece-wise linear mapping\n" 685 "\t4: luminance dynamic range information ") 686 ("SEIToneMapMinValue", m_toneMapMinValue, 0, "Specifies the minimum value in mode 0") 687 ("SEIToneMapMaxValue", m_toneMapMaxValue, 1023, "Specifies the maxmum value in mode 0") 688 ("SEIToneMapSigmoidMidpoint", m_sigmoidMidpoint, 512, "Specifies the centre point in mode 1") 689 ("SEIToneMapSigmoidWidth", m_sigmoidWidth, 960, "Specifies the distance between 5% and 95% values of the target_bit_depth in mode 1") 690 ("SEIToneMapStartOfCodedInterval", cfg_startOfCodedInterval, string(""), "Array of user-defined mapping table") 691 ("SEIToneMapNumPivots", m_numPivots, 0, "Specifies the number of pivot points in mode 3") 692 ("SEIToneMapCodedPivotValue", cfg_codedPivotValue, string(""), "Array of pivot point") 693 ("SEIToneMapTargetPivotValue", cfg_targetPivotValue, string(""), "Array of pivot point") 694 ("SEIToneMapCameraIsoSpeedIdc", m_cameraIsoSpeedIdc, 0, "Indicates the camera ISO speed for daylight illumination") 695 ("SEIToneMapCameraIsoSpeedValue", m_cameraIsoSpeedValue, 400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO") 696 ("SEIToneMapExposureCompensationValueSignFlag", m_exposureCompensationValueSignFlag, 0, "Specifies the sign of ExposureCompensationValue") 697 ("SEIToneMapExposureCompensationValueNumerator", m_exposureCompensationValueNumerator, 0, "Specifies the numerator of ExposureCompensationValue") 698 ("SEIToneMapExposureCompensationValueDenomIdc", m_exposureCompensationValueDenomIdc, 2, "Specifies the denominator of ExposureCompensationValue") 699 ("SEIToneMapRefScreenLuminanceWhite", m_refScreenLuminanceWhite, 350, "Specifies reference screen brightness setting in units of candela per square metre") 700 ("SEIToneMapExtendedRangeWhiteLevel", m_extendedRangeWhiteLevel, 800, "Indicates the luminance dynamic range") 701 ("SEIToneMapNominalBlackLevelLumaCodeValue", m_nominalBlackLevelLumaCodeValue, 16, "Specifies luma sample value of the nominal black level assigned decoded pictures") 702 ("SEIToneMapNominalWhiteLevelLumaCodeValue", m_nominalWhiteLevelLumaCodeValue, 235, "Specifies luma sample value of the nominal white level assigned decoded pictures") 703 ("SEIToneMapExtendedWhiteLevelLumaCodeValue", m_extendedWhiteLevelLumaCodeValue, 300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures") 704 #endif 604 705 ("SEIFramePacking", m_framePackingSEIEnabled, 0, "Control generation of frame packing SEI messages") 605 706 ("SEIFramePackingType", m_framePackingSEIType, 0, "Define frame packing arrangement\n" … … 622 723 ("SEIGradualDecodingRefreshInfo", m_gradualDecodingRefreshInfoEnabled, 0, "Control generation of gradual decoding refresh information SEI message") 623 724 ("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, 0, "Control generation of decoding unit information SEI message.") 725 #if L0208_SOP_DESCRIPTION_SEI 726 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 727 #endif 728 #if K0180_SCALABLE_NESTING_SEI 729 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 730 #endif 624 731 #if SIGNAL_BITRATE_PICRATE_IN_VPS 625 732 ("BitRatePicRateMaxTLayers", m_bitRatePicRateMaxTLayers, 0, "Maximum number of sub-layers signalled; can be inferred otherwise; here for easy parsing of config. file") … … 662 769 /* convert std::string to c string for compatability */ 663 770 #if SVC_EXTENSION 771 #if AVC_BASE 772 if( m_avcBaseLayerFlag ) 773 { 774 *cfg_InputFile[0] = cfg_BLInputFile; 775 } 776 #endif 664 777 m_pBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 665 778 #if AVC_SYNTAX … … 878 991 } 879 992 m_iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; 993 #endif 994 #if J0149_TONE_MAPPING_SEI 995 if( m_toneMappingInfoSEIEnabled && !m_toneMapCancelFlag ) 996 { 997 Char* pcStartOfCodedInterval = cfg_startOfCodedInterval.empty() ? NULL: strdup(cfg_startOfCodedInterval.c_str()); 998 Char* pcCodedPivotValue = cfg_codedPivotValue.empty() ? NULL: strdup(cfg_codedPivotValue.c_str()); 999 Char* pcTargetPivotValue = cfg_targetPivotValue.empty() ? NULL: strdup(cfg_targetPivotValue.c_str()); 1000 if( m_toneMapModelId == 2 && pcStartOfCodedInterval ) 1001 { 1002 char *startOfCodedInterval; 1003 UInt num = 1u<< m_toneMapTargetBitDepth; 1004 m_startOfCodedInterval = new Int[num]; 1005 ::memset( m_startOfCodedInterval, 0, sizeof(Int)*num ); 1006 startOfCodedInterval = strtok(pcStartOfCodedInterval, " ."); 1007 int i = 0; 1008 while( startOfCodedInterval && ( i < num ) ) 1009 { 1010 m_startOfCodedInterval[i] = atoi( startOfCodedInterval ); 1011 startOfCodedInterval = strtok(NULL, " ."); 1012 i++; 1013 } 1014 } 1015 else 1016 { 1017 m_startOfCodedInterval = NULL; 1018 } 1019 if( ( m_toneMapModelId == 3 ) && ( m_numPivots > 0 ) ) 1020 { 1021 if( pcCodedPivotValue && pcTargetPivotValue ) 1022 { 1023 char *codedPivotValue; 1024 char *targetPivotValue; 1025 m_codedPivotValue = new Int[m_numPivots]; 1026 m_targetPivotValue = new Int[m_numPivots]; 1027 ::memset( m_codedPivotValue, 0, sizeof(Int)*( m_numPivots ) ); 1028 ::memset( m_targetPivotValue, 0, sizeof(Int)*( m_numPivots ) ); 1029 codedPivotValue = strtok(pcCodedPivotValue, " ."); 1030 int i=0; 1031 while(codedPivotValue&&i<m_numPivots) 1032 { 1033 m_codedPivotValue[i] = atoi( codedPivotValue ); 1034 codedPivotValue = strtok(NULL, " ."); 1035 i++; 1036 } 1037 i=0; 1038 targetPivotValue = strtok(pcTargetPivotValue, " ."); 1039 while(targetPivotValue&&i<m_numPivots) 1040 { 1041 m_targetPivotValue[i]= atoi( targetPivotValue ); 1042 targetPivotValue = strtok(NULL, " ."); 1043 i++; 1044 } 1045 } 1046 } 1047 else 1048 { 1049 m_codedPivotValue = NULL; 1050 m_targetPivotValue = NULL; 1051 } 1052 } 880 1053 #endif 881 1054 // check validity of input parameters … … 1139 1312 1140 1313 #if SVC_EXTENSION 1314 xConfirmPara( m_numLayers > MAX_LAYERS , "Number of layers in config file is greater than MAX_LAYERS" ); 1315 m_numLayers = m_numLayers > MAX_LAYERS ? MAX_LAYERS : m_numLayers; 1316 1141 1317 // verify layer configuration parameters 1142 1318 for(UInt layer=0; layer<m_numLayers; layer++) … … 1375 1551 { 1376 1552 m_numReorderPics[i] = 0; 1553 #if L0323_DPB 1554 m_maxDecPicBuffering[i] = 1; 1555 #else 1377 1556 m_maxDecPicBuffering[i] = 0; 1557 #endif 1378 1558 } 1379 1559 for(Int i=0; i<m_iGOPSize; i++) 1380 1560 { 1561 #if L0323_DPB 1562 if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 1563 #else 1381 1564 if(m_GOPList[i].m_numRefPics > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 1382 { 1565 #endif 1566 { 1567 #if L0323_DPB 1568 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1; 1569 #else 1383 1570 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics; 1571 #endif 1384 1572 } 1385 1573 Int highestDecodingNumberWithLowerPOC = 0; … … 1412 1600 m_numReorderPics[i+1] = m_numReorderPics[i]; 1413 1601 } 1602 #if L0323_DPB 1603 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 1604 if(m_numReorderPics[i] > m_maxDecPicBuffering[i] - 1) 1605 { 1606 m_maxDecPicBuffering[i] = m_numReorderPics[i] + 1; 1607 } 1608 #else 1414 1609 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive 1415 1610 if(m_numReorderPics[i] > m_maxDecPicBuffering[i]) … … 1417 1612 m_maxDecPicBuffering[i] = m_numReorderPics[i]; 1418 1613 } 1614 #endif 1419 1615 // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer 1420 1616 if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i]) … … 1423 1619 } 1424 1620 } 1621 1622 1623 #if L0323_DPB 1624 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 1625 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1] - 1) 1626 { 1627 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1; 1628 } 1629 #else 1425 1630 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive 1426 1631 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1]) … … 1428 1633 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1]; 1429 1634 } 1635 #endif 1430 1636 1431 1637 #if SVC_EXTENSION // ToDo: it should be checked for the case when parameters are different for the layers … … 1511 1717 } 1512 1718 #endif 1513 1719 #if !L0034_COMBINED_LIST_CLEANUP 1514 1720 xConfirmPara( m_bUseLComb==false && m_numReorderPics[MAX_TLAYER-1]!=0, "ListCombination can only be 0 in low delay coding (more precisely when L0 and L1 are identical)" ); // Note however this is not the full necessary condition as ref_pic_list_combination_flag can only be 0 if L0 == L1. 1721 #endif 1515 1722 xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" ); 1516 1723 #if !SVC_EXTENSION … … 1520 1727 1521 1728 xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n"); 1729 1730 #if J0149_TONE_MAPPING_SEI 1731 if (m_toneMappingInfoSEIEnabled) 1732 { 1733 xConfirmPara( m_toneMapCodedDataBitDepth < 8 || m_toneMapCodedDataBitDepth > 14 , "SEIToneMapCodedDataBitDepth must be in rage 8 to 14"); 1734 xConfirmPara( m_toneMapTargetBitDepth < 1 || (m_toneMapTargetBitDepth > 16 && m_toneMapTargetBitDepth < 255) , "SEIToneMapTargetBitDepth must be in rage 1 to 16 or equal to 255"); 1735 xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4"); 1736 xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0"); 1737 xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100"); 1738 xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue"); 1739 xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue"); 1740 } 1741 #endif 1522 1742 1523 1743 #if RATE_CONTROL_LAMBDA_DOMAIN … … 1609 1829 { 1610 1830 printf("=== Layer %d settings === \n", layer); 1831 #if AVC_SYNTAX 1832 m_acLayerCfg[layer].xPrintParameter( layer ); 1833 #else 1611 1834 m_acLayerCfg[layer].xPrintParameter(); 1835 #endif 1612 1836 printf("\n"); 1613 1837 } … … 1677 1901 printf("SQP:%d ", m_uiDeltaQpRD ); 1678 1902 printf("ASR:%d ", m_bUseASR ); 1903 #if !L0034_COMBINED_LIST_CLEANUP 1679 1904 printf("LComb:%d ", m_bUseLComb ); 1905 #endif 1680 1906 printf("FEN:%d ", m_bUseFastEnc ); 1681 1907 printf("ECU:%d ", m_bUseEarlyCU ); … … 1718 1944 #if SVC_EXTENSION 1719 1945 printf("RecalQP:%d ", m_recalculateQPAccordingToLambda ? 1 : 0 ); 1720 printf("AVC_BASE:%d ", AVC_BASE); 1946 #if AVC_BASE 1947 printf("AvcBase:%d ", m_avcBaseLayerFlag ? 1 : 0); 1948 #else 1949 printf("AvcBase:%d ", 0); 1950 #endif 1721 1951 #if REF_IDX_FRAMEWORK 1722 1952 printf("REF_IDX_FRAMEWORK:%d ", REF_IDX_FRAMEWORK); 1723 1953 printf("EL_RAP_SliceType: %d ", m_elRapSliceBEnabled); 1724 printf("REF_IDX_ME_ZEROMV: %d", REF_IDX_ME_ZEROMV); 1954 printf("REF_IDX_ME_ZEROMV: %d ", REF_IDX_ME_ZEROMV); 1955 printf("ENCODER_FAST_MODE: %d ", ENCODER_FAST_MODE); 1956 printf("REF_IDX_MFM: %d ", REF_IDX_MFM); 1725 1957 #elif INTRA_BL 1726 1958 printf("INTRA_BL:%d ", INTRA_BL); -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r125 r189 67 67 UInt m_FrameSkip; ///< number of skipped frames from the beginning 68 68 Int m_framesToBeEncoded; ///< number of encoded frames 69 #if AVC_BASE 70 Int m_avcBaseLayerFlag; ///< AVC_BASElayer_flag 71 #endif 69 72 #if AVC_SYNTAX 70 char* m_BLSyntaxFile; ///< input syntax file73 Char* m_BLSyntaxFile; ///< input syntax file 71 74 #endif 72 75 #else … … 109 112 GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file 110 113 Int m_numReorderPics[MAX_TLAYER]; ///< total number of reorder pictures 114 #if L0323_DPB 115 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of pictures in the decoded picture buffer 116 #else 111 117 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of reference pictures needed for decoding 118 #endif 119 #if !L0034_COMBINED_LIST_CLEANUP 112 120 Bool m_bUseLComb; ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421) 121 #endif 113 122 Bool m_useTransformSkip; ///< flag for enabling intra transform skipping 114 123 Bool m_useTransformSkipFast; ///< flag for enabling fast intra transform skipping … … 172 181 Int m_loopFilterTcOffsetDiv2; ///< tc offset for deblocking filter 173 182 Bool m_DeblockingFilterControlPresent; ///< deblocking filter control present flag in PPS 183 #if L0386_DB_METRIC 184 Bool m_DeblockingFilterMetric; ///< blockiness metric in encoder 185 #endif 174 186 175 187 // coding tools (PCM) … … 223 235 Int m_bufferingPeriodSEIEnabled; 224 236 Int m_pictureTimingSEIEnabled; 237 #if J0149_TONE_MAPPING_SEI 238 Bool m_toneMappingInfoSEIEnabled; 239 Int m_toneMapId; 240 Bool m_toneMapCancelFlag; 241 Bool m_toneMapPersistenceFlag; 242 Int m_toneMapCodedDataBitDepth; 243 Int m_toneMapTargetBitDepth; 244 Int m_toneMapModelId; 245 Int m_toneMapMinValue; 246 Int m_toneMapMaxValue; 247 Int m_sigmoidMidpoint; 248 Int m_sigmoidWidth; 249 Int m_numPivots; 250 Int m_cameraIsoSpeedIdc; 251 Int m_cameraIsoSpeedValue; 252 Int m_exposureCompensationValueSignFlag; 253 Int m_exposureCompensationValueNumerator; 254 Int m_exposureCompensationValueDenomIdc; 255 Int m_refScreenLuminanceWhite; 256 Int m_extendedRangeWhiteLevel; 257 Int m_nominalBlackLevelLumaCodeValue; 258 Int m_nominalWhiteLevelLumaCodeValue; 259 Int m_extendedWhiteLevelLumaCodeValue; 260 Int* m_startOfCodedInterval; 261 Int* m_codedPivotValue; 262 Int* m_targetPivotValue; 263 #endif 225 264 Int m_framePackingSEIEnabled; 226 265 Int m_framePackingSEIType; … … 232 271 Int m_gradualDecodingRefreshInfoEnabled; 233 272 Int m_decodingUnitInfoSEIEnabled; 273 #if L0208_SOP_DESCRIPTION_SEI 274 Int m_SOPDescriptionSEIEnabled; 275 #endif 276 #if K0180_SCALABLE_NESTING_SEI 277 Int m_scalableNestingSEIEnabled; 278 #endif 234 279 // weighted prediction 235 280 Bool m_useWeightedPred; ///< Use of weighted prediction in P slices … … 316 361 Int* m_constantPicRateIdc; ///< Indicates constant picture rate idc for various sub-layers 317 362 #endif 318 #319 363 public: 320 364 TAppEncCfg(); -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r125 r189 116 116 } 117 117 118 #if AVC_SYNTAX 119 Void TAppEncLayerCfg::xPrintParameter( UInt layerId ) 120 #else 118 121 Void TAppEncLayerCfg::xPrintParameter() 122 #endif 119 123 { 120 124 printf("Input File : %s\n", m_cInputFile.c_str() ); 121 125 printf("Reconstruction File : %s\n", m_cReconFile.c_str() ); 122 126 #if AVC_SYNTAX 123 printf("Base layer input file : %s\n", m_cAppEncCfg->getBLSyntaxFile() ); 127 if( layerId == 0 ) 128 { 129 printf("Base layer syntax file : %s\n", m_cAppEncCfg->getBLSyntaxFile() ); 130 } 124 131 #endif 125 132 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate ); -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.h
r125 r189 54 54 Int* m_aidQP; ///< array of slice QP values 55 55 TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config 56 #if SCALED_REF_LAYER_OFFSETS 57 Int m_scaledRefLayerLeftOffset; 58 Int m_scaledRefLayerTopOffset; 59 Int m_scaledRefLayerRightOffset; 60 Int m_scaledRefLayerBottomOffset; 61 #endif 56 62 public: 57 63 TAppEncLayerCfg(); … … 63 69 bool parseCfg ( const string& cfgFileName ); ///< parse layer configuration file to fill member variables 64 70 71 #if AVC_SYNTAX 72 Void xPrintParameter( UInt layerId ); 73 #else 65 74 Void xPrintParameter(); 75 #endif 66 76 Bool xCheckParameter(); 67 77 -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r125 r189 1 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party3 * and contributor rights, including patent rights, and no such rights are4 * granted under this license.5 *6 * Copyright (c) 2010-2013, ITU/ISO/IEC7 * All rights reserved.8 *9 * Redistribution and use in source and binary forms, with or without10 * modification, are permitted provided that the following conditions are met:11 *12 * * Redistributions of source code must retain the above copyright notice,13 * this list of conditions and the following disclaimer.14 * * Redistributions in binary form must reproduce the above copyright notice,15 * this list of conditions and the following disclaimer in the documentation16 * and/or other materials provided with the distribution.17 * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may18 * be used to endorse or promote products derived from this software without19 * specific prior written permission.20 *21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF31 * THE POSSIBILITY OF SUCH DAMAGE.32 */2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 33 34 34 /** \file TAppEncTop.cpp 35 \brief Encoder application class35 \brief Encoder application class 36 36 */ 37 37 … … 112 112 113 113 #if REF_IDX_MFM 114 #if AVC_BASE 115 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? AVC_SYNTAX : true )); 116 #else 114 117 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : true); 118 #endif 115 119 #endif 116 120 // set layer ID … … 167 171 m_acTEncTop[layer].setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 168 172 m_acTEncTop[layer].setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 173 #if L0386_DB_METRIC 174 m_acTEncTop[layer].setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 175 #endif 169 176 170 177 //====== Motion search ======== … … 200 207 m_acTEncTop[layer].setUseHADME ( m_bUseHADME ); 201 208 m_acTEncTop[layer].setUseLossless ( m_useLossless ); 202 m_acTEncTop[layer].setUseLComb ( m_bUseLComb ); 209 #if !L0034_COMBINED_LIST_CLEANUP 210 m_cTEncTop.setUseLComb ( m_bUseLComb ); 211 #endif 203 212 m_acTEncTop[layer].setdQPs ( m_acLayerCfg[layer].getdQPs() ); 204 213 m_acTEncTop[layer].setUseRDOQ ( m_useRDOQ ); … … 270 279 m_acTEncTop[layer].setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 271 280 m_acTEncTop[layer].setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 281 #if J0149_TONE_MAPPING_SEI 282 m_acTEncTop[layer].setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 283 m_acTEncTop[layer].setTMISEIToneMapId ( m_toneMapId ); 284 m_acTEncTop[layer].setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag ); 285 m_acTEncTop[layer].setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag ); 286 m_acTEncTop[layer].setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth ); 287 m_acTEncTop[layer].setTMISEITargetBitDepth ( m_toneMapTargetBitDepth ); 288 m_acTEncTop[layer].setTMISEIModelID ( m_toneMapModelId ); 289 m_acTEncTop[layer].setTMISEIMinValue ( m_toneMapMinValue ); 290 m_acTEncTop[layer].setTMISEIMaxValue ( m_toneMapMaxValue ); 291 m_acTEncTop[layer].setTMISEISigmoidMidpoint ( m_sigmoidMidpoint ); 292 m_acTEncTop[layer].setTMISEISigmoidWidth ( m_sigmoidWidth ); 293 m_acTEncTop[layer].setTMISEIStartOfCodedInterva ( m_startOfCodedInterval ); 294 m_acTEncTop[layer].setTMISEINumPivots ( m_numPivots ); 295 m_acTEncTop[layer].setTMISEICodedPivotValue ( m_codedPivotValue ); 296 m_acTEncTop[layer].setTMISEITargetPivotValue ( m_targetPivotValue ); 297 m_acTEncTop[layer].setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 298 m_acTEncTop[layer].setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 299 m_acTEncTop[layer].setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 300 m_acTEncTop[layer].setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 301 m_acTEncTop[layer].setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); 302 m_acTEncTop[layer].setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite ); 303 m_acTEncTop[layer].setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel ); 304 m_acTEncTop[layer].setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue ); 305 m_acTEncTop[layer].setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 306 m_acTEncTop[layer].setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 307 #endif 272 308 m_acTEncTop[layer].setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 273 309 m_acTEncTop[layer].setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 279 315 m_acTEncTop[layer].setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 280 316 m_acTEncTop[layer].setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 317 #if L0208_SOP_DESCRIPTION_SEI 318 m_acTEncTop[layer].setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 319 #endif 320 #if K0180_SCALABLE_NESTING_SEI 321 m_acTEncTop[layer].setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 322 #endif 281 323 m_acTEncTop[layer].setUniformSpacingIdr ( m_iUniformSpacingIdr ); 282 324 m_acTEncTop[layer].setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 376 418 m_acTEncTop[layer].setElRapSliceTypeB(layer == 0? 0 : m_elRapSliceBEnabled); 377 419 #endif 420 #if SCALED_REF_LAYER_OFFSETS 421 if( layer > 0 ) 422 { 423 m_acTEncTop[layer].getScaledRefLayerWindow().setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset, 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset, 424 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset, 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset); 425 } 426 #endif 378 427 } 379 428 } … … 442 491 m_cTEncTop.setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 443 492 m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 493 #if L0386_DB_METRIC 494 m_cTEncTop.setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 495 #endif 444 496 445 497 //====== Motion search ======== … … 475 527 m_cTEncTop.setUseHADME ( m_bUseHADME ); 476 528 m_cTEncTop.setUseLossless ( m_useLossless ); 529 #if !L0034_COMBINED_LIST_CLEANUP 477 530 m_cTEncTop.setUseLComb ( m_bUseLComb ); 531 #endif 478 532 m_cTEncTop.setdQPs ( m_aidQP ); 479 533 m_cTEncTop.setUseRDOQ ( m_useRDOQ ); … … 545 599 m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 546 600 m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 601 #if J0149_TONE_MAPPING_SEI 602 m_cTEncTop.setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 603 m_cTEncTop.setTMISEIToneMapId ( m_toneMapId ); 604 m_cTEncTop.setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag ); 605 m_cTEncTop.setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag ); 606 m_cTEncTop.setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth ); 607 m_cTEncTop.setTMISEITargetBitDepth ( m_toneMapTargetBitDepth ); 608 m_cTEncTop.setTMISEIModelID ( m_toneMapModelId ); 609 m_cTEncTop.setTMISEIMinValue ( m_toneMapMinValue ); 610 m_cTEncTop.setTMISEIMaxValue ( m_toneMapMaxValue ); 611 m_cTEncTop.setTMISEISigmoidMidpoint ( m_sigmoidMidpoint ); 612 m_cTEncTop.setTMISEISigmoidWidth ( m_sigmoidWidth ); 613 m_cTEncTop.setTMISEIStartOfCodedInterva ( m_startOfCodedInterval ); 614 m_cTEncTop.setTMISEINumPivots ( m_numPivots ); 615 m_cTEncTop.setTMISEICodedPivotValue ( m_codedPivotValue ); 616 m_cTEncTop.setTMISEITargetPivotValue ( m_targetPivotValue ); 617 m_cTEncTop.setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 618 m_cTEncTop.setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 619 m_cTEncTop.setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 620 m_cTEncTop.setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 621 m_cTEncTop.setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); 622 m_cTEncTop.setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite ); 623 m_cTEncTop.setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel ); 624 m_cTEncTop.setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue ); 625 m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 626 m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 627 #endif 547 628 m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 548 629 m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 554 635 m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 555 636 m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 637 #if L0208_SOP_DESCRIPTION_SEI 638 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 639 #endif 640 #if K0180_SCALABLE_NESTING_SEI 641 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 642 #endif 556 643 m_cTEncTop.setUniformSpacingIdr ( m_iUniformSpacingIdr ); 557 644 m_cTEncTop.setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 729 816 #if VPS_EXTN_MASK_AND_DIM_INFO 730 817 UInt i = 0, dimIdLen = 0; 818 #if AVC_BASE 819 vps->setAvcBaseLayerFlag(m_avcBaseLayerFlag); 820 #else 731 821 vps->setAvcBaseLayerFlag(false); 822 #endif 732 823 vps->setSplittingFlag(false); 733 824 for(i = 0; i < MAX_VPS_NUM_SCALABILITY_TYPES; i++) … … 769 860 #endif 770 861 // Target output layer 862 #if VPS_PROFILE_OUTPUT_LAYERS 863 vps->setNumOutputLayerSets(2); // 2 including the default base-layer set. 864 vps->setNumProfileTierLevel(2); // 1 for the enhancement layer 865 vps->setProfileLevelTierIdx(1, 1); 866 vps->setDefaultOneTargetOutputLayerFlag(true); 867 Int lsIdx = 1; 868 vps->setOutputLayerSetIdx(1, lsIdx); // Because only one layer set 869 #else 771 870 vps->setNumOutputLayerSets(1); 772 871 Int lsIdx = 1; 773 872 vps->setOutputLayerSetIdx(0, lsIdx); // Because only one layer set 873 #endif 774 874 // Include the highest layer as output layer 775 875 for(UInt layer=0; layer <= vps->getMaxLayerId() ; layer++) … … 802 902 } 803 903 #endif 904 #if JCTVC_M0458_INTERLAYER_RPS_SIG 905 vps->setMaxOneActiveRefLayerFlag(true); 906 #endif 804 907 #else 805 908 m_cTEncTop.init(); … … 812 915 813 916 /** 814 - create internal class815 - initialize internal variable816 - until the end of input YUV file, call encoding function in TEncTop class817 - delete allocated buffers818 - destroy internal class819 .820 */917 - create internal class 918 - initialize internal variable 919 - until the end of input YUV file, call encoding function in TEncTop class 920 - delete allocated buffers 921 - destroy internal class 922 . 923 */ 821 924 #if SVC_EXTENSION 822 925 Void TAppEncTop::encode() … … 855 958 856 959 #if AVC_SYNTAX 857 if( !m_BLSyntaxFile ) 858 { 859 printf( "Wrong base layer syntax input file\n" ); 860 exit(EXIT_FAILURE); 861 } 862 fstream streamSyntaxFile( m_BLSyntaxFile, fstream::in | fstream::binary ); 863 if( !streamSyntaxFile.good() ) 864 { 865 printf( "Base layer syntax input reading error\n" ); 866 exit(EXIT_FAILURE); 867 } 868 m_acTEncTop[0].setBLSyntaxFile( &streamSyntaxFile ); 960 fstream streamSyntaxFile; 961 if( m_acTEncTop[0].getVPS()->getAvcBaseLayerFlag() ) 962 { 963 if( !m_BLSyntaxFile ) 964 { 965 printf( "Wrong base layer syntax input file\n" ); 966 exit(EXIT_FAILURE); 967 } 968 streamSyntaxFile.open( m_BLSyntaxFile, fstream::in | fstream::binary ); 969 if( !streamSyntaxFile.good() ) 970 { 971 printf( "Base layer syntax input reading error\n" ); 972 exit(EXIT_FAILURE); 973 } 974 m_acTEncTop[0].setBLSyntaxFile( &streamSyntaxFile ); 975 } 869 976 #endif 870 977 … … 1102 1209 1103 1210 /** 1104 - application has picture buffer list with size of GOP1105 - picture buffer list acts as ring buffer1106 - end of the list has the latest picture1107 .1108 */1211 - application has picture buffer list with size of GOP 1212 - picture buffer list acts as ring buffer 1213 - end of the list has the latest picture 1214 . 1215 */ 1109 1216 #if SVC_EXTENSION 1110 1217 Void TAppEncTop::xGetBuffer( TComPicYuv*& rpcPicYuvRec, UInt layer) … … 1222 1329 1223 1330 /** \param iNumEncoded number of encoded frames 1224 */1331 */ 1225 1332 Void TAppEncTop::xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits) 1226 1333 { … … 1240 1347 if (m_pchReconFile) 1241 1348 { 1349 #if SYNTAX_OUTPUT && ILP_DECODED_PICTURE 1350 m_cTVideoIOYuvReconFile.write( pcPicYuvRec ); 1351 #else 1242 1352 m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom ); 1353 #endif 1243 1354 } 1244 1355 … … 1251 1362 1252 1363 /** 1253 *1254 */1364 * 1365 */ 1255 1366 void TAppEncTop::rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& annexBsizes) 1256 1367 { … … 1264 1375 case NAL_UNIT_CODED_SLICE_TRAIL_R: 1265 1376 case NAL_UNIT_CODED_SLICE_TRAIL_N: 1266 case NAL_UNIT_CODED_SLICE_TLA :1377 case NAL_UNIT_CODED_SLICE_TLA_R: 1267 1378 case NAL_UNIT_CODED_SLICE_TSA_N: 1268 1379 case NAL_UNIT_CODED_SLICE_STSA_R: 1269 1380 case NAL_UNIT_CODED_SLICE_STSA_N: 1270 case NAL_UNIT_CODED_SLICE_BLA :1271 case NAL_UNIT_CODED_SLICE_BLA NT:1381 case NAL_UNIT_CODED_SLICE_BLA_W_LP: 1382 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: 1272 1383 case NAL_UNIT_CODED_SLICE_BLA_N_LP: 1273 case NAL_UNIT_CODED_SLICE_IDR :1384 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: 1274 1385 case NAL_UNIT_CODED_SLICE_IDR_N_LP: 1275 1386 case NAL_UNIT_CODED_SLICE_CRA: 1276 1387 case NAL_UNIT_CODED_SLICE_RADL_N: 1277 case NAL_UNIT_CODED_SLICE_ DLP:1388 case NAL_UNIT_CODED_SLICE_RADL_R: 1278 1389 case NAL_UNIT_CODED_SLICE_RASL_N: 1279 case NAL_UNIT_CODED_SLICE_ TFD:1390 case NAL_UNIT_CODED_SLICE_RASL_R: 1280 1391 case NAL_UNIT_VPS: 1281 1392 case NAL_UNIT_SPS:
Note: See TracChangeset for help on using the changeset viewer.