movit
2 years agoFix another set of test breakages on NVIDIA.
Steinar H. Gunderson [Wed, 22 Nov 2017 23:59:46 +0000 (00:59 +0100)]
Fix another set of test breakages on NVIDIA.

This was broken by c6ee050546b6940ae19a74f92bdcc8d2b1f56d22,
which stopped modifying destination textures' minification modes.

2 years agoUnbreak FBO caching in unit tests.
Steinar H. Gunderson [Wed, 22 Nov 2017 23:18:28 +0000 (00:18 +0100)]
Unbreak FBO caching in unit tests.

EffectChain::render_to_textures() ended up reusing FBOs in a way that
was not compatible with how the tester managed textures; this broke nearly all
unit tests on NVIDIA.

2 years agoInstall compute shaders on make install.
Steinar H. Gunderson [Wed, 22 Nov 2017 22:04:56 +0000 (23:04 +0100)]
Install compute shaders on make install.

2 years agoManage intermediate textures a bit more efficiently.
Steinar H. Gunderson [Wed, 22 Nov 2017 19:36:22 +0000 (20:36 +0100)]
Manage intermediate textures a bit more efficiently.

By holding on to them only for as long as we need to, we'll save some
peak texture RAM, and _might_ in some situations get a bit less cache
trashing.

2 years agoSupport sqrt-transformed intermediates with compute shaders.
Steinar H. Gunderson [Wed, 22 Nov 2017 19:13:46 +0000 (20:13 +0100)]
Support sqrt-transformed intermediates with compute shaders.

2 years agoMove compute shader functions from the header to the footer; easier to unify with...
Steinar H. Gunderson [Wed, 22 Nov 2017 19:11:06 +0000 (20:11 +0100)]
Move compute shader functions from the header to the footer; easier to unify with how the fragment shaders work.

2 years agoMove the compute shader tests into effect_chain_test, as we will have hybrid tests...
Steinar H. Gunderson [Wed, 22 Nov 2017 18:57:32 +0000 (19:57 +0100)]
Move the compute shader tests into effect_chain_test, as we will have hybrid tests soon.

2 years agoSupport other output formats than GL_RGBA16F; was easier than originally feared.
Steinar H. Gunderson [Wed, 22 Nov 2017 18:47:31 +0000 (19:47 +0100)]
Support other output formats than GL_RGBA16F; was easier than originally feared.

2 years agoDo some more cleanups in anticipation of more flexible compute shader outputs.
Steinar H. Gunderson [Wed, 22 Nov 2017 18:28:14 +0000 (19:28 +0100)]
Do some more cleanups in anticipation of more flexible compute shader outputs.

Includes reverting back to last_phase instead of render_to_texture.

2 years agoSupport rendering compute shaders straight to textures (skipping the dummy phase).
Steinar H. Gunderson [Tue, 21 Nov 2017 23:04:03 +0000 (00:04 +0100)]
Support rendering compute shaders straight to textures (skipping the dummy phase).

There are lots of limitations currently (only one destination,
only GL_RGBA16F), but it's a good start. Curiously enough,
it doesn't really help anything on the deinterlacing benchmark
for my Haswell, but NVIDIA sees ~15% improvement.

2 years agoFix an issue where -std=gnu++11 would become the only flag.
Steinar H. Gunderson [Mon, 20 Nov 2017 23:57:51 +0000 (00:57 +0100)]
Fix an issue where -std=gnu++11 would become the only flag.

2 years agoAdd a texture barrier after dispatching each compute shader.
Steinar H. Gunderson [Mon, 20 Nov 2017 18:41:10 +0000 (19:41 +0100)]
Add a texture barrier after dispatching each compute shader.

This is maybe a bit heavy-handed (there are cases where shaders could
run in parallel), but it's by far the simplest thing to do, since we
have zero control over what happens to the textures we use when they
are handed back to the resource pool.

2 years agoAdd some asserts to EffectChain::execute_phase, so that we do not inadvertedly insert...
Steinar H. Gunderson [Mon, 20 Nov 2017 18:10:47 +0000 (19:10 +0100)]
Add some asserts to EffectChain::execute_phase, so that we do not inadvertedly insert new output textures with number 0.

2 years agoInvert the meaning of the last_phase boolean to execute_phase().
Steinar H. Gunderson [Mon, 20 Nov 2017 18:07:46 +0000 (19:07 +0100)]
Invert the meaning of the last_phase boolean to execute_phase().

This is because we can soon have last phases that do not render to FBOs
(those that come out of compute shaders).

2 years agoUse glGetTexImage() instead of glReadPixels() for reading back test data.
Steinar H. Gunderson [Mon, 20 Nov 2017 17:27:22 +0000 (18:27 +0100)]
Use glGetTexImage() instead of glReadPixels() for reading back test data.

Generally cleaner, and also paves the way for when we have FBO-less
rendering from compute shaders.

2 years agoBetter error messages when skipping compute shader benchmarks.
Steinar H. Gunderson [Sun, 19 Nov 2017 14:25:30 +0000 (15:25 +0100)]
Better error messages when skipping compute shader benchmarks.

2 years agoImplement a compute shdaer version of DeinterlaceEffect.
Steinar H. Gunderson [Thu, 16 Nov 2017 22:07:47 +0000 (23:07 +0100)]
Implement a compute shdaer version of DeinterlaceEffect.

This is currently a loss for grayscale (probably due to the extra
rgba16f bounce), but a win of about ~30% on BGRA on my Haswell.
NVIDIA doesn't care much either way.

There are some performance mysteries remaining, but it's a good start.

2 years agoReduce the clutter in instantiating benchmarks a little bit.
Steinar H. Gunderson [Sun, 19 Nov 2017 00:32:06 +0000 (01:32 +0100)]
Reduce the clutter in instantiating benchmarks a little bit.

2 years agoAdd a helper class to easier test fragment and compute shader versions of the same...
Steinar H. Gunderson [Sun, 19 Nov 2017 00:28:02 +0000 (01:28 +0100)]
Add a helper class to easier test fragment and compute shader versions of the same effect alongside each other.

2 years agoFix compute shader outputs on NVIDIA.
Steinar H. Gunderson [Sat, 18 Nov 2017 20:20:06 +0000 (21:20 +0100)]
Fix compute shader outputs on NVIDIA.

2 years agoBump compute shader header to #version 150.
Steinar H. Gunderson [Sat, 18 Nov 2017 20:13:14 +0000 (21:13 +0100)]
Bump compute shader header to #version 150.

NVIDIA requires this for the layout qualifier, and it's probably right.
Note that this required moving the unit tests to a core context,
due to Mesa's demands.

2 years agoDrop support for SDL1, which is no longer maintained.
Steinar H. Gunderson [Sat, 18 Nov 2017 20:11:07 +0000 (21:11 +0100)]
Drop support for SDL1, which is no longer maintained.

2 years agoUse auto and range-based for loops a few places where it aids clarity.
Steinar H. Gunderson [Sat, 18 Nov 2017 17:24:08 +0000 (18:24 +0100)]
Use auto and range-based for loops a few places where it aids clarity.

2 years agoMore renaming of .compute -> .comp.
Steinar H. Gunderson [Sat, 18 Nov 2017 13:44:51 +0000 (14:44 +0100)]
More renaming of .compute -> .comp.

2 years agoFix an issue where matrices would not get printed out on test failure.
Steinar H. Gunderson [Sat, 18 Nov 2017 10:45:30 +0000 (11:45 +0100)]
Fix an issue where matrices would not get printed out on test failure.

2 years agoAdd a benchmark for DeinterlaceTest without the spatial interlacing check.
Steinar H. Gunderson [Sat, 18 Nov 2017 10:35:15 +0000 (11:35 +0100)]
Add a benchmark for DeinterlaceTest without the spatial interlacing check.

2 years agoRename .compute to .comp, to be in line with the Khronos reference compiler.
Steinar H. Gunderson [Sat, 18 Nov 2017 10:07:37 +0000 (11:07 +0100)]
Rename .compute to .comp, to be in line with the Khronos reference compiler.

2 years agoMake BGRA deinterlacing benchmark premultiplied, so that we do not use forever just...
Steinar H. Gunderson [Fri, 17 Nov 2017 20:41:39 +0000 (21:41 +0100)]
Make BGRA deinterlacing benchmark premultiplied, so that we do not use forever just in bouncing.

2 years agoParametrize BM_DeinterlaceEffect so that we have both grayscale and BGRA.
Steinar H. Gunderson [Thu, 16 Nov 2017 17:17:28 +0000 (18:17 +0100)]
Parametrize BM_DeinterlaceEffect so that we have both grayscale and BGRA.

2 years agoFix deletion of compute shaders.
Steinar H. Gunderson [Wed, 15 Nov 2017 23:34:47 +0000 (00:34 +0100)]
Fix deletion of compute shaders.

2 years agoFix some missing NULL -> nullptr.
Steinar H. Gunderson [Wed, 15 Nov 2017 19:49:59 +0000 (20:49 +0100)]
Fix some missing NULL -> nullptr.

2 years agoRevert "Remove C++11 dependency from ResampleEffect."
Steinar H. Gunderson [Wed, 15 Nov 2017 19:47:31 +0000 (20:47 +0100)]
Revert "Remove C++11 dependency from ResampleEffect."

Add back unique_ptr, now that we have C++11.

This reverts commit 8e9f58fec54a4c879035b214fd7411f6ff7b3a32.

2 years agoUse double right angle brackets for nested templates everywhere, now that we have...
Steinar H. Gunderson [Wed, 15 Nov 2017 19:46:16 +0000 (20:46 +0100)]
Use double right angle brackets for nested templates everywhere, now that we have C++11.

2 years agoUse nullptr everywhere, now that we have C++11.
Steinar H. Gunderson [Wed, 15 Nov 2017 19:45:41 +0000 (20:45 +0100)]
Use nullptr everywhere, now that we have C++11.

2 years agoAdd support for microbenchmarks.
Steinar H. Gunderson [Wed, 15 Nov 2017 19:30:58 +0000 (20:30 +0100)]
Add support for microbenchmarks.

This depends on Google's microbenchmark library (latest git version,
at least as soon as they pull in the pkg-config file), but it is
not mandatory.

Note that this makes Movit depend on C++11.

2 years agoAdd support for compute shaders.
Steinar H. Gunderson [Mon, 13 Nov 2017 20:58:40 +0000 (21:58 +0100)]
Add support for compute shaders.

This is currently pretty raw, and there are no effect using it yet,
but it's a useful first step for getting the infrastructure in place.

2 years agoThere's no need to #undef PREFIX, since we do the token pasting ourselves.
Steinar H. Gunderson [Mon, 13 Nov 2017 19:36:27 +0000 (20:36 +0100)]
There's no need to #undef PREFIX, since we do the token pasting ourselves.

2 years agoFix some invalid code in DeinterlaceTest; GCC 7 would optimize it into simply an...
Steinar H. Gunderson [Sun, 12 Nov 2017 00:30:01 +0000 (01:30 +0100)]
Fix some invalid code in DeinterlaceTest; GCC 7 would optimize it into simply an infinite loop.

2 years agoSome refactoring in ResourcePool.
Steinar H. Gunderson [Sat, 11 Nov 2017 21:02:46 +0000 (22:02 +0100)]
Some refactoring in ResourcePool.

2 years agoAdd the GPLv2 license text.
Steinar H. Gunderson [Sat, 16 Sep 2017 10:08:27 +0000 (12:08 +0200)]
Add the GPLv2 license text.

2 years agofix compile error: "error: variable-sized object ‘red_data’ may not be initialized"
Pascal Massimino [Thu, 14 Sep 2017 10:58:57 +0000 (12:58 +0200)]
fix compile error: "error: variable-sized object ‘red_data’ may not be initialized"

2 years agoSupport negative values for lift in LiftGammaGainEffect.
Steinar H. Gunderson [Wed, 13 Sep 2017 18:28:26 +0000 (20:28 +0200)]
Support negative values for lift in LiftGammaGainEffect.

Patch by Jean-Baptiste Mardelle <jb@kdenlive.org> (except the test,
which is by myself). Based on work from Dušan Hanuš <hanus@pixelhouse.cz>.

2 years agoFix a typo.
Steinar H. Gunderson [Thu, 10 Aug 2017 23:09:13 +0000 (01:09 +0200)]
Fix a typo.

2 years agoRelease Movit 1.5.3. 1.5.3
Steinar H. Gunderson [Thu, 10 Aug 2017 15:59:58 +0000 (17:59 +0200)]
Release Movit 1.5.3.

2 years agoAdd a notice to render_to_screen() that it might be suboptimal.
Steinar H. Gunderson [Tue, 8 Aug 2017 16:03:09 +0000 (18:03 +0200)]
Add a notice to render_to_screen() that it might be suboptimal.

2 years agoFix a leak if ResampleEffect is destroyed before being put on a chain.
Steinar H. Gunderson [Mon, 7 Aug 2017 07:32:21 +0000 (09:32 +0200)]
Fix a leak if ResampleEffect is destroyed before being put on a chain.

FFTConvolutionEffect remembered this, but ResampleEffect did not.
Patch by Dan Dennedy.

2 years agoFix fp16_test compilation _without_ f16c-enabled compilation flags.
Steinar H. Gunderson [Thu, 3 Aug 2017 13:36:30 +0000 (15:36 +0200)]
Fix fp16_test compilation _without_ f16c-enabled compilation flags.

Reported by Arthur Huillet.

2 years agoFix fp16_test compilation with f16c-enabled compilation flags.
Steinar H. Gunderson [Tue, 1 Aug 2017 15:41:17 +0000 (17:41 +0200)]
Fix fp16_test compilation with f16c-enabled compilation flags.

2 years agoRemove C++11 dependency from ResampleEffect.
Steinar H. Gunderson [Tue, 1 Aug 2017 07:25:10 +0000 (09:25 +0200)]
Remove C++11 dependency from ResampleEffect.

We really ought to allow C++11 in Movit soon, but 1.5.2 is not the right release.

Reported by Etienne d'Hautefeuille.

2 years agoFix a double-unlock.
Steinar H. Gunderson [Fri, 28 Jul 2017 17:06:33 +0000 (19:06 +0200)]
Fix a double-unlock.

2 years agoRelease Movit 1.5.2. 1.5.2
Steinar H. Gunderson [Wed, 5 Jul 2017 07:37:39 +0000 (09:37 +0200)]
Release Movit 1.5.2.

2 years agoAdd some room for future expansion in ResampleEffect, since I have something that...
Steinar H. Gunderson [Wed, 5 Jul 2017 07:35:40 +0000 (09:35 +0200)]
Add some room for future expansion in ResampleEffect, since I have something that I would like them for and we are breaking the ABI anyway.

2 years agoCache VAOs between runs.
Steinar H. Gunderson [Tue, 4 Jul 2017 23:06:12 +0000 (01:06 +0200)]
Cache VAOs between runs.

NVIDIA's drivers (at least the Linux drivers) seem to have a bug
where, if you call glVertexAttribPointer() in one thread together
with some specific activity in another thread (at least another
glVertexAttribPointer() will do, but I've also seen it during
glXSwapBuffers()), it will try to free a non-malloced pointer,
crashing everything. This happens very rarely, but often enough
that it's a real problem for Nageru.

We solve it by simply pre-creating all needed VAOs ahead-of-time
and caching them, which makes us call glVertexAttribPointer()
a _lot_ less often (basically never, instead of several times
per frame). This might actually be a bit slower than the old code
(I haven't tested), but at least it works around the driver bug.

ABI break, unfortunately, but no API break.

2 years agoFix Makefile after fp16 removal.
Steinar H. Gunderson [Sun, 2 Jul 2017 09:32:34 +0000 (11:32 +0200)]
Fix Makefile after fp16 removal.

2 years agoInline the fp16 conversion routines. Helps 18% on ResampleEffect::calculate_texture.
Steinar H. Gunderson [Sun, 2 Jul 2017 08:18:34 +0000 (10:18 +0200)]
Inline the fp16 conversion routines. Helps 18% on ResampleEffect::calculate_texture.

2 years agoInline combine_two_samples (and remove an obsolete assert). Helps 13–14% on ResampleE...
Steinar H. Gunderson [Sun, 2 Jul 2017 08:10:11 +0000 (10:10 +0200)]
Inline combine_two_samples (and remove an obsolete assert). Helps 13–14% on ResampleEffect::calculate_texture.

2 years agoSome microoptimizations in combine_two_samples(). Saves about 4% in ResampleEffect...
Steinar H. Gunderson [Sun, 2 Jul 2017 08:06:54 +0000 (10:06 +0200)]
Some microoptimizations in combine_two_samples(). Saves about 4% in ResampleEffect::calculate_weights.

2 years agoRemove some unneeded conversions from ResampleEffect. Speeds up texture generation...
Steinar H. Gunderson [Sat, 1 Jul 2017 19:50:31 +0000 (21:50 +0200)]
Remove some unneeded conversions from ResampleEffect. Speeds up texture generation by ~8%.

2 years agoIn ResampleEffect, split the weight calculation out into its own function that does...
Steinar H. Gunderson [Sat, 1 Jul 2017 19:07:32 +0000 (21:07 +0200)]
In ResampleEffect, split the weight calculation out into its own function that does not depend on OpenGL.

2 years agoRelease Movit 1.5.1. (No ABI break, as only a new non-virtual member function is... 1.5.1
Steinar H. Gunderson [Mon, 29 May 2017 17:09:00 +0000 (19:09 +0200)]
Release Movit 1.5.1. (No ABI break, as only a new non-virtual member function is added.)

2 years agoFix multiply-defined symbols with multiple YCbCrInputs in the same chain.
Steinar H. Gunderson [Sat, 20 May 2017 10:44:32 +0000 (12:44 +0200)]
Fix multiply-defined symbols with multiple YCbCrInputs in the same chain.

2 years agoAllow YCbCrInput to change input format after finalize.
Steinar H. Gunderson [Sat, 29 Apr 2017 19:59:38 +0000 (21:59 +0200)]
Allow YCbCrInput to change input format after finalize.

The performance should be very nearly identical; only a little
possible constant folding, and that's it. There's only one
(documented) limitation, and it's both rare and should be easy
to work around.

2 years agoIn YCbCrInput, fix an issue where offsets would be treated as equal even if their...
Steinar H. Gunderson [Sat, 29 Apr 2017 18:55:49 +0000 (20:55 +0200)]
In YCbCrInput, fix an issue where offsets would be treated as equal even if their y value differed.

2 years agoAdd a warning on FlatInput::set_texture_num() about sRGB behavior.
Steinar H. Gunderson [Tue, 11 Apr 2017 19:55:10 +0000 (21:55 +0200)]
Add a warning on FlatInput::set_texture_num() about sRGB behavior.

3 years agoRelease Movit 1.5.0, including a small README update. 1.5.0
Steinar H. Gunderson [Tue, 21 Mar 2017 18:39:51 +0000 (19:39 +0100)]
Release Movit 1.5.0, including a small README update.

3 years agoLoosen a test bound slightly for the benefit of NVIDIA cards.
Steinar H. Gunderson [Wed, 15 Mar 2017 19:03:05 +0000 (20:03 +0100)]
Loosen a test bound slightly for the benefit of NVIDIA cards.

3 years agoAdd an explanatory comment about dither with 16-bit output.
Steinar H. Gunderson [Mon, 13 Mar 2017 22:32:36 +0000 (23:32 +0100)]
Add an explanatory comment about dither with 16-bit output.

3 years agoSupport 10-/12-bit Y'CbCr output packed in 16-bit.
Steinar H. Gunderson [Mon, 13 Mar 2017 19:12:50 +0000 (20:12 +0100)]
Support 10-/12-bit Y'CbCr output packed in 16-bit.

This mirrors our existing input support, and makes planar and
semiplanar output possible for 10-/12-bit Y'CbCr.

ABI break. API stays the same.

3 years agoDon't try to check Cb and Cr positioning for output formats, as they should be non...
Steinar H. Gunderson [Tue, 7 Mar 2017 23:28:18 +0000 (00:28 +0100)]
Don't try to check Cb and Cr positioning for output formats, as they should be non-subsampled anyway.

3 years agoSupport multiple Y'CbCr outputs.
Steinar H. Gunderson [Mon, 6 Mar 2017 23:02:18 +0000 (00:02 +0100)]
Support multiple Y'CbCr outputs.

This is rather limited for now, unfortunately, but it solves a
rather specific problem in Nageru.

3 years agoUpdate another outdated comment.
Steinar H. Gunderson [Mon, 6 Mar 2017 18:52:28 +0000 (19:52 +0100)]
Update another outdated comment.

3 years agoUpdate an outdated comment.
Steinar H. Gunderson [Mon, 6 Mar 2017 18:51:48 +0000 (19:51 +0100)]
Update an outdated comment.

3 years agoLoosen up the accuracy bounds a tiny bit in some tests for NVIDIA cards, which have...
Steinar H. Gunderson [Sun, 26 Feb 2017 15:15:10 +0000 (16:15 +0100)]
Loosen up the accuracy bounds a tiny bit in some tests for NVIDIA cards, which have worse rounding (we do not bother to add manual rounding for these cards, since the difference is so small).

3 years agoFix an issue where the last pass would have been rendered with the sRGB flag set...
Steinar H. Gunderson [Sun, 26 Feb 2017 15:10:47 +0000 (16:10 +0100)]
Fix an issue where the last pass would have been rendered with the sRGB flag set, which confused Qt applications running in certain NVIDIA configurations.

3 years agoFix compiling without C++11.
Steinar H. Gunderson [Mon, 20 Feb 2017 20:44:33 +0000 (21:44 +0100)]
Fix compiling without C++11.

ABI break. Reported by Dan Dennedy.

3 years agoFix a bad typo.
Steinar H. Gunderson [Mon, 20 Feb 2017 18:56:53 +0000 (19:56 +0100)]
Fix a bad typo.

3 years agoBump MOVIT_VERSION for all the YCbCr changes.
Steinar H. Gunderson [Sun, 19 Feb 2017 19:35:31 +0000 (20:35 +0100)]
Bump MOVIT_VERSION for all the YCbCr changes.

3 years agoTreat num_levels == 0 as 256, for the benefit of older applications.
Steinar H. Gunderson [Sun, 19 Feb 2017 19:35:19 +0000 (20:35 +0100)]
Treat num_levels == 0 as 256, for the benefit of older applications.

3 years agoCosmetic tweak in YCbCrInput.
Steinar H. Gunderson [Sun, 19 Feb 2017 15:55:44 +0000 (16:55 +0100)]
Cosmetic tweak in YCbCrInput.

3 years agoFix a stack buffer overrun in ycbcr_input_test.
Steinar H. Gunderson [Sun, 19 Feb 2017 15:55:33 +0000 (16:55 +0100)]
Fix a stack buffer overrun in ycbcr_input_test.

3 years agoImplement mipmap generation in YCbCrInput, now that we advertise single-texture.
Steinar H. Gunderson [Sun, 19 Feb 2017 15:34:15 +0000 (16:34 +0100)]
Implement mipmap generation in YCbCrInput, now that we advertise single-texture.

3 years agoLoosen up some restrictions on YCbCrInput if we have interleaved mode.
Steinar H. Gunderson [Sun, 19 Feb 2017 10:02:09 +0000 (11:02 +0100)]
Loosen up some restrictions on YCbCrInput if we have interleaved mode.

3 years agoAdd support for 10- and 12-bit planar Y'CbCr inputs.
Steinar H. Gunderson [Tue, 14 Feb 2017 21:26:28 +0000 (22:26 +0100)]
Add support for 10- and 12-bit planar Y'CbCr inputs.

This is mostly for completeness; at least for 10-bit, 10:10:10:2
should be a faster format. However, it's nice to allow direct
subsampled inputs _somehow_.

3 years agoSome minor comment fixes in ycbcr.h.
Steinar H. Gunderson [Tue, 14 Feb 2017 20:34:27 +0000 (21:34 +0100)]
Some minor comment fixes in ycbcr.h.

3 years agoAdd input support for packed 10-bit Y'CbCr.
Steinar H. Gunderson [Tue, 14 Feb 2017 17:50:07 +0000 (18:50 +0100)]
Add input support for packed 10-bit Y'CbCr.

3 years agoSupport interleaved (chunky) 4:4:4 in YCbCrInput.
Steinar H. Gunderson [Mon, 13 Feb 2017 23:18:59 +0000 (00:18 +0100)]
Support interleaved (chunky) 4:4:4 in YCbCrInput.

3 years agoFix some test breakage.
Steinar H. Gunderson [Mon, 13 Feb 2017 23:10:10 +0000 (00:10 +0100)]
Fix some test breakage.

3 years agoSupport 10- and 12-bit Y'CbCr output.
Steinar H. Gunderson [Sun, 12 Feb 2017 23:55:14 +0000 (00:55 +0100)]
Support 10- and 12-bit Y'CbCr output.

We don't have any input support yet; the constants are put in place,
but we also need some work on supporting (semi-)adequate input formats.

3 years agoAllow adjusting the output Y'CbCr coefficients after finalize.
Steinar H. Gunderson [Sat, 11 Feb 2017 21:13:02 +0000 (22:13 +0100)]
Allow adjusting the output Y'CbCr coefficients after finalize.

Primarily useful for Nageru, which may have to switch output modes runtime.
Pretty much the same speed (just a single extra branch on a boolean uniform),
as constants and uniforms are typically the same speed and we're generally
ALU-bound.

3 years agoRelease Movit 1.4.0. 1.4.0
Steinar H. Gunderson [Sat, 5 Nov 2016 10:45:46 +0000 (11:45 +0100)]
Release Movit 1.4.0.

3 years agoFix a typo.
Steinar H. Gunderson [Sat, 5 Nov 2016 10:41:46 +0000 (11:41 +0100)]
Fix a typo.

3 years agoFix an issue where a (cached) shader program could be used from multiple
Steinar H. Gunderson [Sat, 5 Nov 2016 10:32:56 +0000 (11:32 +0100)]
Fix an issue where a (cached) shader program could be used from multiple
threads at a time.

This isn't allowed, since uniforms belong to the program, not to the
context. Found by running Helgrind over Nageru.

3 years agoMake the error printed on check_error() slightly friendlier: Include the enum if...
Steinar H. Gunderson [Tue, 26 Jul 2016 13:30:56 +0000 (15:30 +0200)]
Make the error printed on check_error() slightly friendlier: Include the enum if possible, and print it to stderr instead of stdout.

3 years agoBe more defensive about width/height/pitch given to FlatInput and YCbCrInput.
Steinar H. Gunderson [Thu, 21 Jul 2016 22:40:50 +0000 (00:40 +0200)]
Be more defensive about width/height/pitch given to FlatInput and YCbCrInput.

4 years agoRemove a very old and outdated comment.
Steinar H. Gunderson [Fri, 1 Apr 2016 21:51:28 +0000 (23:51 +0200)]
Remove a very old and outdated comment.

4 years agoAdd some clarifying comments about the intermediate formats.
Steinar H. Gunderson [Fri, 1 Apr 2016 21:47:30 +0000 (23:47 +0200)]
Add some clarifying comments about the intermediate formats.

4 years agoFix some comment formatting.
Steinar H. Gunderson [Tue, 1 Mar 2016 00:00:51 +0000 (01:00 +0100)]
Fix some comment formatting.

4 years agoRework PaddingEffect alpha handling, which also fixes a long-standing assertion failure.
Steinar H. Gunderson [Mon, 29 Feb 2016 23:59:37 +0000 (00:59 +0100)]
Rework PaddingEffect alpha handling, which also fixes a long-standing assertion failure.

4 years agoAllow storing values in intermediate framebuffers as sqrt(x).
Steinar H. Gunderson [Sun, 28 Feb 2016 00:53:55 +0000 (01:53 +0100)]
Allow storing values in intermediate framebuffers as sqrt(x).

Together with GL_RGB10_A2, this would seem to be an even better tradeoff for
many chains than GL_SRGB8_ALPHA8 is, as long as you don't need intermediate
alpha. (We verify its accuracy with a unit test.)

This changes the API for specifying intermediate framebuffers, but that API
was never in a release, so it should be fine.

Also document a rather obscure problem where, if you can actually hold on to
non-linear values across a bounce buffer, you don't really want to store them
in sRGB encoding. (The square-root version actually avoids this problem.
I guess we could snoop on the type and do a similar thing if we see it's an
GL_SRGB* encoding, but it seems so obscure that we can ignore it for now.)

4 years agoHard-assert on something that has bitten me too many times now.
Steinar H. Gunderson [Sun, 28 Feb 2016 00:46:15 +0000 (01:46 +0100)]
Hard-assert on something that has bitten me too many times now.