Mercurial > libavcodec.hg
comparison sparc/dsputil_vis.c @ 5618:ad0ab0eebd69 libavcodec
add simple_idct implemented in Sparc VIS
patch by Balatoni Denes % dbalatoni A interware P hu%
Original thread: Messages starting with:
[PATCH] SPARC VIS simple_idct *
author | gpoirier |
---|---|
date | Thu, 30 Aug 2007 19:18:23 +0000 |
parents | d5ba514e3f4a |
children | c0f471cc871d |
comparison
equal
deleted
inserted
replaced
5617:4051bdeecabf | 5618:ad0ab0eebd69 |
---|---|
32 #include <setjmp.h> | 32 #include <setjmp.h> |
33 | 33 |
34 #include "dsputil.h" | 34 #include "dsputil.h" |
35 | 35 |
36 #include "vis.h" | 36 #include "vis.h" |
37 | |
38 extern void ff_simple_idct_put_vis(uint8_t *dest, int line_size, DCTELEM *data); | |
39 extern void ff_simple_idct_add_vis(uint8_t *dest, int line_size, DCTELEM *data); | |
40 extern void ff_simple_idct_vis(DCTELEM *data); | |
37 | 41 |
38 /* The trick used in some of this file is the formula from the MMX | 42 /* The trick used in some of this file is the formula from the MMX |
39 * motion comp code, which is: | 43 * motion comp code, which is: |
40 * | 44 * |
41 * (x+y+1)>>1 == (x|y)-((x^y)>>1) | 45 * (x+y+1)>>1 == (x|y)-((x^y)>>1) |
4043 { | 4047 { |
4044 /* VIS specific optimisations */ | 4048 /* VIS specific optimisations */ |
4045 int accel = vis_level (); | 4049 int accel = vis_level (); |
4046 | 4050 |
4047 if (accel & ACCEL_SPARC_VIS) { | 4051 if (accel & ACCEL_SPARC_VIS) { |
4052 if(avctx->idct_algo==FF_IDCT_SIMPLEVIS){ | |
4053 c->idct_put = ff_simple_idct_put_vis; | |
4054 c->idct_add = ff_simple_idct_add_vis; | |
4055 c->idct = ff_simple_idct_vis; | |
4056 c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; | |
4057 } | |
4058 | |
4048 c->put_pixels_tab[0][0] = MC_put_o_16_vis; | 4059 c->put_pixels_tab[0][0] = MC_put_o_16_vis; |
4049 c->put_pixels_tab[0][1] = MC_put_x_16_vis; | 4060 c->put_pixels_tab[0][1] = MC_put_x_16_vis; |
4050 c->put_pixels_tab[0][2] = MC_put_y_16_vis; | 4061 c->put_pixels_tab[0][2] = MC_put_y_16_vis; |
4051 c->put_pixels_tab[0][3] = MC_put_xy_16_vis; | 4062 c->put_pixels_tab[0][3] = MC_put_xy_16_vis; |
4052 | 4063 |