[−][src]Struct libaom_sys::aom_codec_enc_cfg
Encoder configuration structure
This structure contains the encoder settings that have common representations across all codecs. This doesn't imply that all codecs support all features, however.
Fields
g_usage: c_uint
Algorithm specific "usage" value
Algorithms may define multiple values for usage, which may convey the intent of how the application intends to use the stream. If this value is non-zero, consult the documentation for the codec to determine its meaning.
g_threads: c_uint
Maximum number of threads to use
For multi-threaded implementations, use no more than this number of threads. The codec may use fewer threads than allowed. The value 0 is equivalent to the value 1.
g_profile: c_uint
profile of bitstream to use
g_w: c_uint
Width of the frame
This value identifies the presentation resolution of the frame, in pixels. Note that the frames passed as input to the encoder must have this resolution. Frames will be presented by the decoder in this resolution, independent of any spatial resampling the encoder may do.
g_h: c_uint
Height of the frame
This value identifies the presentation resolution of the frame, in pixels. Note that the frames passed as input to the encoder must have this resolution. Frames will be presented by the decoder in this resolution, independent of any spatial resampling the encoder may do.
g_limit: c_uint
Max number of frames to encode
g_forced_max_frame_width: c_uint
Forced maximum width of the frame
If this value is non-zero then it is used to force the maximum frame width written in write_sequence_header().
g_forced_max_frame_height: c_uint
Forced maximum height of the frame
If this value is non-zero then it is used to force the maximum frame height written in write_sequence_header().
g_bit_depth: aom_bit_depth_t
Bit-depth of the codec
This value identifies the bit_depth of the codec, Only certain bit-depths are supported as identified in the aom_bit_depth_t enum.
g_input_bit_depth: c_uint
Bit-depth of the input frames
This value identifies the bit_depth of the input frames in bits. Note that the frames passed as input to the encoder must have this bit-depth.
g_timebase: aom_rational
Stream timebase units
Indicates the smallest interval of time, in seconds, used by the stream. For fixed frame rate material, or variable frame rate material where frames are timed at a multiple of a given clock (ex: video capture), the \ref RECOMMENDED method is to set the timebase to the reciprocal of the frame rate (ex: 1001/30000 for 29.970 Hz NTSC). This allows the pts to correspond to the frame number, which can be handy. For re-encoding video from containers with absolute time timestamps, the \ref RECOMMENDED method is to set the timebase to that of the parent container or multimedia framework (ex: 1/1000 for ms, as in FLV).
g_error_resilient: aom_codec_er_flags_t
Enable error resilient modes.
The error resilient bitfield indicates to the encoder which features it should enable to take measures for streaming over lossy or noisy links.
g_pass: aom_enc_pass
Multi-pass Encoding Mode
This value should be set to the current phase for multi-pass encoding. For single pass, set to #AOM_RC_ONE_PASS.
g_lag_in_frames: c_uint
Allow lagged encoding
If set, this value allows the encoder to consume a number of input frames before producing output frames. This allows the encoder to base decisions for the current frame on future frames. This does increase the latency of the encoding pipeline, so it is not appropriate in all situations (ex: realtime encoding).
Note that this is a maximum value -- the encoder may produce frames sooner than the given limit. Set this value to 0 to disable this feature.
rc_dropframe_thresh: c_uint
Temporal resampling configuration, if supported by the codec.
Temporal resampling allows the codec to "drop" frames as a strategy to meet its target data rate. This can cause temporal discontinuities in the encoded video, which may appear as stuttering during playback. This trade-off is often acceptable, but for many applications is not. It can be disabled in these cases.
Note that not all codecs support this feature. All aom AVx codecs do. For other codecs, consult the documentation for that algorithm.
This threshold is described as a percentage of the target data buffer. When the data buffer falls below this percentage of fullness, a dropped frame is indicated. Set the threshold to zero (0) to disable this feature.
rc_resize_mode: c_uint
Mode for spatial resampling, if supported by the codec.
Spatial resampling allows the codec to compress a lower resolution version of the frame, which is then upscaled by the decoder to the correct presentation resolution. This increases visual quality at low data rates, at the expense of CPU time on the encoder/decoder.
rc_resize_denominator: c_uint
Frame resize denominator.
The denominator for resize to use, assuming 8 as the numerator.
Valid denominators are 8 - 16 for now.
rc_resize_kf_denominator: c_uint
Keyframe resize denominator.
The denominator for resize to use, assuming 8 as the numerator.
Valid denominators are 8 - 16 for now.
rc_superres_mode: aom_superres_mode
Frame super-resolution scaling mode.
Similar to spatial resampling, frame super-resolution integrates upscaling after the encode/decode process. Taking control of upscaling and using restoration filters should allow it to outperform normal resizing.
rc_superres_denominator: c_uint
Frame super-resolution denominator.
The denominator for superres to use. If fixed it will only change if the cumulative scale change over resizing and superres is greater than 1/2; this forces superres to reduce scaling.
Valid denominators are 8 to 16.
Used only by AOM_SUPERRES_FIXED.
rc_superres_kf_denominator: c_uint
Keyframe super-resolution denominator.
The denominator for superres to use. If fixed it will only change if the cumulative scale change over resizing and superres is greater than 1/2; this forces superres to reduce scaling.
Valid denominators are 8 - 16 for now.
rc_superres_qthresh: c_uint
Frame super-resolution q threshold.
The q level threshold after which superres is used. Valid values are 1 to 63.
Used only by AOM_SUPERRES_QTHRESH
rc_superres_kf_qthresh: c_uint
Keyframe super-resolution q threshold.
The q level threshold after which superres is used for key frames. Valid values are 1 to 63.
Used only by AOM_SUPERRES_QTHRESH
rc_end_usage: aom_rc_mode
Rate control algorithm to use.
Indicates whether the end usage of this stream is to be streamed over a bandwidth constrained link, indicating that Constant Bit Rate (CBR) mode should be used, or whether it will be played back on a high bandwidth link, as from a local disk, where higher variations in bitrate are acceptable.
rc_twopass_stats_in: aom_fixed_buf_t
Two-pass stats buffer.
A buffer containing all of the stats packets produced in the first pass, concatenated.
rc_firstpass_mb_stats_in: aom_fixed_buf_t
first pass mb stats buffer.
A buffer containing all of the first pass mb stats packets produced in the first pass, concatenated.
rc_target_bitrate: c_uint
Target data rate
Target bandwidth to use for this stream, in kilobits per second.
rc_min_quantizer: c_uint
Minimum (Best Quality) Quantizer
The quantizer is the most direct control over the quality of the encoded image. The range of valid values for the quantizer is codec specific. Consult the documentation for the codec to determine the values to use. To determine the range programmatically, call aom_codec_enc_config_default() with a usage value of 0.
rc_max_quantizer: c_uint
Maximum (Worst Quality) Quantizer
The quantizer is the most direct control over the quality of the encoded image. The range of valid values for the quantizer is codec specific. Consult the documentation for the codec to determine the values to use. To determine the range programmatically, call aom_codec_enc_config_default() with a usage value of 0.
rc_undershoot_pct: c_uint
Rate control adaptation undershoot control
This value, controls the tolerance of the VBR algorithm to undershoot and is used as a trigger threshold for more agressive adaptation of Q.
Valid values in the range 0-100.
rc_overshoot_pct: c_uint
Rate control adaptation overshoot control
This value, controls the tolerance of the VBR algorithm to overshoot and is used as a trigger threshold for more agressive adaptation of Q.
Valid values in the range 0-1000.
rc_buf_sz: c_uint
Decoder Buffer Size
This value indicates the amount of data that may be buffered by the decoding application. Note that this value is expressed in units of time (milliseconds). For example, a value of 5000 indicates that the client will buffer (at least) 5000ms worth of encoded data. Use the target bitrate (#rc_target_bitrate) to convert to bits/bytes, if necessary.
rc_buf_initial_sz: c_uint
Decoder Buffer Initial Size
This value indicates the amount of data that will be buffered by the decoding application prior to beginning playback. This value is expressed in units of time (milliseconds). Use the target bitrate (#rc_target_bitrate) to convert to bits/bytes, if necessary.
rc_buf_optimal_sz: c_uint
Decoder Buffer Optimal Size
This value indicates the amount of data that the encoder should try to maintain in the decoder's buffer. This value is expressed in units of time (milliseconds). Use the target bitrate (#rc_target_bitrate) to convert to bits/bytes, if necessary.
rc_2pass_vbr_bias_pct: c_uint
Two-pass mode CBR/VBR bias
Bias, expressed on a scale of 0 to 100, for determining target size for the current frame. The value 0 indicates the optimal CBR mode value should be used. The value 100 indicates the optimal VBR mode value should be used. Values in between indicate which way the encoder should "lean."
rc_2pass_vbr_minsection_pct: c_uint
Two-pass mode per-GOP minimum bitrate
This value, expressed as a percentage of the target bitrate, indicates the minimum bitrate to be used for a single GOP (aka "section")
rc_2pass_vbr_maxsection_pct: c_uint
Two-pass mode per-GOP maximum bitrate
This value, expressed as a percentage of the target bitrate, indicates the maximum bitrate to be used for a single GOP (aka "section")
fwd_kf_enabled: c_int
Option to enable forward reference key frame
kf_mode: aom_kf_mode
Keyframe placement mode
This value indicates whether the encoder should place keyframes at a fixed interval, or determine the optimal placement automatically (as governed by the #kf_min_dist and #kf_max_dist parameters)
kf_min_dist: c_uint
Keyframe minimum interval
This value, expressed as a number of frames, prevents the encoder from placing a keyframe nearer than kf_min_dist to the previous keyframe. At least kf_min_dist frames non-keyframes will be coded before the next keyframe. Set kf_min_dist equal to kf_max_dist for a fixed interval.
kf_max_dist: c_uint
Keyframe maximum interval
This value, expressed as a number of frames, forces the encoder to code a keyframe if one has not been coded in the last kf_max_dist frames. A value of 0 implies all frames will be keyframes. Set kf_min_dist equal to kf_max_dist for a fixed interval.
sframe_dist: c_uint
sframe interval
This value, expressed as a number of frames, forces the encoder to code an S-Frame every sframe_dist frames.
sframe_mode: c_uint
sframe insertion mode
This value must be set to 1 or 2, and tells the encoder how to insert S-Frames. It will only have an effect if sframe_dist != 0.
If altref is enabled:
- if sframe_mode == 1, the considered frame will be made into an S-Frame only if it is an altref frame
- if sframe_mode == 2, the next altref frame will be made into an S-Frame.
Otherwise: the considered frame will be made into an S-Frame.
large_scale_tile: c_uint
Tile coding mode
This value indicates the tile coding mode. A value of 0 implies a normal non-large-scale tile coding. A value of 1 implies a large-scale tile coding.
monochrome: c_uint
Monochrome mode
If this is nonzero, the encoder will generate a monochrome stream with no chroma planes.
full_still_picture_hdr: c_uint
full_still_picture_hdr
If this is nonzero, the encoder will generate a full header even for still picture encoding. if zero, a reduced header is used for still picture. This flag has no effect when a regular video with more than a single frame is encoded.
save_as_annexb: c_uint
Bitstream syntax mode
This value indicates the bitstream syntax mode. A value of 0 indicates bitstream is saved as Section 5 bitstream. A value of 1 indicates the bitstream is saved in Annex-B format
tile_width_count: c_int
Number of explicit tile widths specified
This value indicates the number of tile widths specified A value of 0 implies no tile widths are specified. Tile widths are given in the array tile_widths[]
tile_height_count: c_int
Number of explicit tile heights specified
This value indicates the number of tile heights specified A value of 0 implies no tile heights are specified. Tile heights are given in the array tile_heights[]
tile_widths: [c_int; 64]
Array of specified tile widths
This array specifies tile widths (and may be empty) The number of widths specified is given by tile_width_count
tile_heights: [c_int; 64]
Array of specified tile heights
This array specifies tile heights (and may be empty) The number of heights specified is given by tile_height_count
use_fixed_qp_offsets: c_uint
Whether encoder should use fixed QP offsets.
If a value of 1 is provided, encoder will use fixed QP offsets for frames at different levels of the pyramid.
- If 'fixed_qp_offsets' is also provided, encoder will use the given offsets
- If not, encoder will select the fixed offsets based on the cq-level provided. If a value of 0 is provided and fixed_qp_offset are not provided, encoder will NOT use fixed QP offsets. Note: This option is only relevant for --end-usage=q.
fixed_qp_offsets: [c_int; 5]
Array of fixed QP offsets
This array specifies fixed QP offsets (range: 0 to 63) for frames at different levels of the pyramid. It is a comma-separated list of 5 values:
- QP offset for keyframe
- QP offset for ALTREF frame
- QP offset for 1st level internal ARF
- QP offset for 2nd level internal ARF
- QP offset for 3rd level internal ARF Notes:
- QP offset for leaf level frames is not explicitly specified. These frames use the worst quality allowed (--cq-level).
- This option is only relevant for --end-usage=q.
encoder_cfg: cfg_options_t
Options defined per config file
Trait Implementations
impl Clone for aom_codec_enc_cfg
[src]
fn clone(&self) -> aom_codec_enc_cfg
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for aom_codec_enc_cfg
[src]
Auto Trait Implementations
impl RefUnwindSafe for aom_codec_enc_cfg
impl !Send for aom_codec_enc_cfg
impl !Sync for aom_codec_enc_cfg
impl Unpin for aom_codec_enc_cfg
impl UnwindSafe for aom_codec_enc_cfg
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,