Commit 918e3519 authored by stefano's avatar stefano

Fix slicify when the slice_direction is negative, make it sends slices

from the bottom to the top one.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20754 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 5e3b5723
...@@ -78,11 +78,19 @@ static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir) ...@@ -78,11 +78,19 @@ static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
SliceContext *slice = link->dst->priv; SliceContext *slice = link->dst->priv;
int y2; int y2;
if (slice_dir == 1) {
for (y2 = y; y2 + slice->h <= y + h; y2 += slice->h) for (y2 = y; y2 + slice->h <= y + h; y2 += slice->h)
avfilter_draw_slice(link->dst->outputs[0], y2, slice->h, slice_dir); avfilter_draw_slice(link->dst->outputs[0], y2, slice->h, slice_dir);
if (y2 < y + h) if (y2 < y + h)
avfilter_draw_slice(link->dst->outputs[0], y2, y + h - y2, slice_dir); avfilter_draw_slice(link->dst->outputs[0], y2, y + h - y2, slice_dir);
} else if (slice_dir == -1) {
for (y2 = y + h; y2 - slice->h >= y; y2 -= slice->h)
avfilter_draw_slice(link->dst->outputs[0], y2 - slice->h, slice->h, slice_dir);
if (y2 > y)
avfilter_draw_slice(link->dst->outputs[0], y, y2 - y, slice_dir);
}
} }
AVFilter avfilter_vf_slicify = { AVFilter avfilter_vf_slicify = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment