History

Remove PPC perf counter support

This functionality is better accessed through tools like oprofile. Originally committed as revision 23808 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård committed 16 years ago

Commit 2829ce41 parent a78819613 files · +0 −513Browse files

Unified · Split

13 files
  1. configure +0 −4
  2. doc/ffmpeg_powerpc_performance_evaluation_howto.txt +0 −172
  3. ffmpeg.c +0 −5
  4. libavcodec/ppc/dsputil_altivec.c +0 −42
  5. libavcodec/ppc/dsputil_ppc.c +0 −79
  6. libavcodec/ppc/dsputil_ppc.h +0 −154
  7. libavcodec/ppc/fdct_altivec.c +0 −7
  8. libavcodec/ppc/fft_altivec.c +0 −6
  9. libavcodec/ppc/gmc_altivec.c +0 −8
  10. libavcodec/ppc/h264_altivec.c +0 −1
  11. libavcodec/ppc/h264_template_altivec.c +0 −16
  12. libavcodec/ppc/idct_altivec.c +0 −14
  13. libavcodec/ppc/mpegvideo_altivec.c +0 −5
configure+0−4
@@ -211,8 +211,6 @@ Advanced options (experts only): · 210 unmodified lines
211211 --arch=ARCH select architecture [$arch]
212212 --cpu=CPU select the minimum required CPU (affects
213213 instruction selection, may crash on older CPUs)
214− --enable-powerpc-perf enable performance report on PPC
215− (requires enabling PMC)
216214 --disable-asm disable all assembler optimizations
217215 --disable-altivec disable AltiVec optimizations
218216 --disable-amd3dnow disable 3DNow! optimizations
@@ -886,7 +884,6 @@ CONFIG_LIST=" · 667 unmodified lines
886884 nonfree
887885 pic
888886 postproc
889− powerpc_perf
890887 rdft
891888 runtime_cpudetect
892889 shared
@@ -2772,7 +2769,6 @@ if enabled ppc; then · 1879 unmodified lines
27722769 echo "AltiVec enabled ${altivec-no}"
27732770 echo "PPC 4xx optimizations ${ppc4xx-no}"
27742771 echo "dcbzl available ${dcbzl-no}"
2775− echo "performance report ${powerpc_perf-no}"
27762772 fi
27772773 if enabled sparc; then
27782774 echo "VIS enabled ${vis-no}"
doc/ffmpeg_powerpc_performance_evaluation_howto.txt+0−172
@@ -1,172 +0,0 @@
1−FFmpeg & evaluating performance on the PowerPC Architecture HOWTO
2−
3−(c) 2003-2004 Romain Dolbeau <romain@dolbeau.org>
4−
5−
6−
7−I - Introduction
8−
9−The PowerPC architecture and its SIMD extension AltiVec offer some
10−interesting tools to evaluate performance and improve the code.
11−This document tries to explain how to use those tools with FFmpeg.
12−
13−The architecture itself offers two ways to evaluate the performance of
14−a given piece of code:
15−
16−1) The Time Base Registers (TBL)
17−2) The Performance Monitor Counter Registers (PMC)
18−
19−The first ones are always available, always active, but they're not very
20−accurate: the registers increment by one every four *bus* cycles. On
21−my 667 Mhz tiBook (ppc7450), this means once every twenty *processor*
22−cycles. So we won't use that.
23−
24−The PMC are much more useful: not only can they report cycle-accurate
25−timing, but they can also be used to monitor many other parameters,
26−such as the number of AltiVec stalls for every kind of instruction,
27−or instruction cache misses. The downside is that not all processors
28−support the PMC (all G3, all G4 and the 970 do support them), and
29−they're inactive by default - you need to activate them with a
30−dedicated tool. Also, the number of available PMC depends on the
31−procesor: the various 604 have 2, the various 75x (aka. G3) have 4,
32−and the various 74xx (aka G4) have 6.
33−
34−*WARNING*: The PowerPC 970 is not very well documented, and its PMC
35−registers are 64 bits wide. To properly notify the code, you *must*
36−tune for the 970 (using --tune=970), or the code will assume 32 bit
37−registers.
38−
39−
40−II - Enabling FFmpeg PowerPC performance support
41−
42−This needs to be done by hand. First, you need to configure FFmpeg as
43−usual, but add the "--powerpc-perf-enable" option. For instance:
44−
45−#####
46−./configure --prefix=/usr/local/ffmpeg-svn --cc=gcc-3.3 --tune=7450 --powerpc-perf-enable
47−#####
48−
49−This will configure FFmpeg to install inside /usr/local/ffmpeg-svn,
50−compiling with gcc-3.3 (you should try to use this one or a newer
51−gcc), and tuning for the PowerPC 7450 (i.e. the newer G4; as a rule of
52−thumb, those at 550Mhz and more). It will also enable the PMC.
53−
54−You may also edit the file "config.h" to enable the following line:
55−
56−#####
57−// #define ALTIVEC_USE_REFERENCE_C_CODE 1
58−#####
59−
60−If you enable this line, then the code will not make use of AltiVec,
61−but will use the reference C code instead. This is useful to compare
62−performance between two versions of the code.
63−
64−Also, the number of enabled PMC is defined in "libavcodec/ppc/dsputil_ppc.h":
65−
66−#####
67−#define POWERPC_NUM_PMC_ENABLED 4
68−#####
69−
70−If you have a G4 CPU, you can enable all 6 PMC. DO NOT enable more
71−PMC than available on your CPU!
72−
73−Then, simply compile FFmpeg as usual (make && make install).
74−
75−
76−
77−III - Using FFmpeg PowerPC performance support
78−
79−This FFmeg can be used exactly as usual. But before exiting, FFmpeg
80−will dump a per-function report that looks like this:
81−
82−#####
83−PowerPC performance report
84− Values are from the PMC registers, and represent whatever the
85− registers are set to record.
86− Function "gmc1_altivec" (pmc1):
87− min: 231
88− max: 1339867
89− avg: 558.25 (255302)
90− Function "gmc1_altivec" (pmc2):
91− min: 93
92− max: 2164
93− avg: 267.31 (255302)
94− Function "gmc1_altivec" (pmc3):
95− min: 72
96− max: 1987
97− avg: 276.20 (255302)
98−(...)
99−#####
100−
101−In this example, PMC1 was set to record CPU cycles, PMC2 was set to
102−record AltiVec Permute Stall Cycles, and PMC3 was set to record AltiVec
103−Issue Stalls.
104−
105−The function "gmc1_altivec" was monitored 255302 times, and the
106−minimum execution time was 231 processor cycles. The max and average
107−aren't much use, as it's very likely the OS interrupted execution for
108−reasons of its own :-(
109−
110−With the exact same settings and source file, but using the reference C
111−code we get:
112−
113−#####
114−PowerPC performance report
115− Values are from the PMC registers, and represent whatever the
116− registers are set to record.
117− Function "gmc1_altivec" (pmc1):
118− min: 592
119− max: 2532235
120− avg: 962.88 (255302)
121− Function "gmc1_altivec" (pmc2):
122− min: 0
123− max: 33
124− avg: 0.00 (255302)
125− Function "gmc1_altivec" (pmc3):
126− min: 0
127− max: 350
128− avg: 0.03 (255302)
129−(...)
130−#####
131−
132−592 cycles, so the fastest AltiVec execution is about 2.5x faster than
133−the fastest C execution in this example. It's not perfect but it's not
134−bad (well I wrote this function so I can't say otherwise :-).
135−
136−Once you have that kind of report, you can try to improve things by
137−finding what goes wrong and fixing it; in the example above, one
138−should try to diminish the number of AltiVec stalls, as this *may*
139−improve performance.
140−
141−
142−
143−IV) Enabling the PMC in Mac OS X
144−
145−This is easy. Use "Monster" and "monster". Those tools come from
146−Apple's CHUD package, and can be found hidden in the developer web
147−site & FTP site. "MONster" is the graphical application, use it to
148−generate a config file specifying what each register should
149−monitor. Then use the command-line application "monster" to use that
150−config file, and enjoy the results.
151−
152−Note that "MONster" can be used for many other things, but it's
153−documented by Apple, it's not my subject.
154−
155−If you are using CHUD 4.4.2 or later, you'll notice that MONster is
156−no longer available. It's been superseeded by Shark, where
157−configuration of PMCs is available as a plugin.
158−
159−
160−
161−V) Enabling the PMC on Linux
162−
163−On linux you may use oprofile from http://oprofile.sf.net, depending on the
164−version and the cpu you may need to apply a patch[1] to access a set of the
165−possibile counters from the userspace application. You can always define them
166−using the kernel interface /dev/oprofile/* .
167−
168−[1] http://dev.gentoo.org/~lu_zero/development/oprofile-g4-20060423.patch
169−
170−--
171−Romain Dolbeau <romain@dolbeau.org>
172−Luca Barbato <lu_zero@gentoo.org>
ffmpeg.c+0−5
@@ -618,11 +618,6 @@ static int av_exit(int ret) · 617 unmodified lines
618618
619619 av_free(video_standard);
620620
621−#if CONFIG_POWERPC_PERF
622− void powerpc_display_perf_report(void);
623− powerpc_display_perf_report();
624−#endif /* CONFIG_POWERPC_PERF */
625−
626621 for (i=0;i<AVMEDIA_TYPE_NB;i++)
627622 av_free(avcodec_opts[i]);
628623 av_free(avformat_opts);
libavcodec/ppc/dsputil_altivec.c+0−42
@@ -25,7 +25,6 @@ · 24 unmodified lines
2525 #include <altivec.h>
2626 #endif
2727 #include "libavcodec/dsputil.h"
28−#include "dsputil_ppc.h"
2928 #include "util_altivec.h"
3029 #include "types_altivec.h"
3130 #include "dsputil_altivec.h"
@@ -610,7 +609,6 @@ static void add_bytes_altivec(uint8_t *dst, uint8_t *src, int w) { · 578 unmodified lines
610609 /* next one assumes that ((line_size % 16) == 0) */
611610 void put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h)
612611 {
613−POWERPC_PERF_DECLARE(altivec_put_pixels16_num, 1);
614612 register vector unsigned char pixelsv1, pixelsv2;
615613 register vector unsigned char pixelsv1B, pixelsv2B;
616614 register vector unsigned char pixelsv1C, pixelsv2C;
@@ -622,7 +620,6 @@ POWERPC_PERF_DECLARE(altivec_put_pixels16_num, 1); · 5 unmodified lines
622620 register int line_size_3 = line_size + line_size_2;
623621 register int line_size_4 = line_size << 2;
624622
625−POWERPC_PERF_START_COUNT(altivec_put_pixels16_num, 1);
626623 // hand-unrolling the loop by 4 gains about 15%
627624 // mininum execution time goes from 74 to 60 cycles
628625 // it's faster than -funroll-loops, but using
@@ -659,20 +656,16 @@ POWERPC_PERF_START_COUNT(altivec_put_pixels16_num, 1); · 30 unmodified lines
659656 block +=line_size_4;
660657 }
661658 #endif
662−POWERPC_PERF_STOP_COUNT(altivec_put_pixels16_num, 1);
663659 }
664660
665661 /* next one assumes that ((line_size % 16) == 0) */
666662 #define op_avg(a,b) a = ( ((a)|(b)) - ((((a)^(b))&0xFEFEFEFEUL)>>1) )
667663 void avg_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h)
668664 {
669−POWERPC_PERF_DECLARE(altivec_avg_pixels16_num, 1);
670665 register vector unsigned char pixelsv1, pixelsv2, pixelsv, blockv;
671666 register vector unsigned char perm = vec_lvsl(0, pixels);
672667 int i;
673668
674−POWERPC_PERF_START_COUNT(altivec_avg_pixels16_num, 1);
675−
676669 for (i = 0; i < h; i++) {
677670 pixelsv1 = vec_ld( 0, pixels);
678671 pixelsv2 = vec_ld(16,pixels);
@@ -683,19 +676,14 @@ POWERPC_PERF_START_COUNT(altivec_avg_pixels16_num, 1); · 4 unmodified lines
683676 pixels+=line_size;
684677 block +=line_size;
685678 }
686−
687−POWERPC_PERF_STOP_COUNT(altivec_avg_pixels16_num, 1);
688679 }
689680
690681 /* next one assumes that ((line_size % 8) == 0) */
691682 static void avg_pixels8_altivec(uint8_t * block, const uint8_t * pixels, int line_size, int h)
692683 {
693−POWERPC_PERF_DECLARE(altivec_avg_pixels8_num, 1);
694684 register vector unsigned char pixelsv1, pixelsv2, pixelsv, blockv;
695685 int i;
696686
697−POWERPC_PERF_START_COUNT(altivec_avg_pixels8_num, 1);
698−
699687 for (i = 0; i < h; i++) {
700688 /* block is 8 bytes-aligned, so we're either in the
701689 left block (16 bytes-aligned) or in the right block (not) */
@@ -719,14 +707,11 @@ POWERPC_PERF_START_COUNT(altivec_avg_pixels8_num, 1); · 17 unmodified lines
719707 pixels += line_size;
720708 block += line_size;
721709 }
722−
723−POWERPC_PERF_STOP_COUNT(altivec_avg_pixels8_num, 1);
724710 }
725711
726712 /* next one assumes that ((line_size % 8) == 0) */
727713 static void put_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h)
728714 {
729−POWERPC_PERF_DECLARE(altivec_put_pixels8_xy2_num, 1);
730715 register int i;
731716 register vector unsigned char pixelsv1, pixelsv2, pixelsavg;
732717 register vector unsigned char blockv, temp1, temp2;
@@ -748,7 +733,6 @@ POWERPC_PERF_DECLARE(altivec_put_pixels8_xy2_num, 1); · 15 unmodified lines
748733 (vector unsigned short)pixelsv2);
749734 pixelssum1 = vec_add(pixelssum1, vctwo);
750735
751−POWERPC_PERF_START_COUNT(altivec_put_pixels8_xy2_num, 1);
752736 for (i = 0; i < h ; i++) {
753737 int rightside = ((unsigned long)block & 0x0000000F);
754738 blockv = vec_ld(0, block);
@@ -782,14 +766,11 @@ POWERPC_PERF_START_COUNT(altivec_put_pixels8_xy2_num, 1); · 27 unmodified lines
782766 block += line_size;
783767 pixels += line_size;
784768 }
785−
786−POWERPC_PERF_STOP_COUNT(altivec_put_pixels8_xy2_num, 1);
787769 }
788770
789771 /* next one assumes that ((line_size % 8) == 0) */
790772 static void put_no_rnd_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h)
791773 {
792−POWERPC_PERF_DECLARE(altivec_put_no_rnd_pixels8_xy2_num, 1);
793774 register int i;
794775 register vector unsigned char pixelsv1, pixelsv2, pixelsavg;
795776 register vector unsigned char blockv, temp1, temp2;
@@ -812,7 +793,6 @@ POWERPC_PERF_DECLARE(altivec_put_no_rnd_pixels8_xy2_num, 1); · 16 unmodified lines
812793 (vector unsigned short)pixelsv2);
813794 pixelssum1 = vec_add(pixelssum1, vcone);
814795
815−POWERPC_PERF_START_COUNT(altivec_put_no_rnd_pixels8_xy2_num, 1);
816796 for (i = 0; i < h ; i++) {
817797 int rightside = ((unsigned long)block & 0x0000000F);
818798 blockv = vec_ld(0, block);
@@ -846,14 +826,11 @@ POWERPC_PERF_START_COUNT(altivec_put_no_rnd_pixels8_xy2_num, 1); · 27 unmodified lines
846826 block += line_size;
847827 pixels += line_size;
848828 }
849−
850−POWERPC_PERF_STOP_COUNT(altivec_put_no_rnd_pixels8_xy2_num, 1);
851829 }
852830
853831 /* next one assumes that ((line_size % 16) == 0) */
854832 static void put_pixels16_xy2_altivec(uint8_t * block, const uint8_t * pixels, int line_size, int h)
855833 {
856−POWERPC_PERF_DECLARE(altivec_put_pixels16_xy2_num, 1);
857834 register int i;
858835 register vector unsigned char pixelsv1, pixelsv2, pixelsv3, pixelsv4;
859836 register vector unsigned char blockv, temp1, temp2;
@@ -862,8 +839,6 @@ POWERPC_PERF_DECLARE(altivec_put_pixels16_xy2_num, 1); · 2 unmodified lines
862839 register const vector unsigned char vczero = (const vector unsigned char)vec_splat_u8(0);
863840 register const vector unsigned short vctwo = (const vector unsigned short)vec_splat_u16(2);
864841
865−POWERPC_PERF_START_COUNT(altivec_put_pixels16_xy2_num, 1);
866−
867842 temp1 = vec_ld(0, pixels);
868843 temp2 = vec_ld(16, pixels);
869844 pixelsv1 = vec_perm(temp1, temp2, vec_lvsl(0, pixels));
@@ -919,14 +894,11 @@ POWERPC_PERF_START_COUNT(altivec_put_pixels16_xy2_num, 1); · 49 unmodified lines
919894 block += line_size;
920895 pixels += line_size;
921896 }
922−
923−POWERPC_PERF_STOP_COUNT(altivec_put_pixels16_xy2_num, 1);
924897 }
925898
926899 /* next one assumes that ((line_size % 16) == 0) */
927900 static void put_no_rnd_pixels16_xy2_altivec(uint8_t * block, const uint8_t * pixels, int line_size, int h)
928901 {
929−POWERPC_PERF_DECLARE(altivec_put_no_rnd_pixels16_xy2_num, 1);
930902 register int i;
931903 register vector unsigned char pixelsv1, pixelsv2, pixelsv3, pixelsv4;
932904 register vector unsigned char blockv, temp1, temp2;
@@ -936,8 +908,6 @@ POWERPC_PERF_DECLARE(altivec_put_no_rnd_pixels16_xy2_num, 1); · 3 unmodified lines
936908 register const vector unsigned short vcone = (const vector unsigned short)vec_splat_u16(1);
937909 register const vector unsigned short vctwo = (const vector unsigned short)vec_splat_u16(2);
938910
939−POWERPC_PERF_START_COUNT(altivec_put_no_rnd_pixels16_xy2_num, 1);
940−
941911 temp1 = vec_ld(0, pixels);
942912 temp2 = vec_ld(16, pixels);
943913 pixelsv1 = vec_perm(temp1, temp2, vec_lvsl(0, pixels));
@@ -993,18 +963,14 @@ POWERPC_PERF_START_COUNT(altivec_put_no_rnd_pixels16_xy2_num, 1); · 49 unmodified lines
993963 block += line_size;
994964 pixels += line_size;
995965 }
996−
997−POWERPC_PERF_STOP_COUNT(altivec_put_no_rnd_pixels16_xy2_num, 1);
998966 }
999967
1000968 static int hadamard8_diff8x8_altivec(/*MpegEncContext*/ void *s, uint8_t *dst, uint8_t *src, int stride, int h){
1001−POWERPC_PERF_DECLARE(altivec_hadamard8_diff8x8_num, 1);
1002969 int sum;
1003970 register const vector unsigned char vzero =
1004971 (const vector unsigned char)vec_splat_u8(0);
1005972 register vector signed short temp0, temp1, temp2, temp3, temp4,
1006973 temp5, temp6, temp7;
1007−POWERPC_PERF_START_COUNT(altivec_hadamard8_diff8x8_num, 1);
1008974 {
1009975 register const vector signed short vprod1 =(const vector signed short)
1010976 { 1,-1, 1,-1, 1,-1, 1,-1 };
@@ -1100,7 +1066,6 @@ POWERPC_PERF_START_COUNT(altivec_hadamard8_diff8x8_num, 1); · 89 unmodified lines
11001066 vsum = vec_splat(vsum, 3);
11011067 vec_ste(vsum, 0, &sum);
11021068 }
1103−POWERPC_PERF_STOP_COUNT(altivec_hadamard8_diff8x8_num, 1);
11041069 return sum;
11051070 }
11061071
@@ -1319,16 +1284,13 @@ static int hadamard8_diff16x8_altivec(/*MpegEncContext*/ void *s, uint8_t *dst, · 212 unmodified lines
13191284 }
13201285
13211286 static int hadamard8_diff16_altivec(/*MpegEncContext*/ void *s, uint8_t *dst, uint8_t *src, int stride, int h){
1322−POWERPC_PERF_DECLARE(altivec_hadamard8_diff16_num, 1);
13231287 int score;
1324−POWERPC_PERF_START_COUNT(altivec_hadamard8_diff16_num, 1);
13251288 score = hadamard8_diff16x8_altivec(s, dst, src, stride, 8);
13261289 if (h==16) {
13271290 dst += 8*stride;
13281291 src += 8*stride;
13291292 score += hadamard8_diff16x8_altivec(s, dst, src, stride, 8);
13301293 }
1331−POWERPC_PERF_STOP_COUNT(altivec_hadamard8_diff16_num, 1);
13321294 return score;
13331295 }
13341296
@@ -1358,7 +1320,6 @@ static void vorbis_inverse_coupling_altivec(float *mag, float *ang, · 23 unmodified lines
13581320 /* next one assumes that ((line_size % 8) == 0) */
13591321 static void avg_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h)
13601322 {
1361−POWERPC_PERF_DECLARE(altivec_avg_pixels8_xy2_num, 1);
13621323 register int i;
13631324 register vector unsigned char pixelsv1, pixelsv2, pixelsavg;
13641325 register vector unsigned char blockv, temp1, temp2, blocktemp;
@@ -1383,7 +1344,6 @@ POWERPC_PERF_DECLARE(altivec_avg_pixels8_xy2_num, 1); · 18 unmodified lines
13831344 (vector unsigned short)pixelsv2);
13841345 pixelssum1 = vec_add(pixelssum1, vctwo);
13851346
1386−POWERPC_PERF_START_COUNT(altivec_avg_pixels8_xy2_num, 1);
13871347 for (i = 0; i < h ; i++) {
13881348 int rightside = ((unsigned long)block & 0x0000000F);
13891349 blockv = vec_ld(0, block);
@@ -1418,8 +1378,6 @@ POWERPC_PERF_START_COUNT(altivec_avg_pixels8_xy2_num, 1); · 28 unmodified lines
14181378 block += line_size;
14191379 pixels += line_size;
14201380 }
1421−
1422−POWERPC_PERF_STOP_COUNT(altivec_avg_pixels8_xy2_num, 1);
14231381 }
14241382
14251383 void dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx)
libavcodec/ppc/dsputil_ppc.c+0−79
@@ -21,9 +21,6 @@ · 20 unmodified lines
2121 */
2222
2323 #include "libavcodec/dsputil.h"
24−
25−#include "dsputil_ppc.h"
26−
2724 #include "dsputil_altivec.h"
2825
2926 int mm_flags = 0;
@@ -39,63 +36,6 @@ int mm_support(void) · 9 unmodified lines
3936 return result;
4037 }
4138
42−#if CONFIG_POWERPC_PERF
43−unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
44−/* list below must match enum in dsputil_ppc.h */
45−static unsigned char* perfname[] = {
46− "ff_fft_calc_altivec",
47− "gmc1_altivec",
48− "dct_unquantize_h263_altivec",
49− "fdct_altivec",
50− "idct_add_altivec",
51− "idct_put_altivec",
52− "put_pixels16_altivec",
53− "avg_pixels16_altivec",
54− "avg_pixels8_altivec",
55− "put_pixels8_xy2_altivec",
56− "put_no_rnd_pixels8_xy2_altivec",
57− "put_pixels16_xy2_altivec",
58− "put_no_rnd_pixels16_xy2_altivec",
59− "hadamard8_diff8x8_altivec",
60− "hadamard8_diff16_altivec",
61− "avg_pixels8_xy2_altivec",
62− "clear_blocks_dcbz32_ppc",
63− "clear_blocks_dcbz128_ppc",
64− "put_h264_chroma_mc8_altivec",
65− "avg_h264_chroma_mc8_altivec",
66− "put_h264_qpel16_h_lowpass_altivec",
67− "avg_h264_qpel16_h_lowpass_altivec",
68− "put_h264_qpel16_v_lowpass_altivec",
69− "avg_h264_qpel16_v_lowpass_altivec",
70− "put_h264_qpel16_hv_lowpass_altivec",
71− "avg_h264_qpel16_hv_lowpass_altivec",
72− ""
73−};
74−#include <stdio.h>
75−#endif
76−
77−#if CONFIG_POWERPC_PERF
78−void powerpc_display_perf_report(void)
79−{
80− int i, j;
81− av_log(NULL, AV_LOG_INFO, "PowerPC performance report\n Values are from the PMC registers, and represent whatever the registers are set to record.\n");
82− for(i = 0 ; i < powerpc_perf_total ; i++) {
83− for (j = 0; j < POWERPC_NUM_PMC_ENABLED ; j++) {
84− if (perfdata[j][i][powerpc_data_num] != (unsigned long long)0)
85− av_log(NULL, AV_LOG_INFO,
86− " Function \"%s\" (pmc%d):\n\tmin: %"PRIu64"\n\tmax: %"PRIu64"\n\tavg: %1.2lf (%"PRIu64")\n",
87− perfname[i],
88− j+1,
89− perfdata[j][i][powerpc_data_min],
90− perfdata[j][i][powerpc_data_max],
91− (double)perfdata[j][i][powerpc_data_sum] /
92− (double)perfdata[j][i][powerpc_data_num],
93− perfdata[j][i][powerpc_data_num]);
94− }
95− }
96−}
97−#endif /* CONFIG_POWERPC_PERF */
98−
9939 /* ***** WARNING ***** WARNING ***** WARNING ***** */
10040 /*
10141 clear_blocks_dcbz32_ppc will not work properly on PowerPC processors with a
@@ -118,10 +58,8 @@ and <http://developer.apple.com/technotes/tn/tn2086.html> · 16 unmodified lines
11858 */
11959 static void clear_blocks_dcbz32_ppc(DCTELEM *blocks)
12060 {
121−POWERPC_PERF_DECLARE(powerpc_clear_blocks_dcbz32, 1);
12261 register int misal = ((unsigned long)blocks & 0x00000010);
12362 register int i = 0;
124−POWERPC_PERF_START_COUNT(powerpc_clear_blocks_dcbz32, 1);
12563 #if 1
12664 if (misal) {
12765 ((unsigned long*)blocks)[0] = 0L;
@@ -143,7 +81,6 @@ POWERPC_PERF_START_COUNT(powerpc_clear_blocks_dcbz32, 1); · 15 unmodified lines
14381 #else
14482 memset(blocks, 0, sizeof(DCTELEM)*6*64);
14583 #endif
146−POWERPC_PERF_STOP_COUNT(powerpc_clear_blocks_dcbz32, 1);
14784 }
14885
14986 /* same as above, when dcbzl clear a whole 128B cache line
@@ -151,10 +88,8 @@ POWERPC_PERF_STOP_COUNT(powerpc_clear_blocks_dcbz32, 1); · 1 unmodified line
15188 #if HAVE_DCBZL
15289 static void clear_blocks_dcbz128_ppc(DCTELEM *blocks)
15390 {
154−POWERPC_PERF_DECLARE(powerpc_clear_blocks_dcbz128, 1);
15591 register int misal = ((unsigned long)blocks & 0x0000007f);
15692 register int i = 0;
157−POWERPC_PERF_START_COUNT(powerpc_clear_blocks_dcbz128, 1);
15893 #if 1
15994 if (misal) {
16095 // we could probably also optimize this case,
@@ -169,7 +104,6 @@ POWERPC_PERF_START_COUNT(powerpc_clear_blocks_dcbz128, 1); · 8 unmodified lines
169104 #else
170105 memset(blocks, 0, sizeof(DCTELEM)*6*64);
171106 #endif
172−POWERPC_PERF_STOP_COUNT(powerpc_clear_blocks_dcbz128, 1);
173107 }
174108 #else
175109 static void clear_blocks_dcbz128_ppc(DCTELEM *blocks)
@@ -279,19 +213,6 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) · 103 unmodified lines
279213 }
280214 }
281215
282−#if CONFIG_POWERPC_PERF
283− {
284− int i, j;
285− for (i = 0 ; i < powerpc_perf_total ; i++) {
286− for (j = 0; j < POWERPC_NUM_PMC_ENABLED ; j++) {
287− perfdata[j][i][powerpc_data_min] = 0xFFFFFFFFFFFFFFFFULL;
288− perfdata[j][i][powerpc_data_max] = 0x0000000000000000ULL;
289− perfdata[j][i][powerpc_data_sum] = 0x0000000000000000ULL;
290− perfdata[j][i][powerpc_data_num] = 0x0000000000000000ULL;
291− }
292− }
293− }
294−#endif /* CONFIG_POWERPC_PERF */
295216 }
296217 #endif /* HAVE_ALTIVEC */
297218 }
libavcodec/ppc/dsputil_ppc.h+0−154
@@ -1,154 +0,0 @@
1−/*
2− * Copyright (c) 2003-2004 Romain Dolbeau <romain@dolbeau.org>
3− *
4− * This file is part of FFmpeg.
5− *
6− * FFmpeg is free software; you can redistribute it and/or
7− * modify it under the terms of the GNU Lesser General Public
8− * License as published by the Free Software Foundation; either
9− * version 2.1 of the License, or (at your option) any later version.
10− *
11− * FFmpeg is distributed in the hope that it will be useful,
12− * but WITHOUT ANY WARRANTY; without even the implied warranty of
13− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14− * Lesser General Public License for more details.
15− *
16− * You should have received a copy of the GNU Lesser General Public
17− * License along with FFmpeg; if not, write to the Free Software
18− * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19− */
20−
21−#ifndef AVCODEC_PPC_DSPUTIL_PPC_H
22−#define AVCODEC_PPC_DSPUTIL_PPC_H
23−
24−#include "config.h"
25−
26−#if CONFIG_POWERPC_PERF
27−void powerpc_display_perf_report(void);
28−/* the 604* have 2, the G3* have 4, the G4s have 6,
29− and the G5 are completely different (they MUST use
30− ARCH_PPC64, and let's hope all future 64 bis PPC
31− will use the same PMCs... */
32−#define POWERPC_NUM_PMC_ENABLED 6
33−/* if you add to the enum below, also add to the perfname array
34− in dsputil_ppc.c */
35−enum powerpc_perf_index {
36− altivec_fft_num = 0,
37− altivec_gmc1_num,
38− altivec_dct_unquantize_h263_num,
39− altivec_fdct,
40− altivec_idct_add_num,
41− altivec_idct_put_num,
42− altivec_put_pixels16_num,
43− altivec_avg_pixels16_num,
44− altivec_avg_pixels8_num,
45− altivec_put_pixels8_xy2_num,
46− altivec_put_no_rnd_pixels8_xy2_num,
47− altivec_put_pixels16_xy2_num,
48− altivec_put_no_rnd_pixels16_xy2_num,
49− altivec_hadamard8_diff8x8_num,
50− altivec_hadamard8_diff16_num,
51− altivec_avg_pixels8_xy2_num,
52− powerpc_clear_blocks_dcbz32,
53− powerpc_clear_blocks_dcbz128,
54− altivec_put_h264_chroma_mc8_num,
55− altivec_avg_h264_chroma_mc8_num,
56− altivec_put_h264_qpel16_h_lowpass_num,
57− altivec_avg_h264_qpel16_h_lowpass_num,
58− altivec_put_h264_qpel16_v_lowpass_num,
59− altivec_avg_h264_qpel16_v_lowpass_num,
60− altivec_put_h264_qpel16_hv_lowpass_num,
61− altivec_avg_h264_qpel16_hv_lowpass_num,
62− powerpc_perf_total
63−};
64−enum powerpc_data_index {
65− powerpc_data_min = 0,
66− powerpc_data_max,
67− powerpc_data_sum,
68− powerpc_data_num,
69− powerpc_data_total
70−};
71−extern unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
72−
73−#if !ARCH_PPC64
74−#define POWERP_PMC_DATATYPE unsigned long
75−#define POWERPC_GET_PMC1(a) __asm__ volatile("mfspr %0, 937" : "=r" (a))
76−#define POWERPC_GET_PMC2(a) __asm__ volatile("mfspr %0, 938" : "=r" (a))
77−#if (POWERPC_NUM_PMC_ENABLED > 2)
78−#define POWERPC_GET_PMC3(a) __asm__ volatile("mfspr %0, 941" : "=r" (a))
79−#define POWERPC_GET_PMC4(a) __asm__ volatile("mfspr %0, 942" : "=r" (a))
80−#else
81−#define POWERPC_GET_PMC3(a) do {} while (0)
82−#define POWERPC_GET_PMC4(a) do {} while (0)
83−#endif
84−#if (POWERPC_NUM_PMC_ENABLED > 4)
85−#define POWERPC_GET_PMC5(a) __asm__ volatile("mfspr %0, 929" : "=r" (a))
86−#define POWERPC_GET_PMC6(a) __asm__ volatile("mfspr %0, 930" : "=r" (a))
87−#else
88−#define POWERPC_GET_PMC5(a) do {} while (0)
89−#define POWERPC_GET_PMC6(a) do {} while (0)
90−#endif
91−#else /* ARCH_PPC64 */
92−#define POWERP_PMC_DATATYPE unsigned long long
93−#define POWERPC_GET_PMC1(a) __asm__ volatile("mfspr %0, 771" : "=r" (a))
94−#define POWERPC_GET_PMC2(a) __asm__ volatile("mfspr %0, 772" : "=r" (a))
95−#if (POWERPC_NUM_PMC_ENABLED > 2)
96−#define POWERPC_GET_PMC3(a) __asm__ volatile("mfspr %0, 773" : "=r" (a))
97−#define POWERPC_GET_PMC4(a) __asm__ volatile("mfspr %0, 774" : "=r" (a))
98−#else
99−#define POWERPC_GET_PMC3(a) do {} while (0)
100−#define POWERPC_GET_PMC4(a) do {} while (0)
101−#endif
102−#if (POWERPC_NUM_PMC_ENABLED > 4)
103−#define POWERPC_GET_PMC5(a) __asm__ volatile("mfspr %0, 775" : "=r" (a))
104−#define POWERPC_GET_PMC6(a) __asm__ volatile("mfspr %0, 776" : "=r" (a))
105−#else
106−#define POWERPC_GET_PMC5(a) do {} while (0)
107−#define POWERPC_GET_PMC6(a) do {} while (0)
108−#endif
109−#endif /* ARCH_PPC64 */
110−#define POWERPC_PERF_DECLARE(a, cond) \
111− POWERP_PMC_DATATYPE \
112− pmc_start[POWERPC_NUM_PMC_ENABLED], \
113− pmc_stop[POWERPC_NUM_PMC_ENABLED], \
114− pmc_loop_index;
115−#define POWERPC_PERF_START_COUNT(a, cond) do { \
116− POWERPC_GET_PMC6(pmc_start[5]); \
117− POWERPC_GET_PMC5(pmc_start[4]); \
118− POWERPC_GET_PMC4(pmc_start[3]); \
119− POWERPC_GET_PMC3(pmc_start[2]); \
120− POWERPC_GET_PMC2(pmc_start[1]); \
121− POWERPC_GET_PMC1(pmc_start[0]); \
122− } while (0)
123−#define POWERPC_PERF_STOP_COUNT(a, cond) do { \
124− POWERPC_GET_PMC1(pmc_stop[0]); \
125− POWERPC_GET_PMC2(pmc_stop[1]); \
126− POWERPC_GET_PMC3(pmc_stop[2]); \
127− POWERPC_GET_PMC4(pmc_stop[3]); \
128− POWERPC_GET_PMC5(pmc_stop[4]); \
129− POWERPC_GET_PMC6(pmc_stop[5]); \
130− if (cond) { \
131− for(pmc_loop_index = 0; \
132− pmc_loop_index < POWERPC_NUM_PMC_ENABLED; \
133− pmc_loop_index++) { \
134− if (pmc_stop[pmc_loop_index] >= pmc_start[pmc_loop_index]) { \
135− POWERP_PMC_DATATYPE diff = \
136− pmc_stop[pmc_loop_index] - pmc_start[pmc_loop_index]; \
137− if (diff < perfdata[pmc_loop_index][a][powerpc_data_min]) \
138− perfdata[pmc_loop_index][a][powerpc_data_min] = diff; \
139− if (diff > perfdata[pmc_loop_index][a][powerpc_data_max]) \
140− perfdata[pmc_loop_index][a][powerpc_data_max] = diff; \
141− perfdata[pmc_loop_index][a][powerpc_data_sum] += diff; \
142− perfdata[pmc_loop_index][a][powerpc_data_num] ++; \
143− } \
144− } \
145− } \
146−} while (0)
147−#else /* CONFIG_POWERPC_PERF */
148−// those are needed to avoid empty statements.
149−#define POWERPC_PERF_DECLARE(a, cond) int altivec_placeholder __attribute__ ((unused))
150−#define POWERPC_PERF_START_COUNT(a, cond) do {} while (0)
151−#define POWERPC_PERF_STOP_COUNT(a, cond) do {} while (0)
152−#endif /* CONFIG_POWERPC_PERF */
153−
154−#endif /* AVCODEC_PPC_DSPUTIL_PPC_H */
libavcodec/ppc/fdct_altivec.c+0−7
@@ -24,7 +24,6 @@ · 23 unmodified lines
2424 #endif
2525 #include "libavutil/common.h"
2626 #include "libavcodec/dsputil.h"
27−#include "dsputil_ppc.h"
2827 #include "dsputil_altivec.h"
2928
3029 #define vs16(v) ((vector signed short)(v))
@@ -198,7 +197,6 @@ static vector float fdctconsts[3] = { · 167 unmodified lines
198197
199198 void fdct_altivec(int16_t *block)
200199 {
201−POWERPC_PERF_DECLARE(altivec_fdct, 1);
202200 vector signed short *bp;
203201 vector float *cp;
204202 vector float b00, b10, b20, b30, b40, b50, b60, b70;
@@ -206,9 +204,6 @@ POWERPC_PERF_DECLARE(altivec_fdct, 1); · 1 unmodified line
206204 vector float mzero, cnst, cnsts0, cnsts1, cnsts2;
207205 vector float x0, x1, x2, x3, x4, x5, x6, x7, x8;
208206
209− POWERPC_PERF_START_COUNT(altivec_fdct, 1);
210−
211−
212207 /* setup constants {{{ */
213208 /* mzero = -0.0 */
214209 mzero = ((vector float)vec_splat_u32(-1));
@@ -487,8 +482,6 @@ POWERPC_PERF_DECLARE(altivec_fdct, 1); · 272 unmodified lines
487482
488483 #undef CTS
489484 /* }}} */
490−
491−POWERPC_PERF_STOP_COUNT(altivec_fdct, 1);
492485 }
493486
494487 /* vim:set foldmethod=marker foldlevel=0: */
libavcodec/ppc/fft_altivec.c+0−6
@@ -21,7 +21,6 @@ · 20 unmodified lines
2121 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2222 */
2323 #include "libavcodec/fft.h"
24−#include "dsputil_ppc.h"
2524 #include "util_altivec.h"
2625 #include "dsputil_altivec.h"
2726
@@ -38,7 +37,6 @@ · 10 unmodified lines
3837 */
3938 static void ff_fft_calc_altivec(FFTContext *s, FFTComplex *z)
4039 {
41−POWERPC_PERF_DECLARE(altivec_fft_num, s->nbits >= 6);
4240 register const vector float vczero = (const vector float)vec_splat_u32(0.);
4341
4442 int ln = s->nbits;
@@ -48,8 +46,6 @@ POWERPC_PERF_DECLARE(altivec_fft_num, s->nbits >= 6); · 3 unmodified lines
4846 FFTComplex *cptr, *cptr1;
4947 int k;
5048
51−POWERPC_PERF_START_COUNT(altivec_fft_num, s->nbits >= 6);
52−
5349 np = 1 << ln;
5450
5551 {
@@ -132,8 +128,6 @@ POWERPC_PERF_START_COUNT(altivec_fft_num, s->nbits >= 6); · 76 unmodified lines
132128 nblocks = nblocks >> 1;
133129 nloops = nloops << 1;
134130 } while (nblocks != 0);
135−
136−POWERPC_PERF_STOP_COUNT(altivec_fft_num, s->nbits >= 6);
137131 }
138132
139133 av_cold void ff_fft_init_altivec(FFTContext *s)
libavcodec/ppc/gmc_altivec.c+0−8
@@ -21,7 +21,6 @@ · 20 unmodified lines
2121 */
2222
2323 #include "libavcodec/dsputil.h"
24−#include "dsputil_ppc.h"
2524 #include "util_altivec.h"
2625 #include "types_altivec.h"
2726 #include "dsputil_altivec.h"
@@ -30,10 +29,8 @@ · 2 unmodified lines
3029 altivec-enhanced gmc1. ATM this code assume stride is a multiple of 8,
3130 to preserve proper dst alignment.
3231 */
33−#define GMC1_PERF_COND (h==8)
3432 void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, int stride, int h, int x16, int y16, int rounder)
3533 {
36−POWERPC_PERF_DECLARE(altivec_gmc1_num, GMC1_PERF_COND);
3734 const DECLARE_ALIGNED(16, unsigned short, rounder_a) = rounder;
3835 const DECLARE_ALIGNED(16, unsigned short, ABCD)[8] =
3936 {
@@ -51,9 +48,6 @@ POWERPC_PERF_DECLARE(altivec_gmc1_num, GMC1_PERF_COND); · 11 unmodified lines
5148 unsigned long dst_odd = (unsigned long)dst & 0x0000000F;
5249 unsigned long src_really_odd = (unsigned long)src & 0x0000000F;
5350
54−
55−POWERPC_PERF_START_COUNT(altivec_gmc1_num, GMC1_PERF_COND);
56−
5751 tempA = vec_ld(0, (unsigned short*)ABCD);
5852 Av = vec_splat(tempA, 0);
5953 Bv = vec_splat(tempA, 1);
@@ -133,6 +127,4 @@ POWERPC_PERF_START_COUNT(altivec_gmc1_num, GMC1_PERF_COND); · 73 unmodified lines
133127 dst += stride;
134128 src += stride;
135129 }
136−
137−POWERPC_PERF_STOP_COUNT(altivec_gmc1_num, GMC1_PERF_COND);
138130 }
libavcodec/ppc/h264_altivec.c+0−1
@@ -22,7 +22,6 @@ · 21 unmodified lines
2222 #include "libavcodec/h264data.h"
2323 #include "libavcodec/h264dsp.h"
2424
25−#include "dsputil_ppc.h"
2625 #include "dsputil_altivec.h"
2726 #include "util_altivec.h"
2827 #include "types_altivec.h"
libavcodec/ppc/h264_template_altivec.c+0−16
@@ -77,7 +77,6 @@ · 76 unmodified lines
7777
7878 static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src,
7979 int stride, int h, int x, int y) {
80− POWERPC_PERF_DECLARE(PREFIX_h264_chroma_mc8_num, 1);
8180 DECLARE_ALIGNED(16, signed int, ABCD)[4] =
8281 {((8 - x) * (8 - y)),
8382 (( x) * (8 - y)),
@@ -103,8 +102,6 @@ static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, · 19 unmodified lines
103102 vec_s16 vsrc2ssH, vsrc3ssH, psum;
104103 vec_u8 vdst, ppsum, vfdst, fsum;
105104
106− POWERPC_PERF_START_COUNT(PREFIX_h264_chroma_mc8_num, 1);
107−
108105 if (((unsigned long)dst) % 16 == 0) {
109106 fperm = (vec_u8){0x10, 0x11, 0x12, 0x13,
110107 0x14, 0x15, 0x16, 0x17,
@@ -203,7 +200,6 @@ static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, · 92 unmodified lines
203200 }
204201 }
205202 }
206− POWERPC_PERF_STOP_COUNT(PREFIX_h264_chroma_mc8_num, 1);
207203 }
208204
209205 /* this code assume that stride % 16 == 0 */
@@ -295,7 +291,6 @@ static void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, i · 85 unmodified lines
295291
296292 /* this code assume stride % 16 == 0 */
297293 static void PREFIX_h264_qpel16_h_lowpass_altivec(uint8_t * dst, uint8_t * src, int dstStride, int srcStride) {
298− POWERPC_PERF_DECLARE(PREFIX_h264_qpel16_h_lowpass_num, 1);
299294 register int i;
300295
301296 LOAD_ZERO;
@@ -323,8 +318,6 @@ static void PREFIX_h264_qpel16_h_lowpass_altivec(uint8_t * dst, uint8_t * src, i · 21 unmodified lines
323318
324319 vec_u8 sum, vdst, fsum;
325320
326− POWERPC_PERF_START_COUNT(PREFIX_h264_qpel16_h_lowpass_num, 1);
327−
328321 for (i = 0 ; i < 16 ; i ++) {
329322 vec_u8 srcR1 = vec_ld(-2, src);
330323 vec_u8 srcR2 = vec_ld(14, src);
@@ -433,13 +426,10 @@ static void PREFIX_h264_qpel16_h_lowpass_altivec(uint8_t * dst, uint8_t * src, i · 102 unmodified lines
433426 src += srcStride;
434427 dst += dstStride;
435428 }
436− POWERPC_PERF_STOP_COUNT(PREFIX_h264_qpel16_h_lowpass_num, 1);
437429 }
438430
439431 /* this code assume stride % 16 == 0 */
440432 static void PREFIX_h264_qpel16_v_lowpass_altivec(uint8_t * dst, uint8_t * src, int dstStride, int srcStride) {
441− POWERPC_PERF_DECLARE(PREFIX_h264_qpel16_v_lowpass_num, 1);
442−
443433 register int i;
444434
445435 LOAD_ZERO;
@@ -490,8 +480,6 @@ static void PREFIX_h264_qpel16_v_lowpass_altivec(uint8_t * dst, uint8_t * src, i · 44 unmodified lines
490480
491481 vec_u8 sum, vdst, fsum, srcP3a, srcP3b, srcP3;
492482
493− POWERPC_PERF_START_COUNT(PREFIX_h264_qpel16_v_lowpass_num, 1);
494−
495483 for (i = 0 ; i < 16 ; i++) {
496484 srcP3a = vec_ld(0, srcbis += srcStride);
497485 srcP3b = vec_ld(16, srcbis);
@@ -544,12 +532,10 @@ static void PREFIX_h264_qpel16_v_lowpass_altivec(uint8_t * dst, uint8_t * src, i · 46 unmodified lines
544532
545533 dst += dstStride;
546534 }
547− POWERPC_PERF_STOP_COUNT(PREFIX_h264_qpel16_v_lowpass_num, 1);
548535 }
549536
550537 /* this code assume stride % 16 == 0 *and* tmp is properly aligned */
551538 static void PREFIX_h264_qpel16_hv_lowpass_altivec(uint8_t * dst, int16_t * tmp, uint8_t * src, int dstStride, int tmpStride, int srcStride) {
552− POWERPC_PERF_DECLARE(PREFIX_h264_qpel16_hv_lowpass_num, 1);
553539 register int i;
554540 LOAD_ZERO;
555541 const vec_u8 permM2 = vec_lvsl(-2, src);
@@ -589,7 +575,6 @@ static void PREFIX_h264_qpel16_hv_lowpass_altivec(uint8_t * dst, int16_t * tmp, · 33 unmodified lines
589575 vec_u8 fsum, sumv, sum, vdst;
590576 vec_s16 ssume, ssumo;
591577
592− POWERPC_PERF_START_COUNT(PREFIX_h264_qpel16_hv_lowpass_num, 1);
593578 src -= (2 * srcStride);
594579 for (i = 0 ; i < 21 ; i ++) {
595580 vec_u8 srcM2, srcM1, srcP0, srcP1, srcP2, srcP3;
@@ -779,5 +764,4 @@ static void PREFIX_h264_qpel16_hv_lowpass_altivec(uint8_t * dst, int16_t * tmp, · 183 unmodified lines
779764
780765 dst += dstStride;
781766 }
782− POWERPC_PERF_STOP_COUNT(PREFIX_h264_qpel16_hv_lowpass_num, 1);
783767 }
libavcodec/ppc/idct_altivec.c+0−14
@@ -43,7 +43,6 @@ · 42 unmodified lines
4343 #endif
4444 #include "libavcodec/dsputil.h"
4545 #include "types_altivec.h"
46−#include "dsputil_ppc.h"
4746 #include "dsputil_altivec.h"
4847
4948 #define IDCT_HALF \
@@ -161,13 +160,9 @@ static const vec_s16 constants[5] = { · 111 unmodified lines
161160
162161 void idct_put_altivec(uint8_t* dest, int stride, int16_t *blk)
163162 {
164−POWERPC_PERF_DECLARE(altivec_idct_put_num, 1);
165163 vec_s16 *block = (vec_s16*)blk;
166164 vec_u8 tmp;
167165
168−#if CONFIG_POWERPC_PERF
169−POWERPC_PERF_START_COUNT(altivec_idct_put_num, 1);
170−#endif
171166 IDCT
172167
173168 #define COPY(dest,src) \
@@ -183,13 +178,10 @@ POWERPC_PERF_START_COUNT(altivec_idct_put_num, 1); · 9 unmodified lines
183178 COPY (dest, vx5) dest += stride;
184179 COPY (dest, vx6) dest += stride;
185180 COPY (dest, vx7)
186−
187−POWERPC_PERF_STOP_COUNT(altivec_idct_put_num, 1);
188181 }
189182
190183 void idct_add_altivec(uint8_t* dest, int stride, int16_t *blk)
191184 {
192−POWERPC_PERF_DECLARE(altivec_idct_add_num, 1);
193185 vec_s16 *block = (vec_s16*)blk;
194186 vec_u8 tmp;
195187 vec_s16 tmp2, tmp3;
@@ -197,10 +189,6 @@ POWERPC_PERF_DECLARE(altivec_idct_add_num, 1); · 1 unmodified line
197189 vec_u8 perm1;
198190 vec_u8 p0, p1, p;
199191
200−#if CONFIG_POWERPC_PERF
201−POWERPC_PERF_START_COUNT(altivec_idct_add_num, 1);
202−#endif
203−
204192 IDCT
205193
206194 p0 = vec_lvsl (0, dest);
@@ -226,7 +214,5 @@ POWERPC_PERF_START_COUNT(altivec_idct_add_num, 1); · 19 unmodified lines
226214 ADD (dest, vx5, perm1) dest += stride;
227215 ADD (dest, vx6, perm0) dest += stride;
228216 ADD (dest, vx7, perm1)
229−
230−POWERPC_PERF_STOP_COUNT(altivec_idct_add_num, 1);
231217 }
232218
libavcodec/ppc/mpegvideo_altivec.c+0−5
@@ -26,7 +26,6 @@ · 25 unmodified lines
2626 #include "libavcodec/dsputil.h"
2727 #include "libavcodec/mpegvideo.h"
2828
29−#include "dsputil_ppc.h"
3029 #include "util_altivec.h"
3130 #include "types_altivec.h"
3231 #include "dsputil_altivec.h"
@@ -479,14 +478,11 @@ static int dct_quantize_altivec(MpegEncContext* s, · 446 unmodified lines
479478 static void dct_unquantize_h263_altivec(MpegEncContext *s,
480479 DCTELEM *block, int n, int qscale)
481480 {
482−POWERPC_PERF_DECLARE(altivec_dct_unquantize_h263_num, 1);
483481 int i, level, qmul, qadd;
484482 int nCoeffs;
485483
486484 assert(s->block_last_index[n]>=0);
487485
488−POWERPC_PERF_START_COUNT(altivec_dct_unquantize_h263_num, 1);
489−
490486 qadd = (qscale - 1) | 1;
491487 qmul = qscale << 1;
492488
@@ -569,7 +565,6 @@ POWERPC_PERF_START_COUNT(altivec_dct_unquantize_h263_num, 1); · 76 unmodified lines
569565 block[0] = backup_0;
570566 }
571567 }
572−POWERPC_PERF_STOP_COUNT(altivec_dct_unquantize_h263_num, nCoeffs == 63);
573568 }
574569
575570

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t