summaryrefslogtreecommitdiff
path: root/libavcodec/x86/fft_3dn2.c
diff options
context:
space:
mode:
authorSean McGovern <gseanmcg@gmail.com>2011-09-19 21:32:09 -0400
committerAlex Converse <alex.converse@gmail.com>2011-09-23 17:02:58 -0700
commitc2d3f561072132044114588a5f56b8e1974a2af7 (patch)
treeb44947275bb59573a57b63f0bb40ff1b2fac7d1d /libavcodec/x86/fft_3dn2.c
parent9fba8ebe0acdc28193d37b5e1f4c0d73c589ede2 (diff)
fft: avoid a signed overflow
As a signed integer, 1<<31 overflows, so force it to unsigned. Signed-off-by: Alex Converse <alex.converse@gmail.com>
Diffstat (limited to 'libavcodec/x86/fft_3dn2.c')
-rw-r--r--libavcodec/x86/fft_3dn2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/x86/fft_3dn2.c b/libavcodec/x86/fft_3dn2.c
index 05c0467f08..a724398aff 100644
--- a/libavcodec/x86/fft_3dn2.c
+++ b/libavcodec/x86/fft_3dn2.c
@@ -23,7 +23,7 @@
#include "libavcodec/dsputil.h"
#include "fft.h"
-DECLARE_ALIGNED(8, static const int, m1m1)[2] = { 1<<31, 1<<31 };
+DECLARE_ALIGNED(8, static const unsigned int, m1m1)[2] = { 1U<<31, 1U<<31 };
#ifdef EMULATE_3DNOWEXT
#define PSWAPD(s,d)\
@@ -70,7 +70,7 @@ void ff_imdct_half_3dn2(FFTContext *s, FFTSample *output, const FFTSample *input
in1 = input;
in2 = input + n2 - 1;
#ifdef EMULATE_3DNOWEXT
- __asm__ volatile("movd %0, %%mm7" ::"r"(1<<31));
+ __asm__ volatile("movd %0, %%mm7" ::"r"(1U<<31));
#endif
for(k = 0; k < n4; k++) {
// FIXME a single block is faster, but gcc 2.95 and 3.4.x on 32bit can't compile it