summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avformat/mvdec: make audio stream conditionalJohn-Paul Stewart2022-01-08
| | | | | | | | | | | | | | | Only allocate an audio stream if there is one in the data. Silicon Graphics movie format will contain default values (16 bit samples, 2 audio channels, 22050 Hz sample rate) even when no audio is present in the file. This confuses FFmpeg into thinking such an audio stream is present with 0 samples in it. There is a flag value in the format to indicate whether or not audio is present. This patch checks that and behaves accordingly. Signed-off-by: John-Paul Stewart <jpstewart@personalprojects.net> Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Reviewed-by: Peter Ross <pross@xvid.org>
* aarch64: Disable ff_hevc_sao_band_filter_8x8_8_neon out of precautionMartin Storsjö2022-01-07
| | | | | | | | | | While this function on its own passes all of fate-hevc, there's indications that the function might need to handle widths that aren't a multiple of 8 (noted in commit f63f9be37c799ddc835af358034630d31fb7db02, which later was reverted). Signed-off-by: Martin Storsjö <martin@martin.st>
* Revert "lavc/aarch64: add hevc sao edge 16x16"Martin Storsjö2022-01-07
| | | | | | | This reverts commit a9214a2ca31c9d54f893c5ac4004a5ff30a08d10, as it breaks fate-hevc. Signed-off-by: Martin Storsjö <martin@martin.st>
* Revert "lavc/aarch64: add hevc sao edge 8x8"Martin Storsjö2022-01-07
| | | | | | | This reverts commit c97ffc1a77ccaf901e642bd21ed26aaf75557745, as it breaks fate-hevc. Signed-off-by: Martin Storsjö <martin@martin.st>
* Revert "lavc/aarch64: add hevc sao band 8x8 tiling"Martin Storsjö2022-01-07
| | | | | | | This reverts commit f63f9be37c799ddc835af358034630d31fb7db02, as it breaks fate-hevc. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/apedec: Fix integer overflows in predictor_update_3930()Michael Niedermayer2022-01-07
| | | | | | | | Fixes: signed integer overflow: 1074134419 - -1075212485 cannot be represented in type 'int' Fixes: 43273/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-4706880883130368 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/matroskaenc: Fix build with only WebM muxer enabledAndreas Rheinhardt2022-01-07
| | | | | | | | | In this case ff_isom_put_dvcc_dvvc() might not be available, leading to linking failures. Given that WebM currently doesn't support DOVI, this is fixed by #if'ing the offending code away if the Matroska muxer is not enabled. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Add missing AMV muxer->riffenc dependencyAndreas Rheinhardt2022-01-07
| | | | | Reviewed-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/Makefile: Fix name of PhotoCD demuxerAndreas Rheinhardt2022-01-07
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/takdec: Don't initialize get_bits context to read one valueAndreas Rheinhardt2022-01-07
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* doc/encoders.texi: Add doc for qsvWenbin Chen2022-01-07
| | | | | | | | Add doc for qsv decoder. Add more option's introduction to qsv encoder. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc/av1dec: use frame split bsfFei Wang2022-01-07
| | | | | | | | | Split packed data in case of its contains multiple show frame in some non-standard bitstream. This can benefit decoder which can decode continuously instead of interrupt with unexpected error. Signed-off-by: Fei Wang <fei.w.wang@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavu/videotoolbox: add support for memory mapping framesCameron Gutman2022-01-06
| | | | | Signed-off-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Aman Karmani <aman@tmm1.net>
* avcodec/libdav1d: honor the requested strict_std_compliance level on ↵James Almer2022-01-06
| | | | | | supported builds Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/golomb: Factor writing golomb codes outAndreas Rheinhardt2022-01-06
| | | | | | | | Most users only want to either read or write golomb codes, not both. By splitting these headers one avoids having unnecesssary (get|put)_hits.h inclusions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Add missing libshine->mpegaudioheader dependencyAndreas Rheinhardt2022-01-06
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/Makefile: Add missing entry for ADPCM_IMA_AMV_ENCODERAndreas Rheinhardt2022-01-06
| | | | | | | Forgotten in 555f5c1fc5ae0c4e7b0431dc3166c3fcf3f4e979. Reviewed-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/Makefile: Only compile nvenc.o if neededAndreas Rheinhardt2022-01-05
| | | | | | | | | | | | This fixes compilation errors in case nvenc is enabled (e.g. autodected) with both nvenc-based encoders disabled because nvenc uses ff_alloc_a53_sei(), yet only the nvenc-based encoders require atsc_a53. (This error does not manifest itself in case of static linking (nothing pulls in nvenc.o), but it exists with shared builds.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avfilter: add a blend_vulkan filterWu Jianhua2022-01-05
| | | | | | | | | | | | | | | | | | | | | This commit adds a blend_vulkan filter and a normal blend mode, and reserves support for introducing the blend modes in the future. Use the commands below to test: (href: https://trac.ffmpeg.org/wiki/Blend) I. make an image for test ffmpeg -f lavfi -i color=s=256x256,geq=r='H-1-Y':g='H-1-Y':b='H-1-Y' -frames 1 \ -y -pix_fmt yuv420p test.jpg II. blend in sw ffmpeg -i test.jpg -vf "split[a][b];[b]transpose[b];[a][b]blend=all_mode=normal,\ pseudocolor=preset=turbo" -y normal_sw.jpg III. blend in vulkan ffmpeg -init_hw_device vulkan -i test.jpg -vf "split[a][b];[b]transpose[b];\ [a]hwupload[a];[b]hwupload[b];[a][b]blend_vulkan=all_mode=normal,hwdownload,\ format=yuv420p,pseudocolor=preset=turbo" -y normal_vulkan.jpg Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avfilter/vf_blend: fix un-checked potential memory allocation failureWu Jianhua2022-01-05
| | | | Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avcodec/Makefile: Add missing HEVC decoder->h274.o dependencyAndreas Rheinhardt2022-01-05
| | | | | | Forgotten in 3cc3f5de2afda5b8f880c0817e9d67c2dafbfe1e. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/hwcontext_vulkan: fixed incorrect memory offsetWu Jianhua2022-01-05
| | | | | | | | This commit fixed hwupload in Vulkan: ffmpeg -init_hw_device vulkan -i test.jpg -vf hwupload,hwdownload,format=yuv420p -y out.jpg Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* Changelog: Add new <next> line after 5.0James Almer2022-01-05
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Changelog: replace <next> by 5.0James Almer2022-01-05
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Changelog: add IMF demuxerZane van Iperen2022-01-05
| | | | | Suggested-By: Pierre-Anthony Lemieux <pal@palemieux.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/imf: Fix indentationPierre-Anthony Lemieux2022-01-05
| | | | | Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/imf: fix CPL parsing error handlingPierre-Anthony Lemieux2022-01-05
| | | | | Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/imf: fix bad free() when directory name of the input url is emptyPierre-Anthony Lemieux2022-01-05
| | | | | Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/imf: fix error CPL root element is absentPierre-Anthony Lemieux2022-01-05
| | | | | Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/Makefile: Add missing mpegaudiodata.o dependency to MPEGAUDIOAndreas Rheinhardt2022-01-05
| | | | | | | | | | | | | | mpegaudiodec_template.c uses stuff from mpegaudiodata directly, yet this dependency was only indirectly fulfilled via mpegaudio-headers before 33e6d57f01dd4742a2e25ac5fa072b487d9d02ce. Since this commit, the latter only needs (and therefore provides) mpegaudiotabs, leading to compilation failures. This commit adds this missing direct dependency directly. (Sorry for not having checked indirect dependencies.) Found-by: Zane van Iperen <zane@zanevaniperen.com> Reviewed-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Revert "avutils/hwcontext: When deriving a hwdevice, search for existing ↵Haihao Xiang2022-01-05
| | | | | | | | | | device in both directions" This reverts commit a4289497755386435783774a4f520eb7fc23cbc9. There were objections on ML (see https://ffmpeg.org/pipermail/ffmpeg-devel/2021-December/290530.html) Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc/qsvdec: needn't free the string for AV_OPT_TYPE_STRING AVOptionHaihao Xiang2022-01-05
| | | | | | | The string for AV_OPT_TYPE_STRING AVOption gets freed by av_opt_free() when closing the AVCodecContext Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc/qsvenc: set base address for V planeHaihao Xiang2022-01-05
| | | | | | | | | | | | | The SDK checks Data.V when using system memory for VP9 encoding. This fixed the error below: $ ffmpeg -qsv_device /dev/dri/renderD129 -f lavfi -i yuvtestsrc -c:v vp9_qsv -f null - [vp9_qsv @ 0x55b8387cbe90] Error during encoding: NULL pointer (-2) Video encoding failed Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avutils/hwcontext: When deriving a hwdevice, search for existing device in ↵Soft Works2022-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | both directions The test /libavutil/tests/hwdevice checks that when deriving a device from a source device and then deriving back to the type of the source device, the result is matching the original source device, i.e. the derivation mechanism doesn't create a new device in this case. Previously, this test was usually passed, but only due to two different kind of flaws: 1. The test covers only a single level of derivation (and back) It derives device Y from device X and then Y back to the type of X and checks whether the result matches X. What it doesn't check for, are longer chains of derivation like: CUDA1 > OpenCL2 > CUDA3 and then back to OpenCL4 In that case, the second derivation returns the first device (CUDA3 == CUDA1), but when deriving OpenCL4, hwcontext.c was creating a new OpenCL4 context instead of returning OpenCL2, because there was no link from CUDA1 to OpenCL2 (only backwards from OpenCL2 to CUDA1) If the test would check for two levels of derivation, it would have failed. This patch fixes those (yet untested) cases by introducing forward references (derived_device) in addition to the existing back references (source_device). 2. hwcontext_qsv didn't properly set the source_device In case of QSV, hwcontext_qsv creates a source context internally (vaapi, dxva2 or d3d11va) without calling av_hwdevice_ctx_create_derived and without setting source_device. This way, the hwcontext test ran successful, but what practically happened, was that - for example - deriving vaapi from qsv didn't return the original underlying vaapi device and a new one was created instead: Exactly what the test is intended to detect and prevent. It just couldn't do so, because the original device was hidden (= not set as the source_device of the QSV device). This patch properly makes these setting and fixes all derivation scenarios. (at a later stage, /libavutil/tests/hwdevice should be extended to check longer derivation chains as well) Reviewed-by: Lynne <dev@lynne.ee> Reviewed-by: Anton Khirnov <anton@khirnov.net> Tested-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavfi/libplacebo: support dovi metadata applicationNiklas Haas2022-01-05
| | | | | | | | | | | | | libplacebo supports automatic dolby vision application, but it requires us to switch to a new API. Also add some logic to strip the dolby vision metadata from the output frames in any case where we end up changing the colorimetry. The libplacebo dependency bump is justified because neither 184 nor 192 are part of any stable libplacebo release, so users have to build from git anyways for this filter to exist. Signed-off-by: Niklas Haas <git@haasn.dev>
* lavfi/drawutils: re-enable P010 and P016 supportrcombs2022-01-04
| | | | These formats now work as expected.
* lavfi/drawutils: overhaul to improve pixel format supportrcombs2022-01-04
| | | | | | | | | | | | - No longer mixes u8 and u16 component accesses (this was UB) - De-duplicated 8->16 conversion - De-duplicated component -> plane+offset conversion - De-duplicated planar + packed RGB - No longer calls ff_fill_rgba_map - Removed redundant comp_mask data member - RGB0 and related formats no longer write an alpha value to the 0 byte - Non-planar YA formats now work correctly - High-bit-depth semi-planar YUV now works correctly
* lavfi/drawutils: ensure we don't support formats with non-pixel-sized offsetsrcombs2022-01-04
|
* lavfi/drawutils: ensure we can't overflow a componentrcombs2022-01-04
|
* lavfi/drawutils: ensure we don't allow mixed-byte-depth formatsrcombs2022-01-04
| | | | These could be hazardous because of FFDrawColor's union
* lavfi/drawutils: reimplement ff_fill_rgba_map without hardcoding the listrcombs2022-01-04
| | | | | | Same outputs, but computed instead of statically known, so new formats will be supported more easily. Asserts in place to ensure we update this if we add anything incompatible with its logic.
* lavfi/drawutils: reject shift-packed formatsrcombs2022-01-04
| | | | Disables x2bgr10/x2rgb10 (which did not behave correctly before).
* lavfi/drawutils: remove redundant BE format checksrcombs2022-01-04
| | | | We already explicitly don't support big-endian in general
* lavfi/drawutils: move BE check out of looprcombs2022-01-04
|
* swscale/output: use isSwappedChromarcombs2022-01-04
|
* swscale/output: use isSemiPlanarYUV for NV12/21/24/42 casercombs2022-01-04
|
* swscale: introduce isSwappedChromarcombs2022-01-04
|
* swscale/output: use isDataInHighBits for 10-bit casercombs2022-01-04
| | | | | This code will need fleshing-out (probably templating) if we ever add e.g. a P012 format.
* swscale/output: use isSemiPlanarYUV for 16-bit casercombs2022-01-04
|
* swscale: introduce isDataInHighBitsrcombs2022-01-04
|