pub enum D3d11NvencInputFormat {
Nv12,
Bgra,
}d3d11 only.Expand description
Which D3D11 texture format this encoder’s input frames carry. This is
the sw_format of the encoder’s own hw frames context, fixed at
avcodec_open2 time like every other codec parameter — it is not
inferred from the first frame, for the same reason
crate::elements::SwEncoderOptions takes width/height up front.
Both variants were verified against h264_nvenc/hevc_nvenc on real
hardware. D3d11NvencInputFormat::Bgra is what makes a screen
recording need no color conversion at all: D3d11VideoCompositor and
DxgiCaptureSource’s GPU mode both produce BGRA textures, and NVENC
converts to its own internal YUV as part of encoding.
Variants§
Nv12
DXGI_FORMAT_NV12 — what crate::elements::D3d11Upload and
crate::elements::D3d11Decoder produce.
Bgra
DXGI_FORMAT_B8G8R8A8_UNORM — what
crate::elements::D3d11VideoCompositor and
crate::elements::DxgiCaptureSource’s GPU mode produce.
Trait Implementations§
Source§impl Clone for D3d11NvencInputFormat
impl Clone for D3d11NvencInputFormat
Source§fn clone(&self) -> D3d11NvencInputFormat
fn clone(&self) -> D3d11NvencInputFormat
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more