]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/i386/dsputil_mmx.h
Add some initial optimizations for ARM VFP (floating
[ffmpeg] / libavcodec / i386 / dsputil_mmx.h
index a1571fc1e3f851f1f4eb3f9454dea49831a2b217..142854684b81a9e59f314d5ba26efee81f4a08be 100644 (file)
@@ -23,6 +23,9 @@
 #define FFMPEG_DSPUTIL_MMX_H
 
 #include <stdint.h>
+#include "libavcodec/dsputil.h"
+
+typedef struct { uint64_t a, b; } xmm_t;
 
 extern const uint64_t ff_bone;
 extern const uint64_t ff_wtwo;
@@ -31,16 +34,18 @@ extern const uint64_t ff_pdw_80000000[2];
 
 extern const uint64_t ff_pw_3;
 extern const uint64_t ff_pw_4;
-extern const uint64_t ff_pw_5;
+extern const xmm_t    ff_pw_5;
 extern const uint64_t ff_pw_8;
 extern const uint64_t ff_pw_15;
-extern const uint64_t ff_pw_16;
+extern const xmm_t    ff_pw_16;
 extern const uint64_t ff_pw_20;
-extern const uint64_t ff_pw_32;
+extern const xmm_t    ff_pw_28;
+extern const xmm_t    ff_pw_32;
 extern const uint64_t ff_pw_42;
 extern const uint64_t ff_pw_64;
 extern const uint64_t ff_pw_96;
 extern const uint64_t ff_pw_128;
+extern const uint64_t ff_pw_255;
 
 extern const uint64_t ff_pb_1;
 extern const uint64_t ff_pb_3;
@@ -109,4 +114,11 @@ extern const double ff_pd_2[2];
     "movdqa 16"#t", "#g"              \n\t"
 #endif
 
+#define MOVQ_WONE(regd) \
+    asm volatile ( \
+    "pcmpeqd %%" #regd ", %%" #regd " \n\t" \
+    "psrlw $15, %%" #regd ::)
+
+void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx);
+
 #endif /* FFMPEG_DSPUTIL_MMX_H */