Commit Graph

101617 Commits

Author SHA1 Message Date
Andreas Rheinhardt f729dee615 avcodec/mqcenc: Remove unused ff_mqc_length
Unused since 4624656797.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:53:22 +01:00
Andreas Rheinhardt 4c8d9b1d09 avcodec/ac3tab: Remove unused ff_eac3_default_chmap
Added in 0c79b1402a to use it
in a function that was never used and was itself removed in
676f1f533e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:47:11 +01:00
Andreas Rheinhardt 6f3fe7b2c0 avformat/asf: Move ff_asf_audio_conceal_none to its only user
It is only used inside code guarded by #ifdef DEBUG, i.e. it is normally
unused.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:17:50 +01:00
Andreas Rheinhardt 3bf07b1a2d avcodec/bitstream: Rewrite code to avoid triggering compiler warning
Clang infers from the existence of a default case that said case can be
taken. In case of libavcodec/bitstream.c said default case consisted of
an av_assert1 that evaluates to nothing in case of the ordinary assert
level. In this case (that doesn't happen) a variable wouldn't be
initialized, so Clang emitted Wsometimes-uninitialized warnings.
Solve this by making sure that the default path also initializes
the aforementioned variable.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 07:50:56 +01:00
Andreas Rheinhardt 1c9e53d70b avcodec/movtextenc: Check for too many styles
The counter for the number of styles is written on two bytes, ergo
anything > UINT16_MAX is invalid. This also fixes a compiler warning
because of a tautologically true check on 64bit systems.

Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 07:50:39 +01:00
Andreas Rheinhardt 78d5e1c653 avformat/Makefile: Remove unnecessary dependencies on vocdec
Commit 0d1229f1d2 factored the main part
of the voc demuxer's read_packet function out; yet when this Libav
commit was merged in f99195d56f, the
dependency of the other users of this function on vocdec.o was
unnecessarily kept. This commit fixes this.

While just at it, also disable the data only used by the voc demuxer
and muxer in voc.c if both of them are disabled.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 21:12:26 +01:00
Paul B Mahol d7f10b2497 avcodec/exrenc: use correct type for actual_size as argument for zlib 2021-02-23 12:38:57 +01:00
Paul B Mahol 081cbe6961 avformat/imx: remove unused header 2021-02-23 11:57:51 +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 926c1bf85c avformat/wavdec: Share wav and w64 options
The options of the w64 demuxer are a proper subset of the options for
the wav demuxer, making it possible to reuse a part of the options for
the wav demuxer for the w64 demuxer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 1df1083b6c avformat/wav: Deduplicate codec tags lists
Also saves relocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 09e6d3a026 avformat/avienc, wtvenc: Deduplicate codec tags list
Also saves relocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 08b4a25ff9 avformat/aiff: Deduplicate codec tags and codec tags list
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 697066af01 avformat/ast: Deduplicate codec tags lists
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt a442670a32 avformat/movenc: Deduplicate codec tags lists
Also saves relocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:30:57 +01:00
Andreas Rheinhardt 22d8010f13 avformat/oma: Move stuff only used by demuxer to demuxer
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:26:21 +01:00
Andreas Rheinhardt 81a86c7e1e avformat/oma: Deduplicate codec tags list
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:24:00 +01:00
Andreas Rheinhardt cccb7cf44e avformat/rso: Deduplicate codec tags list
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:24:00 +01:00
Andreas Rheinhardt e772e253cb avformat/voc: Deduplicate codec tags list
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 11:23:29 +01:00
Andreas Rheinhardt ef3224c911 avformat/caf: Deduplicate codec tags list
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt c50c85911e avformat/asfenc: Deduplicate codec tags lists
Also saves relocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt 6cb6ee754b avformat/au: Deduplicate codec_tag lists
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt 20ff7b1f16 avformat/isom: Remove outcommented function
There is another ff_mov_read_chan in mov_chan.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +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 215536ad0c avformat/Makefile: Remove outdated AIFF demuxer dependency on iso_media
This is a result of the mov channel parsing stuff being factored out
of mov.c twice: Once in 91b782720f
to isom.c and later in 3bab7cd128.

Also remove the isom.h header; and while just at it, remove an unused
mathematics.h inclusion.

(isom.c actually depends upon mpeg4audio from libavcodec for
avpriv_mpeg4audio_get_config2 and avpriv_mpa_freq_tab; yet there is
no configure dependency for iso_media which leads to failure of shared
builds.)

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 a40763f520 avcodec/mpeg4audio: Use proper logcontext for logging
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt 84bb18d4e7 avcodec/scpr3: Avoid code duplication when updating models
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:26 +01:00
Andreas Rheinhardt cff09fee1f configure: Remove mpegvideo_enc dependency from ljpeg encoder
It only existed because some code in mjpegenc_common.c relied on it;
yet said code was actually only used by mjpegenc.c and has been moved
there.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +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 bab6b88ebf avcodec/mjpegenc_common: Move stuff only used by mjpegenc.c to it
This allows to make ff_init_uni_ac_vlc static;
ff_mjpeg_encode_picture_frame has also been made static, but it could
always have been made static.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23 10:14:25 +01:00
Andreas Rheinhardt 6eae9c1d39 avcodec/jpegtables: Move ff_mjpeg_build_huffman_codes to mjpegenc_common
Since g2meet.c doesn't use it any more, only encoders use it and
the place for their common code is mjpegenc_common.c.

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 6db394c128 avcodec/avrndec: Remove unnecessary headers
The avrn decoder does not use any internals of the MJPEG decoder since
e0031ca29a.

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
Chip Kerchner e7f53d6ac9 lsws/ppc/yuv2rgb_altivec: Fix build in non-VSX environments
Add inline function for vec_xl if VSX is not supported. vec_xl intrinsic
is only available on POWER 7 or higher.

Fixes ticket #8750.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2021-02-22 23:19:21 -05:00
James Almer 7b30dad3a6 avcodec: remove pointless lowres deprecation wrappers
Neither the feature, public fields, or AVOptions were ever truly deprecated,
nor will have been removed if this FF_API_ define was left in place, so
get rid of it as it's misleading.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-22 20:50:15 -03:00
Michael Niedermayer 8d5bd5b8df avcodec/mjpegdec: Cleanup ff_smvjpeg_decoder()
Fixes: memleaks
Fixes: 28533/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-6242529653686272
Fixes: 30594/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-6549216035995648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-22 17:59:11 +01:00
Michael Niedermayer 497e747387 avcodec/cri: Stop the bitreader at the end of uncompressed input
Fixes: Timeout
Fixes: 29983/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6420415838814208
Fixes: 30595/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6559089360502784

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-22 17:59:11 +01:00
Matt Oliver 52cc323735 configure: use no-narrowing for cuda-llvm compilation
This fixes llvm compiler generating errors about narrowing conversion with
recent releases.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-02-22 17:07:30 +01:00
Matt Oliver b57037d663 compat/cuda: correct ushort4 to use ushort
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-02-22 17:03:52 +01:00
Michal Novotny b5d95998ff avcodec/cuviddec: set ulMaxDisplayDelay to zero if low_delay flag is set
Zero is the recommended value in Nvidia coding samples for low latency use-cases.

Signed-off-by: Michal Novotny <michal.novotny@comprimato.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-02-22 16:54:28 +01:00
Ricardo Monteiro a0949d0bcb avcodec/nvenc: don't disable b-frames by default
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-02-22 16:35:08 +01:00
Anton Khirnov 82a2cbf820 ffprobe: stop setting AVCodecContext.framerate
That field is supposed to be exported by decoders, it makes no sense for
a user to set it.
2021-02-22 11:14:40 +01:00
Anton Khirnov 313c91beb8 ffprobe: stop printing deprecated fields
The FF_API macros are private and must not be used by external callers.
As the fields in question are to be removed without replacement, just
drop them.
The fields are:
AVPacket.convergence_duration
AVCodecContext.time_base
AVCodecContext.timecode_frame_start
AV_PIX_FMT_FLAG_PSEUDOPAL pixel descriptor flag
2021-02-22 11:14:29 +01:00
Anton Khirnov 04f49645a5 ffprobe: drop code accessing deprecated AVStream.codec 2021-02-22 11:14:17 +01:00
Anton Khirnov cb789fd2b3 ffprobe: do not use deprecated AVStream.codec for max bitrate
Use the decoder context instead.
2021-02-22 11:13:50 +01:00