diff ppc/dsputil_altivec.c @ 11969:3cd4cd0509cd libavcodec

Remove PPC perf counter support This functionality is better accessed through tools like oprofile.
author mru
date Sat, 26 Jun 2010 22:23:35 +0000
parents 50415a8f1451
children
line wrap: on
line diff
--- a/ppc/dsputil_altivec.c	Sat Jun 26 22:23:29 2010 +0000
+++ b/ppc/dsputil_altivec.c	Sat Jun 26 22:23:35 2010 +0000
@@ -25,7 +25,6 @@
 #include <altivec.h>
 #endif
 #include "libavcodec/dsputil.h"
-#include "dsputil_ppc.h"
 #include "util_altivec.h"
 #include "types_altivec.h"
 #include "dsputil_altivec.h"
@@ -610,7 +609,6 @@
 /* next one assumes that ((line_size % 16) == 0) */
 void put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h)
 {
-POWERPC_PERF_DECLARE(altivec_put_pixels16_num, 1);
     register vector unsigned char pixelsv1, pixelsv2;
     register vector unsigned char pixelsv1B, pixelsv2B;
     register vector unsigned char pixelsv1C, pixelsv2C;
@@ -622,7 +620,6 @@
     register int line_size_3 = line_size + line_size_2;
     register int line_size_4 = line_size << 2;
 
-POWERPC_PERF_START_COUNT(altivec_put_pixels16_num, 1);
 // hand-unrolling the loop by 4 gains about 15%
 // mininum execution time goes from 74 to 60 cycles
 // it's faster than -funroll-loops, but using
@@ -659,20 +656,16 @@
         block +=line_size_4;
     }
 #endif
-POWERPC_PERF_STOP_COUNT(altivec_put_pixels16_num, 1);
 }
 
 /* next one assumes that ((line_size % 16) == 0) */
 #define op_avg(a,b)  a = ( ((a)|(b)) - ((((a)^(b))&0xFEFEFEFEUL)>>1) )
 void avg_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h)
 {
-POWERPC_PERF_DECLARE(altivec_avg_pixels16_num, 1);
     register vector unsigned char pixelsv1, pixelsv2, pixelsv, blockv;
     register vector unsigned char perm = vec_lvsl(0, pixels);
     int i;
 
-POWERPC_PERF_START_COUNT(altivec_avg_pixels16_num, 1);
-
     for (i = 0; i < h; i++) {
         pixelsv1 = vec_ld( 0, pixels);
         pixelsv2 = vec_ld(16,pixels);
@@ -683,19 +676,14 @@
         pixels+=line_size;
         block +=line_size;
     }
-
-POWERPC_PERF_STOP_COUNT(altivec_avg_pixels16_num, 1);
 }
 
 /* next one assumes that ((line_size % 8) == 0) */
 static void avg_pixels8_altivec(uint8_t * block, const uint8_t * pixels, int line_size, int h)
 {
-POWERPC_PERF_DECLARE(altivec_avg_pixels8_num, 1);
     register vector unsigned char pixelsv1, pixelsv2, pixelsv, blockv;
     int i;
 
-POWERPC_PERF_START_COUNT(altivec_avg_pixels8_num, 1);
-
    for (i = 0; i < h; i++) {
        /* block is 8 bytes-aligned, so we're either in the
           left block (16 bytes-aligned) or in the right block (not) */
@@ -719,14 +707,11 @@
        pixels += line_size;
        block += line_size;
    }
-
-POWERPC_PERF_STOP_COUNT(altivec_avg_pixels8_num, 1);
 }
 
 /* next one assumes that ((line_size % 8) == 0) */
 static void put_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h)
 {
-POWERPC_PERF_DECLARE(altivec_put_pixels8_xy2_num, 1);
     register int i;
     register vector unsigned char pixelsv1, pixelsv2, pixelsavg;
     register vector unsigned char blockv, temp1, temp2;
@@ -748,7 +733,6 @@
                          (vector unsigned short)pixelsv2);
     pixelssum1 = vec_add(pixelssum1, vctwo);
 
-POWERPC_PERF_START_COUNT(altivec_put_pixels8_xy2_num, 1);
     for (i = 0; i < h ; i++) {
         int rightside = ((unsigned long)block & 0x0000000F);
         blockv = vec_ld(0, block);
@@ -782,14 +766,11 @@
         block += line_size;
         pixels += line_size;
     }
-
-POWERPC_PERF_STOP_COUNT(altivec_put_pixels8_xy2_num, 1);
 }
 
 /* next one assumes that ((line_size % 8) == 0) */
 static void put_no_rnd_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h)
 {
-POWERPC_PERF_DECLARE(altivec_put_no_rnd_pixels8_xy2_num, 1);
     register int i;
     register vector unsigned char pixelsv1, pixelsv2, pixelsavg;
     register vector unsigned char blockv, temp1, temp2;
@@ -812,7 +793,6 @@
                          (vector unsigned short)pixelsv2);
     pixelssum1 = vec_add(pixelssum1, vcone);
 
-POWERPC_PERF_START_COUNT(altivec_put_no_rnd_pixels8_xy2_num, 1);
     for (i = 0; i < h ; i++) {
         int rightside = ((unsigned long)block & 0x0000000F);
         blockv = vec_ld(0, block);
@@ -846,14 +826,11 @@
         block += line_size;
         pixels += line_size;
     }
-
-POWERPC_PERF_STOP_COUNT(altivec_put_no_rnd_pixels8_xy2_num, 1);
 }
 
 /* next one assumes that ((line_size % 16) == 0) */
 static void put_pixels16_xy2_altivec(uint8_t * block, const uint8_t * pixels, int line_size, int h)
 {
-POWERPC_PERF_DECLARE(altivec_put_pixels16_xy2_num, 1);
     register int i;
     register vector unsigned char pixelsv1, pixelsv2, pixelsv3, pixelsv4;
     register vector unsigned char blockv, temp1, temp2;
@@ -862,8 +839,6 @@
     register const vector unsigned char vczero = (const vector unsigned char)vec_splat_u8(0);
     register const vector unsigned short vctwo = (const vector unsigned short)vec_splat_u16(2);
 
-POWERPC_PERF_START_COUNT(altivec_put_pixels16_xy2_num, 1);
-
     temp1 = vec_ld(0, pixels);
     temp2 = vec_ld(16, pixels);
     pixelsv1 = vec_perm(temp1, temp2, vec_lvsl(0, pixels));
@@ -919,14 +894,11 @@
         block += line_size;
         pixels += line_size;
     }
-
-POWERPC_PERF_STOP_COUNT(altivec_put_pixels16_xy2_num, 1);
 }
 
 /* next one assumes that ((line_size % 16) == 0) */
 static void put_no_rnd_pixels16_xy2_altivec(uint8_t * block, const uint8_t * pixels, int line_size, int h)
 {
-POWERPC_PERF_DECLARE(altivec_put_no_rnd_pixels16_xy2_num, 1);
     register int i;
     register vector unsigned char pixelsv1, pixelsv2, pixelsv3, pixelsv4;
     register vector unsigned char blockv, temp1, temp2;
@@ -936,8 +908,6 @@
     register const vector unsigned short vcone = (const vector unsigned short)vec_splat_u16(1);
     register const vector unsigned short vctwo = (const vector unsigned short)vec_splat_u16(2);
 
-POWERPC_PERF_START_COUNT(altivec_put_no_rnd_pixels16_xy2_num, 1);
-
     temp1 = vec_ld(0, pixels);
     temp2 = vec_ld(16, pixels);
     pixelsv1 = vec_perm(temp1, temp2, vec_lvsl(0, pixels));
@@ -993,18 +963,14 @@
         block += line_size;
         pixels += line_size;
     }
-
-POWERPC_PERF_STOP_COUNT(altivec_put_no_rnd_pixels16_xy2_num, 1);
 }
 
 static int hadamard8_diff8x8_altivec(/*MpegEncContext*/ void *s, uint8_t *dst, uint8_t *src, int stride, int h){
-POWERPC_PERF_DECLARE(altivec_hadamard8_diff8x8_num, 1);
     int sum;
     register const vector unsigned char vzero =
                             (const vector unsigned char)vec_splat_u8(0);
     register vector signed short temp0, temp1, temp2, temp3, temp4,
                                  temp5, temp6, temp7;
-POWERPC_PERF_START_COUNT(altivec_hadamard8_diff8x8_num, 1);
     {
     register const vector signed short vprod1 =(const vector signed short)
                                                { 1,-1, 1,-1, 1,-1, 1,-1 };
@@ -1100,7 +1066,6 @@
     vsum = vec_splat(vsum, 3);
     vec_ste(vsum, 0, &sum);
     }
-POWERPC_PERF_STOP_COUNT(altivec_hadamard8_diff8x8_num, 1);
     return sum;
 }
 
@@ -1319,16 +1284,13 @@
 }
 
 static int hadamard8_diff16_altivec(/*MpegEncContext*/ void *s, uint8_t *dst, uint8_t *src, int stride, int h){
-POWERPC_PERF_DECLARE(altivec_hadamard8_diff16_num, 1);
     int score;
-POWERPC_PERF_START_COUNT(altivec_hadamard8_diff16_num, 1);
     score = hadamard8_diff16x8_altivec(s, dst, src, stride, 8);
     if (h==16) {
         dst += 8*stride;
         src += 8*stride;
         score += hadamard8_diff16x8_altivec(s, dst, src, stride, 8);
     }
-POWERPC_PERF_STOP_COUNT(altivec_hadamard8_diff16_num, 1);
     return score;
 }
 
@@ -1358,7 +1320,6 @@
 /* next one assumes that ((line_size % 8) == 0) */
 static void avg_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h)
 {
-POWERPC_PERF_DECLARE(altivec_avg_pixels8_xy2_num, 1);
     register int i;
     register vector unsigned char pixelsv1, pixelsv2, pixelsavg;
     register vector unsigned char blockv, temp1, temp2, blocktemp;
@@ -1383,7 +1344,6 @@
                          (vector unsigned short)pixelsv2);
     pixelssum1 = vec_add(pixelssum1, vctwo);
 
-POWERPC_PERF_START_COUNT(altivec_avg_pixels8_xy2_num, 1);
     for (i = 0; i < h ; i++) {
         int rightside = ((unsigned long)block & 0x0000000F);
         blockv = vec_ld(0, block);
@@ -1418,8 +1378,6 @@
         block += line_size;
         pixels += line_size;
     }
-
-POWERPC_PERF_STOP_COUNT(altivec_avg_pixels8_xy2_num, 1);
 }
 
 void dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx)