aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/i386/flacdsp_mmx.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2008-05-08 21:11:24 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2008-05-08 21:11:24 +0000
commit40d0e665d09aca5918c0b70b7045f32fae71f3eb (patch)
tree90a376cb30c157bbb7b682d62a5c776e4a8917f0 /libavcodec/i386/flacdsp_mmx.c
parent35027eddf3113fa8a0e0c72aad12c9ac6a9a5228 (diff)
downloadffmpeg-40d0e665d09aca5918c0b70b7045f32fae71f3eb.tar.gz
Do not misuse long as the size of a register in x86.
typedef x86_reg as the appropriate size and use it instead. Originally committed as revision 13081 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/flacdsp_mmx.c')
-rw-r--r--libavcodec/i386/flacdsp_mmx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/i386/flacdsp_mmx.c b/libavcodec/i386/flacdsp_mmx.c
index e799ce421d..2096e3305b 100644
--- a/libavcodec/i386/flacdsp_mmx.c
+++ b/libavcodec/i386/flacdsp_mmx.c
@@ -20,13 +20,14 @@
*/
#include "dsputil_mmx.h"
+#include "x86_cpu.h"
static void apply_welch_window_sse2(const int32_t *data, int len, double *w_data)
{
double c = 2.0 / (len-1.0);
int n2 = len>>1;
- long i = -n2*sizeof(int32_t);
- long j = n2*sizeof(int32_t);
+ x86_reg i = -n2*sizeof(int32_t);
+ x86_reg j = n2*sizeof(int32_t);
asm volatile(
"movsd %0, %%xmm7 \n\t"
"movapd %1, %%xmm6 \n\t"
@@ -71,7 +72,7 @@ void ff_flac_compute_autocorr_sse2(const int32_t *data, int len, int lag,
double *data1 = tmp + lag;
int j;
- if((long)data1 & 15)
+ if((x86_reg)data1 & 15)
data1++;
apply_welch_window_sse2(data, len, data1);
@@ -81,7 +82,7 @@ void ff_flac_compute_autocorr_sse2(const int32_t *data, int len, int lag,
data1[len] = 0.0;
for(j=0; j<lag; j+=2){
- long i = -len*sizeof(double);
+ x86_reg i = -len*sizeof(double);
if(j == lag-2) {
asm volatile(
"movsd %6, %%xmm0 \n\t"