Ticket #2443: counter.diff

File counter.diff, 554 bytes (added by Bernardo, 14 years ago)

off-by-one error

  • libavfilter/vf_deshake.c

    diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
    index 138c25d..efff390 100644
    a b static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,  
    294294    double p_x, p_y;
    295295
    296296    // Reset counts to zero
    297     for (x = 0; x < deshake->rx * 2 + 1; x++) {
    298         for (y = 0; y < deshake->ry * 2 + 1; y++) {
     297    for (x = 0; x < deshake->rx * 2; x++) {
     298        for (y = 0; y < deshake->ry * 2; y++) {
    299299            counts[x][y] = 0;
    300300        }
    301301    }