aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-03-04 12:27:17 +0100
committerAnton Khirnov <anton@khirnov.net>2014-04-11 16:28:11 +0200
commiteed752d61da332fb13e9893a175a90fed7b1d7d3 (patch)
tree7881eab7fa7bb8cacd91ce75ad9e734d78725ab8
parent3c84f6b5d20cd345fac706f8cfb70c55e541ffb5 (diff)
downloadffmpeg-eed752d61da332fb13e9893a175a90fed7b1d7d3.tar.gz
resample: drop useless abs()
negative sample_index is handled in the block above.
-rw-r--r--libavresample/resample_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavresample/resample_template.c b/libavresample/resample_template.c
index d9fb2d17d4..a7cb6aeb9e 100644
--- a/libavresample/resample_template.c
+++ b/libavresample/resample_template.c
@@ -80,8 +80,8 @@ static void SET_TYPE(resample_one)(ResampleContext *c,
} else if (c->linear) {
FELEM2 v2 = 0;
for (i = 0; i < c->filter_length; i++) {
- val += src[abs(sample_index + i)] * (FELEM2)filter[i];
- v2 += src[abs(sample_index + i)] * (FELEM2)filter[i + c->filter_length];
+ val += src[sample_index + i] * (FELEM2)filter[i];
+ v2 += src[sample_index + i] * (FELEM2)filter[i + c->filter_length];
}
val += (v2 - val) * (FELEML)frac / c->src_incr;
} else {