]> git.sesse.net Git - movit/commitdiff
Merge branch 'master' into epoxy
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 17 Mar 2014 00:46:29 +0000 (01:46 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 17 Mar 2014 00:46:29 +0000 (01:46 +0100)
Conflicts:
Makefile.in
movit.pc.in

1  2 
Makefile.in
README
complex_modulate_effect.cpp
configure.ac
movit.pc.in

diff --combined Makefile.in
index ee3626b53eeb12d303e1c0021a2590d5dfd286d2,445f5b7dd96c858f21ca81494d5706cc141fa77d..cd56fa6f643228e7f5d1e84ea13a9bccead28cd9
@@@ -1,5 -1,14 +1,14 @@@
  GTEST_DIR ?= /usr/src/gtest
  
+ # This will be upgraded for each release, although not necessarily for every git commit.
+ # See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+ # for the rules as of how this is changed. This does not really mean that Movit will
+ # strive towards having a rock-stable ABI, but at least the soversion will increase
+ # whenever it breaks, so that you will not have silent failures, and distribution package
+ # management can run its course.
+ movit_ltversion = 1:3:0
+ movit_version = 1.0.3
  prefix = @prefix@
  exec_prefix = @exec_prefix@
  includedir = @includedir@
@@@ -8,17 -17,15 +17,19 @@@ datarootdir = @datarootdir
  datadir = @datadir@
  top_builddir = @top_builddir@
  with_demo_app = @with_demo_app@
 +with_SDL2 = @with_SDL2@
  with_coverage = @with_coverage@
  
  CC=@CC@
  CXX=@CXX@
 -CXXFLAGS=-Wall @CXXFLAGS@ -I$(GTEST_DIR)/include @Eigen3_CFLAGS@ @GLEW_CFLAGS@ @FFTW3_CFLAGS@
 +CXXFLAGS=-Wall @CXXFLAGS@ -I$(GTEST_DIR)/include @SDL2_CFLAGS@ @SDL_CFLAGS@ @Eigen3_CFLAGS@ @epoxy_CFLAGS@ @FFTW3_CFLAGS@
 +ifeq ($(with_SDL2),yes)
 +CXXFLAGS += -DHAVE_SDL2
 +endif
- LDFLAGS=@epoxy_LIBS@ @SDL2_LIBS@ @SDL_LIBS@ @FFTW3_LIBS@ -lpthread
- DEMO_LDLIBS=@SDL2_image_LIBS@ @SDL_image_LIBS@ -lrt -lpthread @libpng_LIBS@ @FFTW3_LIBS@
+ LDFLAGS=@LDFLAGS@
 -LDLIBS=@GLEW_LIBS@ @FFTW3_LIBS@ -lpthread
 -TEST_LDLIBS=@GLEW_LIBS@ @SDL_LIBS@ -lpthread
++LDLIBS=@epoxy_LIBS@ @FFTW3_LIBS@ -lpthread
++TEST_LDLIBS=@epoxy_LIBS@ @SDL_LIBS@ -lpthread
+ DEMO_LDLIBS=@SDL_image_LIBS@ -lrt -lpthread @libpng_LIBS@ @FFTW3_LIBS@
  SHELL=@SHELL@
  LIBTOOL=@LIBTOOL@ --tag=CXX
  RANLIB=ranlib
@@@ -86,7 -93,8 +97,8 @@@ all: dem
  endif
  
  # Google Test and other test library functions.
- TEST_OBJS = gtest-all.o gtest_sdl_main.o test_util.o
+ OWN_TEST_OBJS = gtest_sdl_main.o test_util.o
+ TEST_OBJS = gtest-all.o $(OWN_TEST_OBJS)
  
  gtest-all.o: $(GTEST_DIR)/src/gtest-all.cc
        $(CXX) -MMD $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c $< -o $@
@@@ -95,8 -103,9 +107,9 @@@ gtest_sdl_main.o: gtest_sdl_main.cp
  
  # Unit tests.
  $(TESTS): %: %.o $(TEST_OBJS) libmovit.la
-       $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+       $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $^ $(TEST_LDLIBS)
  
+ OWN_OBJS=$(DEMO_OBJS) $(LIB_OBJS) $(OWN_TEST_OBJS) $(TESTS:=.o)
  OBJS=$(DEMO_OBJS) $(LIB_OBJS) $(TEST_OBJS) $(TESTS:=.o)
  
  # A small demo program.
@@@ -105,7 -114,7 +118,7 @@@ demo: libmovit.la $(DEMO_OBJS
  
  # The library itself.
  libmovit.la: $(LIB_OBJS:.o=.lo)
-       $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -rpath $(libdir) -o $@ $^ $(LDLIBS)
+       $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -rpath $(libdir) -version-info $(movit_ltversion) -o $@ $^ $(LDLIBS)
  
  %.lo: %.cpp
        $(LIBTOOL) --mode=compile $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
@@@ -159,15 -168,30 +172,30 @@@ SHADERS += texture1d.fra
  
  # These purposefully do not exist.
  MISSING_SHADERS = diffusion_effect.frag glow_effect.frag unsharp_mask_effect.frag resize_effect.frag
+ MISSING_SHADERS += fft_convolution_effect.frag fft_input.frag
  SHADERS := $(filter-out $(MISSING_SHADERS),$(SHADERS))
  
  install: libmovit.la
-       $(LIBTOOL) --mode=install $(INSTALL) -m 0644 libmovit.la $(libdir)/
-       $(MKDIR) -p $(includedir)/movit/
-       $(INSTALL) -m 0644 $(HDRS) $(includedir)/movit/
-       $(MKDIR) -p $(datadir)/movit/
-       $(INSTALL) -m 0644 $(SHADERS) $(datadir)/movit/
-       $(MKDIR) -p $(libdir)/pkgconfig/
-       $(INSTALL) -m 644 movit.pc $(libdir)/pkgconfig/
- .PHONY: coverage clean distclean check all install
+       $(MKDIR) -p $(DESTDIR)$(libdir)/
+       $(LIBTOOL) --mode=install $(INSTALL) -m 0644 libmovit.la $(DESTDIR)$(libdir)/
+       $(MKDIR) -p $(DESTDIR)$(includedir)/movit/
+       $(INSTALL) -m 0644 $(HDRS) $(DESTDIR)$(includedir)/movit/
+       $(MKDIR) -p $(DESTDIR)$(datadir)/movit/
+       $(INSTALL) -m 0644 $(SHADERS) $(DESTDIR)$(datadir)/movit/
+       $(MKDIR) -p $(DESTDIR)$(libdir)/pkgconfig/
+       $(INSTALL) -m 644 movit.pc $(DESTDIR)$(libdir)/pkgconfig/
+ DISTDIR=movit-$(movit_version)
+ OTHER_DIST_FILES=add.frag autogen.sh blue.frag configure.ac d65.h identity.frag invert_effect.frag Makefile.in mipmap_needing_effect.frag movit.pc.in README NEWS test_util.h widgets.h
+ dist:
+       $(MKDIR) $(DISTDIR)
+       cp $(OWN_OBJS:.o=.cpp) $(DISTDIR)/
+       cp $(HDRS) $(DISTDIR)/
+       cp $(SHADERS) $(DISTDIR)/
+       cp $(OTHER_DIST_FILES) $(DISTDIR)/
+       ( cd $(DISTDIR) && aclocal && libtoolize --install --copy && autoconf && $(RM) -r autom4te.cache/ )
+       tar zcvvf ../$(DISTDIR).tar.gz $(DISTDIR)
+       $(RM) -r $(DISTDIR)
+ .PHONY: coverage clean distclean check all install dist
diff --combined README
index 0537f687e9b0b07fb340ae554970849ef44fe0eb,e738f7f4207f8aa868bb706addb7259690fc1dfa..b6b2b9d9a946561639d33079a6f54187026aff13
--- 1/README
--- 2/README
+++ b/README
@@@ -9,7 -9,7 +9,7 @@@ Movit is the Modern Video Toolkit, notw
  called “modern” usually isn't, and it's really not a toolkit.
  
  Movit aims to be a _high-quality_, _high-performance_, _open-source_
- library for video filters. It is currently in alpha stage.
+ library for video filters.
  
  
  TL;DR, please give me download link and system demands
@@@ -21,13 -21,12 +21,13 @@@ OK, you nee
    works fine on Linux and OS X, and Movit is not very POSIX-bound.)
  * GNU Make.
  * A GPU capable of running GLSL fragment shaders,
 -  process floating-point textures, and a few other things. If your machine
 -  is less than five years old _and you have the appropriate drivers_,
 -  you're home free.
 +  processing floating-point textures, and a few other things (all are
 +  part of OpenGL 3.0 or newer, although most OpenGL 2.0 cards also
 +  have what's needed through extensions). If your machine is less than five
 +  years old _and you have the appropriate drivers_, you're home free.
  * The [Eigen 3] and [Google Test] libraries. (The library itself
    depends only on the former, but you probably want to run the unit tests.)
 -* The [GLEW] library, for dealing with OpenGL extensions on various
 +* The [epoxy] library, for dealing with OpenGL extensions on various
    platforms.
  
  Movit has been tested with Intel GPUs with the Mesa drivers
@@@ -55,8 -54,7 +55,8 @@@ all research-grade problems, and Movit 
  TL;DR, but I am interested in a programming example instead
  ===========================================================
  
 -Assuming you have an OpenGL context already set up:
 +Assuming you have an OpenGL context already set up (currently you need
 +a classic OpenGL context; a GL 3.2+ core context won't do):
  
  <code>
    using namespace movit;
index 656de3a3728ef0fb6006f5ba31811fac677f0fa5,6af589c2cef23364ccbd160b45f6e4040ec39771..9483f6b1f0f09202b54d6c8d8e54cf48f67e274c
@@@ -1,4 -1,4 +1,4 @@@
 -#include <GL/glew.h>
 +#include <epoxy/gl.h>
  
  #include "complex_modulate_effect.h"
  #include "effect_chain.h"
@@@ -25,7 -25,7 +25,7 @@@ void ComplexModulateEffect::set_gl_stat
  {
        Effect::set_gl_state(glsl_program_num, prefix, sampler_num);
  
-       float num_repeats[] = { num_repeats_x, num_repeats_y };
+       float num_repeats[] = { float(num_repeats_x), float(num_repeats_y) };
        set_uniform_vec2(glsl_program_num, prefix, "num_repeats", num_repeats);
  
        // Set the secondary input to repeat (and nearest while we're at it).
diff --combined configure.ac
index 1007ce28668de7bf4f969e8892a5e9b8f9def7a7,93e168b222a924a90310e4b6b0cd3af44258478e..823740b9e610c39b69a898f68fe248d012ae9d6c
@@@ -1,33 -1,26 +1,35 @@@
  AC_CONFIG_MACRO_DIR([m4])
  AC_INIT(movit, git)
  LT_INIT
+ PKG_PROG_PKG_CONFIG
  
  AC_CONFIG_SRCDIR(effect.cpp)
+ AC_CONFIG_AUX_DIR(.)
  
  AC_PROG_CC
  AC_PROG_CXX
  PKG_CHECK_MODULES([Eigen3], [eigen3])
 -PKG_CHECK_MODULES([GLEW], [glew])
 +PKG_CHECK_MODULES([epoxy], [epoxy])
  PKG_CHECK_MODULES([FFTW3], [fftw3])
  
 -# Needed for unit tests and the demo app.
 -PKG_CHECK_MODULES([SDL], [sdl])
 +# Needed for unit tests and the demo app. We prefer SDL2 if possible,
 +# but can also use classic SDL.
 +with_SDL2=no
 +with_demo_app=yes
 +PKG_CHECK_MODULES([SDL2], [sdl2], [with_SDL2=yes], [
 +  PKG_CHECK_MODULES([SDL], [sdl])
 +])
  
  # These are only needed for the demo app.
 -with_demo_app=yes
 -PKG_CHECK_MODULES([SDL_image], [SDL_image], [], [with_demo_app=no; AC_MSG_WARN([SDL_image not found, demo program will not be built])])
 +if test $with_SDL2 = "yes"; then
 +  PKG_CHECK_MODULES([SDL2_image], [SDL2_image], [], [with_demo_app=no; AC_MSG_WARN([SDL2_image not found, demo program will not be built])])
 +else
 +  PKG_CHECK_MODULES([SDL_image], [SDL_image], [], [with_demo_app=no; AC_MSG_WARN([SDL_image not found, demo program will not be built])])
 +fi
  PKG_CHECK_MODULES([libpng], [libpng12], [], [with_demo_app=no; AC_MSG_WARN([libpng12 not found, demo program will not be built])])
  
  AC_SUBST([with_demo_app])
 +AC_SUBST([with_SDL2])
  
  with_coverage=no
  AC_ARG_ENABLE([coverage], [  --enable-coverage       build with information needed to compute test coverage], [with_coverage=yes])
diff --combined movit.pc.in
index 6069a06e4d72f0b468f97ef979b1f629b4cd8e60,b11ba15277fb135814a91fff23c530ffd85b8e35..20427c6acd4ee123a5832c17546ab4e8900732c6
@@@ -13,5 -13,6 +13,6 @@@ Description: Movit is a library for hig
  Version: git
  Requires:
  Conflicts:
- Libs: -lmovit @epoxy_LIBS@
- Cflags: -I${includedir}/movit @Eigen3_CFLAGS@ @epoxy_CFLAGS@
+ Libs: -lmovit
 -Libs.private: @GLEW_LIBS@ @FFTW3_LIBS@
 -Cflags: -I${includedir}/movit @Eigen3_CFLAGS@ @GLEW_CFLAGS@ @FFTW3_CFLAGS@
++Libs.private: @epoxy_LIBS@ @FFTW3_LIBS@
++Cflags: -I${includedir}/movit @Eigen3_CFLAGS@ @epoxy_CFLAGS@ @FFTW3_CFLAGS@