Michael Niedermayer
9fd06a3639
Revert "avcodec/mjpegdec: postpone calling ff_get_buffer() until the SOS marker"
...
This also temporary disables fate-jpegls which is re-enabled in the next commit
This reverts commit c8197f73e6
.
4 years ago
Michael Niedermayer
4b1e1f706b
Revert "avcodec/mjpegdec: fix SOF check in EOI"
...
This reverts commit fb5e2d7112
.
4 years ago
James Almer
4d3474432f
ffmpeg: stop accessing private AVStream.codec_info_nb_frames
...
Use AVSTREAM_EVENT_FLAG_NEW_PACKETS instead, which should provide the
same information in this case.
Finishes removing all uses of this field as started by 87f0c8280c
.
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
Andreas Rheinhardt
5541cffa17
avcodec/mlpenc: Make encoders init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
0166bb12e7
avcodec/mlpenc: Add const where appropriate
...
The MLP/TrueHD encoder uses pointers to non-const to access several
static objects that are only initialized at runtime and are therefore
not declared as const. This does not result in compiler warnings, but it
is fragile, as these objects are really not to be modified as they are
not owned by any encoder instance. Therefore this commit adds const to
the pointed to type of the pointers used to access them after their
initialization. One object has even been made const.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
e44e41edce
avcodec/cfhdenc: Mark encoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
5408366dc5
avcodec/ffv1dec: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
62559a9e00
avcodec/ffv1enc: Mark encoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
a7f4abbc62
avcodec/snow: Hardcode table to save space
...
The size of ff_qexp is only 32 bytes, but the code to generate it at
runtime takes 47 bytes (GCC 9.3, x64, -O3 in an av_cold function); so
just hardcode it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
56df06dd83
avcodec/bink: Don't waste space for VLC table
...
The Bink video decoder uses VLCs; the longest codes of these VLCs have
different lengths, yet they are all so small that each VLC is read in
one go, so that the number of elements in the VLC table actually used by
each table is 1 << nb_bits, where nb_bits is the length of the longest
code. Yet when determining the size of the VLC table nb_bits has been
overestimated as the number of bits of the longest code in all VLCs,
making said table unnecessary big (2048 vs 976 elements).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
bd473d325d
avcodec/bink: Make decoder init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
8903c7f1fe
avcodec/kmvc: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
1c7e52f8ff
avcodec: Mark ff_ass_subtitle_header based decoders as init-threadsafe
...
ff_ass_subtitle_header_full() just uses av_asprintf() and is therefore
thread-safe itself.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
a380343c75
avcodec/assdec: Mark decoders as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
b3108b1cbc
avcodec/dvbsubdec: Make decoder init-threadsafe
...
Note: This decoder uses a static variable in save_display_set() (which
is only enabled if DEBUG is defined); yet said function can't be reached
from the decoder's init function at all, so it is no problem for
setting the FF_CODEC_CAP_INIT_THREADSAFE flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
834ef6f4a9
avcodec/dvbsubdec: Add const where appropriate
...
These pointers sometimes point to static storage (namely to
default_clut), so adding const to the pointed-to type is important to
ensure that one does not accidentally modify something that is not owned
by a single AVCodecContext.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
2a4cedace4
avcodec/movtextenc, srtenc, webvttenc: Mark encoders as init-threadsafe
...
They all rely on ff_ass_split(), which does not have any static state.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
55982b9447
avcodec/assenc: Mark encoders as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
30a947b8f8
avcodec/sonic: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
0878ccdcd2
avcodec/sonic: Mark encoders as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
7d4f1f4d99
avcodec/dca*: Make decoder init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
e5bc8b6236
avcodec/qtrleenc: Mark encoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
8cca0c22b9
avcodec/wavpackenc: Mark encoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
b1f721f35c
avcodec/qtrle: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
032100687a
avcodec/mpegaudioenc: Mark encoders as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
8320820ada
avcodec/012v: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
d43f0f6136
avcodec/alac: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
bff74c3aea
avcodec/binkaudio: Mark decoders as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
e87edfc28a
avcodec/sanm: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
94b3ce05b9
avcodec/takdec: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
07efb4b603
avcodec/v410dec: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
e7db133864
avcodec/tiertexseqv: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
af815d4bea
avcodec/vmnc: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
81615a265f
avcodec/v308dec: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
dcad675831
avcodec/v210x: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
a2ba5bcb56
avcodec/v210dec: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
28b63eb005
avcodec/vcr1: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
5b4aa634f2
avcodec/vqavideo: Cleanup generically on init failure
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
c4c077ada5
avcodec/vqavideo: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
2c9d398f74
avcodec/vb: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
759dcd236f
avcodec/bmvaudio: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
5dc5bb9b2b
avcodec/ttaenc: Mark encoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
010072d148
avcodec/tta: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
3feccede3b
avcodec/vmdaudio: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
acde66082f
avcodec/vima: Make decoder init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
58ca07320b
avcodec/adxdec: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
4051599cea
avcodec/truespeech: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
53c077d5ad
avcodec/ra288: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
0ef263eb43
avcodec/bintext: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
fb8d711a5e
avcodec/truemotion1: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago