[SCM] libav/experimental: Fix slicify when the slice_direction is negative, make it send slices from the bottom to the top one.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:55:39 UTC 2013
The following commit has been merged in the experimental branch:
commit bf972d5e1c6ba7d501e8a60994c2e4e47b41426d
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date: Sun Dec 6 17:40:41 2009 +0000
Fix slicify when the slice_direction is negative, make it send slices
from the bottom to the top one.
Originally committed as revision 20754 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavfilter/vf_slicify.c b/libavfilter/vf_slicify.c
index 3aae1c3..336f223 100644
--- a/libavfilter/vf_slicify.c
+++ b/libavfilter/vf_slicify.c
@@ -78,11 +78,19 @@ static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
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 = {
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list