[FFmpeg-devel] [PATCH v2 05/13] avfilter/f_ebur128: move weights and cache to EBUR128DSPContext

Michael Niedermayer michael at niedermayer.cc
Mon Jun 16 17:40:13 EEST 2025


On Mon, Jun 16, 2025 at 01:19:53PM +0200, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.dev>
> 
> ---
>  libavfilter/f_ebur128.c | 53 +++++++++++++++++------------------------
>  libavfilter/f_ebur128.h | 35 +++++++++++++++++++++++++++
>  2 files changed, 57 insertions(+), 31 deletions(-)
>  create mode 100644 libavfilter/f_ebur128.h
> 
[...]
> diff --git a/libavfilter/f_ebur128.h b/libavfilter/f_ebur128.h
> new file mode 100644
> index 0000000000..a8247e5aa0
> --- /dev/null
> +++ b/libavfilter/f_ebur128.h
> @@ -0,0 +1,35 @@
> +/*
> + * Copyright (c) 2012 Clément Bœsch
> + * Copyright (c) 2025 Niklas Haas
> + *
> + * This file is part of FFmpeg.
> + *
> + * 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.
> + *
> + * 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 FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +
> +typedef struct EBUR128Biquad {
> +    double b0, b1, b2;
> +    double a1, a2;
> +} EBUR128Biquad;
> +
> +typedef struct EBUR128DSPContext {
> +    /* Filter data */
> +    EBUR128Biquad pre;
> +    EBUR128Biquad rlb;
> +
> +    /* Cache of 3 samples for each channel */
> +    double *y; /* after pre-filter */
> +    double *z; /* after RLB-filter */
> +} EBUR128DSPContext;

missing double inclusion guards (fails fate-source)

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250616/daaa6ea2/attachment.sig>


More information about the ffmpeg-devel mailing list