Revision bf972d5e libavfilter/vf_slicify.c

View differences:

libavfilter/vf_slicify.c
78 78
    SliceContext *slice = link->dst->priv;
79 79
    int y2;
80 80

  
81
    if (slice_dir == 1) {
81 82
    for (y2 = y; y2 + slice->h <= y + h; y2 += slice->h)
82 83
        avfilter_draw_slice(link->dst->outputs[0], y2, slice->h, slice_dir);
83 84

  
84 85
    if (y2 < y + h)
85 86
        avfilter_draw_slice(link->dst->outputs[0], y2, y + h - y2, slice_dir);
87
    } else if (slice_dir == -1) {
88
        for (y2 = y + h; y2 - slice->h >= y; y2 -= slice->h)
89
            avfilter_draw_slice(link->dst->outputs[0], y2 - slice->h, slice->h, slice_dir);
90

  
91
        if (y2 > y)
92
            avfilter_draw_slice(link->dst->outputs[0], y, y2 - y, slice_dir);
93
    }
86 94
}
87 95

  
88 96
AVFilter avfilter_vf_slicify = {

Also available in: Unified diff