/* * videowarp.h * videowarp * * Created by Sam Hinton on 29/12/05. * Copyright 2006 Sam Hinton. All rights reserved. * */ #define AUTHOR "Sam Hinton" #define VERSION "1.0" #define DATE "January 6, 2006" #define PGM_MAX_LINELEN 255 #define CACHE_TOTAL_FRAMES 256 /* data structures */ typedef struct args_s { char pgmFile[256]; // location of gif containing pplane heights char rootFile[50]; // base filename eg: cube001.tga, 001 is the index, cube is the rootFile unsigned int width; // width of bitmap (not useful - calculated from first bmap) unsigned int height; // height of bitmap (not useful - calculated from first bmap) unsigned int startFile; // first file to process (number) unsigned int endFile; // last file to process (number) unsigned int ppMin; // not used - for scaling unsigned int ppMax; // not used - for scaling BOOL space; // true if filenames contain spaces before index number char outFolder[50]; // [0] should be 0 if not set int pad; // number of pad bytes int transpose; // 1 for horizontal, 2 for vertical transpose int accum; // 1 to turn on pixel accumulator int cacheSize; // size of cache in frames, default is CACHE_TOTAL_FRAMES } args_t; typedef struct cache_s { int framenum; int lastframe; FIBITMAP *frame; } cache_t; /* functions */ void defaultArgs( args_t *args ); int parseArgs( int argc, const char *argv[], args_t *arguments ); void usage( void ); int initcache( args_t *args ); int recache( int frame, args_t *args ); void decache( args_t *args ); void ifname( const char *basename, int index, char *filename, int pad ); int initialise( args_t *args ); void uninitialise( args_t *args ); int loadProjectionPlane( char *pgmfile, int aWidth, int aHeight ); void unloadProjectionPlane( void ); int processImageFiles( char *basename, args_t *args ); //void updatePPlane( args_t *args_t, int frame );