Browse Source

swscale: Provide the right alignment for external mmx asm

This reverts parts of e0c6cce447. 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>
tags/n1.0
Martin Storsjö 12 years ago
parent
commit
75c37c5ace
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      libswscale/utils.c

+ 4
- 2
libswscale/utils.c View File

@@ -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;



Loading…
Cancel
Save