[FFmpeg-devel] [PATCH] Rewrite main resampling loop (common and linear).
michaelni at gmx.at
Mon Jun 2 01:07:30 CEST 2014
On Mon, May 26, 2014 at 10:38:23PM -0300, James Almer wrote:
> On 26/05/14 9:38 PM, Ronald S. Bultje wrote:
> > This removes a branch at a performance-sensitive point (in the middle
> > of the loop). In fate-swr-resample-s32p-8000-2626, this makes the code
> > about 10% faster. It also simplifies the loops, allowing us to rewrite
> > it in yasm at some later point.
> > The compensation_distance != 0 code and index < 0 code are still kind
> > of hairy. For compensation_distance != 0, this should likely be handled
> > in the caller, so that it calls swri_resample twice (once until the
> > dst_incr switch-point, and once with the remainder of the samples). For
> > index < 0, the code should probably be rewritten to break out of the
> > loop once sample_index >= 0, and then resume (e.g. as a tail-call) to
> > the common or linear resampling loops.
> libavresample had some refactoring a couple months ago (commit be39496)
> where they removed the negative index case.
> Maybe the general idea could be copied.
it can, and the commit is actually on my todo list for that very
reason, it seemed a rather minor thing though as it doesnt really
affect any speed relevant codepath unless i missed one
that said, if someone else wants to port that, please do! my todo list
is longer than what ill be able to work on anyway ...
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 181 bytes
Desc: Digital signature
More information about the ffmpeg-devel