[SCM] libav/experimental: resample: drop useless abs()
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Aug 10 16:02:47 UTC 2014
The following commit has been merged in the experimental branch:
commit eed752d61da332fb13e9893a175a90fed7b1d7d3
Author: Anton Khirnov <anton at khirnov.net>
Date: Tue Mar 4 12:27:17 2014 +0100
resample: drop useless abs()
negative sample_index is handled in the block above.
diff --git a/libavresample/resample_template.c b/libavresample/resample_template.c
index d9fb2d1..a7cb6ae 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 {
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list