[FFmpeg-devel] [PATCH 1/2] avcodec/x86: use function pointers for {put, add}_pixels_clamped
James Almer
jamrial at gmail.com
Wed Sep 24 22:44:16 CEST 2014
Same behavior as in simple_idct.
This way the best optimized versions available will be used instead.
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/x86/cavsdsp.c | 2 +-
libavcodec/x86/xvididct_mmx.c | 9 +++++----
libavcodec/x86/xvididct_sse2.c | 6 ++++--
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c
index d155fb2..681d16a 100644
--- a/libavcodec/x86/cavsdsp.c
+++ b/libavcodec/x86/cavsdsp.c
@@ -198,7 +198,7 @@ static void cavs_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride)
);
}
- ff_add_pixels_clamped_mmx(b2, dst, stride);
+ ff_add_pixels_clamped(b2, dst, stride);
}
#endif /* HAVE_MMX_INLINE */
diff --git a/libavcodec/x86/xvididct_mmx.c b/libavcodec/x86/xvididct_mmx.c
index f4bb39f..57aa8c0 100644
--- a/libavcodec/x86/xvididct_mmx.c
+++ b/libavcodec/x86/xvididct_mmx.c
@@ -46,6 +46,7 @@
#include "libavutil/mem.h"
#include "libavcodec/avcodec.h"
+#include "libavcodec/idctdsp.h"
#include "idctdsp.h"
#include "xvididct.h"
@@ -497,13 +498,13 @@ void ff_xvid_idct_mmx(short *block)
void ff_xvid_idct_mmx_put(uint8_t *dest, int line_size, int16_t *block)
{
ff_xvid_idct_mmx(block);
- ff_put_pixels_clamped_mmx(block, dest, line_size);
+ ff_put_pixels_clamped(block, dest, line_size);
}
void ff_xvid_idct_mmx_add(uint8_t *dest, int line_size, int16_t *block)
{
ff_xvid_idct_mmx(block);
- ff_add_pixels_clamped_mmx(block, dest, line_size);
+ ff_add_pixels_clamped(block, dest, line_size);
}
#endif /* HAVE_MMX_INLINE */
@@ -536,13 +537,13 @@ void ff_xvid_idct_mmxext(short *block)
void ff_xvid_idct_mmxext_put(uint8_t *dest, int line_size, int16_t *block)
{
ff_xvid_idct_mmxext(block);
- ff_put_pixels_clamped_mmx(block, dest, line_size);
+ ff_put_pixels_clamped(block, dest, line_size);
}
void ff_xvid_idct_mmxext_add(uint8_t *dest, int line_size, int16_t *block)
{
ff_xvid_idct_mmxext(block);
- ff_add_pixels_clamped_mmx(block, dest, line_size);
+ ff_add_pixels_clamped(block, dest, line_size);
}
#endif /* HAVE_MMXEXT_INLINE */
diff --git a/libavcodec/x86/xvididct_sse2.c b/libavcodec/x86/xvididct_sse2.c
index 50a2f99..51a5d9d 100644
--- a/libavcodec/x86/xvididct_sse2.c
+++ b/libavcodec/x86/xvididct_sse2.c
@@ -41,6 +41,8 @@
#include "libavutil/mem.h"
#include "libavutil/x86/asm.h"
+#include "libavcodec/idctdsp.h"
+
#include "idctdsp.h"
#include "xvididct.h"
@@ -392,13 +394,13 @@ av_extern_inline void ff_xvid_idct_sse2(short *block)
void ff_xvid_idct_sse2_put(uint8_t *dest, int line_size, short *block)
{
ff_xvid_idct_sse2(block);
- ff_put_pixels_clamped_mmx(block, dest, line_size);
+ ff_put_pixels_clamped(block, dest, line_size);
}
void ff_xvid_idct_sse2_add(uint8_t *dest, int line_size, short *block)
{
ff_xvid_idct_sse2(block);
- ff_add_pixels_clamped_mmx(block, dest, line_size);
+ ff_add_pixels_clamped(block, dest, line_size);
}
#endif /* HAVE_SSE2_INLINE */
--
1.8.5.5
More information about the ffmpeg-devel
mailing list