Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Dolbeau <dolbeau@irisa.fr>2003-07-04 13:39:05 +0400
committerMichael Niedermayer <michaelni@gmx.at>2003-07-04 13:39:05 +0400
commit3efd4952dfcc0e452d28910758876884925c6175 (patch)
tree72d80608b4f51b22800654225b5908309044460c /libavcodec/ppc/gmc_altivec.c
parentcc74aafbc633e14005c562fd194ac85cd1d62fa8 (diff)
PPC fixes & clean-up patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
Originally committed as revision 2008 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ppc/gmc_altivec.c')
-rw-r--r--libavcodec/ppc/gmc_altivec.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/ppc/gmc_altivec.c b/libavcodec/ppc/gmc_altivec.c
index 18d52bbc52..9b141078bb 100644
--- a/libavcodec/ppc/gmc_altivec.c
+++ b/libavcodec/ppc/gmc_altivec.c
@@ -28,9 +28,10 @@
altivec-enhanced gmc1. ATM this code assume stride is a multiple of 8,
to preserve proper dst alignement.
*/
+#define GMC1_PERF_COND (h==8)
void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, int stride, int h, int x16, int y16, int rounder)
{
-POWERPC_TBL_DECLARE(altivec_gmc1_num, h == 8);
+POWERPC_TBL_DECLARE(altivec_gmc1_num, GMC1_PERF_COND);
#ifdef ALTIVEC_USE_REFERENCE_C_CODE
const int A=(16-x16)*(16-y16);
const int B=( x16)*(16-y16);
@@ -38,7 +39,7 @@ POWERPC_TBL_DECLARE(altivec_gmc1_num, h == 8);
const int D=( x16)*( y16);
int i;
-POWERPC_TBL_START_COUNT(altivec_gmc1_num, h == 8);
+POWERPC_TBL_START_COUNT(altivec_gmc1_num, GMC1_PERF_COND);
for(i=0; i<h; i++)
{
@@ -54,7 +55,7 @@ POWERPC_TBL_START_COUNT(altivec_gmc1_num, h == 8);
src+= stride;
}
-POWERPC_TBL_STOP_COUNT(altivec_gmc1_num, h == 8);
+POWERPC_TBL_STOP_COUNT(altivec_gmc1_num, GMC1_PERF_COND);
#else /* ALTIVEC_USE_REFERENCE_C_CODE */
const unsigned short __attribute__ ((aligned(16))) rounder_a[8] =
@@ -77,7 +78,7 @@ POWERPC_TBL_STOP_COUNT(altivec_gmc1_num, h == 8);
unsigned long src_really_odd = (unsigned long)src & 0x0000000F;
-POWERPC_TBL_START_COUNT(altivec_gmc1_num, h == 8);
+POWERPC_TBL_START_COUNT(altivec_gmc1_num, GMC1_PERF_COND);
tempA = vec_ld(0, (unsigned short*)ABCD);
Av = vec_splat(tempA, 0);
@@ -165,7 +166,7 @@ POWERPC_TBL_START_COUNT(altivec_gmc1_num, h == 8);
src += stride;
}
-POWERPC_TBL_STOP_COUNT(altivec_gmc1_num, h == 8);
+POWERPC_TBL_STOP_COUNT(altivec_gmc1_num, GMC1_PERF_COND);
#endif /* ALTIVEC_USE_REFERENCE_C_CODE */
}