aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* avcodec/h2645_sei: use named constants for ITU-T T.35 metadataJames Almer2024-03-192-4/+8
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/av1dec: use named constants for ITU-T T.35 metadataJames Almer2024-03-192-5/+35
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libavfi/dnn: add LibTorch as one of DNN backendWenbin Chen2024-03-197-4/+624
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PyTorch is an open source machine learning framework that accelerates the path from research prototyping to production deployment. Official website: https://pytorch.org/. We call the C++ library of PyTorch as LibTorch, the same below. To build FFmpeg with LibTorch, please take following steps as reference: 1. download LibTorch C++ library in https://pytorch.org/get-started/locally/, please select C++/Java for language, and other options as your need. Please download cxx11 ABI version: (libtorch-cxx11-abi-shared-with-deps-*.zip). 2. unzip the file to your own dir, with command unzip libtorch-shared-with-deps-latest.zip -d your_dir 3. export libtorch_root/libtorch/include and libtorch_root/libtorch/include/torch/csrc/api/include to $PATH export libtorch_root/libtorch/lib/ to $LD_LIBRARY_PATH 4. config FFmpeg with ../configure --enable-libtorch \ --extra-cflag=-I/libtorch_root/libtorch/include \ --extra-cflag=-I/libtorch_root/libtorch/include/torch/csrc/api/include \ --extra-ldflags=-L/libtorch_root/libtorch/lib/ 5. make To run FFmpeg DNN inference with LibTorch backend: ./ffmpeg -i input.jpg -vf \ dnn_processing=dnn_backend=torch:model=LibTorch_model.pt -y output.jpg The LibTorch_model.pt can be generated by Python with torch.jit.script() api. https://pytorch.org/tutorials/advanced/cpp_export.html. This is pytorch official guide about how to convert and load torchscript model. Please note, torch.jit.trace() is not recommanded, since it does not support ambiguous input size. Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Reviewed-by: Guo Yejun <yejun.guo@intel.com>
* tools/target_dec_fuzzer: adjust threshold for AV_CODEC_ID_IFF_ILBMMichael Niedermayer2024-03-191-1/+1
| | | | | | | | Fixes: timeout Fixes: 66444/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-4812862400823296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dem_fuzzer: add libavformat/demux.hMichael Niedermayer2024-03-191-1/+1
| | | | | | | needed for FFInputFormat Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/fate: advise on --assert-level=2Nicolas Gaullier2024-03-191-0/+8
| | | | | Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate/atrac: Add atrac->aea, atrac->matroska remux testsAndreas Rheinhardt2024-03-193-2/+198
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aeadec: Use sample rate as time baseAndreas Rheinhardt2024-03-191-0/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aeadec: Export titleAndreas Rheinhardt2024-03-191-3/+12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/hwcontext_vulkan: check PCI ID if possibleHaihao Xiang2024-03-191-7/+23
| | | | | | | | Otherwise the derived device and the source device might have different PCI ID in a multiple-device system. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* doc/muxers: add fitsStefano Sabatini2024-03-181-0/+8
|
* doc/muxers: add filmstripStefano Sabatini2024-03-181-0/+6
|
* doc/muxers: add film_cpkStefano Sabatini2024-03-181-0/+11
|
* doc/muxers: add ffmetadataStefano Sabatini2024-03-182-0/+18
|
* avutil/hwcontext_d3d11va: add logging to dxgi debug interfacesTimo Rothenpieler2024-03-181-1/+9
|
* avutil/hwcontext_d3d11va: prefer DXGI 1.1 factory when availableTimo Rothenpieler2024-03-181-1/+3
| | | | | | A lot of modern stuff straight up fails on the old 1.0 factory, which is masked by the fact that it's only used when an explicit adapter is specified.
* avutil/hwcontext_d3d11va: remove check for d3d11 debug layer dllTimo Rothenpieler2024-03-181-7/+3
| | | | | | | | | | At least on latest Win 11 and Visual Studio 2022, that DLL does not exist anymore and can't be installed via any of the usual means. However, debugging works just fine regardless, so this check makes debugging impossible. D3D11CreateDevice will fail anyway if debugging is not supported, so let's rely on that instead.
* tests/ref/lavf-fate/hevc.flv: Fix ref fileAndreas Rheinhardt2024-03-181-2/+2
| | | | | | Unbreaks the lavf-fate-hevc.flv FATE test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/lavf-container: correct operator; unbreak buildGyan Doshi2024-03-181-1/+1
|
* Changelog: Add Support PacketTypeMetadata of PacketType in enhanced flvSteven Liu2024-03-181-0/+1
| | | | | Reviewed-by: Jean-Baptiste Kempf <jb@videolan.org> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* fate/flvenc: support enhanced flv PacketTypeMetadataZhu Pengfei2024-03-184-4/+9
| | | | | Signed-off-by: Zhu Pengfei <411294962@qq.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/flvenc: support enhanced flv PacketTypeMetadataZhu Pengfei2024-03-181-0/+139
| | | | | Signed-off-by: Zhu Pengfei <411294962@qq.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/flvdec: support enhanced flv PacketTypeMetadataZhu Pengfei2024-03-181-1/+176
| | | | | Signed-off-by: Zhu Pengfei <411294962@qq.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavc/vaapi_decode: Don't update buffer number if allocataion failFei Wang2024-03-181-6/+3
| | | | Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* lavc/vaapi_encode: Enable block level bitrate controlFei Wang2024-03-183-2/+24
| | | | Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* lavu/hwcontext_qsv: Join the download/upload session to the main sessionHaihao Xiang2024-03-181-0/+24
| | | | | | | This may reduce the number of internal threads when using hwupload or hwdownload filter. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc/qsvdec: Do not print warning when draining cached framesHaihao Xiang2024-03-181-1/+3
| | | | | | | | | When all cached frames are drained, the output mfxSyncPoint pointer is NULL and MFX_ERR_MORE_DATA is returned, hence needn't print warning for this expected behavior, otherwise the user might think the output from qsv decoders are wrong. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avformat/crypto: Avoid cast, use proper printf specifierAndreas Rheinhardt2024-03-181-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aeaenc: Fix printf-specifierAndreas Rheinhardt2024-03-181-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ccaption_dec: Use static_assert instead of _Static_assertAndreas Rheinhardt2024-03-181-3/+4
| | | | | | The latter is not supported by MSVC 19.27. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mips/aaccoder_mips: Remove MIPS-specific aaccoderAndreas Rheinhardt2024-03-184-2509/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ff_aac_coder_init_mips() modifies a static const structure of function pointers. This will crash if the binary uses relro and is a data race in any case. Furthermore it points to a maintainability issue: The AACCoefficientsEncoder structures have been constified in commit fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3, a Libav commit merged in 318778de9ebec276cb9dfc65509231ca56590d13. Libav did not have the MIPS-specific AAC code and so this was fine for them; yet FFmpeg had them, but this was not recognized. Commit 75a099fc734a4ee2b1347d0a3d8c53d883b95174 points to another maintainability issue: Contrary to ordinary DSP code, this code here is way more complex and needs to be constantly kept in sync with the ordinary code which it mimicks and replaces. Said commit is the only commit actually changing aaccoder.c in the last few years and the same change has not been performed for the MIPS clone; before that, it even happened several times that the mips code was broken due to changes of the generic code (see commits 97437bd17a8c5d4135b2f3b1b299bd7bb72ce02c and de262d018d7d7d9c967af1dfd1b861c4b9eb2a60 or 860dbe0275e57cbf4228f3f653f872ff66ca596b or 933309a6ca0f18bf1d40e917fff455221f57fb4b or b65ffa316e377213c29736929beba584d0d80d7c). This might even lead to scenarios where someone changing non-dsp aacenc code would have to modify mips inline asm in order to keep them in sync. This is obviously a significant burden (if the AAC encoder were actively developed). Finally, the code does not even compile here due to errors like "Error: float register should be even, was 1". Reviewed-by: Lynne <dev@lynne.ee> Reviewed-by: Jean-Baptiste Kempf <jb@videolan.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/hash: Avoid relocations for hash namesAndreas Rheinhardt2024-03-181-31/+41
| | | | | | | | These strings are so short (longest takes 11B) that using pointers is wasteful. Avoiding them also moves hashdesc into .rodata (from .data.rel.ro). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aiffenc: Usw avio_wb32() where possibleAndreas Rheinhardt2024-03-171-6/+6
| | | | | | AIFF is a big-endian format, so this is more natural. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aiffenc: Simplify padding tagAndreas Rheinhardt2024-03-171-4/+6
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/lavf-audio: Test writing AIFF-native tagsAndreas Rheinhardt2024-03-173-17/+18
| | | | | | | | In particular, test writing tags with odd strlen. (These tags are zero-padded to even size.) Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegaudio(data|dsp): Mark symbols as hiddenAndreas Rheinhardt2024-03-172-0/+6
| | | | | | | | Avoids .got entries for ff_mpa_bitrate_tab, ff_mpa_synth_window_fixed, ff_band_size_long, ff_mpa_pretab, ff_band_size_short, ff_mpa_synth_window_float and ff_band_index_long here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vorbis_data: Mark symbols as hiddenAndreas Rheinhardt2024-03-171-0/+3
| | | | | | Avoids .got entries for ff_vorbis_ch_layouts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dirac_arith: Only include x86/asm.h for ARCH_X86Andreas Rheinhardt2024-03-171-0/+4
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/alldevices: Mark iterators as av_coldAndreas Rheinhardt2024-03-171-7/+8
| | | | | | Because they are. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/alldevices: Mark devices as hiddenAndreas Rheinhardt2024-03-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both GCC and Clang create code that inlines the loops in next_input() and next_output() at high optimization levels (presumably when there are not too many devices) and this code leads to the creation of .got entries: e7: 48 3b 3d 00 00 00 00 cmp 0x0(%rip),%rdi # ee <av_input_video_device_next+0xe> ea: R_X86_64_REX_GOTPCRELX ff_alsa_demuxer-0x4 ee: 74 43 je 133 <av_input_video_device_next+0x53> f0: 48 3b 3d 00 00 00 00 cmp 0x0(%rip),%rdi # f7 <av_input_video_device_next+0x17> f3: R_X86_64_REX_GOTPCRELX ff_fbdev_demuxer-0x4 f7: 74 41 je 13a <av_input_video_device_next+0x5a> These relocations can't be fixed up lateron when it is known that the symbols exist in the same DSO. This commit therefore marks these symbols as hidden, leading to code like this: f7: 48 8d 05 00 00 00 00 lea 0x0(%rip),%rax # fe <av_input_video_device_next+0xe> fa: R_X86_64_PC32 ff_alsa_demuxer-0x4 fe: 48 39 c7 cmp %rax,%rdi 101: 74 55 je 158 <av_input_video_device_next+0x68> 103: 48 8d 05 00 00 00 00 lea 0x0(%rip),%rax # 10a <av_input_video_device_next+0x1a> 106: R_X86_64_PC32 ff_fbdev_demuxer-0x4 10a: 48 39 c7 cmp %rax,%rdi 10d: 74 50 je 15f <av_input_video_device_next+0x6f> (Note: It is actually strange that the compiler creates code that tries to read the addresses from the .got given that the addresses can be read directly from indev_list/outdev_list.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ac3tab: Remove enum CustomChannelMapLocationAndreas Rheinhardt2024-03-171-16/+0
| | | | | | Forgotten in 4c8d9b1d0901b0fba0887e53463574913e8862c5. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/iamf: Mark symbols as hiddenAndreas Rheinhardt2024-03-171-0/+3
| | | | | | | | | Avoids .got entries for ff_iamf_scalable_ch_layouts and ff_iamf_sound_system_map (whether they would have been created otherwise depends upon the compiler and compiler options). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_opt: Check before accessing union memberAndreas Rheinhardt2024-03-171-5/+7
| | | | | | | | | | | OptionDef.u is only an offset (i.e. its off member) iff OPT_FLAG_OFFSET is true. Otherwise, the pointer arithmetic can be undefined behaviour. UBSan warns about this (on 32bit arches): src/fftools/ffmpeg_opt.c:102:15: runtime error: pointer index expression with base 0xffa4db10 overflowed to 0x56059a50 This commit fixes this by checking for OPT_FLAG_OFFSET first. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/x86util: Fix broken pre-SSE4.1 PMINSD emulationHenrik Gramner2024-03-172-9/+0
| | | | | | Fixes yadif-16 which allows FATE to pass. Broken since 2904db90458a1253e4aea6844ba9a59ac11923b6 (2017).
* doc/filters: Change rdiv (vf_convolution) documentation to reflect actual ↵Stone Chen2024-03-161-1/+1
| | | | | | | | | | | | behavior The documentation correctly states that the rdiv is a multiplier but incorrectly states the default behavior is to multiply by the sum of all matrix elements - it multiplies by 1/sum. This changes the documentation to match the code. Address trac #10889 Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: signal channel layouts using the new channel layout apiMarton Balint2024-03-161-76/+51
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/channel_layout: add specific text versions for unknown and unused ↵Marton Balint2024-03-163-1/+18
| | | | | | channels Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/channel_layout: fix some (un)initialization issues in ↵Marton Balint2024-03-162-2/+11
| | | | | | | | | av_channel_layout_from_string() Also make initialization/uninitialization behaviour more explicit in the docs, and make sure we do not leak a channel map on error. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/channel_layout: factorize parsing list of channel namesMarton Balint2024-03-162-118/+62
| | | | | | | Also make use of the av_channel_from_string() function to determine the channel id. This fixes some parse issues in av_channel_layout_from_string(). Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/tests/channel_layout: add some av_channel_from_string and ↵Marton Balint2024-03-162-0/+52
| | | | | | | | | av_channel_layout_from_string tests We lacked tests which supposed to fail, and there are some which should fail but right now it does not. This will be fixed in a later commit. Signed-off-by: Marton Balint <cus@passwd.hu>