Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/haasn/libplacebo

Official mirror of libplacebo
https://github.com/haasn/libplacebo

options: allow scaler_radius=0

Otherwise, the default settings would not be valid values.

02ab3c6457f64ddb77d74790afc74a5cfc628ee9 authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: move helper function to filters.h

63b7d5b0892e0903c775908d6b032ac18e923450 authored over 1 year ago by Niklas Haas <git@haasn.dev>
utils/frame_queue: increase queue size based on fps ratio

Add extra frames when FPS is larger than VPS.

ebd131621e7dc391b65d249279bcc455036aa88a authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: properly blur frame mixer

Fixes: https://code.videolan.org/videolan/libplacebo/-/issues/309

7872af19ccc88da39cf64ddc9beb3df68e888d89 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: add missing validation check

faee50cfcd3530e7295e71107f8b6de6768ea1cf authored over 1 year ago by Niklas Haas <git@haasn.dev>
demos/plplay: default to pl_render_default_params

It's called pl_render_*DEFAULT*_params for a reason.

45902de56d7a22909c0d46ef48ae36dadfc7ca0e authored over 1 year ago by Niklas Haas <git@haasn.dev>
demos/plplay: write new options parser

Code 95% generously donated by ChatGPT. Bugs in remaining 5%.

a8d44e51445c4a00526c13f24442d53815ed1485 authored over 1 year ago by Niklas Haas <git@haasn.dev>
demos/plplay: replace redundant helper macro

32b8b00bcb9e0bdee0c365fb36b10f858a1bc8f0 authored over 1 year ago by Niklas Haas <git@haasn.dev>
demos/plplay: factor options out to extra file

What a headache this file was growing into...

a7fa7e2e73f273bfdff608fcd4a88658c9790af1 authored over 1 year ago by Niklas Haas <git@haasn.dev>
demos: Fix building multigpu-bench on macOS

The macOS SDK has conflicting defines with the `PAGE_SIZE` name.
Seems to affect both x86 and ARM.

61c1c589f66bd913a0680d741a24e32894ed127b authored over 1 year ago by quietvoid <tcchlisop0@gmail.com>
options: adjust deband param value ranges

There's no significant to powers of two here - rather, 1000.0 represents
the "full range" value.

9bed4c8234aaa986af631a461e237c38cfde4acf authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/sampling: tune default debanding parameters

Threshold 2.0 is too low and fails to actually improve banding in
real-world sources, while some...

e1e43376d16d5112ee1254534664b0b85110139b authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: make default frame mixer consistent

Unlike mpv, which has an explicit --interpolation option to enable frame
mixing, our frame mixin...

25b7a71ca4a10b82400f3acfe8ee22ef290bfa84 authored over 1 year ago by Niklas Haas <git@haasn.dev>
meson: fix typo in API log

b757c2c2bf54db84e21061c95179e5cfc64add3a authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/sampling: replace redundant logic

By simple check to see if main lobe equals filter size.

d1057ef5ed46968800771faa64a6d4a1fb049eab authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: add Catmull-Rom recommendation

Since it's quite sharp and faster than lanczos, it can be good for
slower systems.

5773ee7b69727d1e041fbc148418c958f7085632 authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: drop mitchell upscaling recommendation

Too blurry.

5d30d3f3ff44976991588cd8b36c63cca504b199 authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: drop spline36 recommendation

We use the almost identical lanczos now.

b0a19cca8963c88bf5134f745a31c8ef49b49d82 authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: fix PL_FILTER_DOWNSCALING definition

This was accidentally set to the same as PL_FILTER_UPSCALING.

309c86da9f49e9ea55b170930c990dd43f302a3f authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/sampling: skip redundant weight check

The more accurate ar_radius calculation should ensure this weight is now
always positive.

39412e064f821444706ea1da6abc99c028fe7087 authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/filters: add testing for radius/radius_zero

1d977d6b68fce1014bf8a2c92fa7649bddae7604 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/sampling: stop using deprecated radius_cutoff

No more need to store/query this separately.

b7da55239ea2f807e56bba469397aa3b566efc20 authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: calculate exact radius and main lobe size

And store these values to pl_filter.radius and pl_filter.radius_cutoff,
even for ortho filters. ...

a117f33f22feb9239af3972b502bb1b95231706f authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: simplify compute_row

This renormalization is not needed since `filter_scale` was deprecated
in faor of directly modif...

bd71c56de3ed82d407a4e25f7898823aa54051cc authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/bench: reduce test duration

No point in making this so slow, my numbers don't meaningfully change.

29ac7c61032b858edd2b09143c39d11c0b95db5f authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/bench: don't queue up infinite commands

Add a poll to prevent VRAM from ballooning.

e1e3969c8adfc2e2892ac954725b0187792b7b64 authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/filters: test polar LUT precision

Ensures we have decent precision (1e-4) on polar LUTs at size 256
(hard-coded default scaler LUT...

ae5f479f97a59f9e39f35bff10ff4c432d40fc1e authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/sampling: hard-code scaler configuration

Testing revealed the LUT size of 256 to have no performance downside
compared to 64, and it stil...

64d7c5aab06766a9492d3cfffd35333792052cd9 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: add missing deprecation tag

Fixes: f87df67f892c7031ed80ef72dd169dc2a7860aa2

c29169ba50544f96de7f33c7759bce9d3cffa313 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: switch to lanczos upscaling by default

Parity with mpv.

See-Also: https://github.com/mpv-player/mpv/pull/12384

69483c86c5a510ea2f48d2c972a5ce853dce5472 authored over 1 year ago by Niklas Haas <git@haasn.dev>
demos: add multigpu benchmark

I created this for personal testing, but I ended up cleaning it up
enough to the point where it ...

7800209bcd9322cd6c4014e60ce732047e459660 authored over 1 year ago by Niklas Haas <git@haasn.dev>
vulkan/malloc: add pl_debug_abort to malloc failure path

To help during debugging. These should hopefully be disabled by any sane
release distribution, a...

9d32cf5f18fc8a98ab2f96b141afd4cf76a041ab authored over 1 year ago by Niklas Haas <git@haasn.dev>
gpu: add pl_tex_transfer_params.no_import

To bypass host pointer importing, for debugging and in some situations
where doing so would lead...

9f2b1f57e7f900616c51e221ee39a0da9595078e authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/bench: flush after every iteration

The whole point of pl_gpu_flush() is to commit work to the GPU and
rotate queues, there is liter...

feba676f9cfa0c4cff8c01daa1c93f7fd3a0b766 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: fix mitchell_clamp description

To be more, well, descriptive.

63f508989cf776152e6c4e175cc3f50a357234f3 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/sampling: use bilinear trick for all ortho kernels

For any filter which has strictly nonnegative weights everywhere, we can
use a generalized versi...

364612f750c54737eeb82fc2866cb7139b929be5 authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: recommend hermite for downscaling

It's reasonably fast and, actually, very high quality.

037c44ebde0bc783e3a48a7a600a958b62575938 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: switch to hermite downscaling by default

Scores higher on perceptual metrics and is much faster to compute than
mitchell, especially sinc...

75b3947b2c07803456483ec6976c037bad91b5dd authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/bench: fix integer division

Regressed by change to pl_clock_t.

cfe28b52077024ba175178408331b3a3b3d29b13 authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/bench: add hermite/gaussian benchmark

c824e95532b0f679b731becdd3407994de2859fa authored over 1 year ago by Niklas Haas <git@haasn.dev>
demos/plplay: expose mixer cache bypass debug option

Useful for benchmarking e.g. scalers on still images.

3fec8577b1b39592cec22040ecd4bde0a0e3a556 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: use fast hermite/gaussian automatically

65e62b1e82f0dd4954b9d473dd6973e498d26f50 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/sampling: add more fast shader variants

These are easy to generate for specific, fixed, always positive shaders
based on the same princi...

add79fb5aa025bfdcfc214ab596aa4da32134ac6 authored over 1 year ago by Niklas Haas <git@haasn.dev>
meson: add -fno-math-errno

We never check errno for math function and they are faster when not
setting it.

c7e9e95cd5144cefc52bfba43ca2d9138f7b3eec authored over 1 year ago by Kacper Michajłow <kasper93@gmail.com>
filters: fix pl_filter_bicubic/cubic presets

These are now tunable, so we need to add the missing params.

Fixes: dcd5b75be4423bf68e5fff63329...

51a43b5d46377b7232c467a6be194c348cbc023b authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: drop mitchell_clamp from recommended

The new hermite is better in every way for frame mixing.

406afa5ab458f567a5b75348c465ae997e78c41f authored over 1 year ago by Niklas Haas <git@haasn.dev>
meson: fix typo in api log

21936f5f55a90f67aca6ddbbeebb24b687886ead authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: make filter field order consistent

Satisfy my own autism.

c5fff2b41e8822a467f9e26a0b0df06e15ccecf4 authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: minor cleanup to cubic() function

No need to divide all coefficients by 6.0 if we're normalizing
anyway, and no need for the x > 2...

107300a25c26d13299eb40cf75b629dc1715c849 authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: don't leak params to non-tunable filters

"hermite" is a special case of cubic which is not tunable (due to fixed
radius), so we should av...

a3224bbbd766cc23aa6e877be8b3a7c5115ef696 authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: add "cubic" alias to bicubic for frame mixing

4e4382056d65c87fc68ee1f165e565c53a2ded7a authored over 1 year ago by llyyr <llyyr.public@gmail.com>
filters: add pl_filter_function_hermite and pl_filter_hermite

This matches HermiteFilter from ImageMagick (B=C=0 and R=1).
Make it a recommended frame mixer, ...

698ee553a809ef787af677b8de638e22e17b43c2 authored over 1 year ago by llyyr <llyyr.public@gmail.com>
filters: remove bcspline family filter functions

Changes params for bcspline/cubic filter function to B=1, C=0 to match
CubicFilter in ImageMagic...

dcd5b75be4423bf68e5fff63329f36ae2bd32f62 authored over 1 year ago by llyyr <llyyr.public@gmail.com>
renderer: add pl_frame_mix_nearest/current helpers

Often duplicated inside mpv/vf_libplacebo, and soon to be re-used inside
renderer.c also.

928df75cdac5199f36e7832c3ef16f8c3c5eb010 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: add pl_frames_infer(_mix)

Useful to give clients the ability to figure out exactly what colorspace
parameters and crop pos...

d8d02c5e369934c102e53dd2e0cda73a27c259dc authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/gpu_tests: add pl_frames_infer_* tests

c4c68fe6a63d6d0b3e248c938b0e52b3923c4897 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: split frame fixing logic off from pass_init

So we can reuse it in pl_frame_infer.

d38cf6e4ae73594ebfea8238e3cb13fc50e8ad20 authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/gpu_tests: add test for empty pl_frame_mix

84ebe49f9adc725853a27fe2011ab7336dd31792 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: remove pl_render_params.ignore_icc_profiles

Should really have been part of the previous API bump, but oh well. We
can't support this easily...

f87df67f892c7031ed80ef72dd169dc2a7860aa2 authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/filters: move to new filter API

And drop the now-redundant test.

9ff598a8be65310167b77ad091729f26aadafee9 authored over 1 year ago by Niklas Haas <git@haasn.dev>
tests/filters: add filter function scaling test

To avoid regressing the previous fixes.

ed846e73ca786b5b11ad952a28b6bcddfc7bce0c authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: fix filter function scaling

Several filters were wrongly scaled to map w(0.0) to 1.0 as advertised,
which may have impacted ...

d8e1202373f8a219864a84ea7d14cd93f71f7a2b authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: remove incorrectly named bcspline alias

Hermite is its own filter where B=C=0. This just causes confusion and
Hermite isn't exactly a po...

85cac5738ce9348cf93f5bd27d01ea99ba8d95fa authored over 1 year ago by llyyr <llyyr.public@gmail.com>
shaders/sampling: fix polar scaler anti-ringing

Positive filter weights can't be guaranteed by `ar_radius`, due to LUT
sampling error. Add an ex...

162c22881b1c9aeee82edb5cce69ee6b7daa5e9b authored over 1 year ago by Bin Jin <bjin@ctrl-d.org>
convert: don't use concepts for older compilers

Concepts are supported on Clang >=10, GCC >= 10 and MSVC >= 19.23.

This will not be so robust, ...

dde4e7c6d86c2d927993ee69cfff4950f9c1c944 authored over 1 year ago by Kacper Michajłow <kasper93@gmail.com>
d3d11/formats: set fmt->fourcc for consistency

0b4735cfbd133378e0b2ef3afd179919b7baba40 authored over 1 year ago by Kacper Michajłow <kasper93@gmail.com>
demos/plplay: switch to new ICC profile API

Re-gains us the functionality of pl_icc_params.

808f1af396db1332f3c2862ab8ed9d71f4c0eb2b authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: add pl_frame.icc

Augments the more clunky pl_frame.profile with an explicit API that
allows the user to initializ...

56e17c1f73cf292a6d476387d93bb9c537dbd062 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: re-use pl_icc_update internally

The `uint64_t error` field could arguably be dropped to make the logic
slightly cleaner, but it'...

2e843dc89c69be3306467edf61c1107905fd8f78 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/icc: fix empty profile check

4ee1a7789f7ca0b9be915a24d910870c1f973dae authored over 1 year ago by Niklas Haas <git@haasn.dev>
options: refactor option macros slightly

Allows passing extra attributes, such as .deprecated, to options which
previously required takin...

d40dd5c50cf9f36fd7875a383ba2f2ae1a57c847 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: remove pl_render_params.icc_params

So, there are a number of things that motivate this:

1. Using the same ICC profile settings for...

d21e218387b0e5117435f4777b24a579172900e5 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/icc: add pl_icc_update helper

To recreate an ICC profile only if it changed. Mirrors the logic inside
`update_icc` of pl_rende...

23b84d18d0e7c0981627be2283b20bd4bd69c032 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/icc: fix out-of-date / misleading comment

Left over from a previous version of that MR.

b9ac1d3f95d61a11b3c3abfa80f8682b66f21fa6 authored over 1 year ago by Niklas Haas <git@haasn.dev>
colorspace: add missing pl_icc_profile helper macro

For sanity.

c99aec3cc1d56eaa37d1c0af624374b45b99f4dd authored over 1 year ago by Niklas Haas <git@haasn.dev>
colorspace: improve pl_icc_profile_compute_signature

Actually make it return 0 for empty profiles, and avoid unnecessary
pl_str_hash indirection.

d9ea711c4b38744923db244dcf3a437b89b2ecfe authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/icc: add note to size_r/g/b comment

7e887ccd96beb8480515f3e74628b8f32495aac9 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/colorspace: document ICC signature requirements

f859282f411025da8e8d0cc79fcc2b7aa6d27450 authored over 1 year ago by Niklas Haas <git@haasn.dev>
demos/plplay: fix target ICC signature calculation

Addition of the pl_cache means we now persist ICC 3DLUTs across
restarts, in which case we serio...

c1f0e151a11baaacdadf5fd7744ecad2f30b9f94 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/colorspace: fix theoretical white shift

With the current implementation, the neutral value (0.0) gets shifted to
exactly 0.5, which is n...

ba3f3cb40cabb6511d23a2b31fbb4ef7798459b4 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/colorspace: fix gamut visualization

Fixes: 66c555b9c105139dc77578a02369cce5210f2333

c9012ae8c09c96da55410b20e3cb1f4e91271e80 authored over 1 year ago by Niklas Haas <git@haasn.dev>
meson: fix typo (cosmetic)

01d9da5ff7439122a805eff53b38951957273184 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/custom: correctly update hook params

If a pass modifies params->tex/rect/components, the new values propagate
into `ctx.hooked` but n...

f6a6f69f216d5f7042a9bce30ea9c9002d31f94f authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: add pl_render_params.correct_subpixel_offsets

Allows forcing the use of a scale pass to force all residual subpixel
offsets, instead of implic...

4f2c19c883bbbade876af35968f5c36229942ea7 authored over 1 year ago by Niklas Haas <git@haasn.dev>
gamut_mapping: sanity clamp highlight() output

To ensure we don't end up accidentally integer overflowing.

b5504d1df4dfcbdd1dc629e004f056997c8821ff authored over 1 year ago by Niklas Haas <git@haasn.dev>
opengl/formats: update SNORM format documentation

I tried adding these but they were broken in practice.

a0d994c1a8b9db0852cbe5077b7c4e92d71ba524 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/colorspace: switch to UNORM 3DLUT texture

This is actually much more efficient, because we were actually only
using the range [-0.5,0.5] a...

66c555b9c105139dc77578a02369cce5210f2333 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/icc: handle format lookup failure gracefully

ed3473ac5f3af8071530e91d2669d6e7e32c59fe authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/colorspace: fallback when no rgba16s format

Setting `pl_fmt` to NULL in this case is bad, since it will imply using
the default float format...

323ded5867693d8ea01544411c5b396a62bc31c3 authored over 1 year ago by Niklas Haas <git@haasn.dev>
filters: fix polar downscale antiringing

Raise the lowerbound of shifted range to 0.10, a much safer value to
avoid any underflows.

Also...

2e248c1aa64bb60b1919fdcc4f52881a0d6ef49d authored over 1 year ago by Bin Jin <bjin@ctrl-d.org>
renderer: fix pl_render_params.ignore_icc_profiles

This was completely non-functional, for some reason.

a12b733032015d086dff19b9b4208d78d7a9ff79 authored over 1 year ago by Niklas Haas <git@haasn.dev>
demos/plplay: add option to control target zoom/crop

For debugging purposes.

fa7a947e9deb2283e5c6bc69618577eb1e3dc6e9 authored over 1 year ago by Niklas Haas <git@haasn.dev>
demos/utils: fix build on macOS

Fixes: https://github.com/haasn/libplacebo/issues/202

839e847e32ff0b6bb0a0c033b700245de6a333dc authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: allow non-complex scalers without FBOs

This is not quite a proper resolution to the linked issue, because we
still forcibly skip the ma...

a9f84483a164c4090149ee610d35be0746808888 authored over 1 year ago by Niklas Haas <git@haasn.dev>
gpu: suppress scan-build warning

By adding a check.

7c05589db4df8aed805c5f964db7ec6d689a3784 authored over 1 year ago by Niklas Haas <git@haasn.dev>
utils/dav1d: remove use of deprecated type name

This got renamed aeons ago.

693c194b2d4b98eb554a4523667939d4e67d4a13 authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: remove outdated and wrong comment

No longer the case since a857cce8c.

101267eb7f1a0f0dd7074a602e8d2b804bb587cc authored over 1 year ago by Niklas Haas <git@haasn.dev>
renderer: pass overlays through ICC profile

Fixes very undersaturated OSD on displays with an ICC profile whose
actual primaries differ sign...

a636b32c1a65249d4000be43d6e3f84824f581a4 authored over 1 year ago by Niklas Haas <git@haasn.dev>
cache: sanitize/expose configured max object/total size

Actually fixes a bug, where we incorrectly used the pl_cache_params
values sometimes.

c98572596685a1449034d56dd9e8907282f888f3 authored over 1 year ago by Niklas Haas <git@haasn.dev>
shaders/colorspace: use rgba16s for gamut 3DLUT

Instead of rgba32f. Halves size of 3DLUTs, in exchange for slightly more
overhead during generat...

d548232dbbc271dd7f311ddb0e2ef0cd14d29411 authored over 1 year ago by Niklas Haas <git@haasn.dev>