7 years agoAdd some missing tests to .gitignore.
Steinar H. Gunderson [Sat, 2 Feb 2013 14:47:23 +0000 (15:47 +0100)]
Add some missing tests to .gitignore.

7 years agoStop linking unit tests et al against SDL_image and other things that only the demo...
Steinar H. Gunderson [Sat, 2 Feb 2013 13:44:26 +0000 (14:44 +0100)]
Stop linking unit tests et al against SDL_image and other things that only the demo program needs.

7 years agoRemove an unused function. Found by Clang.
Steinar H. Gunderson [Sat, 2 Feb 2013 13:34:21 +0000 (14:34 +0100)]
Remove an unused function. Found by Clang.

7 years agoSplit out some private utilities into effect_util.cpp, so we do not need to include...
Steinar H. Gunderson [Sat, 2 Feb 2013 13:32:01 +0000 (14:32 +0100)]
Split out some private utilities into effect_util.cpp, so we do not need to include e.g. Eigen from effect.h.

7 years agoRun include-what-you-use over all of movit. Some hand tuning.
Steinar H. Gunderson [Sat, 2 Feb 2013 13:11:29 +0000 (14:11 +0100)]
Run include-what-you-use over all of movit. Some hand tuning.

7 years agoFix alpha handling for blur; it needs to be on the working (rewritten-to) effect.
Steinar H. Gunderson [Sat, 2 Feb 2013 01:43:08 +0000 (02:43 +0100)]
Fix alpha handling for blur; it needs to be on the working (rewritten-to) effect.

7 years agoAdd a new alpha handling method, INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK.
Steinar H. Gunderson [Sat, 2 Feb 2013 01:35:18 +0000 (02:35 +0100)]
Add a new alpha handling method, INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK.

This should fix most of the problems where you only process inputs
without alpha, but the framework still inserts an AlphaDivisionEffect
at the end because it loses track of the blank alpha state throughout
the pipeline and the output expects postmultiplied alpha.

There's one important case left, though: MixEffect will always reset
tha alpha state to premultiplied. We should probably fix that too
at some later stage.

7 years agoRename the OutputAlphaFormat enums; they had gotten inconsistent after the last alpha...
Steinar H. Gunderson [Sat, 2 Feb 2013 01:18:22 +0000 (02:18 +0100)]
Rename the OutputAlphaFormat enums; they had gotten inconsistent after the last alpha-related rename.

7 years agoGive the alpha enums somewhat better/more consistent names, and shuffle them around...
Steinar H. Gunderson [Fri, 1 Feb 2013 23:38:46 +0000 (00:38 +0100)]
Give the alpha enums somewhat better/more consistent names, and shuffle them around a bit.

7 years agoIn resizing effects, add the notion of a “virtual output size”.
Steinar H. Gunderson [Fri, 1 Feb 2013 00:03:00 +0000 (01:03 +0100)]
In resizing effects, add the notion of a “virtual output size”.

This is the size that the effect wants to be perceived as for the next
effect in the chain, which is useful if you e.g. have a blur and then
padding. Even though the blur might rescale the image down from e.g.
512x512 to 128x128 before blurring (in case of a large blur), and this
size is what actually comes out in the texture at the other end,
it still wants to be treated as a 512x512 image when adding padding.

Reported by Christophe Thommeret.

7 years agoGive SizeStoringEffect an effect_type_id(), for easier debugging of the unit test.
Steinar H. Gunderson [Fri, 1 Feb 2013 00:02:55 +0000 (01:02 +0100)]
Give SizeStoringEffect an effect_type_id(), for easier debugging of the unit test.

7 years agoIf all inputs to an effect have the same input size, use that instead of fitting...
Steinar H. Gunderson [Tue, 29 Jan 2013 19:11:23 +0000 (20:11 +0100)]
If all inputs to an effect have the same input size, use that instead of fitting to the aspect.

The common case here is one-input effects on overlays.
Reported by Christophe Thommeret.

7 years agoFix a Clang warning.
Steinar H. Gunderson [Thu, 24 Jan 2013 09:22:59 +0000 (10:22 +0100)]
Fix a Clang warning.

Patch by Dan Dennedy.

7 years agoFix a bug where intermediate phase outputs could get too low height.
Steinar H. Gunderson [Wed, 23 Jan 2013 23:43:26 +0000 (00:43 +0100)]
Fix a bug where intermediate phase outputs could get too low height.

Basically our aspect ratio adjustment and lack of proper roundoff
could conspire to let e.g. mix(1280x720, 939x939) = 1669x938,
which is obviously wrong. I could probably have fixed it with
an extra lrintf(), but it seems more robust to simply avoid the
extra conversion (ie., never convert height -> width -> height).

Add a unit test to verify.

7 years agoMerge remote-tracking branch 'origin/master'
Steinar H. Gunderson [Tue, 22 Jan 2013 22:59:19 +0000 (23:59 +0100)]
Merge remote-tracking branch 'origin/master'

7 years agoAllow for more than ten bits in subpixel precision measuring; modern llvmpipe seems...
Steinar H. Gunderson [Mon, 21 Jan 2013 23:41:03 +0000 (00:41 +0100)]
Allow for more than ten bits in subpixel precision measuring; modern llvmpipe seems to have 11.

7 years agoDeconvolutionSharpenEffect needs texture bounce.
Steinar H. Gunderson [Mon, 21 Jan 2013 22:29:11 +0000 (23:29 +0100)]
DeconvolutionSharpenEffect needs texture bounce.

Anything else will be incredibly slow. Reported by Christophe Thommeret.

7 years agoFix another stack overflow in EffectChainTest.
Steinar H. Gunderson [Mon, 21 Jan 2013 21:48:42 +0000 (22:48 +0100)]
Fix another stack overflow in EffectChainTest.

Again, found with llvmpipe.

7 years agoLoosen up a boundary in DitherEffectTest by 10%.
Steinar H. Gunderson [Mon, 21 Jan 2013 21:44:24 +0000 (22:44 +0100)]
Loosen up a boundary in DitherEffectTest by 10%.

Seemingly needed on my nVidia machine with the newest drivers.

7 years agoFix a narrowing conversion within {} in PaddingEffect (C++11 compatibility).
Steinar H. Gunderson [Mon, 21 Jan 2013 21:41:18 +0000 (22:41 +0100)]
Fix a narrowing conversion within {} in PaddingEffect (C++11 compatibility).

7 years agoFix a stack overflow in EffectChainTest.
Steinar H. Gunderson [Mon, 21 Jan 2013 21:33:01 +0000 (22:33 +0100)]
Fix a stack overflow in EffectChainTest.

7 years agoIn OverlayEffectTest, handle that RGB on zero alpha is undefined.
Steinar H. Gunderson [Mon, 21 Jan 2013 21:09:51 +0000 (22:09 +0100)]
In OverlayEffectTest, handle that RGB on zero alpha is undefined.

Trickled by llvmpipe.

7 years agoAdd sdl-config --cflags and --libs when compiling.
Steinar H. Gunderson [Mon, 21 Jan 2013 21:04:00 +0000 (22:04 +0100)]
Add sdl-config --cflags and --libs when compiling.

7 years agoCheck return value from SDL_Init().
Steinar H. Gunderson [Mon, 21 Jan 2013 20:44:00 +0000 (21:44 +0100)]
Check return value from SDL_Init().

7 years agoUse NULL instead of png_voidp_NULL.
Steinar H. Gunderson [Mon, 21 Jan 2013 19:55:26 +0000 (20:55 +0100)]
Use NULL instead of png_voidp_NULL.

Fixes a compile error on OS X, reportedly.

7 years agoDon't override GTEST_DIR if it already is set.
Steinar H. Gunderson [Mon, 21 Jan 2013 19:51:22 +0000 (20:51 +0100)]
Don't override GTEST_DIR if it already is set.

7 years agoLink against -lpng, since we can now write screenshots in PNG format.
Steinar H. Gunderson [Mon, 21 Jan 2013 00:42:28 +0000 (01:42 +0100)]
Link against -lpng, since we can now write screenshots in PNG format.

7 years agoAsk Google Test not to use exceptions.
Steinar H. Gunderson [Sun, 20 Jan 2013 01:11:53 +0000 (02:11 +0100)]
Ask Google Test not to use exceptions.

Gives us slightly cleaner shutdown on error. Found by Coverity Scan.

7 years agoMake the internal effects private to EffectChain.
Steinar H. Gunderson [Sun, 20 Jan 2013 01:04:35 +0000 (02:04 +0100)]
Make the internal effects private to EffectChain.

ColorspaceConversionEffect, DitherEffect, GammaExpansionEffect and GammaCompressionEffect
are all supposed to be used by EffectChain only, so make them private; I've had
reports of users trying to use these directly, leaving the framework in a confused state.

7 years agoFix a typo in the README.
Steinar H. Gunderson [Sun, 20 Jan 2013 00:55:47 +0000 (01:55 +0100)]
Fix a typo in the README.

7 years agoAdd some parameter asserts in DitherEffect, too.
Steinar H. Gunderson [Sun, 20 Jan 2013 00:49:27 +0000 (01:49 +0100)]
Add some parameter asserts in DitherEffect, too.

7 years agoRemove two unused members from EffectChain.
Steinar H. Gunderson [Sun, 20 Jan 2013 00:46:36 +0000 (01:46 +0100)]
Remove two unused members from EffectChain.

Indirectly found by Coverity Scan.

7 years agoAnother case of NULL initialization to keep Coverity happy.
Steinar H. Gunderson [Sun, 20 Jan 2013 00:43:25 +0000 (01:43 +0100)]
Another case of NULL initialization to keep Coverity happy.

7 years agoAdd some asserts to SingleResamplePassEffect, to make sure the resolutions makes...
Steinar H. Gunderson [Sun, 20 Jan 2013 00:42:20 +0000 (01:42 +0100)]
Add some asserts to SingleResamplePassEffect, to make sure the resolutions makes sense.

7 years agoOptimize away duplicate conversion nodes.
Steinar H. Gunderson [Sat, 19 Jan 2013 23:31:23 +0000 (00:31 +0100)]
Optimize away duplicate conversion nodes.

Sometimes an effect can be used by two other effects that both demand
the same conversion. If so, we should simply insert a conversion after
that effect and connect _all_ outputs to that conversion, since
conversions to linear/sRGB/premultiplied never hurt for us.

Add unit tests for the gamma and colorspace cases. I could have added
for the alpha case, too, but it got very tedious. :-)

7 years agoSet pixel_data[] to NULL in YCbCrInput as well.
Steinar H. Gunderson [Sat, 19 Jan 2013 22:59:27 +0000 (23:59 +0100)]
Set pixel_data[] to NULL in YCbCrInput as well.

Like the previous one, mainly for cleaner crashes.
Again, found by Coverity Scan.

7 years agoAnother NULL initializer, mostly to get Coverity to be quiet.
Steinar H. Gunderson [Sat, 19 Jan 2013 22:58:51 +0000 (23:58 +0100)]
Another NULL initializer, mostly to get Coverity to be quiet.

7 years agoInitialize pixel_data in FlatInput to NULL.
Steinar H. Gunderson [Sat, 19 Jan 2013 22:54:43 +0000 (23:54 +0100)]
Initialize pixel_data in FlatInput to NULL.

Doesn't matter in practice, but will cause cleaner crashes if people
forget to do set_pixel_data().

Found by Coverity Scan.

7 years agoAdd unit tests for GlowEffect.
Steinar H. Gunderson [Sat, 19 Jan 2013 22:11:33 +0000 (23:11 +0100)]
Add unit tests for GlowEffect.

7 years agoClamp alpha in MixEffect.
Steinar H. Gunderson [Sat, 19 Jan 2013 19:13:51 +0000 (20:13 +0100)]
Clamp alpha in MixEffect.

This struck me suddenly one evening as a fix for the issues with alpha in glow,
and seems to work incredibly well for unsharp mask, too. The rationale is
outlined in the comment in the frag.

I'll probably be adding some tests for GlowEffect to make sure that it keeps
working fine, but visual tests so far look very good. The only issue is that
with destination alpha always being in linear light (as it should be),
programs that don't blend in linear light, like GIMP and ImageMagick,
get somewhat dull-looking results with e.g. glow.

7 years agoForce the LC_NUMERIC locale temporarily to C in finalize(), to avoid problems with...
Steinar H. Gunderson [Fri, 18 Jan 2013 23:04:37 +0000 (00:04 +0100)]
Force the LC_NUMERIC locale temporarily to C in finalize(), to avoid problems with locales messing with %f.

7 years agoWrite PNGs instead of PPMs, so that we get destination alpha. Also, ask SDL for a...
Steinar H. Gunderson [Thu, 17 Jan 2013 20:43:46 +0000 (21:43 +0100)]
Write PNGs instead of PPMs, so that we get destination alpha. Also, ask SDL for a GL context with destination alpha.

7 years agoAdd missing unit test.
Steinar H. Gunderson [Thu, 17 Jan 2013 01:22:24 +0000 (02:22 +0100)]
Add missing unit test.

7 years agoRemove some leftover debugging code.
Steinar H. Gunderson [Thu, 17 Jan 2013 00:54:05 +0000 (01:54 +0100)]
Remove some leftover debugging code.

7 years agoAdd an effect for padding.
Steinar H. Gunderson [Thu, 17 Jan 2013 00:50:36 +0000 (01:50 +0100)]
Add an effect for padding.

7 years agoAdd support for vec4 uniforms.
Steinar H. Gunderson [Thu, 17 Jan 2013 00:49:54 +0000 (01:49 +0100)]
Add support for vec4 uniforms.

7 years agoThere are reports that Movit actually does work with Nouveau.
Steinar H. Gunderson [Wed, 16 Jan 2013 21:14:26 +0000 (22:14 +0100)]
There are reports that Movit actually does work with Nouveau.

7 years agoFix another issue where an input was used twice. Add unit tests, again.
Steinar H. Gunderson [Wed, 16 Jan 2013 20:56:35 +0000 (21:56 +0100)]
Fix another issue where an input was used twice. Add unit tests, again.

7 years agoMake output_dot() cope with effects that are in multiple phases.
Steinar H. Gunderson [Wed, 16 Jan 2013 20:54:06 +0000 (21:54 +0100)]
Make output_dot() cope with effects that are in multiple phases.

7 years agoAdd an assert saying that if an input has premultiplied alpha, it must also have...
Steinar H. Gunderson [Wed, 16 Jan 2013 19:45:14 +0000 (20:45 +0100)]
Add an assert saying that if an input has premultiplied alpha, it must also have linear gamma.

This holds true for nodes in general, but I'm not sure enough about all sorts of intermediate
states that could cause this to be temporarily untrue for other nodes.

7 years agoPrint output node in the dot graphs.
Steinar H. Gunderson [Wed, 16 Jan 2013 19:20:39 +0000 (20:20 +0100)]
Print output node in the dot graphs.

This makes it possible to look at the properties of the last
effect, which is often useful to debug the fix_output_* functions.

7 years agoAdd an assert to expect_equal() to make sure people send in reasonable widths and...
Steinar H. Gunderson [Wed, 16 Jan 2013 18:17:28 +0000 (19:17 +0100)]
Add an assert to expect_equal() to make sure people send in reasonable widths and heights.

7 years agoFix a memory leak in expect_equal(). Found by Coverity Scan.
Steinar H. Gunderson [Wed, 16 Jan 2013 17:28:40 +0000 (18:28 +0100)]
Fix a memory leak in expect_equal(). Found by Coverity Scan.

7 years agoRefactor RewritingTo{MirrorEffect,InvertEffect} into a reusable template; it started...
Steinar H. Gunderson [Wed, 16 Jan 2013 00:12:00 +0000 (01:12 +0100)]
Refactor RewritingTo{MirrorEffect,InvertEffect} into a reusable template; it started getting silly with the number of Rewriting* classes.

7 years agoFix two issues related to non-treelike (diamond) effect graphs.
Steinar H. Gunderson [Tue, 15 Jan 2013 21:44:22 +0000 (22:44 +0100)]
Fix two issues related to non-treelike (diamond) effect graphs.

First of all, we could have an assert failure when an input was used twice.
Work around it by simply ignoring the input the second time.

This, however, would expose an issue where effects could be emitted in the
.glsl file out-of-order. Refactor the topological sort code so that it can
be reused for arbitrary subgraphs, and then use it to topologically sort
the list of effects in each pass.

Add a unit test to verify that all of this works.

7 years agoSmall spelling fix.
Steinar H. Gunderson [Mon, 14 Jan 2013 21:48:14 +0000 (22:48 +0100)]
Small spelling fix.

7 years ago Remove the code for postmultiplied alpha from OverlayEffect.
Steinar H. Gunderson [Mon, 14 Jan 2013 17:28:06 +0000 (18:28 +0100)]
 Remove the code for postmultiplied alpha from OverlayEffect.

7 years agoCorrect atop → over in the README too.
Steinar H. Gunderson [Mon, 14 Jan 2013 09:32:06 +0000 (10:32 +0100)]
Correct atop → over in the README too.

7 years agoRevert all the changes in demo.cpp that were never supposed to be there in the last...
Steinar H. Gunderson [Mon, 14 Jan 2013 01:36:23 +0000 (02:36 +0100)]
Revert all the changes in demo.cpp that were never supposed to be there in the last commit.

7 years agoAdd the rest of the files for the premultiplied alpha commit.
Steinar H. Gunderson [Mon, 14 Jan 2013 01:27:35 +0000 (02:27 +0100)]
Add the rest of the files for the premultiplied alpha commit.

7 years agoMake Movit work in premultiplied alpha.
Steinar H. Gunderson [Mon, 14 Jan 2013 01:27:35 +0000 (02:27 +0100)]
Make Movit work in premultiplied alpha.

This is a pretty big change, even though the most visible change right now
is that OverlayEffect looks better in the edges of upscaled material
(which you won't really notice too much, given that our handling of
different resolutions already sucks). Since most material is going to
assume postmultiplied alpha, we need to track the status around the graph
pretty much as we already do with gamma and colorspaces, so it's quite
a lot of new code (and associated test complexity). It really does look
better, though.

Negative sides: MixEffect has gotten less flexible since it now also
handles the alpha; for instance, you can't really use it to subtract
things the same way anymore. Also, I think the glow effect has been broken by
the changes to MixEffect, so I'll need to fix it and then add a test so it
doesn't break again.

7 years agoWhen running make check, output which checks failed.
Steinar H. Gunderson [Sun, 13 Jan 2013 20:31:50 +0000 (21:31 +0100)]
When running make check, output which checks failed.

7 years agoFix an error in a comment; we are implementing over, not atop.
Steinar H. Gunderson [Sun, 13 Jan 2013 19:39:26 +0000 (20:39 +0100)]
Fix an error in a comment; we are implementing over, not atop.

7 years agoFix alpha handling with sRGB textures.
Steinar H. Gunderson [Sun, 13 Jan 2013 11:50:55 +0000 (12:50 +0100)]
Fix alpha handling with sRGB textures.

OverlayEffect needs working alpha, so this cropped up. We don't
really have full alpha handling everywhere, but this is a good
start; I added some tests here and there to tighten it up a bit.

7 years agoDocmuent the GLEW requirement.
Steinar H. Gunderson [Sun, 13 Jan 2013 11:15:08 +0000 (12:15 +0100)]
Docmuent the GLEW requirement.

7 years agoUpdated list of filters in README.
Steinar H. Gunderson [Sun, 13 Jan 2013 11:13:08 +0000 (12:13 +0100)]
Updated list of filters in README.

7 years agoFix the name of the .dot file for the newly created colorspace input pass.
Steinar H. Gunderson [Sat, 12 Jan 2013 22:04:58 +0000 (23:04 +0100)]
Fix the name of the .dot file for the newly created colorspace input pass.

7 years agoDefer fetching inputs' color spaces and gamma to finalize().
Steinar H. Gunderson [Sat, 12 Jan 2013 21:36:22 +0000 (22:36 +0100)]
Defer fetching inputs' color spaces and gamma to finalize().

MLT needs this, as it doesn't know the type of input when building
the filter chain.

7 years agoAdded an overlay effect, implementing the atop effect.
Steinar H. Gunderson [Sat, 12 Jan 2013 20:50:22 +0000 (21:50 +0100)]
Added an overlay effect, implementing the atop effect.

7 years agoChange the .dot/.frag writing to be dependent on an init_movit() parameter instead...
Steinar H. Gunderson [Thu, 10 Jan 2013 17:48:07 +0000 (18:48 +0100)]
Change the .dot/.frag writing to be dependent on an init_movit() parameter instead of being bound to assertion checking.

7 years agoDo not output .dot and .frag debug files if NDEBUG is set.
Steinar H. Gunderson [Wed, 9 Jan 2013 20:52:55 +0000 (21:52 +0100)]
Do not output .dot and .frag debug files if NDEBUG is set.

7 years agoAllow data files to be fetched somewhere else than the current directory.
Steinar H. Gunderson [Wed, 9 Jan 2013 19:21:13 +0000 (20:21 +0100)]
Allow data files to be fetched somewhere else than the current directory.

7 years agoChange to using GLEW everywhere.
Steinar H. Gunderson [Wed, 9 Jan 2013 19:12:06 +0000 (20:12 +0100)]
Change to using GLEW everywhere.

We could have done this on Windows only, but it's just as simple to
keep the dependency list equal on all platforms. This subsumes our
own extension-checking logic, too.

7 years agoUse the -MP switch (make phony) for better dependency generation when files are removed.
Steinar H. Gunderson [Mon, 26 Nov 2012 23:45:21 +0000 (00:45 +0100)]
Use the -MP switch (make phony) for better dependency generation when files are removed.

7 years agoSimplify the Makefile for building unit tests.
Steinar H. Gunderson [Mon, 26 Nov 2012 23:44:13 +0000 (00:44 +0100)]
Simplify the Makefile for building unit tests.

7 years agoOnly run the pkg-config line for Eigen3 once.
Steinar H. Gunderson [Mon, 26 Nov 2012 23:41:35 +0000 (00:41 +0100)]
Only run the pkg-config line for Eigen3 once.

Also, print an error message if pkg-config has failed.

7 years agouse the argument from command line as file to process, if present
skal [Fri, 16 Nov 2012 20:40:00 +0000 (21:40 +0100)]
use the argument from command line as file to process, if present

7 years agoAdded a rudimentary README.
Steinar H. Gunderson [Thu, 15 Nov 2012 19:07:44 +0000 (20:07 +0100)]
Added a rudimentary README.

7 years agoMake the dither effect cheat a small bit and use a repeating dither texture no greate...
Steinar H. Gunderson [Tue, 6 Nov 2012 00:46:32 +0000 (01:46 +0100)]
Make the dither effect cheat a small bit and use a repeating dither texture no greater than 128x128, to save memory bandwidth.

7 years agoMake the ResampleEffect minimum tolerated error smaller; I could really see some...
Steinar H. Gunderson [Tue, 6 Nov 2012 00:30:30 +0000 (01:30 +0100)]
Make the ResampleEffect minimum tolerated error smaller; I could really see some artifacts when looking hard.

7 years agoAdd an implementation of RPDF dither on the final output.
Steinar H. Gunderson [Tue, 6 Nov 2012 00:09:16 +0000 (01:09 +0100)]
Add an implementation of RPDF dither on the final output.

7 years agoAdd resample_effect_test to .gitignore.
Steinar H. Gunderson [Mon, 5 Nov 2012 23:02:23 +0000 (00:02 +0100)]
Add resample_effect_test to .gitignore.

7 years agoAllow the EffectChainTester framebuffer to be in something else than float. This...
Steinar H. Gunderson [Mon, 5 Nov 2012 22:56:39 +0000 (23:56 +0100)]
Allow the EffectChainTester framebuffer to be in something else than float. This is useful since Mesa's glReadPixels() does not round, but the Intel hardware does.

7 years agoAdd a variant of expect_equal() for uint8s.
Steinar H. Gunderson [Mon, 5 Nov 2012 20:36:43 +0000 (21:36 +0100)]
Add a variant of expect_equal() for uint8s.

7 years agoAdd a function for EffectChainTester to get out the uint8 result.
Steinar H. Gunderson [Mon, 5 Nov 2012 20:24:31 +0000 (21:24 +0100)]
Add a function for EffectChainTester to get out the uint8 result.

7 years agoFactorize out some stuff from EffectChainTester::run().
Steinar H. Gunderson [Mon, 5 Nov 2012 20:22:15 +0000 (21:22 +0100)]
Factorize out some stuff from EffectChainTester::run().

7 years agoAdd a missing const.
Steinar H. Gunderson [Sat, 3 Nov 2012 17:22:15 +0000 (18:22 +0100)]
Add a missing const.

7 years agoCorrect some untrue statements about CIECAM02 chromatic adaptation.
Steinar H. Gunderson [Sat, 3 Nov 2012 17:12:11 +0000 (18:12 +0100)]
Correct some untrue statements about CIECAM02 chromatic adaptation.

7 years agoWhen correcting for white balance, move the D65 normalization into compute_lms_scalin...
Steinar H. Gunderson [Sat, 3 Nov 2012 16:39:11 +0000 (17:39 +0100)]
When correcting for white balance, move the D65 normalization into compute_lms_scaling_factors() instead of folding it into the LMS matrix. This makes much more sense, and should be equivalent.

7 years agoSwitch from the HPE matrix (RLAB space) to the Bradford matrix for white balancing.
Steinar H. Gunderson [Sat, 3 Nov 2012 15:27:11 +0000 (16:27 +0100)]
Switch from the HPE matrix (RLAB space) to the Bradford matrix for white balancing.

7 years agoMove the XYZ (Y=1) definition of D65 to d65.h.
Steinar H. Gunderson [Sat, 3 Nov 2012 15:16:13 +0000 (16:16 +0100)]
Move the XYZ (Y=1) definition of D65 to d65.h.

7 years agoAdd a separate header file for the D65 white point.
Steinar H. Gunderson [Sat, 3 Nov 2012 14:06:43 +0000 (15:06 +0100)]
Add a separate header file for the D65 white point.

7 years agoMake some constants static const.
Steinar H. Gunderson [Sat, 3 Nov 2012 14:03:15 +0000 (15:03 +0100)]
Make some constants static const.

7 years agoUpdate the comment on movit_texel_subpixel_precision.
Steinar H. Gunderson [Sun, 28 Oct 2012 23:02:54 +0000 (00:02 +0100)]
Update the comment on movit_texel_subpixel_precision.

7 years agoAdd (safe) asserts around all Effect::set_* return values, and add warnings for not...
Steinar H. Gunderson [Sun, 28 Oct 2012 18:58:23 +0000 (19:58 +0100)]
Add (safe) asserts around all Effect::set_* return values, and add warnings for not checking them.

8 years agoCheck required extensions at start.
Steinar H. Gunderson [Sun, 28 Oct 2012 17:48:25 +0000 (18:48 +0100)]
Check required extensions at start.

8 years agoAdd the weight combining back, now that we have proper control over the interpolation...
Steinar H. Gunderson [Sun, 28 Oct 2012 17:14:36 +0000 (18:14 +0100)]
Add the weight combining back, now that we have proper control over the interpolation error.

8 years agoMake combine_two_pixels() handle the fact that the GPU has limited subpixel interpola...
Steinar H. Gunderson [Sun, 28 Oct 2012 16:40:56 +0000 (17:40 +0100)]
Make combine_two_pixels() handle the fact that the GPU has limited subpixel interpolation precision.

Currently we only use it to somewhat improve the total_weight estimate
to reduce the error slightly. However, the function can now also return
the total error estimate, which will be useful for knowing when we can
and cannot combine weights with reasonable error.

8 years agoDo not inline combine_two_samples(); util.h has way too many files depending on it...
Steinar H. Gunderson [Sun, 28 Oct 2012 15:45:51 +0000 (16:45 +0100)]
Do not inline combine_two_samples(); util.h has way too many files depending on it, leading to poor incremental compile times.

8 years agoRevert "Use the bilinear sampling trick in ResampleEffect."
Steinar H. Gunderson [Sat, 27 Oct 2012 19:17:45 +0000 (21:17 +0200)]
Revert "Use the bilinear sampling trick in ResampleEffect."

On second thought, this doesn't really look correct; there are some artifacts.

This reverts commit 1a06994ccdeedba95a1bdd2c3c12bb54a7a897f9.