[FFmpeg-devel] [NOPATCH] lavfi/mp: drop tinterlace wrapper

Clément Bœsch ubitux at gmail.com
Thu Apr 25 16:21:02 CEST 2013

On Thu, Apr 25, 2013 at 04:08:44PM +0200, Stefano Sabatini wrote:
> First note, mp=tinterlace only supports yuv420p and variants formats,
> so it doesn't make sense to test other formats, nor with modes which
> are only supported in tinterlace. With the other formats tinterlace
> is faster since it avoids conversions.
> Second observations, due to various issues the null muxer is
> duplicating frames, I need to set PTS to NAN (thus reproducing the
> same issue of mp=tinterlace) in order to avoid the dup problem.
> Updated benchmarks follow.
> ffmpeg -f lavfi -i "testsrc=d=200,format=yuv420p,tinterlace=0,setpts=nan" -f null - -benchmark
> bench: utime=9.325s
> bench: maxrss=35744kB
> ffmpeg -f lavfi -i "testsrc=d=200,format=yuv420p,mp=tinterlace=0,setpts=nan" -f null - -benchmark
> bench: utime=9.329s
> bench: maxrss=35740kB
> ffmpeg -f lavfi -i "testsrc=d=200,format=yuv420p,mp=tinterlace=1,setpts=nan" -f null - -benchmark

copy paste failure i believe.

> bench: utime=9.161s
> bench: maxrss=19668kB
> ffmpeg -f lavfi -i "testsrc=d=200,format=yuv420p,mp=tinterlace=1,setpts=nan" -f null - -benchmark
> bench: utime=8.909s
> bench: maxrss=330652kB
> ffmpeg -f lavfi -i "testsrc=d=200,format=yuv420p,tinterlace=2,setpts=nan" -f null - -benchmark
> bench: utime=9.121s
> bench: maxrss=20656kB
> ffmpeg -f lavfi -i "testsrc=d=200,format=yuv420p,mp=tinterlace=2,setpts=nan" -f null - -benchmark
> bench: utime=8.981s
> bench: maxrss=330592kB
> ffmpeg -f lavfi -i "testsrc=d=200,format=yuv420p,tinterlace=3,setpts=nan" -f null - -benchmark
> bench: utime=9.529s
> bench: maxrss=42832kB
> ffmpeg -f lavfi -i "testsrc=d=200,format=yuv420p,mp=tinterlace=3,setpts=nan" -f null - -benchmark
> bench: utime=9.597s
> bench: maxrss=40780kB
> ffmpeg -f lavfi -i "testsrc=d=200,format=yuv420p,tinterlace=4,setpts=nan" -f null - -benchmark
> bench: utime=9.193s
> bench: maxrss=19952kB
> ffmpeg -f lavfi -i "testsrc=d=200,format=yuv420p,mp=tinterlace=4,setpts=nan" -f null - -benchmark
> bench: utime=8.981s
> bench: maxrss=330848kB

Here are my results:

% for i in 0 1 2 3 4; do for f in mp=tinterlace tinterlace; do filter="$f=$i"; echo "$filter:"; ./ffmpeg -v 0 -f lavfi -i "testsrc=d=200,format=yuv420p,$filter,setpts=nan" -f null - -benchmark; done; echo; done 
bench: utime=3.320s
bench: maxrss=355984kB
bench: utime=3.100s
bench: maxrss=58360kB

bench: utime=3.093s
bench: maxrss=351176kB
bench: utime=2.967s
bench: maxrss=42944kB

bench: utime=3.127s
bench: maxrss=350920kB
bench: utime=2.967s
bench: maxrss=43680kB

bench: utime=3.603s
bench: maxrss=56320kB
bench: utime=3.360s
bench: maxrss=57104kB

bench: utime=3.120s
bench: maxrss=350908kB
bench: utime=3.003s
bench: maxrss=44200kB

... I believe we can drop mp=tinterlace.

Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130425/c2506acd/attachment.asc>

More information about the ffmpeg-devel mailing list