Commit ad26e83f authored by James Almer's avatar 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: 's avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 857fc0a7
......@@ -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 */
......
......@@ -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 */
......@@ -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 */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment