1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

resample: drop useless abs()

negative sample_index is handled in the block above.
This commit is contained in:
Anton Khirnov 2014-03-04 12:27:17 +01:00
parent 3c84f6b5d2
commit eed752d61d

View File

@ -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 {