comparison simple_idct.c @ 4176:23da44e8fd05 libavcodec

rename cropTbl -> ff_cropTbl
author mru
date Sun, 12 Nov 2006 20:08:09 +0000
parents c8c591fe26f8
children 3d2b2a2a664e
comparison
equal deleted inserted replaced
4175:b3328ed50a5e 4176:23da44e8fd05
182 182
183 static inline void idctSparseColPut (uint8_t *dest, int line_size, 183 static inline void idctSparseColPut (uint8_t *dest, int line_size,
184 DCTELEM * col) 184 DCTELEM * col)
185 { 185 {
186 int a0, a1, a2, a3, b0, b1, b2, b3; 186 int a0, a1, a2, a3, b0, b1, b2, b3;
187 uint8_t *cm = cropTbl + MAX_NEG_CROP; 187 uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
188 188
189 /* XXX: I did that only to give same values as previous code */ 189 /* XXX: I did that only to give same values as previous code */
190 a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4)); 190 a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4));
191 a1 = a0; 191 a1 = a0;
192 a2 = a0; 192 a2 = a0;
254 254
255 static inline void idctSparseColAdd (uint8_t *dest, int line_size, 255 static inline void idctSparseColAdd (uint8_t *dest, int line_size,
256 DCTELEM * col) 256 DCTELEM * col)
257 { 257 {
258 int a0, a1, a2, a3, b0, b1, b2, b3; 258 int a0, a1, a2, a3, b0, b1, b2, b3;
259 uint8_t *cm = cropTbl + MAX_NEG_CROP; 259 uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
260 260
261 /* XXX: I did that only to give same values as previous code */ 261 /* XXX: I did that only to give same values as previous code */
262 a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4)); 262 a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4));
263 a1 = a0; 263 a1 = a0;
264 a2 = a0; 264 a2 = a0;
429 #define C_SHIFT (4+1+12) 429 #define C_SHIFT (4+1+12)
430 430
431 static inline void idct4col(uint8_t *dest, int line_size, const DCTELEM *col) 431 static inline void idct4col(uint8_t *dest, int line_size, const DCTELEM *col)
432 { 432 {
433 int c0, c1, c2, c3, a0, a1, a2, a3; 433 int c0, c1, c2, c3, a0, a1, a2, a3;
434 const uint8_t *cm = cropTbl + MAX_NEG_CROP; 434 const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
435 435
436 a0 = col[8*0]; 436 a0 = col[8*0];
437 a1 = col[8*2]; 437 a1 = col[8*2];
438 a2 = col[8*4]; 438 a2 = col[8*4];
439 a3 = col[8*6]; 439 a3 = col[8*6];
509 #define C3 C_FIX(0.5) 509 #define C3 C_FIX(0.5)
510 #define C_SHIFT (4+1+12) 510 #define C_SHIFT (4+1+12)
511 static inline void idct4col_add(uint8_t *dest, int line_size, const DCTELEM *col) 511 static inline void idct4col_add(uint8_t *dest, int line_size, const DCTELEM *col)
512 { 512 {
513 int c0, c1, c2, c3, a0, a1, a2, a3; 513 int c0, c1, c2, c3, a0, a1, a2, a3;
514 const uint8_t *cm = cropTbl + MAX_NEG_CROP; 514 const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
515 515
516 a0 = col[8*0]; 516 a0 = col[8*0];
517 a1 = col[8*1]; 517 a1 = col[8*1];
518 a2 = col[8*2]; 518 a2 = col[8*2];
519 a3 = col[8*3]; 519 a3 = col[8*3];
537 #define R3 R_FIX(0.5) 537 #define R3 R_FIX(0.5)
538 #define R_SHIFT 11 538 #define R_SHIFT 11
539 static inline void idct4row(DCTELEM *row) 539 static inline void idct4row(DCTELEM *row)
540 { 540 {
541 int c0, c1, c2, c3, a0, a1, a2, a3; 541 int c0, c1, c2, c3, a0, a1, a2, a3;
542 //const uint8_t *cm = cropTbl + MAX_NEG_CROP; 542 //const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
543 543
544 a0 = row[0]; 544 a0 = row[0];
545 a1 = row[1]; 545 a1 = row[1];
546 a2 = row[2]; 546 a2 = row[2];
547 a3 = row[3]; 547 a3 = row[3];