当前位置:网站首页>Hevc HM learning 02
Hevc HM learning 02
2022-06-10 05:16:00 【Sister Suo】
In this section, we will learn about various coding modes and their cfg The meaning of parameters in the document :
One 、cfg_HDR:

High dynamic range imaging ( English :High Dynamic Range Imaging, abbreviation HDRI or HDR), In computer graphics and cinematography , It is used to achieve a larger exposure dynamic range than ordinary digital image technology ( That is, a greater difference between light and shade ) A set of technologies . The purpose of high dynamic range imaging is to correctly represent the large range of brightness in the real world from direct sunlight to the darkest shadows . You can see in the configuration file that the bit depth is 12, Just for the time being .
Two 、misc
misc It's actually English miscellaneous The first four letters of , miscellaneous 、 A mixture 、 The meaning of a hodgepodge , skip 
3、 ... and 、per-sequence
Place the media information file of the official test sequence :
Such as BasketballDrill.cfg:
#======== File I/O ===============
InputFile : BasketballDrill_832x480_50.yuv file name
InputBitDepth : 8 # Input bit depth
InputChromaFormat : 420 # YUV420 sampling
FrameRate : 50 # Frame rate
FrameSkip : 0 # Enter the number of frames to skip
SourceWidth : 832 # wide
SourceHeight : 480 # high
FramesToBeEncoded : 500 # Number of frames to encode
Level : 3.1 # What is this ?
Profile: Specifies the of the code stream profile. Values are :main main10 main-still-picture main-RExt, high-throughput-RExt, main-SCC, wait .
Level: Specifies the of the code stream level. Value :none、1, 2, 2.1, 3, 3.1, 4, 4.1, 5, 5.1, 5.2, 6, 6.1, 6.2, 8.5.
Four 、SEI

Add enhanced information Supplementary enhancement information, Don't understand, , Skip again QAQ
5、 ... and 、others
main and mian10 The main difference is profile Different from the internal bit depth .intra It means all I Frame encoding ,low delay and low delay_p Indicates that only the first frame is I Frame encoding , And the rest are P Frame or B Frame encoding .randomaccess Means batch B Frame structure , Periodically insert some random access frames ,rext It's a range extension ,high-throughput It's high throughput .
Combine the above , such as encoder_intra_main10.cfg by Profile by main10 Intra coding mode .
profile Is a description of video compression characteristics , Specifically, it refers to the coding algorithms and coding tools used in the code stream
stay HEVC Three grades are supported in (profile), They are the main grades (main profile)、10bit Main grade (main 10 profile)、 Main level of still image (main still profile), The relationship between them is shown in the figure below , The outer level can be compatible with the inner level 
Main grade (mian profile) Characteristics
The bit depth is limited to 8bit
The sampling format is limited to 4:2:0
CTB The size is from 16 * 16 To 64 * 64
The buffer capacity of the decoded image is limited to 6 Images
It is allowed to select the wave front and plate division mode , But you can't choose at the same time
10 Bit master level (main 10 profile) Characteristics
Main features and main profile similar , But the difference is , It can support 10 Bit depth
Still images (main still profile) Characteristics
Main features and main profile similar , But the difference is that it does not support inter prediction coding , All video streams can only be encoded in one frame .
Reference resources :https://blog.csdn.net/weixin_45615071/article/details/105460401
intra-only In the pattern
, All images to be encoded are treated as IDR The image is encoded by intra prediction . There is no time domain reference image . And in the image QP No change . The picture below is intra-only Schematic diagram of mode coding , The numbers on the image represent the coding order 
#======== File I/O ===================== Input and output files
BitstreamFile : str.bin
ReconFile : rec.yuv
#======== Unit definition ================ Unit definition ( It should mean LCU)
MaxCUWidth : 64 # Maximum coding unit width in pixel
# Maximum coding unit LCU The width of
MaxCUHeight : 64 # Maximum coding unit height in pixel
# Maximum coding unit LCU The height of
MaxPartitionDepth : 4 # Maximum coding unit depth
# Maximum depth 4, Depth range [0,1,2,3], The corresponding dimension is 64X64 To 8X8
QuadtreeTULog2MaxSize : 5 # Log2 of maximum transform size for
# quadtree-based TU coding (2...6)Log2(32)=5
QuadtreeTULog2MinSize : 2 # Log2 of minimum transform size for
# quadtree-based TU coding (2...6)Log2(4)=2
QuadtreeTUMaxDepthInter : 3 ( Between frames TU Maximum depth )
QuadtreeTUMaxDepthIntra : 3
#======== Coding Structure ============= Coding structure
IntraPeriod : 1 # Period of I-Frame ( -1 = only first)
DecodingRefreshType : 0 # Random Accesss 0:none, 1:CDR, 2:IDR
Random Accesss : Decode update type , Random access type
GOPSize : 1 # GOP Size (number of B slice = #GOPSize-1), Image group size
# Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures
#=========== Motion Search ============= Sports search
FastSearch : 1 # 0:Full search 1:TZ search
# Quick search type ,0: Full search ;1:TZ Search for
SearchRange : 64 # (0: Search range is a Full frame)
# The scope of the search
HadamardME :1 # Use of hadamard measure for fractional ME
#fractional ME fraction ( Pixel position ) motion estimation
FEN : 1 # Fast encoder decision Fast encoder decision
FDM : 1 # Fast Decision for Merge RD cost Fast merge RD Cost decision
#======== Quantization ============= quantitative
QP : 32 # Quantization parameter(0-51) Quantitative parameter range :0-51
MaxDeltaQP : 0 # CU-based multi-QP optimization be based on CU More QP Optimize
MaxCuDQPDepth : 0 # Max depth of a minimum CuDQP for sub-LCU-level delta QP
DeltaQpRD : 0 # Slice-based multi-QP optimization
# Slice based multi QP Optimize
RDOQ : 1 # RDOQ Rate distortion optimized quantization
RDOQTS : 1 # RDOQ for transform skip
# Transform skipped rate distortion optimized quantization
#=========== Deblock Filter ============ To block filter
DeblockingFilterControlPresent: 0 # Dbl control params #present (0=not present, 1=present) Db1 Controls whether a deblocking filter is used
LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter)
LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13
LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13
#=========== Misc. ============
InternalBitDepth : 8 # codec operating bit-depth
# Codec control bit depth , Indicates the main grade , namely MAIN
#=========== Coding Tools ================= Coding tools
SAO : 1 # Sample adaptive offset (0: OFF, 1: ON) Rate sample adaptive offset
AMP : 1 # Asymmetric motion partitions (0: OFF, 1: ON) Asymmetric motion segmentation
TransformSkip : 1 # Transform skipping (0: OFF, 1: ON)
TransformSkipFast : 1 # Fast Transform skipping (0: OFF, 1: ON)
SAOLcuBoundary : 0 # SAOLcuBoundary using non-deblocked pixels (0: OFF, 1: ON)
SAOLCU Boundary pixels are represented by pixel values that have not been subjected to past block filtering operations
#============ Slices ================ slice
SliceMode : 0 # 0: Disable all slice options.
# 1: Enforce maximum number of LCU in an slice,
# 2: Enforce maximum number of bytes in an 'slice'
# 3: Enforce maximum number of tiles in a slice
SliceArgument : 1500 # Argument for 'SliceMode'.
# If SliceMode==1 it represents max. SliceGranularity-sized blocks per slice.
# If SliceMode==2 it represents max. bytes per slice.
# If SliceMode==3 it represents max. tiles per slice.
LFCrossSliceBoundaryFlag : 1 # In-loop filtering, including ALF and DB, is across or not across slice boundary.
ALF And DB Whether the two filters intersect at the chip boundary
# 0:not across, 1: across
#============ PCM ================ PCM Pattern
PCMEnabledFlag : 0 # 0: No PCM mode
PCMLog2MaxSize : 5 # Log2 of maximum PCM block size.
PCMLog2MinSize : 3 # Log2 of minimum PCM block size.
PCM The maximum block size is 32X32, The minimum is 8X8
PCMInputBitDepthFlag : 1 # 0: PCM bit-depth is internal bit-depth. 1: PCM bit-depth is input bit-depth.
PCMFilterDisableFlag : 0 # 0: Enable loop filtering on I_PCM samples. 1: Disable loop filtering on I_PCM samples.
#============ Tiles ================ strip
UniformSpacingIdc : 0 # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array
Tiles The column boundary of is determined by the column width array
# 1: the column and row boundaries are distributed uniformly
NumTileColumnsMinus1 : 0 # Number of columns in a picture minus 1
ColumnWidthArray : 2 3 # Array containing ColumnWidth values in units of LCU (from left to right in picture)
NumTileRowsMinus1 : 0 # Number of rows in a picture minus 1
RowHeightArray : 2 # Array containing RowHeight values in units of LCU (from top to bottom in picture)
LFCrossTileBoundaryFlag : 1 # In-loop filtering is across or not across tile boundary.
# 0:not across, 1: across
#============ WaveFront ================ Wave front
WaveFrontSynchro : 0 # 0: No WaveFront synchronisation (WaveFrontSubstreams must be 1 in this case).
Wavefront parallel processing synchronization
# >0: WaveFront synchronises with the LCU above and to the right by this many LCUs.
#=========== Quantization Matrix ================= Quantization matrix
ScalingList : 0 # ScalingList 0 : off, 1 : default, 2 : file read
ScalingListFile : scaling_list.txt # Scaling List file name. If file is not exist, use Default Matrix.
#============ Lossless ================ The distortion
TransquantBypassEnableFlag: 0 # Value of PPS flag.
CUTransquantBypassFlagValue: 0 # Constant lossless-value signaling per CU, if TransquantBypassEnableFlag is 1.
### DO NOT ADD ANYTHING BELOW THIS LINE ###
### DO NOT DELETE THE EMPTY LINE BELOW ###
Its GOPSize by 1, Is full of I frame
Low-delay To configure
low-delay Yes low-delay P and low-delay B Two modes . about low-delay Pattern , The first image is IDR Images . stay low-delay P All but the first frame in the mode are P Images . stay low-delay B All but the first frame in the mode are B Images . For both models , Whether it's P The image is still B Images only refer to the image before the playback order . And in low-delay B Reference image list in mode RefPicList0 and RefPicList1 identical . Of each inter prediction image QP Is in the frame of the image QP Add a compensation value , The compensation value is determined by the time domain layer .
The picture below is Low-delay Schematic diagram of mode coding , The numbers on the image represent the coding order .
Random-access To configure
stay random-access In the pattern , Coding uses layering B structure (hierarchical B structure). The picture below is random-access Schematic diagram of mode coding , The numbers on the image represent the coding order .
Code one at regular intervals I frame , The interval is determined by the configuration item IntraPeriod decision , It is generally configured as... According to the frame rate 1 One second I frame . first I The frame is IDR Images , other I Frame is not IDR Images (Open GOP). The display sequence is continuous I The inter frame image is encoded as B frame .
The inter prediction image at the lowest level in the time domain (GPB), You can refer to an intra image or an inter image . The second and third time domain layers are composed of referenced B pictures Image composition . The highest time domain layer contains only non-referenced B picture Images . Of each inter prediction image QP Is in the frame of the image QP Add a compensation value , The compensation value is determined by the time domain layer .
Reference resources :https://blog.csdn.net/Dillon2015/article/details/104212995/
边栏推荐
- Add of pytorch_ How can module (name, module) be represented by mindspore
- 加快Kettle插入速度的小技巧
- 2022制冷与空调设备运行操作特种作业证考试题库模拟考试平台操作
- photoClip. JS mobile image upload and interception plug-in
- 聊一聊蚂蚁AI技术里的“老实担当”
- [nick] intensive reading
- 五项最优!蚂蚁集团通过信通院“稳保计划”最高级评测
- Curator - Create Client
- [innovative document technology solution] Shanghai daoning provides you with a product - litera, which covers the entire document drafting life cycle, to help users create higher quality documents
- Use mindspire in gpu-national/ cpu-graph_ Mode and gpu-graph_ Inconsistent mode execution
猜你喜欢

Read leastereo:hierarchical neural architecture search for deep stereo matching

2022山东省安全员C证考试题库及答案

Idea accidentally excludes automatic package import or completion of common classes

js微信小游戏之打蚊子

【UE4自动地形材质】

全球首个金融图数据库测试基准立项,蚂蚁集团开放专利共建

Methods of using variables in shell parameters

Interview question 05.07 Pairing exchange

如何保障系统稳定性并实现减排?蚂蚁集团有这些关键技术

【無標題】
随机推荐
IDEA不小心排除常用类的自动导包或补全
In terms of emotional perception, the financial assistant robot "zhixiaobao" goes further
Flutter DIO example
photoClip.js手机图片上传截取插件
Solution to control double click conflict in WPF
Question bank and answers of operation certificate examination for safety production management personnel of hazardous chemical production units in 2022
文献阅读---玉米干旱响应和耐受性基因表达的调控变异定位
Interview question 05.04 Next number
Interview question 08.07 Permutation without duplicate strings
【通用数据库工具】上海道宁为开发者、分析师、数据库管理员带来适用于所有数据库和操作系统的工具——DbVisualizer
Interview question 08.04 Power set
Interview question 05.07 Pairing exchange
2022.6.1-----leetcode. four hundred and seventy-three
Examination questions and online simulation examination of the third batch of Guangdong Provincial Safety Officer a certificate (principal) in 2022
递归函数汉诺塔
Interview question 08.02 Lost robot
加快Kettle插入速度的小技巧
Mindspire [dataset function] cannot view datasets
midway的使用教程
【无标题】