summaryrefslogtreecommitdiffstats
path: root/video/out/filter_kernels.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-26 01:56:19 +0100
committerwm4 <wm4@nowhere>2015-01-26 01:56:19 +0100
commit639e2bd12f2592d016e30b542c217641c416c95d (patch)
tree513000d1b36acbeebc6639dd60bd4052bcabb01b /video/out/filter_kernels.c
parent6945369e9c97c1caf64c9e47901e12f500d82e7e (diff)
downloadmpv-639e2bd12f2592d016e30b542c217641c416c95d.tar.bz2
mpv-639e2bd12f2592d016e30b542c217641c416c95d.tar.xz
vo_opengl: simplify radius initialization
Somehow, the default radius for filters with variable radius was set in mp_init_filter(). gl_video.c used NAN as default value for the radius, which would make the filter use the default radius. Simplify this, and set the default radius directly in the gl_video options. It also makes the options easier to understand, because the default value listed in --vo=opengl:help actually shows the default value. Remove the function can_use_filter_kernel(), because it doesn't set a radius if none is set. The function is worthless anyway (something about making filter_kernels.c reusable to other VOs, and trying to deal with the possibility that it could provide filters not supported by vo_opengl.)
Diffstat (limited to 'video/out/filter_kernels.c')
-rw-r--r--video/out/filter_kernels.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/video/out/filter_kernels.c b/video/out/filter_kernels.c
index 8c889e1023..77dbea57c0 100644
--- a/video/out/filter_kernels.c
+++ b/video/out/filter_kernels.c
@@ -56,8 +56,7 @@ const struct filter_kernel *mp_find_filter_kernel(const char *name)
bool mp_init_filter(struct filter_kernel *filter, const int *sizes,
double inv_scale)
{
- if (filter->radius < 0)
- filter->radius = 3.0;
+ assert(filter->radius > 0);
// polar filters are dependent only on the radius
if (filter->polar) {
filter->size = 1;