pub struct Video {
pub filter: VideoFilter,
pub frame: Frame,
}Fields§
§filter: VideoFilter§frame: FrameImplementations§
Source§impl Video
impl Video
Sourcepub fn with_filter(filter: VideoFilter) -> Self
pub fn with_filter(filter: VideoFilter) -> Self
Create a new Video encoder with a filter.
Sourcepub fn apply_filter(&mut self, buffer: &[u16], frame_number: u32) -> &[u8] ⓘ
pub fn apply_filter(&mut self, buffer: &[u16], frame_number: u32) -> &[u8] ⓘ
Applies the given filter to the given video buffer and returns the result.
Sourcepub fn apply_filter_into(
&self,
buffer: &[u16],
frame_number: u32,
output: &mut [u8],
)
pub fn apply_filter_into( &self, buffer: &[u16], frame_number: u32, output: &mut [u8], )
Applies the given filter to the given video buffer by coping into the provided buffer.
Sourcepub fn decode_buffer(buffer: &[u16], output: &mut [u8])
pub fn decode_buffer(buffer: &[u16], output: &mut [u8])
Fills a fully rendered frame with RGB colors.
Sourcepub fn apply_ntsc_filter(buffer: &[u16], frame_number: u32, output: &mut [u8])
pub fn apply_ntsc_filter(buffer: &[u16], frame_number: u32, output: &mut [u8])
Applies the NTSC filter to the given video buffer.
Amazing implementation Bisqwit! Much faster than my original, but boy what a pain to translate it to Rust Source: https://bisqwit.iki.fi/jutut/kuvat/programming_examples/nesemu1/nesemu1.cc See also: https://wiki.nesdev.org/w/index.php/NTSC_video
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Video
impl RefUnwindSafe for Video
impl Send for Video
impl Sync for Video
impl Unpin for Video
impl UnwindSafe for Video
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