mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 19:59:46 +00:00
avfilter/af_firequalizer: add av_restrict on convolution func
slightly improved speed Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
This commit is contained in:
parent
89c0fda5f4
commit
0bab78f7e7
@ -197,8 +197,8 @@ static int query_formats(AVFilterContext *ctx)
|
|||||||
return ff_set_common_samplerates(ctx, formats);
|
return ff_set_common_samplerates(ctx, formats);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fast_convolute(FIREqualizerContext *s, const float *kernel_buf, float *conv_buf,
|
static void fast_convolute(FIREqualizerContext *av_restrict s, const float *av_restrict kernel_buf, float *av_restrict conv_buf,
|
||||||
OverlapIndex *idx, float *data, int nsamples)
|
OverlapIndex *av_restrict idx, float *av_restrict data, int nsamples)
|
||||||
{
|
{
|
||||||
if (nsamples <= s->nsamples_max) {
|
if (nsamples <= s->nsamples_max) {
|
||||||
float *buf = conv_buf + idx->buf_idx * s->rdft_len;
|
float *buf = conv_buf + idx->buf_idx * s->rdft_len;
|
||||||
@ -235,8 +235,8 @@ static void fast_convolute(FIREqualizerContext *s, const float *kernel_buf, floa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fast_convolute2(FIREqualizerContext *s, const float *kernel_buf, FFTComplex *conv_buf,
|
static void fast_convolute2(FIREqualizerContext *av_restrict s, const float *av_restrict kernel_buf, FFTComplex *av_restrict conv_buf,
|
||||||
OverlapIndex *idx, float *data0, float *data1, int nsamples)
|
OverlapIndex *av_restrict idx, float *av_restrict data0, float *av_restrict data1, int nsamples)
|
||||||
{
|
{
|
||||||
if (nsamples <= s->nsamples_max) {
|
if (nsamples <= s->nsamples_max) {
|
||||||
FFTComplex *buf = conv_buf + idx->buf_idx * s->rdft_len;
|
FFTComplex *buf = conv_buf + idx->buf_idx * s->rdft_len;
|
||||||
|
Loading…
Reference in New Issue
Block a user