Commit 3c2aebf8 authored by Romain Vimont's avatar Romain Vimont Committed by Thomas Daede

Remove threads limit

The two previous commits removed parallelization of coarse motion
estimation. The thread limit is not necessary anymore.

This reverts commit 9baf1d6c.
parent 1d39058a
......@@ -458,8 +458,6 @@ pub struct Config {
pub threads: usize
}
const MAX_USABLE_THREADS: usize = 4;
impl Config {
pub fn new_context<T: Pixel>(&self) -> Context<T> {
assert!(8 * std::mem::size_of::<T>() >= self.enc.bit_depth, "The Pixel u{} does not match the Config bit_depth {}",
......@@ -473,13 +471,7 @@ impl Config {
None
};
let threads = if self.threads == 0 {
rayon::current_num_threads().min(MAX_USABLE_THREADS)
} else {
self.threads
};
let pool = rayon::ThreadPoolBuilder::new().num_threads(threads).build().unwrap();
let pool = rayon::ThreadPoolBuilder::new().num_threads(self.threads).build().unwrap();
Context {
inner: ContextInner {
......
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