OBJS = factory.o
-CPPOBJS = fbo_input.o
-CPPOBJS += filter_glsl_manager.o
+CPPOBJS = filter_glsl_manager.o
CPPOBJS += filter_movit_blur.o
CPPOBJS += filter_movit_convert.o
CPPOBJS += filter_movit_crop.o
+++ /dev/null
-/*
- * fbo_input.cpp
- * Copyright (C) 2013 Dan Dennedy <dan@dennedy.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include "fbo_input.h"
-#include <movit/util.h>
-
-// comes from unexported effect_util.h
-extern void set_uniform_int(GLuint glsl_program_num, const std::string &prefix, const std::string &key, int value);
-
-FBOInput::FBOInput(unsigned width, unsigned height)
- : texture_num(0)
- , needs_mipmaps(false)
- , width(width)
- , height(height)
-{
- register_int("needs_mipmaps", &needs_mipmaps);
-}
-
-void FBOInput::set_gl_state(GLuint glsl_program_num, const std::string& prefix, unsigned *sampler_num)
-{
- glActiveTexture(GL_TEXTURE0 + *sampler_num);
- check_error();
- glBindTexture(GL_TEXTURE_2D, texture_num);
- check_error();
-
- // Bind it to a sampler.
- set_uniform_int(glsl_program_num, prefix, "tex", *sampler_num);
- ++*sampler_num;
-}
-
-std::string FBOInput::output_fragment_shader()
-{
- return read_file("flat_input.frag");
-// return "uniform sampler2D PREFIX(tex); vec4 FUNCNAME(vec2 tc) { return texture2D(PREFIX(tex), tc); }\n";
-}
+++ /dev/null
-/*
- * fbo_input.h
- * Copyright (C) 2013 Dan Dennedy <dan@dennedy.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef FBO_INPUT_H
-#define FBO_INPUT_H
-
-#include <movit/input.h>
-
-class FBOInput : public Input
-{
-public:
- FBOInput(unsigned width, unsigned height);
-
- virtual std::string effect_type_id() const { return "FBOInput"; }
- void finalize() {}
- bool can_output_linear_gamma() const { return false; }
- AlphaHandling alpha_handling() const { return OUTPUT_POSTMULTIPLIED_ALPHA; }
- std::string output_fragment_shader();
- void set_gl_state(GLuint glsl_program_num, const std::string& prefix, unsigned *sampler_num);
- unsigned get_width() const { return width; }
- unsigned get_height() const { return height; }
- Colorspace get_color_space() const { return COLORSPACE_sRGB; }
- GammaCurve get_gamma_curve() const { return GAMMA_sRGB; }
- void set_texture(GLuint texture) {
- texture_num = texture;
- }
-
-private:
- GLuint texture_num;
- int needs_mipmaps;
- unsigned width, height;
-};
-
-#endif // FBO_INPUT_H
*/
#include "mlt_movit_input.h"
-#include "fbo_input.h"
MltInput::MltInput(unsigned width, unsigned height)
: m_width(width)
}
}
-void MltInput::useFBOInput(GLuint texture)
-{
- if (!input) {
- FBOInput* fboInput = new FBOInput(m_width, m_height);
- input = fboInput;
- fboInput->set_texture(texture);
- }
-}
-
void MltInput::set_pixel_data(const unsigned char* data)
{
assert(input);
// Custom methods
void useFlatInput(MovitPixelFormat pix_fmt, unsigned width, unsigned height);
void useYCbCrInput(const ImageFormat& image_format, const YCbCrFormat& ycbcr_format, unsigned width, unsigned height);
- void useFBOInput(GLuint texture);
void set_pixel_data(const unsigned char* data);
private: