[pulseaudio-discuss] [PATCH 1/4] Use fastpath assert in trivial resampler
Colin Guthrie
gmane at colin.guthr.ie
Sun Nov 27 07:07:07 PST 2011
'Twas brillig, and Maarten Bosmans at 23/11/11 10:40 did gyre and gimble:
> When the assert is disabled, the trivial resampler gets a 35% performance boost.
> ---
> src/pulsecore/resampler.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
> index dd9c1aa..495f33f 100644
> --- a/src/pulsecore/resampler.c
> +++ b/src/pulsecore/resampler.c
> @@ -1391,7 +1391,7 @@ static void trivial_resample(pa_resampler *r, const pa_memchunk *input, unsigned
> if (j >= in_n_frames)
> break;
>
> - pa_assert(o_index * fz < pa_memblock_get_length(output->memblock));
> + pa_assert_fp(o_index * fz < pa_memblock_get_length(output->memblock));
>
> memcpy((uint8_t*) dst + fz * o_index,
> (uint8_t*) src + fz * j, (int) fz);
All these look reasonable to me, so pushed.
Thanks
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited http://www.tribalogic.net/
Open Source:
Mageia Contributor http://www.mageia.org/
PulseAudio Hacker http://www.pulseaudio.org/
Trac Hacker http://trac.edgewall.org/
More information about the pulseaudio-discuss
mailing list