Displaying 8 results from an estimated 8 matches for "filt_len".
Did you mean:
file_len
2008 May 03
2
Resampler (no api)
...8192
+#else
+#define FIXED_STACK_ALLOC 1024
+#endif
+
typedef int (*resampler_basic_func)(SpeexResamplerState *, spx_uint32_t , const spx_word16_t *, spx_uint32_t *, spx_word16_t *, spx_uint32_t *);
struct SpeexResamplerState_ {
@@ -109,6 +117,7 @@
spx_uint32_t nb_channels;
spx_uint32_t filt_len;
spx_uint32_t mem_alloc_size;
+ spx_uint32_t buffer_size;
int int_advance;
int frac_advance;
float cutoff;
@@ -317,47 +326,47 @@
static int resampler_basic_direct_single(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t...
2008 May 03
0
Resampler, memory only variant
...8192
+#else
+#define FIXED_STACK_ALLOC 1024
+#endif
+
typedef int (*resampler_basic_func)(SpeexResamplerState *, spx_uint32_t , const spx_word16_t *, spx_uint32_t *, spx_word16_t *, spx_uint32_t *);
struct SpeexResamplerState_ {
@@ -109,6 +117,7 @@
spx_uint32_t nb_channels;
spx_uint32_t filt_len;
spx_uint32_t mem_alloc_size;
+ spx_uint32_t buffer_size;
int int_advance;
int frac_advance;
float cutoff;
@@ -317,47 +326,47 @@
static int resampler_basic_direct_single(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t...
2013 Dec 20
2
Scaling fix for float input
...diff -NaurbB a/libspeex/resample.c b/libspeex/resample.c
--- a/libspeex/resample.c 2013-12-20 17:40:27.326576921 +0500
+++ b/libspeex/resample.c 2013-12-20 17:40:16.918577087 +0500
@@ -915,7 +915,7 @@
if (in) {
for(j=0;j<ichunk;++j)
#ifdef FIXED_POINT
- x[j+st->filt_len-1]=WORD2INT(in[j*istride_save]);
+ x[j+st->filt_len-1]=WORD2INT(32768.*in[j*istride_save]);
#else
x[j+st->filt_len-1]=in[j*istride_save];
#endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attac...
2019 Jun 14
0
resample of libopusenc-0.2.1 outputs all zeros if define FIXED_POINT
...ndef M_PI
-#define M_PI 3.14159265358979323846
+#define M_PI 3.14159265358979323846f
#endif
#define IMAX(a,b) ((a) > (b) ? (a) : (b))
@@ -1000,7 +1000,8 @@ EXPORT int speex_resampler_process_int(S
if (in) {
for(j=0;j<ichunk;++j)
#ifdef FIXED_POINT
- x[j+st->filt_len-1]=WORD2INT(in[j*istride_save]);
+ /* [-1.0, 1.0] ==> [-32768, 32767] */
+ x[j+st->filt_len-1]=WORD2INT(32768 * in[j*istride_save]);
#else
x[j+st->filt_len-1]=in[j*istride_save];
#endif
@@ -1017,7 +1018,8 @@ EXPORT int speex_resampler_process_int(S...
2010 Nov 10
0
bug fix for speex_resampler_reset_mem?
...y(state);
When I run it this way, my two output waveforms are not identical on a
binary basis.
Changing speex_resampler_reset_mem() as follows seems to fix the problem:
EXPORT int speex_resampler_reset_mem(SpeexResamplerState *st)
{
spx_uint32_t i;
for (i=0;i<st->nb_channels*(st->filt_len-1);i++)
st->mem[i] = 0;
// added bugfix below:
st->started = 0;
for (i=0;i<st->nb_channels;i++)
{
st->last_sample[i] = 0;
st->magic_samples[i] = 0;
st->samp_frac_num[i] = 0;
}
return RESAMPLER_ERR_SUCCESS;
}
Note that I have to call...
2008 Apr 04
1
Resampler experimental speedups
...re
again hurt by the loop doing too much work. Note though that GCC
currently does not vectorize the inner loop for interpolate as it's
unable to recognize that the operations are applied equally to all
elements in accum[].
On the downside, this will allocate, on the stack, in_len + st->filt_len
elements to hold a temporary array for the input. In my testcase, this
means 1472 bytes. If you use larger frames, this will scale accordingly.
Unless anyone can spot any glaring mistakes I've made, the plan is to
fix the double versions, correct the int->float (and vice versa)
conversi...
2008 Mar 29
0
GCC/ELF Visibility patch
...*stride)
+EXPORT void speex_resampler_get_output_stride(SpeexResamplerState *st, spx_uint32_t *stride)
{
*stride = st->out_stride;
}
-int speex_resampler_get_input_latency(SpeexResamplerState *st)
+EXPORT int speex_resampler_get_input_latency(SpeexResamplerState *st)
{
return st->filt_len / 2;
}
-int speex_resampler_get_output_latency(SpeexResamplerState *st)
+EXPORT int speex_resampler_get_output_latency(SpeexResamplerState *st)
{
return ((st->filt_len / 2) * st->den_rate + (st->num_rate >> 1)) / st->num_rate;
}
-int speex_resampler_skip_zeros(SpeexResam...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...*stride)
+EXPORT void speex_resampler_get_output_stride(SpeexResamplerState *st, spx_uint32_t *stride)
{
*stride = st->out_stride;
}
-int speex_resampler_get_input_latency(SpeexResamplerState *st)
+EXPORT int speex_resampler_get_input_latency(SpeexResamplerState *st)
{
return st->filt_len / 2;
}
-int speex_resampler_get_output_latency(SpeexResamplerState *st)
+EXPORT int speex_resampler_get_output_latency(SpeexResamplerState *st)
{
return ((st->filt_len / 2) * st->den_rate + (st->num_rate >> 1)) / st->num_rate;
}
-int speex_resampler_skip_zeros(SpeexResam...