[FFmpeg-devel] [PATCH] Rewrite main resampling loop (common and linear).
michaelni at gmx.at
Mon Jun 2 00:59:07 CEST 2014
On Mon, May 26, 2014 at 08:38:18PM -0400, 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.
> libswresample/resample_template.c | 64 +++++++++++++++++++++++++++++----------
> 1 file changed, 48 insertions(+), 16 deletions(-)
applied and overflow check added
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The worst form of inequality is to try to make unequal things equal.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 181 bytes
Desc: Digital signature
More information about the ffmpeg-devel