summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/ffmpeg/libswscale/x86/yuv2rgb_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libswscale/x86/yuv2rgb_template.c')
-rw-r--r--chromium/third_party/ffmpeg/libswscale/x86/yuv2rgb_template.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/chromium/third_party/ffmpeg/libswscale/x86/yuv2rgb_template.c b/chromium/third_party/ffmpeg/libswscale/x86/yuv2rgb_template.c
index c879102cc45..acb78f520e4 100644
--- a/chromium/third_party/ffmpeg/libswscale/x86/yuv2rgb_template.c
+++ b/chromium/third_party/ffmpeg/libswscale/x86/yuv2rgb_template.c
@@ -21,6 +21,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stdint.h>
+
+#include "libavutil/x86/asm.h"
+#include "libswscale/swscale_internal.h"
+
#undef MOVNTQ
#undef EMMS
#undef SFENCE
@@ -134,10 +139,20 @@
"add $4, %0\n\t" \
"js 1b\n\t" \
+#if COMPILE_TEMPLATE_MMXEXT
+#undef RGB_PACK24_B_OPERANDS
+#define RGB_PACK24_B_OPERANDS NAMED_CONSTRAINTS_ARRAY_ADD(mask1101,mask0110,mask0100,mask0010,mask1001)
+#else
+#undef RGB_PACK24_B_OPERANDS
+#define RGB_PACK24_B_OPERANDS
+#endif
+
#define YUV2RGB_OPERANDS \
: "+r" (index), "+r" (image) \
: "r" (pu - index), "r" (pv - index), "r"(&c->redDither), \
"r" (py - 2*index) \
+ NAMED_CONSTRAINTS_ADD(mmx_00ffw,pb_03,pb_07,mmx_redmask,pb_e0) \
+ RGB_PACK24_B_OPERANDS \
: "memory" \
); \
} \
@@ -146,6 +161,7 @@
: "+r" (index), "+r" (image) \
: "r" (pu - index), "r" (pv - index), "r"(&c->redDither), \
"r" (py - 2*index), "r" (pa - 2*index) \
+ NAMED_CONSTRAINTS_ADD(mmx_00ffw) \
: "memory" \
); \
} \