[FFmpeg-cvslog] avcodec/x86: use function pointers for {put, add}_pixels_clamped
James Almer
git at videolan.org
Wed Sep 24 23:51:40 CEST 2014
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Sep 24 15:18:50 2014 -0300| [ad26e83f9cb8626346164ca5e794e940e63db32c] | committer: James Almer
avcodec/x86: use function pointers for {put,add}_pixels_clamped
Same behavior as in simple_idct.
This way the best optimized versions available will be used instead.
Reviewed-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad26e83f9cb8626346164ca5e794e940e63db32c
---
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 */
More information about the ffmpeg-cvslog
mailing list