Skip to content

Commit

Permalink
Derive traits for Rec709 and RecOetf
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Aug 11, 2024
1 parent d24d8f1 commit b120695
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions palette/src/encoding/rec_standards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ impl LumaStandard for Rec2020 {
/// `Rec709` will not use any kind of approximation when converting from `T` to
/// `T`. This involves calls to `powf`, which may make it too slow for certain
/// applications.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct Rec709;

impl RgbStandard for Rec709 {
Expand All @@ -99,6 +100,7 @@ impl LumaStandard for Rec709 {

/// The opto-electronic transfer function used in standard dynamic range (SDR)
/// standards by the ITU-R such as [`Rec709`] and [`Rec2020`].
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct RecOetf;

const ALPHA: f64 = 1.09929682680944;
Expand Down

0 comments on commit b120695

Please sign in to comment.