summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* avformat/takdec: Simplify data->hex conversionAndreas Rheinhardt2021-12-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/frame: Treat frame as uninitialized in get_frame_defaults()Andreas Rheinhardt2021-12-05
| | | | | | | | | | | | | | Currently, it also tests whether extended_data points to something different than the AVFrame's data array and frees extended_data if it is different. Yet this is only necessary for one of its three callers, namely av_frame_unref(); meanwhile the other two callers took measures to avoid this (or rather, to make it to an av_free(NULL)). This commit moves this chunk to av_frame_unref() (so that get_frame_defaults() now treats its input as uninitialized) and removes the now superfluous code in the other two callers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg: Avoid creating unnecessary referenceAndreas Rheinhardt2021-12-05
| | | | | | | The only caller of do_video_out() doesn't need the frame afterwards, ergo one can replace an av_frame_ref() by av_frame_move_ref(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg: Avoid allocating+freeing frame, check allocationsAndreas Rheinhardt2021-12-05
| | | | | | Fixes a potential crash upon av_frame_alloc() failure. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/cmdutils: Use av_dynarray_add_nofree()Andreas Rheinhardt2021-12-05
| | | | | | | Simplifies code and reduces the number of allocations a bit by overallocating. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/cmdutils: Make allocate_array_elem() return ptr to new elementAndreas Rheinhardt2021-12-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_(filter|opt): Use dedicated pointer for array elem accessAndreas Rheinhardt2021-12-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/cmdutils: Atomically add elements to list of pointers, fix crashAndreas Rheinhardt2021-12-05
| | | | | | | | | | | | | | Currently, adding a (separately allocated) element to a list of pointers works by first reallocating the array of pointers and (on success) incrementing its size and only then allocating the new element. If the latter allocation fails, the size is inconsistent, i.e. array[nb_array_elems - 1] is NULL. Our cleanup code crashes in such scenarios. Fix this by adding an auxiliary function that atomically allocates and adds a new element to a list of pointers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/frame: clarify doxyAnton Khirnov2021-12-04
| | | | | AVFrame.data[] elements not used by the format should ALWAYS be null, hwaccel formats are not an exception.
* lavu/frame: drop mentions of non-refcounted framesAnton Khirnov2021-12-04
| | | | All frames we deal with should always be refcounted now.
* doc/APIchanges: fix typoAnton Khirnov2021-12-04
|
* ffmpeg: only copy bits_per_sample from decoder when it remains validAnton Khirnov2021-12-04
| | | | | I.e. when the only filters that are applied do not modify the frame data.
* ffmpeg: make -bits_per_raw_sample a per-output-stream optionAnton Khirnov2021-12-04
| | | | Also, document it and make it apply to audio in addition to video.
* avfilter: add AVFILTER_FLAG_METADATA_ONLYAnton Khirnov2021-12-04
| | | | | | This flag allows distinguishing between filters that actually modify the data and those that only modify metadata or gather some stream information.
* lavfi/allfilters: move vf_chromaber_vulkan to video sectionAnton Khirnov2021-12-04
|
* libavutil/hwcontext_qsv: fix a bug for mapping vaapi frame to qsvnyanmisaka2021-12-04
| | | | | | | | | | | | | | The data stored in data[3] in VAAPI AVFrame is VASurfaceID while the data stored in pair->first is the pointer of VASurfaceID, so we need to do cast to make following commandline works: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 \ -hwaccel_output_format vaapi -i input.264 \ -vf "hwmap=derive_device=qsv,format=qsv" -c:v h264_qsv output.264 Signed-off-by: nyanmisaka <nst799610810@gmail.com> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat: do not use AVIO_FLAG_* with avio_alloc_contextMarvin Scholz2021-12-04
| | | | | | | | | | | | | The documentation states that here 0 should be used for read-only and 1 for a writable buffer. AVIO_FLAG_WRITE however is 2, while it works due to the way the flag is handled internally, it is still wrong according to the documentation. Additionally it makes it seem as if the AVIO_FLAG_* values could be used here, which is actually not true, as when AVIO_FLAG_READ would be used here it would create a writable buffer as AVIO_FLAG_READ is defined as 1. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec/videotoolbox: fix use of unknown builtin '__builtin_available'Limin Wang2021-12-04
| | | | | | | | | Old system is: OSX version: 10.11.6 Apple LLVM version 8.0.0 (clang-800.0.42.1) Target: x86_64-apple-darwin15.6.0 Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtspdec: get rid of the hardcoded max size for sdpLimin Wang2021-12-04
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtsp: load the sdp file with avio_read_to_bprint()Limin Wang2021-12-04
| | | | | | | this allows getting rid of the hardcoded max size of SDP. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/aviobuf: check if read_packet() exist before read_packet_wrapper()Limin Wang2021-12-04
| | | | | | | without it, read_packet_wrapper() will return AVERROR(EINVAL) and avio_read will be failed. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* lavu/avframe: add a time_base fieldLynne2021-12-03
| | | | | This adds a time_base field to AVFrame, as an analogue to the AVPacket.time_base field.
* avfilter/buffersink: Remove outdated commentsAndreas Rheinhardt2021-12-03
| | | | | | | | These lists have size fields since e48ded8551172b58a78f30303a81dfce125344e0. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Don't require AV_PIX_FMT_NONE == -1Andreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Simplify setting sample_fmtsAndreas Rheinhardt2021-12-03
| | | | | | | | | The length of this list is a compile-time constant, so there is no need to calculate it again at runtime. (This also avoids an implicit requirement of -1 == AV_SAMPLE_FMT_NONE.) Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Make array static constAndreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Avoid calling av_buffersink_get_* multiple timesAndreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Use dedicated pointer to access st->codecparAndreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Don't unnecessarily write '\0' to AVBPrintAndreas Rheinhardt2021-12-03
| | | | | | | | | An AVBPrint's internal string is always already zero-terminated; writing another '\0' is unnecessary as long as one treats the string only as a C-string. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_filter: Avoid DynBuf API to improve error checksAndreas Rheinhardt2021-12-03
| | | | | | | | | | | | | | | | | choose_pix_fmts() used the dynamic buffer API to write strings; as is common among uses of this API, only opening the dynamic buffer was checked, but not the end result, leading to crashes in case of allocation failure. Furthermore, some static strings were duplicated; the allocations performed here were not properly checked: Allocation failure would be treated as "could not determine pixel format". The first issue is fixed by switching to the AVBPrint API which allows to easily perform checks at the end. Furthermore, the internal buffer avoids almost all allocations in case the AVBPrint is used. The AVBPrint also allows to solve the second issue in an elegant way, because it allows to return the static strings directly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_filter: Avoid DynBuf-API for writing stringsAndreas Rheinhardt2021-12-03
| | | | | | | | It is not really natural, it requires internal allocations of its own and its error handling is horrible (i.e. the implicit (re)allocations here are unchecked). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/yuv2rgb: Silence a set-but-unused-variable warningAndreas Rheinhardt2021-12-03
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* all: Remove unused-but-set variablesAndreas Rheinhardt2021-12-03
| | | | | | Newer versions of Clang detect this and emit warnings for it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* all: Use av_memdup() where appropriateAndreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_redundant_pps_bsf: Inline constantAndreas Rheinhardt2021-12-03
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_redundant_pps_bsf: Support multiple input PPSAndreas Rheinhardt2021-12-03
| | | | | | | | | | | | | | | | Up until now, the h264_redundant_pps_bsf stored the initial value of pic_init_qp_minus26 of the most recently encountered PPS; it also modified the slices based upon to assumption that the most recent PPS is the PPS the slice belongs to. Yet this assumption is flawed, as there can be several PPS with different IDs that are visible at any given time. If these have different pic_init_qp_minus26 values, the output can be invalid. Fix this by directly using the pic_init_qp_minus26 value of the input PPS. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_redundant_pps_bsf: Remove flush callbackAndreas Rheinhardt2021-12-03
| | | | | | | | | extradata_pic_init_qp is unset since fa75e438756f159a667080dcba58ea2e3b190001 (and resetting current_pic_init_qp to the value it had in extradata never made much sense). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Properly free an AVDictionaryAndreas Rheinhardt2021-12-03
| | | | | | | | It is not documented that freeing the last (and only) entry of an AVDictionary frees the dictionary. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: Cleanup generically on read_header failureAndreas Rheinhardt2021-12-03
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swresample/swresample: Remove array size hint from swr_convert()Andreas Rheinhardt2021-12-03
| | | | | | | | | | | | | | SWR_CH_MAX is internal only and the arrays are therefore not required to have that many elements (and they typically don't do it). So remove this potentially confusing hint. (Newer versions of GCC emit -Warray-parameter= warnings for this, because the definition with explicit size differs from the declaration (which leaves the size unspecified); this is IMO a false-positive, because definition and declaration didn't conflict, but anyway it is fixed by this commit.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mvdec: handle audio sample sizeJohn-Paul Stewart2021-12-03
| | | | | | | Adds support for reading audio sample size from the data instead of assuming all audio is 16 bits per sample. Reviewed-by: Peter Ross <pross@xvid.org>
* avformat/mvdec: fix reading number of audio channelsJohn-Paul Stewart2021-12-03
| | | | | | | | | The number of audio channels is stored after the magic number identifying the audio format. Prior to this patch the code has been reading it earlier, causing files with only one audio channel to be handled incorrectly. Reviewed-by: Peter Ross <pross@xvid.org>
* fate/ffmpeg: Fix requirements of shortest testsAndreas Rheinhardt2021-12-02
| | | | | | | Fixes FATE failures if e.g. libavdevice is disabled. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/ffmpeg: Fix shortest testsAndreas Rheinhardt2021-12-02
| | | | | | | | | | | | | | | | | | The mpeg4 encoder is slice-threaded and its output depends upon the number of threads used. Therefore all tests of this encoder use a hardcoded number of threads (ENC_OPTS in fate-run.sh contains "-threads 1"; only the vsynth%-mpeg4-thread tests override this for the mpeg4 encoder, but they also use a hardcoded value to be consistent across different systems); only the new shortest and copy-shortest[12] (implicitly due to the sample used) tests don't and this leads to FATE-failures. Fix this by explicitly setting the thread count. Also switch the shortest test to framecrc, because hashing side data is itchy even though the side data used here (AV_PKT_DATA_QUALITY_STATS) has a defined endianness. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Changelog: update with recent Vulkan filter additionsLynne2021-12-02
|
* avfilter: add a flip_vulkan filterWu Jianhua2021-12-02
| | | | | | | | This filter flips the input video both horizontally and vertically in one compute pipeline, and it's no need to use two pipelines for hflip_vulkan,vflip_vulkan anymore. Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avfilter: add audio dynamic smooth filterPaul B Mahol2021-12-02
|
* avfilter: add audio spectral stats filterPaul B Mahol2021-12-02
|
* avcodec/movtextenc: Simplify writing a single charAndreas Rheinhardt2021-12-02
| | | | | Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextenc: Remove redundant byte countAndreas Rheinhardt2021-12-02
| | | | | | | Use the AVBPrint's len instead. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>