summaryrefslogtreecommitdiffstats
path: root/video/out/filter_kernels.h
diff options
context:
space:
mode:
authorNicholas J. Kain <nicholas@kain.us>2017-03-04 20:13:18 -0500
committerRostislav Pehlivanov <atomnuker@gmail.com>2017-03-06 03:31:40 +0000
commite22604135534e90b257a7575fb500b5762fc6423 (patch)
treeb689e4a4bdbe74a7ae381fed4fff9adfe606c988 /video/out/filter_kernels.h
parent69cc9f2a2c970610df0ea961998d494f69ef73c0 (diff)
downloadmpv-e22604135534e90b257a7575fb500b5762fc6423.tar.bz2
mpv-e22604135534e90b257a7575fb500b5762fc6423.tar.xz
filter_kernels: Keep f.radius in terms of dest/filter coords.
The existing code modifies f.radius so that it is in terms of the filter sample radius (in the source coordinate space) and has some small errors because of this behavior. This commit changes f.radius so that it is always in terms of the filter function radius (in the destination coordinate space). The sample radius can always be derived by multiplying f.radius by filter_scale, which is the new, more descriptive name for the previous inv_scale.
Diffstat (limited to 'video/out/filter_kernels.h')
-rw-r--r--video/out/filter_kernels.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/filter_kernels.h b/video/out/filter_kernels.h
index fc90a1cdde..74cc3eb148 100644
--- a/video/out/filter_kernels.h
+++ b/video/out/filter_kernels.h
@@ -34,7 +34,10 @@ struct filter_kernel {
bool polar; // whether or not the filter uses polar coordinates
// The following values are set by mp_init_filter() at runtime.
int size; // number of coefficients (may depend on radius)
- double inv_scale; // scale factor (<1.0 is upscale, >1.0 downscale)
+ double filter_scale; // Factor to convert the mathematical filter
+ // function radius to the possibly wider
+ // (in the case of downsampling) filter sample
+ // radius.
};
extern const struct filter_window mp_filter_windows[];