summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* 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
|
* swscale/output: template-ize yuv2nv12cX 10-bit and 16-bit casesrcombs2022-01-04
| | | | | | Fixes incorrect big-endian output introduced in 88d804b7ffa20caab2e8e2809da974c41f7fd8fc Avoids making the filter-time BE check more expensive
* avformat: remove unused v210.cLimin Wang2022-01-05
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat: reuse the common code for v210/v210xLimin Wang2022-01-05
| | | | | | | | As suggested by Andreas Rheinhardt, most code of v210 demuxer is common code which is duplicated from rawvideodec, so it's better to move v210/v210x demuxer code to rawvideodec.c and reuse the common code. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/videotoolbox: Fix undefined symbol with minimal configurationLimin Wang2022-01-05
| | | | | | | | | | | | | | | | | Please reproduced with the following minimal configure command: ./configure --enable-shared --disable-all --enable-avcodec --enable-decoder=h264 --enable-hwaccel=h264_videotoolbox You'll get below error: Undefined symbols for architecture x86_64: "_ff_videotoolbox_vpcc_extradata_create", referenced from: _videotoolbox_start in videotoolbox.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Reported-by: Cameron Gutman <aicommander@gmail.com> Tested-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/mpeg12enc: Inline constantsAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Partially inline whether codec is MPEG-1Andreas Rheinhardt2022-01-04
| | | | | | | MPEG-1 only supports 4:2:0, so one can optimize away the checks for whether one encodes MPEG-1 in codepaths that encode 4:2:2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Also inline chroma subsamplingAndreas Rheinhardt2022-01-04
| | | | | | | | | | | ff_mpeg1_encode_mb() contains two inlined calls to mpeg1_encode_mb_internal(); these calls are supposed to inline the properties depending upon the color space used. Yet inlining vertical chroma subsampling (which allows to remove complete branches and blocks depending upon them) has been forgotten. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Remove dead code at compile timeAndreas Rheinhardt2022-01-04
| | | | | | There are no encoders for interlaced dct that support 4:4:4. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Improve inlining of chroma_formatAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | encode_mb() calls encode_mb_internal() three times, once for each supported chroma format. The reason for this is that some chroma format dependent parameters can then be inlined as encode_mb_internal() is marked as av_always_inline. Yet the most basic parameters based upon chroma format have not been inlined: The chroma format itself and the chroma subsampling parameters. This commit does so. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Remove mpegvideo dependency on me_cmpAndreas Rheinhardt2022-01-04
| | | | | | | | Forgotten in cf1e0786ed64e69614760bfb4ecd7adbde8e6094. (Both mpegvideodec as well as mpegvideoenc use me_cmp, so this doesn't affect them.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Add new mpegvideodec CONFIG_EXTRAAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | This allows to remove the spurious dependencies of mpegvideo encoders on error_resilience; some other components that do not use mpegvideo to its fullest turned out to not need it either. Adding a new CONFIG_EXTRA needs a reconfigure to take effect. In order to force this a few unnecessary headers from lavfi/allfilters.c have been removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move decoding-only code into a new fileAndreas Rheinhardt2022-01-04
| | | | | | | This will allow to disable this code altogether when all decoders are disabled. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Remove always-false checkAndreas Rheinhardt2022-01-04
| | | | | | | | | | An AVCodecContext's private data is always allocated in avcodec_open2() and calling avcodec_flush_buffers() on an unopened AVCodecContext (or an already closed one) is not allowed (and will crash before the decoder's flush function is even called). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Don't initialize error resilience context for encoderAndreas Rheinhardt2022-01-04
| | | | | | It is only used for decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Check for no_rounding at compile-time if possibleAndreas Rheinhardt2022-01-04
| | | | | | | | It is partially possible if it is inlined whether we deal with MPEG-1/2, because no_rounding is never set for MPEG-1/2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Remove always-true branchAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Try to perform check for MPEG-1/2 at compile-timeAndreas Rheinhardt2022-01-04
| | | | | | This is possible if CONFIG_SMALL is not true. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Partially check for being encoder at compile-timeAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | Whether lowres is in use or not is inlined in mpv_reconstruct_mb_internal(), so one can use the fact that lowres is always zero during encoding to evaluate the checks for whether one is encoding or not at compile-time when one is in lowres mode. Also reorder the main check to check for whether it is an encoder first to shortcircuit it in the common case of a decoder. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Don't check for > 8 bit MPEG-1/2Andreas Rheinhardt2022-01-04
| | | | | | It doesn't exist. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_motion: Don't duplicate identical codeAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/wmv2: Move ff_wmv2_add_mb() to the wmv2decAndreas Rheinhardt2022-01-04
| | | | | | Only the decoder ever used it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Avoid needlessly calling functionAndreas Rheinhardt2022-01-04
| | | | | | | | The very first check in this if-else if-else if construct is "if (s->encoding ||", i.e. in case of the WMV2 encoder the else branches are never executed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Don't duplicate identical codeAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Use %c to write single charAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Don't merge decoder-only fieldsAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Move options-related fields to MPEG12EncContextAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>