diff options
author | James Almer <jamrial@gmail.com> | 2014-09-24 19:53:07 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2014-09-24 21:52:13 -0300 |
commit | 4f4f08e6f00f9949c27e2f76bb7f732e6d16871e (patch) | |
tree | 1c277162e923ff1ea8f001890c8ce33b65f821de /libavcodec/x86/idctdsp_init.c | |
parent | c99a8828148949430608c3866e671a599a5805ba (diff) | |
download | ffmpeg-4f4f08e6f00f9949c27e2f76bb7f732e6d16871e.tar.gz |
x86/idctdsp: port {put,add}_pixels_clamped to yasm
Also add sse2 versions for both.
put_pixels_clamped port and sse2 version originally written by Timothy Gu.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/x86/idctdsp_init.c')
-rw-r--r-- | libavcodec/x86/idctdsp_init.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/x86/idctdsp_init.c b/libavcodec/x86/idctdsp_init.c index 3f438f44db..2c26a98850 100644 --- a/libavcodec/x86/idctdsp_init.c +++ b/libavcodec/x86/idctdsp_init.c @@ -64,9 +64,6 @@ av_cold void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, int cpu_flags = av_get_cpu_flags(); if (INLINE_MMX(cpu_flags)) { - c->put_pixels_clamped = ff_put_pixels_clamped_mmx; - c->add_pixels_clamped = ff_add_pixels_clamped_mmx; - if (!high_bit_depth && avctx->lowres == 0 && (avctx->idct_algo == FF_IDCT_AUTO || @@ -80,8 +77,12 @@ av_cold void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, } if (EXTERNAL_MMX(cpu_flags)) { c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_mmx; + c->put_pixels_clamped = ff_put_pixels_clamped_mmx; + c->add_pixels_clamped = ff_add_pixels_clamped_mmx; } if (EXTERNAL_SSE2(cpu_flags)) { c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_sse2; + c->put_pixels_clamped = ff_put_pixels_clamped_sse2; + c->add_pixels_clamped = ff_add_pixels_clamped_sse2; } } |