diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-13 18:33:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-17 11:46:33 +0200 |
commit | 15990a43b023c87148658e271476b7a19ccde8ea (patch) | |
tree | e737596adda45f133e30a8aa4d8e63fb8cc314a3 | |
parent | 2b8d4f6f0186b3ed0b223f665d32c36ed887149e (diff) | |
download | ffmpeg-15990a43b023c87148658e271476b7a19ccde8ea.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>
-rw-r--r-- | libavcodec/dirac_dwt_template.c | 4 |
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; } } |