[xiph-cvs] cvs commit: postfish declip.c input.c version.h
Monty
xiphmont at xiph.org
Thu Feb 19 00:32:30 PST 2004
xiphmont 04/02/19 03:32:29
Modified: . declip.c input.c version.h
Log:
Although the code was accounting for this, the accounting was
insufficient; round off error meant that a declip operation with the
trigger set at 1.0 would not trigger properly on positive overrange.
While I was at it, I fixed the positive trigger offset to properly
correct for input word size and not blindly assume 16 bits/
Monty
Revision Changes Path
1.7 +2 -1 postfish/declip.c
Index: declip.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/declip.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- declip.c 16 Feb 2004 05:00:54 -0000 1.6
+++ declip.c 19 Feb 2004 08:32:28 -0000 1.7
@@ -31,6 +31,7 @@
extern int input_rate;
extern int input_ch;
extern int input_size;
+extern int inbytes;
/* accessed only in playback thread/setup */
static drft_lookup fft;
@@ -133,7 +134,7 @@
int declip_settrigger(double trigger,int ch){
if(ch<0 || ch>=input_ch)return -1;
pthread_mutex_lock(&master_mutex);
- chtrigger[ch]=trigger-(1./32768);
+ chtrigger[ch]=trigger-(1./(1<<(inbytes*8-1)))-(1./(1<<(inbytes*8-2)));
pthread_mutex_unlock(&master_mutex);
return 0;
}
<p><p>1.15 +1 -1 postfish/input.c
Index: input.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/input.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- input.c 13 Feb 2004 18:11:35 -0000 1.14
+++ input.c 19 Feb 2004 08:32:28 -0000 1.15
@@ -34,7 +34,7 @@
int input_rate;
int input_ch;
-static int inbytes;
+int inbytes;
static int signp;
int input_size;
<p><p>1.33 +2 -2 postfish/version.h
Index: version.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/version.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- version.h 19 Feb 2004 00:49:37 -0000 1.32
+++ version.h 19 Feb 2004 08:32:28 -0000 1.33
@@ -1,2 +1,2 @@
-#define VERSION "$Id: version.h,v 1.32 2004/02/19 00:49:37 xiphmont Exp $ "
-/* DO NOT EDIT: Automated versioning hack [Wed Feb 18 19:47:18 EST 2004] */
+#define VERSION "$Id: version.h,v 1.33 2004/02/19 08:32:28 xiphmont Exp $ "
+/* DO NOT EDIT: Automated versioning hack [Thu Feb 19 02:48:46 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