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: perform input clamping before the OOTF

This matters in particular for the inverse OOTF, because the result of
the color mapping functio...

290ac0eb6a92a752e6b3f6a1d4a6cfb0f30790e6 authored about 7 years ago by Niklas Haas <[email protected]>
ra: add helpers for building buffer descriptors

This abstraction wraps the messy logic for incrementally adding buffer
variables while checking ...

946060a5b10c747b7a3acf3f846794e541c5e0ed authored about 7 years ago by Niklas Haas <[email protected]>
ra: generalize ra_var to support arrays as well

38f06fc6e81ad9290392e3b972eb30b8cd415f25 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: fix output size verification logic

The old code was "clever" but wrong.

b4370fc7fde1a31b64847ab02cd19862408fe38a authored about 7 years ago by Niklas Haas <[email protected]>
ra: generalize the ra_var_ helpers a tiny bit

Also add the the uint variant, since I needed it; and add semicolons to
the macro invocations to...

c8311e9d05a73940a3bdc6fab54fa823b57b7e96 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: omit bogus #define

gl_GlobalInvocationIndex doesn't even exist. This was likely meant to be
gl_GlobalInovocationID,...

8a1088440143a58e6e8e31db50be28b49b1588c8 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: track output size metadata

This is important both for stuff like debanding (which doesn't want the
output size to change) a...

849a88be0a05787cb3b6e847bfc833d5d869ef11 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: reuse passes for successive dispatches

58519b0c8e0dfd2afb56be706e3d627497265bc2 authored about 7 years ago by Niklas Haas <[email protected]>
bstr: add hashing algorithm

Based on SipHash, which is a fast, modern hash that ticks all of our
requirements. Slightly modi...

a67fce172c275482468dbdfd6a8659658ef66351 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: implement pl_shader caching

Pass re-use still needs some work

ccba91d31378224df360030f9e69ae1b922bd770 authored about 7 years ago by Niklas Haas <[email protected]>
meson: suppress -Wmissing-braces for clang

It's too aggressive and decides to flag code such as this:

struct foo x = {0};

0f7b829f1258486bd6a9206137b571820b6fafb0 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: fix various issues unconvered by clang

Some of them minor, some of them potentially serious.

5721d04e9de4f9b7b50580dda520a7634e63b0b0 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: refactor buffer layout handling

Instead of doing some stupid string generating nonsense, directly pass
around the ra_vars as exp...

a910e8192448cc745e16418b87e00c797bab4674 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: add missing break

Surely there must be a way to get compiler warnings for bugs like these?

4479867d56dcb8bb5ab119ac26440e352470dd61 authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: initial implementation

This is sort of a WIP, but the basics at least seem to work. Also expand
the README.

3e164e949d8357e452070a83646fc2662096682b authored about 7 years ago by Niklas Haas <[email protected]>
ra: various small fixes

typos, missing `const`, consistent naming, fix bugs

8c317e9518564145d7d2f11de6ffbaa7848f75de authored about 7 years ago by Niklas Haas <[email protected]>
shaders: minor fixes

Variable consistency, better order for attributes, properly scaled
texture coordinates, and bett...

25e7bf7e9fa0fc1a1388637fc9ebdaad6929552f authored about 7 years ago by Niklas Haas <[email protected]>
shaders: split up into components

Move shaders helpers to an internal shaders.h, and split up the public
shaders API based on the ...

ca6dbb55adc8623b8d8647c620f5604a0e902a12 authored about 7 years ago by Niklas Haas <[email protected]>
ra: consistency

Also use const pointers for ra_var_host_layout

3296b78070179d3d9695ffaa810ac9262cf9bf03 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: minor changes

whitespace, comments

6c288edf8601046b5fc4166c339e4a90a548abad authored about 7 years ago by Niklas Haas <[email protected]>
shaders: formalize and improve the public shader API

Instead of randomly having headers here and bodies there and vec4s
floating all over the place, ...

9f30c9737347e3fb939e66d44d1e5019c98eb297 authored about 7 years ago by Niklas Haas <[email protected]>
common: use PL_DEF more

This was added later, so replace some if the x ? x : foo trains by it.

bca8a09acdf42a9d5ec72f61edea76a884625862 authored about 7 years ago by Niklas Haas <[email protected]>
README: update versioning policy

I've decided I will be making beta releases (0.x) while libplacebo is
still in development, beca...

815297059633877128a98d68d5f0ca58a8015d50 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: remove references to peak detection

This isn't implemented yet anyway, and the actual implementation will
most likely be different

214bbf0d2900a4a424b62501670c0f8ccac76df8 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: also handle the alpha channel

Update pl_shader_decode_color to mutate the color_repr as per the new
convention, and make it al...

6e59c8ef0c588eed53aa9294eff9bc9698684c33 authored about 7 years ago by Niklas Haas <[email protected]>
colorspace: refactor color representation

Make the bits struct more complicated. Also, since it's sufficiently
non-trivial, make the vario...

dd172eab385630959fc66018b8fca5179141e05b authored about 7 years ago by Niklas Haas <[email protected]>
context: detect locale mismatch and refuse to run

This results in completely broken GLSL shaders otherwise.

a7d0069a4af4760b7e400440e29afcb4cdfb03e0 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: add debanding

This also adds some important infrastructure for being able to sample
textures from a pl_shader.

532a036106af50c9021f29e8af89210430202adb authored about 7 years ago by Niklas Haas <[email protected]>
shaders: add a pl_shader_decode_color public API

This implements BT.2020-C etc.

2d98624fab48c9958f1729f8496e61590fc7c562 authored about 7 years ago by Niklas Haas <[email protected]>
colorspace: slightly improve the naming of things

The `is_linear` name makes the most sense because it literally implies
the conversion is a singl...

30447d4096f8e9e35a437637016d2df475fef4d9 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: suppress warning

This triggers -Wmaybe-uninitialized sometimes.

38f63d7e2b8879d82e7bf345d2f894614a0a41c1 authored about 7 years ago by Niklas Haas <[email protected]>
etc/ebuild: add some USE flags

No USE flag for shaderc yet because shaderc isn't packaged

353e0e97750f1dddfa275c8892fb06cb4796ec1a authored about 7 years ago by Niklas Haas <[email protected]>
README: fix typo

77946dbf71bf465a240023430b8cc36a07e98bd0 authored about 7 years ago by Niklas Haas <[email protected]>
context: API order consistency

The params struct is always last, since this allows the prettiest
initialization. Also update th...

c133ed6984826fe8033cbebe9dcfd76bddf2ea0f authored about 7 years ago by Niklas Haas <[email protected]>
common: API consistency

Use pointers instead of passing around bare structs for the matrix math.
Only exception right no...

ba3021892d98601fb982145e90445b7736479881 authored about 7 years ago by Niklas Haas <[email protected]>
common: fix include

50153ea5a0815d6c83e29a56b332aac046bd36db authored about 7 years ago by Niklas Haas <[email protected]>
README: update using section

The unit tests have some good usage examples

9cda1de287589d94d47d09c49b6ad42bf52e9528 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: add tests

3e6e37d6bb0f702944c8e4af36a9445bfcbb395e authored about 7 years ago by Niklas Haas <[email protected]>
ra: correctly duplicate the pass_params

9864184b0a5c7bb66051c652a92da4afc7e78a99 authored about 7 years ago by Niklas Haas <[email protected]>
ra: generalize target_params even more

Turns out we can go all the way and just turn this into target_dummy,
allowing you to pass a rea...

6c9840fb6d164e67e30594e0c773b6ac941d9964 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: various fixes

0db5125e1101b0623451988977066ad75af8c980 authored about 7 years ago by Niklas Haas <[email protected]>
ra: various fixes

Generalized target_format to target_params.
More sanitization, more validation.

43676d4f2ebdef91a417c32a813058d6051f4345 authored about 7 years ago by Niklas Haas <[email protected]>
ra: shorten ra_renderpass -> ra_pass

This makes it more consistent in length with the other objects.

3e4d96fc3e5735a17128728fa39868d35ef17ef0 authored about 7 years ago by Niklas Haas <[email protected]>
ra: refactor ra_format

Turns out the bools actually suck for doing feature tests, so a cap bit
is way better in practic...

eeccfacdae809de222d665cd6d1600b9e95abb31 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: fix the shader logging

Might move this to ra_renderpass_create instead, I guess.

8828ddb7c3b0cb12c47facdfe23d6bed50884655 authored about 7 years ago by Niklas Haas <[email protected]>
context: make the stdout loggers use stderr for errors

This makes the output of a failed test more indicative of a failure.

dc16648d9aeb3ea1bc755ad26bfa0db8f7b34cc8 authored about 7 years ago by Niklas Haas <[email protected]>
filters: add test cases

Also fixes some bugs

c6cda64907fef12819303ec5fbf4b97dcfeb85f6 authored about 7 years ago by Niklas Haas <[email protected]>
README: improve documentation for meson usage

Also add a ./compile script that does this for you, because fuck meson's
awkward user interface.

a9c3197b20e7d34fce6024163d4a3b096b55db63 authored about 7 years ago by Niklas Haas <[email protected]>
README: update for meson changes

Also fixes the wrong option name for the tests

ddbd3484547a9f21a0dad33acc51d5742e372d1c authored about 7 years ago by Niklas Haas <[email protected]>
meson: make options tri-state

c9d9c3bb95450f015a60f2559f2090bd96e936c6 authored about 7 years ago by Niklas Haas <[email protected]>
colorspace: fix typo

This is what you get for coding at 6 am.

e6481111457290f07da41fd5d1ad666e455d4d28 authored about 7 years ago by Niklas Haas <[email protected]>
colorspace: clarify special color system handling logic

a210d4681c31d5e3636adffbdcb0133066854084 authored about 7 years ago by Niklas Haas <[email protected]>
meson: allow disabling components

Test framework is disabled by default, everything else is auto-probed.

e9639c2d2adfcb99e325300f85bf4854e4057792 authored about 7 years ago by Niklas Haas <[email protected]>
colorspace: allow bit_depth = 0 again

The new way the code is written only makes the bit depth meaningful for
scaling the value in ver...

3efd9a2fea2594fcd60cf9d274f1b75547bdd886 authored about 7 years ago by Niklas Haas <[email protected]>
misc: doc fixes

typos etc.

ea653adafbd287d6df62728c43d4650a6ae5168d authored about 7 years ago by Niklas Haas <[email protected]>
tests: add a test framework and start using it

Founds and fixed plenty of bugs already

9a00c990a50300d21b9aa5307eea3b7e872c989b authored about 7 years ago by Niklas Haas <[email protected]>
colorspace: refactor matrix math etc.

The matrix math was separated from the color-space semantics and moved
to common.c; and all of t...

a206814d8b671a1025db543ee87ef49199f063d8 authored about 7 years ago by Niklas Haas <[email protected]>
context: add two built-in loggers

For the convenience of the user

09598a121e1a42217bf63e77ecf0a4d65938d545 authored about 7 years ago by Niklas Haas <[email protected]>
ra: make params.initial_data const

Since it's read-only

e323861e9830642f5dc4c3edc4d6f80701e8a51d authored about 7 years ago by Niklas Haas <[email protected]>
README.md: update docs to reflect the vulkan implementation

RA is now no longer just an API, you could theoretically actually use
it.

e03b581c21ef30985aff9204f6a94066cf89fc21 authored about 7 years ago by Niklas Haas <[email protected]>
context: get rid of stupid pl_msg

I thought I got rid of them all again. This also had a newline, even
though it wasn't supposed to..

1f7ffb4fbfdc1d7be290b5f95133b76050d4ca74 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: fix various issues

The signal mechanism wasn't powerful enough to handle multiple transfer
commands in succession. ...

1912dee6e7ce2cd93ef4852918b120700d3ab38f authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: fix typo

fc85a25e43ec26afbfd55ed03776a8dbfe287742 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: print information about the memory topology

Useful when debugging issues related to memory heaps or allocation.

ce0eec5491bfad2776f92154f951dcae95b24927 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: add public API

It should now actually be possible to start using the ra_vk stuff; and
also to have it interact ...

57cadef6437f07c41b3432dee556a3ee4787d550 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: implement the rest of ra_vk

I decided to nuke timers again, simply because they're difficult and
useless. As usual, RA chang...

26674c13ccb1d9d61f94b2e24c15db982e8b092d authored about 7 years ago by Niklas Haas <[email protected]>
ra: add missing assertions on ra_tex_blit

Was missing the third dimension

1a4f2d05b96ab4d1aa755c0cb0bdabd094ca035d authored about 7 years ago by Niklas Haas <[email protected]>
ra: slight refactor

Hide the RA_BUF_VERTEX messiness a bit better; clean up the awkward
texture discarding logic ins...

0d67a3138d3f32454187a291cd2b4e4553cd1611 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: implement more stuff

And make more RA changes. The usual.

4231ef7c79a3efc4ea3e807e9e3e84958f855695 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: msg consistency

No trailing newlines

5595ceb1dc9e4196bfab7ce20073ba695df967ab authored about 7 years ago by Niklas Haas <[email protected]>
shaders: skip loading src_luma/dst_luma on no-op

0591c1de4df92bac880338e9ab41b93435733baa authored about 7 years ago by Niklas Haas <[email protected]>
filters: pl_msg consistency

I've decided to universally not prefix the message by the function name.
If I end up wanting tha...

d21c2a7d4d0686efa9df6fa08f320b9dc69fde95 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: port more stuff

Also ported some more RA helpers, and made the necessary RA API changes
to fix the issues I ran ...

c060243e89298c22352d8e96bd09f862dbacbe81 authored about 7 years ago by Niklas Haas <[email protected]>
ra: enforce more API usage checks

The buf_offset multiple-of-4 check was not adequately enforced.

037c19f251784803f03ca3e5bad433fa675d93e3 authored about 7 years ago by Niklas Haas <[email protected]>
ra: make the documentation more consistent

Something being a common/fast operation is the default assumption, only
explicitly note where so...

65cd01a921cd55e833bf92d066e4a49ac68938fa authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: implement texture formats

I also made changes to the RA API to accomodate a finer-grained picture
of the ra_format capabil...

ce2a2a6a5e2e9dd896eee0cc932689b3d1ec0847 authored about 7 years ago by Niklas Haas <[email protected]>
README.md: expand

3478e10a2ee699b04d0370b7380cfdbc0e9ccfec authored about 7 years ago by Niklas Haas <[email protected]>
ra: add ra_flush function

This gains some relevance again because libplacebo can technically be
used for offline rendering...

d83809a0dea02294beccea097ca82d2ea72474a7 authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: begin porting work

Currently still missing ra_vk and most of the swapchain/context stuff.
(Still need to make good ...

c08c81549c2237f446a54a9e50ab3078047e0fb9 authored about 7 years ago by Niklas Haas <[email protected]>
meson.build: improve the #define templating

Slightly more hacky but requires less boilerplate.

e9548c4c979ea71525e1a7c9ab34473b123b947f authored about 7 years ago by Niklas Haas <[email protected]>
meson.build: make more declarative

Now it's actually pretty close to the mpv wscript, which is actually
kinda neat.

81fa451b02e310def9b70b11948e40a03db8a254 authored about 7 years ago by Niklas Haas <[email protected]>
ra: refactor buffers and texture transfers

Now also supports transfers to buffers, rather than just from buffers.
Redesigned ra_buf_poll to...

40e8e97c9b93e5ef40e6d57d672f720aa6526d70 authored about 7 years ago by Niklas Haas <[email protected]>
common: add some pl_rect utility functions

59f17bf42b9aa333c5009c4f7e3faea3a5ee805e authored about 7 years ago by Niklas Haas <[email protected]>
shaders: variable consistency

Always refer to a pl_shader as `sh`

08bc153c03924715904fcc7ff27cf93fc6d5b27e authored about 7 years ago by Niklas Haas <[email protected]>
shaders: allow soft-resetting pl_shader

Turns out this also solves the whole "but muh frequent re-allocations!"
problem, without needing...

de7bd46849052e92f15353fbc16ec7e524bd59c2 authored about 7 years ago by Niklas Haas <[email protected]>
ra: reduce amount of boilerplate for ra_fns

be45e214570d2717cbc856273b8efd976a2c5430 authored about 7 years ago by Niklas Haas <[email protected]>
ra: fix typo: ra_imer_stop -> ra_timer_stop

b99b34de9ec2e3dd26f379476b8846ffd56e37b6 authored about 7 years ago by Niklas Haas <[email protected]>
ra: add namespace index query mechanism

More flexible than the previous "shared || non-shared" distinction. The
extra flexibility is nee...

09f85771b67cc978f4960b1e0af461aeaf49407d authored about 7 years ago by Niklas Haas <[email protected]>
ra: nuke glsl_caps again

The texture gather thing is better off as a device-specific limit, and
the shared binding thing ...

26fe87fe8c85f043cd608ae4fed376b82057f31e authored about 7 years ago by Niklas Haas <[email protected]>
spirv: port from mpv

Only supports libshaderc for now, until I have a clearer picture of what
the requirements for ge...

326c894416f656dafe62d038d3e8df948d689d9e authored about 7 years ago by Niklas Haas <[email protected]>
context: redesign pl_context

Now uses a pl_context_params struct for global options instead of
getters/setters, for consisten...

2b1238633c4d337886c5d951153cac9b6ff54212 authored about 7 years ago by Niklas Haas <[email protected]>
ra: refactor ra_var_layout

1. This is made more flexible, by also allowing the code to access the
current offset of the ...

f345589098d2b709a9c499bca906aac82f237972 authored about 7 years ago by Niklas Haas <[email protected]>
ra: add explicit API checking

This moves the burden of asserting all over the place out of
implementations like ra_vk and into...

c8e1abeddb04b8b55935fd0480ef418b7ae1107e authored about 7 years ago by Niklas Haas <[email protected]>
ra: clarify and expand public API

Added some missing restrictions, added an explicit capability for
storage images, and fixed some...

9d57c1db8a6dcc52b25efc4c4fc4021ea7eefb0f authored about 7 years ago by Niklas Haas <[email protected]>
ra: refactor public API

Hide the implementation struct and instead add explicit wrappers for
every operation. These wrap...

8dcab3f37bf9b4d766fb6827bea183998f9823e2 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: add missing newline in GLSL() macro

c48e6acf354643c78fd5e62939252b69d4dabc13 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: make hable() benefit from sig_peak

Using the new glsl_header API, we can generate the hable function again.
As an added bonus, do i...

3f9f07d722938520abb0d328aacc925d1da1bdcc authored about 7 years ago by Niklas Haas <[email protected]>
shaders: split up into glsl_header and glsl_body

For the same reason this was required in mpv: GLSL function
declarations.

ba6cf9d5830217143eb8df3cf44b72fc8c6cb922 authored about 7 years ago by Niklas Haas <[email protected]>
meson.build: allow building a static library

No reason to force this to be dynamic. The pkg-config unfortunately
still seems to assume that i...

b5124dbd94c18176d42f44ecc7d38ea7f3562772 authored about 7 years ago by Niklas Haas <[email protected]>
meson.build: improve pkgconfig usage

Instead of manually generating the string, we can just pass the
shared_library object here and i...

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