1 /* 2 * motiondetect_opt.h 3 * 4 * Copyright (C) Georg Martius - February 2011 5 * georg dot martius at web dot de 6 * Copyright (C) Alexey Osipov - Jule 2011 7 * simba at lerlan dot ru 8 * speed optimizations (threshold, spiral, SSE, asm) 9 * 10 * This file is part of vid.stab video stabilization library 11 * 12 * vid.stab is free software; you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License, 14 * as published by the Free Software Foundation; either version 2, or 15 * (at your option) any later version. 16 * 17 * vid.stab is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with GNU Make; see the file COPYING. If not, write to 24 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 25 * 26 */ 27 28 #ifndef MOTIONDETECT_OPT_H 29 #define MOTIONDETECT_OPT_H 30 31 #include "motiondetect.h" 32 33 #ifdef USE_SSE2_ASM //enable SSE2 inline asm code 34 #define compareSubImg compareSubImg_thr_sse2_asm 35 #elif defined(USE_SSE2) //enable SSE2 code 36 #define compareSubImg compareSubImg_thr_sse2 37 #elif defined(USE_ORC) 38 #define compareSubImg compareSubImg_thr_orc 39 #else 40 #define compareSubImg compareSubImg_thr 41 #endif 42 43 #ifdef USE_SSE2 44 double contrastSubImg1_SSE(unsigned char* const I, const Field* field, 45 int width, int height); 46 #endif 47 48 #ifdef USE_ORC 49 double contrastSubImg_variance_orc(unsigned char* const I, const Field* field, 50 int width, int height); 51 double contrastSubImg_variance_C(unsigned char* const I, const Field* field, 52 int width, int height); 53 54 #endif 55 56 #ifdef USE_ORC 57 unsigned int compareSubImg_orc(unsigned char* const I1, unsigned char* const I2, 58 const Field* field, int width1, int width2, int height, 59 int bytesPerPixel, int d_x, int d_y, 60 unsigned int threshold); 61 62 63 unsigned int compareSubImg_thr_orc(unsigned char* const I1, unsigned char* const I2, 64 const Field* field, int width1, int width2, int height, 65 int bytesPerPixel, int d_x, int d_y, 66 unsigned int threshold); 67 #endif 68 69 #ifdef USE_SSE2 70 unsigned int compareSubImg_thr_sse2(unsigned char* const I1, unsigned char* const I2, 71 const Field* field, int width1, int width2, int height, 72 int bytesPerPixel, int d_x, int d_y, 73 unsigned int threshold); 74 #endif 75 76 #ifdef USE_SSE2_ASM 77 unsigned int compareSubImg_thr_sse2_asm(unsigned char* const I1, unsigned char* const I2, 78 const Field* field, int width1, int width2, 79 int height, int bytesPerPixel, 80 int d_x, int d_y, unsigned int threshold); 81 #endif 82 83 #endif /* MOTIONDETECT_OPT_H */ 84 85 /* 86 * Local variables: 87 * c-file-style: "stroustrup" 88 * c-file-offsets: ((case-label . *) (statement-case-intro . *)) 89 * indent-tabs-mode: nil 90 * tab-width: 2 91 * c-basic-offset: 2 t 92 93 * End: 94 * 95 * vim: expandtab shiftwidth=2: 96 */ 97