annotate ppc/dsputil_ppc.h @ 10311:943b63f364ca libavcodec

Make sure all the bits are written to output in fax data decoder. This fixes decoding TIFF images with fax compression and width being not multiple of eight (and issue 1429).
author kostya
date Tue, 29 Sep 2009 05:55:14 +0000
parents d762f9979193
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
1 /*
1949
66215baae7b9 hadamard8_diff8x8 in AltiVec, the 16bits edition by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1578
diff changeset
2 * Copyright (c) 2003-2004 Romain Dolbeau <romain@dolbeau.org>
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
3 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
4 * This file is part of FFmpeg.
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
5 *
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
10 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
14 * Lesser General Public License for more details.
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
15 *
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
3036
0b546eab515d Update licensing information: The FSF changed postal address.
diego
parents: 2979
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
19 */
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
20
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 7333
diff changeset
21 #ifndef AVCODEC_PPC_DSPUTIL_PPC_H
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 7333
diff changeset
22 #define AVCODEC_PPC_DSPUTIL_PPC_H
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
23
8662
31bdc2da2e80 Add required headers to fix warnings during 'make checkheaders'.
diego
parents: 8590
diff changeset
24 #include "config.h"
31bdc2da2e80 Add required headers to fix warnings during 'make checkheaders'.
diego
parents: 8590
diff changeset
25
8590
7a463923ecd1 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 8031
diff changeset
26 #if CONFIG_POWERPC_PERF
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
27 void powerpc_display_perf_report(void);
2236
b0102ea621dd h264 qpel mc, size 16 patch by (Romain Dolbeau <dolbeau at caps-entreprise dot com>)
michael
parents: 2057
diff changeset
28 /* the 604* have 2, the G3* have 4, the G4s have 6,
b0102ea621dd h264 qpel mc, size 16 patch by (Romain Dolbeau <dolbeau at caps-entreprise dot com>)
michael
parents: 2057
diff changeset
29 and the G5 are completely different (they MUST use
9713
d762f9979193 Change HAVE_PPC64 to ARCH_PPC64.
reimar
parents: 8662
diff changeset
30 ARCH_PPC64, and let's hope all future 64 bis PPC
2236
b0102ea621dd h264 qpel mc, size 16 patch by (Romain Dolbeau <dolbeau at caps-entreprise dot com>)
michael
parents: 2057
diff changeset
31 will use the same PMCs... */
b0102ea621dd h264 qpel mc, size 16 patch by (Romain Dolbeau <dolbeau at caps-entreprise dot com>)
michael
parents: 2057
diff changeset
32 #define POWERPC_NUM_PMC_ENABLED 6
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
33 /* if you add to the enum below, also add to the perfname array
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
34 in dsputil_ppc.c */
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
35 enum powerpc_perf_index {
7333
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
36 altivec_fft_num = 0,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
37 altivec_gmc1_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
38 altivec_dct_unquantize_h263_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
39 altivec_fdct,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
40 altivec_idct_add_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
41 altivec_idct_put_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
42 altivec_put_pixels16_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
43 altivec_avg_pixels16_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
44 altivec_avg_pixels8_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
45 altivec_put_pixels8_xy2_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
46 altivec_put_no_rnd_pixels8_xy2_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
47 altivec_put_pixels16_xy2_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
48 altivec_put_no_rnd_pixels16_xy2_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
49 altivec_hadamard8_diff8x8_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
50 altivec_hadamard8_diff16_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
51 altivec_avg_pixels8_xy2_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
52 powerpc_clear_blocks_dcbz32,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
53 powerpc_clear_blocks_dcbz128,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
54 altivec_put_h264_chroma_mc8_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
55 altivec_avg_h264_chroma_mc8_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
56 altivec_put_h264_qpel16_h_lowpass_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
57 altivec_avg_h264_qpel16_h_lowpass_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
58 altivec_put_h264_qpel16_v_lowpass_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
59 altivec_avg_h264_qpel16_v_lowpass_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
60 altivec_put_h264_qpel16_hv_lowpass_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
61 altivec_avg_h264_qpel16_hv_lowpass_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
62 powerpc_perf_total
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
63 };
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
64 enum powerpc_data_index {
7333
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
65 powerpc_data_min = 0,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
66 powerpc_data_max,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
67 powerpc_data_sum,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
68 powerpc_data_num,
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
69 powerpc_data_total
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
70 };
1352
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
71 extern unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][powerpc_data_total];
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
72
9713
d762f9979193 Change HAVE_PPC64 to ARCH_PPC64.
reimar
parents: 8662
diff changeset
73 #if !ARCH_PPC64
1951
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
74 #define POWERP_PMC_DATATYPE unsigned long
8031
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
75 #define POWERPC_GET_PMC1(a) __asm__ volatile("mfspr %0, 937" : "=r" (a))
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
76 #define POWERPC_GET_PMC2(a) __asm__ volatile("mfspr %0, 938" : "=r" (a))
1352
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
77 #if (POWERPC_NUM_PMC_ENABLED > 2)
8031
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
78 #define POWERPC_GET_PMC3(a) __asm__ volatile("mfspr %0, 941" : "=r" (a))
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
79 #define POWERPC_GET_PMC4(a) __asm__ volatile("mfspr %0, 942" : "=r" (a))
1352
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
80 #else
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
81 #define POWERPC_GET_PMC3(a) do {} while (0)
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
82 #define POWERPC_GET_PMC4(a) do {} while (0)
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
83 #endif
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
84 #if (POWERPC_NUM_PMC_ENABLED > 4)
8031
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
85 #define POWERPC_GET_PMC5(a) __asm__ volatile("mfspr %0, 929" : "=r" (a))
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
86 #define POWERPC_GET_PMC6(a) __asm__ volatile("mfspr %0, 930" : "=r" (a))
1352
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
87 #else
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
88 #define POWERPC_GET_PMC5(a) do {} while (0)
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
89 #define POWERPC_GET_PMC6(a) do {} while (0)
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
90 #endif
9713
d762f9979193 Change HAVE_PPC64 to ARCH_PPC64.
reimar
parents: 8662
diff changeset
91 #else /* ARCH_PPC64 */
1951
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
92 #define POWERP_PMC_DATATYPE unsigned long long
8031
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
93 #define POWERPC_GET_PMC1(a) __asm__ volatile("mfspr %0, 771" : "=r" (a))
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
94 #define POWERPC_GET_PMC2(a) __asm__ volatile("mfspr %0, 772" : "=r" (a))
1951
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
95 #if (POWERPC_NUM_PMC_ENABLED > 2)
8031
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
96 #define POWERPC_GET_PMC3(a) __asm__ volatile("mfspr %0, 773" : "=r" (a))
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
97 #define POWERPC_GET_PMC4(a) __asm__ volatile("mfspr %0, 774" : "=r" (a))
1951
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
98 #else
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
99 #define POWERPC_GET_PMC3(a) do {} while (0)
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
100 #define POWERPC_GET_PMC4(a) do {} while (0)
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
101 #endif
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
102 #if (POWERPC_NUM_PMC_ENABLED > 4)
8031
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
103 #define POWERPC_GET_PMC5(a) __asm__ volatile("mfspr %0, 775" : "=r" (a))
eebc7209c47f Convert asm keyword into __asm__.
flameeyes
parents: 7760
diff changeset
104 #define POWERPC_GET_PMC6(a) __asm__ volatile("mfspr %0, 776" : "=r" (a))
1951
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
105 #else
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
106 #define POWERPC_GET_PMC5(a) do {} while (0)
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
107 #define POWERPC_GET_PMC6(a) do {} while (0)
2599b8444831 better hadamard8_diff16 in AltiVec, and more patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michael
parents: 1949
diff changeset
108 #endif
9713
d762f9979193 Change HAVE_PPC64 to ARCH_PPC64.
reimar
parents: 8662
diff changeset
109 #endif /* ARCH_PPC64 */
7333
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
110 #define POWERPC_PERF_DECLARE(a, cond) \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
111 POWERP_PMC_DATATYPE \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
112 pmc_start[POWERPC_NUM_PMC_ENABLED], \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
113 pmc_stop[POWERPC_NUM_PMC_ENABLED], \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
114 pmc_loop_index;
1352
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
115 #define POWERPC_PERF_START_COUNT(a, cond) do { \
7333
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
116 POWERPC_GET_PMC6(pmc_start[5]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
117 POWERPC_GET_PMC5(pmc_start[4]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
118 POWERPC_GET_PMC4(pmc_start[3]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
119 POWERPC_GET_PMC3(pmc_start[2]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
120 POWERPC_GET_PMC2(pmc_start[1]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
121 POWERPC_GET_PMC1(pmc_start[0]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
122 } while (0)
1352
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
123 #define POWERPC_PERF_STOP_COUNT(a, cond) do { \
7333
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
124 POWERPC_GET_PMC1(pmc_stop[0]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
125 POWERPC_GET_PMC2(pmc_stop[1]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
126 POWERPC_GET_PMC3(pmc_stop[2]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
127 POWERPC_GET_PMC4(pmc_stop[3]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
128 POWERPC_GET_PMC5(pmc_stop[4]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
129 POWERPC_GET_PMC6(pmc_stop[5]); \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
130 if (cond) { \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
131 for(pmc_loop_index = 0; \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
132 pmc_loop_index < POWERPC_NUM_PMC_ENABLED; \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
133 pmc_loop_index++) { \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
134 if (pmc_stop[pmc_loop_index] >= pmc_start[pmc_loop_index]) { \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
135 POWERP_PMC_DATATYPE diff = \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
136 pmc_stop[pmc_loop_index] - pmc_start[pmc_loop_index]; \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
137 if (diff < perfdata[pmc_loop_index][a][powerpc_data_min]) \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
138 perfdata[pmc_loop_index][a][powerpc_data_min] = diff; \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
139 if (diff > perfdata[pmc_loop_index][a][powerpc_data_max]) \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
140 perfdata[pmc_loop_index][a][powerpc_data_max] = diff; \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
141 perfdata[pmc_loop_index][a][powerpc_data_sum] += diff; \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
142 perfdata[pmc_loop_index][a][powerpc_data_num] ++; \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
143 } \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
144 } \
a8a79f5385f6 cosmetics: Reformat PPC code in libavcodec according to style guidelines.
diego
parents: 5830
diff changeset
145 } \
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
146 } while (0)
4521
891590781d9e rename POWERPC_PERFORMANCE_REPORT to CONFIG_POWERPC_PERF
mru
parents: 3949
diff changeset
147 #else /* CONFIG_POWERPC_PERF */
1045
c8b438ecf8f4 fix for ppc compile broken by (Romain Dolbeau <dolbeau at irisa dot fr> and Colin Leroy <colin at colino dot net>)
michaelni
parents: 1024
diff changeset
148 // those are needed to avoid empty statements.
1352
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
149 #define POWERPC_PERF_DECLARE(a, cond) int altivec_placeholder __attribute__ ((unused))
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
150 #define POWERPC_PERF_START_COUNT(a, cond) do {} while (0)
e8ff4783f188 1) remove TBL support in PPC performance. It's much more useful to use the
michaelni
parents: 1340
diff changeset
151 #define POWERPC_PERF_STOP_COUNT(a, cond) do {} while (0)
4521
891590781d9e rename POWERPC_PERFORMANCE_REPORT to CONFIG_POWERPC_PERF
mru
parents: 3949
diff changeset
152 #endif /* CONFIG_POWERPC_PERF */
1015
35cf2f4a0f8c PPC perf, PPC clear_block, AltiVec put_pixels8_xy2 patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
michaelni
parents:
diff changeset
153
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 7333
diff changeset
154 #endif /* AVCODEC_PPC_DSPUTIL_PPC_H */