Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/include/dav1d/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,17 @@ impl From<Rav1dWarpedMotionParams> for Dav1dWarpedMotionParams {
}

// TODO(kkysen) Eventually the [`impl Default`] might not be needed.
/// Pixel layout of a frame.
#[derive(Clone, Copy, PartialEq, Eq, EnumCount, FromRepr, Default)]
pub enum Rav1dPixelLayout {
/// Monochrome.
#[default]
I400 = 0,
/// 4:2:0 planar.
I420 = 1,
/// 4:2:2 planar.
I422 = 2,
/// 4:4:4 planar.
I444 = 3,
}

Expand Down Expand Up @@ -753,17 +758,23 @@ impl TryFrom<Dav1dChromaSamplePosition> for Rav1dChromaSamplePosition {

#[repr(C)]
pub struct Rav1dContentLightLevel {
/// Maximum content light level (MaxCLL) in candela per square metre.
pub max_content_light_level: u16,
/// Maximum frame average light level (MaxFLL) in candela per square metre.
pub max_frame_average_light_level: u16,
}

pub type Dav1dContentLightLevel = Rav1dContentLightLevel;

#[repr(C)]
pub struct Rav1dMasteringDisplay {
/// Red/green/blue XY coordinates of primaries in CIE 1931 color space as 0.16 fixed-point number.
pub primaries: [[u16; 2]; 3],
/// XY coordinates of white point in CIE 1931 color space as 0.16 fixed-point number.
pub white_point: [u16; 2],
/// Maximum luminance in candela per square metre as 24.8 fixed-point number.
pub max_luminance: u32,
/// Minimum luminance in candela per square metre as 18.14 fixed-point number.
pub min_luminance: u32,
}

Expand Down
3 changes: 3 additions & 0 deletions src/include/dav1d/picture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ use crate::send_sync_non_null::SendSyncNonNull;
use crate::strided::Strided;
use crate::with_offset::WithOffset;

// Number of bytes to align AND pad picture memory buffers by, so that SIMD
// implementations can over-read by a few bytes, and use aligned read/write
// instructions.
pub(crate) const RAV1D_PICTURE_ALIGNMENT: usize = 64;
pub const DAV1D_PICTURE_ALIGNMENT: usize = RAV1D_PICTURE_ALIGNMENT;

Expand Down
Loading