diff options
author | metamuffin <metamuffin@disroot.org> | 2022-12-05 21:22:00 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-12-05 21:22:00 +0100 |
commit | 8e4ec0943973b96addbe01f4c02f91cf04d081a7 (patch) | |
tree | 0773eb5048703adae45538050ab3dffad29b01da /evc/src/block.rs | |
parent | 96e316ea16b7b915e02735457d5ac7495d3db305 (diff) | |
download | video-codec-experiments-8e4ec0943973b96addbe01f4c02f91cf04d081a7.tar video-codec-experiments-8e4ec0943973b96addbe01f4c02f91cf04d081a7.tar.bz2 video-codec-experiments-8e4ec0943973b96addbe01f4c02f91cf04d081a7.tar.zst |
more code
Diffstat (limited to 'evc/src/block.rs')
-rw-r--r-- | evc/src/block.rs | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/evc/src/block.rs b/evc/src/block.rs index 29dd4ba..8d98d55 100644 --- a/evc/src/block.rs +++ b/evc/src/block.rs @@ -1,11 +1,5 @@ -use crate::ser::{Ser, Sink, Source}; +use crate::{ser::{Ser, Sink, Source}, pixel::Pixel}; -#[derive(Copy, Clone, Debug)] -pub struct Pixel { - pub r: u8, - pub g: u8, - pub b: u8, -} #[derive(Clone, Debug)] pub struct Block { @@ -56,14 +50,4 @@ impl Block { Ok(Self { size, inner }) } -} -impl Ser for Pixel { - fn write(&self, sink: &mut impl std::io::Write) -> std::io::Result<()> { - sink.put((self.r, self.g, self.b)) - } - - fn read(source: &mut impl std::io::Read) -> std::io::Result<Self> { - let (r, g, b) = source.get()?; - Ok(Self { r, g, b }) - } -} +}
\ No newline at end of file |