[MPlayer-dev-eng] Faster libaf

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Dec 28 21:13:33 CET 2004


Hi,

On Tue, Dec 28, 2004 at 08:44:08PM +0100, Alex Beregszaszi wrote:
> Attached is a patch which adds a new function to libaf in order to open
> the doors for _speed_.
> 
> I'm going to commit it in the next few days, as it doesn't affects
> anything - being only optional.
> 
> The idea: two iterations of af_play theoretically can accept different
> input formats, this makes adding huge if-else blocks in the play
> functions of the filters necsessary. Adding af_play_fixed solves it, but
> only if you add the appropriate flag to the module and also implement
> play_fixed.
> 
> It should be done as writing fast implementations for the most common
> ways and set the functions pointer to that. As a fallback the original
> if-else play() can be used as well, as the arguments are the same.

I don't quite get it... How can the format change inbetween? I don't
think it can without a reinit of the filter chain?
Also most filters don't have huge if-then-else blocks in the play
functions (they support only one format), can you give an example?

> What do you think? I know it looks like crap (and it is) but still
> better than the current situation.

Allowing to change value of af->play during the REINIT control should be
enough to get what you want unless I misunderstood you...

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list