Make gamma polynomial constants into an array; slightly fewer uniforms to set, and it makes sense overall, since they belong so much together.
Rework uniform setting. One would think something as mundane as setting a few uniforms wouldn't really mean much for performance, but seemingly this is not always so -- I had a real-world shader that counted no less than 55 uniforms. Of course, not all of these were actually used, but we still have to go through looking up the name etc. for every single one, every single frame. Thus, we introduce a new way of dealing with uniforms: Register them before finalization time, and then EffectChain can store their numbers once and for all, instead of this repeated lookup. The system is also set up such that we can go to uniform buffer objects (UBOs) in the very near future. It's a bit unfortunate that uniform declaration now is removed from the .frag files, where it sat very nicely, but the alternative would be to try to parse GLSL, which I'm a bit wary at right now. All effects are converted, leaving the set_uniform_* functions without any users, but they are kept around for now in case external effects want them. This seems to bring 1–2% speedup for my use case; hopefully UBOs will bring a tiny bit more.
Fix a typo in a comment.
Move everything into “namespace movit”. This is a pretty hard API break, but it's probably the last big API break before 1.0, and some of the names (e.g. Effect, Input ResourcePool) are really so generic that they should not be allowed to pollute the global namespace.
Another round of include-what-you-use.
Move to 'using namespace std;' in all .cpp files. There's no intrinsic value to writing std:: over and over again. We keep it in the .h file, of course, in order not to pollute clients' namespaces.
Add accuracy unit tests for GammaExpansionEffect. After all the worry about accuracy in the polynomial expansion, I figured it was time to actually add tests verifying the error bounds here in a more reasonable way. The limits are set sort-of randomly, more-or-less to what the new code already handles, rounded up a bit. (The old texture-based code was _way_ worse than this, it seems, probably due to texel center issues.) This also shows that you can probably do 10-bit processing with Movit without losing way too much accuracy, but that 12-bit is too much for fp16 to handle.
Fix edge errors in the sRGB comment; I had used subs() on the wrong expression.
Fix a typo in a comment.
Implement GammaExpansionEffect using ALU ops instead of texture lookups. In a standalone benchmark (on a Sandy Bridge laptop), this is pretty much a no-op performance-wise, but when more ops are put into the mix, it's a ~20% FPS win, and but in a more real situation with multiple inputs etc., it's subjectively also a pretty clear win. The reason is probably that we generally are way overloaded on texture operations. Note that we had similar code like this before (before we started using the texture for lookup), but it used pow(), which is markedly slower than our fourth-degree polynomial approximation. We should probably do the same for GammaCompressionEffect.
Add partial Rec. 2020 support.
Fix another harmless Valgrind hit.
Add a new framework for 1D-LUTs via fp16 textures. Make the gamma compression and expansion effects use it.
Rename .glsl to .vert/.frag.
Rename identity.glsl to identity-fs.glsl.
Rename output_glsl to output_fragment_shader.
Implement the Rec. 709 gamma curve.
Add do-nothing-conversions for gamma expansion/compression if we are already linear. Mostly for completeness.
Implement gamma expansion from sRGB.
Start actually piecing together the GLSL shaders from the effect chain.