aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/alpha
diff options
context:
space:
mode:
authorFalk Hüffner <mellum@users.sourceforge.net>2002-09-13 23:27:01 +0000
committerFalk Hüffner <mellum@users.sourceforge.net>2002-09-13 23:27:01 +0000
commit8c7b533e8b686228cd3637b3f28e812bd75f720e (patch)
treee770a5617d493b05be477d4613af4f60784a91c0 /libavcodec/alpha
parent050fe8bab5e772f04e271c069e9d85c17f08e94f (diff)
downloadffmpeg-8c7b533e8b686228cd3637b3f28e812bd75f720e.tar.gz
Synthesize pixels16 functions from pixels functions.
Originally committed as revision 942 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/alpha')
-rw-r--r--libavcodec/alpha/dsputil_alpha.c55
1 files changed, 45 insertions, 10 deletions
diff --git a/libavcodec/alpha/dsputil_alpha.c b/libavcodec/alpha/dsputil_alpha.c
index 5f4b0c3e12..fef86fe64a 100644
--- a/libavcodec/alpha/dsputil_alpha.c
+++ b/libavcodec/alpha/dsputil_alpha.c
@@ -224,16 +224,24 @@ static inline uint64_t avg4(uint64_t l1, uint64_t l2, uint64_t l3, uint64_t l4)
} 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 @@ PIXOP(put_no_rnd, STORE);
#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;