History

filter_kernels: remove bcspline filter

After fixing the B and C params for bcspline, it ended up being the same thing as bicubic. There's no reason to have two names for the same filter, so remove bcspline and keep bicubic to match libplacebo.

llyyr committed 3 years ago

Commit 1c09ee41 parent 816de3f3 files · +4 −13Browse files

Unified · Split

3 files
  1. DOCS/interface-changes.rst +1 −0
  2. DOCS/man/options.rst +2 −2
  3. video/out/filter_kernels.c +1 −11
DOCS/interface-changes.rst+1−0
@@ -60,6 +60,7 @@ Interface changes · 59 unmodified lines
60 - add `--icc-3dlut-size=auto` and make it the default60 - add `--icc-3dlut-size=auto` and make it the default
61 - add `--scale=ewa_lanczos4sharpest`61 - add `--scale=ewa_lanczos4sharpest`
62 - remove `--scale-wblur`, `--cscale-wblur`, `--dscale-wblur`, `--tscale-wblur`62 - remove `--scale-wblur`, `--cscale-wblur`, `--dscale-wblur`, `--tscale-wblur`
63 - remove `bcspline` filter (`bicubic` is now the same as `bcspline`)
63 --- mpv 0.36.0 ---64 --- mpv 0.36.0 ---
64 - add `--target-contrast`65 - add `--target-contrast`
65 - Target luminance value is now also applied when ICC profile is used.66 - Target luminance value is now also applied when ICC profile is used.
DOCS/man/options.rst+2−2
@@ -5338,8 +5338,8 @@ them. · 5337 unmodified lines
5338 filter is not tunable. Currently, this affects the following filter5338 filter is not tunable. Currently, this affects the following filter
5339 parameters:5339 parameters:
5340 5340
5341 bcspline5341 bicubic
5342 Spline parameters (``B`` and ``C``). Defaults to 0.5 for both.5342 Spline parameters (``B`` and ``C``). Defaults to B=1 and C=0.
5343 5343
5344 gaussian5344 gaussian
5345 Scale parameter (``t``). Increasing this makes the result blurrier.5345 Scale parameter (``t``). Increasing this makes the result blurrier.
video/out/filter_kernels.c+1−11
@@ -216,15 +216,6 @@ static double quadric(params *p, double x) · 215 unmodified lines
216 return 0.0;216 return 0.0;
217}217}
218 218
219#define POW3(x) ((x) <= 0 ? 0 : (x) * (x) * (x))
220static double bicubic(params *p, double x)
221{
222 return (1.0/6.0) * ( POW3(x + 2)
223 - 4 * POW3(x + 1)
224 + 6 * POW3(x)
225 - 4 * POW3(x - 1));
226}
227
228static double bessel_i0(double x)219static double bessel_i0(double x)
229{220{
230 double s = 1.0;221 double s = 1.0;
@@ -397,8 +388,7 @@ const struct filter_kernel mp_filter_kernels[] = { · 166 unmodified lines
397 {{"haasnsoft", JINC_R3, jinc, .blur = 1.11, .resizable = true},388 {{"haasnsoft", JINC_R3, jinc, .blur = 1.11, .resizable = true},
398 .polar = true, .window = "hanning"},389 .polar = true, .window = "hanning"},
399 // Cubic filters390 // Cubic filters
400 {{"bicubic", 2, bicubic}},391 {{"bicubic", 2, cubic_bc, .params = {1.0, 0.0} }},
401 {{"bcspline", 2, cubic_bc, .params = {1.0, 0.0} }},
402 {{"hermite", 1, cubic_bc, .params = {0.0, 0.0} }},392 {{"hermite", 1, cubic_bc, .params = {0.0, 0.0} }},
403 {{"catmull_rom", 2, cubic_bc, .params = {0.0, 0.5} }},393 {{"catmull_rom", 2, cubic_bc, .params = {0.0, 0.5} }},
404 {{"mitchell", 2, cubic_bc, .params = {1.0/3.0, 1.0/3.0} }},394 {{"mitchell", 2, cubic_bc, .params = {1.0/3.0, 1.0/3.0} }},

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t