enable FexTracker on unix, and fix a bulkload of warnings in it

Originally committed to SVN as r916.
This commit is contained in:
David Lamparter 2007-01-30 23:09:33 +00:00
parent 9434459821
commit 66b91c41c3
14 changed files with 53 additions and 13 deletions

View file

@ -89,4 +89,5 @@ void BaseFloatImage_LanczosRescale( float* in, int inSx, int inSy, float* out, i
#undef FilterWidth #undef FilterWidth
#undef FilterWeight #undef FilterWeight
} }

View file

@ -46,4 +46,5 @@
#undef PixelMin #undef PixelMin
#undef PixelMax #undef PixelMax
#undef ImagePlanes #undef ImagePlanes
} }

View file

@ -38,4 +38,5 @@
cc->Weight[n-cc->xMin] += weight; cc->Weight[n-cc->xMin] += weight;
} }
} }
} }

View file

@ -53,4 +53,5 @@
for( int x=0;x<ImageOutSX;++x ) for( int x=0;x<ImageOutSX;++x )
delete []Contrib[x].Weight; delete []Contrib[x].Weight;
delete []Contrib; delete []Contrib;
} }

View file

@ -38,4 +38,5 @@ public:
struct FexFilterContribution { struct FexFilterContribution {
int xMin, xMax; int xMin, xMax;
double* Weight; double* Weight;
}; };

View file

@ -24,7 +24,7 @@ void BaseFloatImage_LanczosRescale( float* in, int inSx, int inSy, float* out, i
//turn off image debugging //turn off image debugging
#ifndef imdebug #ifndef imdebug
#define imdebug // #define imdebug(a,b,c,d) //
#endif #endif

View file

@ -7,10 +7,13 @@
#include "StdAfx.h" #include "StdAfx.h"
#include "stdio.h" #include "stdio.h"
#ifdef WIN32
#include <conio.h> #include <conio.h>
#endif
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <wchar.h>
//#include <mmsystem.h> //#include <mmsystem.h>
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
@ -32,11 +35,26 @@ FEXTRACKER_API FexMovement* CreateMovement()
return new FexMovement(); return new FexMovement();
} }
#ifndef WIN32
FILE *_wfopen(const wchar_t *wname, const wchar_t *wmode)
{
size_t namelen = wcstombs(NULL, wname, 0) + 1;
char name[namelen];
wcstombs(name, wname, namelen);
size_t modelen = wcstombs(NULL, wmode, 0) + 1;
char mode[modelen];
wcstombs(mode, wmode, modelen);
return fopen(name, mode);
}
#endif
FEXTRACKER_API void LoadMovement( FexMovement* me, const wchar_t* Filename ) FEXTRACKER_API void LoadMovement( FexMovement* me, const wchar_t* Filename )
{ {
me->Frames.nVal = 0; me->Frames.nVal = 0;
me->FileName = new WCHAR[ wcslen(Filename)+1 ]; me->FileName = new wchar_t[ wcslen(Filename)+1 ];
wcscpy( me->FileName, Filename ); wcscpy( me->FileName, Filename );
FILE *fi = _wfopen( Filename, L"rt" ); FILE *fi = _wfopen( Filename, L"rt" );

View file

@ -26,7 +26,7 @@ class FexMovement
public: public:
FexMovement(); FexMovement();
~FexMovement(); ~FexMovement();
WCHAR* FileName; wchar_t* FileName;
tenlist<FexMovementFrame> Frames; tenlist<FexMovementFrame> Frames;
}; };

View file

@ -0,0 +1,12 @@
SUFFIXES = .c .cpp
noinst_LIBRARIES = libfex.a
AM_CPPFLAGS = -DAEGISUB
libfex_a_SOURCES = \
FexGenericFilter.cpp \
FexGenericFilter_BaseFloatImage.cpp \
FexImgPyramid.cpp \
FexMovement.cpp \
FexTracker.cpp \
FexTrackerMovement.cpp \
FexTrackingFeature.cpp

View file

@ -17,7 +17,9 @@
// Insert your headers here // Insert your headers here
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#ifdef WIN32
#include <windows.h> #include <windows.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#include <memory.h> #include <memory.h>
@ -31,7 +33,7 @@
#ifdef IMAGE_DEBUGGER #ifdef IMAGE_DEBUGGER
#include "ext/imdebug.h" #include "ext/imdebug.h"
#else #else
#define imdebug // #define imdebug(a,b,c,d) //
#endif #endif
// TODO: reference additional headers your program requires here // TODO: reference additional headers your program requires here

View file

@ -1,5 +1,5 @@
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
SUBDIRS = ac aegisub locale SUBDIRS = ac FexTrackerSource aegisub locale
lua51/src/liblua.a: lua51/src/liblua.a:
make -C lua51/src CC=$(CXX) a make -C lua51/src CC=$(CXX) a

View file

@ -10,8 +10,8 @@ DARCSREV := $(strip $(shell head -n 1 ../_darcs/inventory 2>/dev/null))
REVISION := $(if $(SVNREV),-DBUILD_SVN_REVISION=$(SVNREV)) $(if $(DARCSREV),-DBUILD_DARCS) REVISION := $(if $(SVNREV),-DBUILD_SVN_REVISION=$(SVNREV)) $(if $(DARCSREV),-DBUILD_DARCS)
BUILDINFO := -DBUILD_CREDIT="\"$(shell whoami)\"" $(REVISION) BUILDINFO := -DBUILD_CREDIT="\"$(shell whoami)\"" $(REVISION)
AM_CPPFLAGS = -Iposix -include posix/defines.h $(BUILDINFO) AM_CPPFLAGS = -DAEGISUB -Iposix -include posix/defines.h $(BUILDINFO)
LDADD = posix/libposix.a ../lua51/src/liblua.a -lGL -lGLU LDADD = posix/libposix.a ../lua51/src/liblua.a ../FexTrackerSource/libfex.a -lGL -lGLU
# auto4_ruby_assfile.cpp # auto4_ruby_assfile.cpp
# auto4_ruby.cpp # auto4_ruby.cpp
@ -55,6 +55,7 @@ aegisub_SOURCES = \
dialog_colorpicker.cpp \ dialog_colorpicker.cpp \
dialog_detached_video.cpp \ dialog_detached_video.cpp \
dialog_export.cpp \ dialog_export.cpp \
dialog_fextracker.cpp \
dialog_fonts_collector.cpp \ dialog_fonts_collector.cpp \
dialog_hotkeys.cpp \ dialog_hotkeys.cpp \
dialog_jumpto.cpp \ dialog_jumpto.cpp \
@ -123,6 +124,7 @@ aegisub_SOURCES = \
video_box.cpp \ video_box.cpp \
video_context.cpp \ video_context.cpp \
video_display.cpp \ video_display.cpp \
video_display_fextracker.cpp \
video_display_visual.cpp \ video_display_visual.cpp \
video_frame.cpp \ video_frame.cpp \
video_provider.cpp \ video_provider.cpp \

View file

@ -43,7 +43,7 @@ typedef uint64_t __uint64;
#define USE_LAVC 0 #define USE_LAVC 0
#endif #endif
#define USE_PRS 0 #define USE_PRS 0
#define USE_FEXTRACKER 0 #define USE_FEXTRACKER 1
#ifndef USE_LIBSSA #ifndef USE_LIBSSA
#define USE_LIBSSA 0 #define USE_LIBSSA 0
#endif #endif

View file

@ -188,6 +188,7 @@ AC_OUTPUT([
Makefile Makefile
ac/Makefile ac/Makefile
locale/Makefile locale/Makefile
FexTrackerSource/Makefile
aegisub/Makefile aegisub/Makefile
aegisub/posix/Makefile aegisub/posix/Makefile
aegisub/bitmaps/Makefile aegisub/bitmaps/Makefile