[FFmpeg-cvslog] r20754 - trunk/libavfilter/vf_slicify.c
stefano
subversion
Sun Dec 6 18:40:41 CET 2009
Author: stefano
Date: Sun Dec 6 18:40:41 2009
New Revision: 20754
Log:
Fix slicify when the slice_direction is negative, make it sends slices
from the bottom to the top one.
Modified:
trunk/libavfilter/vf_slicify.c
Modified: trunk/libavfilter/vf_slicify.c
==============================================================================
--- trunk/libavfilter/vf_slicify.c Sun Dec 6 18:02:12 2009 (r20753)
+++ trunk/libavfilter/vf_slicify.c Sun Dec 6 18:40:41 2009 (r20754)
@@ -78,11 +78,19 @@ static void draw_slice(AVFilterLink *lin
SliceContext *slice = link->dst->priv;
int y2;
+ if (slice_dir == 1) {
for (y2 = y; y2 + slice->h <= y + h; y2 += slice->h)
avfilter_draw_slice(link->dst->outputs[0], y2, slice->h, slice_dir);
if (y2 < y + h)
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 = {
More information about the ffmpeg-cvslog
mailing list