summaryrefslogtreecommitdiff
path: root/libavcodec/alpha/dsputil_alpha.c
diff options
context:
space:
mode:
authorFalk Hüffner <mellum@users.sourceforge.net>2002-07-05 19:16:26 +0000
committerFalk Hüffner <mellum@users.sourceforge.net>2002-07-05 19:16:26 +0000
commit0a12d6fdfda914663baa460537c36da76f7af3ec (patch)
tree4da3ebb2ed7c4af6cdafc8314167f5dc99614c0b /libavcodec/alpha/dsputil_alpha.c
parent02da51ec6073e2ab5ef536e6ecc2c1cbc67f1952 (diff)
Implement clear_blocks_axp.
Originally committed as revision 722 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/alpha/dsputil_alpha.c')
-rw-r--r--libavcodec/alpha/dsputil_alpha.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/alpha/dsputil_alpha.c b/libavcodec/alpha/dsputil_alpha.c
index db11d529fb..816f945857 100644
--- a/libavcodec/alpha/dsputil_alpha.c
+++ b/libavcodec/alpha/dsputil_alpha.c
@@ -105,6 +105,24 @@ void add_pixels_clamped_mvi(const DCTELEM *block, uint8_t *pixels,
}
#endif
+static void clear_blocks_axp(DCTELEM *blocks) {
+ uint64_t *p = (uint64_t *) blocks;
+ int n = sizeof(DCTELEM) * 6 * 64;
+
+ do {
+ p[0] = 0;
+ p[1] = 0;
+ p[2] = 0;
+ p[3] = 0;
+ p[4] = 0;
+ p[5] = 0;
+ p[6] = 0;
+ p[7] = 0;
+ p += 8;
+ n -= 8 * 8;
+ } while (n);
+}
+
static inline uint64_t avg2_no_rnd(uint64_t a, uint64_t b)
{
return (a & b) + (((a ^ b) & BYTE_VEC(0xfe)) >> 1);
@@ -259,6 +277,8 @@ void dsputil_init_alpha(void)
avg_no_rnd_pixels_tab[2] = avg_no_rnd_pixels_y2_axp;
avg_no_rnd_pixels_tab[3] = avg_no_rnd_pixels_xy2_axp;
+ clear_blocks = clear_blocks_axp;
+
/* amask clears all bits that correspond to present features. */
if (amask(AMASK_MVI) == 0) {
put_pixels_clamped = put_pixels_clamped_mvi_asm;