From: Steinar H. Gunderson Date: Sat, 2 Feb 2013 13:11:29 +0000 (+0100) Subject: Run include-what-you-use over all of movit. Some hand tuning. X-Git-Tag: 1.0~139 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=37f56fcbe571b2322243f6de59494bf9e0cbb37a Run include-what-you-use over all of movit. Some hand tuning. --- diff --git a/alpha_division_effect.h b/alpha_division_effect.h index e700112..2b51c3a 100644 --- a/alpha_division_effect.h +++ b/alpha_division_effect.h @@ -3,6 +3,8 @@ // Convert premultiplied alpha to postmultiplied alpha, simply by multiplying. +#include + #include "effect.h" class AlphaDivisionEffect : public Effect { diff --git a/alpha_division_effect_test.cpp b/alpha_division_effect_test.cpp index 8c29702..b9c16b3 100644 --- a/alpha_division_effect_test.cpp +++ b/alpha_division_effect_test.cpp @@ -1,7 +1,9 @@ // Unit tests for AlphaDivisionEffect. -#include "test_util.h" +#include #include "gtest/gtest.h" +#include "image_format.h" +#include "test_util.h" TEST(AlphaDivisionEffectTest, SimpleTest) { const int size = 2; diff --git a/alpha_multiplication_effect.h b/alpha_multiplication_effect.h index c64f2dc..2425a42 100644 --- a/alpha_multiplication_effect.h +++ b/alpha_multiplication_effect.h @@ -3,6 +3,8 @@ // Convert postmultiplied alpha to premultiplied alpha, simply by multiplying. +#include + #include "effect.h" class AlphaMultiplicationEffect : public Effect { diff --git a/alpha_multiplication_effect_test.cpp b/alpha_multiplication_effect_test.cpp index 6ee4289..62863e9 100644 --- a/alpha_multiplication_effect_test.cpp +++ b/alpha_multiplication_effect_test.cpp @@ -1,7 +1,11 @@ // Unit tests for AlphaMultiplicationEffect. -#include "test_util.h" +#include + +#include "effect_chain.h" #include "gtest/gtest.h" +#include "image_format.h" +#include "test_util.h" TEST(AlphaMultiplicationEffectTest, SimpleTest) { const int size = 3; diff --git a/blur_effect.cpp b/blur_effect.cpp index d62b056..a74cd41 100644 --- a/blur_effect.cpp +++ b/blur_effect.cpp @@ -1,6 +1,7 @@ -#include -#include #include +#include +#include +#include #include "blur_effect.h" #include "effect_chain.h" diff --git a/blur_effect.h b/blur_effect.h index 76f7389..5a04415 100644 --- a/blur_effect.h +++ b/blur_effect.h @@ -9,8 +9,15 @@ // which is what the user is intended to use, instantiates two copies of // SingleBlurPassEffect behind the scenes). +#include +#include +#include +#include + #include "effect.h" +class EffectChain; +class Node; class SingleBlurPassEffect; class BlurEffect : public Effect { diff --git a/blur_effect_test.cpp b/blur_effect_test.cpp index d458e45..1718e7d 100644 --- a/blur_effect_test.cpp +++ b/blur_effect_test.cpp @@ -1,9 +1,12 @@ // Unit tests for BlurEffect. #include +#include -#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; diff --git a/colorspace_conversion_effect.cpp b/colorspace_conversion_effect.cpp index 3a8ad95..5406e1b 100644 --- a/colorspace_conversion_effect.cpp +++ b/colorspace_conversion_effect.cpp @@ -1,10 +1,10 @@ #include - +#include #include #include "colorspace_conversion_effect.h" -#include "util.h" #include "d65.h" +#include "util.h" using namespace Eigen; diff --git a/colorspace_conversion_effect.h b/colorspace_conversion_effect.h index 15ad0ad..b1d6e06 100644 --- a/colorspace_conversion_effect.h +++ b/colorspace_conversion_effect.h @@ -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 + #include "effect.h" #include "effect_chain.h" +#include "image_format.h" class ColorspaceConversionEffect : public Effect { private: diff --git a/colorspace_conversion_effect_test.cpp b/colorspace_conversion_effect_test.cpp index 3361489..76bcd49 100644 --- a/colorspace_conversion_effect_test.cpp +++ b/colorspace_conversion_effect_test.cpp @@ -1,8 +1,10 @@ // Unit tests for ColorspaceConversionEffect. -#include "test_util.h" -#include "gtest/gtest.h" +#include + #include "colorspace_conversion_effect.h" +#include "gtest/gtest.h" +#include "test_util.h" TEST(ColorspaceConversionEffectTest, Reversible) { float data[] = { diff --git a/deconvolution_sharpen_effect.cpp b/deconvolution_sharpen_effect.cpp index 2d32ecd..2602664 100644 --- a/deconvolution_sharpen_effect.cpp +++ b/deconvolution_sharpen_effect.cpp @@ -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 -#include -#include #include #include +#include +#include +#include +#include +#include +#include +#include #include "deconvolution_sharpen_effect.h" #include "util.h" diff --git a/deconvolution_sharpen_effect.h b/deconvolution_sharpen_effect.h index a0b405a..80553ad 100644 --- a/deconvolution_sharpen_effect.h +++ b/deconvolution_sharpen_effect.h @@ -19,9 +19,11 @@ // // Jain, Anil K.: “Fundamentals of Digital Image Processing”, Prentice Hall, 1988. -#include "effect.h" - +#include #include +#include + +#include "effect.h" class DeconvolutionSharpenEffect : public Effect { public: diff --git a/deconvolution_sharpen_effect_test.cpp b/deconvolution_sharpen_effect_test.cpp index f08225b..6980b3d 100644 --- a/deconvolution_sharpen_effect_test.cpp +++ b/deconvolution_sharpen_effect_test.cpp @@ -1,8 +1,13 @@ // Unit tests for DeconvolutionSharpenEffect. -#include "test_util.h" -#include "gtest/gtest.h" +#include +#include + #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; diff --git a/demo.cpp b/demo.cpp index 7b31528..0083f68 100644 --- a/demo.cpp +++ b/demo.cpp @@ -4,33 +4,37 @@ #define WIDTH 1280 #define HEIGHT 720 -#include -#include -#include -#include -#include - -#include -#include -#include - #include - #include -#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include -#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]; diff --git a/diffusion_effect.cpp b/diffusion_effect.cpp index f07f9d1..a202f8c 100644 --- a/diffusion_effect.cpp +++ b/diffusion_effect.cpp @@ -1,8 +1,8 @@ -#include #include +#include -#include "diffusion_effect.h" #include "blur_effect.h" +#include "diffusion_effect.h" #include "effect_chain.h" #include "util.h" diff --git a/diffusion_effect.h b/diffusion_effect.h index 2c635d0..64d743d 100644 --- a/diffusion_effect.h +++ b/diffusion_effect.h @@ -12,9 +12,15 @@ // where we first blur the picture, and then overlay it on the original // using the original as a matte. +#include +#include +#include + #include "effect.h" class BlurEffect; +class EffectChain; +class Node; class OverlayMatteEffect; class DiffusionEffect : public Effect { diff --git a/diffusion_effect_test.cpp b/diffusion_effect_test.cpp index 446a51f..5558f4f 100644 --- a/diffusion_effect_test.cpp +++ b/diffusion_effect_test.cpp @@ -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; diff --git a/dither_effect.cpp b/dither_effect.cpp index 305268e..44933b6 100644 --- a/dither_effect.cpp +++ b/dither_effect.cpp @@ -1,6 +1,6 @@ -#include -#include #include +#include +#include #include "dither_effect.h" #include "util.h" diff --git a/dither_effect.h b/dither_effect.h index cad6488..3143907 100644 --- a/dither_effect.h +++ b/dither_effect.h @@ -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 +#include + #include "effect.h" class DitherEffect : public Effect { diff --git a/dither_effect_test.cpp b/dither_effect_test.cpp index bdba121..6fd46db 100644 --- a/dither_effect_test.cpp +++ b/dither_effect_test.cpp @@ -1,9 +1,12 @@ // Unit tests for DitherEffect. +#include #include -#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; diff --git a/effect.cpp b/effect.cpp index 39e9490..0fe09db 100644 --- a/effect.cpp +++ b/effect.cpp @@ -1,10 +1,11 @@ +#include +#include +#include #include #include -#include -#include +#include #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) diff --git a/effect.h b/effect.h index 771648c..826dd6f 100644 --- a/effect.h +++ b/effect.h @@ -10,15 +10,14 @@ // effect instance; use the macro PREFIX() around your identifiers to // automatically prepend that prefix. +#include +#include +#include +#include #include #include #include -#include - -#include - -#include #include "util.h" class EffectChain; diff --git a/effect_chain.cpp b/effect_chain.cpp index 0f8876d..0015197 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -1,27 +1,29 @@ #define GL_GLEXT_PROTOTYPES 1 -#include +#include +#include +#include #include +#include +#include +#include #include -#include -#include -#include - #include #include #include #include -#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), diff --git a/effect_chain.h b/effect_chain.h index f5e27c8..2199a5d 100644 --- a/effect_chain.h +++ b/effect_chain.h @@ -1,14 +1,20 @@ #ifndef _EFFECT_CHAIN_H #define _EFFECT_CHAIN_H 1 +#include +#include +#include #include +#include #include #include "effect.h" #include "image_format.h" #include "input.h" +class Effect; class EffectChain; +class Input; struct Phase; // For internal use within Node. diff --git a/effect_chain_test.cpp b/effect_chain_test.cpp index cea22e0..49d431b 100644 --- a/effect_chain_test.cpp +++ b/effect_chain_test.cpp @@ -3,13 +3,18 @@ // Note that this also contains the tests for some of the simpler effects. #include +#include +#include +#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[] = { diff --git a/flat_input.h b/flat_input.h index 24a3fca..80e113f 100644 --- a/flat_input.h +++ b/flat_input.h @@ -1,10 +1,14 @@ #ifndef _FLAT_INPUT_H #define _FLAT_INPUT_H 1 +#include #include +#include -#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. diff --git a/flat_input_test.cpp b/flat_input_test.cpp index db03bd0..c8df483 100644 --- a/flat_input_test.cpp +++ b/flat_input_test.cpp @@ -1,8 +1,11 @@ // Unit tests for FlatInput. -#include "test_util.h" -#include "gtest/gtest.h" +#include + +#include "effect_chain.h" #include "flat_input.h" +#include "gtest/gtest.h" +#include "test_util.h" TEST(FlatInput, SimpleGrayscale) { const int size = 4; diff --git a/gamma_compression_effect.h b/gamma_compression_effect.h index 46ac80e..f34bca0 100644 --- a/gamma_compression_effect.h +++ b/gamma_compression_effect.h @@ -7,8 +7,11 @@ // // Currently supports sRGB and Rec. 601/709. +#include + #include "effect.h" #include "effect_chain.h" +#include "image_format.h" #define COMPRESSION_CURVE_SIZE 4096 diff --git a/gamma_compression_effect_test.cpp b/gamma_compression_effect_test.cpp index 6211acc..c0b4ccf 100644 --- a/gamma_compression_effect_test.cpp +++ b/gamma_compression_effect_test.cpp @@ -3,9 +3,10 @@ // Pretty much the inverse of the GammaExpansionEffect tests; // EffectChainTest tests that they are actually inverses. -#include "test_util.h" +#include #include "gtest/gtest.h" -#include "gamma_expansion_effect.h" +#include "image_format.h" +#include "test_util.h" TEST(GammaCompressionEffectTest, sRGB_KeyValues) { float data[] = { diff --git a/gamma_expansion_effect.h b/gamma_expansion_effect.h index 043731b..059b246 100644 --- a/gamma_expansion_effect.h +++ b/gamma_expansion_effect.h @@ -7,8 +7,11 @@ // // Currently supports sRGB and Rec. 601/709. +#include + #include "effect.h" #include "effect_chain.h" +#include "image_format.h" #define EXPANSION_CURVE_SIZE 256 diff --git a/gamma_expansion_effect_test.cpp b/gamma_expansion_effect_test.cpp index 94f5749..6fc0252 100644 --- a/gamma_expansion_effect_test.cpp +++ b/gamma_expansion_effect_test.cpp @@ -1,8 +1,10 @@ // Unit tests for GammaExpansionEffect. -#include "test_util.h" -#include "gtest/gtest.h" +#include + #include "gamma_expansion_effect.h" +#include "gtest/gtest.h" +#include "test_util.h" TEST(GammaExpansionEffectTest, sRGB_KeyValues) { float data[] = { diff --git a/glow_effect.cpp b/glow_effect.cpp index 064cdac..86a3d7f 100644 --- a/glow_effect.cpp +++ b/glow_effect.cpp @@ -1,10 +1,10 @@ -#include #include +#include -#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() diff --git a/glow_effect.h b/glow_effect.h index abadb84..3453c99 100644 --- a/glow_effect.h +++ b/glow_effect.h @@ -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 +#include +#include + #include "effect.h" class BlurEffect; -class MixEffect; +class EffectChain; class HighlightCutoffEffect; +class MixEffect; +class Node; class GlowEffect : public Effect { public: diff --git a/glow_effect_test.cpp b/glow_effect_test.cpp index 77c9d12..b8eff4b 100644 --- a/glow_effect_test.cpp +++ b/glow_effect_test.cpp @@ -2,9 +2,11 @@ #include -#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; diff --git a/gtest_sdl_main.cpp b/gtest_sdl_main.cpp index fa3a835..39027e6 100644 --- a/gtest_sdl_main.cpp +++ b/gtest_sdl_main.cpp @@ -1,6 +1,11 @@ #define GTEST_HAS_EXCEPTIONS 0 #include +#include +#include +#include +#include + #include "gtest/gtest.h" int main(int argc, char **argv) { diff --git a/init.cpp b/init.cpp index b8b3cb4..195dcca 100644 --- a/init.cpp +++ b/init.cpp @@ -1,4 +1,7 @@ #include +#include +#include +#include #include #include "init.h" diff --git a/lift_gamma_gain_effect.cpp b/lift_gamma_gain_effect.cpp index 3301d46..3597e6c 100644 --- a/lift_gamma_gain_effect.cpp +++ b/lift_gamma_gain_effect.cpp @@ -1,5 +1,5 @@ -#include #include +#include #include "lift_gamma_gain_effect.h" #include "util.h" diff --git a/lift_gamma_gain_effect.h b/lift_gamma_gain_effect.h index 6835620..bd1ec16 100644 --- a/lift_gamma_gain_effect.h +++ b/lift_gamma_gain_effect.h @@ -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 +#include + #include "effect.h" class LiftGammaGainEffect : public Effect { diff --git a/lift_gamma_gain_effect_test.cpp b/lift_gamma_gain_effect_test.cpp index 3e63679..0b63063 100644 --- a/lift_gamma_gain_effect_test.cpp +++ b/lift_gamma_gain_effect_test.cpp @@ -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[] = { diff --git a/mirror_effect.h b/mirror_effect.h index 03f3409..a33921b 100644 --- a/mirror_effect.h +++ b/mirror_effect.h @@ -3,6 +3,8 @@ // A simple horizontal mirroring. +#include + #include "effect.h" class MirrorEffect : public Effect { diff --git a/mix_effect.h b/mix_effect.h index 967c06b..4ef62fe 100644 --- a/mix_effect.h +++ b/mix_effect.h @@ -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 + #include "effect.h" class MixEffect : public Effect { diff --git a/mix_effect_test.cpp b/mix_effect_test.cpp index 096ecd5..babb766 100644 --- a/mix_effect_test.cpp +++ b/mix_effect_test.cpp @@ -1,8 +1,13 @@ // Unit tests for MixEffect. -#include "test_util.h" +#include + +#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[] = { diff --git a/overlay_effect.h b/overlay_effect.h index 4c6d37a..66ff31b 100644 --- a/overlay_effect.h +++ b/overlay_effect.h @@ -10,6 +10,8 @@ // // The first input is the bottom, and the second is the top. +#include + #include "effect.h" class OverlayEffect : public Effect { diff --git a/overlay_effect_test.cpp b/overlay_effect_test.cpp index d0867a1..5d86ec2 100644 --- a/overlay_effect_test.cpp +++ b/overlay_effect_test.cpp @@ -1,8 +1,13 @@ // Unit tests for OverlayEffect. -#include "test_util.h" +#include + +#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[] = { diff --git a/padding_effect.cpp b/padding_effect.cpp index f8d30d4..f7f9707 100644 --- a/padding_effect.cpp +++ b/padding_effect.cpp @@ -1,5 +1,5 @@ -#include #include +#include #include "padding_effect.h" #include "util.h" diff --git a/padding_effect.h b/padding_effect.h index 9e206ce..a836ba2 100644 --- a/padding_effect.h +++ b/padding_effect.h @@ -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 +#include + #include "effect.h" class PaddingEffect : public Effect { diff --git a/padding_effect_test.cpp b/padding_effect_test.cpp index e3f6f41..f86df3a 100644 --- a/padding_effect_test.cpp +++ b/padding_effect_test.cpp @@ -1,9 +1,14 @@ // Unit tests for AlphaMultiplicationEffect. -#include "test_util.h" +#include + +#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] = { diff --git a/resample_effect.cpp b/resample_effect.cpp index ec4f67e..264e5c1 100644 --- a/resample_effect.cpp +++ b/resample_effect.cpp @@ -1,12 +1,15 @@ // Three-lobed Lanczos, the most common choice. #define LANCZOS_RADIUS 3.0 -#include -#include #include +#include +#include +#include +#include +#include -#include "resample_effect.h" #include "effect_chain.h" +#include "resample_effect.h" #include "util.h" namespace { diff --git a/resample_effect.h b/resample_effect.h index b38728f..b66ca6f 100644 --- a/resample_effect.h +++ b/resample_effect.h @@ -15,8 +15,15 @@ // which is what the user is intended to use, instantiates two copies of // SingleResamplePassEffect behind the scenes). +#include +#include +#include +#include + #include "effect.h" +class EffectChain; +class Node; class SingleResamplePassEffect; class ResampleEffect : public Effect { diff --git a/resample_effect_test.cpp b/resample_effect_test.cpp index 462f5c9..a9c6923 100644 --- a/resample_effect_test.cpp +++ b/resample_effect_test.cpp @@ -1,9 +1,14 @@ // Unit tests for ResampleEffect. -#include "test_util.h" +#include +#include + +#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 { diff --git a/resize_effect.h b/resize_effect.h index 3cb40e3..8fbaba7 100644 --- a/resize_effect.h +++ b/resize_effect.h @@ -5,6 +5,8 @@ // (set by the two integer parameters "width" and "height"). // Mostly useful as part of other algorithms. +#include + #include "effect.h" class ResizeEffect : public Effect { diff --git a/sandbox_effect.cpp b/sandbox_effect.cpp index 3f24a42..6aafb74 100644 --- a/sandbox_effect.cpp +++ b/sandbox_effect.cpp @@ -1,5 +1,3 @@ -#include -#include #include #include "sandbox_effect.h" diff --git a/sandbox_effect.h b/sandbox_effect.h index 4443ff7..072bc2b 100644 --- a/sandbox_effect.h +++ b/sandbox_effect.h @@ -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 +#include + #include "effect.h" class SandboxEffect : public Effect { diff --git a/saturation_effect.h b/saturation_effect.h index 27b1d00..710dcfd 100644 --- a/saturation_effect.h +++ b/saturation_effect.h @@ -7,6 +7,8 @@ // (saturation=1). Extrapolating that curve further (ie., saturation > 1) // gives us increased saturation if so desired. +#include + #include "effect.h" class SaturationEffect : public Effect { diff --git a/saturation_effect_test.cpp b/saturation_effect_test.cpp index 6712197..dadb964 100644 --- a/saturation_effect_test.cpp +++ b/saturation_effect_test.cpp @@ -1,8 +1,12 @@ // Unit tests for SaturationEffect. -#include "test_util.h" +#include + +#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[] = { diff --git a/test_util.cpp b/test_util.cpp index b89b3ff..05b61af 100644 --- a/test_util.cpp +++ b/test_util.cpp @@ -1,12 +1,17 @@ -#include "init.h" -#include "test_util.h" +#include +#include +#include +#include +#include +#include + #include "flat_input.h" #include "gtest/gtest.h" +#include "init.h" +#include "test_util.h" +#include "util.h" -#include -#include - -#include +class Input; namespace { diff --git a/test_util.h b/test_util.h index 9a7d001..1f48ae1 100644 --- a/test_util.h +++ b/test_util.h @@ -1,7 +1,11 @@ #ifndef _TEST_UTIL_H #define _TEST_UTIL_H 1 +#include #include "effect_chain.h" +#include "image_format.h" + +class Input; class EffectChainTester { public: diff --git a/unsharp_mask_effect.cpp b/unsharp_mask_effect.cpp index 0ca22ee..7c28925 100644 --- a/unsharp_mask_effect.cpp +++ b/unsharp_mask_effect.cpp @@ -1,10 +1,10 @@ -#include #include +#include -#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() diff --git a/unsharp_mask_effect.h b/unsharp_mask_effect.h index 45a04f0..b0c9377 100644 --- a/unsharp_mask_effect.h +++ b/unsharp_mask_effect.h @@ -10,10 +10,16 @@ // See DeconvolutionSharpenEffect for a different, possibly better // sharpening algorithm. +#include +#include +#include + #include "effect.h" class BlurEffect; +class EffectChain; class MixEffect; +class Node; class UnsharpMaskEffect : public Effect { public: diff --git a/unsharp_mask_effect_test.cpp b/unsharp_mask_effect_test.cpp index a957ef1..8dbefc2 100644 --- a/unsharp_mask_effect_test.cpp +++ b/unsharp_mask_effect_test.cpp @@ -2,8 +2,10 @@ #include -#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) { diff --git a/util.cpp b/util.cpp index 4e6a31c..a1bc2fd 100644 --- a/util.cpp +++ b/util.cpp @@ -1,11 +1,13 @@ -#include +#include +#include #include +#include +#include #include -#include -#include +#include -#include "util.h" #include "init.h" +#include "util.h" extern std::string *movit_data_directory; diff --git a/util.h b/util.h index 8917dd3..5839e5b 100644 --- a/util.h +++ b/util.h @@ -3,13 +3,11 @@ // Various utilities. +#include #include #include - -#include #include - -#include +#include #define BUFFER_OFFSET(i) ((char *)NULL + (i)) diff --git a/vignette_effect.cpp b/vignette_effect.cpp index 83aaa10..bbd61da 100644 --- a/vignette_effect.cpp +++ b/vignette_effect.cpp @@ -1,5 +1,5 @@ -#include #include +#include #include "vignette_effect.h" #include "util.h" diff --git a/vignette_effect.h b/vignette_effect.h index a394703..d13bf85 100644 --- a/vignette_effect.h +++ b/vignette_effect.h @@ -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 +#include + #include "effect.h" class VignetteEffect : public Effect { diff --git a/white_balance_effect.cpp b/white_balance_effect.cpp index b00f0ca..1583922 100644 --- a/white_balance_effect.cpp +++ b/white_balance_effect.cpp @@ -1,12 +1,11 @@ -#include -#include -#include - +#include #include +#include +#include -#include "white_balance_effect.h" -#include "util.h" #include "d65.h" +#include "util.h" +#include "white_balance_effect.h" using namespace Eigen; diff --git a/white_balance_effect.h b/white_balance_effect.h index 2f8f38e..c4e46a4 100644 --- a/white_balance_effect.h +++ b/white_balance_effect.h @@ -3,6 +3,9 @@ // Color correction in LMS color space. +#include +#include + #include "effect.h" class WhiteBalanceEffect : public Effect { diff --git a/white_balance_effect_test.cpp b/white_balance_effect_test.cpp index 733b5bc..4cd2ae0 100644 --- a/white_balance_effect_test.cpp +++ b/white_balance_effect_test.cpp @@ -1,7 +1,11 @@ // Unit tests for WhiteBalanceEffect. -#include "test_util.h" +#include + +#include "effect_chain.h" #include "gtest/gtest.h" +#include "image_format.h" +#include "test_util.h" #include "white_balance_effect.h" TEST(WhiteBalanceEffectTest, GrayNeutralDoesNothing) { diff --git a/widgets.cpp b/widgets.cpp index 5742e45..1c73136 100644 --- a/widgets.cpp +++ b/widgets.cpp @@ -1,5 +1,5 @@ -#include #include +#include #include "widgets.h" #include "util.h" diff --git a/ycbcr_input.cpp b/ycbcr_input.cpp index 098b574..3e691d8 100644 --- a/ycbcr_input.cpp +++ b/ycbcr_input.cpp @@ -1,11 +1,12 @@ -#include -#include -#include - +#include #include +#include +#include +#include +#include -#include "ycbcr_input.h" #include "util.h" +#include "ycbcr_input.h" using namespace Eigen; diff --git a/ycbcr_input.h b/ycbcr_input.h index 492230f..2220f5d 100644 --- a/ycbcr_input.h +++ b/ycbcr_input.h @@ -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 +#include +#include + +#include "effect.h" +#include "image_format.h" #include "input.h" struct YCbCrFormat { diff --git a/ycbcr_input_test.cpp b/ycbcr_input_test.cpp index 5bd052b..15d7639 100644 --- a/ycbcr_input_test.cpp +++ b/ycbcr_input_test.cpp @@ -1,8 +1,11 @@ // Unit tests for YCbCrInput. // FIXME: This class really ought to support mipmaps. -#include "test_util.h" +#include + +#include "effect_chain.h" #include "gtest/gtest.h" +#include "test_util.h" #include "ycbcr_input.h" TEST(YCbCrInput, Simple444) {