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

bstr: use the correct pointer type in va_arg

Using void* is either legal or not, I can't tell based on the C99 spec.
But using the actual poi...

63d1bec21ca8f92fa62a03f30eb1488519142160 authored over 6 years ago by Niklas Haas <[email protected]>
vulkan: extend VkResult switch/case for new extension

1fed9c219cc7d27db3d43d967345c6e1330f2c3c authored over 6 years ago by Niklas Haas <[email protected]>
vulkan: add support for vulkan device extensions

In theory, we could also add instance extensions, but this makes it more
complicated when using ...

0eaf567a4670444e670d91a4d39417cc4ae8c3d5 authored over 6 years ago by Niklas Haas <[email protected]>
vulkan: support and use push descriptors

Tiny performance gain, but also makes synchronization less of an issue
and prevents some pipelin...

643d9e62d4313781849fb38c19dd8425b2b8fd01 authored over 6 years ago by Niklas Haas <[email protected]>
bstr: include limits.h

Only needed on android. Fixes #34.

c8cd30bd7b5bdf6cb487814cff39ae5408728ea9 authored over 6 years ago by Niklas Haas <[email protected]>
config.h: fix typo

cc0638cb18b4d3b39aa3a9b16fbed0c1578efa35 authored almost 7 years ago by Niklas Haas <[email protected]>
gpu: change semantics of pl_tex_transfer_params.stride_w/h

Instead of inferring these from the image size, infer them from the rect
to be transferred. This...

a81d22dee8fa60267b86d03485141f6bce9020c5 authored almost 7 years ago by Niklas Haas <[email protected]>
gpu: relax the pl_tex_transfer size requirements

In cases where the stride exceeds the rect being transferred, the
existing rules could also incl...

0a8925465c3d67f8bbaecba4646992e8e66f6c63 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: only use VkEvents if supported

MoltenVK does not implement VkEvent at the moment, but when MoltenVK
supports VkEvents they shou...

48170507164e47fbd2fb2d36254409703e237f70 authored almost 7 years ago by Josh de Kock <[email protected]>
vulkan: only check texel buffer size on texture creation

This should still catch the most obvious cases where this grossly
exceeds the size, but is less ...

d80408e07dcb9df2a961519eef2e507dde27344f authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: fail scaling if finalizing first sep pass fails

Missing check for NULL return here.

4175aa0b69606abaf7885a9cbf9968aa5d77ce26 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: make sure texel buffers are large enough for emulation

Otherwise, emulated format upload results in an error (fortunately, the
libplacebo assert catche...

0a100205bd13ab7356357626e9cdfb0f7ab08d06 authored almost 7 years ago by Niklas Haas <[email protected]>
gpu: be more explicit about GPU limit types

Give them explicit size information and make them unsigned where it
matters. This solves an issu...

e3f1813d6bfa7abbe809bbc6b8169638fa991827 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: explicitly infer the color space information

Do this right away instead of leaving them unknown so we persist
information about e.g. the src_...

94cffb174178046e0aa72f455eb79b9da5b68aff authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: reuse colorspace.h helper function

The one introduced by the previous commit. Gets rid of some code
duplication.

ec84f9c0926742cbb838b62fd8cd1658f388260f authored almost 7 years ago by Niklas Haas <[email protected]>
colorspace: add function to default unknown pl_color_space fields

This is useful to solve an issue I had with the renderer

d8f729ada2267b7cfeab09b4ab10ec8f52507111 authored almost 7 years ago by Niklas Haas <[email protected]>
meson: explicitly check for -Wincompatible-pointer-types

travis fails otherwise

b1614736e74eba16526fb3abfca6ce7fa84de687 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: reuse vertex buffers that don't change

When repeating the same vertex info a bunch of times (which happens quite
often since the crop i...

72f59f08bd565158ef82872d191286ebf700b7bb authored almost 7 years ago by Niklas Haas <[email protected]>
meson: update build options

Fixes compilation issues on windows, and also moves some stuff to the
global file and also makes...

a61c95e200be88a690b83c102f7ac9de1e54803a authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: extend vk_res_str

Suppresses a warning on windows.

c1c6283da3f33d8c19ac569bf730808ec31bbacb authored almost 7 years ago by Niklas Haas <[email protected]>
spirv: adjust locale code for windows

Thanks to @ePirat and @rossy for providing tips and testing.

7544711482f428017b54e02468e9fa93a331d72b authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: update vertex buffers *before* dispatching

Creating and updating the vertex buffer itself can trigger flushing
commands, so don't do it fro...

4431e6e47880ab1070b1d41173a119a250e3715d authored almost 7 years ago by Niklas Haas <[email protected]>
tests: fix benchmark

The API usage for pl_shader_deband was out-of-date

091e2400c640a55e62403bfdf9228e4de32001da authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fix mobius for sig_peak <= 1.0

This is normally not a very realistic circumstance, but it can happen
when doing HDR-in-SDR simu...

b9c435f4316370ec6c6f01e00bcdbf3dd54f8ded authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: don't tone map solely for gamut mapping

Good in theory, bad in practice. Clipping ends up retaining more of the
image. If anything, we s...

a6d1201b6319b1eec8aec226aeedddc336d29b22 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: correctly pre-normalize the scale when sampling

This makes sure debanding etc. doesn't blow up on the first pass that
touches an image, and it a...

afc4e2e34e1e888abe17bf7a8ae915c53398143b authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: factor out sampler type logic

Separate the decisions about what type of sampler to use from the logic
for actually applying th...

196e6e5eb95cc4d1b09a1ff7de5562dc78f423aa authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: renderer: turn debanding into a real sampler

Debanding can now perform implicit bilinear scaling as well. We make use
of this to skip the ind...

a94231ebc5a7dc8960b66a02c784de9086a322dc authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: support scale factors while sampling

This is needed to correctly pull-up the signal range. While it may seem
sort of redundant on the...

53db0a251e9611b5ce348af35a7e8dcd7c03bddb authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: adjust whitespace

04ed03fd6b2c0e99fc3605c0ac846be142ab5233 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: correctly default peak_detect_frames

This was claimed to default to 63, but it actually only defaulted to 20
in some cases.

9b4fc8124d19a87b3c42cbd81bd028c4fda918c9 authored almost 7 years ago by Niklas Haas <[email protected]>
colorspace: add more chroma locations

VLC has these as well

fa881acdb2433beaa717435a2bd32dfe06f7bf2a authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: ensure the required imageUsageFlags are present

When creating the swapchain. This was previously not explicitly checked,
just assumed.

de3c65dd54afb8c3fb516d0abd25274eaf18f330 authored almost 7 years ago by Niklas Haas <[email protected]>
swapchain: require swapchain FBOs be blittable

So users can actually pl_tex_clear them, which is a pretty important
operation

4df9ef73241f54f22521dc9b13150094a025f5ee authored almost 7 years ago by Niklas Haas <[email protected]>
utils: refactor pl_upload_plane to take the tex separately

This is much more convenient when the plane is different every time, but
you still want to re-us...

4befda55492e09fc43e9d85d29433b2b7f064c52 authored almost 7 years ago by Niklas Haas <[email protected]>
gpu: suppress uninitialization warning

This is normally not emitted because optimization realizes that it's
impossible for the switch()...

d2cfdca0877e2449a7f61501ef9b975bd99a3be8 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: sanitize bool return value

For sanity

2eaa7946c99fdde45befdc387e6c296c215d9a09 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: fix segfault when instance creation fails

The stupid const pointer cast obscured the fact that the pointer type
had changed in the meantime.

0c52df4ea4dde88da8263d928b789106533e33aa authored almost 7 years ago by Niklas Haas <[email protected]>
README: add a note to distributors

7fc37076347c8797550aa361b83d0d47d82e9626 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: enable support for HDR-in-SDR emulation

Since HDR TRC support in both hardware and software is flaky at best, we
can easily enable a sor...

20c0733cc85a3938a9c1b0da3c35ca42fb98b687 authored almost 7 years ago by Niklas Haas <[email protected]>
shader: correct gamut warning feature when outputting HDR

The hard-coded limit of 1.01 doesn't make sense for HDR output
colorspaces. So take into account...

5fe921bc10db5ab6d674d809bc236b191afaca26 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: parametrize the HLG OOTF by the src/dst peak

Now we fully respect the BT.2100 specification in both directions,
resulting in colorimetrically...

95e8e7548214069fa759103d605ac632f2a6edc9 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: correctly scale the desaturation based on the output TRC

Right now, the desaturation is always based on an absolute scale. But
this doesn't make sense wh...

79082688cbb67249f4dab41ba4b3aa283870cdc2 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fall back to mix(vecN, vecN, vecN) on GLSL 120

These platforms don't support mix() with bvec, so we have to fall back
to casting to vecN instea...

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

6c336a1df4bdccac653eee73622f268672eb2a60 authored almost 7 years ago by Niklas Haas <[email protected]>
etc: modernize ebuild

Add a versioned clause for easy versioning (via symlinks), add multilib
support, and add shaderc...

5ad4a5c0f316aa6d2b91d50d644ee65195fc1c1a authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: fix uninitialization warnings

These only get caught when compiling with -O2, which I normally don't
do. Two of these are actua...

fd92a78aad297157c30bf51e41daf98c0792c6bd authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: various fixes for 32-bit machines

1. Switch from size_t to VkDeviceSize for buffer offsets/sizes, since
this is guaranteed to b...

1dfaccb1b779885377ad8849b89c6e2d1bd16041 authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fix off-by-one in literal LUT generation

An off-by-one in the check caused this to emit `vec1()` in the
1-component case, which is illega...

6c06bdc4342ba2750c570ca3058d0e3b077ca407 authored almost 7 years ago by Niklas Haas <[email protected]>
tests: test HDR tone-mapping by default

7540ad42aebdd00584bde413ebae7a8694a3330e authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: add scene change detection for HDR tone-mapping

Prevents annoying eye-adaptation like effects on scene changes.

This allows us to bump up the d...

579c8c0146ae20a5c0086883023840d74a90359a authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: avoid overflow in HDR peak detection

Instead of dividing out the number of workgroups per frame when
calculating the new signal peak,...

70c035a6e00231e2bda9b63b52d949055a182863 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: limit the number of queued commands

This is designed to avoid queueing up massive amounts of work with no
forward progress, which co...

5fabf00d8126e5abd7adbf91cd0ea3d450a78f96 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: implement texture format emulation

This required some pretty complicated logic, but I tested it and it
seems to be working. Basical...

db75867ddbb276eee1a34707b78203cc3b653c88 authored almost 7 years ago by Niklas Haas <[email protected]>
gpu: don't touch viewport/scissors for compute shaders

The sanitization/checking logic failed on compute shaders without any
viewport/scissors set. It ...

c509f5e1224b26a2b8f80daf5064100b60e6b0cf authored almost 7 years ago by Niklas Haas <[email protected]>
gpu: don't segfault when pl_buf_create fails

The assertion fails in this case, since *buf is NULL.

687ce9544eedabda2edfad30c5c5d8b8f63244a5 authored almost 7 years ago by Niklas Haas <[email protected]>
dispatch: add pure-compute dispatch function

This allows us to bypass the target framebuffer simulation and dispatch
generic compute shaders ...

a8a6b077210b35df0cfaf013f7b902c5d849de95 authored almost 7 years ago by Niklas Haas <[email protected]>
gpu: cap the size of a buffer pool

If all 8 buffers are in use, just block for availability

b873935481e5f1c316dc01d5666f95eae288bcf2 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: limit the maximum number of queued commands

This avoids nasty infinite loops that submit an infinite number of
commands over and over again....

a4d47b7e21dec35b2449b845b411be54e919089b authored almost 7 years ago by Niklas Haas <[email protected]>
gpu: correctly check for buffer access overflow

We fixed the *rc after checking the tex transfer size, which was a
computation based on the *rc....

0f11de24e0e0d7c0381b43ac571d0eb923b2785d authored almost 7 years ago by Niklas Haas <[email protected]>
gpu: add support for texel buffers

This includes both (readonly) uniform texel buffers and (readwrite)
storage texel buffers.

Need...

bbef9ae89103d91a47dbb40a2c7087ec3497a176 authored almost 7 years ago by Niklas Haas <[email protected]>
utils: allow calling pl_plane_find_fmt on out_map=NULL

Exactly what it says on the tin.

47eae8c949d7426a1493c83a8e45cb7294754d72 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: correctly enabled require device features

textureGatherOffset requires ImageGatherExtended, and the use of some
storage formats might requ...

9374b4e1cff0b21d6b912dbb238f77e2ba2159aa authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: bump peak detection frames to 20 by default

Also fix an issue where we accidentally divided by (frames + 1) instead
of by (frames).

39735ff431ae1aa85c29190077b20587eacde089 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: reuse pl_tex_recreate

Again, no reason to reinvent the wheel.

86f03aff92c908e85109209fe17a5681315b3496 authored almost 7 years ago by Niklas Haas <[email protected]>
gpu: increase pl_tex_recreate verbosity

Since we use this more aggressively now

03b818d7cd787d73533b3842363163f154cd2155 authored almost 7 years ago by Niklas Haas <[email protected]>
utils: reuse pl_tex_recreate helper

No need to duplicate logic. I forgot this helper existed already.

db5a85905054d2ebf8bba731ebf402c6bd340916 authored almost 7 years ago by Niklas Haas <[email protected]>
ra: rename ra to pl_gpu, change ra_ to pl_

This is a very major rewrite operation, but all of the actual logic is
unaffected. The change is...

3e881060d053e5a0367fbb472d670048f0122369 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: completely refacter scaling

The bulk of the src_rect application is moved from the main scaling pass
to the pass_read_image ...

af235381b9235c1e000c7464c645e2a2145c4a6d authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: be less strict about size requirements

Most of the shaders can run fine at any size, i.e. they can also do
implicit upscaling. Not real...

d17a13ce9af3eb738109491b3aecc9e25b1d0c7b authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: rewrite some of the upscaling/downscaling checks

Avoid exact float computations wherever possible.

83888baa179fb7cd790b6ffcc1de886fd91a1d8b authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: clarify pl_image.signature and cache invalidation

Specifically, modifying the ra_tex directly does not invalidate the
texture cache - and is there...

e67207925eaf103b68b8c9870ecb635105403400 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: implement overlay rendering for pl_image as well

Closes #15

The most annoying thing about this is that I decided to try and
implement emulating ...

5021c95f08c34b22f709d81bccf5c6bfaa363921 authored almost 7 years ago by Niklas Haas <[email protected]>
ra: further sanitize ra_pass_run_params.scissors

Make sure these are constrained to the target dimensions, and silently
drop passes with invalid ...

1f0b2a7ff4731cc8470db271cd8d719653036067 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: implement debanding

This could be done slightly better, but it will do for now.

Closes #25

707a43e574749230946f07775731d70f96e2131b authored almost 7 years ago by Niklas Haas <[email protected]>
bstr: fix UB on va_arg(const char *)

Using va_arg on any pointer type other than void* is undefined behavior.

2ad7695fc722ba05070e532f7abc22b61d38586e authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: add helpful comment about pl_chroma_location_offset

This function can be easy to overlook, despite its usefulness for these
fields.

44d1028cef9df11eee1ac7d8d7c1ce5864a633d8 authored almost 7 years ago by Niklas Haas <[email protected]>
colorspace: clarify a comment

Point out that this is referring to the ITU-R BT standards, and also
replace the / by a + to mor...

fcca3b076e506a68de46a1ff8d76141905142962 authored almost 7 years ago by Niklas Haas <[email protected]>
colorspace: add some predefined color representations

Provided mainly for my own convenience, so I can test JPEGs and stuff
more easily. But also impo...

df3706670c0dcc3309fb7276b7c3ee5fde2e67a9 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: only accept integer chroma scaling ratios

This works around the fact that subsampling oddly sized images results
in fractionally sized chr...

1756b76489db6bfcafa5beccad5c9ced8c18fb21 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: correct inverted plane shift computation

This is something that I had suspected of being an issue when I
implemented the overlay, but it ...

bd6d27b6599eff9503ec80648dc858ac2700c57a authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: fix pl_shader_sample_polar un-namespaced var

The hard-coded "in%d" caused a conflict when trying to polar sample
multiple planes in the same ...

8d339aead050fe1947f026d870a382bb0482e90a authored almost 7 years ago by Niklas Haas <[email protected]>
demos/sdl2: fix main() signature to match SDL_main

SDL2 on Windows redefines main to SDL_main in order to insert platform-
specific initialization ...

d847287b15c6f9d89217d602835fe18c50de4a71 authored almost 7 years ago by James Ross-Gowan <[email protected]>
gitignore: ignore Windows binaries

5eeeb93790d0375bc8ef6338d70b85b81eb8610a authored almost 7 years ago by James Ross-Gowan <[email protected]>
utils: avoid ffsll()

ffsll() is available in glibc and BSD, but it's non portable and
unavailable on Windows. Use __b...

2006a0addc288e87aa03bf3835bafd786aadefa0 authored almost 7 years ago by James Ross-Gowan <[email protected]>
tests: use ISO C rand() instead of POSIX random()

It seems like the range of both of these functions is [0, RAND_MAX].
rand() is pretty low-qualit...

f199e5c50abad336bd48134d3ecaf4621751965b authored almost 7 years ago by James Ross-Gowan <[email protected]>
spirv: work around libshaderc locale dependence

Do this by explicitly clearing LC_NUMERIC before calling into
libshaderc. I'm not entirely sure ...

d66ecf6d6c404be30bab49d42c1c82889e4a1062 authored almost 7 years ago by Niklas Haas <[email protected]>
demos/sdl2: make params.debug dependent on -DNDEBUG

This allows us to make blazing fast release builds without editing the
source.

99c5d39e894fccdf9377fb1327cb77b0fb5e2b16 authored almost 7 years ago by Niklas Haas <[email protected]>
bstr: add locale-invariant bstr_xappend_(v)asprintf

To keep things simple, these only support %d, %f and %s, with no length
modifiers. %d is assumed...

edef7b89ddc7ad28ab25fe054a2f61d74bee6a03 authored almost 7 years ago by Niklas Haas <[email protected]>
osdep: nuke printf.h

Instead of using shitty platform-specific hacks to get a
locale-invariant printf, we can just us...

403bd7a5d1a21f6dc52aab81895fc36fea624383 authored almost 7 years ago by Niklas Haas <[email protected]>
3rdparty: move siphash.c/h to separate subdir

456dbedb2ab14bad6d69fb1b6f45685ddc70eeaf authored almost 7 years ago by Niklas Haas <[email protected]>
demos/sdl2: resize the window to fit the content

Just because

a33a724e886e183b7fcd6e1b92b83c74a767584b authored almost 7 years ago by Niklas Haas <[email protected]>
demos/sdl2: add support for rendering an overlay

Partially a demonstration of the API, but mostly so I can test the thing

Vulkan logo is public ...

9f7930d63d148623f734b353efa18f6f44070bfd authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: implement target overlay rendering

Image overlays are not yet supported. I changed the API around a bit
again, since I realized tha...

a9285d805176734793ab97cdefdd4318fb58eec8 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: remove obsolete comment

8103465d0d5df5aafe3db88525a95637c3f66c40 authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: explicitly clear src/dstQueueFamilyIndex

We forgot to set this to _IGNORED for buffers. However, the spec requires it.

d5594309f0bf49a80a877e8fe9de62236844f61b authored almost 7 years ago by Niklas Haas <[email protected]>
dispatch: implement support for blending

I also made some RA changes for convenience, so we can pass around the
blending configuration as...

0f518e7e28443a7dca55ff5d5be026389fc39d54 authored almost 7 years ago by Niklas Haas <[email protected]>
renderer: add API for image overlays / OSD rendering

This completes some of the work towards #15. The actual rendering of the
OSDs, however, is curre...

e4b59eb53dd267b079a89f62da41aa353dd500ca authored almost 7 years ago by Niklas Haas <[email protected]>
shaders: add FIXME comment

This feature is unimplemented, so tag it as such

ef631beb07fc46861f644215afc8c9721f5a8efc authored almost 7 years ago by Niklas Haas <[email protected]>
vulkan: print statistics about the compiled shader program

As suggested by @tdaede

58d7c391dd07f086805a07e3ea6f2840cc3b481f authored almost 7 years ago by Niklas Haas <[email protected]>