Either the average, or the sum right-shifted. Not the average right-shifted.
Unified · Split
| @@ -110,7 +110,7 @@ static void init_slice(H274FilmGrainDatabase *database, uint8_t h, uint8_t v) · 109 unmodified lines | |||
| 110 | init_slice_c(database->db[h][v], h, v, database->slice_tmp); | 110 | init_slice_c(database->db[h][v], h, v, database->slice_tmp); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | // Computes the average of an 8x8 block, right-shifted by 6 | 113 | // Computes the average of an 8x8 block |
| 114 | static uint16_t avg_8x8_c(const uint8_t *in, int in_stride) | 114 | static uint16_t avg_8x8_c(const uint8_t *in, int in_stride) |
| 115 | { | 115 | { |
| 116 | uint16_t avg[8] = {0}; // summing over an array vectorizes better | 116 | uint16_t avg[8] = {0}; // summing over an array vectorizes better |