aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-07-13 18:33:08 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-07-18 16:57:03 +0200
commitfe73afd730be56877221e415e7d32f5f4ae24b7a (patch)
treea1e4efa3d8fe2c2b5694770eb9958aade8aee325 /libavcodec
parent2c0e98a0b478284bdff6d7a4062522605a8beae5 (diff)
downloadffmpeg-fe73afd730be56877221e415e7d32f5f4ae24b7a.tar.gz
avcodec/dirac_dwt_template: Fix signedness regression in interleave()
Found-by: <jdarnley> Tested-by: James Darnley <james.darnley@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 181435a4de6e38e0a15ddaf16de9a157ef41cb18) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dirac_dwt_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dirac_dwt_template.c b/libavcodec/dirac_dwt_template.c
index 528fc7e9e7..2369c8d15b 100644
--- a/libavcodec/dirac_dwt_template.c
+++ b/libavcodec/dirac_dwt_template.c
@@ -57,8 +57,8 @@ static av_always_inline void RENAME(interleave)(TYPE *dst, TYPE *src0, TYPE *src
{
int i;
for (i = 0; i < w2; i++) {
- dst[2*i ] = (src0[i] + (unsigned)add) >> shift;
- dst[2*i+1] = (src1[i] + (unsigned)add) >> shift;
+ dst[2*i ] = ((int)(src0[i] + (unsigned)add)) >> shift;
+ dst[2*i+1] = ((int)(src1[i] + (unsigned)add)) >> shift;
}
}