Revision 80ba1ddb libavcodec/ppc/float_altivec.c
libavcodec/ppc/float_altivec.c  

90  90 
} 
91  91 
} 
92  92  
93 
static void vector_fmul_window_altivec(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len)


93 
static void vector_fmul_window_altivec(float *dst, const float *src0, const float *src1, const float *win, int len) 

94  94 
{ 
95 
union { 

96 
vector float v; 

97 
float s[4]; 

98 
} vadd; 

99 
vector float vadd_bias, zero, t0, t1, s0, s1, wi, wj; 

95 
vector float zero, t0, t1, s0, s1, wi, wj; 

100  96 
const vector unsigned char reverse = vcprm(3,2,1,0); 
101  97 
int i,j; 
102  98  
...  ...  
104  100 
win += len; 
105  101 
src0+= len; 
106  102  
107 
vadd.s[0] = add_bias; 

108 
vadd_bias = vec_splat(vadd.v, 0); 

109  103 
zero = (vector float)vec_splat_u32(0); 
110  104  
111  105 
for(i=len*4, j=len*416; i<0; i+=16, j=16) { 
...  ...  
117  111 
s1 = vec_perm(s1, s1, reverse); 
118  112 
wj = vec_perm(wj, wj, reverse); 
119  113  
120 
t0 = vec_madd(s0, wj, vadd_bias);


114 
t0 = vec_madd(s0, wj, zero);


121  115 
t0 = vec_nmsub(s1, wi, t0); 
122 
t1 = vec_madd(s0, wi, vadd_bias);


116 
t1 = vec_madd(s0, wi, zero);


123  117 
t1 = vec_madd(s1, wj, t1); 
124  118 
t1 = vec_perm(t1, t1, reverse); 
125  119 
Also available in: Unified diff