[xiph-cvs] cvs commit: postfish freq.c main.c mainpanel.c output.c version.h
Monty
xiphmont at xiph.org
Thu Feb 19 22:43:35 PST 2004
xiphmont 04/02/20 01:43:35
Modified: . freq.c main.c mainpanel.c output.c version.h
Log:
Fix a relapping bug when eq is inactive
Revision Changes Path
1.4 +19 -11 postfish/freq.c
Index: freq.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/freq.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- freq.c 20 Feb 2004 00:33:21 -0000 1.3
+++ freq.c 20 Feb 2004 06:43:32 -0000 1.4
@@ -255,18 +255,26 @@
}
}
-static void lap_work(double *work,double *lap,double *out,freq_state *f){
+static void lap_work(double *work,double *lap,double *out,freq_state *f,int bypass){
double *workoff=work+f->blocksize/2;
int i,j;
/* lap and out */
- if(out)
- for(i=0;i<f->blocksize/2;i++)
- out[i]=lap[i]+workoff[i]*f->window[i];
-
- for(i=f->blocksize/2,j=0;i<f->blocksize;i++)
- lap[j++]=workoff[i]*f->window[i];
-
+ if(bypass){
+ if(out)
+ for(i=0;i<f->blocksize/2;i++)
+ out[i]=lap[i]+workoff[i]*f->window[i]*f->window[i];
+
+ for(i=f->blocksize/2,j=0;i<f->blocksize;i++)
+ lap[j++]=workoff[i]*f->window[i]*f->window[i];
+ }else{
+ if(out)
+ for(i=0;i<f->blocksize/2;i++)
+ out[i]=lap[i]+workoff[i]*f->window[i];
+
+ for(i=f->blocksize/2,j=0;i<f->blocksize;i++)
+ lap[j++]=workoff[i]*f->window[i];
+ }
}
@@ -311,7 +319,7 @@
feedback_work(peak,rms,feedback_peak[i],feedback_rms[i]);
drft_backward(&f->fft,work);
}
- lap_work(work,f->lap[i],0,f);
+ lap_work(work,f->lap[i],0,f,bypass);
blocks++;
memset(f->cache[i],0,sizeof(**f->cache)*input_size);
@@ -343,7 +351,7 @@
feedback_work(peak,rms,feedback_peak[i],feedback_rms[i]);
drft_backward(&f->fft,work);
}
- lap_work(work,f->lap[i],f->out.data[i]+j,f);
+ lap_work(work,f->lap[i],f->out.data[i]+j,f,bypass);
blocks++;
}
@@ -358,7 +366,7 @@
feedback_work(peak,rms,feedback_peak[i],feedback_rms[i]);
drft_backward(&f->fft,work);
}
- lap_work(work,f->lap[i],f->out.data[i]+j,f);
+ lap_work(work,f->lap[i],f->out.data[i]+j,f,bypass);
blocks++;
f->cache[i]=in->data[i];
<p><p>1.10 +1 -0 postfish/main.c
Index: main.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/main.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- main.c 17 Feb 2004 11:52:17 -0000 1.9
+++ main.c 20 Feb 2004 06:43:32 -0000 1.10
@@ -44,6 +44,7 @@
/* set up filter chains */
if(declip_load())exit(1);
if(eq_load())exit(1);
+ if(compand_load())exit(1);
/* look at stdout... do we have a file or device? */
if(!isatty(STDOUT_FILENO)){
<p><p>1.34 +4 -0 postfish/mainpanel.c
Index: mainpanel.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/mainpanel.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- mainpanel.c 20 Feb 2004 06:06:00 -0000 1.33
+++ mainpanel.c 20 Feb 2004 06:43:32 -0000 1.34
@@ -84,6 +84,7 @@
multibar_reset(MULTIBAR(p->outbar));
clippanel_reset();
eqpanel_reset();
+ compandpanel_reset();
}
static void action_end(GtkWidget *widget,postfish_mainpanel *p){
@@ -98,6 +99,7 @@
multibar_reset(MULTIBAR(p->outbar));
clippanel_reset();
eqpanel_reset();
+ compandpanel_reset();
}
static void action_bb(GtkWidget *widget,postfish_mainpanel *p){
@@ -890,6 +892,7 @@
pull_input_feedback(NULL,NULL,NULL);
clippanel_feedback(0);
eqpanel_feedback(0);
+ compandpanel_feedback(0);
pull_output_feedback(NULL,NULL);
@@ -935,6 +938,7 @@
clippanel_feedback(1);
eqpanel_feedback(1);
+ compandpanel_feedback(1);
}
}
<p><p>1.15 +4 -0 postfish/output.c
Index: output.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/output.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- output.c 20 Feb 2004 00:33:21 -0000 1.14
+++ output.c 20 Feb 2004 06:43:32 -0000 1.15
@@ -30,6 +30,7 @@
#include "output.h"
#include "declip.h"
#include "eq.h"
+#include "compand.h"
extern int input_size;
sig_atomic_t playback_active=0;
@@ -54,6 +55,7 @@
input_reset(); /* clear any persistent lapping state */
declip_reset(); /* clear any persistent lapping state */
eq_reset(); /* clear any persistent lapping state */
+ compand_reset(); /* clear any persistent lapping state */
output_reset(); /* clear any persistent lapping state */
}
@@ -229,6 +231,8 @@
result|=link->samples;
link=eq_read(link);
result|=link->samples;
+ link=compand_read(link);
+ result|=link->samples;
if(!result)break;
/************/
<p><p>1.37 +2 -2 postfish/version.h
Index: version.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/version.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- version.h 20 Feb 2004 06:06:00 -0000 1.36
+++ version.h 20 Feb 2004 06:43:32 -0000 1.37
@@ -1,2 +1,2 @@
-#define VERSION "$Id: version.h,v 1.36 2004/02/20 06:06:00 xiphmont Exp $ "
-/* DO NOT EDIT: Automated versioning hack [Fri Feb 20 01:04:55 EST 2004] */
+#define VERSION "$Id: version.h,v 1.37 2004/02/20 06:43:32 xiphmont Exp $ "
+/* DO NOT EDIT: Automated versioning hack [Fri Feb 20 01:37:20 EST 2004] */
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list