diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-07 15:27:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-07 15:36:58 +0200 |
commit | 020865f557ccf06a41ecc461fd13ce6678817d04 (patch) | |
tree | 657a0da279922b830200908b6e620be025e20b85 /libavcodec/ppc/dsputil_altivec.c | |
parent | 462c6cdb8ed256d2063815b67ca4d14e62e25802 (diff) | |
parent | c166148409fe8f0dbccef2fe684286a40ba1e37d (diff) | |
download | ffmpeg-020865f557ccf06a41ecc461fd13ce6678817d04.tar.gz |
Merge commit 'c166148409fe8f0dbccef2fe684286a40ba1e37d'
* commit 'c166148409fe8f0dbccef2fe684286a40ba1e37d':
dsputil: Move pix_sum, pix_norm1, shrink function pointers to mpegvideoenc
Conflicts:
libavcodec/dsputil.c
libavcodec/mpegvideo_enc.c
libavcodec/x86/dsputilenc.asm
libavcodec/x86/dsputilenc_mmx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ppc/dsputil_altivec.c')
-rw-r--r-- | libavcodec/ppc/dsputil_altivec.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/libavcodec/ppc/dsputil_altivec.c b/libavcodec/ppc/dsputil_altivec.c index 20b15b019e..5ab1b51e2b 100644 --- a/libavcodec/ppc/dsputil_altivec.c +++ b/libavcodec/ppc/dsputil_altivec.c @@ -308,34 +308,6 @@ static int sad8_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int pix_norm1_altivec(uint8_t *pix, int line_size) -{ - int i, s = 0; - const vector unsigned int zero = - (const vector unsigned int) vec_splat_u32(0); - vector unsigned char perm = vec_lvsl(0, pix); - vector unsigned int sv = (vector unsigned int) vec_splat_u32(0); - vector signed int sum; - - for (i = 0; i < 16; i++) { - /* Read the potentially unaligned pixels. */ - vector unsigned char pixl = vec_ld(0, pix); - vector unsigned char pixr = vec_ld(15, pix); - vector unsigned char pixv = vec_perm(pixl, pixr, perm); - - /* Square the values, and add them to our sum. */ - sv = vec_msum(pixv, pixv, sv); - - pix += line_size; - } - /* Sum up the four partial sums, and put the result into s. */ - sum = vec_sums((vector signed int) sv, (vector signed int) zero); - sum = vec_splat(sum, 3); - vec_ste(sum, 0, &s); - - return s; -} - /* Sum of Squared Errors for an 8x8 block, AltiVec-enhanced. * It's the sad8_altivec code above w/ squaring added. */ static int sse8_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, @@ -430,35 +402,6 @@ static int sse16_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int pix_sum_altivec(uint8_t *pix, int line_size) -{ - int i, s; - const vector unsigned int zero = - (const vector unsigned int) vec_splat_u32(0); - vector unsigned char perm = vec_lvsl(0, pix); - vector unsigned int sad = (vector unsigned int) vec_splat_u32(0); - vector signed int sumdiffs; - - for (i = 0; i < 16; i++) { - /* Read the potentially unaligned 16 pixels into t1. */ - vector unsigned char pixl = vec_ld(0, pix); - vector unsigned char pixr = vec_ld(15, pix); - vector unsigned char t1 = vec_perm(pixl, pixr, perm); - - /* Add each 4 pixel group together and put 4 results into sad. */ - sad = vec_sum4s(t1, sad); - - pix += line_size; - } - - /* Sum up the four partial sums, and put the result into s. */ - sumdiffs = vec_sums((vector signed int) sad, (vector signed int) zero); - sumdiffs = vec_splat(sumdiffs, 3); - vec_ste(sumdiffs, 0, &s); - - return s; -} - static void get_pixels_altivec(int16_t *restrict block, const uint8_t *pixels, int line_size) { @@ -911,9 +854,6 @@ av_cold void ff_dsputil_init_altivec(DSPContext *c, AVCodecContext *avctx, c->sse[0] = sse16_altivec; c->sse[1] = sse8_altivec; - c->pix_norm1 = pix_norm1_altivec; - c->pix_sum = pix_sum_altivec; - c->diff_pixels = diff_pixels_altivec; if (!high_bit_depth) { |