swscale/utils: Fix undefined shift in initFilter()

Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-03-11 15:40:28 +01:00
parent bd4c4c868c
commit fa74058dd3
1 changed files with 1 additions and 1 deletions

View File

@ -384,7 +384,7 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
int j; int j;
(*filterPos)[i] = xx; (*filterPos)[i] = xx;
for (j = 0; j < filterSize; j++) { for (j = 0; j < filterSize; j++) {
int64_t d = (FFABS(((int64_t)xx << 17) - xDstInSrc)) << 13; int64_t d = (FFABS(((int64_t)xx * (1 << 17)) - xDstInSrc)) << 13;
double floatd; double floatd;
int64_t coeff; int64_t coeff;