HEVC Test Model (HM)  HM-16.3
Public Member Functions | Private Attributes | List of all members
TAppEncTop Class Reference

encoder application class More...

#include <TAppEncTop.h>

Inheritance diagram for TAppEncTop:
Inheritance graph
[legend]
Collaboration diagram for TAppEncTop:
Collaboration graph
[legend]

Public Member Functions

TEncTopgetTEncTop ()
 return encoder class pointer reference More...
 
- Public Member Functions inherited from TAppEncCfg
 TAppEncCfg ()
 
virtual ~TAppEncCfg ()
 
Void create ()
 create option handling class More...
 
Void destroy ()
 destroy option handling class More...
 
Bool parseCfg (Int argc, Char *argv[])
 parse configuration file to fill member variables More...
 

Private Attributes

TEncTop m_cTEncTop
 encoder class More...
 
TVideoIOYuv m_cTVideoIOYuvInputFile
 input YUV file More...
 
TVideoIOYuv m_cTVideoIOYuvReconFile
 output reconstruction file More...
 
TComList< TComPicYuv * > m_cListPicYuvRec
 list of reconstruction YUV files More...
 
Int m_iFrameRcvd
 number of received frames More...
 
UInt m_essentialBytes
 
UInt m_totalBytes
 
Void xCreateLib ()
 create files & encoder class More...
 
Void xInitLibCfg ()
 initialize internal variables More...
 
Void xInitLib (Bool isFieldCoding)
 initialize encoder class More...
 
Void xDestroyLib ()
 destroy encoder class More...
 
Void xGetBuffer (TComPicYuv *&rpcPicYuvRec)
 obtain required buffers More...
 
Void xDeleteBuffer ()
 delete allocated buffers More...
 
Void xWriteOutput (std::ostream &bitstreamFile, Int iNumEncoded, const std::list< AccessUnit > &accessUnits)
 write bitstream to file More...
 
Void rateStatsAccum (const AccessUnit &au, const std::vector< UInt > &stats)
 
Void printRateSummary ()
 
Void printChromaFormat ()
 
 TAppEncTop ()
 
virtual ~TAppEncTop ()
 
Void encode ()
 main encoding function More...
 

Additional Inherited Members

- Protected Member Functions inherited from TAppEncCfg
Void xPrintUsage ()
 print usage More...
 
Void xSetGlobal ()
 set global variables More...
 
Void xCheckParameter ()
 check validity of configuration values More...
 
Void xPrintParameter ()
 print configuration values More...
 
- Protected Attributes inherited from TAppEncCfg
Charm_pchInputFile
 source file name More...
 
Charm_pchBitstreamFile
 output bitstream file More...
 
Charm_pchReconFile
 output reconstruction file More...
 
Double m_adLambdaModifier [7]
 Lambda modifier array for each temporal layer. More...
 
Int m_iFrameRate
 source frame-rates (Hz) More...
 
UInt m_FrameSkip
 number of skipped frames from the beginning More...
 
Int m_iSourceWidth
 source width in pixel More...
 
Int m_iSourceHeight
 source height in pixel (when interlaced = field height) More...
 
Int m_iSourceHeightOrg
 original source height in pixel (when interlaced = frame height) More...
 
Bool m_isField
 enable field coding More...
 
Bool m_isTopFieldFirst
 
Int m_conformanceWindowMode
 
Int m_confWinLeft
 
Int m_confWinRight
 
Int m_confWinTop
 
Int m_confWinBottom
 
Int m_framesToBeEncoded
 number of encoded frames More...
 
Int m_aiPad [2]
 number of padded pixels for width and height More...
 
InputColourSpaceConversion m_inputColourSpaceConvert
 colour space conversion to apply to input video More...
 
Bool m_snrInternalColourSpace
 if true, then no colour space conversion is applied for snr calculation, otherwise inverse of input is applied. More...
 
Bool m_outputInternalColourSpace
 if true, then no colour space conversion is applied for reconstructed video, otherwise inverse of input is applied. More...
 
ChromaFormat m_InputChromaFormatIDC
 
Bool m_printMSEBasedSequencePSNR
 
Bool m_printFrameMSE
 
Bool m_printSequenceMSE
 
Bool m_cabacZeroWordPaddingEnabled
 
Profile::Name m_profile
 
Level::Tier m_levelTier
 
Level::Name m_level
 
UInt m_bitDepthConstraint
 
ChromaFormat m_chromaFormatConstraint
 
Bool m_intraConstraintFlag
 
Bool m_lowerBitRateConstraintFlag
 
Bool m_progressiveSourceFlag
 
Bool m_interlacedSourceFlag
 
Bool m_nonPackedConstraintFlag
 
Bool m_frameOnlyConstraintFlag
 
Int m_iIntraPeriod
 period of I-slice (random access period) More...
 
Int m_iDecodingRefreshType
 random access type More...
 
Int m_iGOPSize
 GOP size of hierarchical structure. More...
 
Int m_extraRPSs
 extra RPSs added to handle CRA More...
 
GOPEntry m_GOPList [64]
 the coding structure entries from the config file More...
 
Int m_numReorderPics [7]
 total number of reorder pictures More...
 
Int m_maxDecPicBuffering [7]
 total number of pictures in the decoded picture buffer More...
 
Bool m_useCrossComponentPrediction
 flag enabling the use of cross-component prediction More...
 
Bool m_reconBasedCrossCPredictionEstimate
 causes the alpha calculation in encoder search to be based on the decoded residual rather than the pre-transform encoder-side residual More...
 
UInt m_saoOffsetBitShift [MAX_NUM_CHANNEL_TYPE]
 number of bits for the upward bit shift operation on the decoded SAO offsets More...
 
Bool m_useTransformSkip
 flag for enabling intra transform skipping More...
 
Bool m_useTransformSkipFast
 flag for enabling fast intra transform skipping More...
 
UInt m_transformSkipLog2MaxSize
 transform-skip maximum size (minimum of 2) More...
 
Bool m_useResidualRotation
 control flag for transform-skip/transquant-bypass residual rotation More...
 
Bool m_useSingleSignificanceMapContext
 control flag for transform-skip/transquant-bypass single significance map context More...
 
Bool m_useResidualDPCM [NUMBER_OF_RDPCM_SIGNALLING_MODES]
 control flags for residual DPCM More...
 
Bool m_enableAMP
 
Bool m_useGolombRiceParameterAdaptation
 control flag for Golomb-Rice parameter adaptation over each slice More...
 
Bool m_alignCABACBeforeBypass
 
Double m_fQP
 QP value of key-picture (floating point) More...
 
Int m_iQP
 QP value of key-picture (integer) More...
 
Charm_pchdQPFile
 QP offset for each slice (initialized from external file) More...
 
Intm_aidQP
 array of slice QP values More...
 
Int m_iMaxDeltaQP
 max. |delta QP| More...
 
UInt m_uiDeltaQpRD
 dQP range for multi-pass slice QP optimization More...
 
Int m_iMaxCuDQPDepth
 Max. depth for a minimum CuDQPSize (0:default) More...
 
Int m_maxCUChromaQpAdjustmentDepth
 
Int m_cbQpOffset
 Chroma Cb QP Offset (0:default) More...
 
Int m_crQpOffset
 Chroma Cr QP Offset (0:default) More...
 
Bool m_bUseAdaptQpSelect
 
TComSEIMasteringDisplay m_masteringDisplay
 
Bool m_bUseAdaptiveQP
 Flag for enabling QP adaptation based on a psycho-visual model. More...
 
Int m_iQPAdaptationRange
 dQP range by QP adaptation More...
 
Int m_maxTempLayer
 Max temporal layer. More...
 
UInt m_uiMaxCUWidth
 max. CU width in pixel More...
 
UInt m_uiMaxCUHeight
 max. CU height in pixel More...
 
UInt m_uiMaxCUDepth
 max. CU depth More...
 
UInt m_uiQuadtreeTULog2MaxSize
 
UInt m_uiQuadtreeTULog2MinSize
 
UInt m_uiQuadtreeTUMaxDepthInter
 
UInt m_uiQuadtreeTUMaxDepthIntra
 
Int m_inputBitDepth [MAX_NUM_CHANNEL_TYPE]
 bit-depth of input file More...
 
Int m_outputBitDepth [MAX_NUM_CHANNEL_TYPE]
 bit-depth of output file More...
 
Int m_MSBExtendedBitDepth [MAX_NUM_CHANNEL_TYPE]
 bit-depth of input samples after MSB extension More...
 
Int m_internalBitDepth [MAX_NUM_CHANNEL_TYPE]
 bit-depth codec operates at (input/output files will be converted) More...
 
Bool m_useExtendedPrecision
 
Bool m_useHighPrecisionPredictionWeighting
 
ChromaFormat m_chromaFormatIDC
 
Bool m_bPCMInputBitDepthFlag
 0: PCM bit-depth is internal bit-depth. 1: PCM bit-depth is input bit-depth. More...
 
Bool m_bUseSAO
 
Int m_maxNumOffsetsPerPic
 SAO maximun number of offset per picture. More...
 
Bool m_saoCtuBoundary
 SAO parameter estimation using non-deblocked pixels for CTU bottom and right boundary areas. More...
 
Bool m_bLoopFilterDisable
 flag for using deblocking filter More...
 
Bool m_loopFilterOffsetInPPS
 offset for deblocking filter in 0 = slice header, 1 = PPS More...
 
Int m_loopFilterBetaOffsetDiv2
 beta offset for deblocking filter More...
 
Int m_loopFilterTcOffsetDiv2
 tc offset for deblocking filter More...
 
Bool m_DeblockingFilterControlPresent
 deblocking filter control present flag in PPS More...
 
Bool m_DeblockingFilterMetric
 blockiness metric in encoder More...
 
Bool m_usePCM
 flag for using IPCM More...
 
UInt m_pcmLog2MaxSize
 log2 of maximum PCM block size More...
 
UInt m_uiPCMLog2MinSize
 log2 of minimum PCM block size More...
 
Bool m_bPCMFilterDisableFlag
 PCM filter disable flag. More...
 
Bool m_enableIntraReferenceSmoothing
 flag for enabling(default)/disabling intra reference smoothing/filtering More...
 
Bool m_bUseASR
 flag for using adaptive motion search range More...
 
Bool m_bUseHADME
 flag for using HAD in sub-pel ME More...
 
Bool m_useRDOQ
 flag for using RD optimized quantization More...
 
Bool m_useRDOQTS
 flag for using RD optimized quantization for transform skip More...
 
Int m_rdPenalty
 RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty) More...
 
Int m_iFastSearch
 ME mode, 0 = full, 1 = diamond, 2 = PMVFAST. More...
 
Int m_iSearchRange
 ME search range. More...
 
Int m_bipredSearchRange
 ME search range for bipred refinement. More...
 
Bool m_bUseFastEnc
 flag for using fast encoder setting More...
 
Bool m_bUseEarlyCU
 flag for using Early CU setting More...
 
Bool m_useFastDecisionForMerge
 flag for using Fast Decision Merge RD-Cost More...
 
Bool m_bUseCbfFastMode
 flag for using Cbf Fast PU Mode Decision More...
 
Bool m_useEarlySkipDetection
 flag for using Early SKIP Detection More...
 
Int m_sliceMode
 
Int m_sliceArgument
 argument according to selected slice mode More...
 
Int m_sliceSegmentMode
 
Int m_sliceSegmentArgument
 argument according to selected slice segment mode More...
 
Bool m_bLFCrossSliceBoundaryFlag
 1: filter across slice boundaries 0: do not filter across slice boundaries More...
 
Bool m_bLFCrossTileBoundaryFlag
 1: filter across tile boundaries 0: do not filter across tile boundaries More...
 
Bool m_tileUniformSpacingFlag
 
Int m_numTileColumnsMinus1
 
Int m_numTileRowsMinus1
 
std::vector< Intm_tileColumnWidth
 
std::vector< Intm_tileRowHeight
 
Int m_iWaveFrontSynchro
 
Int m_iWaveFrontFlush
 
Bool m_bUseConstrainedIntraPred
 flag for using constrained intra prediction More...
 
Int m_decodedPictureHashSEIEnabled
 Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message. More...
 
Int m_recoveryPointSEIEnabled
 
Int m_bufferingPeriodSEIEnabled
 
Int m_pictureTimingSEIEnabled
 
Bool m_toneMappingInfoSEIEnabled
 
Bool m_chromaSamplingFilterSEIenabled
 
Int m_chromaSamplingHorFilterIdc
 
Int m_chromaSamplingVerFilterIdc
 
Int m_toneMapId
 
Bool m_toneMapCancelFlag
 
Bool m_toneMapPersistenceFlag
 
Int m_toneMapCodedDataBitDepth
 
Int m_toneMapTargetBitDepth
 
Int m_toneMapModelId
 
Int m_toneMapMinValue
 
Int m_toneMapMaxValue
 
Int m_sigmoidMidpoint
 
Int m_sigmoidWidth
 
Int m_numPivots
 
Int m_cameraIsoSpeedIdc
 
Int m_cameraIsoSpeedValue
 
Int m_exposureIndexIdc
 
Int m_exposureIndexValue
 
Bool m_exposureCompensationValueSignFlag
 
Int m_exposureCompensationValueNumerator
 
Int m_exposureCompensationValueDenomIdc
 
Int m_refScreenLuminanceWhite
 
Int m_extendedRangeWhiteLevel
 
Int m_nominalBlackLevelLumaCodeValue
 
Int m_nominalWhiteLevelLumaCodeValue
 
Int m_extendedWhiteLevelLumaCodeValue
 
Intm_startOfCodedInterval
 
Intm_codedPivotValue
 
Intm_targetPivotValue
 
Int m_framePackingSEIEnabled
 
Int m_framePackingSEIType
 
Int m_framePackingSEIId
 
Int m_framePackingSEIQuincunx
 
Int m_framePackingSEIInterpretation
 
Int m_segmentedRectFramePackingSEIEnabled
 
Bool m_segmentedRectFramePackingSEICancel
 
Int m_segmentedRectFramePackingSEIType
 
Bool m_segmentedRectFramePackingSEIPersistence
 
Int m_displayOrientationSEIAngle
 
Int m_temporalLevel0IndexSEIEnabled
 
Int m_gradualDecodingRefreshInfoEnabled
 
Int m_noDisplaySEITLayer
 
Int m_decodingUnitInfoSEIEnabled
 
Int m_SOPDescriptionSEIEnabled
 
Int m_scalableNestingSEIEnabled
 
Bool m_tmctsSEIEnabled
 
Bool m_timeCodeSEIEnabled
 
Int m_timeCodeSEINumTs
 
TComSEITimeSet m_timeSetArray [3]
 
Bool m_kneeSEIEnabled
 
Int m_kneeSEIId
 
Bool m_kneeSEICancelFlag
 
Bool m_kneeSEIPersistenceFlag
 
Int m_kneeSEIInputDrange
 
Int m_kneeSEIInputDispLuminance
 
Int m_kneeSEIOutputDrange
 
Int m_kneeSEIOutputDispLuminance
 
Int m_kneeSEINumKneePointsMinus1
 
Intm_kneeSEIInputKneePoint
 
Intm_kneeSEIOutputKneePoint
 
Bool m_useWeightedPred
 Use of weighted prediction in P slices. More...
 
Bool m_useWeightedBiPred
 Use of bi-directional weighted prediction in B slices. More...
 
UInt m_log2ParallelMergeLevel
 Parallel merge estimation region. More...
 
UInt m_maxNumMergeCand
 Max number of merge candidates. More...
 
Int m_TMVPModeId
 
Bool m_signHideFlag
 
Bool m_RCEnableRateControl
 enable rate control or not More...
 
Int m_RCTargetBitrate
 target bitrate when rate control is enabled More...
 
Int m_RCKeepHierarchicalBit
 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation More...
 
Bool m_RCLCULevelRC
 true: LCU level rate control; false: picture level rate control NOTE: code-tidy - rename to m_RCCtuLevelRC More...
 
Bool m_RCUseLCUSeparateModel
 use separate R-lambda model at LCU level NOTE: code-tidy - rename to m_RCUseCtuSeparateModel More...
 
Int m_RCInitialQP
 inital QP for rate control More...
 
Bool m_RCForceIntraQP
 force all intra picture to use initial QP or not More...
 
ScalingListMode m_useScalingListId
 using quantization matrix More...
 
Charm_scalingListFile
 quantization matrix file name More...
 
Bool m_TransquantBypassEnableFlag
 transquant_bypass_enable_flag setting in PPS. More...
 
Bool m_CUTransquantBypassFlagForce
 if transquant_bypass_enable_flag, then, if true, all CU transquant bypass flags will be set to true. More...
 
CostMode m_costMode
 Cost mode to use. More...
 
Bool m_recalculateQPAccordingToLambda
 recalculate QP value according to the lambda value More...
 
Bool m_useStrongIntraSmoothing
 enable strong intra smoothing for 32x32 blocks where the reference samples are flat More...
 
Int m_activeParameterSetsSEIEnabled
 
Bool m_vuiParametersPresentFlag
 enable generation of VUI parameters More...
 
Bool m_aspectRatioInfoPresentFlag
 Signals whether aspect_ratio_idc is present. More...
 
Int m_aspectRatioIdc
 aspect_ratio_idc More...
 
Int m_sarWidth
 horizontal size of the sample aspect ratio More...
 
Int m_sarHeight
 vertical size of the sample aspect ratio More...
 
Bool m_overscanInfoPresentFlag
 Signals whether overscan_appropriate_flag is present. More...
 
Bool m_overscanAppropriateFlag
 Indicates whether conformant decoded pictures are suitable for display using overscan. More...
 
Bool m_videoSignalTypePresentFlag
 Signals whether video_format, video_full_range_flag, and colour_description_present_flag are present. More...
 
Int m_videoFormat
 Indicates representation of pictures. More...
 
Bool m_videoFullRangeFlag
 Indicates the black level and range of luma and chroma signals. More...
 
Bool m_colourDescriptionPresentFlag
 Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present. More...
 
Int m_colourPrimaries
 Indicates chromaticity coordinates of the source primaries. More...
 
Int m_transferCharacteristics
 Indicates the opto-electronic transfer characteristics of the source. More...
 
Int m_matrixCoefficients
 Describes the matrix coefficients used in deriving luma and chroma from RGB primaries. More...
 
Bool m_chromaLocInfoPresentFlag
 Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present. More...
 
Int m_chromaSampleLocTypeTopField
 Specifies the location of chroma samples for top field. More...
 
Int m_chromaSampleLocTypeBottomField
 Specifies the location of chroma samples for bottom field. More...
 
Bool m_neutralChromaIndicationFlag
 Indicates that the value of all decoded chroma samples is equal to 1<<(BitDepthCr-1) More...
 
Bool m_defaultDisplayWindowFlag
 Indicates the presence of the default window parameters. More...
 
Int m_defDispWinLeftOffset
 Specifies the left offset from the conformance window of the default window. More...
 
Int m_defDispWinRightOffset
 Specifies the right offset from the conformance window of the default window. More...
 
Int m_defDispWinTopOffset
 Specifies the top offset from the conformance window of the default window. More...
 
Int m_defDispWinBottomOffset
 Specifies the bottom offset from the conformance window of the default window. More...
 
Bool m_frameFieldInfoPresentFlag
 Indicates that pic_struct values are present in picture timing SEI messages. More...
 
Bool m_pocProportionalToTimingFlag
 Indicates that the POC value is proportional to the output time w.r.t. first picture in CVS. More...
 
Int m_numTicksPocDiffOneMinus1
 Number of ticks minus 1 that for a POC difference of one. More...
 
Bool m_bitstreamRestrictionFlag
 Signals whether bitstream restriction parameters are present. More...
 
Bool m_tilesFixedStructureFlag
 Indicates that each active picture parameter set has the same values of the syntax elements related to tiles. More...
 
Bool m_motionVectorsOverPicBoundariesFlag
 Indicates that no samples outside the picture boundaries are used for inter prediction. More...
 
Int m_minSpatialSegmentationIdc
 Indicates the maximum size of the spatial segments in the pictures in the coded video sequence. More...
 
Int m_maxBytesPerPicDenom
 Indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units associated with any coded picture. More...
 
Int m_maxBitsPerMinCuDenom
 Indicates an upper bound for the number of bits of coding_unit() data. More...
 
Int m_log2MaxMvLengthHorizontal
 Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units. More...
 
Int m_log2MaxMvLengthVertical
 Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units. More...
 

Detailed Description

encoder application class

Definition at line 57 of file TAppEncTop.h.

Constructor & Destructor Documentation

TAppEncTop::~TAppEncTop ( )
virtual

Definition at line 65 of file TAppEncTop.cpp.

Member Function Documentation

Void TAppEncTop::encode ( )

main encoding function

  • create internal class
  • initialize internal variable
  • until the end of input YUV file, call encoding function in TEncTop class
  • delete allocated buffers
  • destroy internal class

< list of access units to write out. is populated by the encoding process

Definition at line 406 of file TAppEncTop.cpp.

TEncTop& TAppEncTop::getTEncTop ( )
inline

return encoder class pointer reference

Definition at line 96 of file TAppEncTop.h.

Void TAppEncTop::printChromaFormat ( )
protected

Definition at line 672 of file TAppEncTop.cpp.

Void TAppEncTop::printRateSummary ( )
protected

Definition at line 663 of file TAppEncTop.cpp.

Void TAppEncTop::rateStatsAccum ( const AccessUnit au,
const std::vector< UInt > &  stats 
)
protected

Definition at line 625 of file TAppEncTop.cpp.

Void TAppEncTop::xCreateLib ( )
protected

create files & encoder class

Definition at line 364 of file TAppEncTop.cpp.

Void TAppEncTop::xDeleteBuffer ( )
protected

delete allocated buffers

Definition at line 539 of file TAppEncTop.cpp.

Void TAppEncTop::xDestroyLib ( )
protected

destroy encoder class

Definition at line 379 of file TAppEncTop.cpp.

Void TAppEncTop::xGetBuffer ( TComPicYuv *&  rpcPicYuvRec)
protected

obtain required buffers

  • application has picture buffer list with size of GOP
  • picture buffer list acts as ring buffer
  • end of the list has the latest picture

Definition at line 519 of file TAppEncTop.cpp.

Void TAppEncTop::xInitLib ( Bool  isFieldCoding)
protected

initialize encoder class

Definition at line 389 of file TAppEncTop.cpp.

Void TAppEncTop::xInitLibCfg ( )
protected

initialize internal variables

Definition at line 69 of file TAppEncTop.cpp.

Void TAppEncTop::xWriteOutput ( std::ostream &  bitstreamFile,
Int  iNumEncoded,
const std::list< AccessUnit > &  accessUnits 
)
protected

write bitstream to file

Write access units to output file.

Parameters
bitstreamFiletarget bitstream file
iNumEncodednumber of encoded frames
accessUnitslist of access units to be written

Definition at line 560 of file TAppEncTop.cpp.

Member Data Documentation

TComList<TComPicYuv*> TAppEncTop::m_cListPicYuvRec
private

list of reconstruction YUV files

Definition at line 65 of file TAppEncTop.h.

TEncTop TAppEncTop::m_cTEncTop
private

encoder class

Definition at line 61 of file TAppEncTop.h.

TVideoIOYuv TAppEncTop::m_cTVideoIOYuvInputFile
private

input YUV file

Definition at line 62 of file TAppEncTop.h.

TVideoIOYuv TAppEncTop::m_cTVideoIOYuvReconFile
private

output reconstruction file

Definition at line 63 of file TAppEncTop.h.

UInt TAppEncTop::m_essentialBytes
private

Definition at line 69 of file TAppEncTop.h.

Int TAppEncTop::m_iFrameRcvd
private

number of received frames

Definition at line 67 of file TAppEncTop.h.

UInt TAppEncTop::m_totalBytes
private

Definition at line 70 of file TAppEncTop.h.


The documentation for this class was generated from the following files: