Mercurial > libavcodec.hg
changeset 2303:e1caca4f3261 libavcodec
10l
author | michael |
---|---|
date | Wed, 20 Oct 2004 12:04:08 +0000 |
parents | 857e16e85aea |
children | 09b2ef0ac97d |
files | resample2.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/resample2.c Mon Oct 18 23:07:18 2004 +0000 +++ b/resample2.c Wed Oct 20 12:04:08 2004 +0000 @@ -124,8 +124,8 @@ c->filter_length= ceil(16.0/factor); c->filter_bank= av_mallocz(c->filter_length*(PHASE_COUNT+1)*sizeof(short)); av_build_filter(c->filter_bank, factor, c->filter_length, PHASE_COUNT, 1<<FILTER_SHIFT, 1); - c->filter_bank[c->filter_length*PHASE_COUNT + (c->filter_length-1)/2 + 1]= (1<<FILTER_SHIFT)-1; - c->filter_bank[c->filter_length*PHASE_COUNT + (c->filter_length-1)/2 + 2]= 1; + memcpy(&c->filter_bank[c->filter_length*PHASE_COUNT+1], c->filter_bank, (c->filter_length-1)*sizeof(short)); + c->filter_bank[c->filter_length*PHASE_COUNT]= c->filter_bank[c->filter_length - 1]; c->src_incr= out_rate; c->ideal_dst_incr= c->dst_incr= in_rate * PHASE_COUNT;