瞭解HEVC配置文件

本文轉載自http://blog.csdn.net/u010485442/article/details/38308013?locationNum=7&fps=1

對於配置文件的認識
對於配置文件的認識這是很重要的,因爲文件裏面規定了編碼的各種參數。在HEVC中包含兩種配置文件:編碼方式的配置文件和測試序列的配置文件。
一.編碼方式的配置文件
下面以HM10.1中編碼方式的配置文件爲例說明下。
首先,在HM10.1當中有如圖1所示的幾種配置文件。在配置文件名中,同類型,以"main"結尾與“main10”結尾的主要區別在於Profile(檔次)和內部位深,如encoder_intra_main與encoder_intra_main10;不同類型的,主要區別在於編碼結構,intra表示:每一幀都是按照幀內方式時行編碼,lowdelay和lowdelay_p 表示: 只有第一幀按照幀內編碼方式進行編碼,隨後的各幀都作爲一般的P幀或B幀進行編碼,randomaccess表示:分批B幀構成,週期性地插入一些隨機訪問幀。測試者可以根據自己的需要選擇適當的編碼方式配置文件,如進行幀內快速算法的研究一般選擇“intra”的配置文件。

圖1
其次,介紹下編碼方式配置文件的詳細內容,以encoder_intra_main爲例。

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

BitstreamFile                 : str.bin  編碼後獲得的碼流,即用來傳輸的文件,默認存儲地址爲調試時的絕對路徑。但操作者可以更改名稱及存儲地址,如下:F:\\HEVCres\\BasketballDrill_832x480_50_str.bin

ReconFile                     : rec.yuv 重建文件,即獲得的編碼視頻文件,同樣可以改變名稱及存儲地址,如F:\\HEVCres\\BasketballDrill_832x480_50_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],對應的尺寸爲64X648X8

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:全搜索;1TZ搜索

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.

ALFDB兩個濾波器在片邊界是否相交

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


二.測試序列的配置文件

以BasketballDrill_832x480_50.cfg爲例

#======== File I/O ===============
InputFile                     : ../../origCfP/BasketballDrill_832x480_50.yuv

輸入文件名,將其改成測試序列的地址
InputBitDepth                 : 8           # Input bitdepth

輸入位深
FrameRate                     : 50          # Frame Rate per second

幀率
FrameSkip                     : 0           # Number of frames to be skipped in input

輸入幀跳過幀數
SourceWidth                   : 832         # Input  frame width
SourceHeight                  : 480         # Input  frame height

測試序列的分辨率
FramesToBeEncoded              : 500         # Number of frames to be coded

編碼幀數



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章