diff --git a/meson.build b/meson.build index fa8c8f4e..f28b0a2c 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project('libplacebo', ['c', 'cpp'], license: 'LGPL2.1+', default_options: ['c_std=c99', 'cpp_std=c++11', 'warning_level=2'], meson_version: '>=0.51', - version: '3.116.0', + version: '3.117.0', ) # Version number diff --git a/src/filters.c b/src/filters.c index ca7094e7..a0145cbd 100644 --- a/src/filters.c +++ b/src/filters.c @@ -532,11 +532,11 @@ const struct pl_filter_config pl_filter_spline64 = { .kernel = &pl_filter_function_spline64, }; -const struct pl_filter_config pl_filter_box = { +const struct pl_filter_config pl_filter_nearest = { .kernel = &pl_filter_function_box, }; -const struct pl_filter_config pl_filter_triangle = { +const struct pl_filter_config pl_filter_bilinear = { .kernel = &pl_filter_function_triangle, }; @@ -646,10 +646,10 @@ const struct pl_named_filter_config pl_named_filters[] = { {"spline16", &pl_filter_spline16}, {"spline36", &pl_filter_spline36}, {"spline64", &pl_filter_spline64}, - {"box", &pl_filter_box}, - {"nearest", &pl_filter_box}, // alias - {"triangle", &pl_filter_triangle}, - {"bilinear", &pl_filter_triangle}, // alias + {"nearest", &pl_filter_nearest}, + {"box", &pl_filter_nearest}, // alias + {"bilinear", &pl_filter_bilinear}, + {"triangle", &pl_filter_bilinear}, // alias {"gaussian", &pl_filter_gaussian}, {"sinc", &pl_filter_sinc}, {"lanczos", &pl_filter_lanczos}, diff --git a/src/include/libplacebo/filters.h b/src/include/libplacebo/filters.h index 8f9cd9a3..8cefb41b 100644 --- a/src/include/libplacebo/filters.h +++ b/src/include/libplacebo/filters.h @@ -187,8 +187,8 @@ double pl_filter_sample(const struct pl_filter_config *c, double x); extern const struct pl_filter_config pl_filter_spline16; // 2 taps extern const struct pl_filter_config pl_filter_spline36; // 3 taps extern const struct pl_filter_config pl_filter_spline64; // 4 taps -extern const struct pl_filter_config pl_filter_box; // AKA nearest -extern const struct pl_filter_config pl_filter_triangle; // AKA bilinear +extern const struct pl_filter_config pl_filter_nearest; // AKA box +extern const struct pl_filter_config pl_filter_bilinear; // AKA triangle extern const struct pl_filter_config pl_filter_gaussian; // Sinc family (all configured to 3 taps): extern const struct pl_filter_config pl_filter_sinc; // unwindowed, @@ -209,6 +209,10 @@ extern const struct pl_filter_config pl_filter_robidouxsharp; extern const struct pl_filter_config pl_filter_ewa_robidoux; extern const struct pl_filter_config pl_filter_ewa_robidouxsharp; +// Backwards compatibility +#define pl_filter_box pl_filter_nearest +#define pl_filter_triangle pl_filter_bilinear + struct pl_named_filter_config { const char *name; const struct pl_filter_config *filter; diff --git a/src/include/libplacebo/renderer.h b/src/include/libplacebo/renderer.h index 70f94574..f2a3accc 100644 --- a/src/include/libplacebo/renderer.h +++ b/src/include/libplacebo/renderer.h @@ -76,7 +76,7 @@ struct pl_render_params { // since the built-in GPU sampling algorithms can't anti-alias. // // Note: If set to the same address as the built-in `pl_filter_bicubic`, - // `pl_filter_box` etc.; libplacebo will also use the more efficient + // `pl_filter_nearest` etc.; libplacebo will also use the more efficient // direct sampling algorithm where possible without quality loss. const struct pl_filter_config *upscaler; const struct pl_filter_config *downscaler; diff --git a/src/renderer.c b/src/renderer.c index 513b9537..08cc9154 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -480,9 +480,9 @@ static struct sampler_info sample_src_info(struct pl_renderer *rr, if (can_fast && !params->disable_builtin_scalers) { if (can_linear && info.config == &pl_filter_bicubic) info.type = SAMPLER_BICUBIC; - if (can_linear && info.config == &pl_filter_triangle) + if (can_linear && info.config == &pl_filter_bilinear) info.type = SAMPLER_DIRECT; - if (info.config == &pl_filter_box) + if (info.config == &pl_filter_nearest) info.type = can_linear ? SAMPLER_NEAREST : SAMPLER_DIRECT; } }