Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

struct Dav1dContentLightLevel: backport size reduction from dav1d 1.3.0 #831

Merged
merged 2 commits into from
Mar 19, 2024
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
4 changes: 2 additions & 2 deletions include/dav1d/headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ enum Dav1dChromaSamplePosition {
};

typedef struct Dav1dContentLightLevel {
int max_content_light_level;
int max_frame_average_light_level;
uint16_t max_content_light_level;
uint16_t max_frame_average_light_level;
} Dav1dContentLightLevel;

typedef struct Dav1dMasteringDisplay {
Expand Down
4 changes: 2 additions & 2 deletions include/dav1d/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,8 @@ impl TryFrom<Dav1dChromaSamplePosition> for Rav1dChromaSamplePosition {

#[repr(C)]
pub struct Rav1dContentLightLevel {
pub max_content_light_level: c_int,
pub max_frame_average_light_level: c_int,
pub max_content_light_level: u16,
pub max_frame_average_light_level: u16,
}

pub type Dav1dContentLightLevel = Rav1dContentLightLevel;
Expand Down
4 changes: 2 additions & 2 deletions src/obu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2342,12 +2342,12 @@ unsafe fn parse_obus(
match ObuMetaType::from_repr(meta_type as usize) {
Some(ObuMetaType::HdrCll) => {
let debug = debug.named("CLLOBU");
let max_content_light_level = gb.get_bits(16) as c_int;
let max_content_light_level = gb.get_bits(16) as u16;
debug.log(
&gb,
format_args!("max-content-light-level: {max_content_light_level}"),
);
let max_frame_average_light_level = gb.get_bits(16) as c_int;
let max_frame_average_light_level = gb.get_bits(16) as u16;
debug.log(
&gb,
format_args!(
Expand Down
Loading