diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-28 15:28:33 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-09 13:48:18 +0200 |
commit | 7b841cf6b706055164d5db3f2b901ed32e8092af (patch) | |
tree | 0c195677fd909101ff1d38465c07c9b4477e0a3f /libavfilter/af_headphone.c | |
parent | 8dda0d601becf19e6cdf350e2fe82b4db7339bd1 (diff) | |
download | ffmpeg-7b841cf6b706055164d5db3f2b901ed32e8092af.tar.gz |
avfilter/af_headphone: Remove pointless additions
buffer_length is a power-of-two and modulo is buffer_length - 1, so that
buffer_length & modulo is zero.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter/af_headphone.c')
-rw-r--r-- | libavfilter/af_headphone.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index 8db546adbf..03ef88c4a4 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -178,7 +178,7 @@ static int headphone_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n continue; } - read = (wr - (ir_len - 1) + buffer_length) & modulo; + read = (wr - (ir_len - 1)) & modulo; if (read + ir_len < buffer_length) { memcpy(temp_src, bptr + read, ir_len * sizeof(*temp_src)); |