[PD-cvs] pd/src d_fft.c,1.1.1.1.16.6,1.1.1.1.16.7

Tim Blechmann timblech at users.sourceforge.net
Sat Oct 9 20:13:10 CEST 2004


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24710

Modified Files:
      Tag: devel_0_37
	d_fft.c 
Log Message:
further speedup

Index: d_fft.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_fft.c,v
retrieving revision 1.1.1.1.16.6
retrieving revision 1.1.1.1.16.7
diff -C2 -d -r1.1.1.1.16.6 -r1.1.1.1.16.7
*** d_fft.c	9 Oct 2004 16:37:36 -0000	1.1.1.1.16.6
--- d_fft.c	9 Oct 2004 18:13:07 -0000	1.1.1.1.16.7
***************
*** 282,295 ****
  }
  
- static void *sigifftw_new(void)
- {
-     t_sigfftw *x = (t_sigfftw *)pd_new(sigifftw_class);
-     outlet_new(&x->x_obj, gensym("signal"));
-     outlet_new(&x->x_obj, gensym("signal"));
-     inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
-     x->x_f = 0;
-     return (x);
- }
- 
  static void sigfftw_free(t_sigfftw * x)
  {
--- 282,285 ----
***************
*** 297,319 ****
  }
  
- static void sigifftw_free(t_sigfftw * x)
- {
-     fftwf_destroy_plan(x->plan);
- }
- 
  static t_int *sigfftw_perform(t_int *w)
  {
!     t_sigfftw * x =(t_sigfftw *) w[1];
!     
!     fftwf_execute(x->plan);
! 
!     return (w+2);
! }
! 
! static t_int *sigifftw_perform(t_int *w)
! {
!     t_sigfftw * x =(t_sigfftw *) w[1];
! 
!     fftwf_execute(x->plan);
  
      return (w+2);
--- 287,293 ----
  }
  
  static t_int *sigfftw_perform(t_int *w)
  {
!     fftwf_execute(*(fftwf_plan *)w[1]);
  
      return (w+2);
***************
*** 333,337 ****
      x->plan = fftwf_plan_guru_split_dft(1, &(x->dim), 0, NULL, in1, 
  					in2, out1, out2, FFTW_MEASURE);
!     dsp_add(sigfftw_perform, 1, x);
  }
  
--- 307,311 ----
      x->plan = fftwf_plan_guru_split_dft(1, &(x->dim), 0, NULL, in1, 
  					in2, out1, out2, FFTW_MEASURE);
!     dsp_add(sigfftw_perform, 1, &x->plan);
  }
  
***************
*** 349,353 ****
      x->plan = fftwf_plan_guru_split_dft(1, &(x->dim), 0, NULL, in2, 
  					in1, out2, out1, FFTW_MEASURE);
!     dsp_add(sigfftw_perform, 1, x);
  }
  
--- 323,327 ----
      x->plan = fftwf_plan_guru_split_dft(1, &(x->dim), 0, NULL, in2, 
  					in1, out2, out1, FFTW_MEASURE);
!     dsp_add(sigfftw_perform, 1, &x->plan);
  }
  
***************
*** 361,366 ****
  		    gensym("dsp"), 0);
  
!     sigifftw_class = class_new(gensym("ifft~"), sigifftw_new, 
! 			       (t_method) sigifftw_free, 
  			       sizeof(t_sigfftw), 0, 0);
      CLASS_MAINSIGNALIN(sigifftw_class, t_sigfftw, x_f);
--- 335,340 ----
  		    gensym("dsp"), 0);
  
!     sigifftw_class = class_new(gensym("ifft~"), sigfftw_new, 
! 			       (t_method) sigfftw_free, 
  			       sizeof(t_sigfftw), 0, 0);
      CLASS_MAINSIGNALIN(sigifftw_class, t_sigfftw, x_f);
***************
*** 414,420 ****
  static t_int *sigrfftw_perform(t_int *w)
  {
!     t_sigrfftw * x =(t_sigrfftw *) w[1];
!     
!     fftwf_execute(x->plan);
      sigrfftw_invert((t_sample*)w[2],(t_int)w[3]);
  
--- 388,392 ----
  static t_int *sigrfftw_perform(t_int *w)
  {
!     fftwf_execute(*(fftwf_plan*)w[1]);
      sigrfftw_invert((t_sample*)w[2],(t_int)w[3]);
  
***************
*** 442,446 ****
  						in, out1, out2,
  						FFTW_MEASURE);
! 	dsp_add(sigrfftw_perform,3,x,out2+1,n2-1);
      }
  
--- 414,418 ----
  						in, out1, out2,
  						FFTW_MEASURE);
! 	dsp_add(sigrfftw_perform,3,&x->plan,out2+1,n2-1);
      }
  
***************
*** 490,497 ****
  static t_int *sigrifftw_perform(t_int *w)
  {
-     t_sigrifftw * x =(t_sigrifftw *) w[1];
-     
      sigrfftw_invert((t_sample *)w[2],w[3]); 
!     fftwf_execute(x->plan);
      
      return (w+4);
--- 462,467 ----
  static t_int *sigrifftw_perform(t_int *w)
  {
      sigrfftw_invert((t_sample *)w[2],w[3]); 
!     fftwf_execute(*(fftwf_plan*)w[1]);
      
      return (w+4);
***************
*** 513,517 ****
      else    
      {
- 	//prepare the fft
  	x->dim.n=n;
  	x->dim.is=1;
--- 483,486 ----
***************
*** 520,524 ****
  						in1, in2, out,
  						FFTW_MEASURE);
! 	dsp_add(sigrifftw_perform,3,x,in2,n2);
      }
  }
--- 489,493 ----
  						in1, in2, out,
  						FFTW_MEASURE);
! 	dsp_add(sigrifftw_perform,3,&x->plan,in2,n2);
      }
  }





More information about the Pd-cvs mailing list