diff options
author | Zdenek Kabelac <kabi@informatics.muni.cz> | 2002-11-11 10:04:45 +0000 |
---|---|---|
committer | Zdenek Kabelac <kabi@informatics.muni.cz> | 2002-11-11 10:04:45 +0000 |
commit | af19f78f2fe2b969104d4419efd25fdee90a2814 (patch) | |
tree | 2eb293152ccf514d37b27b043f564315a08513f4 /libavcodec/alpha | |
parent | 85bd552606ec60eeda76728734f772a8fde27622 (diff) | |
download | ffmpeg-af19f78f2fe2b969104d4419efd25fdee90a2814.tar.gz |
* using DSPContext - so each codec could use its local (sub)set of CPU extension
* these are untested - users/developers please check
Originally committed as revision 1197 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/alpha')
-rw-r--r-- | libavcodec/alpha/dsputil_alpha.c | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/libavcodec/alpha/dsputil_alpha.c b/libavcodec/alpha/dsputil_alpha.c index 371e20269b..401dfd7877 100644 --- a/libavcodec/alpha/dsputil_alpha.c +++ b/libavcodec/alpha/dsputil_alpha.c @@ -281,61 +281,61 @@ void put_pixels16_axp_asm(uint8_t *block, const uint8_t *pixels, put_pixels_axp_asm(block + 8, pixels + 8, line_size, h); } -void dsputil_init_alpha(void) +void dsputil_init_alpha(DSPContext* c, unsigned mask) { - 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; - put_pixels_tab[1][3] = put_pixels_xy2_axp; - - put_no_rnd_pixels_tab[1][0] = put_pixels_axp_asm; - put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels_x2_axp; - put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels_y2_axp; - put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels_xy2_axp; - - avg_pixels_tab[1][0] = avg_pixels_axp; - avg_pixels_tab[1][1] = avg_pixels_x2_axp; - avg_pixels_tab[1][2] = avg_pixels_y2_axp; - avg_pixels_tab[1][3] = avg_pixels_xy2_axp; - - avg_no_rnd_pixels_tab[1][0] = avg_no_rnd_pixels_axp; - avg_no_rnd_pixels_tab[1][1] = avg_no_rnd_pixels_x2_axp; - avg_no_rnd_pixels_tab[1][2] = avg_no_rnd_pixels_y2_axp; - avg_no_rnd_pixels_tab[1][3] = avg_no_rnd_pixels_xy2_axp; - - clear_blocks = clear_blocks_axp; + c->put_pixels_tab[0][0] = put_pixels16_axp_asm; + c->put_pixels_tab[0][1] = put_pixels16_x2_axp; + c->put_pixels_tab[0][2] = put_pixels16_y2_axp; + c->put_pixels_tab[0][3] = put_pixels16_xy2_axp; + + c->put_no_rnd_pixels_tab[0][0] = put_pixels16_axp_asm; + c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_axp; + c->put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_axp; + c->put_no_rnd_pixels_tab[0][3] = put_no_rnd_pixels16_xy2_axp; + + c->avg_pixels_tab[0][0] = avg_pixels16_axp; + c->avg_pixels_tab[0][1] = avg_pixels16_x2_axp; + c->avg_pixels_tab[0][2] = avg_pixels16_y2_axp; + c->avg_pixels_tab[0][3] = avg_pixels16_xy2_axp; + + c->avg_no_rnd_pixels_tab[0][0] = avg_no_rnd_pixels16_axp; + c->avg_no_rnd_pixels_tab[0][1] = avg_no_rnd_pixels16_x2_axp; + c->avg_no_rnd_pixels_tab[0][2] = avg_no_rnd_pixels16_y2_axp; + c->avg_no_rnd_pixels_tab[0][3] = avg_no_rnd_pixels16_xy2_axp; + + c->put_pixels_tab[1][0] = put_pixels_axp_asm; + c->put_pixels_tab[1][1] = put_pixels_x2_axp; + c->put_pixels_tab[1][2] = put_pixels_y2_axp; + c->put_pixels_tab[1][3] = put_pixels_xy2_axp; + + c->put_no_rnd_pixels_tab[1][0] = put_pixels_axp_asm; + c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels_x2_axp; + c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels_y2_axp; + c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels_xy2_axp; + + c->avg_pixels_tab[1][0] = avg_pixels_axp; + c->avg_pixels_tab[1][1] = avg_pixels_x2_axp; + c->avg_pixels_tab[1][2] = avg_pixels_y2_axp; + c->avg_pixels_tab[1][3] = avg_pixels_xy2_axp; + + c->avg_no_rnd_pixels_tab[1][0] = avg_no_rnd_pixels_axp; + c->avg_no_rnd_pixels_tab[1][1] = avg_no_rnd_pixels_x2_axp; + c->avg_no_rnd_pixels_tab[1][2] = avg_no_rnd_pixels_y2_axp; + c->avg_no_rnd_pixels_tab[1][3] = avg_no_rnd_pixels_xy2_axp; + + c->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; - add_pixels_clamped = add_pixels_clamped_mvi_asm; - - get_pixels = get_pixels_mvi; - diff_pixels = diff_pixels_mvi; - pix_abs8x8 = pix_abs8x8_mvi; - pix_abs16x16 = pix_abs16x16_mvi_asm; - pix_abs16x16_x2 = pix_abs16x16_x2_mvi; - pix_abs16x16_y2 = pix_abs16x16_y2_mvi; - pix_abs16x16_xy2 = pix_abs16x16_xy2_mvi; + c->put_pixels_clamped = put_pixels_clamped_mvi_asm; + c->add_pixels_clamped = add_pixels_clamped_mvi_asm; + + c->get_pixels = get_pixels_mvi; + c->diff_pixels = diff_pixels_mvi; + c->pix_abs8x8 = pix_abs8x8_mvi; + c->pix_abs16x16 = pix_abs16x16_mvi_asm; + c->pix_abs16x16_x2 = pix_abs16x16_x2_mvi; + c->pix_abs16x16_y2 = pix_abs16x16_y2_mvi; + c->pix_abs16x16_xy2 = pix_abs16x16_xy2_mvi; } } |