search for: out_len

Displaying 20 results from an estimated 57 matches for "out_len".

2009 Aug 05
0
Bug in libspeexdsp resampler
...be OK to use for all the subsequent calls to "speex_resampler_process_int" for the other channels. However, there is some subtle difference (in the way fractional samples are computed, I suspect) that causes "speex_resampler_process_int" to sometimes return a value of "out_len" that is off by one when the changed "in_len" value is used, and even though "out_len" is reset before each channel, since it is the last channel that sets "out_len"s return value for "speex_resampler_process_interleaved_int", the wrong value is some...
2008 May 03
2
Resampler (no api)
...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 *in_len, spx_word16_t *out, spx_uint32_t *out_len) { - int N = st->filt_len; + const int N = st->filt_len; int out_sample = 0; - spx_word16_t *mem; int last_sample = st->last_sample[channel_index]; spx_uint32_t samp_frac_num = st->samp_frac_num[channel_index]; - mem = st->mem + channel_index * st->mem_alloc_s...
2008 May 03
0
Resampler, memory only variant
...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 *in_len, spx_word16_t *out, spx_uint32_t *out_len) { - int N = st->filt_len; + const int N = st->filt_len; int out_sample = 0; - spx_word16_t *mem; int last_sample = st->last_sample[channel_index]; spx_uint32_t samp_frac_num = st->samp_frac_num[channel_index]; - mem = st->mem + channel_index * st->mem_alloc_s...
2009 Oct 23
0
Little bug in the libspeexdsp resampler
...st didn't make my case very well. Let me see if I can explain why "speex_resampler_process_interleaved_int" and "speex_resampler_process_interleaved_float" in the resampler have a problem. If you call "speex_resampler_process_interleaved_int" with a small "out_len" (and therefore is output limited), then the first time the function calls "speex_resampler_process_int", it changes "in_len" to the number of input samples it no longer needs to see again (I note that this is different than the number of samples it may have *used*). The...
2012 May 02
1
[PATCH] resample: Fix input indexing bug from interleaved functions
...ple.c b/libspeex/resample.c index 7957c61..d59508d 100644 --- a/libspeex/resample.c +++ b/libspeex/resample.c @@ -970,13 +970,15 @@ EXPORT int speex_resampler_process_interleaved_float(SpeexResamplerState *st, co { 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; +...
2009 Sep 11
2
[PATCH] Add echo_daemon command
...along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include <config.h> + +#include <string.h> + +#include "actions.h" + +char * +do_echo_daemon (char *const *argv) +{ + char *out = NULL; + size_t out_len = 0; + + /* Iterate over argv entries until reaching the NULL terminator */ + while (*argv) { + char add_space = 0; + + /* Store the end of current output */ + size_t out_end = out_len; + + /* Calculate the new output size */ + size_t arg_len = strlen(*argv); + out_len += arg_le...
2013 Sep 23
28
[PATCH 0/2] add LZ4 kernel decompression support
Linux 3.11 added respective support, so I think we should follow suit. 1: xen: add LZ4 decompression support 2: libxc: add LZ4 decompression support Signed-off-by: Jan Beulich <jbeulich@suse.com>
2013 Aug 02
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...> > +} > > + > > +/* > > + * Central API which initiates the copies across the PCIe bus. > > + */ > > +static int mic_virtio_copy_desc_buf(struct mic_vdev *mvdev, > > + struct vring_desc *desc, > > + void __user *ubuf, u32 rem_len, u32 doff, u32 *out_len) > > +{ > > + void __iomem *dbuf; > > + int err; > > + u32 len = le32_to_cpu(desc->len); > > + u16 flags = le16_to_cpu(desc->flags); > > + u64 addr = le64_to_cpu(desc->addr); > > + > > + dbuf = mvdev->mdev->aper.va + addr + doff; > &...
2013 Aug 02
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...> > +} > > + > > +/* > > + * Central API which initiates the copies across the PCIe bus. > > + */ > > +static int mic_virtio_copy_desc_buf(struct mic_vdev *mvdev, > > + struct vring_desc *desc, > > + void __user *ubuf, u32 rem_len, u32 doff, u32 *out_len) > > +{ > > + void __iomem *dbuf; > > + int err; > > + u32 len = le32_to_cpu(desc->len); > > + u16 flags = le16_to_cpu(desc->flags); > > + u64 addr = le64_to_cpu(desc->addr); > > + > > + dbuf = mvdev->mdev->aper.va + addr + doff; > &...
2013 Jul 25
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...sc __user *)argp)->copy.out_cookie, + &copy->out_cookie, sizeof(copy->out_cookie))) { + dev_err(mic_dev(mvdev), "%s %d errno ret %d\n", + __func__, __LINE__, -EFAULT); + return -EFAULT; + } + if (copy_to_user( + &((struct mic_copy_desc __user *)argp)->copy.out_len, + &copy->out_len, sizeof(copy->out_len))) { + dev_err(mic_dev(mvdev), "%s %d errno ret %d\n", + __func__, __LINE__, -EFAULT); + return -EFAULT; + } + break; + } + case MIC_VIRTIO_COPY_CHAIN: + { + struct mic_copy request; + + ret = mic_vdev_inited(mvdev); + if (re...
2013 Jul 25
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...sc __user *)argp)->copy.out_cookie, + &copy->out_cookie, sizeof(copy->out_cookie))) { + dev_err(mic_dev(mvdev), "%s %d errno ret %d\n", + __func__, __LINE__, -EFAULT); + return -EFAULT; + } + if (copy_to_user( + &((struct mic_copy_desc __user *)argp)->copy.out_len, + &copy->out_len, sizeof(copy->out_len))) { + dev_err(mic_dev(mvdev), "%s %d errno ret %d\n", + __func__, __LINE__, -EFAULT); + return -EFAULT; + } + break; + } + case MIC_VIRTIO_COPY_CHAIN: + { + struct mic_copy request; + + ret = mic_vdev_inited(mvdev); + if (re...
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...return err; +} + +/* Returns an error, or 0 (no buffers), or an id for vring_used_buffer() */ +int vring_get_buffer(struct vring_info *vr, + struct iovec *in_iov, + unsigned int *num_in, unsigned long *in_len, + struct iovec *out_iov, + unsigned int *num_out, unsigned long *out_len) +{ + unsigned int i, in = 0, out = 0; + unsigned long dummy; + u16 head; + struct vring_desc d; + + if (unlikely(get_user(head, &vr->ring.avail->idx) != 0)) + return -EFAULT; + + if (vr->last_avail == head) + return 0; + + if (!in_len) + in_len = &dummy; + if (!out_len) + out_...
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...return err; +} + +/* Returns an error, or 0 (no buffers), or an id for vring_used_buffer() */ +int vring_get_buffer(struct vring_info *vr, + struct iovec *in_iov, + unsigned int *num_in, unsigned long *in_len, + struct iovec *out_iov, + unsigned int *num_out, unsigned long *out_len) +{ + unsigned int i, in = 0, out = 0; + unsigned long dummy; + u16 head; + struct vring_desc d; + + if (unlikely(get_user(head, &vr->ring.avail->idx) != 0)) + return -EFAULT; + + if (vr->last_avail == head) + return 0; + + if (!in_len) + in_len = &dummy; + if (!out_len) + out_...
2008 Mar 29
0
GCC/ELF Visibility patch
...e *st) { speex_free(st->mem); speex_free(st->sinc_table); @@ -854,7 +854,7 @@ #define FIXED_STACK_ALLOC 1024 #ifdef FIXED_POINT -int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) +EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) { spx_uint32_t i; int istride_save, ostride_save; @@ -920,16 +920,16 @@ #endif return RESAMPLER_ERR_SUCCESS; } -in...
2020 Jun 03
2
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...+ struct vhost_log *log, unsigned int *log_num) > { > int ret = fetch_descs(vq); > int i; > @@ -2311,6 +2310,8 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq, > *out_num = *in_num = 0; > if (unlikely(log)) > *log_num = 0; > + buf->in_len = buf->out_len = 0; > + buf->descs = 0; > > for (i = vq->first_desc; i < vq->ndescs; ++i) { > unsigned iov_count = *in_num + *out_num; > @@ -2340,6 +2341,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq, > /* If this is an input descriptor, > * increment...
2020 Jun 03
2
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...+ struct vhost_log *log, unsigned int *log_num) > { > int ret = fetch_descs(vq); > int i; > @@ -2311,6 +2310,8 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq, > *out_num = *in_num = 0; > if (unlikely(log)) > *log_num = 0; > + buf->in_len = buf->out_len = 0; > + buf->descs = 0; > > for (i = vq->first_desc; i < vq->ndescs; ++i) { > unsigned iov_count = *in_num + *out_num; > @@ -2340,6 +2341,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq, > /* If this is an input descriptor, > * increment...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...e *st) { speex_free(st->mem); speex_free(st->sinc_table); @@ -854,7 +854,7 @@ #define FIXED_STACK_ALLOC 1024 #ifdef FIXED_POINT -int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) +EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) { spx_uint32_t i; int istride_save, ostride_save; @@ -920,16 +920,16 @@ #endif return RESAMPLER_ERR_SUCCESS; } -in...
2013 Jul 29
0
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...ie, > + &copy->out_cookie, sizeof(copy->out_cookie))) { > + dev_err(mic_dev(mvdev), "%s %d errno ret %d\n", > + __func__, __LINE__, -EFAULT); > + return -EFAULT; > + } > + if (copy_to_user( > + &((struct mic_copy_desc __user *)argp)->copy.out_len, > + &copy->out_len, sizeof(copy->out_len))) { > + dev_err(mic_dev(mvdev), "%s %d errno ret %d\n", > + __func__, __LINE__, -EFAULT); > + return -EFAULT; > + } > + break; > + } > + case MIC_VIRTIO_COPY_CHAIN: > + { > + struct mic_copy req...
2012 Feb 13
10
[RFB] add LZ4 compression method to btrfs
Hi, so here it is, LZ4 compression method inside btrfs. The patchset is based on top of current Chris'' for-linus + Andi''s snappy implementation + the fixes from Li Zefan. Passes xfstests and stresstests. I haven''t measured performance on wide range of hardware or workloads, rather wanted to publish the patches before I get distracted again. I''d like to ask
2012 Jun 23
9
[PATCH 0/5] btrfs: lz4/lz4hc compression
WARNING: This is not compatible with the previous lz4 patchset. If you''re using experimental compression that isn''t in mainline kernels, be prepared to backup and restore or decompress before upgrading, and have backups in case it eats data (which appears not to be a problem any more, but has been during development). These patches add lz4 and lz4hc compression