mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
x86: xviddct: Employ more specific ifdefs
This avoids building mmxext and sse2 code when disabled by configure.
This commit is contained in:
parent
4272bb6ef1
commit
0b8b2ae5e9
@ -84,7 +84,11 @@ static const struct algo fdct_tab[] = {
|
|||||||
|
|
||||||
#if HAVE_MMX_INLINE
|
#if HAVE_MMX_INLINE
|
||||||
{ "MMX", ff_fdct_mmx, NO_PERM, AV_CPU_FLAG_MMX },
|
{ "MMX", ff_fdct_mmx, NO_PERM, AV_CPU_FLAG_MMX },
|
||||||
|
#endif
|
||||||
|
#if HAVE_MMXEXT_INLINE
|
||||||
{ "MMXEXT", ff_fdct_mmxext, NO_PERM, AV_CPU_FLAG_MMXEXT },
|
{ "MMXEXT", ff_fdct_mmxext, NO_PERM, AV_CPU_FLAG_MMXEXT },
|
||||||
|
#endif
|
||||||
|
#if HAVE_SSE2_INLINE
|
||||||
{ "SSE2", ff_fdct_sse2, NO_PERM, AV_CPU_FLAG_SSE2 },
|
{ "SSE2", ff_fdct_sse2, NO_PERM, AV_CPU_FLAG_SSE2 },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -108,7 +112,11 @@ static const struct algo idct_tab[] = {
|
|||||||
#if HAVE_MMX_INLINE
|
#if HAVE_MMX_INLINE
|
||||||
{ "SIMPLE-MMX", ff_simple_idct_mmx, MMX_SIMPLE_PERM, AV_CPU_FLAG_MMX },
|
{ "SIMPLE-MMX", ff_simple_idct_mmx, MMX_SIMPLE_PERM, AV_CPU_FLAG_MMX },
|
||||||
{ "XVID-MMX", ff_idct_xvid_mmx, NO_PERM, AV_CPU_FLAG_MMX, 1 },
|
{ "XVID-MMX", ff_idct_xvid_mmx, NO_PERM, AV_CPU_FLAG_MMX, 1 },
|
||||||
|
#endif
|
||||||
|
#if HAVE_MMXEXT_INLINE
|
||||||
{ "XVID-MMXEXT", ff_idct_xvid_mmxext, NO_PERM, AV_CPU_FLAG_MMXEXT, 1 },
|
{ "XVID-MMXEXT", ff_idct_xvid_mmxext, NO_PERM, AV_CPU_FLAG_MMXEXT, 1 },
|
||||||
|
#endif
|
||||||
|
#if HAVE_SSE2_INLINE
|
||||||
{ "XVID-SSE2", ff_idct_xvid_sse2, SSE2_PERM, AV_CPU_FLAG_SSE2, 1 },
|
{ "XVID-SSE2", ff_idct_xvid_sse2, SSE2_PERM, AV_CPU_FLAG_SSE2, 1 },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#include "dsputil_x86.h"
|
#include "dsputil_x86.h"
|
||||||
#include "idct_xvid.h"
|
#include "idct_xvid.h"
|
||||||
|
|
||||||
#if HAVE_INLINE_ASM
|
#if HAVE_MMX_INLINE
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// Macros and other preprocessor constants
|
// Macros and other preprocessor constants
|
||||||
@ -507,6 +507,22 @@ __asm__ volatile(
|
|||||||
:: "r"(block), "r"(rounder_0), "r"(tab_i_04_mmx), "r"(tg_1_16));
|
:: "r"(block), "r"(rounder_0), "r"(tab_i_04_mmx), "r"(tg_1_16));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, int16_t *block)
|
||||||
|
{
|
||||||
|
ff_idct_xvid_mmx(block);
|
||||||
|
ff_put_pixels_clamped_mmx(block, dest, line_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, int16_t *block)
|
||||||
|
{
|
||||||
|
ff_idct_xvid_mmx(block);
|
||||||
|
ff_add_pixels_clamped_mmx(block, dest, line_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_MMX_INLINE */
|
||||||
|
|
||||||
|
#if HAVE_MMXEXT_INLINE
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// void idct_xmm(uint16_t block[64]);
|
// void idct_xmm(uint16_t block[64]);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -531,18 +547,6 @@ __asm__ volatile(
|
|||||||
:: "r"(block), "r"(rounder_0), "r"(tab_i_04_xmm), "r"(tg_1_16));
|
:: "r"(block), "r"(rounder_0), "r"(tab_i_04_xmm), "r"(tg_1_16));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, int16_t *block)
|
|
||||||
{
|
|
||||||
ff_idct_xvid_mmx(block);
|
|
||||||
ff_put_pixels_clamped_mmx(block, dest, line_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, int16_t *block)
|
|
||||||
{
|
|
||||||
ff_idct_xvid_mmx(block);
|
|
||||||
ff_add_pixels_clamped_mmx(block, dest, line_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, int16_t *block)
|
void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, int16_t *block)
|
||||||
{
|
{
|
||||||
ff_idct_xvid_mmxext(block);
|
ff_idct_xvid_mmxext(block);
|
||||||
@ -555,4 +559,4 @@ void ff_idct_xvid_mmxext_add(uint8_t *dest, int line_size, int16_t *block)
|
|||||||
ff_add_pixels_clamped_mmx(block, dest, line_size);
|
ff_add_pixels_clamped_mmx(block, dest, line_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_INLINE_ASM */
|
#endif /* HAVE_MMXEXT_INLINE */
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#include "idct_xvid.h"
|
#include "idct_xvid.h"
|
||||||
#include "dsputil_x86.h"
|
#include "dsputil_x86.h"
|
||||||
|
|
||||||
#if HAVE_INLINE_ASM
|
#if HAVE_SSE2_INLINE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
@ -405,4 +405,4 @@ void ff_idct_xvid_sse2_add(uint8_t *dest, int line_size, short *block)
|
|||||||
ff_add_pixels_clamped_mmx(block, dest, line_size);
|
ff_add_pixels_clamped_mmx(block, dest, line_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_INLINE_ASM */
|
#endif /* HAVE_SSE2_INLINE */
|
||||||
|
Loading…
Reference in New Issue
Block a user