Settings Parameters - 2023.1 English

H.264/H.265 Video Codec Unit v1.2 Solutions LogiCORE IP Product Guide (PG252)

Document ID
PG252
Release Date
2023-05-16
Version
2023.1 English
Table 1. Encoder Settings Parameters
Parameter Description and Possible Values
Profile

Specifies the profile to which the bitstream conforms.

Allowed values:

AVC_BASELINE, AVC_C_BASELINE, AVC_C_HIGH, AVC_HIGH, AVC_HIGH10, AVC_HIGH10_INTRA, AVC_HIGH_422, AVC_HIGH_422_INTRA, AVC_MAIN, AVC_PROG_HIGH, HEVC_MAIN, HEVC_MAIN10, HEVC_MAIN10_INTRA, HEVC_MAIN_422, HEVC_MAIN_422_10, HEVC_MAIN_422_10_INTRA, HEVC_MAIN_INTRA, HEVC_MAIN_STILL, HEVC_MONO, HEVC_MONO10, XAVC_HIGH10_INTRA_CBG, XAVC_HIGH10_INTRA_VBR, XAVC_HIGH_422_INTRA_CBG, XAVC_HIGH_422_INTRA_VBR, XAVC_LONG_GOP_HIGH_422_MXF, XAVC_LONG_GOP_HIGH_MP4, XAVC_LONG_GOP_HIGH_MXF, XAVC_LONG_GOP_MAIN_MP4.

Default value: HEVC_MAIN

Level Specifies the Level to which the bitstream conforms

Allowed values: from 1.0 to 5.1 for H.265 (HEVC), from 1.0 to 5.2 for H.264 (AVC)

Default value: 5.1

Tier Specifies the tier to which the bitstream conforms (H.265 (HEVC) only)

Allowed values: MAIN_TIER, HIGH_TIER

Default value: MAIN_TIER

ChromaMode Selects the Chroma subsampling mode used to encode the stream

Allowed values:

  • CHROMA_MONO: The stream is encoded in Monochrome (4:0:0)
  • CHROMA_4_2_0: The stream is encoded with 4:2:0 Chroma subsampling
  • CHROMA_4_2_2: The stream is encoded with 4:2:2 Chroma subsampling

Default value: CHROMA_4_2_0

BitDepth Specifies the bit depth of the Luma and Chroma samples in the encoded stream.

Allowed values: 8 or 10

Default value: 8

NumSlices Specifies the number of slices used for each frame. Each slice contains one or more full LCU row(s) and are spread over the frame as regularly as possible.

Allowed values: from 1 up to number of Coding unit rows in the frame.

Default value: 1

SliceSize Target Slice Size specifies the target slice size, in bytes, that the encoder uses to automatically split the bitstream into approximately equally-sized slices, with a granularity of one LCU. This impacts performance, adding an overhead of one LCU per slice to the processing time of a command. This parameter is not supported in H.264 (AVC) encoding when using multiple cores. When SliceSize is zero, slices are defined by the NumSlices parameter. This parameter is directly sent to the Encoder IP and specifies only the size of the Slice Data. It does not include any margin for the slice header. So it is recommended to set the SliceSize parameter with the target value lowered by 5%. For example if your target value is 1500 bytes per slice, you should set "SliceSize = 1425" in the configuration file.

Allowed values: 1000-65,535 or 0 to disable the automatic slice splitting.

Default value: 0

DependentSlice When there are several slices per frame (e.g. NumSlices is greater than 1 or SliceSize is greater than 0), this parameter specifies whether the additional slice are Dependent slice segments or regular slices (H.265 (HEVC) only).

Allowed values: FALSE, TRUE

Default value: FALSE

EntropyMode Selects the entropy coding mode if Profile is set to AVC_MAIN, AVC_HIGH, AVC_HIGH10 or AVC_HIGH_422 (AVC only)

Allowed values:

  • MODE_CABAC: the stream is encoded with CABAC
  • MODE_CAVLC: the stream is encoded with CAVLC

Default value: MODE_CABAC

CabacInit Specifies the CABAC initialization table index (H.264 (AVC)) / initialization flag (H.265 (HEVC)).

Allowed values: from 0 to 2 (H.264 (AVC)), from 0 to 1 (H.265 (HEVC))

Default value: 0

PicCbQpOffset Specifies the QP offset for the first Chroma channel (Cb) at picture level. (H.265 (HEVC) only)

Allowed values: from –12 to +12

Default value: 0

PicCrQpOffset Specifies the QP offset for the second Chroma channel (Cr) at picture level (H.265 (HEVC) only)

Allowed values: from –12 to +12

Default value: 0

SliceCbQpOffset Specifies the QP offset for the first Chroma channel (Cb) at slice level.

Allowed values: from –12 to +12

Default value: 0

SliceCrQpOffset Specifies the QP offset for the second Chroma channel (Cr) at slice level

Allowed values: from –12 to +12

Default value: 0

Note:
  • (PicCbQPOffset + SliceCbQPOffset) shall be in range –12 to +12
  • (PicCrQPOffset + SliceCrQPOffset) shall be in range –12 to +12
ScalingList Specifies the scaling list mode (H.264 (AVC) and H.265 (HEVC) only).

Allowed values: FLAT, DEFAULT

QpCtrlMode Specifies how to generate the QP per CU.
  • UNIFORM_QP: All CUs of the slice use the same QP.
  • AUTO_QP: The QP is chosen according to the CU content using a pre-programmed lookup table.
  • LOAD_QP: the QPs of each LCU come from an external buffer loaded from a file. The file shall be named QPs.hex and located in the working directory. The file format is described in Quantization Parameter (QP) File Format.
  • ADAPTIVE_AUTO_QP: Dynamically compute QP by MB on the fly.
  • RELATIVE_QP, ROI_QP

Default value: UNIFORM_QP

CuQpDeltaDepth Specifies the Qp per CU granularity (H.265 (HEVC) only). Used only when QpCtrlMode is set to AUTO_QP or ADAPTIVE_AUTO_QP
  • 0: down to 32×32
  • 1: down to 16×16
  • 2: down to 8×8

Default value: 0

ConstrainedIntraPred Specifies the value of constrained_intra_pred_flag syntax element.

Allowed values: ENABLE, DISABLE

Default value: DISABLE

VrtRange_P Specifies the vertical search range used for P‑frame motion estimation:
  • Allowed values for H.265 (HEVC): 16 or 32: using 16 allows to reduce the memory bandwidth (Low Bandwidth mode)
  • Allowed values for H.264 (AVC): 8 or 16: using 8 allows to reduce the memory bandwidth (Low Bandwidth mode)

Default value: 32 (HEVC) 16 (AVC)

LoopFilter Enables/disables the deblocking filter.

Allowed values: ENABLE, DISABLE

Default value: ENABLE

LoopFilter.CrossSlice Enables/disables in-loop filtering across the left and upper boundaries of each slice of the frame. Used only when LoopFilter is set to ENABLE.

Allowed values: ENABLE, DISABLE

Default value: ENABLE

LoopFilter.CrossTile Enables/disables in-loop filtering across the left and upper boundaries of each tile of the frame. (H.265 (HEVC) only) Used only when LoopFilter is set to ENABLE.

Allowed values: ENABLE, DISABLE

Default value: ENABLE

LoopFilter.BetaOffset Specifies the beta offset for the deblocking filter. Used only when LoopFilter is set to ENABLE.

Allowed values: from –6 to +6

Default value: –1

LoopFilter.TcOffset Specifies the Alpha_c0 offset (H.264 (AVC)) or Tc offset (H.265 (HEVC)) for the deblocking filter. Used only when Loop Filter is set to ENABLE.

Allowed values: from –6 to +6

Default value: –1

CacheLevel2 Enables/disables the optional Encoder buffer. This can be used to reduce the memory bandwidth and it can slightly reduce the video quality.

If enabling this parameter displays an error message from the encoder, it means that the encoder buffer size provided by the VCU driver is too small to handle the minimum motion estimation range.

Allowed values: ENABLE, DISABLE

Default value: DISABLE

AspectRatio Selects the display aspect ratio of the video sequence to be written in SPS/VUI. Allowed values:
  • ASPECT_RATIO_AUTO 4:3 for common SD video, 16:9 for common HD video, unspecified for unknown format.
  • ASPECT_RATIO_4_3 4:3 aspect ratio
  • ASPECT_RATIO_16_9 16:9 aspect ratio
  • ASPECT_RATIO_NONE Aspect ratio information is not present in the stream.
  • ASPECT_RATIO_1_1

Default value: ASPECT_RATIO_AUTO

LookAhead LookAhead is the size of the LookAhead (number of frames between the two passes):
  • 0: LookAhead Disabled
  • Above 2: SceneChange Detection and Correction
  • Above 10: Constant quality using frame complexity + Scenechange Detection

Default value: 0

VideoMode Specifies Video mode.

Available values: INTERLACED_BOTTOM, INTERLACED_TOP, PROGRESSIVE

Default value: PROGRESSIVE

EnableSEI 3 Determines which supplemental enhancement information are sent with the stream.

Available values: SEI_ALL, SEI_BP, SEI_CLL, SEI_MDCV, SEI_NONE, SEI_PT, SEI_RP.

Default value: SEI_NONE

LambdaCtrlMode Specifies the lambda values used for rate-distortion optimization.

Available values: AUTO_LDA, DEFAULT_LDA, DYNAMIC_LDA, LOAD_LDA.

Default value: AUTO_LDA

LambdaFactors Specifies the lambda factor for each picture: I, P and B by increasing temporal ID

Default value: 0 0 0 0 0 0

EnableFillerData Specifies if filler data can be added to stream or not

Available values: DISABLE, ENABLE, ENC (same as ENABLE but for backward compatibility only) and APP (Encoded stream contains uninitialized filler data that should be filled by the application layer)

Default value: ENABLE

AvcLowLat Enables a special synchronization mode for AVC low latency encoding (validation only).

Available values: DISABLE, ENABLE.

Default value: DISABLE

ColourDescription Available values: COLOUR_DESC_BT_2020, COLOUR_DESC_BT_470_NTSC, COLOUR_DESC_BT_601_NTSC, COLOUR_DESC_BT_601_PAL, COLOUR_DESC_BT_709, COLOUR_DESC_EBU_3213, COLOUR_DESC_GENERIC_FILM, COLOUR_DESC_RESERVED, COLOUR_DESC_SMPTE_240M, COLOUR_DESC_SMPTE_EG_432, COLOUR_DESC_SMPTE_RP_431, COLOUR_DESC_SMPTE_ST_428, COLOUR_DESC_UNSPECIFIED.

Default value: "COLOUR_DESC_BT_709"

ColourMatrix Specifies the matrix coefficients used in deriving luma and chroma signals from RGB (HDR setting).

Available values: COLOUR_MAT_BT_2100_YCBCR, COLOUR_MAT_UNSPECIFIED.

Default value: COLOUR_MAT_UNSPECIFIED

CostMode Available values: DISABLE, ENABLE.

Default value: ENABLE

EnableAUD Determines if Access Unit Delimiter are added to the stream or not.

Available values: DISABLE, ENABLE.

Default value: ENABLE

FileScalingList If ScalingList is CUSTOM, specifies the file containing the quantization matrices
NumCore Number of cores to use for this encoding.

Default value: AUTO

SCDFirstPass During first pass, to encode faster, enable only the scene change detection.

Available values: DISABLE, ENABLE.

Default value: DISABLE

SliceLat Enables slice latency mode.

Available values: DISABLE, ENABLE.

Default value: DISABLE

SrcFormat Available values: COMP_32x4, COMP_64x4, NVX, TILE_32x4, TILE_64x4.

Default value: NVX

SubframeLatency Enables the subframe latency mode.

Available values: DISABLE, ENABLE.

Default value: DISABLE

TransferCharac Specifies the reference opto-electronic transfer characteristic function (HDR setting).

Available values: TRANSFER_BT_2100_PQ, TRANSFER_UNSPECIFIED.

Default value: TRANSFER_UNSPECIFIED

TwoPass Index of the pass currently encoded in the Twopass mode.

Default value: DISABLE

UniformSliceType

Enables using higher slice_types values

Available values: TRUE, FALSE.

Default value: FALSE

When this is TRUE, the following slice-type values are used in the slice header.

  • I slice: slice-type = 7 is used.
  • P slice: slice-type=5 is used
  • B slice: slice-type=6 is used.

Supported from 2021.1 release onwards.

  1. When using GStreamer, following mentioned gop-length and b-frames combinations are not supported but that are mostly unused in real time scenarios. ({2, 1}, {3, 2}, {4, 2}, {4, 3}, {5, 3}, {5, 4}, {6, 3}, {6, 4}, {7, 4}, {8, 4}, {9, 3}, {11, 4}, {12, 4}, {16, 4}).
  2. When using GStreamer, you cannot use the "Closed GOP" structures due to AMD specification.
  3. SEI_UDU stands for user_data_unregistered SEI message. EnableSEI = SEI_ALL, then it enables all supported SEI which includes the SEI_UDU. - SEI_UDU generates a specific SEI_UDU (prefix) along with empty filler data NAL units. EnableSEI = SEI_BP | SEI_PT, then you will not observe any dummy filler data NAL units in the bitstream.