diff options
author | Niklas Haas <git@haasn.xyz> | 2017-07-03 11:23:48 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-07-03 11:51:37 +0200 |
commit | 8854a2bef61090fdcc6b815112ddd966ef07d771 (patch) | |
tree | 553ec82e7df0eeff9aa980c00f6ad5c14b385518 /video/out/filter_kernels.h | |
parent | 41b3b116695bcad3fdb3129b133e2a97d9a76847 (diff) | |
download | mpv-8854a2bef61090fdcc6b815112ddd966ef07d771.tar.bz2 mpv-8854a2bef61090fdcc6b815112ddd966ef07d771.tar.xz |
filter_kernels: add radius cutoff functionality
This allows filter functions to be prematurely cut off once their
contributions start becoming insignificant. This effectively prevents
wasted GPU time sampling from parts of the function that are essentially
reduced to zero by the window function, providing anywhere from a 10% to
20% speedup. (5700μs -> 4700μs for me)
Diffstat (limited to 'video/out/filter_kernels.h')
-rw-r--r-- | video/out/filter_kernels.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/filter_kernels.h b/video/out/filter_kernels.h index 74cc3eb148..c9a89f6847 100644 --- a/video/out/filter_kernels.h +++ b/video/out/filter_kernels.h @@ -29,6 +29,7 @@ struct filter_kernel { struct filter_window f; // the kernel itself struct filter_window w; // window storage bool clamp; // clamp to the range [0-1] + double value_cutoff; // discard all contributions below this value (polar) // Constant values const char *window; // default window bool polar; // whether or not the filter uses polar coordinates @@ -38,6 +39,7 @@ struct filter_kernel { // function radius to the possibly wider // (in the case of downsampling) filter sample // radius. + double radius_cutoff; // the true radius at which we can cut off the filter }; extern const struct filter_window mp_filter_windows[]; |