changeset 670:340e3ba84119 libavcodec

Synthesize pixels16 functions from pixels functions.
author mellum
date Fri, 13 Sep 2002 23:27:01 +0000
parents b4bddbde44f3
children 3f2e5a282f61
files alpha/dsputil_alpha.c
diffstat 1 files changed, 45 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/alpha/dsputil_alpha.c	Fri Sep 13 19:31:32 2002 +0000
+++ b/alpha/dsputil_alpha.c	Fri Sep 13 23:27:01 2002 +0000
@@ -224,16 +224,24 @@
         } while (--h);                                                      \
     } while (0)
 
-#define MAKE_OP(OPNAME, SUFF, OPKIND, STORE)                            \
-static void OPNAME ## _pixels ## SUFF ## _axp                           \
-        (uint8_t *restrict block, const uint8_t *restrict pixels,       \
-         int line_size, int h)                                          \
-{                                                                       \
-    if ((size_t) pixels & 0x7) {                                        \
-        OPKIND(uldq, STORE);                                            \
-    } else {                                                            \
-        OPKIND(ldq, STORE);                                             \
-    }                                                                   \
+#define MAKE_OP(OPNAME, SUFF, OPKIND, STORE)                                \
+static void OPNAME ## _pixels ## SUFF ## _axp                               \
+        (uint8_t *restrict block, const uint8_t *restrict pixels,           \
+         int line_size, int h)                                              \
+{                                                                           \
+    if ((size_t) pixels & 0x7) {                                            \
+        OPKIND(uldq, STORE);                                                \
+    } else {                                                                \
+        OPKIND(ldq, STORE);                                                 \
+    }                                                                       \
+}                                                                           \
+                                                                            \
+static void OPNAME ## _pixels16 ## SUFF ## _axp                             \
+        (uint8_t *restrict block, const uint8_t *restrict pixels,           \
+         int line_size, int h)                                              \
+{                                                                           \
+    OPNAME ## _pixels ## SUFF ## _axp(block,     pixels,     line_size, h); \
+    OPNAME ## _pixels ## SUFF ## _axp(block + 8, pixels + 8, line_size, h); \
 }
 
 #define PIXOP(OPNAME, STORE)                    \
@@ -268,8 +276,35 @@
 #define STORE(l, b) stq(AVG2(l, ldq(b)), b);
 PIXOP(avg_no_rnd, STORE);
 
+void put_pixels16_axp_asm(uint8_t *block, const uint8_t *pixels,
+                          int line_size, int h)
+{
+    put_pixels_axp_asm(block,     pixels,     line_size, h);
+    put_pixels_axp_asm(block + 8, pixels + 8, line_size, h);
+}
+
 void dsputil_init_alpha(void)
 {
+    put_pixels_tab[0][0] = put_pixels16_axp_asm;
+    put_pixels_tab[0][1] = put_pixels16_x2_axp;
+    put_pixels_tab[0][2] = put_pixels16_y2_axp;
+    put_pixels_tab[0][3] = put_pixels16_xy2_axp;
+
+    put_no_rnd_pixels_tab[0][0] = put_pixels16_axp_asm;
+    put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_axp;
+    put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_axp;
+    put_no_rnd_pixels_tab[0][3] = put_no_rnd_pixels16_xy2_axp;
+
+    avg_pixels_tab[0][0] = avg_pixels16_axp;
+    avg_pixels_tab[0][1] = avg_pixels16_x2_axp;
+    avg_pixels_tab[0][2] = avg_pixels16_y2_axp;
+    avg_pixels_tab[0][3] = avg_pixels16_xy2_axp;
+
+    avg_no_rnd_pixels_tab[0][0] = avg_no_rnd_pixels16_axp;
+    avg_no_rnd_pixels_tab[0][1] = avg_no_rnd_pixels16_x2_axp;
+    avg_no_rnd_pixels_tab[0][2] = avg_no_rnd_pixels16_y2_axp;
+    avg_no_rnd_pixels_tab[0][3] = avg_no_rnd_pixels16_xy2_axp;
+
     put_pixels_tab[1][0] = put_pixels_axp_asm;
     put_pixels_tab[1][1] = put_pixels_x2_axp;
     put_pixels_tab[1][2] = put_pixels_y2_axp;