Skip to main content

SwsContext

Struct SwsContext 

Source
#[repr(C)]
pub struct SwsContext {
Show 21 fields pub av_class: *const AVClass, pub opaque: *mut c_void, pub flags: u32, pub scaler_params: [f64; 2], pub threads: i32, pub dither: u32, pub alpha_blend: u32, pub gamma_flag: i32, pub src_w: i32, pub src_h: i32, pub dst_w: i32, pub dst_h: i32, pub src_format: i32, pub dst_format: i32, pub src_range: i32, pub dst_range: i32, pub src_v_chr_pos: i32, pub src_h_chr_pos: i32, pub dst_v_chr_pos: i32, pub dst_h_chr_pos: i32, pub intent: i32,
}
Expand description

Main external API structure. New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. sizeof(SwsContext) is not part of the ABI.

Fields§

§av_class: *const AVClass§opaque: *mut c_void

Private data of the user, can be used to carry app specific stuff.

§flags: u32

Bitmask of SWS_*. See SwsFlags for details.

§scaler_params: [f64; 2]

Extra parameters for fine-tuning certain scalers.

§threads: i32

How many threads to use for processing, or 0 for automatic selection.

§dither: u32

Dither mode.

§alpha_blend: u32

Alpha blending mode. See SwsAlphaBlend for details.

§gamma_flag: i32

Use gamma correct scaling.

§src_w: i32

< Width and height of the source frame

§src_h: i32

< Width and height of the source frame

§dst_w: i32

< Width and height of the destination frame

§dst_h: i32

< Width and height of the destination frame

§src_format: i32

< Source pixel format

§dst_format: i32

< Destination pixel format

§src_range: i32

< Source is full range

§dst_range: i32

< Destination is full range

§src_v_chr_pos: i32

< Source vertical chroma position in luma grid / 256

§src_h_chr_pos: i32

< Source horizontal chroma position

§dst_v_chr_pos: i32

< Destination vertical chroma position

§dst_h_chr_pos: i32

< Destination horizontal chroma position

§intent: i32

Desired ICC intent for color space conversions.

Trait Implementations§

Source§

impl Clone for SwsContext

Source§

fn clone(&self) -> SwsContext

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SwsContext

Source§

impl Debug for SwsContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.