做实验、发paper利器
原文链接:https://blog.csdn.net/mengzi_1108140323/article/details/78433811
1、MacOS下使用
第一步当然是直接点开参考代码目录下的HM.xcodeproj
第二步准备下编码序列。哎呀每个yuv文件都好大
配置总体来说,一方面是在工程里指定configure文件的路径,另一方面是修改需要修改的编码配置。
configure文件的路径在“/Users/mengwang/Downloads/HM-16.0/cfg”
configure文件夹下的那些配置文件,代表着编码模式 AI(全I帧)RA(random access)LD(low delay)
输出文件、QP、GOP大小、是否开码控等等一切可以想到的编码参数,都可以在这些配置文件里找到,并且手动修改。
因此,如果想用AI 的编码模式编BQSquare序列,则需要在工程里添加如下的编码参数:
然后基本的配完了就可以开心的跑跑跑了。
2、Linux下使用
找到带makefile的那个文件夹,“/Users/mengwang/Downloads/HM-16.0/build/linux/makefile”,在terminal里make一下。
make的时候报error了,但是暴力的注释掉报错的两行代码(.h里关于图像的不知道具体干嘛但是没有被用到),问题可以解决。唉~
这个/Users/mengwang/Downloads/HM-16.0/bin/TAppEncoderStatic,就是可执行文件了,据说生成的另外一个叫TAppEncoderStaticd是debug模式的。我不管。
在terminal里执行一下:
MengdeMacBook-Pro:bin mengwang$ ./TAppEncoderStatic –help
会输出:
HM software: Encoder Version [16.0] (including RExt)[Mac OS X][GCC 4.2.1][64 bit]
--help this help text
-c configuration file name
-i, --InputFile Original YUV input file name
-b, --BitstreamFile Bitstream output file name
-o, --ReconFile Reconstructed YUV output file name
-wdt, --SourceWidth Source picture width
-hgt, --SourceHeight Source picture height
--InputBitDepth Bit-depth of input file
--OutputBitDepth Bit-depth of output file
(default:InternalBitDepth)
--MSBExtendedBitDepth bit depth of luma component after addition of
MSBs of value 0 (used for synthesising High
Dynamic Range source material).
(default:InputBitDepth)
--InternalBitDepth Bit-depth the codec operates at.
(default:MSBExtendedBitDepth). If different to
MSBExtendedBitDepth, source data will be
converted
--InputBitDepthC As per InputBitDepth but for chroma component.
(default:InputBitDepth)
--OutputBitDepthC As per OutputBitDepth but for chroma component.
(default:InternalBitDepthC)
--MSBExtendedBitDepthC As per MSBExtendedBitDepth but for chroma
component. (default:MSBExtendedBitDepth)
--InternalBitDepthC As per InternalBitDepth but for chroma
component. (default:InternalBitDepth)
--ExtendedPrecision Increased internal accuracies to support high
bit depths (not valid in V1 profiles)
--HighPrecisionPredictionWeighting
Use high precision option for weighted
prediction (not valid in V1 profiles)
--InputColourSpaceConvertColour space conversion to apply to input
video. Permitted values are (empty
string=UNCHANGED) UNCHANGED, YCbCrtoYCrCb,
YCbCrtoYYY or RGBtoGBR
--SNRInternalColourSpace If true, then no colour space conversion is
applied prior to SNR, otherwise inverse of
input is applied.
--OutputInternalColourSpace
If true, then no colour space conversion is
applied for reconstructed video, otherwise
inverse of input is applied.
--InputChromaFormat InputChromaFormatIDC
--MSEBasedSequencePSNR 0 (default) emit sequence PSNR only as a linear
average of the frame PSNRs, 1 = also emit a
sequence PSNR based on an average of the frame
MSEs
--PrintFrameMSE 0 (default) emit only bit count and PSNRs for
each frame, 1 = also emit MSE values
--PrintSequenceMSE 0 (default) emit only bit rate and PSNRs for
the whole sequence, 1 = also emit MSE values
-cf, --ChromaFormatIDC ChromaFormatIDC (400|420|422|444 or set 0
(default) for same as InputChromaFormat)
--ConformanceMode Deprecated alias of ConformanceWindowMode
--ConformanceWindowMode Window conformance mode (0: no window,
1:automatic padding, 2:padding, 3:conformance
-pdx, --HorizontalPadding Horizontal source padding for conformance
window mode 2
-pdy, --VerticalPadding Vertical source padding for conformance window
mode 2
--ConfLeft Deprecated alias of ConfWinLeft
--ConfRight Deprecated alias of ConfWinRight
--ConfTop Deprecated alias of ConfWinTop
--ConfBottom Deprecated alias of ConfWinBottom
--ConfWinLeft Left offset for window conformance mode 3
--ConfWinRight Right offset for window conformance mode 3
--ConfWinTop Top offset for window conformance mode 3
--ConfWinBottom Bottom offset for window conformance mode 3
-fr, --FrameRate Frame rate
-fs, --FrameSkip Number of frames to skip at start of input YUV
-f, --FramesToBeEncoded Number of frames to be encoded (default=all)
--FieldCoding Signals if it's a field based coding
--TopFieldFirst In case of field based coding, signals whether
if it's a top field first or not
--Profile Profile name to use for encoding. Use main (for
main), main10 (for main10), main-still-picture,
main-RExt (for Range Extensions profile), any
of the RExt specific profile names, or none
--Level Level limit to be used, eg 5.1, or none
--Tier Tier to use for interpretation of --Level (main
or high only)
--MaxBitDepthConstraint Bit depth to use for profile-constraint for
RExt profiles. 0=automatically choose based
upon other parameters
--MaxChromaFormatConstraint
Chroma-format to use for the profile-constraint
for RExt profiles. 0=automatically choose based
upon other parameters
--IntraConstraintFlag Value of general_intra_constraint_flag to use
for RExt profiles (not used if an explicit RExt
sub-profile is specified)
--LowerBitRateConstraintFlag
Value of general_lower_bit_rate_constraint_flag
to use for RExt profiles
--ProgressiveSource Indicate that source is progressive
--InterlacedSource Indicate that source is interlaced
--NonPackedSource Indicate that source does not contain frame
packing
--FrameOnly Indicate that the bitstream contains only
frames
--MaxCUWidth
--MaxCUHeight
-s, --MaxCUSize Maximum CU size
-s, --MaxCUSize Maximum CU size
-h, --MaxPartitionDepth CU depth
--QuadtreeTULog2MaxSize Maximum TU size in logarithm base 2
--QuadtreeTULog2MinSize Minimum TU size in logarithm base 2
--QuadtreeTUMaxDepthIntraDepth of TU tree for intra CUs
--QuadtreeTUMaxDepthInterDepth of TU tree for inter CUs
-ip, --IntraPeriod Intra period in frames, (-1: only first frame)
-dr, --DecodingRefreshType Intra refresh type (0:none 1:CRA 2:IDR
3:RecPointSEI)
-g, --GOPSize GOP size of temporal structure
--FastSearch 0:Full search 1:Diamond 2:PMVFAST
-sr, --SearchRange Motion search range
--BipredSearchRange Motion search range for bipred refinement
--HadamardME Hadamard ME for fractional-pel
--ASR Adaptive motion search range
-LM0, --LambdaModifier0 Lambda modifier for temporal layer 0
-LM1, --LambdaModifier1 Lambda modifier for temporal layer 1
-LM2, --LambdaModifier2 Lambda modifier for temporal layer 2
-LM3, --LambdaModifier3 Lambda modifier for temporal layer 3
-LM4, --LambdaModifier4 Lambda modifier for temporal layer 4
-LM5, --LambdaModifier5 Lambda modifier for temporal layer 5
-LM6, --LambdaModifier6 Lambda modifier for temporal layer 6
-q, --QP Qp value, if value is float, QP is switched
once during encoding
-dqr, --DeltaQpRD max dQp offset for slice
-d, --MaxDeltaQP max dQp offset for block
-dqd, --MaxCuDQPDepth max depth for a minimum CuDQP
--MaxCUChromaQpAdjustmentDepth
Maximum depth for CU chroma Qp adjustment - set
less than 0 to disable
-cbqpofs, --CbQpOffset Chroma Cb QP Offset
-crqpofs, --CrQpOffset Chroma Cr QP Offset
-aqps, --AdaptiveQpSelection AdaptiveQpSelection
-aq, --AdaptiveQP QP adaptation based on a psycho-visual model
-aqr, --MaxQPAdaptationRange QP adaptation range
-m, --dQPFile dQP file name
--RDOQ
--RDOQTS
--RDpenalty RD-penalty for 32x32 TU for intra in non-intra
slices. 0:disabled 1:RD-penalty 2:maximum
RD-penalty
--LoopFilterDisable
--LoopFilterOffsetInPPS
--LoopFilterBetaOffset_div2
--LoopFilterTcOffset_div2
--DeblockingFilterControlPresent
--DeblockingFilterMetric
--AMP Enable asymmetric motion partitions
--CrossComponentPrediction
Enable the use of cross-component prediction
(not valid in V1 profiles)
--ReconBasedCrossCPredictionEstimate
When determining the alpha value for
cross-component prediction, use the decoded
residual rather than the pre-transform
encoder-side residual
--SaoLumaOffsetBitShift Specify the luma SAO bit-shift. If negative,
automatically calculate a suitable value based
upon bit depth and initial QP
--SaoChromaOffsetBitShiftSpecify the chroma SAO bit-shift. If negative,
automatically calculate a suitable value based
upon bit depth and initial QP
--TransformSkip Intra transform skipping
--TransformSkipFast Fast intra transform skipping
--TransformSkipLog2MaxSize
Specify transform-skip maximum size. Minimum 2.
(not valid in V1 profiles)
--ImplicitResidualDPCM Enable implicitly signalled residual DPCM for
intra (also known as sample-adaptive intra
predict) (not valid in V1 profiles)
--ExplicitResidualDPCM Enable explicitly signalled residual DPCM for
inter (not valid in V1 profiles)
--ResidualRotation Enable rotation of transform-skipped and
transquant-bypassed TUs through 180 degrees
prior to entropy coding (not valid in V1
profiles)
--SingleSignificanceMapContext
Enable, for transform-skipped and
transquant-bypassed TUs, the selection of a
single significance map context variable for
all coefficients (not valid in V1 profiles)
--GolombRiceParameterAdaptation
Enable the adaptation of the Golomb-Rice
parameter over the course of each slice
--AlignCABACBeforeBypass Align the CABAC engine to a defined fraction of
a bit prior to coding bypass data. Must be 1 in
high bit rate profile, 0 otherwise
--SAO Enable Sample Adaptive Offset
--MaxNumOffsetsPerPic Max number of SAO offset per picture (Default:
2048)
--SAOLcuBoundary 0: right/bottom LCU boundary areas skipped from
SAO parameter estimation, 1: non-deblocked
pixels are used for those areas
--SliceMode 0: Disable all Recon slice limits, 1: Enforce
max # of LCUs, 2: Enforce max # of bytes,
3:specify tiles per dependent slice
--SliceArgument Depending on SliceMode being:
1: max number of
CTUs per slice
2: max number of bytes per
slice
3: max number of tiles per slice
--SliceSegmentMode 0: Disable all slice segment limits, 1: Enforce
max # of LCUs, 2: Enforce max # of bytes,
3:specify tiles per dependent slice
--SliceSegmentArgument Depending on SliceSegmentMode being:
1: max
number of CTUs per slice segment
2: max number
of bytes per slice segment
3: max number of
tiles per slice segment
--LFCrossSliceBoundaryFlag
--ConstrainedIntraPred Constrained Intra Prediction
--PCMEnabledFlag
--PCMLog2MaxSize
--PCMLog2MinSize
--PCMInputBitDepthFlag
--PCMFilterDisableFlag
--IntraReferenceSmoothing0: Disable use of intra reference smoothing. 1:
Enable use of intra reference smoothing (not
valid in V1 profiles)
-wpP, --WeightedPredP Use weighted prediction in P slices
-wpB, --WeightedPredB Use weighted (bidirectional) prediction in B
slices
--Log2ParallelMergeLevel Parallel merge estimation region
--UniformSpacingIdc deprecated alias of TileUniformSpacing
--ColumnWidthArray deprecated alias of TileColumnWidthArray
--RowHeightArray deprecated alias of TileRowHeightArray
--TileUniformSpacing Indicates that tile columns and rows are
distributed uniformly
--NumTileColumnsMinus1 Number of tile columns in a picture minus 1
--NumTileRowsMinus1 Number of rows in a picture minus 1
--TileColumnWidthArray Array containing tile column width values in
units of LCU
--TileRowHeightArray Array containing tile row height values in
units of LCU
--LFCrossTileBoundaryFlag1: cross-tile-boundary loop filtering.
0:non-cross-tile-boundary loop filtering
--WaveFrontSynchro 0: no synchro; 1 synchro with TR; 2 TRR etc
--ScalingList 0: no scaling list, 1: default scaling lists,
2: scaling lists specified in ScalingListFile
--ScalingListFile Scaling list file name
-SBH, --SignHideFlag
--MaxNumMergeCand Maximum number of merge candidates
--SEIDecodedPictureHash Control generation of decode picture hash SEI messages
3: checksum
2: CRC
1: use MD5
0: disable
--SEIpictureDigest deprecated alias for SEIDecodedPictureHash
--TMVPMode TMVP mode 0: TMVP disable for all slices. 1:
TMVP enable for all slices (default) 2: TMVP
enable for certain slices only
--FEN fast encoder setting
--ECU Early CU setting
--FDM Fast decision for Merge RD Cost
--CFM Cbf fast mode setting
--ESD Early SKIP detection setting
--RateControl Rate control: enable rate control
--TargetBitrate Rate control: target bit-rate
--KeepHierarchicalBit Rate control: 0: equal bit allocation; 1: fixed
ratio bit allocation; 2: adaptive ratio bit
allocation
--LCULevelRateControl Rate control: true: LCU level RC; false:
picture level RC
--RCLCUSeparateModel Rate control: use LCU level separate R-lambda
model
--InitialQP Rate control: initial QP
--RCForceIntraQP Rate control: force intra QP to be equal to
initial QP
--TransquantBypassEnableFlag
transquant_bypass_enable_flag indicator in PPS
--CUTransquantBypassFlagForce
Force transquant bypass mode, when
transquant_bypass_enable_flag is enabled
--CostMode Use alternative cost functions: choose between
'lossy', 'sequence_level_lossless', 'lossless'
(which forces QP to 0) and
'mixed_lossless_lossy' (which used QP'=4 for
pre-estimates of transquant-bypass blocks).
--RecalculateQPAccordingToLambda
Recalculate QP values according to lambda
values. Do not suggest to be enabled in all
intra case
-sis, --StrongIntraSmoothing Enable strong intra smoothing for 32x32 blocks
--SEIActiveParameterSets Enable generation of active parameter sets SEI
messages
-vui, --VuiParametersPresent Enable generation of vui_parameters()
--AspectRatioInfoPresent Signals whether aspect_ratio_idc is present
--AspectRatioIdc aspect_ratio_idc
--SarWidth horizontal size of the sample aspect ratio
--SarHeight vertical size of the sample aspect ratio
--OverscanInfoPresent Indicates whether conformant decoded pictures are suitable for display using overscan
--OverscanAppropriate Indicates whether conformant decoded pictures are suitable for display using overscan
--VideoSignalTypePresent Signals whether video_format,
video_full_range_flag, and
colour_description_present_flag are present
--VideoFormat Indicates representation of pictures
--VideoFullRange Indicates the black level and range of luma and
chroma signals
--ColourDescriptionPresent
Signals whether colour_primaries,
transfer_characteristics and
matrix_coefficients are present
--ColourPrimaries Indicates chromaticity coordinates of the
source primaries
--TransferCharacteristicsIndicates the opto-electronic transfer
characteristics of the source
--MatrixCoefficients Describes the matrix coefficients used in
deriving luma and chroma from RGB primaries
--ChromaLocInfoPresent Signals whether
chroma_sample_loc_type_top_field and
chroma_sample_loc_type_bottom_field are
present
--ChromaSampleLocTypeTopField
Specifies the location of chroma samples for
top field
--ChromaSampleLocTypeBottomField
Specifies the location of chroma samples for
bottom field
--NeutralChromaIndicationIndicates that the value of all decoded chroma
samples is equal to 1<<(BitDepthCr-1)
--DefaultDisplayWindowFlag
Indicates the presence of the Default Window
parameters
--DefDispWinLeftOffset Specifies the left offset of the default
display window from the conformance window
--DefDispWinRightOffset Specifies the right offset of the default
display window from the conformance window
--DefDispWinTopOffset Specifies the top offset of the default display
window from the conformance window
--DefDispWinBottomOffset Specifies the bottom offset of the default
display window from the conformance window
--FrameFieldInfoPresentFlag
Indicates that pic_struct and field coding
related values are present in picture timing
SEI messages
--PocProportionalToTimingFlag
Indicates that the POC value is proportional to
the output time w.r.t. first picture in CVS
--NumTicksPocDiffOneMinus1
Number of ticks minus 1 that for a POC
difference of one
--BitstreamRestriction Signals whether bitstream restriction
parameters are present
--TilesFixedStructure Indicates that each active picture parameter
set has the same values of the syntax elements
related to tiles
--MotionVectorsOverPicBoundaries
Indicates that no samples outside the picture
boundaries are used for inter prediction
--MaxBytesPerPicDenom Indicates a number of bytes not exceeded by the
sum of the sizes of the VCL NAL units
associated with any coded picture
--MaxBitsPerMinCuDenom Indicates an upper bound for the number of bits
of coding_unit() data
--Log2MaxMvLengthHorizontal
Indicate the maximum absolute value of a
decoded horizontal MV component in quarter-pel
luma units
--Log2MaxMvLengthVerticalIndicate the maximum absolute value of a
decoded vertical MV component in quarter-pel
luma units
--SEIRecoveryPoint Control generation of recovery point SEI
messages
--SEIBufferingPeriod Control generation of buffering period SEI
messages
--SEIPictureTiming Control generation of picture timing SEI
messages
--SEIToneMappingInfo Control generation of Tone Mapping SEI
messages
--SEIToneMapId Specifies Id of Tone Mapping SEI message for a
given session
--SEIToneMapCancelFlag Indicates that Tone Mapping SEI message cancels
the persistence or follows
--SEIToneMapPersistenceFlag
Specifies the persistence of the Tone Mapping
SEI message
--SEIToneMapCodedDataBitDepth
Specifies Coded Data BitDepth of Tone Mapping
SEI messages
--SEIToneMapTargetBitDepth
Specifies Output BitDepth of Tone mapping
function
--SEIToneMapModelId Specifies Model utilized for mapping coded data into target_bit_depth range
0: linear mapping with clipping
1: sigmoidal mapping
2: user-defined table mapping
3: piece-wise linear mapping
4: luminance dynamic range information
--SEIToneMapMinValue Specifies the minimum value in mode 0
--SEIToneMapMaxValue Specifies the maximum value in mode 0
--SEIToneMapSigmoidMidpoint
Specifies the centre point in mode 1
--SEIToneMapSigmoidWidth Specifies the distance between 5% and 95%
values of the target_bit_depth in mode 1
--SEIToneMapStartOfCodedInterval
Array of user-defined mapping table
--SEIToneMapNumPivots Specifies the number of pivot points in mode 3
--SEIToneMapCodedPivotValue
Array of pivot point
--SEIToneMapTargetPivotValue
Array of pivot point
--SEIToneMapCameraIsoSpeedIdc
Indicates the camera ISO speed for daylight
illumination
--SEIToneMapCameraIsoSpeedValue
Specifies the camera ISO speed for daylight
illumination of Extended_ISO
--SEIToneMapExposureIndexIdc
Indicates the exposure index setting of the
camera
--SEIToneMapExposureIndexValue
Specifies the exposure index setting of the
camera of Extended_ISO
--SEIToneMapExposureCompensationValueSignFlag
Specifies the sign of
ExposureCompensationValue
--SEIToneMapExposureCompensationValueNumerator
Specifies the numerator of
ExposureCompensationValue
--SEIToneMapExposureCompensationValueDenomIdc
Specifies the denominator of
ExposureCompensationValue
--SEIToneMapRefScreenLuminanceWhite
Specifies reference screen brightness setting
in units of candela per square metre
--SEIToneMapExtendedRangeWhiteLevel
Indicates the luminance dynamic range
--SEIToneMapNominalBlackLevelLumaCodeValue
Specifies luma sample value of the nominal
black level assigned decoded pictures
--SEIToneMapNominalWhiteLevelLumaCodeValue
Specifies luma sample value of the nominal
white level assigned decoded pictures
--SEIToneMapExtendedWhiteLevelLumaCodeValue
Specifies luma sample value of the extended
dynamic range assigned decoded pictures
--SEIChromaSamplingFilterHint
Control generation of the chroma sampling
filter hint SEI message
--SEIChromaSamplingHorizontalFilterType
Defines the Index of the chroma sampling horizontal filter
0: unspecified - Chroma filter is unknown or
is determined by the application
1:
User-defined - Filter coefficients are
specified in the chroma sampling filter hint
SEI message
2: Standards-defined - ITU-T Rec.
T.800 | ISO/IEC15444-1, 5/3 filter
--SEIChromaSamplingVerticalFilterType
Defines the Index of the chroma sampling vertical filter
0: unspecified - Chroma filter is unknown or
is determined by the application
1:
User-defined - Filter coefficients are
specified in the chroma sampling filter hint
SEI message
2: Standards-defined - ITU-T Rec.
T.800 | ISO/IEC15444-1, 5/3 filter
--SEIFramePacking Control generation of frame packing SEI
messages
--SEIFramePackingType Define frame packing arrangement
0: checkerboard - pixels alternatively represent either frames
1: column alternation - frames are interlaced by column
2: row alternation - frames are interlaced by row
3: side by side - frames are displayed horizontally
4: top bottom - frames are displayed vertically
5: frame alternation - one frame is alternated
with the other
--SEIFramePackingId Id of frame packing SEI message for a given
session
--SEIFramePackingQuincunxIndicate the presence of a Quincunx type video
frame
--SEIFramePackingInterpretation
Indicate the interpretation of the frame pair
0: unspecified
1: stereo pair, frame0 represents left view
2: stereo pair, frame0 represents right view
--SEISegmentedRectFramePacking
Controls generation of segmented rectangular
frame packing SEI messages
--SEISegmentedRectFramePackingCancel
If equal to 1, cancels the persistence of any
previous SRFPA SEI message
--SEISegmentedRectFramePackingType
Specifies the arrangement of the frames in the
reconstructed picture
--SEISegmentedRectFramePackingPersistence
If equal to 0, the SEI applies to the current
frame only
--SEIDisplayOrientation Control generation of display orientation SEI messages
N: 0 < N < (2^16 - 1) enable display orientation SEI message with anticlockwise_rotation = N and display_orientation_repetition_period = 1
0: disable
--SEITemporalLevel0Index Control generation of temporal level 0 index
SEI messages
--SEIGradualDecodingRefreshInfo
Control generation of gradual decoding refresh
information SEI message
--SEINoDisplay Control generation of no display SEI message
N: 0 < N enable no display SEI message for temporal layer N or higher
0: disable
--SEIDecodingUnitInfo Control generation of decoding unit information
SEI message.
--SEISOPDescription Control generation of SOP description SEI
messages
--SEIScalableNesting Control generation of scalable nesting SEI
messages
--SEITempMotionConstrainedTileSets
Control generation of temporal motion
constrained tile sets SEI message
--SEITimeCodeEnabled Control generation of time code information SEI
message
--SEITimeCodeNumClockTs Number of clock time sets [0..3]
--SEITimeCodeTimeStampFlag
Time stamp flag associated to each time set
--SEITimeCodeFieldBasedFlag
Field based flag associated to each time set
--SEITimeCodeCountingTypeCounting type associated to each time set
--SEITimeCodeFullTsFlag Full time stamp flag associated to each time
set
--SEITimeCodeDiscontinuityFlag
Discontinuity flag associated to each time set
--SEITimeCodeCntDroppedFlag
Counter dropped flag associated to each time
set
--SEITimeCodeNumFrames Number of frames associated to each time set
--SEITimeCodeSecondsValueSeconds value for each time set
--SEITimeCodeMinutesValueMinutes value for each time set
--SEITimeCodeHoursValue Hours value for each time set
--SEITimeCodeSecondsFlag Flag to signal seconds value presence in each
time set
--SEITimeCodeMinutesFlag Flag to signal minutes value presence in each
time set
--SEITimeCodeHoursFlag Flag to signal hours value presence in each
time set
--SEITimeCodeOffsetLengthTime offset length associated to each time set
--SEITimeCodeTimeOffset Time offset associated to each time set
--SEIKneeFunctionInfo Control generation of Knee function SEI
messages
--SEIKneeFunctionId Specifies Id of Knee function SEI message for a
given session
--SEIKneeFunctionCancelFlag
Indicates that Knee function SEI message
cancels the persistence or follows
--SEIKneeFunctionPersistenceFlag
Specifies the persistence of the Knee function
SEI message
--SEIKneeFunctionMappingFlag
Specifies the mapping mode of the Knee function
SEI message
--SEIKneeFunctionInputDrange
Specifies the peak luminance level for the
input picture of Knee function SEI messages
--SEIKneeFunctionInputDispLuminance
Specifies the expected display brightness for
the input picture of Knee function SEI
messages
--SEIKneeFunctionOutputDrange
Specifies the peak luminance level for the
output picture of Knee function SEI messages
--SEIKneeFunctionOutputDispLuminance
Specifies the expected display brightness for
the output picture of Knee function SEI
messages
--SEIKneeFunctionNumKneePointsMinus1
Specifies the number of knee points - 1
--SEIKneeFunctionInputKneePointValue
Array of input knee point
--SEIKneeFunctionOutputKneePointValue
Array of output knee point
--SEIMasteringDisplayColourVolume
Control generation of mastering display colour
volume SEI messages
--SEIMasteringDisplayMaxLuminance
Specifies the mastering display maximum
luminance value in units of 1/10000 candela per
square metre (32-bit code value)
--SEIMasteringDisplayMinLuminance
Specifies the mastering display minimum
luminance value in units of 1/10000 candela per
square metre (32-bit code value)
--SEIMasteringDisplayPrimaries
Mastering display primaries for all three
colour planes in CIE xy coordinates in
increments of 1/50000 (results in the ranges 0
to 50000 inclusive)
--SEIMasteringDisplayWhitePoint
Mastering display white point CIE xy
coordinates in normalised increments of 1/50000
(e.g. 0.333 = 16667)
这个真的超级好用啊啊啊。。仍记得当年第一次配windowsHM,照着AVS2的批处理写HM批处理,根本不懂configure文件前为什么是-c ,framenumber,QP,前到底是什么。狗儒暴力的让我在VS工程里搜“framerate”这种关键字,才在代码里找到。
所以Linux的命令行方式让编码器跑起来的方式是:
./TAppEncoderStatic -c /Users/mengwang/Downloads/HM-16.0/cfg/encoder_intra_main.cfg -c /Users/mengwang/Downloads/HM-16.0/cfg/per-sequence/BQSquare.cfg
所以如果想要指定跑多少帧、QP是多少,可以完全不该配置文件,直接在命令行里添加 -f 20 -q 22这样的关键字
所以可以试试用shell脚本跑一组编码性能了:QP 22 27 32 37
#!/bin/bash
echo "Hello World !"
WORKDIR_PATH=/Users/mengwang/Downloads/HM-16.0
HM_ENCODER=${WORKDIR_PATH}/bin/TAppEncoderStatic #release
CONFIG_PATH_TYPE=${WORKDIR_PATH}/cfg/encoder_intra_main.cfg
CONFIG_PATH_SEQ=${WORKDIR_PATH}/cfg/per-sequence/BQSquare.cfg
mkdir ${WORKDIR_PATH}/encResult
for qp in 22 27 32 37
do
${HM_ENCODER} -c ${CONFIG_PATH_TYPE} -c ${CONFIG_PATH_SEQ} -q ${qp} -f 5 >> ${WORKDIR_PATH}/encResult/${qp}.txt
done
然后 再用一个python批处理 ,把实验结果提出来:
import re
import string
import os
f_out = open('/Users/mengwang/Downloads/HM-16.0/BDrate.txt', 'w+')
def searchResult(chunk, matchSyntax, index):
if re.search(matchSyntax, chunk):
splitWord = re.split(r'\s+', chunk)
#print chunk
#print splitWord[3]
matchWord = []
matchWord.append(splitWord[index])
return matchWord
def writeResult(result):
f_out.write("%-20s"%(result[0]))
f_out.write("%-10s"%(result[1]))
f_out.write("%-10s"%(result[2]))
f_out.write("%-10s"%(result[3]))
f_out.write("%-10s"%(result[4]))
f_out.write("\n")
rootdir = '/Users/mengwang/Downloads/HM-16.0/encResult'
list = os.listdir(rootdir)
for i in range(0,len(list)):
pathDir = os.path.join(rootdir,list[i])
if os.path.isfile(pathDir):
f = open(pathDir, 'r')
while 1:
chunk = f.readline()
if chunk == '':
break
matchWord = 'SUMMARY'
findResult = searchResult(chunk, matchWord, 0)
if findResult:
chunk1 = f.readline()
chunk2 = f.readline()
splitEncResult = re.split(r'\s+', chunk2)
print chunk2
print pathDir
BDRATE = []
BDRATE.append(splitEncResult[3])
BDRATE.append(splitEncResult[4])
BDRATE.append(splitEncResult[5])
BDRATE.append(splitEncResult[6])
BDRATE.append(pathDir)
writeResult(BDRATE)
python代码写的不严谨。但是可以用。