summaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/xvididct_init.c
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2015-03-10 23:11:51 +0000
committerMichael Niedermayer <michaelni@gmx.at>2015-03-13 01:04:52 +0100
commit2999bd7da2cf6343592d4eb6da3cd0748354775d (patch)
treecd0e68d046f5347b907fa40de9ab661442f3364a /libavcodec/x86/xvididct_init.c
parent8f8c31f4c717e815a63b54cfe6445eb9d5ff7b95 (diff)
downloadffmpeg-streaming-2999bd7da2cf6343592d4eb6da3cd0748354775d.zip
ffmpeg-streaming-2999bd7da2cf6343592d4eb6da3cd0748354775d.tar.gz
x86: xvid_idct: port SSE2 iDCT to yasm
The main difference consists in renaming properly labels, and letting yasm select the gprs for skipping 1D transforms. Previous-version-reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/xvididct_init.c')
-rw-r--r--libavcodec/x86/xvididct_init.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/libavcodec/x86/xvididct_init.c b/libavcodec/x86/xvididct_init.c
index 8c22784..ae65667 100644
--- a/libavcodec/x86/xvididct_init.c
+++ b/libavcodec/x86/xvididct_init.c
@@ -26,6 +26,18 @@
#include "idctdsp.h"
#include "xvididct.h"
+static void xvid_idct_sse2_put(uint8_t *dest, int line_size, short *block)
+{
+ ff_xvid_idct_sse2(block);
+ ff_put_pixels_clamped(block, dest, line_size);
+}
+
+static void xvid_idct_sse2_add(uint8_t *dest, int line_size, short *block)
+{
+ ff_xvid_idct_sse2(block);
+ ff_add_pixels_clamped(block, dest, line_size);
+}
+
av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)
{
@@ -50,9 +62,9 @@ av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c, AVCodecContext *avctx,
c->perm_type = FF_IDCT_PERM_NONE;
}
- if (INLINE_SSE2(cpu_flags)) {
- c->idct_put = ff_xvid_idct_sse2_put;
- c->idct_add = ff_xvid_idct_sse2_add;
+ if (EXTERNAL_SSE2(cpu_flags)) {
+ c->idct_put = xvid_idct_sse2_put;
+ c->idct_add = xvid_idct_sse2_add;
c->idct = ff_xvid_idct_sse2;
c->perm_type = FF_IDCT_PERM_SSE2;
}
OpenPOWER on IntegriCloud