X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=colorspace_conversion_effect.cpp;h=2b8a0ca329fd34b3d535fca0cbdfb56584b8ff1d;hp=bb23afc74da6270aa7d738d9005a2aebcf61e6e4;hb=9499a20d6c4c017ecfa96d0d32f5ee971ae93461;hpb=9b95345e8e1dde29991638ed69def0cf187e28de diff --git a/colorspace_conversion_effect.cpp b/colorspace_conversion_effect.cpp index bb23afc..2b8a0ca 100644 --- a/colorspace_conversion_effect.cpp +++ b/colorspace_conversion_effect.cpp @@ -7,6 +7,9 @@ #include "util.h" using namespace Eigen; +using namespace std; + +namespace movit { // Color coordinates from Rec. 709; sRGB uses the same primaries. static const double rec709_x_R = 0.640, rec709_x_G = 0.300, rec709_x_B = 0.150; @@ -30,7 +33,7 @@ ColorspaceConversionEffect::ColorspaceConversionEffect() register_int("destination_space", (int *)&destination_space); } -Matrix3d get_xyz_matrix(Colorspace space) +Matrix3d ColorspaceConversionEffect::get_xyz_matrix(Colorspace space) { if (space == COLORSPACE_XYZ) { return Matrix3d::Identity(); @@ -126,7 +129,7 @@ Matrix3d get_xyz_matrix(Colorspace space) return m; } -std::string ColorspaceConversionEffect::output_fragment_shader() +string ColorspaceConversionEffect::output_fragment_shader() { // Create a matrix to convert from source space -> XYZ, // another matrix to convert from XYZ -> destination space, @@ -141,3 +144,5 @@ std::string ColorspaceConversionEffect::output_fragment_shader() return output_glsl_mat3("PREFIX(conversion_matrix)", m) + read_file("colorspace_conversion_effect.frag"); } + +} // namespace movit