]> git.sesse.net Git - movit/commitdiff
Run include-what-you-use over all of movit. Some hand tuning.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 2 Feb 2013 13:11:29 +0000 (14:11 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 2 Feb 2013 13:11:29 +0000 (14:11 +0100)
71 files changed:
alpha_division_effect.h
alpha_division_effect_test.cpp
alpha_multiplication_effect.h
alpha_multiplication_effect_test.cpp
blur_effect.cpp
blur_effect.h
blur_effect_test.cpp
colorspace_conversion_effect.cpp
colorspace_conversion_effect.h
colorspace_conversion_effect_test.cpp
deconvolution_sharpen_effect.cpp
deconvolution_sharpen_effect.h
deconvolution_sharpen_effect_test.cpp
demo.cpp
diffusion_effect.cpp
diffusion_effect.h
diffusion_effect_test.cpp
dither_effect.cpp
dither_effect.h
dither_effect_test.cpp
effect.cpp
effect.h
effect_chain.cpp
effect_chain.h
effect_chain_test.cpp
flat_input.h
flat_input_test.cpp
gamma_compression_effect.h
gamma_compression_effect_test.cpp
gamma_expansion_effect.h
gamma_expansion_effect_test.cpp
glow_effect.cpp
glow_effect.h
glow_effect_test.cpp
gtest_sdl_main.cpp
init.cpp
lift_gamma_gain_effect.cpp
lift_gamma_gain_effect.h
lift_gamma_gain_effect_test.cpp
mirror_effect.h
mix_effect.h
mix_effect_test.cpp
overlay_effect.h
overlay_effect_test.cpp
padding_effect.cpp
padding_effect.h
padding_effect_test.cpp
resample_effect.cpp
resample_effect.h
resample_effect_test.cpp
resize_effect.h
sandbox_effect.cpp
sandbox_effect.h
saturation_effect.h
saturation_effect_test.cpp
test_util.cpp
test_util.h
unsharp_mask_effect.cpp
unsharp_mask_effect.h
unsharp_mask_effect_test.cpp
util.cpp
util.h
vignette_effect.cpp
vignette_effect.h
white_balance_effect.cpp
white_balance_effect.h
white_balance_effect_test.cpp
widgets.cpp
ycbcr_input.cpp
ycbcr_input.h
ycbcr_input_test.cpp

index e700112fb2a909c108c2ddb48ccbb3b96d5ab0ed..2b51c3a7256c6e53ca7633b561cfef1864c13aa6 100644 (file)
@@ -3,6 +3,8 @@
 
 // Convert premultiplied alpha to postmultiplied alpha, simply by multiplying.
 
+#include <string>
+
 #include "effect.h"
 
 class AlphaDivisionEffect : public Effect {
index 8c297027f7fb2f49f3475e83f0ebc87322e329d4..b9c16b3f082c32063fcf065bae376e4958140706 100644 (file)
@@ -1,7 +1,9 @@
 // Unit tests for AlphaDivisionEffect.
 
-#include "test_util.h"
+#include <GL/glew.h>
 #include "gtest/gtest.h"
+#include "image_format.h"
+#include "test_util.h"
 
 TEST(AlphaDivisionEffectTest, SimpleTest) {
        const int size = 2;
index c64f2dce050d075f4230d9beca8841f173fb7ce0..2425a427e2764822287f3f54443fb5f896e61f32 100644 (file)
@@ -3,6 +3,8 @@
 
 // Convert postmultiplied alpha to premultiplied alpha, simply by multiplying.
 
+#include <string>
+
 #include "effect.h"
 
 class AlphaMultiplicationEffect : public Effect {
index 6ee428970bded340f5039d5e657b3fdc756e4d52..62863e92ac1f846c60161b8d6fc8d99e203088b3 100644 (file)
@@ -1,7 +1,11 @@
 // Unit tests for AlphaMultiplicationEffect.
 
-#include "test_util.h"
+#include <GL/glew.h>
+
+#include "effect_chain.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
+#include "test_util.h"
 
 TEST(AlphaMultiplicationEffectTest, SimpleTest) {
        const int size = 3;
index d62b0568f32b47b8f3c7f30d99db1ee07c4aa195..a74cd41b0cd63bca7d37150d07ecfbee822ce563 100644 (file)
@@ -1,6 +1,7 @@
-#include <math.h>
-#include <assert.h>
 #include <GL/glew.h>
+#include <assert.h>
+#include <math.h>
+#include <algorithm>
 
 #include "blur_effect.h"
 #include "effect_chain.h"
index 76f7389d1568739a3312df999c64e20857728367..5a04415829231e2d5f2146b729762eb4e3f02ce7 100644 (file)
@@ -9,8 +9,15 @@
 // which is what the user is intended to use, instantiates two copies of
 // SingleBlurPassEffect behind the scenes).
 
+#include <GL/glew.h>
+#include <assert.h>
+#include <stddef.h>
+#include <string>
+
 #include "effect.h"
 
+class EffectChain;
+class Node;
 class SingleBlurPassEffect;
 
 class BlurEffect : public Effect {
index d458e45d1fe096174ade4c8654c230cfe6edf3fc..1718e7dca7e6997929049c8b3868ba063ded6b78 100644 (file)
@@ -1,9 +1,12 @@
 // Unit tests for BlurEffect.
 #include <math.h>
+#include <string.h>
 
-#include "test_util.h"
-#include "gtest/gtest.h"
 #include "blur_effect.h"
+#include "effect_chain.h"
+#include "gtest/gtest.h"
+#include "image_format.h"
+#include "test_util.h"
 
 TEST(BlurEffectTest, IdentityTransformDoesNothing) {
        const int size = 4;
index 3a8ad95c578c4626b190b7c04ce14b5c9c6e7770..5406e1b856f9506e5731e8511eed141c15169dfd 100644 (file)
@@ -1,10 +1,10 @@
 #include <assert.h>
-
+#include <Eigen/Core>
 #include <Eigen/LU>
 
 #include "colorspace_conversion_effect.h"
-#include "util.h"
 #include "d65.h"
+#include "util.h"
 
 using namespace Eigen;
 
index 15ad0addbc04394d2f70650c211495e2b0c2cacb..b1d6e060c75d5dee627425fad05b410c46563065 100644 (file)
@@ -8,8 +8,11 @@
 // We don't do any fancy gamut mapping or similar; colors that are out-of-gamut
 // will simply stay out-of-gamut, and probably clip in the output stage.
 
+#include <string>
+
 #include "effect.h"
 #include "effect_chain.h"
+#include "image_format.h"
 
 class ColorspaceConversionEffect : public Effect {
 private:
index 3361489e0e15dca4f4a1e99d2679ee815bc98022..76bcd49aaa6272895b5c6d5e5f0ac6685f2bb488 100644 (file)
@@ -1,8 +1,10 @@
 // Unit tests for ColorspaceConversionEffect.
 
-#include "test_util.h"
-#include "gtest/gtest.h"
+#include <GL/glew.h>
+
 #include "colorspace_conversion_effect.h"
+#include "gtest/gtest.h"
+#include "test_util.h"
 
 TEST(ColorspaceConversionEffectTest, Reversible) {
        float data[] = {
index 2d32ecd6724d886a03185b1042b643a15a83075b..260266403852a2beb22232e29924d4c25a873b2d 100644 (file)
@@ -2,12 +2,15 @@
 // Since all of our signals are symmetrical, discrete correlation and convolution
 // is the same operation, and so we won't make a difference in notation.
 
-
-#include <math.h>
-#include <assert.h>
-#include <GL/glew.h>
 #include <Eigen/Dense>
 #include <Eigen/Cholesky>
+#include <GL/glew.h>
+#include <assert.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <algorithm>
+#include <new>
 
 #include "deconvolution_sharpen_effect.h"
 #include "util.h"
index a0b405a6c7f829f5d94cc4bf3ca3429c85968e45..80553adf0aecb5557cbbc85d30698fba40998f8b 100644 (file)
 //
 //   Jain, Anil K.: “Fundamentals of Digital Image Processing”, Prentice Hall, 1988.
 
-#include "effect.h"
-
+#include <GL/glew.h>
 #include <Eigen/Dense>
+#include <string>
+
+#include "effect.h"
 
 class DeconvolutionSharpenEffect : public Effect {
 public:
index f08225b15a6575f741b9469d38a4ae6a50ee8170..6980b3d16b34bac262789ec2bf9632c690e9d3cb 100644 (file)
@@ -1,8 +1,13 @@
 // Unit tests for DeconvolutionSharpenEffect.
 
-#include "test_util.h"
-#include "gtest/gtest.h"
+#include <math.h>
+#include <stdlib.h>
+
 #include "deconvolution_sharpen_effect.h"
+#include "effect_chain.h"
+#include "gtest/gtest.h"
+#include "image_format.h"
+#include "test_util.h"
 
 TEST(DeconvolutionSharpenEffectTest, IdentityTransformDoesNothing) {
        const int size = 4;
index 7b3152889fdc167e9ec938ab2856ae741e75b652..0083f68288c04e48a7f4b88deb1ef6d6da4d0136 100644 (file)
--- a/demo.cpp
+++ b/demo.cpp
@@ -4,33 +4,37 @@
 #define WIDTH 1280
 #define HEIGHT 720
 
-#include <string.h>
-#include <math.h>
-#include <time.h>
-#include <sys/time.h>
-#include <assert.h>
-
-#include <string>
-#include <vector>
-#include <map>
-
 #include <GL/glew.h>
-
 #include <SDL/SDL.h>
-#include <SDL/SDL_opengl.h>
+#include <SDL/SDL_error.h>
+#include <SDL/SDL_events.h>
 #include <SDL/SDL_image.h>
+#include <SDL/SDL_keyboard.h>
+#include <SDL/SDL_keysym.h>
+#include <SDL/SDL_mouse.h>
+#include <SDL/SDL_video.h>
+#include <assert.h>
+#include <features.h>
+#include <math.h>
 #include <png.h>
+#include <pngconf.h>
+#include <setjmp.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <time.h>
 
-#include "init.h"
+#include "diffusion_effect.h"
 #include "effect.h"
 #include "effect_chain.h"
-#include "util.h"
-#include "widgets.h"
-
 #include "flat_input.h"
+#include "image_format.h"
+#include "init.h"
 #include "lift_gamma_gain_effect.h"
 #include "saturation_effect.h"
-#include "diffusion_effect.h"
+#include "util.h"
+#include "widgets.h"
 
 unsigned char result[WIDTH * HEIGHT * 4];
 
index f07f9d14eaa4cb1e4b32bb7f8323f47ed107c165..a202f8c4d017c60828dccbf7624572f19a069a0d 100644 (file)
@@ -1,8 +1,8 @@
-#include <math.h>
 #include <assert.h>
+#include <vector>
 
-#include "diffusion_effect.h"
 #include "blur_effect.h"
+#include "diffusion_effect.h"
 #include "effect_chain.h"
 #include "util.h"
 
index 2c635d0cd30082d57c08afcd4d46065e266be958..64d743d12eb923bd409b24ddd0d5de508ff5458c 100644 (file)
 // where we first blur the picture, and then overlay it on the original
 // using the original as a matte.
 
+#include <GL/glew.h>
+#include <assert.h>
+#include <string>
+
 #include "effect.h"
 
 class BlurEffect;
+class EffectChain;
+class Node;
 class OverlayMatteEffect;
 
 class DiffusionEffect : public Effect {
index 446a51f11c5265d41f411f472c5319f510079074..5558f4f39e1c8138fb6e1fb0e77586db00227f21 100644 (file)
@@ -1,8 +1,10 @@
 // Unit tests for DiffusionEffect.
 
-#include "test_util.h"
-#include "gtest/gtest.h"
 #include "diffusion_effect.h"
+#include "effect_chain.h"
+#include "gtest/gtest.h"
+#include "image_format.h"
+#include "test_util.h"
 
 TEST(DiffusionEffectTest, IdentityTransformDoesNothing) {
        const int size = 4;
index 305268e2396bc0e47c7404c385b1fa984ed0088e..44933b61cc4363470762daa05882301e1043fed2 100644 (file)
@@ -1,6 +1,6 @@
-#include <math.h>
-#include <assert.h>
 #include <GL/glew.h>
+#include <assert.h>
+#include <algorithm>
 
 #include "dither_effect.h"
 #include "util.h"
index cad6488921b67c5f60a3a1ac17fb97dec440b474..314390752cebde884f87f8d54db798f33f310cae 100644 (file)
@@ -43,6 +43,9 @@
 // like many LCD monitors do, but it starts to get very hairy, again, for limited gains.)
 // The dither is also deterministic across runs.
 
+#include <GL/glew.h>
+#include <string>
+
 #include "effect.h"
 
 class DitherEffect : public Effect {
index bdba1212c76eaca680e3eabe6763cc6831c1b140..6fd46dbf402feba053183e16790157602dd91277 100644 (file)
@@ -1,9 +1,12 @@
 // Unit tests for DitherEffect.
 
+#include <GL/glew.h>
 #include <math.h>
 
-#include "test_util.h"
+#include "effect_chain.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
+#include "test_util.h"
 
 TEST(DitherEffectTest, NoDitherOnExactValues) {
        const int size = 4;
index 39e949078390e1bb21210e7ac586f3abad053b98..0fe09db0b2e3f14ccf1372e01a67680491e2a0e8 100644 (file)
@@ -1,10 +1,11 @@
+#include <Eigen/Core>
+#include <GL/glew.h>
+#include <assert.h>
 #include <stdio.h>
 #include <string.h>
-#include <assert.h>
-#include <GL/glew.h>
+#include <utility>
 
 #include "effect.h"
-#include "effect_chain.h"
 #include "util.h"
 
 GLint get_uniform_location(GLuint glsl_program_num, const std::string &prefix, const std::string &key)
index 771648cde059ec269c514c845ed798694cdf6ba0..826dd6f24068c4aa23687f6071568b43356c1cd3 100644 (file)
--- a/effect.h
+++ b/effect.h
 // effect instance; use the macro PREFIX() around your identifiers to
 // automatically prepend that prefix.
 
+#include <GL/glew.h>
+#include <assert.h>
+#include <stddef.h>
+#include <Eigen/Core>
 #include <map>
 #include <string>
 #include <vector>
 
-#include <assert.h>
-
-#include <Eigen/Core>
-
-#include <GL/glew.h>
 #include "util.h"
 
 class EffectChain;
index 0f8876d8f70c68ccb6b4d2a41a538414eddf9efe..00151977be63823288cd0d1c9497e7b9d2708fdb 100644 (file)
@@ -1,27 +1,29 @@
 #define GL_GLEXT_PROTOTYPES 1
 
-#include <stdio.h>
+#include <GL/glew.h>
+#include <assert.h>
+#include <locale.h>
 #include <math.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#include <locale.h>
-#include <assert.h>
-#include <GL/glew.h>
-
 #include <algorithm>
 #include <set>
 #include <stack>
 #include <vector>
 
-#include "util.h"
-#include "effect_chain.h"
-#include "gamma_expansion_effect.h"
-#include "gamma_compression_effect.h"
-#include "colorspace_conversion_effect.h"
-#include "alpha_multiplication_effect.h"
 #include "alpha_division_effect.h"
+#include "alpha_multiplication_effect.h"
+#include "colorspace_conversion_effect.h"
 #include "dither_effect.h"
-#include "input.h"
+#include "effect.h"
+#include "effect_chain.h"
+#include "gamma_compression_effect.h"
+#include "gamma_expansion_effect.h"
 #include "init.h"
+#include "input.h"
+#include "util.h"
 
 EffectChain::EffectChain(float aspect_nom, float aspect_denom)
        : aspect_nom(aspect_nom),
index f5e27c81b4d07196f6e361f85082db4b620cf1cb..2199a5d8b28d56a1a0fe54c85cc2ae9505ede61d 100644 (file)
@@ -1,14 +1,20 @@
 #ifndef _EFFECT_CHAIN_H
 #define _EFFECT_CHAIN_H 1
 
+#include <GL/glew.h>
+#include <stdio.h>
+#include <map>
 #include <set>
+#include <string>
 #include <vector>
 
 #include "effect.h"
 #include "image_format.h"
 #include "input.h"
 
+class Effect;
 class EffectChain;
+class Input;
 struct Phase;
 
 // For internal use within Node.
index cea22e0a3e03dd5a1b855c46dc3600c3cb925e56..49d431b98db0a067e01076ae5e2f1fcd0550c82c 100644 (file)
@@ -3,13 +3,18 @@
 // Note that this also contains the tests for some of the simpler effects.
 
 #include <GL/glew.h>
+#include <assert.h>
+#include <stddef.h>
 
+#include "effect.h"
 #include "effect_chain.h"
 #include "flat_input.h"
 #include "gtest/gtest.h"
+#include "input.h"
 #include "mirror_effect.h"
 #include "resize_effect.h"
 #include "test_util.h"
+#include "util.h"
 
 TEST(EffectChainTest, EmptyChain) {
        float data[] = {
index 24a3fcad90347c545c093884dba809488ea6a317..80e113f67c7f01b5945764c45ca3c18901a573d2 100644 (file)
@@ -1,10 +1,14 @@
 #ifndef _FLAT_INPUT_H
 #define _FLAT_INPUT_H 1
 
+#include <GL/glew.h>
 #include <assert.h>
+#include <string>
 
-#include "input.h"
+#include "effect.h"
+#include "image_format.h"
 #include "init.h"
+#include "input.h"
 
 // A FlatInput is the normal, “classic” case of an input, where everything
 // comes from a single 2D array with chunky pixels.
index db03bd0aa05baa74f1bcb9a278216ef4243b538b..c8df483cee4fbcbce121c3ccaa69eac058136f47 100644 (file)
@@ -1,8 +1,11 @@
 // Unit tests for FlatInput.
 
-#include "test_util.h"
-#include "gtest/gtest.h"
+#include <stddef.h>
+
+#include "effect_chain.h"
 #include "flat_input.h"
+#include "gtest/gtest.h"
+#include "test_util.h"
 
 TEST(FlatInput, SimpleGrayscale) {
        const int size = 4;
index 46ac80e7d6b12e6b2b217dcb942d125fbe9788f3..f34bca02eb76f51c633b237a789d9f5f18e418e3 100644 (file)
@@ -7,8 +7,11 @@
 //
 // Currently supports sRGB and Rec. 601/709.
 
+#include <string>
+
 #include "effect.h"
 #include "effect_chain.h"
+#include "image_format.h"
 
 #define COMPRESSION_CURVE_SIZE 4096
 
index 6211acc0089afab3d0f21a97dcff0bf77daf0a23..c0b4ccf141e1d58a2d456b03acedae725ac42399 100644 (file)
@@ -3,9 +3,10 @@
 // Pretty much the inverse of the GammaExpansionEffect tests;
 // EffectChainTest tests that they are actually inverses.
 
-#include "test_util.h"
+#include <GL/glew.h>
 #include "gtest/gtest.h"
-#include "gamma_expansion_effect.h"
+#include "image_format.h"
+#include "test_util.h"
 
 TEST(GammaCompressionEffectTest, sRGB_KeyValues) {
        float data[] = {
index 043731baf15ef48c8812d1ec6fb6e5234a5b87a3..059b246325f62bc24ad688edc8064effb575d418 100644 (file)
@@ -7,8 +7,11 @@
 //
 // Currently supports sRGB and Rec. 601/709.
 
+#include <string>
+
 #include "effect.h"
 #include "effect_chain.h"
+#include "image_format.h"
 
 #define EXPANSION_CURVE_SIZE 256
 
index 94f574999692aeacff184c9bc2310da6c27e21db..6fc0252c8c5a28780e7d6127790a0e942543a9f5 100644 (file)
@@ -1,8 +1,10 @@
 // Unit tests for GammaExpansionEffect.
 
-#include "test_util.h"
-#include "gtest/gtest.h"
+#include <GL/glew.h>
+
 #include "gamma_expansion_effect.h"
+#include "gtest/gtest.h"
+#include "test_util.h"
 
 TEST(GammaExpansionEffectTest, sRGB_KeyValues) {
        float data[] = {
index 064cdac99950e561d9817f4d1115f252451e067b..86a3d7f407cf73c14066a6a1e9cbe2bef09afcc5 100644 (file)
@@ -1,10 +1,10 @@
-#include <math.h>
 #include <assert.h>
+#include <vector>
 
-#include "glow_effect.h"
 #include "blur_effect.h"
-#include "mix_effect.h"
 #include "effect_chain.h"
+#include "glow_effect.h"
+#include "mix_effect.h"
 #include "util.h"
 
 GlowEffect::GlowEffect()
index abadb84a4cb332a10d45216d73a2fe6bfa2edc6c..3453c997d82ee2938b987089774b2a5677309bde 100644 (file)
@@ -4,11 +4,17 @@
 // Glow: Cut out the highlights of the image (everything above a certain threshold),
 // blur them, and overlay them onto the original image.
 
+#include <GL/glew.h>
+#include <assert.h>
+#include <string>
+
 #include "effect.h"
 
 class BlurEffect;
-class MixEffect;
+class EffectChain;
 class HighlightCutoffEffect;
+class MixEffect;
+class Node;
 
 class GlowEffect : public Effect {
 public:
index 77c9d12db75b17f3b3895ccb46ffcf7cf1d7ee2b..b8eff4be018ef3d660fac2e0bfa35e61bf2cfaae 100644 (file)
@@ -2,9 +2,11 @@
 
 #include <math.h>
 
-#include "test_util.h"
-#include "gtest/gtest.h"
+#include "effect_chain.h"
 #include "glow_effect.h"
+#include "gtest/gtest.h"
+#include "image_format.h"
+#include "test_util.h"
 
 TEST(GlowEffectTest, NoAmountDoesNothing) {
        const int size = 4;
index fa3a835cda7f167e00b199535a68d28ae23ec0f2..39027e6be3246f75fae37a09d333859920ff539b 100644 (file)
@@ -1,6 +1,11 @@
 #define GTEST_HAS_EXCEPTIONS 0
 
 #include <SDL/SDL.h>
+#include <SDL/SDL_error.h>
+#include <SDL/SDL_video.h>
+#include <stdio.h>
+#include <stdlib.h>
+
 #include "gtest/gtest.h"
 
 int main(int argc, char **argv) {
index b8b3cb4e884de457e57acc854b6ba0c593426df5..195dccacc58ae05ee1d11bcb251a63cf08bf7d4e 100644 (file)
--- a/init.cpp
+++ b/init.cpp
@@ -1,4 +1,7 @@
 #include <GL/glew.h>
+#include <assert.h>
+#include <stddef.h>
+#include <algorithm>
 #include <string>
 
 #include "init.h"
index 3301d462104e3022094ddc9eb8c13003eabee072..3597e6c76cc6eb288ce0016597cef1d3bb819309 100644 (file)
@@ -1,5 +1,5 @@
-#include <math.h>
 #include <GL/glew.h>
+#include <math.h>
 
 #include "lift_gamma_gain_effect.h"
 #include "util.h"
index 6835620e11b432a73daf0df7d1331d9303e5a9fa..bd1ec16a6d8743e6dfa83cd9848e78b959636a7c 100644 (file)
@@ -20,6 +20,9 @@
 // Also, gamma is a case where we would not want premultiplied alpha.
 // Thus, we have to divide away alpha first, and then re-multiply it back later.
 
+#include <GL/glew.h>
+#include <string>
+
 #include "effect.h"
 
 class LiftGammaGainEffect : public Effect {
index 3e63679fa2f4ddc1aec719cc888ffca9290d3081..0b63063347c582420a8710cf01ea3b4e0e92cdb7 100644 (file)
@@ -1,8 +1,10 @@
 // Unit tests for LiftGammaGainEffect.
 
-#include "test_util.h"
+#include "effect_chain.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
 #include "lift_gamma_gain_effect.h"
+#include "test_util.h"
 
 TEST(LiftGammaGainEffectTest, DefaultIsNoop) {
        float data[] = {
index 03f34096a3a120697f919eaba619add911d8ce84..a33921be6b8172365828790531dff9d6e4e15d81 100644 (file)
@@ -3,6 +3,8 @@
 
 // A simple horizontal mirroring.
 
+#include <string>
+
 #include "effect.h"
 
 class MirrorEffect : public Effect {
index 967c06b2ba59ac47b9ed21b7f1692f90bfdde854..4ef62fe9a2454c4754635fd62566e93bbb63a96b 100644 (file)
@@ -4,6 +4,8 @@
 // Combine two images: a*x + b*y. If you set a within [0,1] and b=1-a,
 // you will get a fade; if not, you may get surprising results (consider alpha).
 
+#include <string>
+
 #include "effect.h"
 
 class MixEffect : public Effect {
index 096ecd5ae03169ee5e9052bfe2207a0140cc6f53..babb76630dd185cdea4613ff8fc93dc581666d54 100644 (file)
@@ -1,8 +1,13 @@
 // Unit tests for MixEffect.
 
-#include "test_util.h"
+#include <GL/glew.h>
+
+#include "effect_chain.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
+#include "input.h"
 #include "mix_effect.h"
+#include "test_util.h"
 
 TEST(MixEffectTest, FiftyFiftyMix) {
        float data_a[] = {
index 4c6d37a4fea6d9a95715031426eb7332fcf73346..66ff31b94be55d19ffacb7714051baa2c785493c 100644 (file)
@@ -10,6 +10,8 @@
 //
 // The first input is the bottom, and the second is the top.
 
+#include <string>
+
 #include "effect.h"
 
 class OverlayEffect : public Effect {
index d0867a13136e504a82bfa1a5dd3a0df9524186f1..5d86ec2d409159e7ac13875d8ee7b51e20a4cc90 100644 (file)
@@ -1,8 +1,13 @@
 // Unit tests for OverlayEffect.
 
-#include "test_util.h"
+#include <GL/glew.h>
+
+#include "effect_chain.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
+#include "input.h"
 #include "overlay_effect.h"
+#include "test_util.h"
 
 TEST(OverlayEffectTest, TopDominatesBottomWhenNoAlpha) {
        float data_a[] = {
index f8d30d480886aa364d103f90e3d38b1899e0f32d..f7f97078e608749ab1a70db4226e2984be6281fb 100644 (file)
@@ -1,5 +1,5 @@
-#include <math.h>
 #include <GL/glew.h>
+#include <assert.h>
 
 #include "padding_effect.h"
 #include "util.h"
index 9e206ce89233f34fe43b6de6703a2cf4b4a83ae5..a836ba208cc4c096fad3d0b9c7de6cc2da20ae7c 100644 (file)
@@ -12,6 +12,9 @@
 // You may not change it after calling finalize(), since that could change the
 // graph (need_linear_light() etc. depend on the border color you choose).
 
+#include <GL/glew.h>
+#include <string>
+
 #include "effect.h"
 
 class PaddingEffect : public Effect {
index e3f6f41f50e0dc50ef8a7419cc785cc95627f811..f86df3aff4d7f178e01eb636b442982e4157480f 100644 (file)
@@ -1,9 +1,14 @@
 // Unit tests for AlphaMultiplicationEffect.
 
-#include "test_util.h"
+#include <stddef.h>
+
+#include "effect_chain.h"
 #include "flat_input.h"
-#include "padding_effect.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
+#include "padding_effect.h"
+#include "test_util.h"
+#include "util.h"
 
 TEST(PaddingEffectTest, SimpleCenter) {
        float data[2 * 2] = {
index ec4f67edad5d628dcf0b9ab555d50cb4b747b957..264e5c10195dc65cd6bd82eca537c412bc611e7c 100644 (file)
@@ -1,12 +1,15 @@
 // Three-lobed Lanczos, the most common choice.
 #define LANCZOS_RADIUS 3.0
 
-#include <math.h>
-#include <assert.h>
 #include <GL/glew.h>
+#include <assert.h>
+#include <limits.h>
+#include <math.h>
+#include <stdio.h>
+#include <algorithm>
 
-#include "resample_effect.h"
 #include "effect_chain.h"
+#include "resample_effect.h"
 #include "util.h"
 
 namespace {
index b38728f05fa423061bb9002ce2bfb261ff73c4ff..b66ca6fe4ba30bd2ec817a634b6255bd2e316eee 100644 (file)
 // which is what the user is intended to use, instantiates two copies of
 // SingleResamplePassEffect behind the scenes).
 
+#include <GL/glew.h>
+#include <assert.h>
+#include <stddef.h>
+#include <string>
+
 #include "effect.h"
 
+class EffectChain;
+class Node;
 class SingleResamplePassEffect;
 
 class ResampleEffect : public Effect {
index 462f5c9c1f6d6751d874f5c5cb67e55d243f468c..a9c6923e269d202b0a7a939e19012dc9e7dfe33f 100644 (file)
@@ -1,9 +1,14 @@
 // Unit tests for ResampleEffect.
 
-#include "test_util.h"
+#include <math.h>
+#include <iomanip>
+
+#include "effect_chain.h"
+#include "flat_input.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
 #include "resample_effect.h"
-#include "flat_input.h"
+#include "test_util.h"
 
 namespace {
 
index 3cb40e3344d7703180e90e8d2352a73df876e87a..8fbaba70b08ccfbe5724af7b24068da6b420a75b 100644 (file)
@@ -5,6 +5,8 @@
 // (set by the two integer parameters "width" and "height").
 // Mostly useful as part of other algorithms.
 
+#include <string>
+
 #include "effect.h"
 
 class ResizeEffect : public Effect {
index 3f24a42503c9fec5190e9f72b2a3c6d8b683929f..6aafb74d2b5f543cfcd98f4cd0311e0b39ebfb00 100644 (file)
@@ -1,5 +1,3 @@
-#include <math.h>
-#include <assert.h>
 #include <GL/glew.h>
 
 #include "sandbox_effect.h"
index 4443ff7d29afc85126ca043b83e9679b55b76d48..072bc2b1096a95e592de293c396bdb2ce647afd7 100644 (file)
@@ -8,6 +8,9 @@
 // throwaway code. When you're happy, you can do a bit of search and replace
 // to give it a proper name and its own place in the build system.
 
+#include <GL/glew.h>
+#include <string>
+
 #include "effect.h"
 
 class SandboxEffect : public Effect {
index 27b1d006c691a23fbf589509b340555e5c9d4562..710dcfd917fca1d55a04fadbe5fb2a07660bd0f0 100644 (file)
@@ -7,6 +7,8 @@
 // (saturation=1). Extrapolating that curve further (ie., saturation > 1)
 // gives us increased saturation if so desired.
 
+#include <string>
+
 #include "effect.h"
 
 class SaturationEffect : public Effect {
index 6712197c24c228487c6a52f5b10dba9cb7c793c3..dadb964ef35b8b68eac504f889508110aa21db44 100644 (file)
@@ -1,8 +1,12 @@
 // Unit tests for SaturationEffect.
 
-#include "test_util.h"
+#include <GL/glew.h>
+
+#include "effect_chain.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
 #include "saturation_effect.h"
+#include "test_util.h"
 
 TEST(SaturationEffectTest, SaturationOneIsPassThrough) {
        float data[] = {
index b89b3ffb9ec64364768140b475ca53018b09a0a5..05b61aff9bdc0ecdd793e9af01f7b92d70c3e3b0 100644 (file)
@@ -1,12 +1,17 @@
-#include "init.h"
-#include "test_util.h"
+#include <assert.h>
+#include <gtest/gtest-message.h>
+#include <math.h>
+#include <stdio.h>
+#include <algorithm>
+#include <ostream>
+
 #include "flat_input.h"
 #include "gtest/gtest.h"
+#include "init.h"
+#include "test_util.h"
+#include "util.h"
 
-#include <stdio.h>
-#include <math.h>
-
-#include <algorithm>
+class Input;
 
 namespace {
 
index 9a7d0012ff5c0cb77c2ec3277ad35c9dab3103a5..1f48ae1eaffa1061973a2db7ad1287f0bd16c79c 100644 (file)
@@ -1,7 +1,11 @@
 #ifndef _TEST_UTIL_H
 #define _TEST_UTIL_H 1
 
+#include <GL/glew.h>
 #include "effect_chain.h"
+#include "image_format.h"
+
+class Input;
 
 class EffectChainTester {
 public:
index 0ca22eea5d36543601a9e3277754266cff3f6b7d..7c289253624b49a53ccf9f123ae87407238d71a8 100644 (file)
@@ -1,10 +1,10 @@
-#include <math.h>
 #include <assert.h>
+#include <vector>
 
-#include "unsharp_mask_effect.h"
 #include "blur_effect.h"
-#include "mix_effect.h"
 #include "effect_chain.h"
+#include "mix_effect.h"
+#include "unsharp_mask_effect.h"
 #include "util.h"
 
 UnsharpMaskEffect::UnsharpMaskEffect()
index 45a04f0fe00bdddd0149c417e50d35625c5db374..b0c937776e32bc0d7d74b3bade5e7c0792dac6e8 100644 (file)
 // See DeconvolutionSharpenEffect for a different, possibly better
 // sharpening algorithm.
 
+#include <GL/glew.h>
+#include <assert.h>
+#include <string>
+
 #include "effect.h"
 
 class BlurEffect;
+class EffectChain;
 class MixEffect;
+class Node;
 
 class UnsharpMaskEffect : public Effect {
 public:
index a957ef13bc8bee962ba14abd32ae85e152120aa5..8dbefc2c4deb1363092e2afcd5c19e73ffed7391 100644 (file)
@@ -2,8 +2,10 @@
 
 #include <math.h>
 
-#include "test_util.h"
+#include "effect_chain.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
+#include "test_util.h"
 #include "unsharp_mask_effect.h"
 
 TEST(UnsharpMaskEffectTest, NoAmountDoesNothing) {
index 4e6a31c70502cba2687197cba2549b791f4da98c..a1bc2fd3e868c8aa2e6a948237e5608ff11b491b 100644 (file)
--- a/util.cpp
+++ b/util.cpp
@@ -1,11 +1,13 @@
-#include <stdio.h>
+#include <GL/glew.h>
+#include <assert.h>
 #include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#include <assert.h>
-#include <GL/glew.h>
+#include <Eigen/Core>
 
-#include "util.h"
 #include "init.h"
+#include "util.h"
 
 extern std::string *movit_data_directory;
 
diff --git a/util.h b/util.h
index 8917dd3cf9e039c4ead7008d7d0a162af54d24ee..5839e5b6c4ce1ccd52ac65f2364a9d6c1e095663 100644 (file)
--- a/util.h
+++ b/util.h
@@ -3,13 +3,11 @@
 
 // Various utilities.
 
+#include <GL/glew.h>
 #include <stdio.h>
 #include <stdlib.h>
-
-#include <string>
 #include <Eigen/Core>
-
-#include <GL/glew.h>
+#include <string>
 
 #define BUFFER_OFFSET(i) ((char *)NULL + (i))
 
index 83aaa10e9c2ac51c6eb44b9be7cf104ac773fd71..bbd61da4a41a528abc9e33ae40baec5ba735833e 100644 (file)
@@ -1,5 +1,5 @@
-#include <math.h>
 #include <GL/glew.h>
+#include <math.h>
 
 #include "vignette_effect.h"
 #include "util.h"
index a39470398a0dba9cda171f34cf4f96c2ec04411b..d13bf85d01c36b47a47cdd53641efd8f6f5fe6ad 100644 (file)
@@ -4,6 +4,9 @@
 // A circular vignette, falling off as cos² of the distance from the center
 // (the classic formula for approximating a real lens).
 
+#include <GL/glew.h>
+#include <string>
+
 #include "effect.h"
 
 class VignetteEffect : public Effect {
index b00f0ca6b50b40705f31d7426379cf48388cf6d4..1583922461053dd1c793eaa51f93b28275b1cab5 100644 (file)
@@ -1,12 +1,11 @@
-#include <math.h>
-#include <assert.h>
-#include <GL/glew.h>
-
+#include <Eigen/Core>
 #include <Eigen/LU>
+#include <GL/glew.h>
+#include <assert.h>
 
-#include "white_balance_effect.h"
-#include "util.h"
 #include "d65.h"
+#include "util.h"
+#include "white_balance_effect.h"
 
 using namespace Eigen;
 
index 2f8f38e0ee168a3d02632a08514f218d43c45ea8..c4e46a47548354c6df953fd2caf20d7c9112a80f 100644 (file)
@@ -3,6 +3,9 @@
 
 // Color correction in LMS color space.
 
+#include <GL/glew.h>
+#include <string>
+
 #include "effect.h"
 
 class WhiteBalanceEffect : public Effect {
index 733b5bcb2ddbf21b8c6d3ccc7dd401520353cc0a..4cd2ae0424af342fc56ecab6bf2a4e547e25b483 100644 (file)
@@ -1,7 +1,11 @@
 // Unit tests for WhiteBalanceEffect.
 
-#include "test_util.h"
+#include <iomanip>
+
+#include "effect_chain.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
+#include "test_util.h"
 #include "white_balance_effect.h"
 
 TEST(WhiteBalanceEffectTest, GrayNeutralDoesNothing) {
index 5742e457a8117f9690de9c9aeec852e62a3a4f67..1c7313669f0c1211044bc5a4ee6407d85ddf8691 100644 (file)
@@ -1,5 +1,5 @@
-#include <math.h>
 #include <GL/glew.h>
+#include <math.h>
 
 #include "widgets.h"
 #include "util.h"
index 098b574b1f8f0b79204c90dbaa55ca148a085294..3e691d812fa8acc6b31e0bd09fa4a57bb45e2701 100644 (file)
@@ -1,11 +1,12 @@
-#include <string.h>
-#include <assert.h>
-#include <GL/glew.h>
-
+#include <Eigen/Core>
 #include <Eigen/LU>
+#include <GL/glew.h>
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
 
-#include "ycbcr_input.h"
 #include "util.h"
+#include "ycbcr_input.h"
 
 using namespace Eigen;
 
index 492230febf4abd92edc8c7a322a967a32f7866dd..2220f5d1ebd9392730f98439cbe3d98a7e6d8c30 100644 (file)
@@ -5,6 +5,12 @@
 // imprecisely, called “YUV”), which is typically what you get from a video decoder.
 // It upsamples planes as needed, using the default linear upsampling OpenGL gives you.
 
+#include <GL/glew.h>
+#include <assert.h>
+#include <string>
+
+#include "effect.h"
+#include "image_format.h"
 #include "input.h"
 
 struct YCbCrFormat {
index 5bd052bc01da0802bb9bf58a162ae87795543dfc..15d76391281a7c5ccdc438b4b7fe5c4679fc4a4b 100644 (file)
@@ -1,8 +1,11 @@
 // Unit tests for YCbCrInput.
 // FIXME: This class really ought to support mipmaps.
 
-#include "test_util.h"
+#include <stddef.h>
+
+#include "effect_chain.h"
 #include "gtest/gtest.h"
+#include "test_util.h"
 #include "ycbcr_input.h"
 
 TEST(YCbCrInput, Simple444) {