3 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.

3 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.

3 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.

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

3 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.

3 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.

3 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.

3 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.

3 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.

3 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.

3 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.

3 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%.

3 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.

3 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.)

3 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.

3 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.

3 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.

3 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

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.

4 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.

4 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.

4 years agoFix a typo.
Steinar H. Gunderson [Sun, 28 Feb 2016 00:26:47 +0000 (01:26 +0100)]
Fix a typo.

4 years agoAdd support for 10-bit RGB framebuffers.
Steinar H. Gunderson [Sat, 27 Feb 2016 23:37:01 +0000 (00:37 +0100)]
Add support for 10-bit RGB framebuffers.

4 years agoAdd some sRGB conversion functions to test_util.{h,cpp}.
Steinar H. Gunderson [Sat, 27 Feb 2016 23:28:31 +0000 (00:28 +0100)]
Add some sRGB conversion functions to test_util.{h,cpp}.

4 years agoBump version after new format support.
Steinar H. Gunderson [Sat, 27 Feb 2016 23:24:04 +0000 (00:24 +0100)]
Bump version after new format support.

4 years agoAdd support for some of the more esoteric minifloat formats to ResourcePool.
Steinar H. Gunderson [Wed, 24 Feb 2016 22:18:41 +0000 (23:18 +0100)]
Add support for some of the more esoteric minifloat formats to ResourcePool.

4 years agoDo not send NULL to glTexSubImage2D if there is no input data set; it is illegal...
Steinar H. Gunderson [Wed, 24 Feb 2016 00:32:49 +0000 (01:32 +0100)]
Do not send NULL to glTexSubImage2D if there is no input data set; it is illegal, and NVIDIA's drivers crash on it.

4 years agoMerge branch '1.3.x-release'
Steinar H. Gunderson [Tue, 23 Feb 2016 21:48:26 +0000 (22:48 +0100)]
Merge branch '1.3.x-release'

4 years agoRelease Movit 1.3.2. (From a branch, since I do not want to break ABI compatibility... 1.3.x-release 1.3.2
Steinar H. Gunderson [Tue, 23 Feb 2016 21:47:05 +0000 (22:47 +0100)]
Release Movit 1.3.2. (From a branch, since I do not want to break ABI compatibility at this point.)

4 years agoMake the sRGB intermediate test slightly more stringent (so that e.g. 0.0 will not...
Steinar H. Gunderson [Tue, 23 Feb 2016 21:41:33 +0000 (22:41 +0100)]
Make the sRGB intermediate test slightly more stringent (so that e.g. 0.0 will not work).

4 years agoMake sRGBIntermediate test less sensitive to the exact sRGB choices; fixes unit test...
Steinar H. Gunderson [Mon, 22 Feb 2016 20:34:05 +0000 (21:34 +0100)]
Make sRGBIntermediate test less sensitive to the exact sRGB choices; fixes unit test on NVIDIA.

4 years agoRequire OpenGL 3.0 unconditionally; this is a no-op, since we already required GLSL...
Steinar H. Gunderson [Sat, 20 Feb 2016 16:28:54 +0000 (17:28 +0100)]
Require OpenGL 3.0 unconditionally; this is a no-op, since we already required GLSL 1.30 (part of OpenGL 3.0).

4 years agoAllow setting the intermediate texture format; useful for reducing bandwidth at the...
Steinar H. Gunderson [Sat, 20 Feb 2016 16:13:48 +0000 (17:13 +0100)]
Allow setting the intermediate texture format; useful for reducing bandwidth at the expense of quality, and possibly future GLES2 support.

4 years agoMake timer query objects polled asynchronously, so that the CPU blocks less on the...
Steinar H. Gunderson [Sat, 20 Feb 2016 14:42:19 +0000 (15:42 +0100)]
Make timer query objects polled asynchronously, so that the CPU blocks less on the GPU when doing timing. ABI break.

4 years agoRemove an extern definition that no longer exists.
Steinar H. Gunderson [Sat, 20 Feb 2016 13:19:58 +0000 (14:19 +0100)]
Remove an extern definition that no longer exists.

4 years agoCorrect/update a comment on rounding.
Steinar H. Gunderson [Sat, 20 Feb 2016 13:19:19 +0000 (14:19 +0100)]
Correct/update a comment on rounding.

4 years agoMake gamma polynomial constants into an array; slightly fewer uniforms to set, and...
Steinar H. Gunderson [Sat, 20 Feb 2016 13:11:35 +0000 (14:11 +0100)]
Make gamma polynomial constants into an array; slightly fewer uniforms to set, and it makes sense overall, since they belong so much together.

4 years agoFix initialisation on locale with comma as numerical separator
Jean-Baptiste Mardelle [Wed, 17 Feb 2016 22:20:48 +0000 (23:20 +0100)]
Fix initialisation on locale with comma as numerical separator

4 years agoRelease Movit 1.3.1. 1.3.1
Steinar H. Gunderson [Tue, 16 Feb 2016 01:40:02 +0000 (17:40 -0800)]
Release Movit 1.3.1.

4 years agoAdd deinterlace_effect_test from .gitignore. Reported by Christophe Thommeret.
Steinar H. Gunderson [Tue, 9 Feb 2016 13:20:09 +0000 (05:20 -0800)]
Add deinterlace_effect_test from .gitignore. Reported by Christophe Thommeret.

4 years ago2016 README updates.
Steinar H. Gunderson [Tue, 9 Feb 2016 04:26:37 +0000 (05:26 +0100)]
2016 README updates.

4 years agoRemove GL_GLEXT_PROTOTYPES from some files, since it is irrelevant with epoxy.
Steinar H. Gunderson [Sun, 7 Feb 2016 12:05:39 +0000 (13:05 +0100)]
Remove GL_GLEXT_PROTOTYPES from some files, since it is irrelevant with epoxy.

4 years agoRemove the check for movit_shader_rounding_supported, as we now demand 1.30 unconditi...
Steinar H. Gunderson [Sun, 7 Feb 2016 11:15:07 +0000 (12:15 +0100)]
Remove the check for movit_shader_rounding_supported, as we now demand 1.30 unconditionally.

4 years agoDo not bother with unbinding vertex attributes; that is automatically done when we...
Steinar H. Gunderson [Sun, 7 Feb 2016 11:12:03 +0000 (12:12 +0100)]
Do not bother with unbinding vertex attributes; that is automatically done when we unbind the VAO.

4 years agoRemove a few unneeded shader program switches.
Steinar H. Gunderson [Sun, 7 Feb 2016 01:18:48 +0000 (02:18 +0100)]
Remove a few unneeded shader program switches.

4 years agoOptimize VAO/VBO usage for minimal state changes.
Steinar H. Gunderson [Sun, 7 Feb 2016 01:12:14 +0000 (02:12 +0100)]
Optimize VAO/VBO usage for minimal state changes.

This is similar to what we had earlier to just reuse the VAO,
but now with correct bindings no matter what vertex attributes
are assigned to what index, so that the (new) test passes.

This is actually slightly more efficient than what we had before,
since we don't look up the attributes by text anymore, and don't
reupload the VBO for each frame anymore. In practice, the effects
should be small.

4 years agoRevert "Reuse the VAO across all phases."
Steinar H. Gunderson [Sat, 6 Feb 2016 23:11:51 +0000 (00:11 +0100)]
Revert "Reuse the VAO across all phases."

The patch trickles a bug where, if the first phase doesn't need texture
coordinates, the rest of the phases don't get it either. (Or more generally,
if the vertex shader varying indices are not predictable, the patch does
the wrong thing.) Add a unit test and revert it for now; in time, we'll find a
way that's both low-overhead (the patch fixes a real problem) _and_ correct in
these cases.

This reverts patch 5e34f7a8969f4afc169f034d34fb908019b3a389.

Reported by Christophe Thommeret.

4 years agoRelease Movit 1.3.0. 1.3.0
Steinar H. Gunderson [Sun, 31 Jan 2016 12:37:24 +0000 (13:37 +0100)]
Release Movit 1.3.0.

4 years agoIn OverlayEffect, add support for swapping the inputs.
Steinar H. Gunderson [Sun, 31 Jan 2016 12:35:38 +0000 (13:35 +0100)]
In OverlayEffect, add support for swapping the inputs.

4 years agoUse ryg's much faster fp16 conversion code.
Steinar H. Gunderson [Mon, 25 Jan 2016 21:51:09 +0000 (22:51 +0100)]
Use ryg's much faster fp16 conversion code.

4 years agoMake all fp16 routines work with fp32 as input instead of fp64, since that is what...
Steinar H. Gunderson [Fri, 15 Jan 2016 23:57:00 +0000 (00:57 +0100)]
Make all fp16 routines work with fp32 as input instead of fp64, since that is what hardware supports anyway.

4 years agoUnbreak some effects that were broken by 0c821b2e.
Steinar H. Gunderson [Thu, 24 Dec 2015 21:31:47 +0000 (22:31 +0100)]
Unbreak some effects that were broken by 0c821b2e.

4 years agoMake shader generation more deterministic by removing a sort of pointers.
Steinar H. Gunderson [Thu, 24 Dec 2015 15:43:23 +0000 (16:43 +0100)]
Make shader generation more deterministic by removing a sort of pointers.

4 years agoIncrease version number after YADIF.
Steinar H. Gunderson [Thu, 24 Dec 2015 12:31:38 +0000 (13:31 +0100)]
Increase version number after YADIF.

4 years agoAdd a deinterlacer based on YADIF.
Steinar H. Gunderson [Sun, 22 Nov 2015 17:34:26 +0000 (18:34 +0100)]
Add a deinterlacer based on YADIF.

I tried a few different things before I finally settled on this, in particular
Weston's 3-field deinterlacer (w3fdif). It's not perfect (see .h comments),
but it works overall pretty well.

4 years agoAdd even long convenience overloads for add_effect().
Steinar H. Gunderson [Mon, 21 Dec 2015 13:52:34 +0000 (14:52 +0100)]
Add even long convenience overloads for add_effect().

4 years agoMake register_int call register_uniform_int, now that we require GLSL 1.30.
Steinar H. Gunderson [Mon, 21 Dec 2015 12:46:23 +0000 (13:46 +0100)]
Make register_int call register_uniform_int, now that we require GLSL 1.30.

4 years agoRevert "Add a hack to use #version 110 but keep using 130 features, for the benefit...
Steinar H. Gunderson [Mon, 14 Dec 2015 19:54:41 +0000 (20:54 +0100)]
Revert "Add a hack to use #version 110 but keep using 130 features, for the benefit of OS X."

This turned out not to work well on OS X after all.

This reverts commit e0811ddf51aeb50575fb5f7d9c6e32b92a6bac0d.

4 years agoFix a crash in a unit test if nb_NO.UTF-8 is not available.
Steinar H. Gunderson [Mon, 14 Dec 2015 01:10:00 +0000 (02:10 +0100)]
Fix a crash in a unit test if nb_NO.UTF-8 is not available.

4 years agoUse libpng instead of the older libpng12; seemingly fixes compilation on some systems.
Steinar H. Gunderson [Mon, 14 Dec 2015 00:45:46 +0000 (01:45 +0100)]
Use libpng instead of the older libpng12; seemingly fixes compilation on some systems.

4 years agoFix some stack overflows in unit tests; found with asan.
Steinar H. Gunderson [Sun, 13 Dec 2015 14:21:12 +0000 (15:21 +0100)]
Fix some stack overflows in unit tests; found with asan.

4 years agoFix a stack overflow in ResampleEffectTest.
Steinar H. Gunderson [Sun, 13 Dec 2015 13:56:15 +0000 (14:56 +0100)]
Fix a stack overflow in ResampleEffectTest.

4 years agoWork around a rounding precision issue that would cause spurious test failures on...
Steinar H. Gunderson [Sun, 13 Dec 2015 13:13:32 +0000 (14:13 +0100)]
Work around a rounding precision issue that would cause spurious test failures on AMD.

4 years agoFix a double scaling issue in Y'CbCr conversion.
Steinar H. Gunderson [Sun, 13 Dec 2015 12:26:01 +0000 (13:26 +0100)]
Fix a double scaling issue in Y'CbCr conversion.

We multiplied by 224/219 once too many, causing some small accuracy issues.
Furthermore, we also did this for full-range Y'CbCr, which obviously is wrong.
The issue was so small that the unit tests kept on passing (its investigation
was prompted by a test that failed on AMD cards, which is a separate issue).

After this, the Rec. 601 matrices match Wikipedia exactly, both for limited
and full range. Added unit tests for this.

4 years agoExplicitly bind fragment shader outputs in order.
Steinar H. Gunderson [Sat, 12 Dec 2015 13:31:40 +0000 (14:31 +0100)]
Explicitly bind fragment shader outputs in order.

Evidently ATI drivers use the freedom the standard gives them to assign
these in another order than they are specified in the shader source,
so we need to explicitly bind them, or YCbCrConversionEffectTest will fail
in the multi-output tests.

Originally reported by Iwan Gabovitch.

4 years agoAdd a hack to use #version 110 but keep using 130 features, for the benefit of OS X.
Steinar H. Gunderson [Sat, 12 Dec 2015 11:27:21 +0000 (12:27 +0100)]
Add a hack to use #version 110 but keep using 130 features, for the benefit of OS X.

4 years agoStop linking widgets.o into the shared library.
Steinar H. Gunderson [Sun, 22 Nov 2015 22:13:03 +0000 (23:13 +0100)]
Stop linking widgets.o into the shared library.

This was never intended to be there, and we don't install headers for it
(so no API/ABI break); it is actively harmful because it has a static
ResourcePool, which is attempted destroyed during shutdown (which causes
use of uninitialized memory as we try to get the current context).