X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=ycbcr_input.cpp;h=d3d71749a5be4eef4bdbbc1f50768b21e0af7e33;hp=4166da9752d35c78b8061a3ca24dabef198c6daf;hb=92573f7be18bfca16dd3292cbe536d7d7912198f;hpb=358df88f77e4f8ae2ead71a06dc36bf5402d9b5d diff --git a/ycbcr_input.cpp b/ycbcr_input.cpp index 4166da9..d3d7174 100644 --- a/ycbcr_input.cpp +++ b/ycbcr_input.cpp @@ -11,6 +11,9 @@ #include "ycbcr_input.h" using namespace Eigen; +using namespace std; + +namespace movit { namespace { @@ -62,7 +65,6 @@ YCbCrInput::YCbCrInput(const ImageFormat &image_format, unsigned width, unsigned height) : image_format(image_format), ycbcr_format(ycbcr_format), - finalized(false), needs_mipmaps(false), width(width), height(height), @@ -95,12 +97,7 @@ YCbCrInput::~YCbCrInput() } } -void YCbCrInput::finalize() -{ - finalized = true; -} - -void YCbCrInput::set_gl_state(GLuint glsl_program_num, const std::string& prefix, unsigned *sampler_num) +void YCbCrInput::set_gl_state(GLuint glsl_program_num, const string& prefix, unsigned *sampler_num) { for (unsigned channel = 0; channel < 3; ++channel) { glActiveTexture(GL_TEXTURE0 + *sampler_num + channel); @@ -144,7 +141,7 @@ void YCbCrInput::set_gl_state(GLuint glsl_program_num, const std::string& prefix *sampler_num += 3; } -std::string YCbCrInput::output_fragment_shader() +string YCbCrInput::output_fragment_shader() { float coeff[3], offset[3], scale[3]; @@ -212,7 +209,7 @@ std::string YCbCrInput::output_fragment_shader() // Inverting the matrix gives us what we need to go from YCbCr back to RGB. Matrix3d ycbcr_to_rgb = rgb_to_ycbcr.inverse(); - std::string frag_shader; + string frag_shader; frag_shader = output_glsl_mat3("PREFIX(inv_ycbcr_matrix)", ycbcr_to_rgb); @@ -254,3 +251,5 @@ void YCbCrInput::invalidate_pixel_data() } } } + +} // namespace movit