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/plplay: make antiringing slider slower to adjust

Very hard to get precise controls here.

5ef779c769472b85c8a00d8100815d717e903009 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/sampling: enable antiringing for EWA scalers

Based on two-pass design where the main interpolation kernel is combined
with a smaller, second ...

0581828343ddaafb81d296aa510d4d141e4d9b50 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/sampling: slight refactor to polar_sample

Normalizes the two branches by simply assigning to `c` in the `in`
branch.

a8d5b306d8938f2ed3e86f6ada57d561e13f4c2f authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: add frame/timing statistics

To help with debugging this stuff a bit more.

2e82bf5588ee5fad5d5f64781f76bc729f030732 authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: add ability to override rendering FPS

This can force the program into certain framerates on VRR displays, for
testing purposes. (Or it...

09e254851fd6f4625202a8bae45604636b772355 authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: stall render loop when frame mixing disabled

This effectively makes the render loop time itself to the system clock
instead of the display/vs...

00473e38f9ed431f59f0797588cd4bbba74020a4 authored over 1 year ago by Niklas Haas <[email protected]>
pl_clock: add pl_clock_sleep()

Based on nanosleep(). No point in using clock_nanosleep() since
nanosleep() already implies CLOC...

07a739faf10d5b3aba6f1a585c3489c7ed99af90 authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: implement more robust timing loop

Rather than always adding the measured delta from the previous frame,
use a single clock as the ...

153dd0341ec5048f200ed22cb619643087455cfa authored over 1 year ago by Niklas Haas <[email protected]>
utils/frame_queue: add queue state introspection API

Sorely needed for being able to programmaticaly debug or reason about
the contents of a pl_queue.

fa423b4242053f5061df87496cf7866df3384bd0 authored over 1 year ago by Niklas Haas <[email protected]>
utils/frame_queue: bump max FPS estimate hard limit

There are 240 Hz monitors on the market now. 200 Hz is definitely not a
valid cut-off point.

b5521dc6a706f9e69e0a50e7784449385778505c authored over 1 year ago by Niklas Haas <[email protected]>
utils/frame_queue: use doubles for PTS

Instead of floats. Floating precision is around 1e-7f, so after ~10000
seconds of playback (a fe...

0b8711d883ff132b246bc76852d5f8b340225ca1 authored over 1 year ago by Niklas Haas <[email protected]>
utils/frame_queue: dynamically increase PREFETCH_FRAMES

When source FPS exceeds display FPS (and we know this fact), we should
increase the number of fr...

cf54bab455a01703d73948bc72bc992dadd5b3ed authored over 1 year ago by Niklas Haas <[email protected]>
utils/frame_queue: handle FPS updates more quickly

In VFR sources, delaying for 8 frames unnecessarily prolongs the time it
takes to react to chang...

bf69a45a3dc27645391289ba5f72de7d82eecee0 authored over 1 year ago by Niklas Haas <[email protected]>
vulkan: add pl_vulkan_swapchain_params.disable_10bit_sdr

To mirror the D3D11 option, and to work around driver-related dithering
bugs.

See-Also: https:/...

4d20c8b6b1ad86e18ec79c5e69b754314373810b authored over 1 year ago by Niklas Haas <[email protected]>
vulkan: fix crash without synchronization2

No inherent need to use the sync2 command here because we don't require
the extra granularity pr...

d8e55344352755d95c5dedf60b22c34f26afd65d authored over 1 year ago by Niklas Haas <[email protected]>
vulkan/context: don't require synchronization2

Notably missing on MoltenVK. Work around it for now.

Fixes: https://github.com/haasn/libplacebo...

1d7092334dead779c42f15fd66b01e3086d472f6 authored over 1 year ago by Niklas Haas <[email protected]>
vulkan/command: add compatibility for pre-QueueSubmit2

Not very efficient (does a bunch of allocations per submit), but such is
the price of being on o...

219b0761a99106b83b5a3030f977ba66e6f361f7 authored over 1 year ago by Niklas Haas <[email protected]>
vulkan/command: add compatibility for pre-sync2 barriers

Requires some annoying boilerplate to map the flags and barriers, but
fortunately we can get awa...

e8b30c2132ac6744533c3ee917e32813b279a71b authored over 1 year ago by Niklas Haas <[email protected]>
vulkan/command: drop redundant vk_ctx param from vk_cmd_*

After this became available inside vk_cmdpool. Saves a bunch of
redundant boilerplate struct pas...

03e171c388b6150121f46e0d0777d7e7ad32cfae authored over 1 year ago by Niklas Haas <[email protected]>
vulkan/command: drop unused param from vk_sem_barrier

And even if we need this in the future, we can get it from the
vk_cmdpool now.

495e11287ea4cd4a3ab5804e2c93a4c2a294add6 authored over 1 year ago by Niklas Haas <[email protected]>
vulkan/command: add struct vk_ctx *vk to vk_cmdpool

As a convenience.

c5ff38bb1967a637b6da36a8ecdcad7a36182e3d authored over 1 year ago by Niklas Haas <[email protected]>
filters: fix polar downscaling

The cutoff radius was being computed with the normalized radius, rather
than the scaled radius, ...

f53badbb827d292c268d706c756e2e6f676b4cab authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: reverse LUT-less fallback logic

Instead of forcing everything but linear/saturation to clip, force
everything *but* clip to line...

e6a89f31a8d4b71af1cc6802f764bf6b96e4fcdc authored over 1 year ago by Niklas Haas <[email protected]>
Revert "vulkan/pass: switch to dynamic rendering"

This reverts commit d03db4df6c4242daf47ee40cdd426533ccfa66c5.

Fixes: https://github.com/mpv-pla...

384f8d73e9ec118e61c16593ed753e7d096e3bc4 authored over 1 year ago by Niklas Haas <[email protected]>
utils/libav: add pl_test_pixfmt_caps

Needed to ensure the extended capabilities required by vf_libplacebo
(i.e. rendering) are actual...

1cf81610ac837b3a76201ab76bff82db709815d2 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/sampling: don't antiring when not upscaling

Fixes: https://github.com/mpv-player/mpv/issues/11905

9855b663f1da050c36dd2278ceb372044c44fc73 authored over 1 year ago by Niklas Haas <[email protected]>
tools/glsl_preproc: properly ensure uniqueness of names

If expressions would end up with the same slugify'd name, we need to
properly deduplicate them, ...

9798aad425042b83bd5e29d7ae806f6ca537c3a7 authored over 1 year ago by Niklas Haas <[email protected]>
shaders: add GLSL macro preprocessor

After a long deliberation period, I settled on this design to improve
both the workflow of writi...

938b95a9ba7aec800d1c96e821f58e93758601e9 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/sampling: switch some samplers to pragma GLSL

More of a test / proof of concept than anything else.

c8267bd426f5e767604c75a0079e61e18bb36e1f authored over 1 year ago by Niklas Haas <[email protected]>
shaders/sampling: use #pragma GLSL for parts of polar shader

This is one of the main use cases where it actually provides a benefit,
as this significantly re...

7d955e9ea641a26b32b3df3866bd3103ec9b963a authored over 1 year ago by Niklas Haas <[email protected]>
docs: add documentation for GLSL subsystem

Including the new #pragma GLSL macro

6c581096ed950f6e244e742177f763eff7f47e6b authored over 1 year ago by Niklas Haas <[email protected]>
shaders: default to PL_STRIP_SHADERS

Required for the GLSL pragma refactor step.

6097f32494adb74d1715b51d53cf1c7df566ed6c authored over 1 year ago by Niklas Haas <[email protected]>
vulkan/utils_gen: move template to separate file

For consistency and better syntax highlighting.

eb19a6afbdaba839361cef30784682c532a19be3 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: also visualize iso-chroma lines

To better show the size of the 'protected region' in a various color
mapping scheme, as well as ...

b959cab8b859dc53a6dbd26c050be0b3883114c8 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: use saturation mapping for OSD

For overlays, which are probably saturated synthetic graphics, this
probably leads to a subjecti...

ef202bcff8cce0e208e244e453d62dcad4c350ca authored over 1 year ago by Niklas Haas <[email protected]>
renderer: force linear TM for OSD

Much better than clipping here, if the target brightness is less than
the monitor's brightness (...

1b8ebdb3b2cdc20c12630292c98763b3c96093ac authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: implement saturation mapping fast path

This can be done for free by just multiplying the appropriate conversion
matrix into the colorsp...

f90ad8fccf57bdf541f721f442eef4734024c668 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: allow linear TM without state obj

No reason to forbid this, because it's implemented in pure GLSL.
Override the force-tone-mapping...

950ee09f63814de90a45217a4d4d3b25527451af authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: add -h to enable high-quality preset

Ideally we'd somehow auto-detect this based on detected GPU performance
or type (iGPU vs discret...

6bdb786e24dbd8978380caa0f8945cf64183b4af authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: fix indent (cosmetic)

32d2276ae337665a254b91ac616b1ceb0c8d1564 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: add pl_*_high_quality_params for tone-mapping

Splits peak detection and tone-mapping params into standard and high
quality. The former disable...

5b9937c83a23f09e694434c50964a529fac5349d authored over 1 year ago by Niklas Haas <[email protected]>
renderer: move skip_caching_single_frame to correct section

This is not a performance/quality trade-off option.

d5a7474877f27c992636780f10ddfc1afaa4825f authored over 1 year ago by Niklas Haas <[email protected]>
renderer: enable peak detection by default

It really is impossible to stress how much peak detection improves
out-of-the-box HDR tone-mappi...

afb9fc8a58719c7332a0d61d72ad587d8f9ad103 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: don't disable contrast recovery if no downscaler set

We hard-code gaussian for this so there's no reason to disable it here.
I'm pretty sure it was a...

821a052f2dafee37c1a9743e6561d9fb87a77444 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: use pl_*_high_quality_params where appropriate

Enables histogram estimation and contrast recovery on high quality
systems out of the box.

1bcaadb7c6251a8602ef1efa0683d33d7f419334 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: silently disable peak-detection if no SSBOs

To match the existing logic of silently disabling them if the FBO is
non-storable. Probably bett...

cbfed1e9acf067ee1554c6a23f7f463c27eabbd3 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: ignore skip_anti_aliasing for contrast recovery

Always enables this feature if requested by the user, period.

ff7756a76cadb4fe02eb21a267dd8923bfd33d7f authored over 1 year ago by Niklas Haas <[email protected]>
renderer: update HDR peak at downscaled resolution

Except when upscaling, in which case we update the peak before
upscaling.

Note that there is no...

fcf81635df58489f33e2d8521f56eb876dbf666e authored over 1 year ago by Niklas Haas <[email protected]>
renderer: hook PL_HOOK_SCALED even on free sampling

But not PRE/POST-kernel, since no kernel was applied.

ad052218c552bd0a5d46fa891dee4d57304318c2 authored over 1 year ago by Niklas Haas <[email protected]>
renderer: remove unnecessary need_fbo force

Image overlays haven't been drawn directly onto the indirect image in
quite a while, making this...

a0ba2382ca7b96421c81f13ecd9246d965a14624 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: parallelize peak detection atomics

Substantially improves performance on systems that are constrained by
global atomic pressure, li...

c9d4003891debdea8ca1c22ae9fa81b043d15083 authored over 1 year ago by Niklas Haas <[email protected]>
meson: use git describe --dirty

Makes user-applied modifications visible.

e158e30774147ec6e4e770c66d57e8214b81e97b authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: default use_icc_luma to enabled

With the new tone-mapping in place, this now produces a substantially
better image out-of-the-box.

187bbbe9f8384d530b2cff17dda3793d4f9f5bc7 authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: rename force_icc_luma to use_icc_luma

More descriptive name.

59c393f505dca6071a58785b6c809fad41e90ce3 authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: desaturate more aggressively

But not 100%, just somewhere in the middle. Constant tuned to preserve a
nice balance between ex...

e7e9d5bf8b19bcedd6ac095dfa0fec6ed5c8ed98 authored over 1 year ago by Niklas Haas <[email protected]>
tests/tone_mapping: make gamut mapping test more verbose

So I can actually understand what's going on a bit more easily.

8a9aa4e2523781f8d9e43d8ed68a4fe0f07a83b9 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: allow non-host-readable peak detection SSBOs

Requires indirection via pl_buf_copy.

Fixes: https://github.com/mpv-player/mpv/issues/11864

e2e235a0f8fec04ac37061eca9b2877afbb3b697 authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: soft-clip in RGB after mapping

The reason this new curve works so well is because it incorporates a bit
of hard clipping in RGB...

17aecaf794c39e37146f80c201a52efd2ca65d37 authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: factor out softclip function

To allow re-using it in other places.

3042c927979250032feb301a6978f987b10b7460 authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: greatly simplify perceptual tone mapping

Instead of applying this complicated soft-knee along the gamma axis, as
inspired by the gamut ma...

599ea16669275b1d2e9a89eb8c809fe65562738e authored over 1 year ago by Niklas Haas <[email protected]>
Revert "gamut_mapping: clip to source gamut in perceptual mode"

This reverts commit f016363d589a1ffd744be65a14455e4e79750bbd.

This change had unintended conseq...

ab68ef88171f6252fabf7d8ade0cdfa2e958d7a2 authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: add chromaticity margin to perceptual mode

After rotating hue vectors, strongly saturated colors may exceed the
source chromaticity bounds ...

a4ae197adaa25684998297597db84c2e7bd7eba9 authored over 1 year ago by Niklas Haas <[email protected]>
ci: define minimal macOS version

Check for unguarded availability to avoid calling possiblly not
available weak symbols.

363cada9c2a4bd36046f2262b3f1c536e688a9f9 authored over 1 year ago by Kacper Michajłow <[email protected]>
colorspace: improve pl_color_transfer_nominal_peak docs

Make this less confusing re: HLG, now that we no longer allow users to
change the OOTF.

f73905e291c5fde9af732b607446462b5e915511 authored over 1 year ago by Niklas Haas <[email protected]>
colorspace: properly clamp HDR levels

As advertised/documented. Also clamp to the upper bound of 10k nits
(sane PQ value range), and h...

d81bcd00ec6b34bc64746ac2f9a42f8823aaa553 authored over 1 year ago by Niklas Haas <[email protected]>
colorspace: fix pl_nominal_luma_ex SDR contrast fallback

The old logic incorrectly inferred SDR min_luma from the static
max_luma, even if maximum lumina...

d525487de38815536be798ed3701863d3b40b0ed authored over 1 year ago by Niklas Haas <[email protected]>
tests/colorspace: test pl_color_space_nominal_luma_ex

Add a series of explicit tests to ensure not regressing this logic
during refactors. Note that t...

103ca05772c58bd96080704fa8b3c96db6c684d9 authored over 1 year ago by Niklas Haas <[email protected]>
colorspace: consider only max_luma a valid HDR10 set

min_luma missing should not count against HDR10 metadata validity,
especially given that this va...

d1f3b0e3b4df493b9d6868916f06777e463778e7 authored over 1 year ago by Niklas Haas <[email protected]>
colorspace: document pl_hdr_metadata better

In particular, how values of 0 are treated as "unknown / missing".

38d0a682beea6c8468bba67aa8fb7fcc50ad3d50 authored over 1 year ago by Niklas Haas <[email protected]>
colorspace: introduce more PL_COLOR_* defines

To be more informative about what values we're setting and why. I also
decided to drop the HDR b...

86318d03766a3a6c54e5af9b2868992b7aad90b8 authored over 1 year ago by Niklas Haas <[email protected]>
colorspace: also allow using static metadata as fallback

When requesting a dynamic metadata type, we currently fall back to the
fixed 10k from PQ. It mak...

04e3fd6a951f9b497ccc7ef4cbd82d9462b369ec authored over 1 year ago by Niklas Haas <[email protected]>
colorspace: remove minimum max_luma safety clamp

It's better to filter those illegal values out closer to the source
(i.e. when parsing the struct).

d2b42bf57a0e78af19a7caaeef59e5bc6ddcadc2 authored over 1 year ago by Niklas Haas <[email protected]>
utils/libav: strip bogus MDM values

Sanity clamp here, to avoid regressing badly broken metadata samples.

b6f2c374132ad06cf24d9099dcd75597796ad1ae authored over 1 year ago by Niklas Haas <[email protected]>
pl_clock: use new helper

a03718eecf1d6da2d02ffeacb858e48331702a4b authored over 1 year ago by Kacper Michajłow <[email protected]>
pl_clock: add clock helper

5aedc0ec08e06110ed4994dd0611c9150429b8df authored over 1 year ago by Kacper Michajłow <[email protected]>
plplay: allow going down to 10 nits for target max luma

This is in sync with mpv minimum value. If anything just for test we can
go so low.

9b23b61402273e1731b6b1d9764a85b8422ac355 authored over 1 year ago by Kacper Michajłow <[email protected]>
colorspace: allow going down to 10 nits for target max luma

This is the minimum value in mpv and users expect it to work. So let them
set it so low, for bet...

0fef73f6830cce0626bc9284bcefd7fd8a3d93ec authored over 1 year ago by Kacper Michajłow <[email protected]>
meson: fix apiver table

This is a documentation bug only, the actual sover is and continues to
be 290.

b42cd55482760bd8546cb8bd805d90fd204b759b authored over 1 year ago by Niklas Haas <[email protected]>
plplay: add window impl selection

cc2d043a950fb37b6f89952fd03b16720eb57e27 authored over 1 year ago by Kacper Michajłow <[email protected]>
plplay: add more flexible arg parsing

76edbcce9751aa1731c8f3726260a8916371bcd9 authored over 1 year ago by Kacper Michajłow <[email protected]>
plplay: add -s software decoding option

92db71aaef35140f715a283aa17a61631c81e445 authored over 1 year ago by Kacper Michajłow <[email protected]>
gamut_mapping: add knee to perceptual hue shifting

Makes this transition a lot softer, especially around blue, to preserve
gradients better. We sti...

1a5459fa75a8ce4c32e892fec1cdb31c5aeb3b74 authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: split perceptual cache pre/post hueshift

Significantly improves cache hit rate by allowing us to have a separate
per-hue cache before and...

2eaf1d684c948d02666eae47edd8381863c3d765 authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: improve PQ EOTF LUT precision

Costs us basically nothing and improves the result slightly.

81df430b365a1d9f410f7d24ad3d9962082ceb7a authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: multi-thread 3DLUT generation

Absolutely massive speedup on typical systems, for very little overhead.

Probably not the smart...

aa0822f6c23e674367125dbd61572ebc844e1e0d authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: nuke chroma_margin

No longer needed after 8ceb7a544, at least in theory.

e82e5c8bdb28094db1f8e0aca621637b391bacdf authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: nuke thread-local cache hack

Move this to a dedicated struct so we can more easily replace the cache
by a different one. Stil...

ffde91df26c93cd10b7652ed3a134a9c652dcd2f authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: don't unconditionally clip input

Dramatically improves appearance on test samples and other badly
out-of-range content. In such c...

19492801f7b0124ad71fcc0ac694eb2d31a80df9 authored over 1 year ago by Niklas Haas <[email protected]>
gamut_mapping: clip to source gamut in perceptual mode

This helps hide issues with badly out-of-range values in certain test
patterns, Mad Max, etc.

f016363d589a1ffd744be65a14455e4e79750bbd authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: drop removed setting

And re-organize slightly.

b9b2b59d6f7e4ca966e6a40734d99be7b382f9e4 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: remove hybrid_mix

After the recent series of improvements, LMS hybrid mixing is no longer
needed and actually hurt...

a84becf37d3ec8db5147483a47eb87e62187204b authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: adjust 3DLUT resolution

Hue is the most important axis, and even 45 is not enough by far.
Increase it considerably. Idea...

94fa0398c6f1f26123cff8cbea304d933473035a authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: bump up 3DLUT size limits

For my own experimentation.

5f8d419b3e447561292b8a4fcaa737205f20a782 authored over 1 year ago by Niklas Haas <[email protected]>
shaders/colorspace: add support for tricubic 3DLUT interpolation

Substantially higher quality than the default trilinear interpolation,
but also significantly sl...

a10b27eaff899e03e88f73eab253e75ab5f0d3c2 authored over 1 year ago by Niklas Haas <[email protected]>
shaders: implement tricubic LUT interpolation

Could probably be improved further by avoiding some redundant mix()
calls on the texture coordin...

9d5684df3037f5812fe1cec7496d6776ecd2610d authored over 1 year ago by Niklas Haas <[email protected]>
common: slightly increase accuracy of pl_matrix3x3_invert

Do the calculation with 64-bit floating points, converting the final
matrix back to 32-bit float...

318f3542685987cfb8af4072301e4b228ebcee61 authored over 1 year ago by Niklas Haas <[email protected]>
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]>
pl_thread: fix return type of pl_thread_create

Documentation fix only.

d1de874f6daa48c5257c832692cdcd39fdece48f authored over 1 year ago by Niklas Haas <[email protected]>
demos/plplay: fix 3DLUT size bounds

To be odd, instead of even, for accuracy reasons.

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