AVBlocks for C++  2.1
Audio and Video Software Development Kit
primo::avblocks::Param::Encoder::Video::H264 Namespace Reference

Parameters specific to AVC/H.264 encoders. More...

Variables

static const char AccessUnitDelimiters [] = "ENCODER_H264_ACCESS_UNIT_DELIMITERS"
 H.264 Video: Use access unit delimiters. More...
 
static const char DeblockingFilter [] = "ENCODER_H264_DEBLOCKING_FILTER_IDC"
 H.264 Video: De-blocking filter mode. More...
 
static const char DeblockingFilterAlpha [] = "ENCODER_H264_DEBLOCKING_FILTER_ALPHA"
 H.264 Video: De-blocking filter strength. More...
 
static const char DeblockingFilterBeta [] = "ENCODER_H264_DEBLOCKING_FILTER_BETA"
 H.264 Video: De-blocking filter threshold. More...
 
static const char DirectPredMode [] = "ENCODER_H264_DIRECT_PRED_MODE"
 H.264 Video: Direct prediction mode. More...
 
static const char EntropyCodingMode [] = "ENCODER_H264_ENTROPY_CODING_MODE"
 H.264 Video: Entropy coding mode. More...
 
static const char FixedFramerate [] = "ENCODER_H264_FIXED_FRAMERATE"
 H.264 Video: Write timing info with a fixed frame rate in the bitstream. More...
 
static const char KeyFrameIDRInterval [] = "ENCODER_H264_KEY_FRAME_IDR_INTERVAL"
 H.264 Video: Distance between two sequential IDR-pictures in terms of I pictures. More...
 
static const char KeyFrameInterval [] = "ENCODER_H264_KEY_FRAME_INTERVAL"
 H.264 Video: Distance between two sequential I-pictures. More...
 
static const char Level [] = "ENCODER_H264_LEVEL_IDC"
 H.264 Video: Computation level. More...
 
static const char MEMethod [] = "ENCODER_H264_ME_METHOD"
 H.264 Video: Motion estimation method. More...
 
static const char MERangeSearchX [] = "ENCODER_H264_ME_RANGE_SEARCH_X"
 H.264 Video: Specifies how far motion estimation should be done in a horizontal direction. More...
 
static const char MERangeSearchY [] = "ENCODER_H264_ME_RANGE_SEARCH_Y"
 H.264 Video: Specifies how far motion estimation should be done in a vertical direction. More...
 
static const char MESplitMode [] = "ENCODER_H264_ME_SPLIT_MODE"
 H.264 Video: Specifies the block size for which motion estimation should be done. More...
 
static const char NumBFrames [] = "ENCODER_H264_NUM_B_FRAMES"
 H.264 Video: Number of B-frames between consequent I-frames or P-frames. More...
 
static const char NumRefFrames [] = "ENCODER_H264_NUM_REF_FRAMES"
 H.264 Video: Maximum number of reference pictures. More...
 
static const char NumSlices [] = "ENCODER_H264_NUM_SLICES"
 H.264 Video: Number of slices per frame/field. More...
 
static const char PictureCodingType [] = "ENCODER_H264_PIC_CODING_TYPE"
 H.264 Video: Picture coding type. More...
 
static const char Profile [] = "ENCODER_H264_PROFILE_IDC"
 H.264 Video: Encoding profile. More...
 
static const char QualitySpeed [] = "ENCODER_H264_QUALITY_SPEED"
 H.264 Video: Quality/Speed trade off. More...
 
static const char RateControlMethod [] = "ENCODER_H264_RATE_CONTROL_METHOD"
 H.264 Video: Rate control method. More...
 
static const char RateControlQuantB [] = "ENCODER_H264_RATE_CONTROL_QUANT_B"
 H.264 Video: Rate control quantizer for B slices. More...
 
static const char RateControlQuantI [] = "ENCODER_H264_RATE_CONTROL_QUANT_I"
 H.264 Video: Rate control quantizer for I slices. More...
 
static const char RateControlQuantP [] = "ENCODER_H264_RATE_CONTROL_QUANT_P"
 H.264 Video: Rate control quantizer for P slices. More...
 
static const char Transform8x8 [] = "ENCODER_H264_TRANSFORM8X8"
 H.264 Video: Transform 8x8 mode. More...
 
static const char TreatBFramesAsReference [] = "ENCODER_H264_TREAT_B_FRAMES_AS_REFERENCE"
 H.264 Video: Allows B-pictures to be used as reference pictures. More...
 

Detailed Description

Parameters specific to AVC/H.264 encoders.

Variable Documentation

const char AccessUnitDelimiters[] = "ENCODER_H264_ACCESS_UNIT_DELIMITERS"
static

H.264 Video: Use access unit delimiters.

This parameter is a boolean value expressed as an integer (1|0).

The default value is False (0).

Note
Hardware encoders support: Intel QuickSync, NVIDIA NVENC.
const char DeblockingFilter[] = "ENCODER_H264_DEBLOCKING_FILTER_IDC"
static

H.264 Video: De-blocking filter mode.

This parameter is an integer.

The supported values are defined in the primo::codecs::H264DeblockingFilter::Enum. The default value is H264DeblockingFilter::All.

The in-loop deblocking filter helps prevent the blocking artifacts common to other DCT-based image compression techniques, resulting in better visual appearance and compression efficiency

Note
Hardware encoders support: Intel QuickSync, AMD VCE, NVIDIA NVENC.
See Also
primo::codecs::H264DeblockingFilter::Enum
const char DeblockingFilterAlpha[] = "ENCODER_H264_DEBLOCKING_FILTER_ALPHA"
static

H.264 Video: De-blocking filter strength.

This parameter is an integer.

Supported values range: from -6 to 6. Negative values give a more sharp video, but they also increases the danger of visible block artifacts. In contrast positive values result in a smoother video, but they will also remove more details. The default value is 0.

Note
Hardware encoders support: AMD VCE.
See Also
H264::DeblockingFilter
H264::DeblockingFilterBeta
const char DeblockingFilterBeta[] = "ENCODER_H264_DEBLOCKING_FILTER_BETA"
static

H.264 Video: De-blocking filter threshold.

This parameter is an integer.

This parameter controls the threshold for block detection.

Supported values range: from -6 to 6.
Negative values "save" more details, but more blocks might slip through (especially in flat areas). In contrast positive values will remove more details and catch more blocks. The default value is 0 and usually it's enough to detect all blocks.

Note
Hardware encoders support: AMD VCE.
See Also
H264::DeblockingFilter
H264::DeblockingFilterAlpha
const char DirectPredMode[] = "ENCODER_H264_DIRECT_PRED_MODE"
static

H.264 Video: Direct prediction mode.

Sets the value of the syntax element direct_spatial_mv_pred_flag.

This parameter is an integer.

The supported values are defined in the primo::codecs::H264DirectPredMode::Enum. The default value is H264DirectPredMode::Temporal.

Note
Hardware encoders support: NVIDIA NVENC.
const char EntropyCodingMode[] = "ENCODER_H264_ENTROPY_CODING_MODE"
static

H.264 Video: Entropy coding mode.

This parameter is an integer.

The supported values are defined in the primo::codecs::H264EntropyCodingMode::Enum. The default value is H264EntropyCodingMode::CABAC.

CABAC compresses data more efficiently (10-20% typically) than CAVLC but requires considerably more processing to decode.

CABAC is supported at Main, High, High10, High422 and High444 profiles. CABAC is not supported at Baseline profile.

Note
Hardware encoders support: Intel QuickSync, AMD VCE, NVIDIA NVENC.
See Also
primo::codecs::H264EntropyCodingMode::Enum
H264::Profile
primo::codecs::H264Profile::Enum
const char FixedFramerate[] = "ENCODER_H264_FIXED_FRAMERATE"
static

H.264 Video: Write timing info with a fixed frame rate in the bitstream.

This parameter is a boolean value expressed as an integer (1|0).

The default value is True (1).

The timing info is written in the bitstream only when this parameter is True and a positive frame rate is specified.

Note
Hardware encoders support: Intel QuickSync.
const char KeyFrameIDRInterval[] = "ENCODER_H264_KEY_FRAME_IDR_INTERVAL"
static

H.264 Video: Distance between two sequential IDR-pictures in terms of I pictures.

IDR stands for Instantaneous Decoding Refresh.

This parameter is an integer.

The integer value must be greater or equal to 0.

For example if this parameter is 10 then every tenth I-picture is also an IDR-picture.

An IDR picture is a special kind of I frame used in an H.264 stream. Pictures following an IDR-picture may not refer back to pictures preceding the IDR-picture. IDR-pictures can be used to create H.264 streams which are more easily edited.

The default value is 1.

Note
Hardware encoders support: Intel QuickSync, AMD VCE.
const char KeyFrameInterval[] = "ENCODER_H264_KEY_FRAME_INTERVAL"
static

H.264 Video: Distance between two sequential I-pictures.

This parameter is an integer.

The integer value must be greater than or equal to 0. Both 0 and 1 mean that every picture is coded as I-picture.

The default value is 90.

Note
Hardware encoders support: Intel QuickSync, AMD VCE, NVIDIA NVENC.
const char Level[] = "ENCODER_H264_LEVEL_IDC"
static

H.264 Video: Computation level.

Set the value of the level_idc syntax element.

This parameter is an integer.

A level designated as x.y is expressed as an xy integer value. For example level 1 is expressed as 10, level 1.1 as 11 and so on. The level must be in accordance with the H.264 standard. It must correspond to the number of reference frames and frame size. A value of 0 specifies automatic level computation.

The default value is 0 (auto).

Note: Similar with the Profile, Level specifies the capabilities a decoder must fulfill to decode a bitstream of a certain level. Most level restrictions are driven by memory restrictions and set restrictions such as resolution supported, maximum number of references, frame rate etc.

Note
Hardware encoders support: Intel QuickSync, AMD VCE, NVIDIA NVENC.
const char MEMethod[] = "ENCODER_H264_ME_METHOD"
static

H.264 Video: Motion estimation method.

This parameter is an integer.

The supported values are defined in the primo::codecs::H264MeMethod::Enum. The default value is H264MeMethod::Log.

Note
Hardware encoders support: None.
const char MERangeSearchX[] = "ENCODER_H264_ME_RANGE_SEARCH_X"
static

H.264 Video: Specifies how far motion estimation should be done in a horizontal direction.

This parameter is an integer.

The default value is 8.

Note
Hardware encoders support: AMD VCE.
const char MERangeSearchY[] = "ENCODER_H264_ME_RANGE_SEARCH_Y"
static

H.264 Video: Specifies how far motion estimation should be done in a vertical direction.

This parameter is an integer.

The default value is 8.

Note
Hardware encoders support: AMD VCE.
const char MESplitMode[] = "ENCODER_H264_ME_SPLIT_MODE"
static

H.264 Video: Specifies the block size for which motion estimation should be done.

This parameter is an integer.

The supported values are defined in the primo::codecs::H264MeSplitMode::Enum. The default value is H264MeSplitMode::Only16x16.

Note
Hardware encoders support: None.
const char NumBFrames[] = "ENCODER_H264_NUM_B_FRAMES"
static

H.264 Video: Number of B-frames between consequent I-frames or P-frames.

This parameter is an integer.

The integer value must be a number that is greater than or equal to zero.

The default value is 0.

B-frames are supported at Main, High, High10, High422 and High444 profiles. B frames are not supported at Baseline profile.

H.264 stream without B frames looks like: IPPPPPPP...PI... H.264 stream with B frames (NumBFrames 2) looks like: IBBPBBPBBP...PI

The main advantage of the usage of B frames is coding efficiency. In most cases, B frames will result in less bits being coded overall. B-frames can use both previous and forward frames for data reference to get the highest amount of data compression.

Note
Hardware encoders support: Intel QuickSync, NVIDIA NVENC, AMD VCE.
AMD VCE supports B frames with the following restrictions:
  • VCE2 and up must be used. VCE1 has no support for B frames and ignores this parameter.
  • Maximum 3 B frames are accepted, 4+ is treated as an invalid parameter.
  • AMD OpenVideo (HwApi::AmdOpenVideo) does not support B frames and ignores this parameter.
See Also
H264::Profile
primo::codecs::H264Profile::Enum
const char NumRefFrames[] = "ENCODER_H264_NUM_REF_FRAMES"
static

H.264 Video: Maximum number of reference pictures.

Sets the maximum number of references stored in the Decoded Picture Buffer (DPB) for motion estimation and compensation. Essentially sets the syntax element num_ref_frames in the sequence parameter sets.

This parameter is an integer.

The integer value must be consistent with profile/level parameters for a given frame size, since they determine reference picture and buffer constraints for a decoder.
If P-pictures are allowed, the number should be greater than 0.
If B-pictures are allowed, the number should be greater than 1.
Note: If NumRefFrames is 0 it is automatically determined by the encoder.

The default value is 3. Supported values: from 0 to 16.

This setting controls how many frames can be referenced by P- and B-Frames. Higher values will usually result in a more efficient compression, but will also require more time for encoding.

Note
Hardware encoders support: Intel QuickSync, AMD VCE (only OpenVideo), NVIDIA NVENC.
const char NumSlices[] = "ENCODER_H264_NUM_SLICES"
static

H.264 Video: Number of slices per frame/field.

This parameter is an integer.

The integer value cannot exceed the number of macro blocks per frame/field.
A frame/field is divided into equal parts except for the last one that can be shorter.

The default value is 0 (auto).

Note
Hardware encoders support: Intel QuickSync, NVIDIA NVENC.
const char PictureCodingType[] = "ENCODER_H264_PIC_CODING_TYPE"
static

H.264 Video: Picture coding type.

This parameter is an integer.

The supported values are defined in the primo::codecs::H264PicCodingType::Enum. The default value is H264PicCodingType::Frames.

Note
Hardware encoders support: None.
const char Profile[] = "ENCODER_H264_PROFILE_IDC"
static

H.264 Video: Encoding profile.

This parameter is an integer.

The supported values are defined in the primo::codecs::H264Profile::Enum. The default value is H264Profile::Main.

Sets the value of the profile_idc syntax element.

Note
Hardware encoders support: Intel QuickSync, AMD VCE, NVIDIA NVENC.
See Also
primo::codecs::H264Profile::Enum
H264::EntropyCodingMode
H264::NumBFrames
H264::Transform8x8
const char QualitySpeed[] = "ENCODER_H264_QUALITY_SPEED"
static

H.264 Video: Quality/Speed trade off.

This parameter is an integer.

Supported values range from 0 to 6 where 0 means max speed and 6 means max quality. The default value is 0.

Note
Hardware encoders support: Intel QuickSync.
const char RateControlMethod[] = "ENCODER_H264_RATE_CONTROL_METHOD"
static

H.264 Video: Rate control method.

This parameter is an integer.

The supported values are defined in the primo::codecs::H264RateControlMethod::Enum. The default value is H264RateControlMethod::ABR.

Note
Hardware encoders support: Intel QuickSync, AMD VCE, NVIDIA NVENC.
See Also
H264::RateControlQuantI
H264::RateControlQuantP
H264::RateControlQuantB
const char RateControlQuantB[] = "ENCODER_H264_RATE_CONTROL_QUANT_B"
static

H.264 Video: Rate control quantizer for B slices.

Used only when RateControlMethod is set to Constant Quantization.

This parameter is an integer.

Supported values range: from 0 to 51. The default value is 20.

Note
Hardware encoders support: Intel QuickSync, AMD VCE, NVIDIA NVENC.
See Also
H264::RateControlMethod
const char RateControlQuantI[] = "ENCODER_H264_RATE_CONTROL_QUANT_I"
static

H.264 Video: Rate control quantizer for I slices.

Used only when RateControlMethod is set to Constant Quantization.

This parameter is an integer.

Supported values range: from 0 to 51. The default value is 20.

Note
Hardware encoders support: Intel QuickSync, AMD VCE, NVIDIA NVENC.
See Also
H264::RateControlMethod
const char RateControlQuantP[] = "ENCODER_H264_RATE_CONTROL_QUANT_P"
static

H.264 Video: Rate control quantizer for P slices.

Used only when RateControlMethod is set to Constant Quantization.

This parameter is an integer.

Supported values range: from 0 to 51. The default value is 20.

Note
Hardware encoders support: Intel QuickSync, AMD VCE, NVIDIA NVENC.
See Also
H264::RateControlMethod
const char Transform8x8[] = "ENCODER_H264_TRANSFORM8X8"
static

H.264 Video: Transform 8x8 mode.

This parameter is a boolean value expressed as an integer (1|0).

Supported modes are:

0 - Disabled. Only 4x4 transforms are used.
1 - Enabled. Allows the additional use of 8x8 transform.

The default is Disabled (0).

Transform 8x8 improves the visual quality at a minor speed cost.

Transform 8x8 is supported at High, High10, High422 and High444. 8x8 transform is not supported at Main and Baseline profiles.

Note
Hardware encoders support: None.
See Also
H264::Profile
const char TreatBFramesAsReference[] = "ENCODER_H264_TREAT_B_FRAMES_AS_REFERENCE"
static

H.264 Video: Allows B-pictures to be used as reference pictures.

This parameter is a boolean value expressed as an integer (1|0).

The default value is 0 (False).

Note
Hardware encoders support: Intel QuickSync.
See Also
H264::NumBFrames