[FFmpeg-devel] [PATCH] Make slicify honour the slice direction

Stefano Sabatini stefano.sabatini-lala
Sat Dec 5 02:23:38 CET 2009


On date Wednesday 2009-12-02 00:37:21 +0100, Stefano Sabatini encoded:
> On date Tuesday 2009-12-01 12:44:10 +0100, Michael Niedermayer encoded:
> > On Mon, Nov 30, 2009 at 11:41:26PM +0100, Stefano Sabatini wrote:
> > > Hi, as in subject.
> > > 
> > > Without this some combination with the pad filter may issue weird
> > > behavior.

Updated.

This fixes for example:

ffplay -loglevel debug in.avi -vfilters "scale=100:100, slicify=50, vflip, slicify=10, scale"
[...]
start_frame     : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] picref[0xa33aa10 data[0xa5e6f10, 0xa5e9ad0, 0xa5ea750, (nil)] linesize[112, 64, 64, 0] pts:566666 s:100x100]
draw_slice      : link[0xa30ced0 s:464x348 fmt:yuv420p          ffplay_input    ->scale           ] y:0 h:348 dir:1
draw_slice      : link[0xa332870 s:100x100 fmt:yuv420p          scale           ->slicify         ] y:0 h:100 dir:1
draw_slice      : link[0xa333160 s:100x100 fmt:yuv420p          slicify         ->vflip           ] y:0 h:50 dir:1
draw_slice      : link[0xa333480 s:100x100 fmt:yuv420p          vflip           ->slicify         ] y:50 h:50 dir:-1
draw_slice      : link[0xa333740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:50 h:10 dir:-1
[swscaler @ 0xa37c760]Slices start in the middle!
draw_slice      : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:100 h:0 dir:-1
draw_slice      : link[0xa333740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:60 h:10 dir:-1
[swscaler @ 0xa37c760]Slices start in the middle!
draw_slice      : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:100 h:0 dir:-1
draw_slice      : link[0xa333740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:70 h:10 dir:-1
[swscaler @ 0xa37c760]Slices start in the middle!
draw_slice      : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:100 h:0 dir:-1
draw_slice      : link[0xa333740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:80 h:10 dir:-1
[swscaler @ 0xa37c760]Slices start in the middle!
draw_slice      : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:100 h:0 dir:-1
draw_slice      : link[0xa333740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:90 h:10 dir:-1
draw_slice      : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:90 h:10 dir:-1
draw_slice      : link[0xa333160 s:100x100 fmt:yuv420p          slicify         ->vflip           ] y:50 h:50 dir:1
draw_slice      : link[0xa333480 s:100x100 fmt:yuv420p          vflip           ->slicify         ] y:0 h:50 dir:-1
draw_slice      : link[0xa333740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:0 h:10 dir:-1
draw_slice      : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:80 h:10 dir:-1
draw_slice      : link[0xa333740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:10 h:10 dir:-1
[swscaler @ 0xa37c760]Slices start in the middle!
draw_slice      : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:80 h:0 dir:-1
draw_slice      : link[0xa333740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:20 h:10 dir:-1
[swscaler @ 0xa37c760]Slices start in the middle!
draw_slice      : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:80 h:0 dir:-1
draw_slice      : link[0xa333740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:30 h:10 dir:-1
[swscaler @ 0xa37c760]Slices start in the middle!
draw_slice      : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:80 h:0 dir:-1
draw_slice      : link[0xa333740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:40 h:10 dir:-1
[swscaler @ 0xa37c760]Slices start in the middle!
draw_slice      : link[0xa333830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:80 h:0 dir:-1

which becomes with the patch applied:
start_frame     : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] picref[0x89fe740 data[0x8c5c1e0, 0x8c5eda0, 0x8c5fa20, (nil)] linesize[112, 64, 64, 0] pts:1533333 s:100x100]
draw_slice      : link[0x8971ed0 s:464x348 fmt:yuv420p          ffplay_input    ->scale           ] y:0 h:348 dir:1
draw_slice      : link[0x8997870 s:100x100 fmt:yuv420p          scale           ->slicify         ] y:0 h:100 dir:1
draw_slice      : link[0x8998160 s:100x100 fmt:yuv420p          slicify         ->vflip           ] y:0 h:50 dir:1
draw_slice      : link[0x8998480 s:100x100 fmt:yuv420p          vflip           ->slicify         ] y:50 h:50 dir:-1
draw_slice      : link[0x8998740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:90 h:10 dir:-1
draw_slice      : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:90 h:10 dir:-1
draw_slice      : link[0x8998740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:80 h:10 dir:-1
draw_slice      : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:80 h:10 dir:-1
draw_slice      : link[0x8998740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:70 h:10 dir:-1
draw_slice      : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:70 h:10 dir:-1
draw_slice      : link[0x8998740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:60 h:10 dir:-1
draw_slice      : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:60 h:10 dir:-1
draw_slice      : link[0x8998740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:50 h:10 dir:-1
draw_slice      : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:50 h:10 dir:-1
draw_slice      : link[0x8998160 s:100x100 fmt:yuv420p          slicify         ->vflip           ] y:50 h:50 dir:1
draw_slice      : link[0x8998480 s:100x100 fmt:yuv420p          vflip           ->slicify         ] y:0 h:50 dir:-1
draw_slice      : link[0x8998740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:40 h:10 dir:-1
draw_slice      : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:40 h:10 dir:-1
draw_slice      : link[0x8998740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:30 h:10 dir:-1
draw_slice      : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:30 h:10 dir:-1
draw_slice      : link[0x8998740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:20 h:10 dir:-1
draw_slice      : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:20 h:10 dir:-1
draw_slice      : link[0x8998740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:10 h:10 dir:-1
draw_slice      : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:10 h:10 dir:-1
draw_slice      : link[0x8998740 s:100x100 fmt:yuv420p          slicify         ->scale           ] y:0 h:10 dir:-1
draw_slice      : link[0x8998830 s:100x100 fmt:yuv420p          scale           ->ffplay_output   ] y:0 h:10 dir:-1

Regards.
-- 
FFmpeg = Faithless Funny Magical Philosofic Enigmatic Governor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-slice-dir-for-slicify.patch
Type: text/x-diff
Size: 1735 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091205/dd6f4127/attachment.patch>



More information about the ffmpeg-devel mailing list