Commit 036c4210 authored by Romain Vimont's avatar Romain Vimont Committed by Thomas Daede

Prepare iterator for Rayon

Collect the context and CDFs in an intermediate vector, so that it can
be iterated in parallel with Rayon.
parent 502a7578
......@@ -2099,7 +2099,9 @@ fn encode_tile_group<T: Pixel>(fi: &FrameInvariants<T>, fs: &mut FrameState<T>)
let raw_tiles = ti
.tile_iter_mut(fs, &mut blocks)
.zip(cdfs.iter_mut())
.map(|(mut ctx, cdf)| encode_tile(fi, &mut ctx.ts, cdf, &mut ctx.tb))
.collect::<Vec<_>>()
.iter_mut()
.map(|(ref mut ctx, cdf)| encode_tile(fi, &mut ctx.ts, cdf, &mut ctx.tb))
.collect::<Vec<_>>();
/* TODO: Don't apply if lossless */
......
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