ffmpeg/libswresample
Andreas Rheinhardt 20b0d24c2f Makefile: Redo duplicating object files in shared builds
In case of shared builds, some object files containing tables
are currently duplicated into other libraries: log2_tab.c,
golomb.c, reverse.c. The check for whether this is duplicated
is simply whether CONFIG_SHARED is true. Yet this is crude:
E.g. libavdevice includes reverse.c for shared builds, but only
needs it for the decklink input device, which given that decklink
is not enabled by default will be unused in most libavdevice.so.

This commit changes this by making it more explicit about what
to duplicate from other libraries. To do this, two new Makefile
variables were added: SHLIBOBJS and STLIBOBJS. SHLIBOBJS contains
the objects that are duplicated from other libraries in case of
shared builds; STLIBOBJS contains stuff that a library has to
provide for other libraries in case of static builds. These new
variables provide a way to enable/disable with a finer granularity
than just whether shared builds are enabled or not. E.g. lavd's
Makefile now contains: SHLIBOBJS-$(CONFIG_DECKLINK_INDEV) += reverse.o

Another example is provided by the golomb tables. These are provided
by lavc for static builds, even if one uses a build configuration
that makes only lavf use them. Therefore lavc's Makefile contains
STLIBOBJS-$(CONFIG_MXF_MUXER) += golomb.o, whereas lavf's Makefile
has a corresponding SHLIBOBJS-$(CONFIG_MXF_MUXER) += golomb_tab.o.
E.g. in case the MXF muxer is the only component needing these tables
only libavformat.so will contain them for shared builds; currently
libavcodec.so does so, too.
(There is currently a CONFIG_EXTRA group for golomb. But actually
one would need two groups (golomb_avcodec and golomb_avformat) in
order to know when and where to include these tables. Therefore
this commit uses a Makefile-based approach for this and stops
using these groups for the users in libavformat.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 05:01:04 +01:00
..
aarch64 swresample/aarch64: fix relocation out of range error 2021-09-25 21:55:29 +03:00
arm Include attributes.h directly 2021-04-19 14:34:10 +02:00
tests all: Remove unused-but-set variables 2021-12-03 16:09:14 +01:00
x86 Replace all occurences of av_mallocz_array() by av_calloc() 2021-09-20 01:03:52 +02:00
Makefile Makefile: Redo duplicating object files in shared builds 2022-01-04 05:01:04 +01:00
audioconvert.c libswresample/audioconvert: Fix undefined NULL + 0 2021-04-01 14:15:20 +02:00
audioconvert.h avutil/internal, swresample/audioconvert: Remove cpu.h inclusions 2021-07-22 14:33:45 +02:00
dither.c
dither_template.c
libswresample.v
log2_tab.c
noise_shaping_data.c
options.c avcodec/avcodec: Stop including channel_layout.h in avcodec.h 2021-07-22 11:14:31 +02:00
rematrix.c swresample/rematrix: handle 22.2 as a 9 channel layout 2020-08-18 22:47:35 +03:00
rematrix_template.c
resample.c avcodec/avcodec: Don't include cpu.h 2021-07-22 12:59:07 +02:00
resample.h
resample_dsp.c
resample_template.c
soxr_resample.c
swresample.c libswresample/swresamplec: Err num(negative-size) was used as a function parameter 2021-12-09 13:12:45 +01:00
swresample.h
swresample_frame.c avcodec/avcodec: Stop including channel_layout.h in avcodec.h 2021-07-22 11:14:31 +02:00
swresample_internal.h
swresampleres.rc
version.h lib*/version.h: Bump Versions after release/5.0 branch 2022-01-03 22:10:46 +01:00