rav1e icon indicating copy to clipboard operation
rav1e copied to clipboard

[WIP] CDEF parallelization

Open master-of-zen opened this issue 4 years ago • 3 comments

I wish to contribute and join rav1e development in the future, as I'm heavy invested in video encoding/AV1 and currently I'm a rust newbie. I heard that a good starting piece would be CDEF parallelization, and here we begin)

This code tries to use rayon's parallel iterator for CDEF parallelization, only issue atm is that output can't be borrowed as mutable.

error[E0596]: cannot borrow `*output` as mutable, as `Fn` closures cannot mutate their captured variables
   --> src/cdef.rs:614:117
    |
614 | ...<T>, input: &Frame<T>, tb: &TileBlocks,  output: &mut TileMut<'_, T>));
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable

master-of-zen avatar Jan 29 '21 09:01 master-of-zen

The big issue with the output being accessible by all threads, I don't know a "no pain" way to do this, the probable solution is using spinlock on output

master-of-zen avatar Jan 30 '21 12:01 master-of-zen

I wish to contribute and join rav1e development in the future, as I'm heavy invested in video encoding/AV1 and currently I'm a rust newbie. I heard that a good starting piece would be CDEF parallelization, and here we begin)

Hi @master-of-zen, thank you for the patch. We would be happy to have you join and contribute to the project.

A lot of coordination and discussion for rav1e happens on freenode IRC in #daala. Feel free to join us there as well.

negge avatar Jan 30 '21 12:01 negge

Coverage Status

Coverage increased (+0.3%) to 83.656% when pulling 52b35fa2639d31c5591ec2c677126dc57257d0f5 on master-of-zen:CDEF-paralelization into 2ec4e675b0298c3513110cd67f8d229112feb468 on xiph:master.

coveralls avatar Feb 04 '21 19:02 coveralls