[FFmpeg-cvslog] avcodec/ppc/idct_altivec: add plain idct()
Michael Niedermayer
git at videolan.org
Sat Jun 14 20:48:15 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun 14 18:32:17 2014 +0200| [b065d0014be37094b872246b7126997700c839c7] | committer: Michael Niedermayer
avcodec/ppc/idct_altivec: add plain idct()
Tested-by: Carl Eugen Hoyos <cehoyos at ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b065d0014be37094b872246b7126997700c839c7
---
libavcodec/ppc/dsputil_altivec.h | 1 +
libavcodec/ppc/dsputil_ppc.c | 1 +
libavcodec/ppc/idct_altivec.c | 16 ++++++++++++++++
3 files changed, 18 insertions(+)
diff --git a/libavcodec/ppc/dsputil_altivec.h b/libavcodec/ppc/dsputil_altivec.h
index cdbfc35..225d1b0 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 cbb1cfb..a8ab0c3 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 cb6bd67..10620b2 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;
More information about the ffmpeg-cvslog
mailing list