Commit Graph

2478 Commits

Author SHA1 Message Date
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
rcombs 18192166e7 lavc/videotoolboxenc: add ProRes support 2021-12-22 18:38:40 -06:00
rcombs 310a1c25e8 lavc/Makefile: fix missing hevc_videotoolbox case 2021-12-22 18:38:40 -06:00
Andreas Rheinhardt 69a45b8a49 avcodec/Makefile: Remove superfluous avformat->DNXHD dependencies
There is no mxfenc dependency any more since commit
b9a26b9d55.
Also remove a dnxhddata.h inclusion in mxfenc that was forgotten
in the very same commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-19 00:46:16 +01:00
rcombs a41a2efc85 lavc/videotoolbox: add VP9 hardware acceleration
On M1 Max, this supports profiles 0 and 2, but not 1 and 3.
2021-11-28 16:40:58 -06:00
Limin Wang 3436864e68 avcodec: suppport for bitpacked encode
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-11-25 15:04:35 +08:00
Limin Wang 130250d3af avcodec: rename bitpacked.c to bitpacked_dec.c
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-11-25 15:04:35 +08:00
Paul B Mahol 148ada5577 avcodec: add native Speex decoder 2021-10-10 17:44:41 +02:00
Peter Ross 60a9d3778f avcodec: GEM Raster image decoder
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2021-10-08 20:37:36 +11:00
Paul B Mahol 1f447fd954 avcodec: add amr parser 2021-10-02 18:49:40 +02:00
Andreas Rheinhardt 136865413c avcodec/tests/utils: Rename to avcodec
The current name comes from a time in which libavcodec/utils.c
contained the whole core of libavcodec.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-26 12:56:08 +02:00
Peter Ross c655a734b1 avcodec/siren: MSN Siren decoder
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2021-09-07 18:07:11 +10:00
Niklas Haas 6bc29a6b57 avcodec/h274: add film grain synthesis routine
This could arguably also be a vf, but I decided to put it here since
decoders are technically required to apply film grain during the output
step, and I would rather want to avoid requiring users insert the
correct film grain synthesis filter on their own.

The code, while in C, is written in a way that unrolls/vectorizes fairly
well under -O3, and is reasonably cache friendly. On my CPU, a single
thread pushes about 400 FPS at 1080p.

Apart from hand-written assembly, one possible avenue of improvement
would be to change the access order to compute the grain row-by-row
rather than in 8x8 blocks. This requires some redundant PRNG calls, but
would make the algorithm more cache-oblivious.

The implementation has been written to the wording of SMPTE RDD 5-2006
as faithfully as I can manage. However, apart from passing a visual
inspection, no guarantee of correctness can be made due to the lack of
any publicly available reference implementation against which to
compare it.

Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-24 09:58:52 -03:00
Paul B Mahol ed47a4a842 avcodec: add SMC encoder 2021-08-18 08:55:56 +02:00
Andreas Rheinhardt a449fb35ca avcodec/fft-internal: Make it a standalone header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 19:56:40 +02:00
Andreas Rheinhardt 34a7e61768 avcodec/Makefile: Fix standalone build of adpcm_argo encoder
Said encoder uses a function in adpcm.c and while it does not use
anything from adpcm_data.c, other parts of both adpcm.c and adpcmenc.c
need it, so adpcm_data.c needs to be enabled anyway.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-08 16:03:18 +02:00
Anton Khirnov ff0a96046d lavc: move small misc definitions into a separate header
This will allow to avoid #including the entire avcodec.h in some places.
2021-06-10 16:51:44 +02:00
Cameron Cawley 5c7313c740
avcodec: Implement Acorn Replay IMA ADPCM decoder
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-05-09 17:01:27 +10:00
Andreas Rheinhardt 4be1714b12 avcodec/Makefile: Remove obsolete dependency of eatqi dec on rl.o
Unnecessary since 6e8fcd9c56.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-28 01:46:53 +02:00
Andreas Rheinhardt e5af920309 avcodec: Move all AVCodecParser.split functions to remove_extradata_bsf
The remove_extradata bsf is the only user of these functions.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:16 -03:00
Andreas Rheinhardt e3d993fab0 avcodec/vaapi: Remove old and deprecated VAAPI context and header
Deprecated in 851960f6f8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:06 -03:00
Andreas Rheinhardt 337f777f37 avcodec: Remove deprecated old aliases for NVENC encoders
Deprecated in 888a5c7947.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:05 -03:00
Andreas Rheinhardt d947464ad4 avcodec: Remove deprecated AVPicture API
Deprecated in a17a766190.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:04 -03:00
Andreas Rheinhardt b7473ffbf5 avcodec/codec2utils: Remove legacy avpriv functions
Unused since 37d742b607.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:04 -03:00
Andreas Rheinhardt 0f247986ad avcodec, avformat: Remove old BSF API
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:42:59 -03:00
Aidan Richmond a0fd55c206
avcodec/adpcmenc: Adds encoder for Westwood ADPCM.
Signed-off-by: Aidan Richmond <aidan.is@hotmail.co.uk>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-04-26 19:56:32 +10:00
Andreas Rheinhardt d0dcfaef51 avcodec/mjpegenc: Remove dependency of AMV encoder on mjpegenc_huffman
Using optimal Huffman tables is not supported for AMV and always
disabled by ff_mpv_encode_init(); therefore one can build
the AMV encoder without mjpegenc_huffman if one adds the necessary
compile-time checks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-10 03:45:18 +02:00
James Almer f47d7a3b42 avcodec: move core AVCodecContext functions from util.c to a new file
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-19 15:35:35 -03:00
James Almer 4057a060f6 avcodec: move AVCodecParameters related functions from util.c to a new file
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-19 15:33:54 -03:00
Andreas Rheinhardt f0dc8faeb1 avcodec/qsvdec: Make functions used only here static, remove header
Forgotten after d78ecf10bd.

(Also mark some AVPackets as const.)

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-09 14:00:13 +01:00
Anton Khirnov 2644a5d418 lavc: remove tests/options
It tests deprecated avcodec_copy_context().
2021-03-08 09:29:50 +01:00
Jan Ekström 18713d22a2 avcodec: add TTML encoder
Enables encoding of other subtitle formats into TTML paragraphs.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2021-03-05 19:45:00 +02:00
Paul B Mahol 6b43e1a86c avcodec: add SGA Video decoder 2021-03-01 17:36:42 +01:00
Paul B Mahol 5111707df6 avcodec: add SGA PCM decoder 2021-03-01 17:36:16 +01:00
Anton Khirnov 3a5b857d4c lavc: split LSCR decoder out of PNG decoder
It shares very little code with pngdec, so keeping them together only
makes the code harder to read.
2021-02-24 17:16:46 +01:00
Paul B Mahol d69f4be1c6 avcodec/cfhdenc: refactor DSP code for CFHD encoder
This is needed to implement x86 SIMD.
2021-02-24 17:14:03 +01:00
Andreas Rheinhardt ad58113afe avcodec/tiff_data: Move data to its only user
tiff.c is the only user of the data from tiff_data.c (the dependency of
the tiff encoder of it is spurious). Therefore this commit moves all the
data from tiff_data.c to tiff_data.h (which is only included by tiff.c)
and makes the objects declared therein static.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt bb9167dbde avformat/isom: Split movaudio/movvideo tags off into a separate file
The NUT and avi demuxers only need ff_codec_movvideo_tags and so this
removes a dependency on the rest of isom.c as well as on mpeg4audio.c
(which isom depends on); it is similar for the Matroska demuxer and
muxers, except that the mpeg4audio.c dependency can't be avoided.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt b5207b7afd avcodec/Makefile: Remove outdated dependency of FLV demuxer on mpeg4audio
Unneeded since f96a653184 and
b2bb09bcc3.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt bb0be840c5 avcodec/Makefile: Don't build mjpegenc_huffman unconditionally
Only the mjpeg and amv encoders as well as its testprogram actually need
it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +01:00
Andreas Rheinhardt d26198ada3 avcodec/g2meet, mjpegdec: Factor out common VLC initialization code
While just at it, remove the nb_codes parameter: It is redundant
(the number of codes is implicitly contained in the array containing how
many entries of a specific size there are) and for this reason it might
even be wrong, so it is better to check what is actually used instead.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +01:00
Andreas Rheinhardt f180f515de avcodec/Makefile: Remove redundant mjpegdec dependency from tiff decoder
The MJPEG decoder is already activated by configure whenever the tiff
decoder is selected; ergo it is unnecessary to add a dependency in the
Makefile.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +01:00
Andreas Rheinhardt 7bf2b76b41 configure, libavcodec/Makefile: Fix avrn dependencies
The avrn decoder actually only needs one thing: The MJPEG decoder.
Instead the Makefile made it compile mjpegdec and configure required
some of the prerequisites of the MJPEG decoder (exif and jpegtables).
Even if all the prerequisites of the MJPEG decoder were required, it
would still not make the MJPEG decoder usable, because for that
the MJPEG decoder needs to be in the list of codecs in codec_list.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +01:00
Andreas Rheinhardt f26b8385ee avcodec/Makefile: Remove spurios dcaenc dependency
It does not need dca.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +01:00
Andreas Rheinhardt 3b26d030b5 configure, libavcodec/Makefile: Remove spurious CAF demuxer dependencies
Forgotten in 604fbb3132.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +01:00
Paul B Mahol 8651bf8a2e avcodec: add Simbiosis IMX video decoder 2021-02-20 17:42:00 +01:00
Paul B Mahol 67c8c863c7 avcodec: add initial exr image encoder 2021-02-18 13:00:40 +01:00
Paul B Mahol 48a0eb21aa avcodec: add setts bitstream filter 2021-02-12 19:50:07 +01:00
Paul B Mahol b6327612ab avcodec: add cri parser 2021-02-09 15:01:34 +01:00
Andreas Rheinhardt bdd55e1dd8 avcodec/Makefile: Remove dependency for nonexistent files
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-07 10:29:19 +01:00