summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avfilter/af_arnndn: add timeline supportPaul B Mahol2020-11-25
|
* avcodec/mpeg12enc: ReindentationAndreas Rheinhardt2020-11-25
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg12enc: Use ff_thread_once() for static initializationsAndreas Rheinhardt2020-11-25
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg12enc: Always initialize MPEG-2 intra VLC table lengthsAndreas Rheinhardt2020-11-25
| | | | | | | | | | | | | The MPEG-1/2 encoders initialize several tables once during the first time one of the encoders is initialized; the table for MPEG-2 intra VLC lengths is only initialized if it is used for this encoder instance. This implies that if the first MPEG-1/2 encoder to be initialized does not use it, it will never be initialized even if a later encoder instance makes use of them. Fix this by initializing this table unconditionally. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_readeia608: add support for slice threadsPaul B Mahol2020-11-24
|
* avfilter/vf_readeia608: add support for commandsPaul B Mahol2020-11-24
|
* avfilter/vf_xfade: ensure metadata is copied to transition framesMusee Ullah2020-11-24
| | | | | | | | I was having an issue where, using a filter chain of xfade -> ass, the colors on the subtitles were incorrect only on the frames where xfade was being used. This resolves that issue for me. Signed-off-by: Musee Ullah <lae@lae.is>
* avfilter/af_biquads: make sure that biquad filter still worksPaul B Mahol2020-11-24
|
* avfilter/af_biquads: do not abort filtering on bogus optionsPaul B Mahol2020-11-24
| | | | Instead, continue returning unfiltered input.
* avcodec/mlpdec: Avoid code duplication when initializing VLCsAndreas Rheinhardt2020-11-24
| | | | | Reviewed-by: Jai Luthra <me@jailuthra.in> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mlpdec: Make decoders init-threadsafeAndreas Rheinhardt2020-11-24
| | | | | Reviewed-by: Jai Luthra <me@jailuthra.in> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mlp: Make initializing CRCs thread-safeAndreas Rheinhardt2020-11-24
| | | | | Reviewed-by: Jai Luthra <me@jailuthra.in> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegaudiodec_template: Don't use unnecessarily many VLC bitsAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mv30: Don't check for errors for complete VLCsAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/imm4: Don't use too big VLC tableAndreas Rheinhardt2020-11-24
| | | | | | Using more bits than the longest code has makes no sense. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/aac*: Make initializing ff_aac_pow*sf_tab thread-safeAndreas Rheinhardt2020-11-24
| | | | | | | | | | | | | | This table is currently initialized up to three times: Once by the encoder and twice by the decoders (once by the fixed and once by the floating-point decoder); each of these initializations is guarded by an AVOnce, yet the fact that there are three of them implies that there might be data races (the fact that each entry is only written to once (to its final value) when initializing means that this is safe in practice, yet it is still undefined behaviour). Fix this by only initializing the table from one place that is guarded by a single AVOnce. This also avoids unnecessary duplications of the init code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/aactab: Fix conflicting types for ff_aac_codebook*Andreas Rheinhardt2020-11-24
| | | | | | | The header missed that these are arrays of const pointers (to const data). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/qdmc: Don't check for errors for complete VLCsAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/hqx: Don't check for errors for complete VLCsAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/hqx: Inline constantsAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/intrax8: Make ff_intrax8_common_init() thread-safeAndreas Rheinhardt2020-11-24
| | | | | | | In particular, don't reinitialize VLCs every time an IntraX8Context is initialized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/intrax8: Replace always-false check by assertAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac9tab: Add missing static to internal tableAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac9dec: Replace av_free() by av_freep() in close functionAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac9dec: Don't use unnecessarily large VLC tablesAndreas Rheinhardt2020-11-24
| | | | | | Using more bits for a VLC than the longest code has has no advantage. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac9dec: Use least max_depth in calls to get_vlc2()Andreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/atrac9dec: Don't confuse max_depth of VLC with max codelengthAndreas Rheinhardt2020-11-24
| | | | | | | | | | | | | | | The whole point of VLCs with their tables is to read more than one bit at a time; therefore max_depth, the number of times one has to (maximally) read further bits is given by ceil(max_code_length / table_bits) which in the case of ATRAC9's coefficient VLCs gives an upper bound of two. Instead the maximum length of a code of the given VLC has been used (which is not even a compile-time constant). Use two instead. Furthermore, given that this was the only usage of the field containing the maximum of all the code lengths of a given VLC the field has been removed from its containing struct. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/truemotion2: Mark decoder as init-threadsafeAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/g2meet: Use least max_depth in get_vlc2()Andreas Rheinhardt2020-11-24
| | | | | | | | The longest AC codes of the standard JPEG tables are 16 bits long; for the DC tables, the maximum is 11, so using max_depth of two is sufficient. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/sheervideo: Add av_cold to build_vlc()Andreas Rheinhardt2020-11-24
| | | | | | It is an init function even when called from decode_frame(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mss4: Mark decoder as init-threadsafeAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/rv40vlc2: Make VLC smallerAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/qdm2: Remove outdated commentAndreas Rheinhardt2020-11-24
| | | | | | Forgotten in f054e309c58894450a5d18cce9799ef58aab9f14. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegaudiodsp: Make initializing synth windows thread-safeAndreas Rheinhardt2020-11-24
| | | | | | | | | | These arrays are used by the Musepack decoders, the MPEG audio decoders as well as qdm2 and up until now, these arrays might be initialized more than once, leading to potential data races as well as unnecessary initializations. Therefore this commit ensures that each array will only be initialized once. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegaudiodsp: Make ff_mpadsp_init() thread-safeAndreas Rheinhardt2020-11-24
| | | | | | | | | | The only thing missing for this is to make ff_mpadsp_init_x86() thread-safe; it currently isn't because a static table is initialized every time ff_mpadsp_init() is called (when ARCH_X86 is true). Solve this by initializing this table only once, namely together with the ordinary not-arch specific tables. This also allows to reuse their AVOnce. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/fft_template, fft_init_table: Make ff_fft_init() thread-safeAndreas Rheinhardt2020-11-24
| | | | | | | | | | | | | | | | | | | | | | | | Commit 1af615683e4a1a858407afbaa2fd686842da7e49 put initializing the ff_fft_offsets_lut (which is typically used if FFT_FIXED_32) behind an ff_thread_once() to make ff_fft_init() thread-safe; yet there is a second place where said table may be initialized which is not guarded by this AVOnce: ff_fft_init_mips(). MIPS uses this LUT even for ordinary floating point FFTs, so that ff_fft_init() is not thread-safe (on MIPS) for both 32bit fixed-point as well as floating-point FFTs; e.g. ff_mdct_init() inherits this flaw and therefore initializing e.g. the AAC decoders is not thread-safe (on MIPS) despite them having FF_CODEC_CAP_INIT_CLEANUP set. This commit fixes this by moving the AVOnce to fft_init_table.c and using it to guard all initializations of ff_fft_offsets_lut. (It is not that bad in practice, because every entry of ff_fft_offsets_lut is never read during initialization and is only once ever written to (namely to its final value); but even these are conflicting actions which are (by definition) data races and lead to undefined behaviour.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegaudiodsp: Combine initializing float and int tablesAndreas Rheinhardt2020-11-24
| | | | | | | This avoids code duplication in the functions used to initialize them and allows to remove an AVOnce. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/motionpixels: Make decoder init-threadsafeAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/motionpixels: Use symbols tableAndreas Rheinhardt2020-11-24
| | | | | | | If allows us to directly store the deltas in the VLC table and therefore avoids a level of indirection. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/motionpixels: Don't check for errors for complete VLCAndreas Rheinhardt2020-11-24
| | | | | | | The algorithm used here always creates a complete VLC, so it is unnecessary to check this again. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/motionpixels: Be more strict when parsing Huffman treesAndreas Rheinhardt2020-11-24
| | | | | | | | This ensures that the number of leafs in the Huffman tree equals the number it is supposed to be and therefore ensures that the VLC tree is complete, allowing us to remove checks. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/motionpixels: Only create VLC iff it is going to be usedAndreas Rheinhardt2020-11-24
| | | | | | | | | | | | | | | | | | | | | If the Huffman tree consists of only one entry (which has length zero), no tree is used at all for parsing as the VLC API currently can't handle this. So it makes no sense to create a VLC in this case. Commit 41b7389cade702383e59343561776f83bb26e17f added a check for whether creating the VLC should be skipped, but it also skipped decoding the packet and it used the wrong check: It checked max_codes_bits, the maximum length of a code; but this value is only updated iff there is more than one Huffman entry. So if there is only one Huffman entry, and there was a previous frame with more than one entry, then a VLC was created unnecessarily; yet if there was no previous frame with more than one entry, then this frame will be skipped which is probably spec-incompliant. I have no sample for the latter. This commit improves the check to create a VLC iff it is going to be used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mimic: Mark decoder as init-threadsafeAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mimic: Cleanup generically upon init failureAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/rv10: Make initializing static RV10 VLCs thread-safeAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/smacker: Mark decoders as init-threadsafeAndreas Rheinhardt2020-11-24
| | | | | | Both Smacker audio and video decoders don't use/modify any global state. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/tscc2: Mark tscc2 decoder as init-threadsafeAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_adenorm: add timeline and slice threading supportPaul B Mahol2020-11-24
|
* avfilter/af_asubboost: add timeline and slice threading supportPaul B Mahol2020-11-24
|
* avcodec: add SpeedHQ encoderJean-Baptiste Kempf2020-11-24
|