Revision 05e7e64d libavcodec/cavsdsp.c
libavcodec/cavsdsp.c  

184  184 
DCTELEM (*src)[8] = (DCTELEM(*)[8])block; 
185  185 
uint8_t *cm = cropTbl + MAX_NEG_CROP; 
186  186  
187 
src[0][0] += 8; 

188  
187  189 
for( i = 0; i < 8; i++ ) { 
188  190 
const int a0 = 3*src[i][1]  (src[i][7]<<1); 
189  191 
const int a1 = 3*src[i][3] + (src[i][5]<<1); 
...  ...  
197  199  
198  200 
const int a7 = (src[i][2]<<2)  10*src[i][6]; 
199  201 
const int a6 = (src[i][6]<<2) + 10*src[i][2]; 
200 
const int a5 = (src[i][0]  src[i][4]) << 3;


201 
const int a4 = (src[i][0] + src[i][4]) << 3;


202 
const int a5 = ((src[i][0]  src[i][4]) << 3) + 4;


203 
const int a4 = ((src[i][0] + src[i][4]) << 3) + 4;


202  204  
203  205 
const int b0 = a4 + a6; 
204  206 
const int b1 = a5 + a7; 
205  207 
const int b2 = a5  a7; 
206  208 
const int b3 = a4  a6; 
207  209  
208 
src[i][0] = (b0 + b4 + 4) >> 3;


209 
src[i][1] = (b1 + b5 + 4) >> 3;


210 
src[i][2] = (b2 + b6 + 4) >> 3;


211 
src[i][3] = (b3 + b7 + 4) >> 3;


212 
src[i][4] = (b3  b7 + 4) >> 3;


213 
src[i][5] = (b2  b6 + 4) >> 3;


214 
src[i][6] = (b1  b5 + 4) >> 3;


215 
src[i][7] = (b0  b4 + 4) >> 3;


210 
src[i][0] = (b0 + b4) >> 3; 

211 
src[i][1] = (b1 + b5) >> 3; 

212 
src[i][2] = (b2 + b6) >> 3; 

213 
src[i][3] = (b3 + b7) >> 3; 

214 
src[i][4] = (b3  b7) >> 3; 

215 
src[i][5] = (b2  b6) >> 3; 

216 
src[i][6] = (b1  b5) >> 3; 

217 
src[i][7] = (b0  b4) >> 3; 

216  218 
} 
217  219 
for( i = 0; i < 8; i++ ) { 
218  220 
const int a0 = 3*src[1][i]  (src[7][i]<<1); 
...  ...  
235  237 
const int b2 = a5  a7; 
236  238 
const int b3 = a4  a6; 
237  239  
238 
dst[i + 0*stride] = cm[ dst[i + 0*stride] + ((b0 + b4 + 64) >> 7)];


239 
dst[i + 1*stride] = cm[ dst[i + 1*stride] + ((b1 + b5 + 64) >> 7)];


240 
dst[i + 2*stride] = cm[ dst[i + 2*stride] + ((b2 + b6 + 64) >> 7)];


241 
dst[i + 3*stride] = cm[ dst[i + 3*stride] + ((b3 + b7 + 64) >> 7)];


242 
dst[i + 4*stride] = cm[ dst[i + 4*stride] + ((b3  b7 + 64) >> 7)];


243 
dst[i + 5*stride] = cm[ dst[i + 5*stride] + ((b2  b6 + 64) >> 7)];


244 
dst[i + 6*stride] = cm[ dst[i + 6*stride] + ((b1  b5 + 64) >> 7)];


245 
dst[i + 7*stride] = cm[ dst[i + 7*stride] + ((b0  b4 + 64) >> 7)];


240 
dst[i + 0*stride] = cm[ dst[i + 0*stride] + ((b0 + b4) >> 7)]; 

241 
dst[i + 1*stride] = cm[ dst[i + 1*stride] + ((b1 + b5) >> 7)]; 

242 
dst[i + 2*stride] = cm[ dst[i + 2*stride] + ((b2 + b6) >> 7)]; 

243 
dst[i + 3*stride] = cm[ dst[i + 3*stride] + ((b3 + b7) >> 7)]; 

244 
dst[i + 4*stride] = cm[ dst[i + 4*stride] + ((b3  b7) >> 7)]; 

245 
dst[i + 5*stride] = cm[ dst[i + 5*stride] + ((b2  b6) >> 7)]; 

246 
dst[i + 6*stride] = cm[ dst[i + 6*stride] + ((b1  b5) >> 7)]; 

247 
dst[i + 7*stride] = cm[ dst[i + 7*stride] + ((b0  b4) >> 7)]; 

246  248 
} 
247  249 
} 
248  250 
Also available in: Unified diff