[FFmpeg-devel] [RFC] lavfi-audio test

Stefano Sabatini stefano.sabatini-lala at poste.it
Wed Jul 27 19:06:25 CEST 2011


On date Friday 2011-07-22 14:30:27 +0300, Mina Nagy Zaki encoded:
> On Wed, Jul 20, 2011 at 01:18:28AM +0200, Stefano Sabatini wrote:
> > On date Monday 2011-07-18 01:41:49 +0200, Stefano Sabatini encoded:
> [...]
> > 
> > Added a check on the supported layout conversions, now I get:
> > $ make V=1 fate-lavfi-audiofmts_anull
> > [...]
> > TEST    lavfi-audiofmts_anull
> > ./tests/fate-run.sh fate-lavfi-audiofmts_anull "" "" "/home/stefano/src/ffmpeg-mnzaki2" 'lavfitest' '' '' '' '' ''
> > /home/stefano/src/ffmpeg-mnzaki2/ffmpeg -v 0 -y -flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -threads 1 -ar 44100 -ac 2 -sample_fmt s16 -i /home/stefano/src/ffmpeg-mnzaki2/./tests/data/asynth1.sw -flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -threads 1 -dct fastint -af aformat=dbl:mono:packed,anull= -acodec pcm_f64le -sample_fmt dbl -f nut md5:
> > --- ./tests/ref/lavfi/audiofmts_anull	2011-07-18 00:51:31.000000000 +0200
> > +++ tests/data/fate/lavfi-audiofmts_anull	2011-07-20 01:13:54.000000000 +0200
> > @ -1 +1 @@
> > -null
> > \ No newline at end of file
> > +dbl_mono_packed     
> > \ No newline at end of file
> > make: *** [fate-lavfi-audiofmts_anull] Error 
> > 
> > or in other words the -af aformat=dbl:mono:packed,anull filter is
> > crashing ffmpeg.
> > 
> > Mina, can you have a look?
> 
> Actually aformat takes packing as a bool like it is stored in links and buffers,
> so 0 for packed and 1 for planar. It might be better to change to keywords for
> arguments to be consistent though. It works properly if you use dbl:mono:0, but
> there's a bug in handling "planar mono" that I'm going to fix in the new branch.
> 
> It's also worthwhile to note that the asink/asrc filters take their formats from
> the input and output parameters to ffmpeg, except for planar/packed since all
> encoding/decoding is always packed. So,
> ./ffmpeg -i file.wav -ac 2 -sample_fmt dbl out.wav
> will insert an appropriate aconvert. 
> 
> 
> > +# tell if the $1 -> $2 conversion is supported
> > +supported_channel_conversion() {
> > +    src=$1
> > +    dst=$2
> > +    # hardcode available conversions in aconvert, needs to be updated as the code is changed
> > +    [ "$src" = "mono" -a "$dst" = "5.1"    ] ||
> > +    [ "$src" = "5.1"  -a "$dst" = "stereo" ] ||
> > +    [                    "$dst" = "mono"   ];
> 
> These are the currently supported:
> 
> [ "$src" = "stereo" -a "$dst" = "5.1"    ] ||
> [                      "$dst" = "stereo" ] ||
> [                      "$dst" = "mono"   ];

Updated against the audio-filters-20110726 branch, I'll apply the
lavfi-showfiltfmts patch soon if I see no more comments.
-- 
FFmpeg = Furious & Fabulous Minimal Plastic Ecumenical God
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-lavfi-showfiltfmts-extend-output-format-for-specifyi.patch
Type: text/x-diff
Size: 5925 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110727/bd2ea5a2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0015-lavfi-test-add-regression-test-stub-for-audio-filter.patch
Type: text/x-diff
Size: 4571 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110727/bd2ea5a2/attachment-0001.bin>


More information about the ffmpeg-devel mailing list