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

Rustfmt api.rs

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