1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-18 03:19:31 +02:00
Commit Graph

105992 Commits

Author SHA1 Message Date
Andreas Rheinhardt
20033c7da4 avcodec/msmpegenc: Add MSMPEG4EncContext and move ac_stats to it
Also avoid the allocation by making it part of the context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 19:36:50 +01:00
Andreas Rheinhardt
e2cf60f040 avcodec/msmpeg4.h: Move decoder-only parts to a new header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 19:35:58 +01:00
Andreas Rheinhardt
9f2b566301 avcodec/msmpeg4.h: Move encoder-only stuff to a new header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 15:28:49 +01:00
Andreas Rheinhardt
78087da47c avcodec/wmv2.h: Move encoder- and decoder-only parts to new headers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 15:28:17 +01:00
Andreas Rheinhardt
cc90478967 avcodec/wmv2: Split Wmv2Context into decoder and encoder context
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 15:27:48 +01:00
Andreas Rheinhardt
584f26db0d avcodec/wmv2: Move initializing abt_scantables to the decoder
They are not used by the encoder at all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 15:27:25 +01:00
Andreas Rheinhardt
b81a29d180 avcodec/idctdsp: Constify the permutation parameter of ff_init_scantable
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 15:25:41 +01:00
Andreas Rheinhardt
e911f5546f avcodec/h261enc: Pass PutBitContext directly in h261_encode_motion()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 15:25:13 +01:00
Andreas Rheinhardt
8401b94602 avcodec/h261: Move encoder-only stuff to a new header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 15:19:43 +01:00
Andreas Rheinhardt
d5e87df902 avcodec/h261: Separate decode and encode contexts
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 15:18:24 +01:00
Andreas Rheinhardt
725e2300af avcodec/mpegvideo: Enable private contexts
MpegEncContext is used by many different codecs and
every one of these uses just a subset of its fields.
If one tries to separate this and e.g. add a real MpegContext
and extension structures (say MpegDecContext and MpegEncContext),
one runs into two difficulties:

a) Some code is shared between decoder and encoder of
the same format and they therefore use the same contexts,
either MpegEncContext itself or identical extensions thereof.
The latter is the case for H.261 as well as WMV2.
b) In case of slice threading, the generic code can only allocate
and initialize the structure it knows about; right now this is
an MpegEncContext. If the codec has an even more extensive structure,
it is only available for the main thread's MpegEncContext.
Fixing this would involve making ff_mpv_common_init() aware
of the size the size of slice context to allocate and would be
part of separating the main thread's context from the slice contexts
in general.

This commit only intends to tackle the first issue by adding
a pointer to MpegEncContext that codecs can set to a common
context so that the aforementioned codecs can use this context
(together with the MpegEncContext) in their common code.
This will allow to move fields only used by the main thread
to more specialized contexts.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 15:16:28 +01:00
Danny Wu
68595b46cb fftools/ffmpeg: Restore DTS correction for VP9 copies
Fixes ticket 9086.

Since early 2021, some of YouTube's VP9 encodes have non-monotonous DTS.
This makes ffmpeg fatally fail when trying to copy or encode the V9 video.

ffmpeg already includes functionality to correct this, however it was
disabled without explanation for VP9 stream copies in
2e6636aa87

This patch restores the DTS correction logic, and allows ffmpeg to correctly
encode (invalid) videos produced by youtube.com. I have verified that frames
are NOT being cut (so it does not re-introduce 4313).

Reviwed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-02-13 10:46:47 -03:00
Andreas Rheinhardt
2233ef1db9 avcodec/exr: Mark decoder as init-threadsafe
This decoder does not initialize any static data in its init function.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 12:36:05 +01:00
Andreas Rheinhardt
2d29058fb2 avcodec/amrwbdec: Mark decoder as init-threadsafe
It performs no initialization of static data in its init function.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 12:35:59 +01:00
Andreas Rheinhardt
903e871858 avcodec/amrnbdec: Mark decoder as init-threadsafe
It performs no initialization of static data during its init function.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 12:35:39 +01:00
Andreas Rheinhardt
b45060114d avcodec/vp[56]: Mark decoders as init-threadsafe
Nothing with static storage duration is initialized by these codecs.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 12:35:30 +01:00
Andreas Rheinhardt
ac6c1080cd avcodec/vp56: Avoid functions with only one caller
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 12:35:16 +01:00
Andreas Rheinhardt
ac9f8d7c02 avcodec/vp6: Avoid code duplication when initializing VP56 contexts
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 12:34:55 +01:00
Andreas Rheinhardt
3cbef22f8f avcodec/vp6: Avoid allocation for alpha_context
Reviewed-by: Peter Ross <pross@xvid.org>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 12:26:18 +01:00
Andreas Rheinhardt
55379dac53 avcodec/vp56: Cleanup generically in case of init failure
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 12:26:12 +01:00
Andreas Rheinhardt
90e5eef731 avcodec/vp6: Check initializing VP6A context
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 12:24:06 +01:00
Paul B Mahol
fad5c6d743 avcodec/qdmc: switch to fft from lavu/tx 2022-02-12 14:24:35 +01:00
Paul B Mahol
fcee53619a avfilter/af_surround: change x/y spread defaults
Previous default value of 1.0 is producing lesser quality channels.
2022-02-12 12:48:42 +01:00
Paul B Mahol
619519ee0a avfilter/af_surround: avoid implicit conversion to float 2022-02-12 12:48:28 +01:00
Paul B Mahol
b015c101ab avfilter/af_surround: switch to rdft from avutil/tx 2022-02-12 12:48:18 +01:00
Paul B Mahol
f05c52985c avfilter: add dialogue enhance audio filter 2022-02-12 12:47:36 +01:00
Paul B Mahol
800dfd2eac avfilter/af_atempo: switch to rdft from lavu/tx 2022-02-12 12:45:43 +01:00
Limin Wang
e8f439631f avformat/udp: remove IPPROTO_IPV6 macro
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-02-12 08:41:55 +08:00
Limin Wang
268d00bb87 avformat/udp: Fix IP_MULTICAST_TTL for BSD compatibility
Suggested by zhilizhao, vlc project has solved the compatibility by
the same way, so I borrowed the comments from vlc project.

Fixes ticket #9449

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-02-12 08:41:55 +08:00
Limin Wang
c0817ee92e avformat/udp: use one setsockopt for ipv4/ipv6
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-02-12 08:41:55 +08:00
Limin Wang
1de24ee512 avformat/udp: properly check for valid ttl in url
Zhao Zhili added a ttl upper bound in commit 9daac85da8,
but the check for ttl in url is missing still.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-02-12 08:41:55 +08:00
Paul B Mahol
1ca19cf371 avfilter/af_compensationdelay: add commands support 2022-02-11 21:19:27 +01:00
David Lacko
4b40e20ce9 avfilter/af_adelay: add command support
Add command 'delays' to the adelay filter.
This command accepts same values as the option with one difference, to apply
delay to all channels prefix 'all:' to the argument.

Signed-off-by: David Lacko <deiwo101@gmail.com>
2022-02-11 20:30:17 +01:00
Andreas Rheinhardt
f5d6c78a88 avcodec/metasound, twinvqdec: Cleanup generically upon init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
d75c4cc7c1 avutil/tx: Fix documentation of av_tx_uninit()
Adapt it to the actual (sane) behaviour.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
6bb46cd765 avcodec/g2meet: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
21c41237d2 avcodec/4xm: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
c6fcd2ae36 avcodec/cavsdec: Fix error message
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
799e128562 avcodec/cavsdec: Mark decoder as init-threadsafe
It does not initialize any static data in its .init.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
805d7414dc avcodec/cavsdec: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
71bd076b30 avcodec/vorbisenc: Cleanup generically on init-failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
f200424fbf avcodec/tta: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
7743933a60 avcodec/ralf: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
ca73a2c826 avcodec/vc2enc: Cleanup generically on allocation failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
31da97b083 avcodec/vc2enc_dwt: Avoid NULL - 0
It is sane, but UB. It could happen in case of allocation errors
in vc2_encode_init().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
fb36af3b66 avcodec/proresenc_kostya: Use av_calloc/av_malloc_array()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
9d5810702c avcodec/proresenc_kostya: Cleanup generically after init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:40 +01:00
Andreas Rheinhardt
321c31cfe6 avcodec/cbs_jpeg: Fix size of huffman symbol table array
L[i] can be in the range of 0-255, see table B.5 of ITU T.81.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:40 +01:00
Justin Ruggles
0dd1ff67c8 http: Send a Range header even when the offset is 0
Using Range allows for getting the full file size from the
Content-Range header in the response, even if the server sends
back the response using chunked Transfer-Encoding, which does not
allow using Content-Length.
2022-02-11 11:31:38 +01:00
Justin Ruggles
c1228315c9 http: Improve handling of Content-Range with Transfer-Encoding:chunked
When Transfer-Encoding:chunked is used, the client must ignore a
Content-Length header, if present. However, it should not ignore a
Content-Range header, which also includes the full size of the
entity.
2022-02-11 11:31:38 +01:00