search for: nb_channels

Displaying 20 results from an estimated 32 matches for "nb_channels".

2009 Aug 05
0
Bug in libspeexdsp resampler
...t *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) { spx_uint32_t i; int istride_save, ostride_save; spx_uint32_t bak_in_len = *in_len; spx_uint32_t bak_out_len = *out_len; istride_save = st->in_stride; ostride_save = st->out_stride; st->in_stride = st->out_stride = st->nb_channels; for (i=0;i<st->nb_channels;i++) { *in_len = bak_in_len; *out_len = bak_out_len; if (in != NULL) speex_resampler_process_float(st, i, in+i, in_len, out+i, out_len); else speex_resampler_process_float(st, i, NULL, in_len, out+i, out_len); } st->in_stride = istride_save; st->out_stride =...
2012 May 02
1
[PATCH] resample: Fix input indexing bug from interleaved functions
...{ spx_uint32_t i; int istride_save, ostride_save; - spx_uint32_t bak_len = *out_len; + spx_uint32_t bak_out_len = *out_len; + spx_uint32_t bak_in_len = *in_len; istride_save = st->in_stride; ostride_save = st->out_stride; st->in_stride = st->out_stride = st->nb_channels; for (i=0;i<st->nb_channels;i++) { - *out_len = bak_len; + *out_len = bak_out_len; + *in_len = bak_in_len; if (in != NULL) speex_resampler_process_float(st, i, in+i, in_len, out+i, out_len); else @@ -991,13 +993,15 @@ EXPORT int speex_resampler_p...
2008 May 03
2
Resampler (no api)
...YS +#define FIXED_STACK_ALLOC 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...
2008 May 03
0
Resampler, memory only variant
...YS +#define FIXED_STACK_ALLOC 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...
2006 Apr 19
1
HW-Speex: Fileformat and encoding process
...mat of the frames. What is the reason that the first frame after the header is larger than the other frames? Thanks ST speex-1.1.12/src/speexenc -n --bitrate 12000 female.wav female_nb_12.spx readspx female_nb_12.spx |head -20 speex header Version:1.1.12 rate:8000 mode:0 mode_bitstream_version:4 nb_channels:1 bitrate:-1 frame_size:160 vbr:0 frames_per_packet:1 extra_headers:0 Framesize:33 25 0 0 0 69 110 99 111 speex-1.1.12/src/speexenc -n --bitrate 8000 female.wav female_nb_8.spx readspx female_nb_8.spx |head -20 speex header Version:1.1.12 rate:8000 mode:0 mode_bitstream_version:4 nb_channels:1 bit...
2018 Aug 30
0
[PATCH] Apply equal bit allocation to ambisonic channels
...nal_rate; - opus_int32 leftover_bits; - - /* Each nondirectional channel gets (rate_ratio_num / rate_ratio_den) times - * as many bits as all other ambisonics channels. - */ - const int rate_ratio_num = 4; - const int rate_ratio_den = 3; + opus_int32 per_stream_rate; + const int nb_channels = st->layout.nb_streams + st->layout.nb_coupled_streams; - /* The omnidirectional ambisonics and non-diegetic stereo channels */ - const int nb_nondirectional_channels = st->layout.nb_coupled_streams * 2 + 1; - /* The remaining ambisonics channels */ - const int nb_directional_chan...
2004 Aug 06
2
Multichannel Speex
Hello! The question is: "Does Speex support multiple channels?" Speex is reported to encode only mono and stereo signals. But I found 'nb_channel' defined in <speex_header.h> among the Public Attributes. Does this mean that it is also possible to store more than two channels in one single speex-file? Maybe it will be possible in the next future...? TIA -- Mch --- >8
2009 Mar 17
2
Resample UltraWideBand to NarrowBand
...me to G711. But when I use Speex UltraWideBand the Asterisk don't convert it. Then I need in my Asterisk Channel Source include the Speex Library in resample this frame in 32KHz to 8KHz. Searching for it in Speex Doc, I found it: SpeexResamplerState *resampler; resampler = speex_resampler_init(nb_channels, input_rate, output_rate, quality, &err); err = speex_resampler_process_int(resampler, channelID, in, &in_length, out, &out_length); But in my source I have one *dataframe where is my payload. How I can use it to resample my frame? Thanks you very much, Thiago. -------------- next par...
2008 Mar 29
0
GCC/ELF Visibility patch
...;query(mode->mode, request, ptr); } Index: libspeex/resample.c =================================================================== --- libspeex/resample.c (revision 14645) +++ libspeex/resample.c (working copy) @@ -721,12 +721,12 @@ } -SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) +EXPORT SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) { return speex_resampler_init_frac(nb_channels, in_rate, out_rate, in_rate, out_r...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...;query(mode->mode, request, ptr); } Index: libspeex/resample.c =================================================================== --- libspeex/resample.c (revision 14645) +++ libspeex/resample.c (working copy) @@ -721,12 +721,12 @@ } -SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) +EXPORT SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) { return speex_resampler_init_frac(nb_channels, in_rate, out_rate, in_rate, out_r...
2014 Apr 15
6
[PATCH 0/3] misc. cleanup
Hello, some misc. cleanup patches for speexdsp, nothing big I'm not sure about how to submit patches, so this is a test balloon :) ultimately, I'd like to fix the FIXED_POINT issue, see http://lists.xiph.org/pipermail/speex-dev/2013-December/008465.html currently, I think the only way to find out how speexdsp has been compiled is to resample some bytes and observe the output; which is
2010 Nov 10
0
bug fix for speex_resampler_reset_mem?
...eex_resampler_destroy(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 th...
2015 Aug 07
0
[PATCH] Silence clang -Wcast-align warnings
...us_multistream_encoder.c index 6e87337..7163d14 100644 --- a/src/opus_multistream_encoder.c +++ b/src/opus_multistream_encoder.c @@ -98,7 +98,8 @@ static opus_val32 *ms_get_preemph_mem(OpusMSEncoder *st) else ptr += align(mono_size); } - return (opus_val32*)(ptr+st->layout.nb_channels*120*sizeof(opus_val32)); + /* void* cast avoids clang -Wcast-align warning */ + return (opus_val32*)(void*)(ptr+st->layout.nb_channels*120*sizeof(opus_val32)); } static opus_val32 *ms_get_window_mem(OpusMSEncoder *st) @@ -117,7 +118,8 @@ static opus_val32 *ms_get_window_mem(OpusMSEncoder...
2006 May 16
2
Determining length of speex file speech
...e encoding, which I did not), and multiply this with .02 (20 milliseconds). I did this by hand, for example on the file I send yesterday when asking about the noise, so the output of the program is: $ readspx spfe49_1-small.spx speex header Version:1.1.12 rate:44100 mode:2 mode_bitstream_version:4 nb_channels:2 bitrate:-1 frame_size:640 vbr:0 frames_per_packet:1 extra_headers:0 Page #2: 1 packets. Page #3: 45 packets. Page #4: 45 packets. Page #5: 45 packets. Page #6: 45 packets. Page #7: 45 packets. Page #8: 45 packets. Pages: 8 Packets: 272 Calculating things per hand here 6*45 speex frames, so the s...
2014 Jun 04
4
opus_multistream_encode_float not working in libopus 1.1
On Wed, Jun 4, 2014 at 4:31 PM, Timothy B. Terriberry <tterribe at xiph.org> wrote: > Alpha Thinktink wrote: >> max_data_bytes=-11 > > That value is passed in by you. I also don't think passing such a value > would have worked in earlier releases. It indicates the size of the > buffer you are passing to the encoder to receive the encoded output. Actually, I'm
2006 May 16
0
Determining length of speex file speech
...t; .02 (20 milliseconds). > I did this by hand, for example on the file I send yesterday when asking > about the noise, so the output of the program is: > > $ readspx spfe49_1-small.spx > speex header > Version:1.1.12 > rate:44100 > mode:2 > mode_bitstream_version:4 > nb_channels:2 > bitrate:-1 > frame_size:640 > vbr:0 > frames_per_packet:1 > extra_headers:0 > Page #2: 1 packets. > Page #3: 45 packets. > Page #4: 45 packets. > Page #5: 45 packets. > Page #6: 45 packets. > Page #7: 45 packets. > Page #8: 45 packets. > Pages: 8 > Pack...
2009 Mar 18
0
Resample UltraWideBand to NarrowBand
.... But when I use Speex UltraWideBand the Asterisk don't convert it. Then I need in my Asterisk Channel Source include the Speex Library in resample this frame in 32KHz to 8KHz. Searching for it in Speex Doc, I found it: SpeexResamplerState *resampler; resampler = speex_resampler_init(nb_channels, input_rate, output_rate, quality, &err); err = speex_resampler_process_int(resampler, channelID, in, &in_length, out, &out_length); But in my source I have one *dataframe where is my payload. How I can use it to resample my frame? Thanks you very much, Thiago. --------------...
2014 Jun 05
0
opus_multistream_encode_float not working in libopus 1.1
...(curr_max,MS_FRAME_TMP); which left curr_max at -13 The result at line 853 is opus_encode_native is called with parameters so thusly: (encoder state pointer, buf pointer, frame_size=960, tmp_data pointer, curr_max=-13, lsb_depth=24, pcm pointer, analysis_frame_size=960, c1=0, c2=-1, st->layout.nb_channels=4, downmix pointer, float_api=1); I don't know what to suggest as I've never tinkered with the opus library internals, nor have I ever compiled it before today and do not know what it looked like in previous versions. Sorry.
2014 Jun 21
1
opus_multistream_encode_float not working in libopus 1.1
...h left curr_max at -13 > > The result at line 853 is opus_encode_native is called with parameters > so thusly: > (encoder state pointer, buf pointer, frame_size=960, tmp_data pointer, > curr_max=-13, lsb_depth=24, pcm pointer, analysis_frame_size=960, > c1=0, c2=-1, st->layout.nb_channels=4, downmix pointer, float_api=1); > > > I don't know what to suggest as I've never tinkered with the opus > library internals, nor have I ever compiled it before today and do not > know what it looked like in previous versions. Sorry. > _________________________________...
2015 Feb 04
0
[RFC PATCH v2] armv7(float): Optimize encode usecase using NE10 library
...if (upsample != 1) { int bound = len; @@ -411,6 +413,7 @@ static int opus_multistream_encoder_init_impl( (streams<1) || (coupled_streams<0) || (streams>255-coupled_streams)) return OPUS_BAD_ARG; + st->arch = opus_select_arch(); st->layout.nb_channels = channels; st->layout.nb_streams = streams; st->layout.nb_coupled_streams = coupled_streams; @@ -767,7 +770,7 @@ static int opus_multistream_encode_native ALLOC(bandSMR, 21*st->layout.nb_channels, opus_val16); if (st->surround) { - surround_analysis(celt_mode,...