From 3bfb2b31cf05d183aa3ac44febc2824dcd100463 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 11 Jan 2014 13:43:14 +0100 Subject: [PATCH] Remove now unused FBOInput. --- src/modules/opengl/Makefile | 3 +- src/modules/opengl/fbo_input.cpp | 51 -------------------------- src/modules/opengl/fbo_input.h | 50 ------------------------- src/modules/opengl/mlt_movit_input.cpp | 10 ----- src/modules/opengl/mlt_movit_input.h | 1 - 5 files changed, 1 insertion(+), 114 deletions(-) delete mode 100644 src/modules/opengl/fbo_input.cpp delete mode 100644 src/modules/opengl/fbo_input.h diff --git a/src/modules/opengl/Makefile b/src/modules/opengl/Makefile index 1e61e0ed..d68bccbb 100644 --- a/src/modules/opengl/Makefile +++ b/src/modules/opengl/Makefile @@ -8,8 +8,7 @@ TARGET = ../libmltopengl$(LIBSUF) 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 diff --git a/src/modules/opengl/fbo_input.cpp b/src/modules/opengl/fbo_input.cpp deleted file mode 100644 index fafe3339..00000000 --- a/src/modules/opengl/fbo_input.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * fbo_input.cpp - * Copyright (C) 2013 Dan Dennedy - * - * 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 - -// 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"; -} diff --git a/src/modules/opengl/fbo_input.h b/src/modules/opengl/fbo_input.h deleted file mode 100644 index 0000e03d..00000000 --- a/src/modules/opengl/fbo_input.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * fbo_input.h - * Copyright (C) 2013 Dan Dennedy - * - * 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 - -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 diff --git a/src/modules/opengl/mlt_movit_input.cpp b/src/modules/opengl/mlt_movit_input.cpp index d2755741..4339ac30 100644 --- a/src/modules/opengl/mlt_movit_input.cpp +++ b/src/modules/opengl/mlt_movit_input.cpp @@ -18,7 +18,6 @@ */ #include "mlt_movit_input.h" -#include "fbo_input.h" MltInput::MltInput(unsigned width, unsigned height) : m_width(width) @@ -106,15 +105,6 @@ void MltInput::useYCbCrInput(const ImageFormat& image_format, const YCbCrFormat& } } -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); diff --git a/src/modules/opengl/mlt_movit_input.h b/src/modules/opengl/mlt_movit_input.h index ce9f61ae..bbeac078 100644 --- a/src/modules/opengl/mlt_movit_input.h +++ b/src/modules/opengl/mlt_movit_input.h @@ -47,7 +47,6 @@ public: // 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: -- 2.39.2