diff options
author | Martin Storsjö <martin@martin.st> | 2012-09-09 01:43:53 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-09-09 01:52:35 +0300 |
commit | 75c37c5ace6271dc9dc996a61b799bcd2fc1b30d (patch) | |
tree | 0b27344896284b98a2ee14444c52dd860dd0f8a5 /libswscale | |
parent | e0c6cce44729d94e2a5507a4b6d031f23e8bd7b6 (diff) | |
download | ffmpeg-streaming-75c37c5ace6271dc9dc996a61b799bcd2fc1b30d.zip ffmpeg-streaming-75c37c5ace6271dc9dc996a61b799bcd2fc1b30d.tar.gz |
swscale: Provide the right alignment for external mmx asm
This reverts parts of e0c6cce4472. There is external mmx asm that
requires this alignment.
This fixes crashes when using swscale in builds with external mmx,
without inline assembly.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 34e4744..0002e17 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1050,7 +1050,8 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, } else #endif /* HAVE_MMXEXT_INLINE */ { - const int filterAlign = INLINE_MMX(cpu_flags) ? 4 : + const int filterAlign = + (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? 4 : (HAVE_ALTIVEC && cpu_flags & AV_CPU_FLAG_ALTIVEC) ? 8 : 1; @@ -1073,7 +1074,8 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, /* precalculate vertical scaler filter coefficients */ { - const int filterAlign = INLINE_MMX(cpu_flags) ? 2 : + const int filterAlign = + (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? 2 : (HAVE_ALTIVEC && cpu_flags & AV_CPU_FLAG_ALTIVEC) ? 8 : 1; |