Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -93,7 +93,8 @@ DECLARE_ALIGNED(8, static const uint8_t, ldither)[8][8] = { · 92 unmodified lines | |||
| 93 | { 42, 26, 38, 22, 41, 25, 37, 21 }, | 93 | { 42, 26, 38, 22, 41, 25, 37, 21 }, |
| 94 | }; | 94 | }; |
| 95 | 95 | ||
| 96 | static const uint8_t offset[127][2] = { | 96 | static const uint8_t offset[128][2] = { |
| 97 | {0,0}, // unused | ||
| 97 | {0,0}, | 98 | {0,0}, |
| 98 | {0,0}, {4,4}, // quality = 1 | 99 | {0,0}, {4,4}, // quality = 1 |
| 99 | {0,0}, {2,2}, {6,4}, {4,6}, // quality = 2 | 100 | {0,0}, {2,2}, {6,4}, {4,6}, // quality = 2 |
| @@ -283,8 +284,8 @@ static void filter(SPPContext *p, uint8_t *dst, uint8_t *src, · 183 unmodified lines | |||
| 283 | qp = FFMAX(1, ff_norm_qscale(qp, p->qscale_type)); | 284 | qp = FFMAX(1, ff_norm_qscale(qp, p->qscale_type)); |
| 284 | } | 285 | } |
| 285 | for (i = 0; i < count; i++) { | 286 | for (i = 0; i < count; i++) { |
| 286 | const int x1 = x + offset[i + count - 1][0]; | 287 | const int x1 = x + offset[i + count][0]; |
| 287 | const int y1 = y + offset[i + count - 1][1]; | 288 | const int y1 = y + offset[i + count][1]; |
| 288 | const int index = x1 + y1*linesize; | 289 | const int index = x1 + y1*linesize; |
| 289 | p->dct->get_pixels_unaligned(block, p->src + sample_bytes*index, sample_bytes*linesize); | 290 | p->dct->get_pixels_unaligned(block, p->src + sample_bytes*index, sample_bytes*linesize); |
| 290 | p->dct->fdct(block); | 291 | p->dct->fdct(block); |