HEVC之HM学习02

这节学下各种编码模式及其cfg文件中参数意义:
在这里插入图片描述

一、cfg_HDR:

在这里插入图片描述
高动态范围成像(英语:High Dynamic Range Imaging,简称HDRI或HDR),在计算机图形学与电影摄影术中,是用来实现比普通数位图像技术更大曝光动态范围(即更大的明暗差别)的一组技术。高动态范围成像的目的就是要正确地表示真实世界中从太阳光直射到最暗的阴影这样大的范围亮度。可以在配置文件中看到其位深度为12,暂时仅做了解。

二、misc

misc其实是英文miscellaneous的前四个字母,杂项、混合体、大杂烩的意思,略过
在这里插入图片描述

三、per-sequence

放置官方给定的测试序列的媒体信息文件:
在这里插入图片描述
如BasketballDrill.cfg:

#======== File I/O ===============
InputFile              : BasketballDrill_832x480_50.yuv 文件名
InputBitDepth          : 8           # 输入的位深度
InputChromaFormat      : 420         # YUV420采样
FrameRate              : 50          # 帧率
FrameSkip              : 0           # 输入跳过的帧数
SourceWidth            : 832         # 宽
SourceHeight           : 480         # 高
FramesToBeEncoded      : 500   # 要编码的帧数

Level                  : 3.1   #这啥?
Profile:指定码流的profile。取值有:main main10 main-still-picture main-RExt, high-throughput-RExt, main-SCC,等等。
Level:指定码流的level。取值:none、1, 2, 2.1, 3, 3.1, 4, 4.1, 5, 5.1, 5.2, 6, 6.1, 6.2, 8.5

四、SEI

在这里插入图片描述

补充增强信息Supplementary enhancement information,不懂,再次略过QAQ

五、others在这里插入图片描述

main 和mian10主要区别是profile和内部位深不同。intra表示是全I帧编码,low delay和low delay_p表示只有第一帧是I 帧编码,而其他的都是P帧或者是B帧编码。randomaccess表示分批B帧结构,周期性的插入一些随机访问帧,rext是范围扩展,high-throughput是高吞吐量。
将上述组合下,比如encoder_intra_main10.cfg为Profile 为main10的帧内编码模式。

profile是对视频的压缩特性的描述,具体指码流中采用了那些编码算法和使用了那些编码工具

在HEVC中支持三个档次(profile),分别是主档次(main profile)、10bit主档次(main 10 profile)、静止图像主档次(main still profile),它们之间的关系如下图所示,外层档次可以兼容内层的等级
在这里插入图片描述
主档次(mian profile)的特点

比特深度限制为8bit

采样格式限制为4:2:0

CTB的大小从16 * 16到64 * 64

解码图像的缓存容量限制为6幅图像

允许选择波前和片划分方式,但是不能同时选择

10比特主档次(main 10 profile)的特点

主要的特点和main profile类似,但是不同之处在于,它能够支持10比特深度
静止图像档次(main still profile)的特点

主要特点和main profile类似,但区别在于它不支持帧间预测编码,视频的全部的码流只能一帧编码。

参考:https://blog.csdn.net/weixin_45615071/article/details/105460401

intra-only模式中

,所有待编码图像都被当作IDR图像采用帧内预测编码。不存在时域参考图像。且图像内QP不会变化。下图是 intra-only模式编码示意图,图像上的数字代表编码顺序
在这里插入图片描述

#======== File I/O =====================输入输出文件

BitstreamFile                 : str.bin  
ReconFile                     : rec.yuv 

#======== Unit definition ================单元定义(应该是指LCU)

MaxCUWidth            : 64 # Maximum coding unit width in pixel
                           #最大编码单元LCU的宽
                           
MaxCUHeight           : 64 # Maximum coding unit height in pixel
                           #最大编码单元LCU的高
                           
MaxPartitionDepth     : 4  # Maximum coding unit depth
           #最大深度4,深度范围[0123],对应的尺寸为64X64到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 (帧间TU最大深度)

QuadtreeTUMaxDepthIntra : 3
 
#======== Coding Structure =============编码结构

IntraPeriod          : 1  # Period of I-Frame ( -1 = only first)

DecodingRefreshType  : 0  # Random Accesss 0:none, 1:CDR, 2:IDR

 Random Accesss :解码更新类型,即随机接入类型

GOPSize               : 1  # GOP Size (number of B slice =           #GOPSize-1),图像组大小

#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures 

 

#=========== Motion Search =============运动搜索

FastSearch           : 1 # 0:Full search  1:TZ search
                         #快速搜索类型,0:全搜索;1:TZ搜索

SearchRange          : 64   # (0: Search range is a Full frame)
                            #搜索的范围

HadamardME        :1 # Use of hadamard measure for fractional ME
                     #fractional ME分数(像素位置)运动估计

FEN     : 1 # Fast encoder decision   快速编码器决策

FDM     : 1  # Fast Decision for Merge RD cost  快速合并RD代价决策

#======== Quantization =============量化

QP      : 32      # Quantization parameter(0-51)量化参数范围:051

MaxDeltaQP  : 0  # CU-based multi-QP optimization基于CU的多QP优化

MaxCuDQPDepth : 0   # Max depth of a minimum CuDQP for sub-LCU-level delta QP

DeltaQpRD     : 0    # Slice-based multi-QP optimization
                     #基于片的多QP优化
                     
RDOQ          : 1     # RDOQ率失真优化量化

RDOQTS        : 1     # RDOQ for transform skip
                      #变换跳过的率失真优化量化 

#=========== Deblock Filter ============去块滤波

DeblockingFilterControlPresent: 0      # Dbl control params   #present (0=not present, 1=present) Db1控制是否使用去块滤波器

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
#编解码控制比特深度,表示主要档次,即MAIN

 

#=========== Coding Tools =================编码工具

SAO                           : 1           # Sample adaptive offset  (0: OFF, 1: ON)  率样点自适应偏移

AMP                           : 1           # Asymmetric motion partitions (0: OFF, 1: ON) 非对称运动分割

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边界像素用未经过去块滤波操作的像素值表示

 

#============ Slices ================片

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与DB两个滤波器在片边界是否相交

                                            # 0:not across, 1: across

 

#============ PCM ================ PCM模式

PCMEnabledFlag                      : 0                # 0: No PCM mode

PCMLog2MaxSize                      : 5                # Log2 of maximum PCM block size.

PCMLog2MinSize                      : 3                # Log2 of minimum PCM block size.

PCM块最大为32X32,最小为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 ================条

UniformSpacingIdc                   : 0                # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array

Tiles的列边界由列宽数组决定

                                                       # 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 ================波前

WaveFrontSynchro                    : 0                # 0:  No WaveFront synchronisation (WaveFrontSubstreams must be 1 in this case).

波前并行处理同步

                                                       # >0: WaveFront synchronises with the LCU above and to the right by this many LCUs.

 

#=========== 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 ================失真

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 ###


其GOPSize为1,全是I帧

Low-delay配置

low-delay有low-delay P和low-delay B两种模式。对于low-delay模式,第一帧图像是IDR图像。在low-delay P模式中除第一帧外都是P图像。在low-delay B模式中除第一帧外都是B图像。对于两种模式,无论是P图像还是B图像都只参考播放顺序在其前的图像。且在low-delay B模式中参考图像列表RefPicList0 和RefPicList1相同。每个帧间预测图像的QP是在帧内图像的QP上加一个补偿值,补偿值由所处的时域层决定。

下图是 Low-delay模式编码示意图,图像上的数字代表编码顺序。
在这里插入图片描述

Random-access配置

在random-access模式中,编码时使用了分层B结构(hierarchical B structure)。下图是random-access模式编码示意图,图像上的数字代表编码顺序。
在这里插入图片描述
每隔一定间隔编码一个I帧,间隔由配置项IntraPeriod 决定,一般根据帧率配置为1秒一个I帧。第一个I帧为IDR图像,其他I帧为非IDR图像(Open GOP)。显示顺序在连续I帧间的图像被编码为B帧。

处于时域最低层的帧间预测图像(GPB),可以参考帧内图像或帧间图像。第二和第三时域层由referenced B pictures图像组成。最高时域层只包含non-referenced B picture图像。每个帧间预测图像的QP是在帧内图像的QP上加一个补偿值,补偿值由所处的时域层决定。

参考:https://blog.csdn.net/Dillon2015/article/details/104212995/

猜你喜欢

转载自blog.csdn.net/qq_42567607/article/details/125179061