Commit 8d0e891b authored by Luca Barbato's avatar Luca Barbato Committed by Luca Barbato

Rustfmt api.rs

parent 3eb43b54
......@@ -7,8 +7,8 @@
// Media Patent License 1.0 was not distributed with this source code in the
// PATENTS file, you can obtain it at www.aomedia.org/license/patent.
use encoder::*;
use context::CDFContext;
use encoder::*;
use partition::*;
use std::collections::VecDeque;
......@@ -102,7 +102,13 @@ pub struct Packet {
impl fmt::Display for Packet {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Frame {} - {} - {} bytes", self.number, self.frame_type, self.data.len())
write!(
f,
"Frame {} - {} - {} bytes",
self.number,
self.frame_type,
self.data.len()
)
}
}
......@@ -127,7 +133,7 @@ impl Context {
rec: Frame::new(self.fi.padded_w, self.fi.padded_h),
qc: Default::default(),
cdfs: CDFContext::new(0),
deblock: Default::default(),
deblock: Default::default()
};
let frame_number_in_segment = self.fi.number % 30;
......@@ -174,13 +180,11 @@ impl Context {
} as u8;
let first_ref_frame = LAST_FRAME;
let second_ref_frame = if use_multiple_ref_frames {
ALTREF_FRAME
} else {
NONE_FRAME
};
let second_ref_frame =
if use_multiple_ref_frames { ALTREF_FRAME } else { NONE_FRAME };
self.fi.primary_ref_frame = if self.fi.intra_only || self.fi.error_resilient {
self.fi.primary_ref_frame =
if self.fi.intra_only || self.fi.error_resilient {
PRIMARY_REF_NONE
} else {
(first_ref_frame - LAST_FRAME) as u32
......
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