diff options
Diffstat (limited to 'libavcodec/iirfilter.c')
-rw-r--r-- | libavcodec/iirfilter.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/libavcodec/iirfilter.c b/libavcodec/iirfilter.c index 4116d5c..b202515 100644 --- a/libavcodec/iirfilter.c +++ b/libavcodec/iirfilter.c @@ -2,20 +2,20 @@ * IIR filter * Copyright (c) 2008 Konstantin Shishkov * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -28,7 +28,6 @@ #include "libavutil/attributes.h" #include "libavutil/common.h" -#include "libavutil/log.h" #include "iirfilter.h" @@ -198,7 +197,7 @@ av_cold struct FFIIRFilterCoeffs *ff_iir_filter_init_coeffs(void *avc, return c; init_fail: - ff_iir_filter_free_coeffs(c); + ff_iir_filter_free_coeffsp(&c); return NULL; } @@ -305,16 +304,24 @@ void ff_iir_filter_flt(const struct FFIIRFilterCoeffs *c, } } -av_cold void ff_iir_filter_free_state(struct FFIIRFilterState *state) +av_cold void ff_iir_filter_free_statep(struct FFIIRFilterState **state) { - av_free(state); + av_freep(state); } -av_cold void ff_iir_filter_free_coeffs(struct FFIIRFilterCoeffs *coeffs) +av_cold void ff_iir_filter_free_coeffsp(struct FFIIRFilterCoeffs **coeffsp) { + struct FFIIRFilterCoeffs *coeffs = *coeffsp; if (coeffs) { - av_free(coeffs->cx); - av_free(coeffs->cy); + av_freep(&coeffs->cx); + av_freep(&coeffs->cy); } - av_free(coeffs); + av_freep(coeffsp); +} + +void ff_iir_filter_init(FFIIRFilterContext *f) { + f->filter_flt = ff_iir_filter_flt; + + if (HAVE_MIPSFPU) + ff_iir_filter_init_mips(f); } |