diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-04-03 18:44:47 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-04-09 13:52:29 +0200 |
commit | 6875f495d916b9c7a8d58a1bc84d2cd25c186d80 (patch) | |
tree | 77e62c52f4c6f230f1017fcd88d7440ff220a7ce /libavcodec/x86/hevc/dsp_init.c | |
parent | 9211abfe7e5b10104670a25471e4880046fe417a (diff) | |
download | ffmpeg-6875f495d916b9c7a8d58a1bc84d2cd25c186d80.tar.gz |
avcodec/x86/hevc/dsp_init: Make ff_hevc_put_bi_[eq]?pel* funcs static
Given that there are actually ASM functions of this type,
one can't simply remove the ff_ prefix from the definitions
and declare them as static. Yet one can do nearly that
if one keeps the ff_ prefix and removes the declarations
for the (now static) functions defined in dsp_init.c
from hevcdsp.h and if one defines the functions in the correct
order (smaller width first) so that no forward declarations
are necessary (which was already true).
The new declarations avoid nested macros to simplify things.
It nevertheless turned out to be beneficial line-wise.
(It would be possible to avoid most of these declarations:
It is legal to repeat a function declaration without static
if the first declaration declared a function as static.
So if the macros simply declared all the functions that
they call, one could avoid declarations for the functions
that are called. While this is legal C, it unfortuntaly
clashes with GCC's -Wredundant-decls (which configure enables)
and it is also ugly, as these macro definitions would
provide declarations used in ff_hevc_dsp_init_x86().)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/x86/hevc/dsp_init.c')
-rw-r--r-- | libavcodec/x86/hevc/dsp_init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/x86/hevc/dsp_init.c b/libavcodec/x86/hevc/dsp_init.c index f8057dee9f..dc4157b071 100644 --- a/libavcodec/x86/hevc/dsp_init.c +++ b/libavcodec/x86/hevc/dsp_init.c @@ -217,7 +217,7 @@ static void hevc_put_uni_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dst } \ } #define mc_rep_bi_func(name, bitd, step, W, opt) \ -void ff_hevc_put_bi_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, const uint8_t *_src, \ +static void ff_hevc_put_bi_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, const uint8_t *_src, \ ptrdiff_t _srcstride, const int16_t *_src2, \ int height, intptr_t mx, intptr_t my, int width) \ { \ @@ -257,7 +257,7 @@ static void hevc_put_uni_##name##W##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dsts height, mx, my, width); \ } #define mc_rep_bi_func2(name, bitd, step1, step2, W, opt) \ -void ff_hevc_put_bi_##name##W##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ +static void ff_hevc_put_bi_##name##W##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ ptrdiff_t _srcstride, const int16_t *src2, \ int height, intptr_t mx, intptr_t my, int width) \ { \ @@ -284,7 +284,7 @@ static void hevc_put_##name##width1##_10_##opt1(int16_t *dst, const uint8_t *src } #define mc_bi_rep_mix_10(name, width1, width2, width3, opt1, opt2, width4) \ -void ff_hevc_put_bi_##name##width1##_10_##opt1(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ +static void ff_hevc_put_bi_##name##width1##_10_##opt1(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ ptrdiff_t _srcstride, const int16_t *src2, \ int height, intptr_t mx, intptr_t my, int width) \ { \ @@ -320,7 +320,7 @@ static void hevc_put_##name##width1##_8_##opt1(int16_t *dst, const uint8_t *src, } #define mc_bi_rep_mix_8(name, width1, width2, width3, opt1, opt2) \ -void ff_hevc_put_bi_##name##width1##_8_##opt1(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ +static void ff_hevc_put_bi_##name##width1##_8_##opt1(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ ptrdiff_t _srcstride, const int16_t *src2, \ int height, intptr_t mx, intptr_t my, int width) \ { \ |