Skip to content

Commit

Permalink
resample: drop useless abs()
Browse files Browse the repository at this point in the history
negative sample_index is handled in the block above.
  • Loading branch information
elenril committed Apr 11, 2014
1 parent 3c84f6b commit eed752d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libavresample/resample_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit eed752d

Please sign in to comment.