Commit Graph

101255 Commits

Author SHA1 Message Date
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
Anton Khirnov
65b08aa19c ffprobe: remove an unnecessary deprecation guard
The code it is guarding is not accessing anything deprecated
(disregarding the fact that a library caller must not use FF_API
deprecation guards).
2021-02-22 11:13:40 +01:00
Mark Reid
a82a052769 avformat/mov: fix timecode with counter mode flag set
The current behaviour ends up squaring the avg_frame_rate if the conter mode flag is set.
This messes up the timecode calculation, and looks to me as a regression that
seems to have been introduced 428b4aac.

Upon further testing is seems that no special case is need for having the counter flag set.
av_timecode_init appears to handles the timecode correctly, at least in the sample files
I have.

Here is a sample mov file with the counter flag set
https://www.dropbox.com/s/5l4fucb9lhq523s/timecode_counter_mode.mov

before the patch ffmpeg will report the timecode as:
00:37:11:97 and warns that the timecode framerate is 576000000/1002001

after patch:
14:50:55:02

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2021-02-22 11:12:10 +01:00
Anton Khirnov
1c36e7c1a5 lavc/ac3enc: rename variable to avoid shadowing
Harmless, but confusing.
2021-02-22 11:12:10 +01:00
Andreas Rheinhardt
c7c7aa85b7 avutil/tx: Fix declaration after statement
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 10:03:32 +01:00
Andreas Rheinhardt
2edfb26fd1 fate/matroska: Add fate-matroska target
Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 04:14:26 +01:00
Andreas Rheinhardt
1406b3cc23 fate/matroska: Add test for remuxing VP8 with alpha
This provides coverage for writing BlockGroups with BlockAdditional
and ReferenceBlock elements. It also tests setting the hearing impaired
disposition (it fits given that this video has no audio so one needs to
be able to read lips to understand anything).

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 04:14:26 +01:00
Andreas Rheinhardt
053144008e avformat/matroskaenc: Add support for FlagTextDescriptions
This is the Matroska equivalent of D_WEBVTT_DESCRIPTIONS and is
therefore only enabled for subtitles.

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 04:14:26 +01:00
Andreas Rheinhardt
48cf1d878c avformat/matroskadec: Add support for FlagTextDescriptions
This is the equivalent of the WebM "D_WEBVTT/DESCRIPTIONS" and is
therefore only exported for subtitles.

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 04:14:20 +01:00
Andreas Rheinhardt
f9ceb18f3b avformat/matroskaenc: Add support for FlagHearing/VisualImpaired
Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 04:13:17 +01:00
Andreas Rheinhardt
51e1067729 avformat/matroskadec: Add support for FlagHearing/VisualImpaired
Given that our disposition flags provide no way to distinguish the
cases of "track is unsuitable for hearing impaired users" and "it is
unknown whether the track is suitable for hearing impaired users" we do
not need to use a CountedElement for these flags.

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 04:12:25 +01:00
Andreas Rheinhardt
8949be0086 avformat/matroskaenc: Add support for FlagCommentary
Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 04:12:08 +01:00
Andreas Rheinhardt
18b3deee22 avformat/matroskadec: Add support for FlagCommentary
Hint: Matroska actually provides a way to distinguish the cases of
"track is no commentary track" and "it is unknown whether the track
is a commentary track", but our disposition flags do not. Therefore
we need not use a CountedElement.

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 04:12:02 +01:00