pub(crate) struct NvencTuning {
pub preset: GUID,
pub multipass: NV_ENC_MULTI_PASS,
pub spatial_aq: bool,
pub temporal_aq: bool,
pub hevc_high_tier: bool,
pub slices: Option<u32>,
}Expand description
The encoder-side quality knobs of a session: the preset, the rate-control passes of a CBR
session, and adaptive quantization. Production sessions take the default, which the tuning
bench (gpu_bench_tuning) measures against the alternatives: P3 encodes a 1080p H.264
frame in 3.7 ms where P4 takes 5.2 ms on a V100, for 0.001 of SSIM at the same bitrate,
and the presets above P4 buy nothing; a single pass saves half a millisecond but overshoots
a CBR target by five to twelve percent; adaptive quantization moves neither time nor
quality measurably. The quarter-resolution first pass needs the 1.5-frame VBV vbv_bits
gives it: on a one-frame buffer its miss on a scene cut runs an 8 Mbit/s H.264 session at
13.7 Mbit/s (gpu_bench_cbr_rate_control). P3 holds on real content as well
(gpu_bench_tuning_on_content, scrolling text and a panned texture at 1080p to 2160p): on a
GTX 1080 and an RTX 4090 P1 encodes 0.5 to 2.4 ms sooner and P2 less, at most about 5% of the
glass to glass latency a session of that size measures (25, 41, and 81 ms over WebSockets),
and both code the text worse, by up to 0.8 dB in H.264 and 2.4 dB in AV1.
Fields§
§preset: GUID§multipass: NV_ENC_MULTI_PASS§spatial_aq: bool§temporal_aq: boolTemporal adaptive quantization, refused at open where the driver reports no support for it: a Volta HEVC session given it faults inside its first encode instead of failing to open.
hevc_high_tier: boolWhether an HEVC session declares the tier h265_tier names for its level; off opens the
same session at Main tier, the ceiling gpu_hevc_high_tier_opens_above_the_main_tier_ceiling
measures.
slices: Option<u32>Slices per H.264 and HEVC frame outside a band frame’s: None in production, which is
SLICES_PER_FRAME for H.264 and one for HEVC; a count to measure what slices cost
(gpu_bench_slices).
Trait Implementations§
Source§impl Clone for NvencTuning
impl Clone for NvencTuning
Source§fn clone(&self) -> NvencTuning
fn clone(&self) -> NvencTuning
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NvencTuning
Source§impl Debug for NvencTuning
impl Debug for NvencTuning
Auto Trait Implementations§
impl Freeze for NvencTuning
impl RefUnwindSafe for NvencTuning
impl Send for NvencTuning
impl Sync for NvencTuning
impl Unpin for NvencTuning
impl UnsafeUnpin for NvencTuning
impl UnwindSafe for NvencTuning
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().