Skip to main content

_VAProcFilterParameterBuffer3DLUT

Struct _VAProcFilterParameterBuffer3DLUT 

Source
#[repr(C)]
pub struct _VAProcFilterParameterBuffer3DLUT { pub type_: VAProcFilterType, pub lut_surface: VASurfaceID, pub lut_size: u16, pub lut_stride: [u16; 3], pub bit_depth: u16, pub num_channel: u16, pub channel_mapping: u32, pub va_reserved: [u32; 16], }
Expand description

\brief 3DLUT filter parametrization.

3DLUT (Three Dimensional Look Up Table) is often used when converting an image or a video frame from one color representation to another, for example, when converting log and gamma encodings, changing the color space, applying a color correction, changing the dynamic range, gamut mapping etc.

This buffer defines 3DLUT attributes and memory layout. The typical 3DLUT has fixed number(lut_size) per dimension and memory layout is 3 dimensional array as 3dlut[stride_0][stride_1][stride_2] (lut_size shall be smaller than stride_0/1/2).

API user should query hardware capability by using the VAProcFilterCap3DLUT to get the 3DLUT attributes which hardware supports, and use these attributes. For example, if the user queries hardware, the API user could get caps with 3dlut[33][33][64] (lut_size = 33, lut_stride[0/1/2] = 33/33/64). API user shall not use the attributes which hardware can not support.

3DLUT is usually used to transform input RGB/YUV values in one color space to output RGB values in another color space. Based on 1) the format and color space of VPP input and output and 2) 3DLUT memory layout and channel mapping, driver will enable some color space conversion implicitly if needed. For example, the input of VPP is P010 format in BT2020 color space, the output of VPP is NV12 in BT709 color space and the 3DLUT channel mapping is VA_3DLUT_CHANNEL_RGB_RGB, driver could build the data pipeline as P010(BT2020)->RGB(BT2020) ->3DULT(BT709)->NV12(BT709). Please note, the limitation of 3DLUT filter color space is that the color space of 3DLUT filter input data needs to be same as the input data of VPP; the color space of 3DLUT filter output data needs to be same as the output data of VPP; format does not have such limitation.

Fields§

§type_: VAProcFilterType

\brief Filter type. Shall be set to #VAProcFilter3DLUT.

§lut_surface: VASurfaceID

\brief lut_surface contains 3DLUT data in the 3DLUT memory layout, must be linear

§lut_size: u16

\brief lut_size is the number of valid points on every dimension of the three dimensional look up table. The size of LUT (lut_size) shall be same among every dimension of the three dimensional look up table. The size of LUT (lut_size) shall be smaller than lut_stride[0/1/2].

§lut_stride: [u16; 3]

\brief lut_stride are the number of points on every dimension of the three dimensional look up table. Three dimension can has 3 different stride, lut3d[lut_stride[0]][lut_stride[1]][lut_stride[2]]. But the valid point shall start from 0, the range of valid point is [0, lut_size-1] for every dimension.

§bit_depth: u16

\brief bit_depth is the number of bits for every channel R, G or B (or Y, U, V)

§num_channel: u16

\brief num_channel is the number of channels

§channel_mapping: u32

\brief channel_mapping defines the mapping of input and output channels, could be one of VA_3DLUT_CHANNEL_XXX

§va_reserved: [u32; 16]

\brief reserved bytes for future use, must be zero

Trait Implementations§

Source§

impl Clone for _VAProcFilterParameterBuffer3DLUT

Source§

fn clone(&self) -> _VAProcFilterParameterBuffer3DLUT

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 _VAProcFilterParameterBuffer3DLUT

Source§

impl Debug for _VAProcFilterParameterBuffer3DLUT

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for _VAProcFilterParameterBuffer3DLUT

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for _VAProcFilterParameterBuffer3DLUT

Source§

impl PartialEq for _VAProcFilterParameterBuffer3DLUT

Source§

fn eq(&self, other: &_VAProcFilterParameterBuffer3DLUT) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for _VAProcFilterParameterBuffer3DLUT

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.