diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2014-05-26 20:38:18 -0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-02 00:47:54 +0200 |
commit | 9b53853756f7e7535b4178054757fc2cb90408f3 (patch) | |
tree | a4ad715e73bfd1e74c0da827c49bc3d8c0e6ea33 /tools/trasher.c | |
parent | e91f27cbbb276bbdc9f7bc18e69e9b5fe6d16387 (diff) | |
download | ffmpeg-9b53853756f7e7535b4178054757fc2cb90408f3.tar.gz |
Rewrite main resampling loop (common and linear).
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.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools/trasher.c')
0 files changed, 0 insertions, 0 deletions