summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
* avutil/tx_template: Use more unsigned ints to avoid undefined overflowsMichael Niedermayer2022-12-25
| | | | | | | | Fixes: signed integer overflow: 574590586 - -1875616554 cannot be represented in type 'int' Fixes: 53914/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5037125846564864 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* hwcontext_vulkan: remove optional encode/decode extensions from the listLynne2022-12-25
| | | | | | | They're not currently used, so they don't need to be there. Vulkan stabilized the decode extensions less than a week ago, and their name prefixes were changed from EXT to KHR. It's a bit too soon to be depending on it, so rather than bumping, just remove these for now.
* lavu/pixdesc: handle xv30be in av_[read|write]_image_linePhilip Langdale2022-12-08
| | | | | | | | | | | | | | | | | | | | xv30be is an obnoxious format that I shouldn't have included in the first place. xv30 packs 3 10bit channels into 32bits and while our byte-oriented logic can handle Little Endian correctly, it cannot handle Big Endian. To avoid that, I marked xv30be as a bitstream format, but while that didn't produce FATE errors, it turns out that the existing read/write code silently produces incorrect results, which can be revealed via ubsan. In all likelyhood, the correct fix here is to remove the format. As this format is only used by Intel vaapi, it's only going to show up in LE form, so we could just drop the BE version. But I don't want to deal with creating a hole in the pixfmt list and all the weirdness that comes from that. Instead, I decided to write the correct read/write code for it. And that code isn't too bad, as long as it's specialised for this format, as the channels are all bit-aligned inside a 32bit word.
* lavu/hwcontext_vaapi: Skip 'vgem' driverBrian Norris2022-12-08
| | | | | | | | | | | | | | | | | | | There can be more than one available render node, and it's not guaranteed the first node we come across is the correct one. In particular, 'vgem' devices are common, and are never VAAPI-enabled and thus not valid here. We have a 'kernel_driver' arg already for specifying a single driver we *do* want, but it doesn't support a negation, nor a list. It's easier just to automatically skip 'vgem' anyway, to avoid foisting this burden on users. This has precedent in libva-utils already: bfb6b98ed62a exclude vgem node and invalid drm node in vainfo https://github.com/intel/libva-utils/commit/bfb6b98ed62ac14a840ba62639ab902a23912258 Signed-off-by: Brian Norris <briannorris@chromium.org>
* avutil/tests/dict: Explicitly test av_dict_iterate()Andreas Rheinhardt2022-12-07
| | | | | | | | This commit tests it in a way that automatically checks that using av_dict_iterate() is equivalent to using av_dict_get() with key "" and AV_DICT_IGNORE_SUFFIX. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil: use av_dict_iterateMarvin Scholz2022-12-07
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/tx: zero-out imaginary of last coefficient in forward RDFTsLynne2022-12-03
| | | | | We didn't do this, because it's zero anyway, but it prevents users from using uninitialized memory in calculations.
* avutil/tx: Use unsigned in ff_tx_fft_sr_combine() to avoid undefined behaviorMichael Niedermayer2022-11-28
| | | | | | | | Fixes: signed integer overflow: -1284837070 - 982101618 cannot be represented in type 'int' Fixes: 53105/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AC3_FIXED_fuzzer-4848015827664896 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* x86/tx_float: fix stray change in 15xM FFT and replace imul->leaLynne2022-11-28
| | | | Thanks to rorgoroth for bisecting and kurosu for the lea suggestion.
* avutil/tx: Use proper deallocatorAndreas Rheinhardt2022-11-25
| | | | | | | | May fix the FATE failures on x64 Windows here: https://fate.ffmpeg.org/report.cgi?slot=x86_64-msvc17-windows-native&time=20221125130443 Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/tx: add DCT-III implementationLynne2022-11-24
|
* lavu/tx: add DCT-II implementationLynne2022-11-24
|
* lavu/tx: clarify stride for RDFT transformsLynne2022-11-24
|
* lavu/tx: fix last coefficient scaling for R2C transformsLynne2022-11-24
| | | | This was a typo.
* lavu/tx: generalize PFA FFTsLynne2022-11-24
| | | | This commit permits any stacking of FFTs of any size.
* lavu/tx: add length decomposition functionLynne2022-11-24
| | | | | Rather than using a list of lengths supported, this goes a step beyond and uses all registered codelets to come up with a good decomposition.
* lavu/tx: refactor to explicitly track and convert lookup table orderLynne2022-11-24
| | | | Necessary for generalizing PFAs.
* lavu/tx: refactor and separate codelet list and prio codeLynne2022-11-24
|
* lavu/tx: improve transform tree loggingLynne2022-11-24
| | | | | Now prints the actual codelet size used, as well as the number of allowed factors.
* lavu/tx: allow codelets to specify a minimum number of matching factorsLynne2022-11-24
|
* lavu/tx: add ff_tx_clear_ctx()Lynne2022-11-24
| | | | | This function allows implementations to clean up a context after successfully initializing subcontexts.
* x86/tx_float: implement striding in fft_15xMLynne2022-11-24
|
* x86/tx_float_init: properly specify the supported factors of 15xM FFTsLynne2022-11-24
| | | | Only powers of two are currently supported.
* x86/tx_float: add a standalone 15-point AVX2 transformLynne2022-11-24
| | | | Enables its use everywhere else in the framework.
* x86/tx_float: optimize and macro out FFT15Lynne2022-11-24
|
* lavu/tx: support output stride in naive transformsLynne2022-11-24
| | | | Allows them to be used in general PFAs.
* lavu/tx: add fft_inplace_small transformsLynne2022-11-24
| | | | This is much faster than the loop.
* lavu/tx: drop requirement of input == output for in-place transformsLynne2022-11-24
| | | | No longer necessary.
* lavu/tx: support out-of-place transforms in fft_inplaceLynne2022-11-24
| | | | | This makes testing easier, as a unified path can be used for in/out of place transforms.
* lavu/tx: make C ptwo transforms in+out of placeLynne2022-11-24
| | | | | We assume that _all_ in-place transforms can operate out of place, which isn't true, because the C ptwo transforms were always in-place (dst).
* lavu/tx: add naive_small FFTLynne2022-11-24
| | | | | The same as naive but with precomputed tables. Makes it more useful for odd-factors we don't support yet.
* lavu/tx: list all odd-length FFT factors as regular codeletsLynne2022-11-24
| | | | Allows them to be picked just like any other transform.
* lavu/tx: generalize single-factor transformsLynne2022-11-24
| | | | Not that useful, but it gives us fast small odd-length transforms.
* lavu/tx: make prime factor transforms truly in-placeLynne2022-11-24
| | | | They all overwrote in[0] and then used it as a DC.
* lavu/pixfmt: Update the description for AV_PIX_FMT_QSVHaihao Xiang2022-11-22
| | | | | | | | | | Since D3D11 was introduced for QSV in FFmpeg 5.0, there is an implied API/ABI change for user-supplied frames [1], hence update the description for AV_PIX_FMT_QSV. [1] https://ffmpeg.org/pipermail/ffmpeg-devel/2021-December/290444.html Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avutil/hwcontext: verify hw_frames_ctx in transfer_data_allocZhao Zhili2022-11-21
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avutil/hwcontext_mediacodec: add ANativeWindow supportZhao Zhili2022-11-21
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avutil/hwcontext_cuda: fix compilation without Vulkan after last commitJames Almer2022-11-12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/hwcontext_cuda: fix mixed declarations and code warningJames Almer2022-11-12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/cast5: Avoid undefined shift of uint32_t by 32 placesAndreas Rheinhardt2022-11-11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/tx: use llrintf() to convert a float into a 64 bit integerJames Almer2022-11-08
| | | | | | | Should fix fate failures on Windowx x86 targets, where long is 32 bits. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tx: use a lower log level for the debug messagesJames Almer2022-11-08
| | | | | | | The amount of lines printed is too high for the verbose level, and the debug level is a better fit for their content. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/dict: Improve documentationMarvin Scholz2022-11-06
| | | | | | | | | Mostly consistent formatting and consistently ordering of warnings/notes to be next to the description. Additionally group the AV_DICT_* macros. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avutil/dict: Use av_dict_iterate in av_dict_get_stringMarvin Scholz2022-11-06
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avutil/dict: Use av_dict_iterate in av_dict_copyMarvin Scholz2022-11-06
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avutil/dict: Use av_dict_iterate in av_dict_getMarvin Scholz2022-11-06
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avutil/dict: Add av_dict_iterateMarvin Scholz2022-11-06
| | | | | | | | This is a more explicit iteration API rather than using the "magic" av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX) which is not really trivial to grasp what it does when casually reading through code. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avutil/tests/cpu: print the avx512icl flagJames Darnley2022-11-04
|
* avutil/channel_layout: add a 7.1(top) channel layoutJames Almer2022-11-03
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/channel_layout: add a cube channel layoutJames Almer2022-10-30
| | | | Signed-off-by: James Almer <jamrial@gmail.com>