Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy fixes and other minor cleanup #859

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions av1an-core/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ impl Av1anContext {
for arg in vspipe_args {
command.args(["-a", &arg]);
}
command.spawn()
.unwrap()
.wait()
command.status()
.unwrap()
})
})
Expand Down
2 changes: 1 addition & 1 deletion av1an-core/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ pub unsafe fn parse_aom_vpx_frames_sse41(s: &[u8]) -> Option<u64> {
let mult = _mm_set_epi16(0, 0, 0, 0, 1, 10000, 1, 10000);
chunk = _mm_madd_epi16(chunk, mult);

let chunk = transmute::<_, [u64; 2]>(chunk);
let chunk = transmute::<__m128i, [u64; 2]>(chunk);

Some(((chunk[0] & 0xffff_ffff) * 100_000_000) + (chunk[0] >> 32))
}
Expand Down
2 changes: 1 addition & 1 deletion av1an-core/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ macro_rules! inplace_vec {
idx += 1;
)*

mem::transmute::<_, Vec<Cow<_>>>(v)
mem::transmute::<Vec<MaybeUninit<Cow<_>>>, Vec<Cow<_>>>(v)
}
}};
}
Expand Down
3 changes: 1 addition & 2 deletions av1an-core/src/vmaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::cmp::Ordering;
use std::ffi::OsStr;
use std::path::Path;
use std::process::{Command, Stdio};
use std::usize;

use anyhow::{anyhow, Context};
use plotters::prelude::*;
Expand Down Expand Up @@ -260,7 +259,7 @@ pub fn run_vmaf(
cmd.stderr(Stdio::piped());
cmd.stdout(Stdio::null());

let output = cmd.spawn().unwrap().wait_with_output().unwrap();
let output = cmd.output().unwrap();

if !output.status.success() {
return Err(Box::new(EncoderCrash {
Expand Down
Loading