diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-14 18:32:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-14 20:42:28 +0200 |
commit | b065d0014be37094b872246b7126997700c839c7 (patch) | |
tree | 270fdc393bacb14f463765b6d6756e11dcbec28b /libavcodec | |
parent | 7128a35f8c4bdfb8b749b1e453c69cfd15eb9f07 (diff) | |
download | ffmpeg-b065d0014be37094b872246b7126997700c839c7.tar.gz |
avcodec/ppc/idct_altivec: add plain idct()
Tested-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ppc/dsputil_altivec.h | 1 | ||||
-rw-r--r-- | libavcodec/ppc/dsputil_ppc.c | 1 | ||||
-rw-r--r-- | libavcodec/ppc/idct_altivec.c | 16 |
3 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/ppc/dsputil_altivec.h b/libavcodec/ppc/dsputil_altivec.h index cdbfc35ac3..225d1b0d9c 100644 --- a/libavcodec/ppc/dsputil_altivec.h +++ b/libavcodec/ppc/dsputil_altivec.h @@ -30,6 +30,7 @@ void ff_fdct_altivec(int16_t *block); void ff_gmc1_altivec(uint8_t *dst, uint8_t *src, int stride, int h, int x16, int y16, int rounder); +void ff_idct_altivec(int16_t *block); void ff_idct_put_altivec(uint8_t *dest, int line_size, int16_t *block); void ff_idct_add_altivec(uint8_t *dest, int line_size, int16_t *block); diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c index cbb1cfbcc8..a8ab0c3974 100644 --- a/libavcodec/ppc/dsputil_ppc.c +++ b/libavcodec/ppc/dsputil_ppc.c @@ -158,6 +158,7 @@ av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx, if (avctx->lowres == 0) { if ((avctx->idct_algo == FF_IDCT_AUTO) || (avctx->idct_algo == FF_IDCT_ALTIVEC)) { + c->idct = ff_idct_altivec; c->idct_put = ff_idct_put_altivec; c->idct_add = ff_idct_add_altivec; c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; diff --git a/libavcodec/ppc/idct_altivec.c b/libavcodec/ppc/idct_altivec.c index cb6bd67a6f..10620b22d0 100644 --- a/libavcodec/ppc/idct_altivec.c +++ b/libavcodec/ppc/idct_altivec.c @@ -148,6 +148,22 @@ static const vec_s16 constants[5] = { { 19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722 } }; +void ff_idct_altivec(int16_t *blk) +{ + vec_s16 *block = (vec_s16 *) blk; + + IDCT; + + block[0] = vx0; + block[1] = vx1; + block[2] = vx2; + block[3] = vx3; + block[4] = vx4; + block[5] = vx5; + block[6] = vx6; + block[7] = vx7; +} + void ff_idct_put_altivec(uint8_t *dest, int stride, int16_t *blk) { vec_s16 *block = (vec_s16 *) blk; |