[FFmpeg-devel] [RFC] Lavfi test system

Michael Niedermayer michaelni
Fri Jan 8 03:48:37 CET 2010


On Thu, Jan 07, 2010 at 11:36:02PM +0100, Stefano Sabatini wrote:
> On date Monday 2009-12-28 00:58:55 +0100, Stefano Sabatini encoded:
> > On date Sunday 2009-12-13 03:33:18 +0100, Michael Niedermayer encoded:
> > > On Sun, Dec 13, 2009 at 01:52:41AM +0100, Stefano Sabatini wrote:
> > [...]
> > > > > and then each filter should be individually tested against all
> > > > > colorspaces.
> > > > 
> > > > Not every pixel format will be in general supported, so we may
> > > > manually add a list of supported formats. Even better would be to add
> > > > some interface to expose the set of supported inputs (though not sure
> > > > this is possible, especially considering the scale filter).
> > > 
> > > you are searching for query_formats() ?
> > 
> > Well at least now I have a tool for exposing that info.
> > 
> > BTW:
> > make show-filter-formats; and show-filter-formats scale 100:100
> > make: `show-filter-formats' is up to date.
> [...]  
> > I believe all the HW accelerated formats should be avoided, right?
> > 
> > Also how to feed a filter with video formats for which we cannot write
> > in output (I mean pal formats)? I'm asking since for today I run out
> > of ideas and asking is soo easy...
> 
> First implementation of the test system, with ad-hoc per-feature tests
> and one test for each filter/input pixel format combination, useful
> for testing one-input / one-output filters.
> 
> BTW the ff* tools are not able to decode some of the output files, for example:
> stefano at geppetto ~/s/l/f/t/data> ffplay b-yuv411p-null.avi
> FFplay version SVN-r21003, Copyright (c) 2003-2010 Fabrice Bellard, et al.
> [...]
> [avi @ 0x97f9690]MAX_READ_SIZE:5000000 reached
> Input #0, avi, from 'b-yuv411p-null.avi':
>   Duration: 00:00:02.00, start: 0.000000, bitrate: 30440 kb/s
>     Stream #0.0: Video: Y41B / 0x42313459, 352x288, 25 fps, 25 tbr, 25 tbn, 25 tbc
> b-yuv411p-null.avi: could not open codecs
> 
> which is somehow due to the fourCC problem I mentioned in another
> thread.
> 
> What is still missing is a system for testing each filter/filter
> combination, the only problem is that in this case is difficult to
> find parameters which are good for every possible combination, and I
> don't want to be required to specify them.
> 

> The best way to fix that problem seems to me to use parametric values,
> e.g.:
> scale=2/3*in_w:2/3*out_w, pad=3/2*in_w:3/2*out_w:1/4*in_w:(out_w-in_w)/2:(out_h-in_h)/2, crop=(in_w-out_w)/2:(in_h-out_h)/2in_w/2:out_h/2:

your shell is able to replace $VAR and even to do simple math like
$[2*5/3] that should be enough


[...]
> +# generic tests
> +do_lavfi "crop"               "slicify=20,crop=100:100"
> +do_lavfi "crop_scale"         "slicify=20,crop=100:100,scale=200:-1"
> +do_lavfi "crop_scale_pad"     "slicify=20,crop=100:100,scale=200:-1,pad=400:300:50:50:red"
> +do_lavfi "crop_scale_vflip"   "slicify=20,null,null,crop=200:200,crop=20:20,scale=200:200,scale=250:250,vflip,vflip,null,scale=200:200,crop=100:100,vflip,scale=200:200,null,vflip,crop=100:100,null"
> +do_lavfi "crop_vflip"         "slicify=20,crop=100:100,vflip"
> +do_lavfi "null"               "slicify=20,null"
> +do_lavfi "pad_pad"            "slicify=20,pad=400:400:20:20:red,pad=420:420:10:10:blue"
> +do_lavfi "pad_vflip"          "slicify=20,pad=500:400:50:50:red,vflip"
> +do_lavfi "scale200"           "slicify=20,scale=200:200"
> +do_lavfi "scale500"           "slicify=20,scale=500:500"
> +do_lavfi "vflip"              "slicify=20,vflip"
> +do_lavfi "vflip_crop"         "slicify=20,vflip,crop=100:100"
> +do_lavfi "vflip_pad"          "slicify=20,vflip,pad=500:600:100:100"
> +do_lavfi "vflip_vflip"        "slicify=20,vflip,vflip"

please dont use slicify=20 for all but more random

also dont use avi as output but something that supports timestamps so
they are tested as well (filters may change them)

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

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100108/e7423f15/attachment.pgp>



More information about the ffmpeg-devel mailing list