[FFmpeg-devel] [PATCH 2/2] avfilter: Dont partially merge lists

Michael Niedermayer michaelni at gmx.at
Mon Jul 22 13:07:55 CEST 2013


On Mon, Jul 22, 2013 at 12:47:51PM +0200, Nicolas George wrote:
> Le quartidi 4 thermidor, an CCXXI, Michael Niedermayer a écrit :
> > This prevents the unneeded insertion of multiple aresample filters in some cases
> > 
> > The format merging is moved to avoid having to call the channel layout
> > merge twice (which currently does not work as dry run mode with ff_merge_channel_layouts()
> > does not work
> 
> I am rather surprised this is necessary, and there is something going on I
> do not understand yet. If I take the example case you sent me, it starts
> like that:
> 
>     +---+                        +-------+                        +---+
>     |in |----------------------->|aformat|----------------------->|out|
>     |flt|                        |   *   |                        |s16|
>     |6ch|                        |  2ch  |                        | * |
>     +---+                        +-------+                        +---+
> 
> The merge of the first link will fail because 6ch is not compatible with
> 2ch, so it becomes:

Well, first the formats will be merged successfully:

>     +---+                        +-------+                        +---+
>     |in |----------------------->|aformat|----------------------->|out|
>     |flt|                        |  flt  |                        |s16|
>     |6ch|                        |  2ch  |                        | * |
>     +---+                        +-------+                        +---+

then the 2-6ch will fail ad cause aresample to be inserted


> 
>     +---+       +-------+        +-------+                        +---+
>     |in |------>|arsmple|------->|aformat|----------------------->|out|
>     |flt|       | * | * |        |  flt  |                        |s16|
>     |6ch|       | * | * |        |  2ch  |                        | * |
>     +---+       +-------+        +-------+                        +---+

then the links merged


>     +---+       +-------+        +-------+                        +---+
>     |in |------>|arsmple|------->|aformat|----------------------->|out|
>     |flt|       |flt|flt|        |  flt  |                        |s16|
>     |6ch|       |6ch|2ch|        |  2ch  |                        | * |
>     +---+       +-------+        +-------+                        +---+

and here still is a missmatch that then needs another aresample to be
inserted

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- 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/20130722/ba00e631/attachment.asc>


More information about the ffmpeg-devel mailing list