From 972d3b9d5504aea192d7629844b55f35ccf5defb Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Date: Thu, 3 Apr 2025 13:45:54 +0200 Subject: [PATCH 07/23] avcodec/celp_math: Mark ff_celp_math_init() as av_cold Also do the same for ff_celp_math_init_mips(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/celp_math.c | 7 +++++-- libavcodec/mips/celp_math_mips.c | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libavcodec/celp_math.c b/libavcodec/celp_math.c index 39220a883a..658937dccc 100644 --- a/libavcodec/celp_math.c +++ b/libavcodec/celp_math.c @@ -23,13 +23,16 @@ #include <stdint.h> #include "config.h" -#include "libavutil/avassert.h" + +#include "libavutil/attributes.h" #include "libavutil/float_dsp.h" #include "libavutil/intmath.h" #include "mathops.h" #include "celp_math.h" #ifdef G729_BITEXACT +#include "libavutil/avassert.h" + static const uint16_t exp2a[]= { 0, 1435, 2901, 4400, 5931, 7496, 9096, 10730, @@ -108,7 +111,7 @@ int64_t ff_dot_product(const int16_t *a, const int16_t *b, int length) return sum; } -void ff_celp_math_init(CELPMContext *c) +av_cold void ff_celp_math_init(CELPMContext *c) { c->dot_productf = ff_scalarproduct_float_c; diff --git a/libavcodec/mips/celp_math_mips.c b/libavcodec/mips/celp_math_mips.c index ce711bd63c..1c41ce56d3 100644 --- a/libavcodec/mips/celp_math_mips.c +++ b/libavcodec/mips/celp_math_mips.c @@ -53,6 +53,7 @@ */ #include "config.h" #include "libavcodec/celp_math.h" +#include "libavutil/attributes.h" #include "libavutil/mips/asmdefs.h" #if HAVE_INLINE_ASM @@ -84,7 +85,7 @@ static float ff_dot_productf_mips(const float* a, const float* b, #endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */ #endif /* HAVE_INLINE_ASM */ -void ff_celp_math_init_mips(CELPMContext *c) +av_cold void ff_celp_math_init_mips(CELPMContext *c) { #if HAVE_INLINE_ASM #if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 -- 2.45.2