aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ppc/int_altivec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-12-23 19:48:43 +0100
committerDiego Biurrun <diego@biurrun.de>2014-05-29 06:41:15 -0700
commit65d5d5865845f057cc6530a8d0f34db952d9009c (patch)
tree87f2ff44f58d550ae4076e741a4c6b3564d98bc0 /libavcodec/ppc/int_altivec.c
parent2ea2612df508abdd1f97c6a6ef56275a52c5c41e (diff)
downloadffmpeg-65d5d5865845f057cc6530a8d0f34db952d9009c.tar.gz
dsputil: Move SVQ1 encoding specific bits into svq1enc
Diffstat (limited to 'libavcodec/ppc/int_altivec.c')
-rw-r--r--libavcodec/ppc/int_altivec.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/libavcodec/ppc/int_altivec.c b/libavcodec/ppc/int_altivec.c
index cd1984a54c..fa3cb66095 100644
--- a/libavcodec/ppc/int_altivec.c
+++ b/libavcodec/ppc/int_altivec.c
@@ -34,48 +34,6 @@
#include "libavcodec/dsputil.h"
#include "dsputil_altivec.h"
-static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2,
- int size)
-{
- int i, size16 = size >> 4;
- vector signed char vpix1;
- vector signed short vpix2, vdiff, vpix1l, vpix1h;
- union {
- vector signed int vscore;
- int32_t score[4];
- } u = { .vscore = vec_splat_s32(0) };
-
-// XXX lazy way, fix it later
-
- while (size16) {
- // score += (pix1[i] - pix2[i]) * (pix1[i] - pix2[i]);
- // load pix1 and the first batch of pix2
-
- vpix1 = vec_unaligned_load(pix1);
- vpix2 = vec_unaligned_load(pix2);
- pix2 += 8;
- // unpack
- vpix1h = vec_unpackh(vpix1);
- vdiff = vec_sub(vpix1h, vpix2);
- vpix1l = vec_unpackl(vpix1);
- // load another batch from pix2
- vpix2 = vec_unaligned_load(pix2);
- u.vscore = vec_msum(vdiff, vdiff, u.vscore);
- vdiff = vec_sub(vpix1l, vpix2);
- u.vscore = vec_msum(vdiff, vdiff, u.vscore);
- pix1 += 16;
- pix2 += 8;
- size16--;
- }
- u.vscore = vec_sums(u.vscore, vec_splat_s32(0));
-
- size %= 16;
- for (i = 0; i < size; i++)
- u.score[3] += (pix1[i] - pix2[i]) * (pix1[i] - pix2[i]);
-
- return u.score[3];
-}
-
static int32_t scalarproduct_int16_altivec(const int16_t *v1, const int16_t *v2,
int order)
{
@@ -140,8 +98,6 @@ static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1,
av_cold void ff_int_init_altivec(DSPContext *c, AVCodecContext *avctx)
{
- c->ssd_int8_vs_int16 = ssd_int8_vs_int16_altivec;
-
c->scalarproduct_int16 = scalarproduct_int16_altivec;
c->scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_altivec;