-#ifndef _ALPHA_DIVISION_EFFECT_H
-#define _ALPHA_DIVISION_EFFECT_H 1
+#ifndef _MOVIT_ALPHA_DIVISION_EFFECT_H
+#define _MOVIT_ALPHA_DIVISION_EFFECT_H 1
// Convert premultiplied alpha to postmultiplied alpha, simply by multiplying.
std::string output_fragment_shader();
};
-#endif // !defined(_ALPHA_DIVISION_EFFECT_H)
+#endif // !defined(_MOVIT_ALPHA_DIVISION_EFFECT_H)
-#ifndef _ALPHA_MULTIPLICATION_EFFECT_H
-#define _ALPHA_MULTIPLICATION_EFFECT_H 1
+#ifndef _MOVIT_ALPHA_MULTIPLICATION_EFFECT_H
+#define _MOVIT_ALPHA_MULTIPLICATION_EFFECT_H 1
// Convert postmultiplied alpha to premultiplied alpha, simply by multiplying.
std::string output_fragment_shader();
};
-#endif // !defined(_ALPHA_MULTIPLICATION_EFFECT_H)
+#endif // !defined(_MOVIT_ALPHA_MULTIPLICATION_EFFECT_H)
-#ifndef _BLUR_EFFECT_H
-#define _BLUR_EFFECT_H 1
+#ifndef _MOVIT_BLUR_EFFECT_H
+#define _MOVIT_BLUR_EFFECT_H 1
// A separable 2D blur implemented by a combination of mipmap filtering
// and convolution (essentially giving a convolution with a piecewise linear
int width, height, virtual_width, virtual_height;
};
-#endif // !defined(_BLUR_EFFECT_H)
+#endif // !defined(_MOVIT_BLUR_EFFECT_H)
-#ifndef _COLORSPACE_CONVERSION_EFFECT_H
-#define _COLORSPACE_CONVERSION_EFFECT_H 1
+#ifndef _MOVIT_COLORSPACE_CONVERSION_EFFECT_H
+#define _MOVIT_COLORSPACE_CONVERSION_EFFECT_H 1
// An effect to convert between different color spaces.
// Can convert freely between sRGB/Rec. 709 and the two different Rec. 601
Colorspace source_space, destination_space;
};
-#endif // !defined(_COLORSPACE_CONVERSION_EFFECT_H)
+#endif // !defined(_MOVIT_COLORSPACE_CONVERSION_EFFECT_H)
-#ifndef _D65_H
-#define _D65_H 1
+#ifndef _MOVIT_D65_H
+#define _MOVIT_D65_H 1
// The D65 illuminant, which is the standard white point (ie. what you should get
// for R=G=B=1) for almost all video color spaces in common use. It has a color
static const double d65_Y = 1.0;
static const double d65_Z = d65_z / d65_y;
-#endif // !defined(_D65_H)
+#endif // !defined(_MOVIT_D65_H)
-#ifndef _DECONVOLUTION_SHARPEN_EFFECT_H
-#define _DECONVOLUTION_SHARPEN_EFFECT_H 1
+#ifndef _MOVIT_DECONVOLUTION_SHARPEN_EFFECT_H
+#define _MOVIT_DECONVOLUTION_SHARPEN_EFFECT_H 1
// DeconvolutionSharpenEffect is an effect that sharpens by way of deconvolution
// (i.e., trying to reverse the blur kernel, as opposed to just boosting high
void update_deconvolution_kernel();
};
-#endif // !defined(_DECONVOLUTION_SHARPEN_EFFECT_H)
+#endif // !defined(_MOVIT_DECONVOLUTION_SHARPEN_EFFECT_H)
-#ifndef _DIFFUSION_EFFECT_H
-#define _DIFFUSION_EFFECT_H 1
+#ifndef _MOVIT_DIFFUSION_EFFECT_H
+#define _MOVIT_DIFFUSION_EFFECT_H 1
// There are many different effects that go under the name of "diffusion",
// seemingly all of the inspired by the effect you get when you put a
};
-#endif // !defined(_DIFFUSION_EFFECT_H)
+#endif // !defined(_MOVIT_DIFFUSION_EFFECT_H)
-#ifndef _DITHER_EFFECT_H
-#define _DITHER_EFFECT_H 1
+#ifndef _MOVIT_DITHER_EFFECT_H
+#define _MOVIT_DITHER_EFFECT_H 1
// Implements simple rectangular-PDF dither.
//
bool need_texture_update;
};
-#endif // !defined(_DITHER_EFFECT_H)
+#endif // !defined(_MOVIT_DITHER_EFFECT_H)
-#ifndef _EFFECT_H
-#define _EFFECT_H 1
+#ifndef _MOVIT_EFFECT_H
+#define _MOVIT_EFFECT_H 1
// Effect is the base class for every effect. It basically represents a single
// GLSL function, with an optional set of user-settable parameters.
std::map<std::string, Texture1D> params_tex_1d;
};
-#endif // !defined(_EFFECT_H)
+#endif // !defined(_MOVIT_EFFECT_H)
-#ifndef _EFFECT_CHAIN_H
-#define _EFFECT_CHAIN_H 1
+#ifndef _MOVIT_EFFECT_CHAIN_H
+#define _MOVIT_EFFECT_CHAIN_H 1
#include <GL/glew.h>
#include <stdio.h>
bool finalized;
};
-#endif // !defined(_EFFECT_CHAIN_H)
+#endif // !defined(_MOVIT_EFFECT_CHAIN_H)
-#ifndef _EFFECT_UTIL_H
-#define _EFFECT_UTIL_H 1
+#ifndef _MOVIT_EFFECT_UTIL_H
+#define _MOVIT_EFFECT_UTIL_H 1
// Utilities that are often useful for implementing Effect instances,
// but don't need to be included from effect.h.
void set_uniform_vec4_array(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values, size_t num_values);
void set_uniform_mat3(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const Eigen::Matrix3d &matrix);
-#endif // !defined(_EFFECT_UTIL_H)
+#endif // !defined(_MOVIT_EFFECT_UTIL_H)
-#ifndef _FLAT_INPUT_H
-#define _FLAT_INPUT_H 1
+#ifndef _MOVIT_FLAT_INPUT_H
+#define _MOVIT_FLAT_INPUT_H 1
#include <GL/glew.h>
#include <assert.h>
const void *pixel_data;
};
-#endif // !defined(_FLAT_INPUT_H)
+#endif // !defined(_MOVIT_FLAT_INPUT_H)
-#ifndef _GAMMA_COMPRESSION_EFFECT_H
-#define _GAMMA_COMPRESSION_EFFECT_H 1
+#ifndef _MOVIT_GAMMA_COMPRESSION_EFFECT_H
+#define _MOVIT_GAMMA_COMPRESSION_EFFECT_H 1
// An effect to convert linear light to the given gamma curve,
// typically inserted by the framework automatically at the end
float compression_curve[COMPRESSION_CURVE_SIZE];
};
-#endif // !defined(_GAMMA_COMPRESSION_EFFECT_H)
+#endif // !defined(_MOVIT_GAMMA_COMPRESSION_EFFECT_H)
-#ifndef _GAMMA_EXPANSION_EFFECT_H
-#define _GAMMA_EXPANSION_EFFECT_H 1
+#ifndef _MOVIT_GAMMA_EXPANSION_EFFECT_H
+#define _MOVIT_GAMMA_EXPANSION_EFFECT_H 1
// An effect to convert the given gamma curve into linear light,
// typically inserted by the framework automatically at the beginning
float expansion_curve[EXPANSION_CURVE_SIZE];
};
-#endif // !defined(_GAMMA_EXPANSION_EFFECT_H)
+#endif // !defined(_MOVIT_GAMMA_EXPANSION_EFFECT_H)
-#ifndef _GLOW_EFFECT_H
-#define _GLOW_EFFECT_H 1
+#ifndef _MOVIT_GLOW_EFFECT_H
+#define _MOVIT_GLOW_EFFECT_H 1
// Glow: Cut out the highlights of the image (everything above a certain threshold),
// blur them, and overlay them onto the original image.
float cutoff;
};
-#endif // !defined(_GLOW_EFFECT_H)
+#endif // !defined(_MOVIT_GLOW_EFFECT_H)
-#ifndef _IMAGE_FORMAT_H
-#define _IMAGE_FORMAT_H 1
+#ifndef _MOVIT_IMAGE_FORMAT_H
+#define _MOVIT_IMAGE_FORMAT_H 1
enum MovitPixelFormat {
FORMAT_RGB,
GammaCurve gamma_curve;
};
-#endif // !defined(_IMAGE_FORMAT_H)
+#endif // !defined(_MOVIT_IMAGE_FORMAT_H)
-#ifndef _INIT_H
-#define _INIT_H
+#ifndef _MOVIT_INIT_H
+#define _MOVIT_INIT_H
#include <string>
// Whether the GPU in use supports GL_EXT_texture_sRGB.
extern bool movit_srgb_textures_supported;
-#endif // !defined(_INIT_H)
+#endif // !defined(_MOVIT_INIT_H)
-#ifndef _INPUT_H
-#define _INPUT_H 1
+#ifndef _MOVIT_INPUT_H
+#define _MOVIT_INPUT_H 1
#include <assert.h>
virtual GammaCurve get_gamma_curve() const = 0;
};
-#endif // !defined(_INPUT_H)
+#endif // !defined(_MOVIT_INPUT_H)
-#ifndef _LIFT_GAMMA_GAIN_EFFECT_H
-#define _LIFT_GAMMA_GAIN_EFFECT_H 1
+#ifndef _MOVIT_LIFT_GAMMA_GAIN_EFFECT_H
+#define _MOVIT_LIFT_GAMMA_GAIN_EFFECT_H 1
// A simple lift/gamma/gain effect, used for color grading.
//
RGBTriplet lift, gamma, gain;
};
-#endif // !defined(_LIFT_GAMMA_GAIN_EFFECT_H)
+#endif // !defined(_MOVIT_LIFT_GAMMA_GAIN_EFFECT_H)
-#ifndef _MIRROR_EFFECT_H
-#define _MIRROR_EFFECT_H 1
+#ifndef _MOVIT_MIRROR_EFFECT_H
+#define _MOVIT_MIRROR_EFFECT_H 1
// A simple horizontal mirroring.
virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; }
};
-#endif // !defined(_MIRROR_EFFECT_H)
+#endif // !defined(_MOVIT_MIRROR_EFFECT_H)
-#ifndef _MIX_EFFECT_H
-#define _MIX_EFFECT_H 1
+#ifndef _MOVIT_MIX_EFFECT_H
+#define _MOVIT_MIX_EFFECT_H 1
// 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).
float strength_first, strength_second;
};
-#endif // !defined(_MIX_EFFECT_H)
+#endif // !defined(_MOVIT_MIX_EFFECT_H)
-#ifndef _OVERLAY_EFFECT_H
-#define _OVERLAY_EFFECT_H 1
+#ifndef _MOVIT_OVERLAY_EFFECT_H
+#define _MOVIT_OVERLAY_EFFECT_H 1
// Put one image on top of another, using alpha where appropriate.
// (If both images are the same aspect and the top image has alpha=1.0
virtual AlphaHandling alpha_handling() const { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; }
};
-#endif // !defined(_OVERLAY_EFFECT_H)
+#endif // !defined(_MOVIT_OVERLAY_EFFECT_H)
-#ifndef _PADDING_EFFECT_H
-#define _PADDING_EFFECT_H 1
+#ifndef _MOVIT_PADDING_EFFECT_H
+#define _MOVIT_PADDING_EFFECT_H 1
// Takes an image and pads it to fit a larger image, or crops it to fit a smaller one
// (although the latter is implemented slightly less efficiently, and you cannot both
float top, left;
};
-#endif // !defined(_PADDING_EFFECT_H)
+#endif // !defined(_MOVIT_PADDING_EFFECT_H)
-#ifndef _RESAMPLE_EFFECT_H
-#define _RESAMPLE_EFFECT_H 1
+#ifndef _MOVIT_RESAMPLE_EFFECT_H
+#define _MOVIT_RESAMPLE_EFFECT_H 1
// High-quality image resizing, either up or down.
//
float slice_height;
};
-#endif // !defined(_RESAMPLE_EFFECT_H)
+#endif // !defined(_MOVIT_RESAMPLE_EFFECT_H)
-#ifndef _RESIZE_EFFECT_H
-#define _RESIZE_EFFECT_H 1
+#ifndef _MOVIT_RESIZE_EFFECT_H
+#define _MOVIT_RESIZE_EFFECT_H 1
// An effect that simply resizes the picture to a given output size
// (set by the two integer parameters "width" and "height").
int width, height;
};
-#endif // !defined(_RESIZE_EFFECT_H)
+#endif // !defined(_MOVIT_RESIZE_EFFECT_H)
-#ifndef _SANDBOX_EFFECT_H
-#define _SANDBOX_EFFECT_H 1
+#ifndef _MOVIT_SANDBOX_EFFECT_H
+#define _MOVIT_SANDBOX_EFFECT_H 1
// This effect, by default, does nothing.
//
float parm;
};
-#endif // !defined(_SANDBOX_EFFECT_H)
+#endif // !defined(_MOVIT_SANDBOX_EFFECT_H)
-#ifndef _SATURATION_EFFECT_H
-#define _SATURATION_EFFECT_H 1
+#ifndef _MOVIT_SATURATION_EFFECT_H
+#define _MOVIT_SATURATION_EFFECT_H 1
// A simple desaturation/saturation effect. We use the Rec. 709
// definition of luminance (in linear light, of course) and linearly
float saturation;
};
-#endif // !defined(_SATURATION_EFFECT_H)
+#endif // !defined(_MOVIT_SATURATION_EFFECT_H)
-#ifndef _TEST_UTIL_H
-#define _TEST_UTIL_H 1
+#ifndef _MOVIT_TEST_UTIL_H
+#define _MOVIT_TEST_UTIL_H 1
#include <GL/glew.h>
#include "effect_chain.h"
void expect_equal(const float *ref, const float *result, unsigned width, unsigned height, float largest_difference_limit = 1.5 / 255.0, float rms_limit = 0.2 / 255.0);
void expect_equal(const unsigned char *ref, const unsigned char *result, unsigned width, unsigned height, unsigned largest_difference_limit = 1, float rms_limit = 0.2);
-#endif // !defined(_TEST_UTIL_H)
+#endif // !defined(_MOVIT_TEST_UTIL_H)
-#ifndef _UNSHARP_MASK_EFFECT_H
-#define _UNSHARP_MASK_EFFECT_H 1
+#ifndef _MOVIT_UNSHARP_MASK_EFFECT_H
+#define _MOVIT_UNSHARP_MASK_EFFECT_H 1
// Unsharp mask is probably the most popular way of doing sharpening today,
// although it does not always deliver the best results (it is very prone
MixEffect *mix;
};
-#endif // !defined(_UNSHARP_MASK_EFFECT_H)
+#endif // !defined(_MOVIT_UNSHARP_MASK_EFFECT_H)
-#ifndef _UTIL_H
-#define _UTIL_H 1
+#ifndef _MOVIT_UTIL_H
+#define _MOVIT_UTIL_H 1
// Various utilities.
#define CHECK(x) do { bool ok = x; if (!ok) { fprintf(stderr, "%s:%d: %s: Assertion `%s' failed.\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #x); abort(); } } while (false)
#endif
-#endif // !defined(_UTIL_H)
+#endif // !defined(_MOVIT_UTIL_H)
-#ifndef _VIGNETTE_EFFECT_H
-#define _VIGNETTE_EFFECT_H 1
+#ifndef _MOVIT_VIGNETTE_EFFECT_H
+#define _MOVIT_VIGNETTE_EFFECT_H 1
// A circular vignette, falling off as cos² of the distance from the center
// (the classic formula for approximating a real lens).
float radius, inner_radius;
};
-#endif // !defined(_VIGNETTE_EFFECT_H)
+#endif // !defined(_MOVIT_VIGNETTE_EFFECT_H)
-#ifndef _WHITE_BALANCE_EFFECT_H
-#define _WHITE_BALANCE_EFFECT_H 1
+#ifndef _MOVIT_WHITE_BALANCE_EFFECT_H
+#define _MOVIT_WHITE_BALANCE_EFFECT_H 1
// Color correction in LMS color space.
float output_color_temperature;
};
-#endif // !defined(_WHITE_BALANCE_EFFECT_H)
+#endif // !defined(_MOVIT_WHITE_BALANCE_EFFECT_H)
-#ifndef _WIDGETS_H
-#define _WIDGETS_H 1
+#ifndef _MOVIT_WIDGETS_H
+#define _MOVIT_WIDGETS_H 1
// Some simple UI widgets for test use.
void make_hsv_wheel_texture();
void read_colorwheel(float xf, float yf, float *rad, float *theta, float *value);
-#endif // !defined(_WIDGETS_H)
+#endif // !defined(_MOVIT_WIDGETS_H)
-#ifndef _YCBCR_INPUT_H
-#define _YCBCR_INPUT_H 1
+#ifndef _MOVIT_YCBCR_INPUT_H
+#define _MOVIT_YCBCR_INPUT_H 1
// YCbCrInput is for handling planar 8-bit Y'CbCr (also sometimes, usually rather
// imprecisely, called “YUV”), which is typically what you get from a video decoder.
unsigned pitch[3];
};
-#endif // !defined(_YCBCR_INPUT_H)
+#endif // !defined(_MOVIT_YCBCR_INPUT_H)