Commit 9c80b788 authored by Joshua Holmer's avatar Joshua Holmer Committed by Thomas Daede

Remove usages of `clone` on `Copy` types

parent ab2362e2
...@@ -79,7 +79,7 @@ impl Config { ...@@ -79,7 +79,7 @@ impl Config {
let fi = FrameInvariants::new( let fi = FrameInvariants::new(
self.frame_info.width, self.frame_info.width,
self.frame_info.height, self.frame_info.height,
self.enc.clone() self.enc
); );
let seq = Sequence::new(&self.frame_info); let seq = Sequence::new(&self.frame_info);
......
...@@ -3493,7 +3493,7 @@ impl ContextWriter { ...@@ -3493,7 +3493,7 @@ impl ContextWriter {
pub fn checkpoint(&mut self) -> ContextWriterCheckpoint { pub fn checkpoint(&mut self) -> ContextWriterCheckpoint {
ContextWriterCheckpoint { ContextWriterCheckpoint {
fc: self.fc.clone(), fc: self.fc,
bc: self.bc.checkpoint() bc: self.bc.checkpoint()
} }
} }
......
...@@ -369,9 +369,9 @@ impl FrameState { ...@@ -369,9 +369,9 @@ impl FrameState {
input_hres: self.input_hres.window(&sbo.plane_offset(&self.input_hres.cfg)), input_hres: self.input_hres.window(&sbo.plane_offset(&self.input_hres.cfg)),
input_qres: self.input_qres.window(&sbo.plane_offset(&self.input_qres.cfg)), input_qres: self.input_qres.window(&sbo.plane_offset(&self.input_qres.cfg)),
rec: self.rec.window(sbo), rec: self.rec.window(sbo),
qc: self.qc.clone(), qc: self.qc,
cdfs: self.cdfs.clone(), cdfs: self.cdfs,
deblock: self.deblock.clone() deblock: self.deblock
} }
} }
} }
...@@ -2182,7 +2182,7 @@ fn encode_tile(sequence: &mut Sequence, fi: &FrameInvariants, fs: &mut FrameStat ...@@ -2182,7 +2182,7 @@ fn encode_tile(sequence: &mut Sequence, fi: &FrameInvariants, fs: &mut FrameStat
CDFContext::new(fi.base_q_idx) CDFContext::new(fi.base_q_idx)
} else { } else {
match fi.rec_buffer.frames[fi.ref_frames[fi.primary_ref_frame as usize] as usize] { match fi.rec_buffer.frames[fi.ref_frames[fi.primary_ref_frame as usize] as usize] {
Some(ref rec) => rec.cdfs.clone(), Some(ref rec) => rec.cdfs,
None => CDFContext::new(fi.base_q_idx) None => CDFContext::new(fi.base_q_idx)
} }
}; };
...@@ -2312,7 +2312,7 @@ fn encode_tile(sequence: &mut Sequence, fi: &FrameInvariants, fs: &mut FrameStat ...@@ -2312,7 +2312,7 @@ fn encode_tile(sequence: &mut Sequence, fi: &FrameInvariants, fs: &mut FrameStat
cdef_filter_frame(fi, &mut fs.rec, &mut cw.bc, bit_depth); cdef_filter_frame(fi, &mut fs.rec, &mut cw.bc, bit_depth);
} }
fs.cdfs = cw.fc.clone(); fs.cdfs = cw.fc;
fs.cdfs.reset_counts(); fs.cdfs.reset_counts();
let mut h = w.done(); let mut h = w.done();
...@@ -2407,7 +2407,7 @@ pub fn update_rec_buffer(fi: &mut FrameInvariants, fs: FrameState) { ...@@ -2407,7 +2407,7 @@ pub fn update_rec_buffer(fi: &mut FrameInvariants, fs: FrameState) {
for i in 0..(REF_FRAMES as usize) { for i in 0..(REF_FRAMES as usize) {
if (fi.refresh_frame_flags & (1 << i)) != 0 { if (fi.refresh_frame_flags & (1 << i)) != 0 {
fi.rec_buffer.frames[i] = Some(Rc::clone(&rfs)); fi.rec_buffer.frames[i] = Some(Rc::clone(&rfs));
fi.rec_buffer.deblock[i] = fs.deblock.clone(); fi.rec_buffer.deblock[i] = fs.deblock;
} }
} }
} }
......
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