Skip to main content

Module tuning

Module tuning 

Source
Expand description

AV1 encoder tuning adapter.

Translates a single backend-agnostic perceptual quality target into per-encoder parameters so identical inputs yield visually consistent output across rav1e, NVENC AV1, and future backends (SVT-AV1, AMF, QSV).

See docs/av1-tuning-research.md for the source tables and docs/av1-tuning-methodology.md for how to re-calibrate when a new encoder lands.

§Design

The user picks two things:

  1. A QualityTarget — perceptual goal expressed in VMAF/SSIMULACRA2 bands, not encoder-native CRF. Every backend must reach roughly the same VMAF for a given target (±2 VMAF band).
  2. A SpeedTier — how much wallclock to spend getting there. Maps to encoder-native speed presets.

The adapter also takes (width, height) because tile grid and lookahead sizing depend on frame size.

Structs§

AmfAv1Params
Concrete parameters for AMD AMF AV1 (VCN on RDNA3+).
NvencAv1Params
Concrete parameters for NVENC AV1 (NV_ENC_CONFIG + NV_ENC_RC_PARAMS).
QsvAv1Params
Concrete parameters for Intel QSV AV1 (oneVPL on Arc / Meteor Lake+).
Rav1eParams
Concrete parameters for rav1e’s EncoderConfig.

Enums§

AmfQualityPreset
AMF AV1 quality presets. Values match AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_* constants from the GPUOpen AMF wiki. Lower = better quality / more wall-clock. The transcode service never picks Speed (same rationale as NVENC: no low-latency presets in this service — see research §2.4).
AmfRateControl
AMF AV1 rate control modes actually used by this service. Values match AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_*.
NvencRateControl
NVENC rate control modes actually used by this service. The numeric value matches the SDK’s NV_ENC_PARAMS_RC_MODE.
QsvRateControl
QSV AV1 rate control mode values match MFX_RATECONTROL_* in oneVPL/include/vpl/mfxstructs.h.
QualityTarget
A single perceptual quality target, backend-agnostic.
SpeedTier
User-facing speed tier — maps to encoder-native speed presets.

Constants§

MFX_CODINGOPTION_OFF
oneVPL tri-state option values (from MFX_CODINGOPTION_*). Used for LowPower and a handful of other mfxU16 toggles.
MFX_CODINGOPTION_ON
Not currently used but named so the value shows up next to OFF whenever a future code path wants explicit on-switching.
NVENC_TUNING_HIGH_QUALITY
SDK constant NV_ENC_TUNING_INFO_HIGH_QUALITY = 1.

Functions§

amf_av1_params
Derive AMD AMF AV1 params for a given quality target + speed tier + resolution.
libaom_cq_for_target
libaom cq-level that corresponds to a given QualityTarget. libaom is the cross-encoder reference: we equalize other encoders to libaom’s VMAF at each CQ.
nvenc_av1_params
Derive NVENC AV1 params for a given quality target + speed tier + resolution.
qsv_av1_params
Derive Intel QSV AV1 params for a given quality target + speed tier + resolution.
rav1e_params
Derive rav1e params for a given quality target + speed tier + resolution.