|
|
@ -168,8 +168,6 @@ int RENAME(swri_resample_linear)(ResampleContext *c, |
|
|
|
int dst_index; |
|
|
|
int dst_index; |
|
|
|
int index= c->index; |
|
|
|
int index= c->index; |
|
|
|
int frac= c->frac; |
|
|
|
int frac= c->frac; |
|
|
|
int dst_incr_frac= c->dst_incr % c->src_incr; |
|
|
|
|
|
|
|
int dst_incr= c->dst_incr / c->src_incr; |
|
|
|
|
|
|
|
int sample_index = index >> c->phase_shift; |
|
|
|
int sample_index = index >> c->phase_shift; |
|
|
|
|
|
|
|
|
|
|
|
index &= c->phase_mask; |
|
|
|
index &= c->phase_mask; |
|
|
@ -189,8 +187,8 @@ int RENAME(swri_resample_linear)(ResampleContext *c, |
|
|
|
val += (v2 - val) * (FELEML) frac / c->src_incr; |
|
|
|
val += (v2 - val) * (FELEML) frac / c->src_incr; |
|
|
|
OUT(dst[dst_index], val); |
|
|
|
OUT(dst[dst_index], val); |
|
|
|
|
|
|
|
|
|
|
|
frac += dst_incr_frac; |
|
|
|
frac += c->dst_incr_mod; |
|
|
|
index += dst_incr; |
|
|
|
index += c->dst_incr_div; |
|
|
|
if (frac >= c->src_incr) { |
|
|
|
if (frac >= c->src_incr) { |
|
|
|
frac -= c->src_incr; |
|
|
|
frac -= c->src_incr; |
|
|
|
index++; |
|
|
|
index++; |
|
|
|