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

shaders: place shader inputs dynamically

Instead of hard-coding the bindings and position in pl_shader_res, place
them dynamically once w...

301bf2339b9c4be27c1f7234ade0f6c7dab99352 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: explicitly check texture params better

Debanding in particular requires linear sampling, and sh_bind in general
requires 2D, sampleable...

e886dd513e8c1ff4385a5f7b75daa0f75c1b29fa authored about 7 years ago by Niklas Haas <[email protected]>
shaders: mark pl_shader_sample_direct as resizeable

By just clearing the output_w/h again. This basically makes it an
invisible operation as far as ...

e8fac7a6a89e7c4473a83fcf3cf94b706619cd14 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: remove left-over redundant argument

This makes no more sense, since it's part of the color_repr.

49de18df5426dc7c81bc0015b1aef8b25b234d73 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: add sh_subpass / shader merging

This adds the secondary shader as a subpass of the first shader;
exposing it as a function (much...

7465c43b49a3771cbd90912ba64d39ca3b0727fa authored about 7 years ago by Niklas Haas <[email protected]>
talloc: add TARRAY_CONCAT helper

This copies all elements from one array into another.

849b064be88aca1777d81b7adabd83f795949856 authored about 7 years ago by Niklas Haas <[email protected]>
talloc: add refcounting API

This is a helper built on top of talloc, which maintains a refcounted
container. The function `t...

83f6d883052d41b070a48875bb2d15b5789b59f5 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: add pl_deband_default_params

This was missing for whatever reason.

72c5de26386b53ed8fe35668d5dbaf0db91dd2f8 authored about 7 years ago by Niklas Haas <[email protected]>
filters: fix typo in comment

Left-over from an earlier API design.

f21e36af1a1df26e4956f1c8d9679c088019ab4b authored about 7 years ago by Niklas Haas <[email protected]>
Merge tag 'v0.1.2'

v0.1.2

Fixes:
- Add missing header file
- Cosmetic fixes in the generated shaders

Improvements...

822f7ac00f6ca4635f297cb9a62ad02652f91f00 authored about 7 years ago by Niklas Haas <[email protected]>
meson: update fixver

91c724f6d31d8e6ad8b599abe8233b182ae1e7d0 authored about 7 years ago by Niklas Haas <[email protected]>
travis: also build vX.Y.Z branches

41395c81eaa89c99f488d9405e74a2a5df60cc06 authored about 7 years ago by Niklas Haas <[email protected]>
ra: add a helper function to print RA metadata

In particular, the device limits

93a067568245dab79920dfa0a977b6c9904e781e authored about 7 years ago by Niklas Haas <[email protected]>
travis: increase verbosity

4582227b7f3636ecb5e7538e048fb78261b5317d authored about 7 years ago by Niklas Haas <[email protected]>
README: add travis badge

b66a245433852046f083aab956c65344d217bdcd authored about 7 years ago by Niklas Haas <[email protected]>
travis: various improvements

- enable IRC notifications
- enable only for whitelisted branches
- enable test framework + bett...

914dc62ed58e45194c170a93a035b10c48402d48 authored about 7 years ago by Niklas Haas <[email protected]>
travis: create .travis.yml

d0bd22196200b46984162bb6b8a2cd8d2d4e1679 authored about 7 years ago by ePirat <[email protected]>
pl_assert: add missing header file

Forgot to commit this, it seems..

ae186785d261ecfd215d698ea311e696ac36bf06 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: seed sh_prng with gl_FragCoord

No need to waste a VA on this (or force the user to pass one in)

df91c5d3a45574365630f252b1effa08330ce901 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: also generate gl_FragCoord

Compute shaders don't have this (for obvious reasons)

a433f2906db1b4a31927e42e66d045befab14880 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: cosmetic fix

Missing space after layout()

9f9ee63a5299a0e536369c2717b737699e80355d authored about 7 years ago by Niklas Haas <[email protected]>
ra: also set the ra_var.name in ra_var_from_fmt

Omitting this doesn't actually break anything due to the way sh_fresh
works, but it's still the ...

d4c9b3a5df30e4f481756a54169107ba9643dae0 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: generalize the PRNG

I've also found some independent resources describing this exact
algorithm. In particular, one o...

c99cd6bfc74ec7dd4eebcb9621caa904378d7459 authored about 7 years ago by Niklas Haas <[email protected]>
ra: enforce ra_tex_blit UINT/SINT semantics

Turns out both Vulkan and OpenGL require this, and D3D11 apparently as
well.

5f8786c5be59891533e384d0bbaad69c59972939 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: move peak_detect_state to the arg list

And out of the params struct, where it doesn't really fit. (Due to the
fact that the params stru...

b9100c3dffa8ab7474c1f8686c9a29618bba91df authored about 7 years ago by Niklas Haas <[email protected]>
shaders: refactor randomness seeding

Instead of having the user pass in seed values, instead pass in a global
`index` on pl_shader ge...

8f0890de7b02496831c200b5d47c0d4d4a3be7c8 authored about 7 years ago by Niklas Haas <[email protected]>
colorspace: change pl_chroma_location_offset API

Returns floats (in pixels) instead of integers in half-pixels. No real
reason not to. Floats are...

d66c927a210c25eaffca6b02c9b6dd497de60249 authored about 7 years ago by Niklas Haas <[email protected]>
ra: refactor ra_fmt

- get rid of the useless padding field, since padded textures aren't a
thing in practice, and ...

3728356e051050b1ce9bdd292559ec0a36556a2a authored about 7 years ago by Niklas Haas <[email protected]>
ra: add a helper function to print RA metadata

In particular, the device limits

84f7ba57330b97b70307e0ce3c2eca5d70709ed7 authored about 7 years ago by Niklas Haas <[email protected]>
travis: increase verbosity

e99b3fe0b5e5f2742550e378288b83292ec80d5d authored about 7 years ago by Niklas Haas <[email protected]>
README: add travis badge

5532586948897e68ff8429aff375fac28366fca3 authored about 7 years ago by Niklas Haas <[email protected]>
travis: various improvements

- enable IRC notifications
- enable only for whitelisted branches
- enable test framework + bett...

54daa500ea4c4a752d689eee1cc6377d20064e5d authored about 7 years ago by Niklas Haas <[email protected]>
travis: create .travis.yml

73bc4ac0fca61ff1a0ea63142eaf36e3567b2bdc authored about 7 years ago by ePirat <[email protected]>
pl_assert: add missing header file

Forgot to commit this, it seems..

ace2b298068d4d1221645ad8ad26ddb408dcfbdd authored about 7 years ago by Niklas Haas <[email protected]>
shaders: implement dithering

Currently only supports ordered dither and white noise. I plan on adding
blue noise as well; per...

5fc0f46746fdb5a7e8875044d6d3b045f7e2272b authored about 7 years ago by Niklas Haas <[email protected]>
ra: also set the ra_var.name in ra_var_from_fmt

Omitting this doesn't actually break anything due to the way sh_fresh
works, but it's still the ...

c51c373171ffa25dcce0e9132c7a36fa04a158b2 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: seed sh_prng with gl_FragCoord

No need to waste a VA on this (or force the user to pass one in)

efd0d9a50ddd64d09ed2dd07be8bdb8317c23aba authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: also generate gl_FragCoord

Compute shaders don't have this (for obvious reasons)

17505dadeb3d05a8787a736c8a918f5af7c77b96 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: generalize the PRNG

I've also found some independent resources describing this exact
algorithm. In particular, one o...

a6ea110076e28ea63681d2e665a7af1dfbb10249 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: cosmetic fix

Missing space after layout()

3f1af99e30977d555723731e508a045b002e0784 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: slightly refactor context creation APIs

The default settings are changed (since the recent fixes have made async
compute stable to enabl...

3f2c8b97b9aa68d541ca3cca8cd38867aa8090f8 authored about 7 years ago by Niklas Haas <[email protected]>
colorspace: add pl_color_space_monitor

This corresponds to a typical standard gamut SDR RGB monitor.

9b2978d20eff8b1c4f6368f31afbbbcbd64d8e21 authored about 7 years ago by Niklas Haas <[email protected]>
meson: bump fixver

2cd5792c0a7601856daa3264a87cb552fe6c3699 authored about 7 years ago by Niklas Haas <[email protected]>
context: remove talloc memory debugging calls under NDEBUG

Not only are these unnecessary, but so is the env var check in this
case. Probably for the better.

e1e602b2d38873291ceca65a939fd25848c547f5 authored about 7 years ago by Niklas Haas <[email protected]>
ta: fix build with NDEBUG

Was missing a stub function

5911f94baba3918120890d7c0e3d70a532ead362 authored about 7 years ago by Niklas Haas <[email protected]>
libplacebo: use explicit checks instead of assert()

Since assert() can be compiled out, and users will vehemently argue for
their right to do so, ju...

59cb23b9059be698915607aa80e790b430062d25 authored about 7 years ago by Niklas Haas <[email protected]>
meson: bump API version to v0.1

7eb7a054c538dfd16854b03f67a3dd1cba1a7706 authored about 7 years ago by Niklas Haas <[email protected]>
meson: aesthetic improvements

I didn't like the nested blocks. I also think `usewinloc` sounds sort of
weird, so change the fo...

814f11c80104ac3331b33e5bb4d44da66a2d80f5 authored about 7 years ago by Niklas Haas <[email protected]>
meson: add mingw32 cross compile files

To cross compile using mingw32:

$ meson --cross-file cross_mingw_x86_64.txt build-w64

or

$ me...

169ad513257a5a2f854015bd55c0cf11d9bfcb4b authored about 7 years ago by Thomas Guillem <[email protected]>
osdep: add print_c support for WIN32

The _create_local function need the msvcr100.dll that is available starting
Windows 7.

ec1313cdf5db7a6cca1939f2777b636169e6eb25 authored about 7 years ago by Thomas Guillem <[email protected]>
osdep: add locale include for APPLE

bbeb134f313b51e3d644c1581c3850def7f6d553 authored about 7 years ago by Thomas Guillem <[email protected]>
vulkan: cosmetic fixes

Remove one duplicate definition, and move the dispatch table to the
bottom.

7dd733468bd2185d04105904071dc23d46ee818c authored about 7 years ago by Niklas Haas <[email protected]>
shaders: use talloc_free_children on tmp

Instead of recreating the object completely. One fewer allocation, not
that it matters..

55b553439355f0551425747a25407ef646efdaf5 authored about 7 years ago by Niklas Haas <[email protected]>
colorspace: also #include "common.h"

Needed for the definition of pl_matrix3x3 etc.

fefc27e4af7cab734330d29753d54ee216ac8ebb authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: correctly make buffer modifications host-visible

Even for coherent buffers, we technically need to ensure writes are made
visible to the host by ...

16ef25aa538894a2d0e93b7b5355b472a094bbad authored about 7 years ago by Niklas Haas <[email protected]>
context: also use stderr for warnings

9398032c633c603f76cdf1f4169d0a6bfb105f2f authored about 7 years ago by Niklas Haas <[email protected]>
shaders: update tone mapping defaults

After lots of testing and careful cross-examination between HDR UHD
clips and their SDR counterp...

a4a65417507ee8d3a2636c65881f79169957cb75 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: major refactor of tone mapping and color spaces

This accomplishes several things:

1. vec4 colors are now explicitly always normalized such that...

7aa14ac3d6ef778770aa0c9021ae282f20c97ccf authored about 7 years ago by Niklas Haas <[email protected]>
ra: add texture stride alignment helper

Basically a wrapper around PL_ALIGN2 so users don't have to NIH this.
Might add more such wrappe...

f6c5425e3144f2b8dcdad3f22a3bf621e981b4e5 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: add missing #include in public header

d4ea5efb5deced3b7951b68f0ca044d8a2e46d0e authored about 7 years ago by Niklas Haas <[email protected]>
libplacebo: explicitly default *params where defaults exist

As a rule of thumb, if there's a pl_foo_default_params, then specifying
a const struct pl_foo_pa...

7daca5eb33f43517026765ab6e796f57a046bb68 authored about 7 years ago by Niklas Haas <[email protected]>
context: add default params

9dc8f17a2916dc68782d82be8177b934b3b421a0 authored about 7 years ago by Niklas Haas <[email protected]>
context: refcount contexts instead of using atexit

Apparently atexit() in libraries is bad news, and pthread_once_t (in
printf.c) leaks memory anyw...

a83620365b0bedd36f238695601b87e07aa5c2c1 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: infer the src color space light type based on TRC

This is to avoid everybody having to reimplement the same logic
internally. It also defaults the...

8925ba47a873b30417d5cfd7aec273d180fac012 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: fix segfault due to QF index mismatch

The QF index and the qinfo index are not necessarily the same. In fact,
the former can be arbitr...

afe77c8ecc32e7c3020fc3c3aebfd5c7f7102fef authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: improve the utils string enumerations

New extensions will be guarded by their presence in vulkan.h, so I can
add new enumeration membe...

851a66967b95bf8201839c9c4f6f12bd14286280 authored about 7 years ago by Niklas Haas <[email protected]>
meson: avoid globally defining _XOPEN_SOURCE

Let's make sure we don't end up in confusing scenarios where code only
randomly works on some pl...

eb263b32ff7d82baf06e7ace4b1724fe8da5278b authored about 7 years ago by Niklas Haas <[email protected]>
osdep: add locale-invariant printf wrappers

Since nobody can agree on adding `printf_l` to the standard, we have to
do this using OS-depende...

0e67eec23628f97089bb25724248e502694c57bb authored about 7 years ago by Niklas Haas <[email protected]>
shaders: add direct sampling

This is basically equivalent to hardware bilinear/bicubic sampling.

c9c9c33b84f2f7ebbadf8b3902e071f5702a2540 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: port bicubic_fast sampling from mpv

Re-used some of the logic from the polar sampling setup code

28318e82372c1ed8fcb484e748717043ecb78116 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: implement polar sampling fragment shader

5908cb4638b44ba9b6595aa4809b1f32621db88d authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: use the correct sampling mode for ra_tex_blit

The mpv code hard-coded this to linear, but we need to make it dynamic.

181d424b7bbf728017c1e3737344a03bdd22d2f2 authored about 7 years ago by Niklas Haas <[email protected]>
context: improve the LC_NUMERIC locale check

Since e.g. `uselocale` can override `setlocale` for that thread, and we
have absolutely no way o...

1fcd3a0550f5624d0ed90fd6141fcc9a564ed310 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: fix some image barrier access issues

The color attachment pass should be using the access mask of the color
attachment write, *not* w...

1fec4eb7d268cc02da44caa0d762344d69c100be authored about 7 years ago by Niklas Haas <[email protected]>
.gitignore: be more generous in removing /build

It's common to have e.g. build.foo or build.clang

c64df532169a347ac8a178efe55d1f971b57f178 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: improve the tone_mapping_desaturate algorithm

See mpv commit c2d4fd0ef43e44c5c8caee13ae486ae05784c3a5 for more
information.

92045d5de2f6dd9c86d0794cc3e268659968b6f1 authored about 7 years ago by Niklas Haas <[email protected]>
meson: correctly install the headers

Using install_headers with subdirectories like that breaks completely.
Solve it by just using su...

31e59b95f620547d56e83913195f64fe7113ac33 authored about 7 years ago by Niklas Haas <[email protected]>
ra: fix the ra_fmt_glsl_format ordering

This is component order invariant, so make it so. Fixes a bug where
a2bgr10 etc. are not correct...

b17c29e13abbe299756a74b08c831a73b9ddc4a6 authored about 7 years ago by Niklas Haas <[email protected]>
ra: add helpers for sorting and printing the formats

For sorting, we try a few heuristics but ultimately maintain the
guarantee that formats with "mo...

4259df89bc67da5099f96b5578d58b1436290cb2 authored about 7 years ago by Niklas Haas <[email protected]>
ra: slightly refactor ra_fmt_caps

1. Some capabilities now also imply other capabilities
2. Texture creation is now *always* suppo...

b09b76e3979f41ace1fdac4897585da6f8d9b878 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: add compute shader polar sampling

Fragment shader is still TODO.

Also, the test desperately needs to be improved. Right now it ju...

b38dad14a7eaea81302831ecbbe761383ac6bf2e authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: fix several memory leaks

Thank god for LIBPLACEBO_LEAK_REPORT

636725c025c5a8cec4c653c52935f73adebf9510 authored about 7 years ago by Niklas Haas <[email protected]>
ra: remove redundant assert()

size_t can never be < 0 anyway.

eeebbb725d56e96be5bc6184359260010569f8c9 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: clarify comment

1efdfe2f24c7e9214392923b253260fbc39b75e9 authored about 7 years ago by Niklas Haas <[email protected]>
context: add more debugging-related checks

First of all, make sure we warn the user if NDEBUG was set; with a
suitably evil sounding env va...

b2e2f8fc18819bd1fd8084bd7aade3bea82f7440 authored about 7 years ago by Niklas Haas <[email protected]>
ra: export the GLSL format qualifier for a ra_fmt

This fixes a bug where pl_dispatch would use the format type, possibly
leading to undefined beha...

ad1dabe7a6f84311519a55de45db109c782b61e5 authored about 7 years ago by Niklas Haas <[email protected]>
ra: add min_gather_offset

Needed for symmetry

541d69574d926e1531ce15219cb7a46b616510ec authored about 7 years ago by Niklas Haas <[email protected]>
ra: enforce num_namespaces = RA_DESC_TYPE_COUNT

No reason to make this dynamically allocated. It makes zero sense to
have more namespaces than t...

10f9efc258d89febd10edee97947ad80938023ce authored about 7 years ago by Niklas Haas <[email protected]>
meson: prefix test executables

This makes the build directory a bit saner

4035eb9293f61482fc6514bbda2042c3e7784c91 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: add pl_dispatch_abort call

In order to release the resources associated with a shader without
submitting anything.

1f9750af5e8c81de3841bac30bf4d2162cb68263 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: remove the dynamic variable renaming crap

This was brittle and ugly and slow and annoying anyway. Instead, turn
this into a user problem. ...

d8f63a6e4d28c5bdcea42a428ff39c2f3ae64f67 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: omit debanding noise if grain=0

dad48741c9551f6ddd1b1ab5532fe58f8459c26e authored about 7 years ago by Niklas Haas <[email protected]>
shaders: cache the position of all bound textures

This avoids all potential headaches due to multiple evaluation of the
compute shader position macro

8850611fd7a09f2937129bd6bf07a965fcfaebba authored about 7 years ago by Niklas Haas <[email protected]>
tests: test the user of compute shaders if possible

59a9e615716ae9d3e80c77b63aaa4f8b96c6ba65 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: refactor compute shader generation

This required making some (semi-significant) changes to shaders/ra as
well. This provides the in...

436d98656305f710adafb74e7e6beefbe2ab3eb7 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: semi-fix compute shaders

Still missing the fake vertex simulation; but this is a start.

0372e74efda56dcc7bc5fe1067e13ab32895420c authored about 7 years ago by Niklas Haas <[email protected]>
shaders: add shader object tracking mechanism

For shaders which require access to "configured" objects, this tracks
the object's lifetime and ...

04bc66cbf430214e658f8dcefc182578f150a41f authored about 7 years ago by Niklas Haas <[email protected]>
shaders: implement HDR peak detection

Taken from mpv, with some modifications to fit the new system.

Not entirely sure I'm happy with...

6c8c357c5bb2e0f345ea9446ac8e37f5d9760e6f authored about 7 years ago by Niklas Haas <[email protected]>
shaders: slightly refactor the compute shader interface

This is more convenient code-wise. Also adds some much-needed helpers.

f2a3064e209fbaeda6252a4724977f28d58d4421 authored about 7 years ago by Niklas Haas <[email protected]>
ra: add generalized helper for memcpy + ra_var_layout

ff2c971b84843473ee61ea27cd655403088340fb authored about 7 years ago by Niklas Haas <[email protected]>