avcodec/ppc/idct_altivec: add plain idct()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 14 Jun 2014 16:32:17 +0000 (18:32 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 14 Jun 2014 18:42:28 +0000 (20:42 +0200)
Tested-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ppc/dsputil_altivec.h
libavcodec/ppc/dsputil_ppc.c
libavcodec/ppc/idct_altivec.c

index cdbfc35..225d1b0 100644 (file)
@@ -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);
 
index cbb1cfb..a8ab0c3 100644 (file)
@@ -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;
index cb6bd67..10620b2 100644 (file)
@@ -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;