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

colorspace: fix precision of numeric constant

47f1ce7c13d64794cf2b8682319151182140113e authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: raise precision cutoffs

4e-3 was an extremely optimistic, and in practice too low, cutoff value,
resulting in very bad 3...

03485015d26a7ec58570cbd0da561bdf068542b2 authored over 1 year ago by Niklas Haas <[email protected]>
meson: fix building with vulkan disabled and non-standard header location

vulkan/stubs.c also depends on vulkan headers.

7006002ca62c1d1db6f096c37cf7cb630104b419 authored over 1 year ago by Kacper Michajłow <[email protected]>
meson: workaround meson bug in get_define()

It should return empty string if it is not defined, but Looks like meson
returns ' ' in some cases.

6e94546a1bf6a3b800d8fdb4e562b9e51d6ee977 authored over 1 year ago by Kacper Michajłow <[email protected]>
shaders/colorspace: avoid oversaturating tone-mapped colors

When reducing the intensity we have to also reduce the saturation to
compensate, similar to how ...

8ceb7a544b70aff7e432cbb9708666115a6cb985 authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: fix compile warning

Bleh, didn't trigger locally..

9b4e561eb84ec06d73dd1305651fa989373f47ad authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: disable hue shifting on extreme inputs

Typically the case for synthetic test profiles that rotate hue vectors
entirely onto different p...

bd9689def2046f241a584fb52864e78ea2bf5c77 authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: force HDR primaries when forcing primaries

Explicitly reset `csp->hdr.prim`, in case this contains other values
from e.g. the swapchain.

ae2319d7a884828055849873cc9df3ed1ab6db79 authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: don't override HDR primaries

When forcing HDR levels, we currently override also the primaries
struct, which is quite an unde...

975abd4823581af91d44fb2334928077652e0311 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/icc: fix black point display scale

These XYZ values are normalized to the white point, so adjust the
display from the incorrect mcd...

d25b82b7dbf961d25d510bed6198ad3f24a7ec27 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/icc: print more ICC profile diagnostics

To help debug issues related to ICC profiles without necessarily needing
to provide the ICC prof...

f0d0293195c694575cd9ec5ec05e419116b07b6a authored over 1 year ago by Niklas Haas <[email protected]>
renderer: fix corner rounding on flipped targets

Need to take a proper fabsf of the crop dimensions.

00d19d243ced1f80628ebae5e2ba9fd1a5934b4c authored over 1 year ago by Niklas Haas <[email protected]>
utils/frame_queue: delay first frame until start PTS

Return an empty frame mix until the first frame's PTS value has been
reached.

e91f76515cf0c10b40880eb8b9bc4e5287ec5d01 authored over 1 year ago by Niklas Haas <[email protected]>
common: don't promote to double unnecessarily

Probably wouldn't happen anyway on any sane compiler, but nonetheless.

626813c29d92a97917fc55a1b1742320c33a3456 authored over 1 year ago by Niklas Haas <[email protected]>
common: prefix local variable with _

To avoid collisions with other vars named 'tmp'

05385189f41b5dbf439bdacb287e8ae2cc383e02 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: correctly rotate distortion canvas

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

b976d4f33f58bcc18b41dc10a73d111803d0c2d3 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: correctly normalize distortion dimensions

In case output is flipped/mirrored.

e4c3683239975d2c37737687fd9046db0197c112 authored over 1 year ago by Niklas Haas <[email protected]>
meson: make header compile test more strict

6377e058becb8e3899ea565dc7077b241d5fe481 authored over 1 year ago by Kacper Michajłow <[email protected]>
ci: don't double-define PL_STRIP_SHADERS

Fixes: 3fd65b2655ede8498728d9940cf21ccc9ce0b4c3

ec9d184d9b0009c501078df919685287283baf6e authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: scale down saturation when raising brightness

Avoids excessively over-saturating when tone mapping upwards in
brightness, which generally lead...

f06efc75bf1cd39c3520339e9420cab98b451aa6 authored over 1 year ago by Niklas Haas <[email protected]>
include: add missing PL_API for opengl/vulkan data exports

These were forgotten in earlier changes.

c125414b3f3bbe55c5b1e54b9d2f519e245bb8b4 authored over 1 year ago by Hendrik Leppkes <[email protected]>
shaders/colorspace: move implementation of pl_shader_color_map into the library

This avoids using designated initializers (compat issues with C++20)

fea661986a3977ef399faf194dfa58f3ef98d315 authored over 1 year ago by Hendrik Leppkes <[email protected]>
meson: enable PL_STRIP_SHADERS on release builds

Since this comes with a significant performance and CPU cost enhancement
at only minor debuggabi...

3fd65b2655ede8498728d9940cf21ccc9ce0b4c3 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: automatically expand/constrain distortion canvas

Instead of implicitly clamping the output image to the originally
specified dst_rect, this allow...

c3e6c2f7ce47edcd0df083c645c474dd7fb9dbba authored over 1 year ago by Niklas Haas <[email protected]>
common: add pl_transform2x2_bounds

Helper function to compute bounding boxes of transformations.

2e17877a422097dd9f2bcfff276f2d02c1320461 authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: hook up contrast recovery options

3df4e60dd50e251428912097aebf516d777fa174 authored over 1 year ago by Niklas Haas <[email protected]>
common: switch to pl_shader_color_map_ex

Mostly for cosmetic reasons, though I plan on extending at least one
instance of this.

852d389ff839c751b93fa65325c325e29fc5a1ac authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: add HDR contrast recovery

After a few iterations I settled on this, which is essentially a
HDR-specific sharpening filter,...

894671d63fd006b24132a247cae222a0a0ba902b authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: add pl_shader_color_map_ex

I want to extend this with more "runtime"-provided (i.e. not
user-facing) parameters. Having lea...

dd1e8e41a748e6521b4050b29ed9e7f848dfd086 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: hook up contrast recovery

Requires generation of a low-res feature map. To avoid excessive ringing
artefacts, hard-code th...

76786df4618378dddd3b372f7b3489969a1d0793 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: refactor sampler selection

Make this way less hacky and also more easily extended.

c0f5ab7fbddfbd78c6158c257769a085fc868c54 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/icc: fix gamma estimation for very strange profiles

If gray maps to solid black, as in some extreme benchmark/test profiles,
y_approx ends up as inf...

ac893728ec9131a3dd7d5e1ea36447d5965f5fa5 authored over 1 year ago by Niklas Haas <[email protected]>
vulkan/context: fix typo

Lest the very fabric of society fall apart and the world descend into
chaos.

d9ad4c3411c3da6599a1dddcbe7647830e477e52 authored over 1 year ago by Niklas Haas <[email protected]>
tests/gpu_tests: don't unnecessarily print polar output

2652e26fbd285da4cb802edb51c408e11fa2def8 authored over 1 year ago by Niklas Haas <[email protected]>
tests/gpu_tests: fix and rewrite renderer tests

The upscaler tests were actually no-ops because the output crop was
effectively hard-coded as 1x...

d0e3419c6dd17614cabe0b1ad81368bc4cc86714 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/sampling: fix pl_shader_sample_bicubic on GLES

1/6.0 etc. are not legal constants in GLES, need to write as 1.0/6.0.

b163cbd982abdbc0fc66ff84b7d2d96af7655bbf authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: add distortion settings

Mostly for demonstration purposes.

a4065aaf4e9558b365d1f09d1f74c390b0b5ffd8 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/sampling: add pl_shader_distort

Could be done better (e.g. mipmapping to reduce aliasing, arbitrary EWA
interpolation, ...) but ...

dd9cc9835b7968dcb725b51f954ee9509e520e5e authored over 1 year ago by Niklas Haas <[email protected]>
tests/gpu_tests: add pl_distort_params test

Just to make sure the shaders compile and the main logic branch is
covered.

18ec88a38f4fa69ff4ec353fd251a2db0ca179dd authored over 1 year ago by Niklas Haas <[email protected]>
shaders/custom: add PL_HOOK_PRE_OUTPUT

For hooking the point immediately before alpha blending, for any shaders
that want to make a las...

5ce3a81d00b90eda1613f40f006a6a234a41c830 authored over 1 year ago by Niklas Haas <[email protected]>
common: add pl_matrix2x2_rotation

Simple helper function for a common-ish operation.

c9f9c8504406e41b0468d842fbcfe7f7b20bc418 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: add pl_render_params.distort_params

Mostly just as a convenience to the user, to avoid having to hook
PL_HOOK_PRE_OUTPUT and ship a ...

3e75ea23ba6de96d0da7a0071d37500a7551a26d authored over 1 year ago by Niklas Haas <[email protected]>
common: add some missing matrix-related functions

Needed for new feature.

41a8e941c5318138bd325d2fa279b9ee34a1ed95 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: don't invalidate cache on corner_rounding change

This only affects pass_output_target and does not make it into the
cache.

9fcf0d0804104703a974162ebb149fe3a1fbd94f authored over 1 year ago by Niklas Haas <[email protected]>
renderer: simplify need_fbo check

Removes the clunky stateful peak_detect_active bool in exchange for a
properly scoped temporary ...

e68461922179f33255e30068fa8e5fca622861a3 authored over 1 year ago by Niklas Haas <[email protected]>
shaders: slightly improve clarity of code flow

Make it more explicit which case is which.

8ff9ca8dab0bea23123415957e8ccb930509f028 authored over 1 year ago by Niklas Haas <[email protected]>
shaders: correctly mark flexible shaders as such

This variable was never currently set.

a52d8a69476895dacfbccfc50bd50e2f2ded5695 authored over 1 year ago by Niklas Haas <[email protected]>
meson: prefer UCRT math functions

MinGW-w64 math functions are significantly slower than the UCRT ones.
In particular powf is over...

34a70f9756d8fa28ec3533aac37f1b032fa51dec authored over 1 year ago by Kacper Michajłow <[email protected]>
gamut_mapping: replace PQ EOTF by LUT

With linear interpolation, this gives enough precision even on a
256-element LUT, to pass the te...

c79f26c13c0f14da7d49ea34e99d5a5479689d85 authored over 1 year ago by Niklas Haas <[email protected]>
tests/tone_mapping: add 3DLUT generation benchmark

To test impact of performance improvements to the 3DLUT generation code

2d5ec46e4c85b12bded145068202f11790ef8a01 authored over 1 year ago by Niklas Haas <[email protected]>
meson: workaround has_header_symbol ignoring include_directories

Currently `include_directories` are ignored when used as `dependencies`
in `has_header_symbol`. ...

0b32f56f4969c071159b70b22e3332e9446e90f4 authored over 1 year ago by Kacper Michajłow <[email protected]>
meson: refactor Vulkan loader/headers search

Prefer our Vulkan-Headers as they are always available and with correct
version. Also remove ver...

c23f04c18e7aa90510747bd7e2c072b8b98fe37c authored over 1 year ago by Kacper Michajłow <[email protected]>
utils/libav: suppress unused variable warning

3e25675dc10d98ac67d1ca2af9f07b79c543dc77 authored over 1 year ago by Niklas Haas <[email protected]>
utils/libav: support frame locking

b38edd39a9f76f84951517b20d6f8a4e376f6996 authored over 1 year ago by Niklas Haas <[email protected]>
utils/libav: support planar texture interop

In the case of importing a planar texture, we only need to synchronize
the base texture, while t...

b8494ff18ccfb8fa3b19ae266cd7f336bc426054 authored over 1 year ago by Niklas Haas <[email protected]>
d3d11/tex: fix initial data upload for emulated texture formats

In case of emulated texture format we have to upload manually to reorder
the data.

04b4e919ea494329a1133e1efaa08878e5bd2406 authored over 1 year ago by Kacper Michajłow <[email protected]>
shaders/custom/mpv: log user shader source

Useful to know where the errors are coming from. Also log source with
PL_LOG_DEBUG same as other...

2677107a751c1438c04e99ea8bcfd16b0ed2290f authored over 1 year ago by Kacper Michajłow <[email protected]>
tests/tone_mapping: add gamut mapping primary round-trip test

Ensures that red maps (approximately) to red, cyan to cyan, and so on.
This is not an exact test...

c728c745f13e2d12d56a0b1839fc10e9b4db0617 authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: improve perceptual tone-mapping

Apply a hue shift to forcibly ensure primaries map to primaries, e.g.
red to red, and so on. Thi...

96af79477a38f8aa2e4f00d1cb51eba77bb7bd68 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: rotate isohue vectors with angle

Improves the visualization by allowing me to effectively rotate the
isohue vectors with respect ...

20d63f7335174cb54eb3582f406b4843771760e6 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: fix alpha blending output

We need to avoid stripping alpha information when blending, which
requires both persisting alpha...

541c85ec5e0e0b93a40896549c464632caab845d authored over 1 year ago by Niklas Haas <[email protected]>
renderer: properly handle out-of-bounds crops

We currently error if the crop expr exceeds the video frame dimensions.
Handle this properly by ...

19fdeb75154995bf3d8e660f343ed1121eb13aec authored over 1 year ago by Niklas Haas <[email protected]>
renderer: fix non-image case clamping

Wrong variable used in clamp.

a0579e4a45bdf8e2b844bfc9e16755adb74e00f8 authored over 1 year ago by Niklas Haas <[email protected]>
utils/libav: handle mistagged YCbCr files

Sometimes these are tagged as RGB. PNG in particular likes to give such
files for "gray" format,...

cf3c5b3e44e485264c081662090d030352adf889 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: refactor/fix frame acquire/release logic

The target frame could accidentally be double-acquired under the old
logic, leading to deadlock....

5fc27c807ecbd1ca1c7443776644453a73616ca4 authored over 1 year ago by Niklas Haas <[email protected]>
vulkan: switch (un)lock_queue to uint32_t

For consistency with both the Vulkan spec and the revised version of the
lavu vulkan patchset. T...

a28c2b4976a72202a4ea9c4149239c6f5584ca10 authored over 1 year ago by Niklas Haas <[email protected]>
tone_mapping: allow st2094-40 for no-op TM

To avoid discontinuity in black point handling.

Fixes: https://code.videolan.org/videolan/libpl...

51fcea1827bc0a2fcc7eaebc7dc91a061ed112f3 authored over 1 year ago by Niklas Haas <[email protected]>
tests: add test for corner rounding and background blending

Two for the price of one.

22f1130b414f7280d44e9bde58ac264156a67721 authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: add corner rounding GUI setting

669b8f16f0acfcfa050be22e8914c7db94b657f9 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: add corner rounding feature

Very cheap for us to support, just treat it as an on-the-fly alpha mask.

6b25c9753a8f97860535c5c9cd45d100a6cb1945 authored over 1 year ago by Niklas Haas <[email protected]>
d3d11: remove static texels count limit

Direct3D 11 runtime only guarantees that allocations within the maximum
resource size are suppor...

6bd12175af549f9c9e00d7e49809651a036abd66 authored over 1 year ago by Kacper Michajłow <[email protected]>
d3d11/tex: destroy texture on error

We need to clean up before returning.

ae39757e1d3141dea08ccf2120d5ea78af7fcb72 authored over 1 year ago by Kacper Michajłow <[email protected]>
shaders: switch to textureLod() properly

Instead of half-assing it with a #define, which prevents the use of
mipmapped textures (e.g. in ...

b7ceacd5e51c83beeeca14add4a0cb1afd4fcb1f authored over 1 year ago by Niklas Haas <[email protected]>
shaders: switch to textureSize()

Instead of accounting for the texture size manually in
sh_bind/setup_src.

We (unfortunately) st...

d0957d4ae043af7a8d9da00b7adc46404e43cca7 authored over 1 year ago by Niklas Haas <[email protected]>
utils/libav: update for lavu API changes

The old interlacing fields got deprecated.

fa0b73a4d7413e1531a905f8b153c7355031ac0a authored over 1 year ago by Niklas Haas <[email protected]>
utils/frame_queue: fix off-by-one error in EOF determination

We should *exclude* the target_pts = frame_pts + dur case, because that
would be the start of th...

bd087640887c9e50e7e496fefb21c7e7b5e4f3b4 authored over 1 year ago by Niklas Haas <[email protected]>
utils/frame_queue: properly hold last interpolated frame

Instead of returning EOF here early, only return EOF once the last frame
should no longer be vis...

45ca8c223a926d0f491adfb807c72de1a34a34bf authored over 1 year ago by Niklas Haas <[email protected]>
utils/frame_queue: treat provided vsync info as authoritative

And ignore safety clamp in this case.

302a4ad3000c117694dfa36bc83a24a91a46dbc6 authored over 1 year ago by Niklas Haas <[email protected]>
utils/frame_queue: don't interpolate incomplete frames

Treat an EOF after partial frame as EOF, instead of forwarding this
frame to the output.

b3c082973c5b9eaaddd768b4d016277ff4572d2f authored over 1 year ago by Niklas Haas <[email protected]>
renderer: add "linear" frame mixer

No reason for this not to exist, especially as it's useful to do linear
transitions/fades.

d5843d9d49411fd5af32724b50b892ea9e5be432 authored over 1 year ago by Niklas Haas <[email protected]>
utils/libav: add pl_get_mapped_avframe

To avoid the trappings of users directly accessing `frame->user_data`,
which led to the current ...

2c94c04d05861f9ecaa992870e29741f6a693f93 authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: fix UB avframe dereference

This is no longer just a straight pointer to AVFrame, and absolutely
should be cleaned up. We ca...

047637e38f2d0c8bddca039bf2ccd0e19e83317f authored over 1 year ago by Niklas Haas <[email protected]>
utils/libav: fix outdated comment

And actually, exposing this implementation detail was a bad idea in the
first place.

adee9e661cba50ca35a0c8e63436d195bdc6128e authored over 1 year ago by Niklas Haas <[email protected]>
d3d11: rename d3dmsg to dxgi_msg for consistency

e446d18de239a7c635cf460b3d5ef58203a257a4 authored over 1 year ago by Kacper Michajłow <[email protected]>
d3d11: add more message queue flush points

Now that we also validate DXGI calls.

2e8d5cc446e98a70d13a3bfe35c8d31888e22e8d authored over 1 year ago by Kacper Michajłow <[email protected]>
plplay: do not use more than 16 threads

It is not recommended by FFmpeg as some decoders have issues.

8d747ef10814882379a14f37adf0a07c18fd802d authored over 1 year ago by Kacper Michajłow <[email protected]>
d3d11: do not report live object on pl_d3d11_destroy on external device

16c9d50638574ac85ef9f43e56212ae63efcfd2c authored over 1 year ago by Kacper Michajłow <[email protected]>
d3d11: use __typeof__ instead of custom PFN_CREATE_DXGI_FACTORY

4220bd459a1c7d4189b06535a0b346dc3d27d048 authored over 1 year ago by Kacper Michajłow <[email protected]>
d3d11: use IDXGIInfoQueue instead ID3D11InfoQueue

DXGI debug interface encapsulate multiple message queues, which allows
to get validation not onl...

609549fdcc7cdfda9e35ca263089598cb94be65e authored over 1 year ago by Kacper Michajłow <[email protected]>
d3d11: disable IDXGIInfoQueue usage if dxgidebug.h is incomplete

Older MinGW-w64 doesn't define IDXGIInfoQueue in dxgidebug.h.

6e7bb7323e49c946373d18abe287c683f3f9d025 authored over 1 year ago by Kacper Michajłow <[email protected]>
vulkan: add pl_vulkan_params.extra_queues

Instead of universally enabling all supported QFs, this field lets us
whitelist the set of permi...

d61f332801bb5661a3dff233d50694c1b5493eff authored over 1 year ago by Niklas Haas <[email protected]>
utils/libav: move pl_dovi_metadata to priv struct

Avoids leaking this memory, and ties its lifetime explicitly to the
mapped AVFrame.

f299c480c92744a40d02a27efa13297591055b6a authored over 1 year ago by Niklas Haas <[email protected]>
utils/libav: turn `pl_frame.user_data` into a struct

So I can add more fields to this than just the `AVFrame`. Motivated by a
desire to keep track of...

ec57ccd75bdbdd82d86cc84d6480b0e299db922a authored over 1 year ago by Niklas Haas <[email protected]>
d3d11/pass: add a break when binding is found

730d21a059dcff5d2304be960ddbe046f5f5fb90 authored over 1 year ago by Kacper Michajłow <[email protected]>
d3d11/pass: fix UAV register allocation

Wrong index was used resulting in intermittent register allocation
conflicts.

Fixes: https://gi...

37599296a7f755c4c1772202ab5a927b4d991fd6 authored over 1 year ago by Kacper Michajłow <[email protected]>
d3d11/pass: fix samplers count check in register allocation

f9497539c234a0b5bb5bfb32854ca99e93fb0abc authored over 1 year ago by Kacper Michajłow <[email protected]>
vulkan/utils_gen: fix extension promotion check

This was bugged in the same way, due to mismatch between VK_VERSION_1_2
and VK_API_VERSION_1_2...

3a1422f8aef2728ff119cff1266cd8827a84383f authored over 1 year ago by Niklas Haas <[email protected]>
vulkan: fix vkCmdWriteTimestamp2 symbol name

When using this as an extension (rather than promoted command), we
cannot omit the KHR suffix. F...

0fa8192bf9b9edcca0cf0e58cdeaac7ed548ff5f authored over 1 year ago by Niklas Haas <[email protected]>
vulkan/utils_gen: fix VK_API_VERSION macro

These macros expand to 1, effectively disabling the intended behavior.

fa859c2248290169441e532cfe57eddb10fe24e6 authored over 1 year ago by Niklas Haas <[email protected]>
vulkan/context: fix nullptr dereference in feature check

a6b95dabdecc6a3a7071d43de86101dfc41d2fd0 authored over 1 year ago by Niklas Haas <[email protected]>