Skip to content
Snippets Groups Projects
Commit 8d0e891b authored by Luca Barbato's avatar Luca Barbato Committed by Luca Barbato
Browse files

Rustfmt api.rs

parent 3eb43b54
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......@@ -68,8 +68,8 @@ impl Config {
let seq = Sequence::new(&self.frame_info);
unsafe {
av1_rtcd();
aom_dsp_rtcd();
av1_rtcd();
aom_dsp_rtcd();
}
Context { fi, seq, frame_q: VecDeque::new() }
......@@ -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,17 +180,15 @@ 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 {
PRIMARY_REF_NONE
} else {
(first_ref_frame - LAST_FRAME) as u32
};
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
};
for i in 0..INTER_REFS_PER_FRAME {
self.fi.ref_frames[i] = if i == second_ref_frame - LAST_FRAME {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment