Use logf and powf intrinsics - #12
Conversation
This handles edge cases like a `pow` base of 0 better than the `exp(log(x) * y)` identity did. Fixes Jaded-Encoding-Thaumaturgy#11
|
It seems that this PR is calling cmath functions for |
|
I just followed what upstream swiftshader was doing. Since your version performs better and it's a smaller diff, we can go with it instead. clip = core.std.BlankClip(None, 1920, 1080, vs.GRAY16, 30000)
set_output(core.std.Expr(clip, "x 1.5 pow"), "std")
set_output(core.akarin.Expr(clip, "x 1.5 pow"), "akarin")
|
The tests were originally written by sgt0 in Jaded-Encoding-Thaumaturgy#12. Co-authored-by: sgt0 <140186177+sgt0@users.noreply.github.com>
From Jaded-Encoding-Thaumaturgy#12 by sgt0. Co-authored-by: sgt0 <140186177+sgt0@users.noreply.github.com>
|
the speed is worse than halved using the expression from original issue std: Output 100000 frames in 29.47 seconds (3392.89 fps) |
|
Seems like it comes down to the exponent being between 0 and 1 (i.e. if I make it |
|
Erm, idk why I brought up upstream when we're comparing to std. Anyways, closing this PR since I think we either take yuygfgg's or try to improve the current pow/log implementation. |
This handles edge cases like a
powbase of 0 better than theexp(log(x) * y)identity did.Fixes #11