pub struct Backend {
api: *const x265_api,
params: *mut x265_param,
encoder: *mut x265_encoder,
layout: InputLayout,
pictures: [[Vec<u64>; 3]; 2],
aligned: [[usize; 3]; 2],
current: usize,
}Fields§
§api: *const x265_api§params: *mut x265_param§encoder: *mut x265_encoder§layout: InputLayoutHow the session lays out a source picture, which pictures follow.
pictures: [[Vec<u64>; 3]; 2]Two pictures, three planes each, converted into in turn: x265 reads a picture through
the encode it is passed to, and the other holds the frame before while it is read.
Each plane is 64-byte aligned within its buffer at aligned.
aligned: [[usize; 3]; 2]§current: usizeImplementations§
Source§impl Backend
impl Backend
pub const LIBRARY: &'static str = "x265"
pub const FULLCOLOR: bool = true
pub const KEY_ON_REQUEST: bool = true
pub const HOLDS_QUANTIZER: bool = true
pub const REFINES: bool = true
pub const CONSTANT_BLOCKS: bool = true
Sourcepub const REFINE_FINER: u32 = 6
pub const REFINE_FINER: u32 = 6
Quality index steps finer than the paint-over one x265 codes a refined block at
(FrameEncoder::refines). Its ultrafast analysis settles many a still block on its merge
candidate before the offset’s quantizer counts, so refining takes 1080p text beside a video
less far than its cleanup of the still screen does, and every step finer gains: at 8 Mbit/s
from 31.1 dB to 34.2, 35.5, and 36.3 at 0, 3, and 6 steps finer, against 46.4 still; at a
constant quality from 37.7 to 40.7, 41.6, and 42.7, against 49.6; the video losing 0.3 dB.
Sourcepub fn ten_bit() -> bool
pub fn ten_bit() -> bool
Whether the linked x265 carries a 10-bit encoder beside its 8-bit one, which is a property of how the library was built.
fn set(&self, name: &str, value: &str) -> Result<(), String>
Sourcefn rate_options(rate: RateSettings, q: u32) -> Vec<(&'static str, String)>
fn rate_options(rate: RateSettings, q: u32) -> Vec<(&'static str, String)>
The rate-control options of rate at quantizer q: a constant rate held to its
VBV with the quantizer capped at 51, since the library’s default ceiling admits
out-of-spec quantizers that only force skips on a VBV underflow; else a constant
rate factor.
pub fn open( width: usize, height: usize, threads: i32, i444: bool, bit_depth: u32, rate: RateSettings, q: u32, ) -> Result<Self, String>
Sourcefn plane(&mut self, picture: usize, p: usize) -> (*mut u8, usize)
fn plane(&mut self, picture: usize, p: usize) -> (*mut u8, usize)
The first pixel of plane p of picture picture, and the bytes from it to the
buffer’s end.
Sourcepub fn encode(
&mut self,
planes: &mut Planes,
pixels: &[u8],
stride: usize,
rgba: bool,
full_range: bool,
threads: usize,
pts: u64,
key: bool,
held: Option<u32>,
offsets: Option<&mut [f32]>,
constant: Option<&mut [u8]>,
) -> Result<Option<Coded>, String>
pub fn encode( &mut self, planes: &mut Planes, pixels: &[u8], stride: usize, rgba: bool, full_range: bool, threads: usize, pts: u64, key: bool, held: Option<u32>, offsets: Option<&mut [f32]>, constant: Option<&mut [u8]>, ) -> Result<Option<Coded>, String>
Convert the host frame into the next in-place picture and encode it there.
constant marks the 16x16 blocks x265 codes as skips without analysis.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Backend
impl !Sync for Backend
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
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
§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> 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