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

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

Variables

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

Detailed Description

Parameters specific to 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).

const char DeblockingFilter[] = "ENCODER_H264_DEBLOCKING_FILTER_IDC" [static]

H.264 Video: De-blocking filter mode.

This parameter is an integer.

Supported modes are:

0 - On,
1 - Off,
2 - On, but the algorithm does not cross the slice borders.

The default value is 0 (On).

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

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.

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.

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.

Supported modes:

0 - Temporal,
1 - Spatial

The default value is 0 (Temporal).

const char EntropyCodingMode[] = "ENCODER_H264_ENTROPY_CODING_MODE" [static]

H.264 Video: Entropy coding mode.

This parameter is an integer.

Supported values:

0 - CAVLC. Context-Adaptive Variable-Length Coding
1 - CABAC. Context-Adaptive Binary Arithmetic Coding

The default value is 1 (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. CABAC is not supported at Baseline profile.

See also:
H264::Profile
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.

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 250.

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.

const char MEMethod[] = "ENCODER_H264_ME_METHOD" [static]

H.264 Video: Motion estimation method.

This parameter is an integer.

Supported methods are:

0 - Full (slowest),
1 - TDL (Two Dimensional Logarithmic Search),
2 - Log,
3 - EPZS (Enhanced Predictive Zonal Search),
4 - OSA (Full orthogonal),
5 - Log orthogonal,
8 - UMH (Uneven Multi-Hexagon Search)

The default value is 2 (Log).

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.

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.

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.

Supported modes are:

0 - Only 16x16 blocks,
1 - All blocks down to 8x8,
2 - All blocks down to 4x4.

The default value is 1.

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

See also:
H264::Profile
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.

The default value is 1. Supported values range: 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.

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).

const char PictureCodingType[] = "ENCODER_H264_PIC_CODING_TYPE" [static]

H.264 Video: Picture coding type.

This parameter is an integer.

Supported types are:

0 - Frames,
1 - Fields.

The default value is 0 (Frames).

const char Profile[] = "ENCODER_H264_PROFILE_IDC" [static]

H.264 Video: Encoding profile.

This parameter is an integer.

Supported values:

0 - None/Auto,
66 - Baseline,
77 - Main,
100 - High,
110 - High10,
122 - High422,
144 - High444

The default value is 100 (High).

Sets the value of the profile_idc syntax element.

Note: Make sure that the other encoding parameters are set in accordance with the profile setting. If there is an encoding parameter that is not supported at the specfied profile then the encoder will use a higher profile. For example: If the profile is set to Baseline and CABAC is enabled then the encoder will use Main profile. CABAC is not supported at Baseline profile.

See also:
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 4 where 0 means max speed and 4 means max quality. The default value is 0.

const char RateControlMethod[] = "ENCODER_H264_RATE_CONTROL_METHOD" [static]

H.264 Video: Rate control method.

This parameter is an integer.

Supported methods are:

2 - ABR (Average Bitrate). ABR encoding ensures that the output stream achieves a predictable long-term average bitrate.

3 - Constant Quantization. Encodes the video to a constant quantizer. The encoder uses the specified target quantizer, not a target bitrate. The quantizer is a measure for the amount of data loss: a higher quantizer means that more data will be lost, which results in a better compression, but also delivers worse visual quality. This method could be used when a certain level of quality is required and the final bitrate is not a concern. The bitrate is unpredictable in this mode.

The default value is 2 (ABR).

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.

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.

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.

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 Enabled (1).

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.

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 1 (True).

See also:
H264::NumBFrames
 All Classes Namespaces Files Functions Variables Enumerations Enumerator