changeset 203:9bfd3abd85eb libavcodec

(commit by michael) memset() in MMX
author arpi_esp
date Mon, 14 Jan 2002 04:29:19 +0000
parents fbe0398a7a4d
children fceb435fae6b
files h263dec.c
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/h263dec.c	Sun Jan 13 20:51:49 2002 +0000
+++ b/h263dec.c	Mon Jan 14 04:29:19 2002 +0000
@@ -162,7 +162,27 @@
                 s->c_dc_scale = 8;
             }
 
+#ifdef HAVE_MMX
+            if (mm_flags & MM_MMX) {
+                asm volatile(
+			"pxor %%mm7, %%mm7		\n\t"
+			"movl $-128*6, %%eax		\n\t"
+			"1:				\n\t"
+			"movq %%mm7, (%0, %%eax)	\n\t"
+			"movq %%mm7, 8(%0, %%eax)	\n\t"
+			"movq %%mm7, 16(%0, %%eax)	\n\t"
+			"movq %%mm7, 24(%0, %%eax)	\n\t"
+			"addl $32, %%eax		\n\t"
+			" js 1b				\n\t"
+			: : "r" (((int)s->block)+128*6)
+			: "%eax"
+                );
+            }else{
+                memset(s->block, 0, sizeof(s->block));
+            }
+#else
             memset(s->block, 0, sizeof(s->block));
+#endif
             s->mv_dir = MV_DIR_FORWARD;
             s->mv_type = MV_TYPE_16X16; 
             if (s->h263_msmpeg4) {