Fixes #1884.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
... | ... |
@@ -98,10 +98,10 @@ static inline int16_t *scalarproduct(const int16_t *in, const int16_t *endin, in |
98 | 98 |
int16_t j; |
99 | 99 |
|
100 | 100 |
while (in < endin) { |
101 |
- sample = 32; |
|
101 |
+ sample = 0; |
|
102 | 102 |
for (j = 0; j < NUMTAPS; j++) |
103 | 103 |
sample += in[j] * filt[j]; |
104 |
- *out = sample >> 6; |
|
104 |
+ *out = av_clip_int16(sample >> 6); |
|
105 | 105 |
out++; |
106 | 106 |
in++; |
107 | 107 |
} |