Implement the forward transform
lu-zero opened this issue · 24 comments
Functions to implement for this task:
- vpx_fdct4x4_vsx
- vpx_fdct8x8_vsx
- vpx_fdct16x16_vsx
- vpx_fdct32x32_vsx
Is this task in progress or could I take it?
Hello @sasshka, I had some problems at the beginning but I managed to make the first transformation, I'll publish it soon.
I also noticed that most PPC codes for other transforms do not compile with high bitdepth, so I'll probably narrow the scope of this issue.
Okay! list updated x)
Until now I got about 35% of improvement making a VSX version of vpx_fdct4x4_vsx
. Which would be considered the minimum acceptable?
Note: Google Test filter = *Trans4x4DC*.DISABLED*
[==========] Running 2 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 1 test from C/Trans4x4DCT
[ RUN ] C/Trans4x4DCT.DISABLED_Speed/0
Fdct4x4[ 10 runs]: 6 us
Fdct4x4[ 10000 runs]: 600 us
Fdct4x4[ 10000000 runs]: 602526 us
[ OK ] C/Trans4x4DCT.DISABLED_Speed/0 (604 ms)
[----------] 1 test from C/Trans4x4DCT (604 ms total)
[----------] 1 test from VSX/Trans4x4DCT
[ RUN ] VSX/Trans4x4DCT.DISABLED_Speed/0
Fdct4x4[ 10 runs]: 2 us
Fdct4x4[ 10000 runs]: 384 us
Fdct4x4[ 10000000 runs]: 383780 us
[ OK ] VSX/Trans4x4DCT.DISABLED_Speed/0 (384 ms)
[----------] 1 test from VSX/Trans4x4DCT (384 ms total)
[----------] Global test environment tear-down
[==========] 2 tests from 2 test cases ran. (988 ms total)
[ PASSED ] 2 tests.
4x4 has a tiny kernel so I'd be already happy with this initial speedup, you can compare with the x86_64 and arm64 variants to see if it is in line with those.
8x8 and 16x16 should have a more substantial speedup though.
Any progress on this?
I've rebased with upstream but some adjusts are needed, ASAP I'll create the PR to WebM repository.
Any news about this? :) (please CC me and david in gerrit)
Hello Luca,
After rebasing some things broken (specially at store instructions) and looking at implementations for other architectures, they implement the Forward Transform, using operation with columns to reuse on 8x8, 16x16, ...
My implementation doesn't to this, so maybe I'll struggle to go for bigger matrices (will require some refactory).
For now I'm without time to complete this, maybe at the end of the month, but if you want to complete this, please go on.
Sorry for the delay!
[]s
Any news on that?
I went back to work on this task, but I have not finished yet.
I'm redoing the algorithm in a simpler way, after have written down the steps on octave, I think I'll have something to deliver by the end of the week.
That's great :) Please CC me and David when you push to gerrit, looking forward to it :)
@rafaeldelucena usual ping.
I have implemented the fdct4x4, but I'm still not satisfied with the performance gain.
I'll do some adjustments and create a pull request to upstream.
Hey, any news?
Hi!
I created a PR to upstream for fdct4x4, https://chromium-review.googlesource.com/c/webm/libvpx/+/1360172
Hey rafaeldelucena,
Are you still working on the issue? I'd take it if you don't have time to finish it.
Hello @sasshka you can take it!
My last PR is in https://chromium-review.googlesource.com/c/webm/libvpx/+/1404181
vpx_fdct32x32_vsx was implemented by Luc Trudeau luc@trud.ca
@luctrudeau in dc93b62
What is the status on this? Is there still a bounty for this, and what about high bit-depth?
@sasshka is working on that and I want to ask additional bounties for high bit-depth.
I want to ask additional bounties for high bit-depth.
Please do. There are not many bounties available right now. Most have been fixed by internal people and maintainers that never claimed the bounties, which leaves the OpenBLAS ones that the man from Azerbaijan @quickwritereader is working on, the NumPy one, and the last libmvec one (pow powf), which I have made progress on.
I also accelerated WireGuard with VSX on my own (using code from openssl), including allowing simd during interrupts.
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=107892
https://lists.zx2c4.com/pipermail/wireguard/2019-May/004149.html
Sorry for the misunderstanding. I will stick to BountySource's interface, and keep here to technical discussion.