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

demos/sdl2: set the alpha mode correctly

9d7a49df81d92586f366db630db004a46582a99e authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: encode to the target repr where needed

In addition, also use the bits structure's sample depth as authoritative
instead of the FBO form...

adf677fadc39c58ecfd909c466c193afb8b8b5a0 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fix pl_shader_decode_color's alpha plane handling

1. Fix typo in the alpha premultiplication step
2. Don't blow up on division by zero

dfdce7abfd4284f96651edcccff17eb0c3ede11a authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: add pl_shader_encode_color

This is a functional counterpart to pl_shader_decode_color, used in the
output path where requir...

10af4dfdbcbd9d71bcac29cf79008dff71535ac7 authored almost 7 years ago by Niklas Haas <[email protected]>
colorspace: fix typo in comment

0038806daa9693291f1ae09b5150a6bb6e1bbdd4 authored almost 7 years ago by Niklas Haas <[email protected]>
dispatch: correctly simulate the target rc for compute shaders

This is done by adjusting the output coordinate before writing to the
framebuffer. We also need ...

cb9233156861349d3d07002424a399d565dd2b89 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: avoid double free in some failure scenarios

Using the pointer to the local variable here meant that we didn't
correctly NULL it with pl_disp...

d3b8c7b71749165eaa5ec18efc6cafb6f5d06509 authored almost 7 years ago by Niklas Haas <[email protected]>
demos: fail gracefully when rendering fails

This avoids spamming the stderr with error messages

1f1254d3d9f62111accfa7cc8f4ce578a9bf0155 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: check and infer pl_image fields from defaults

This also includes logic to prefer flipping in the dst_rect rather than
the src_rect, because th...

f55422732b0933c3a3810ad55f3556d6a599fbbc authored almost 7 years ago by Niklas Haas <[email protected]>
sampling: soft-disable compute shaders for flipped src.rect

Flipping the source like that really screws with the compute shader
rendering. We can work aroun...

da7c26773f19075650a0522b73f334a539c9c467 authored almost 7 years ago by Niklas Haas <[email protected]>
dispatch: also set ra_pass_run.stencil

Not actually sure if it helps or not, but might as well set it because
we can.

a1d1fb1c0324e2f0a20c4a3b9569a5db4da6dcde authored almost 7 years ago by Niklas Haas <[email protected]>
ra: fix typo in comment

The illustration for matrix memory representation was off

92550ffb174c58923f54d60f563d9c0e7c48c78e authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fix x0/y0 typo in setup_src

This caused the src_rect to be incorrect when x0 != y0

91788da1dfabd9904f5fcde3d56a0e2c62f71edf authored almost 7 years ago by Niklas Haas <[email protected]>
meson: update version

44589895c480e47496e441dc575ff1d1410554de authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: expose options for polar cutoff / ortho antiring

Not sure if it wouldn't be better to expose an entire
pl_sample_filter_params for each sampler. ...

50e357c238ed7752ec58c13c8654c6c1806ec89a authored almost 7 years ago by Niklas Haas <[email protected]>
demos/sdl2: avoid some code duplication

Just infer this from the pl_render_default_params and override what we
care about.

b1028e015491d956e722688001755782a5ea0f6b authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: support linear/sigmoid scaling

The logic for this is pretty similar to mpv's, although we also allow
linearization (but not sig...

0692d9f675db1e4d144a7d7396d6fa4de4202b3b authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: implement sigmoidization/unsigmoidization

Taken from mpv, with some slight GLSL version compatibility changes as
well as a minor optimizat...

0ca6fb28557bc4908265d3046e5e1143ac0aa35e authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: respect params->disable_builtin_scalers

454212ef39a1864f7e00c6877d5b716aecade4a5 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: add support for separated scaling

This requires keeping track of potentially 8 different FBOs, depending
on which combination of u...

614834b930587c5124b666e0a4e66f10ec5bfe4d authored almost 7 years ago by Niklas Haas <[email protected]>
demos/sdl2: use separated downscalers

Now that it's supported

8b03ecb1e45d7afc48bc6a0771427c2c9189fda8 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: add support for separated/orthogonal scaling

This requires the use of multiple passes. Not yet supported by the
renderer, but the underlying ...

4255a4ee51db80e9a952c844ced5216602f08a2b authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: generalize sh_lut to allow multi-component vectors

This is needed for the 2D separated scaling LUTs.

c29d1d35f0ace2c5d7c1183a93c83a12703ee085 authored almost 7 years ago by Niklas Haas <[email protected]>
filters: make the box() definition closer to the other kernels

This has to be radius 1 to work properly for orthogonal scaling, since
the code can't handle odd...

39b183c1459c0bee16d33500f3df5b5c363badb4 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: generalize and improve dispatch_sampler

This adds support for using the GPU-native scalers where equivalent, and
also slightly restructu...

3405678b239be530f4d74272c9834ffd9b6529b8 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: generalize pl_sample_polar_params

Since I'll reuse this for separated sampling. Also slightly refactor
filter_compat to also check...

213b7d0e43501664c38abd2298acf2b5c2ea2abe authored almost 7 years ago by Niklas Haas <[email protected]>
demos/sdl2: convert into "benchmark"

1. disable vsync
2. add a timer
3. use a heavier upscaler (just for fun)

ef8ccbd104a47f07dbb784111faee33222d516b9 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: reduce verbosity of bicubic downscaling nag

This gets annoying while testing. Yes, I realize that's bad, but there's
nothing else I can do r...

b58852e69e7214fdbb2130ef7c2b001e11833c25 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fix typo in polar compute shader

This bug meant we didn't fully initialize the input array for
non-square upscaling ratios (heigh...

8937abf6db70ea37f72e7a0eafd2e7ccca446f48 authored almost 7 years ago by Niklas Haas <[email protected]>
demos: minor changes to the sdl2 demo

- remove (now) redundant imports
- make the renderer parameters customizable

7d52e4b2009fb25d85b9d61609a2b4114bf5859e authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: add more useful #includes

Most of these are needed to properly use/configure the renderer anyway.
Just do our importers a ...

2b7a4d9df11729f6d3370b05c25cc0e943401c34 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: move the tone mapping check

Makes more sense there, I don't know why I ever moved it to begin with.

acb508abbea94574aef885b623c7667901c67af7 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: explicitly default the source colorimetry

In some cases, the destination colorspace is known but the source is
not. In these cases, the `n...

16ce7bfe718f0f992dde2a1cab893af0339ba783 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: add missing #include

afd23dd727ede6b5ae671d20a9eda42de2f12021 authored almost 7 years ago by Niklas Haas <[email protected]>
dispatch: correctly update the dispatch size for compute shaders

This only got set during pass creation, so the dispatch would get
(erroneously) cut off during w...

cd5c47da5e71f4bf1c2c581dacb2fe0ca63b4fe6 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: log swapchain resize events better

3c548bd49dd4f04dc5781cfaaf157152965eb2e6 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: add helper function to render to swapchain frames

Turns out these structs are more or less identical anyway, so just
provide a helper converting t...

44b4eea382dae0bf114ed9b683b6c7c9a57695b6 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: strip superfluous newline in log message

d7973d5d9f60227672592a385de6e4c03faddf63 authored almost 7 years ago by Niklas Haas <[email protected]>
demos: switch to pl_renderer for the sdl2 demo

Mostly for my own testing purposes. Now I can actually test out the
renderer without having to j...

27da51c5f96f887e2c7810811fbd2ea43d4b8152 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: also re-dispatch if the intermediate image exists

As an aside, don't leak a shader when erroring.

d68a4010e01c6cddec1fd76a6fb8d7d7066aa32c authored almost 7 years ago by Niklas Haas <[email protected]>
dispatch: make pl_dispatch_finish/abort overwrite the consumed sh

This makes it a bit clearer that these functions are designed to consume
the sh, by overwriting ...

897f7c3e0e5531e90c812eb1e04d7cbf6b616702 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: also attach sh->tmp to the pl_context

This makes sure we avoid leaking them if pl_shader gets implicitly freed
without dereferencing t...

a26552ea64f0e1cc2a8cc863dff6558b51530af0 authored almost 7 years ago by Niklas Haas <[email protected]>
ta: increase size of allocation names

Slightly useless otherwise when the path is included.

384e83251cc15118c83b723752c22da6bbf615d2 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: fix indexing inside inner loop of pass_read_image

Turns out this was using `i` instead of `c` (and in one case, no index
at all - leading to a wro...

755d8c5f4531881385e5ab98b1157146b400fc1c authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: fix src_rect calculation in pass_read_image

This was completely wrong

d3a5e99cae967156ca177e463d6b8b27ce48c9dd authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: add missing include

9f7c649af7b4f7ff679f50b53977258eccb70dd5 authored almost 7 years ago by Niklas Haas <[email protected]>
gitignore: add build products from the demos

287d194f379bc0b66bbbf8eaa9ed0478a6dd2915 authored almost 7 years ago by Niklas Haas <[email protected]>
change all include paths to global paths

Instead of trying to include them relatively. This probably avoids
headaches down the line.

dbadc5ce034dbad5f18727658529b816de9c54ec authored almost 7 years ago by Niklas Haas <[email protected]>
demos: slightly modernize the sdl2 example

- make it accept the filename on the command line
- make it use the new format conversion helper...

e2f254738f5061c57424a8fd679efee1f6a7eba5 authored almost 7 years ago by Niklas Haas <[email protected]>
utils: fix include paths

These were weird, and also wrong. Fix them. Incidentally, I should
probably change all of the he...

5fb8a0aa39a0ed85e903c82ee445054976d7ae86 authored almost 7 years ago by Niklas Haas <[email protected]>
tests: switch to utils/upload.h helpers

Makes sure they're actually used in the test framework.

19b5c3cc2a3cd88cd1c71f4ef8a3d9f563422f0b authored almost 7 years ago by Niklas Haas <[email protected]>
utils: add helper for uploading plane data more easily

This family of helpers will hopefully make it much easier for users to
pick suitable image forma...

19a7b652d3c9b06384acf797a7ce6366f74c42a0 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: fix warning on target_w/h (+ typo)

clang warns due to the unnecessary int->float conversion. As an aside,
I accidentally wrote targ...

2423dc024fa766fb81a88896be23c903cb9473e0 authored almost 7 years ago by Niklas Haas <[email protected]>
demos: add SDL2+vulkan example

Pretty much the most stupid/naive thing I could come up with in order to
get a picture onto the ...

63469354501d0538e339da73ad504b5f38808b6e authored almost 7 years ago by Niklas Haas <[email protected]>
ra: fix bounds checks on ra_tex_blit

These were invalid for 1D/2D textures. Also add another check to make
sure we aren't blitting fr...

a1198f4bf65cfc2a737f2dda2afaecad667e56bc authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: refactor instance/device creation

Instead of doing both as part of the same pl_vulkan_create call, split
off instance creation to ...

73f52011d81a4e366907f39485656a86a5ffd938 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fix typo in shader size requirement calculation

output_h was accidentally set to output_w, which caused some shaders to
fail for non-square fram...

fd9f17d7f86ead3799939769b15e85d56c2013f4 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: add swapchain implementation

Mostly ported from mpv, but some parts were slightly rewritten. Notably,
the way window resizing...

8e7f395032faf8c7cb09045840c6f4d1ad25e08c authored almost 7 years ago by Niklas Haas <[email protected]>
README: update wording

It's not so unstable anymore, since this design seems to be working so
far.

19242bedf3df4fe67048decc721f01dfb09fa8c1 authored almost 7 years ago by Niklas Haas <[email protected]>
swapchain: add new swapchain abstraction

Largely inspired by mpv's, with some changes (mostly relating to
metadata - which we attach to e...

0fcccbbe4afccc2a46add58365f96b85802648c4 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: clarify comments and add more checking

Note: One of the new comments references pl_vulkan_create_swapchain,
which technically doesn't e...

c4d273a3ba53a1db39a560b3119e8b6145913c76 authored almost 7 years ago by Niklas Haas <[email protected]>
colorspace: typo fix in comment

80e0d5b9e3b01f8c0844717cb97961903dc30c52 authored almost 7 years ago by Niklas Haas <[email protected]>
ra: minor comment fixes

- one typo fix
- update an outdated section

892398b67362d339841a3d3b83291e45c458602d authored almost 7 years ago by Niklas Haas <[email protected]>
tests: misc improvements to the benchmark

Make sure buffering doesn't eat crash logs, bump up the test duration,
and add a baseline test.

d46c2f803cf99e0d22e9eb2f7722b25317650a63 authored almost 7 years ago by Niklas Haas <[email protected]>
tests: improve benchmark texture generation

Instead of using a single gradient, use something slightly more
"complicated" (neatly arranged c...

05ba26723585783fce024a62506a53e3cefbb566 authored almost 7 years ago by Niklas Haas <[email protected]>
tests: add more benchmarks

Polar sampling, HDR tone mapping, more debanding

77b725ddc8af218e04fa3829cb325cb201568033 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: avoid redundant computation in BT.2020-C case

As pointed out by @tdaede, we can just re-use the RB' from before
linearization instead of havin...

13b25985dabc14b61f09ed1f3727baf414be0433 authored almost 7 years ago by Niklas Haas <[email protected]>
tests: add some simple benchmarks

This just measures raw throughput by rendering to off-screen FBOs as
fast as possible and seeing...

5e41228e76e1dec2f833fe948742ce45064f8097 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: remove work-around for obsolete bug

This was fixed and subsequent releases of SPIRV-Tools have been made.
There's no reason for this...

2d0e8ac7df8de9c2f33b12b49bd846c1b92a892b authored almost 7 years ago by Niklas Haas <[email protected]>
meson: update vulkan minimum version

This allows us to remove some work-arounds for old loader versions. I'm
not entirely sure what m...

6992ff4d02a3856de1f710694efe743b076ddcd5 authored almost 7 years ago by Niklas Haas <[email protected]>
meson: don't fail if `git` is not installed

`run_command` on an unknown/missing command always terminates the entire
build. Since there's se...

7f6aa6d2350e802a746111039d71def7dffaf92a authored almost 7 years ago by Niklas Haas <[email protected]>
context: fix typo

Signed-off-by: Sebastian Ramacher <[email protected]>

393bf0cc6c760e0f1d44b9de0ee9660825ce409e authored almost 7 years ago by Sebastian Ramacher <[email protected]>
shaders: fix typo in gamut warning shader

617a79af53918e39fd092d0555d09beb3e5c7a63 authored almost 7 years ago by Niklas Haas <[email protected]>
dither: minor fixes

cosmetic (whitespace), and assert -> pl_assert

3a3ed5d8d8df0627f01d4fe96f5f9827db0a0323 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fix typo in comment

e79a8a4a6dad9cfddf2632c1ce91e80036d72721 authored almost 7 years ago by Niklas Haas <[email protected]>
dither: improve documentation

3b5fd083f8064a84ef1fe081f1bb9b2aa71b7e38 authored almost 7 years ago by Niklas Haas <[email protected]>
meson: update version

64a57a4279728aad5d51c403cbe40f71d9a68c24 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: improve command polling/waiting

Redesign vk_poll_commands to only wait for the completion of some
commands, rather than repeated...

4bb683f904f77a95702d86a96841aa4a92dbd030 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fix segfault when using sh_lut with !ra

`ra` can't always be dereferenced.

ab2201ccecbdc61051b519b2d50fcdc7162aeae2 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: GLSL 120 compat: round -> floor

round() is only available in GLSL 130+

397a4ed096e9b146190df23e91677ec094896dae authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: add high quality dithering

The algorithm is ported from mpv; with some minor modifications (AVLFG
-> rand()). Blue noise is...

aa04f95bf6590388921a065eccf9fda9219d091f authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fix hdr peak detection segfault on uninit

I forgot to actually set obj->ra after initializing the shader object

2dfb70666f0c0409d5246b464036d5f12b7f74c0 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: rework sh_lut mechanism

1. Drop the use of UBOs and SSBOs; since not only are there unaddressed
packing concerns, but...

e2dabec9891e5267546399d5b2ccaea2073dcd02 authored almost 7 years ago by Niklas Haas <[email protected]>
travis: fix python version

Apparently 3.5 is unavailable now

59eab2cdc0a6b1a818c0343738aa2234996aacea authored about 7 years ago by Niklas Haas <[email protected]>
shaders: refactor pl_shader_obj and add sh_lut

This refactors the way we store data like scaler LUTs, with the intent
of generalizing it for ot...

456aa9149a5d447681363caa3729db49a54a3a4e authored about 7 years ago by Niklas Haas <[email protected]>
dispatch: add partial support for rendering to subrects

Still needs adjusting for the compute shader path, but the fragment
shaders work for now. Also w...

118e8b38692bb0f4354f9e48b650e7f6ee09019a authored about 7 years ago by Niklas Haas <[email protected]>
renderer: always align source planes to the refplane

Instead of the src_rect. This is needed if the src_rect is not an
integer crop. In theory, we co...

c35010ebd64e2284b720de9874f003a48eded9fd authored about 7 years ago by Niklas Haas <[email protected]>
osdep: explicitly set a category mask for newlocale

While on Linux it works fine to not specify one, as Linux will fill all
not given ones from the ...

e93f9589900a6951ce210cf97b9326acb2ef48d4 authored about 7 years ago by ePirat <[email protected]>
renderer: implements some more stuff

two-step scaling, FBO caching, etc.

For some reason this still produces garbage output when usi...

204a3f2d77677704cda4e0adc65dd82c9eab67f6 authored about 7 years ago by Niklas Haas <[email protected]>
shaders: allow disabling filter widening

8484aea81fff4f7edb8c24efa11889aac7a6d5bc authored about 7 years ago by Niklas Haas <[email protected]>
vulkan: fix typo in tex_barrier on RASTER passes

This accidentally specified the pipeline stage twice, once as the access
mask.

633965e70d8f75f357d78225ddd797cc26eed51a authored about 7 years ago by Niklas Haas <[email protected]>
shaders: make sure flipped src_rect is supported

Not entirely sure if this logic is correct yet, but the change certainly
goes in the right direc...

461ca60d7d7f78ea9de338ebc00d5f8437919cac authored about 7 years ago by Niklas Haas <[email protected]>
ra: fix ra_find_fmt for host_bits=0

29b0e581bea2c823cba88e341f77692b484548b7 authored about 7 years ago by Niklas Haas <[email protected]>
renderer: partially implement scaling

Adds some of the preliminary logic like FBO selection, LUT caching, and
so forth. Still no suppo...

9eab6b7b8b9aae8510f4a0cfbdf9e448891cf1ea authored about 7 years ago by Niklas Haas <[email protected]>
README: add warning about renderer.h being incomplete

Might as well point this out. Hopefully this will change soon.

75d14556c5c11b79c2623b6edc6b081b27279d62 authored about 7 years ago by Niklas Haas <[email protected]>
README: update

Several things were outdated, or left over from an earlier version of
libplacebo during which th...

03cafadeeb86072db30a0809513bebb9e369bbfe authored about 7 years ago by Niklas Haas <[email protected]>
ra: explicitly mark stride as unsigned

To prevent anybody from getting any funny ideas

3692c2600ca9490317325451350ec53878dd40ad authored about 7 years ago by Niklas Haas <[email protected]>
renderer: add initial rough draft

This is mostly there to give us an idea of what the API will look like,
and also adds some skele...

1668a0bbeb91077bdf6ee50e9a03b5fd2df788ca authored about 7 years ago by Niklas Haas <[email protected]>
shaders: support dithering to depths greater than 32

This blows up otherwise on 32-bit frame buffers. Honestly, we could
probably just disable dither...

bc30c07679010a31b396bec4ad9cacff8008b66b authored about 7 years ago by Niklas Haas <[email protected]>
shaders: slightly improve debugging diagnostics

Better names to avoid clashing with other vertex attribs, more
descriptive failures

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