/* * * sushivision copyright (C) 2006-2007 Monty * * sushivision 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, or (at your option) * any later version. * * sushivision 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 sushivision; see the file COPYING. If not, write to the * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * * */ #include #include #include "sushivision.h" sushiv_instance_t *s; #define todB(x) ((x)==0?-400.f:log((x)*(x))*4.34294480f) /* time, blocksz, amp_0, amp_del, freq_0, phase_0, phase_del */ int funcsize=64; double function[64]; static void fourier_objective(double *d, double *ret){ int i; double re_obj=0; double im_obj=0; double obj; for(i=0;i