[FFmpeg-devel] [PATCH] lavfi: remove gradfun mp wrapper

Michael Niedermayer michaelni at gmx.at
Sat Aug 6 20:27:08 CEST 2011


On Sat, Aug 06, 2011 at 02:53:35PM +0200, Stefano Sabatini wrote:
> On date Friday 2011-08-05 00:19:04 +0200, Stefano Sabatini encoded:
> > The gradfun filter was already integrated natively in libavfilter.
> > ---
> >  doc/filters.texi                     |    1 -
> >  libavfilter/Makefile                 |    1 -
> >  libavfilter/libmpcodecs/vf_gradfun.c |  411 ----------------------------------
> >  libavfilter/vf_mp.c                  |    2 -
> >  4 files changed, 0 insertions(+), 415 deletions(-)
> >  delete mode 100644 libavfilter/libmpcodecs/vf_gradfun.c
> 
> $ ffmpeg -t 120 -i slow.flv -vf mp=gradfun -f rawvideo -y md5: -v 0
> [...]
> [buffer @ 0xa6198f0] w:320 h:240 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
> [mp @ 0xa5a7290] This is a unholy filter, it will be purified by the ffmpeg exorcist team
> which will change its syntax from dark -vf mp to light -vf.
> Thou shalst not make spells or scripts that depend on it
> Output #0, rawvideo, to 'md5:':
>   Metadata:
>     encoder         : Lavf53.6.0
>     Stream #0.0: Video: rawvideo, yuv420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
> Stream mapping:
>   Stream #0.0 -> #0.0
> Press [q] to stop, [?] for help
> 51192300 dezicycles in mp, 1 runs, 0 skips
> 31400040 dezicycles in mp, 2 runs, 0 skips
> 29604750 dezicycles in mp, 4 runs, 0 skips
> 24653602 dezicycles in mp, 8 runs, 0 skips
> 24415162 dezicycles in mp, 16 runs, 0 skips
> 23437140 dezicycles in mp, 32 runs, 0 skips
> 23390650 dezicycles in mp, 64 runs, 0 skips
> 22733221 dezicycles in mp, 128 runs, 0 skips
> 22544398 dezicycles in mp, 256 runs, 0 skips
> 22464584 dezicycles in mp, 512 runs, 0 skips
> 22402984 dezicycles in mp, 1024 runs, 0 skips
> 22378289 dezicycles in mp, 2048 runs, 0 skips
> 22364708 dezicycles in mp, 4096 runs, 0 skips
> 22354132 dezicycles in mp, 8192 runs, 0 skips
> frame= 3596 fps=193 q=0.0 Lsize=  404550kB time=00:01:59.98 bitrate=27620.4kbits/s dup=34 drop=0    
> video:404550kB audio:0kB global headers:0kB muxing overhead 0.000000%
> e0303746dbd090be018a8a967b92f978
> 
> $ ffmpeg -t 120 -i slow.flv -vf gradfun -f rawvideo -y md5: -v 0
> [...]
> [buffer @ 0x99208f0] w:320 h:240 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
> [gradfun @ 0x98ae290] threshold:1.20 radius:16
> Output #0, rawvideo, to 'md5:':
>   Metadata:
>     encoder         : Lavf53.6.0
>     Stream #0.0: Video: rawvideo, yuv420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
> Stream mapping:
>   Stream #0.0 -> #0.0
> Press [q] to stop, [?] for help
> 44353590 dezicycles in lavfi, 1 runs, 0 skips
> 27731925 dezicycles in lavfi, 2 runs, 0 skips
> 27942675 dezicycles in lavfi, 4 runs, 0 skips
> 23692147 dezicycles in lavfi, 8 runs, 0 skips
> 23669803 dezicycles in lavfi, 16 runs, 0 skips
> 22658578 dezicycles in lavfi, 32 runs, 0 skips
> 23089971 dezicycles in lavfi, 64 runs, 0 skips
> 22674349 dezicycles in lavfi, 128 runs, 0 skips
> 22600425 dezicycles in lavfi, 256 runs, 0 skips
> 22458951 dezicycles in lavfi, 512 runs, 0 skips
> 22447214 dezicycles in lavfi, 1024 runs, 0 skips
> 22427783 dezicycles in lavfi, 2048 runs, 0 skips
> 22377187 dezicycles in lavfi, 4096 runs, 0 skips
> 22347331 dezicycles in lavfi, 8192 runs, 0 skips
> frame= 3596 fps=193 q=0.0 Lsize=  404550kB time=00:01:59.98 bitrate=27620.4kbits/s dup=34 drop=0    
> video:404550kB audio:0kB global headers:0kB muxing overhead 0.000000%
> e0303746dbd090be018a8a967b92f978
> 
> Timers set in the filter function (see patch).
> 
> No significant performace difference observed after many tests, output
> is always the same (tested with various params combinations).

LGTM then

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110806/bf5e841e/attachment.asc>


More information about the ffmpeg-devel mailing list