Commit 2a024c32 authored by Luca Barbato's avatar Luca Barbato Committed by Luca Barbato

Drop the bits field

bit_depth provides the same information.
parent 99e0bcef
......@@ -26,7 +26,6 @@ const LOOKAHEAD_FRAMES: u64 = 10;
pub struct VideoDetails {
pub width: usize,
pub height: usize,
pub bits: usize,
pub bytes: usize,
pub mono: bool,
pub bit_depth: usize,
......@@ -40,7 +39,6 @@ impl Default for VideoDetails {
VideoDetails {
width: 640,
height: 480,
bits: 8,
bytes: 1,
mono: false,
bit_depth: 8,
......
......@@ -245,7 +245,7 @@ fn read_frame_batch<D: Decoder>(ctx: &mut Context, decoder: &mut D, video_info:
if ctx.needs_more_lookahead() {
match decoder.read_frame(&video_info) {
Ok(frame) => {
match video_info.bits {
match video_info.bit_depth {
8 | 10 | 12 => {}
_ => panic!("unknown input bit depth!")
}
......
......@@ -13,7 +13,6 @@ impl Decoder for y4m::Decoder<'_, Box<dyn Read>> {
fn get_video_details(&self) -> VideoDetails {
let width = self.get_width();
let height = self.get_height();
let bits = self.get_bit_depth();
let bytes = self.get_bytes_per_sample();
let color_space = self.get_colorspace();
let bit_depth = color_space.get_bit_depth();
......@@ -27,7 +26,6 @@ impl Decoder for y4m::Decoder<'_, Box<dyn Read>> {
VideoDetails {
width,
height,
bits,
bytes,
bit_depth,
mono,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment