Struct dolby_vision::rpu::dovi_rpu::DoviRpu
source · pub struct DoviRpu {
pub dovi_profile: u8,
pub el_type: Option<DoviELType>,
pub header: RpuDataHeader,
pub rpu_data_mapping: Option<RpuDataMapping>,
pub vdr_dm_data: Option<VdrDmData>,
pub remaining: Option<BitVec<u8, Msb0>>,
pub rpu_data_crc32: u32,
pub modified: bool,
/* private fields */
}
Fields§
§dovi_profile: u8
§el_type: Option<DoviELType>
§header: RpuDataHeader
§rpu_data_mapping: Option<RpuDataMapping>
§vdr_dm_data: Option<VdrDmData>
§remaining: Option<BitVec<u8, Msb0>>
§rpu_data_crc32: u32
§modified: bool
Implementations§
source§impl DoviRpu
impl DoviRpu
pub fn validated_trimmed_data(data: &[u8]) -> Result<&[u8]>
sourcepub fn parse_unspec62_nalu(data: &[u8]) -> Result<DoviRpu>
pub fn parse_unspec62_nalu(data: &[u8]) -> Result<DoviRpu>
HEVC UNSPEC62 NALU, clears start code emulation prevention 3 bytes
sourcepub fn parse_itu_t35_dovi_metadata_obu(data: &[u8]) -> Result<Self>
pub fn parse_itu_t35_dovi_metadata_obu(data: &[u8]) -> Result<Self>
Parse AV1 ITU-T T.35 metadata OBU into a DoviRpu
The payload is extracted out of the EMDF wrapper
pub fn parse_rpu(data: &[u8]) -> Result<DoviRpu>
pub fn write_hevc_unspec62_nalu(&self) -> Result<Vec<u8>>
pub fn write_rpu(&self) -> Result<Vec<u8>>
sourcepub fn write_av1_rpu_metadata_obu_t35_payload(&self) -> Result<Vec<u8>>
pub fn write_av1_rpu_metadata_obu_t35_payload(&self) -> Result<Vec<u8>>
itu_t_t35_payload_bytes
sourcepub fn write_av1_rpu_metadata_obu_t35_complete(&self) -> Result<Vec<u8>>
pub fn write_av1_rpu_metadata_obu_t35_complete(&self) -> Result<Vec<u8>>
Complete metadata_itut_t35()
, including itu_t_t35_country_code
pub fn get_enhancement_layer_type(&self) -> Option<DoviELType>
sourcepub fn convert_with_mode<T: Into<ConversionMode>>(
&mut self,
mode: T
) -> Result<()>
pub fn convert_with_mode<T: Into<ConversionMode>>( &mut self, mode: T ) -> Result<()>
Modes: - 0: Don’t modify the RPU - 1: Converts the RPU to be MEL compatible - 2: Converts the RPU to be profile 8.1 compatible. Both luma and chroma mapping curves are set to no-op. This mode handles source profiles 5, 7 and 8. - 3: Converts to static profile 8.4 - 4: Converts to profile 8.1 preserving luma and chroma mapping. Old mode 2 behaviour.
noop when profile 8 and mode 2 is used
pub fn profile5_config(config: &GenerateConfig) -> Result<Self>
pub fn profile81_config(config: &GenerateConfig) -> Result<Self>
sourcepub fn crop(&mut self) -> Result<()>
pub fn crop(&mut self) -> Result<()>
Set existing L5 metadata to zero offsets If there is no L5 metadata, creates it with zero offsets
pub fn set_active_area_offsets( &mut self, left: u16, right: u16, top: u16, bottom: u16 ) -> Result<()>
pub fn remove_mapping(&mut self)
pub fn parse_list_of_unspec62_nalus(data: &[Vec<u8>]) -> Vec<DoviRpu>
pub fn profile84_config(config: &GenerateConfig) -> Result<Self>
pub fn remove_cmv40_extension_metadata(&mut self) -> Result<()>
pub fn replace_levels_from_rpu( &mut self, src_rpu: &Self, levels: &Vec<u8> ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DoviRpu
impl RefUnwindSafe for DoviRpu
impl Send for DoviRpu
impl Sync for DoviRpu
impl Unpin for DoviRpu
impl UnwindSafe for DoviRpu
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.