summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* fate: add EXR encoder testsPaul B Mahol2022-07-03
|
* avcodec/alacdsp: Make intermediates unsignedMichael Niedermayer2022-07-02
| | | | | | | | Fixes: signed integer overflow: -14914387 + -2147418648 cannot be represented in type 'int' Fixes: 46464/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-474307197311385 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/channel_layout: av_channel_layout_describe_bprint: Check for buffer endMichael Niedermayer2022-07-02
| | | | | | | | Fixes: Timeout printing a billion channels Fixes: 48099/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-6754782204788736 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/aiffdec: cleanup size handling for extreem casesMichael Niedermayer2022-07-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cbs_h2645: Remove unnecessary (h264|hevc)_sei.h inclusionsAndreas Rheinhardt2022-07-02
| | | | | | | They are unnecessary since the SEI enum has been moved to sei.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pthread_slice: Don't reinitialise initialised mutexAndreas Rheinhardt2022-07-01
| | | | | | | | | | | | | | It results in undefined behaviour. Instead initialize the mutexes and condition variables once during init (and check these initializations). Also combine the corresponding mutex and condition variable into one structure so that one can allocate their array jointly. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/v4l2_m2m: Check if the file descriptor is valid before closingWujian(Chin)2022-07-01
| | | | | | | Fixes ticket #9507. Reviewed-by: Steven Liu <liuqi05@kuaishou.com> Signed-off-by: wujian_nanjing <wujian2@huawei.com>
* avcodec/libx264: Avoid duplicating stringsAndreas Rheinhardt2022-07-01
| | | | | | Also removes some unchecked allocations. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Makefile: Prompt for reconfigure on lavc/hwaccels.h modificationAndreas Rheinhardt2022-07-01
| | | | | | | | | | | | | | | | Adding a new AVHWAccel also adds a new CONFIG variable for it and said config variables are typically used to calculate the size of stack arrays. In such a context, an undefined CONFIG variable does not evaluate to zero; instead it leads to a compilation failure. Therefore treat this file like the other files containing lists of configurable components and prompt for reconfiguration if it is modified. (E.g. a44fba0b5b3b4090f9238751736198ddd1f0f1d5 led to compilation failures for me.) Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: Fix invalid checkAndreas Rheinhardt2022-06-30
| | | | | | | | Regression since c9de096851803d45444ae9dfe3a390a2d53ac71b. Fixes Coverity ID 1506839. Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: limit ISOBMFF AC-3 mapping to bsids <=8Jan Ekström2022-06-30
| | | | | | | | | | This leaves out RealAudio DolbyNet, which utilizes bsids 9 and 10, It is not clear whether the interpreted bit rate value (divided by 2 or 4 depending on the variant), or the original bit rate value should be utilized to receive the bit_rate_code index. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/movenc: handle OOM situations when parsing AC-3 headersJan Ekström2022-06-30
| | | | Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/movenc: utilize existing AC-3 parsing workflow for AC-3Jan Ekström2022-06-30
| | | | Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/movenc: move eac3_info definition so that it can be used for AC-3Jan Ekström2022-06-30
| | | | Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avformat/movenc: enable handle_eac3 to handle AC-3 tracksJan Ekström2022-06-30
| | | | | | | | | | | Add the AC-3 frame type, as well as early exit from additional packet parsing in case of AC-3, as only a single packet is required to get the required information. Additionally, expose ac3_bit_rate_code via the eac3_info struct as it is required for AC3SpecificBox. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* {configure,avformat/movenc}: enable AC-3 parser for movencJan Ekström2022-06-30
| | | | | | | | | | | | This simplifies the code to no longer have #ifs in a manner which does not require handling avpriv_ac3_parse_header returning ENOSYS. As an existing example, the MPEG-TS muxer already requires the AC-3 parser, and in order to fix existing issues with the current AC-3 movenc code, switching to use the AC-3 parser is required, so this is an enabling change for that. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avcodec/ac3_parser{,_internal}: expose AC-3 bit_rate_codeJan Ekström2022-06-30
| | | | | | | Required by MP4's AC3SpecificBox and MPEG-TS AC-3 audio_descriptor, of which the former is implemented in our MP4 writer. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* avcodec/exrenc: add grayf32 format supportPaul B Mahol2022-06-30
|
* avcodec/hevcdec: Return immediately upon hevc_init_context() failureAndreas Rheinhardt2022-06-30
| | | | | | | | | | This function is only called from the decoder's init function and given that this decoder has FF_CODEC_CAP_INIT_CLEANUP set, hevc_decode_free() is called automatically (currently it would be called twice with the second call being redundant). Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Remove redundant context_initializedAndreas Rheinhardt2022-06-30
| | | | | | | | All contexts are always initialized during init, regardless of whether frame threading is in use or not. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Don't mention removed functionAndreas Rheinhardt2022-06-30
| | | | | | | | avcodec_thread_init() has been removed in 9a79bb552a518f26bec1b5306a03b76076bcf8eb. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mov: Only read the primary item for AVIFVignesh Venkatasubramanian2022-06-29
| | | | | | | | | | | | | | | | | | | | Update the still AVIF parser to only read the primary item. With this patch, AVIF still images with exif/icc/alpha channel will no longer fail to parse. For example, this patch enables parsing of files in: https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Microsoft Adding two fate tests: 1) demuxing of still image with 1 item - this test will pass regardless of this patch. 2) demuxing of still image with 2 items - this test will fail without this patch and will pass with patch applied. Partially fixes trac ticket #7621 Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: James Zern <jzern@google.com>
* avcodec/pnmenc: reindentPaul B Mahol2022-06-29
|
* avcodec/pnmenc: add support for grayf32 in PFM imagePaul B Mahol2022-06-29
|
* avformat/hlsenc: Add resend_headers optionhuheng2022-06-29
| | | | | | | | | Add pat and pmt table at start of each segment in single_file mode enhanced compatibility of hls stream. Because some hls clients separate parsing segment of hls stream, the absence of pat/pmt will cause parsing to fail. Reviewed-by: Steven Liu <liuqi05@kuaishou.com> Signed-off-by: huheng <heng.hu.1989@gmail.com>
* avformat/hls: add #EXT-X-START tag support by prefer_x_start optLi Kai2022-06-29
| | | | | Reviewed-by: Steven Liu <liuqi05@kuaishou.com> Signed-off-by: Li Kai <wolfleekay@gmail.com>
* avformat/hlsenc: Use HLS version 2 if rounded durations are enabledLucy2022-06-29
| | | | | | | | | | | | | | | | | This allows for wider compatibility with older devices, such as those running iOS 3. The only difference between HLS version 2 and version 3 is that version 3 supports non-integer EXTINF values, and as such, we can default to version 2 if we're using whole-integer EXTINFs anyways, when `-hls_flags round_durations` is set. As this code seems to otherwise consistently use the lowest compatible version, this seems to fit in properly with existing behavior. Testing confirms with that this patch, HLS output can work all the way back to iOS 3. Reviewed-by: Steven Liu <liuqi05@kuaishou.com> Signed-off-by: Lucy <lucy@absolucy.moe>
* checkasm: Provide enough alignment in the new motion testMartin Storsjö2022-06-28
| | | | | | This fixes the checkasm test in some setups on x86. Signed-off-by: Martin Storsjö <martin@martin.st>
* avutil/wchar_filename: Make the header C++ compatibleAndreas Rheinhardt2022-06-28
| | | | | | | | | | | When compiling decklink, this header is included from a C++ file (albeit inside 'extern "C"') and this causes compilation failures because of an implicit void* -> char* conversion. So add an explicit cast. Fixes ticket #9819. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/aarch64: motion estimation functions in neonSwinney, Jonathan2022-06-28
| | | | | | | | | | | | | | | | | | | | | | - ff_pix_abs16_neon - ff_pix_abs16_xy2_neon In direct micro benchmarks of these ff functions verses their C implementations, these functions performed as follows on AWS Graviton 3. ff_pix_abs16_neon: pix_abs_0_0_c: 141.1 pix_abs_0_0_neon: 19.6 ff_pix_abs16_xy2_neon: pix_abs_0_3_c: 269.1 pix_abs_0_3_neon: 39.3 Tested with: ./tests/checkasm/checkasm --test=motion --bench --disable-linux-perf Signed-off-by: Jonathan Swinney <jswinney@amazon.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* fftools/ffmpeg: change frame counters to 64 bitMarton Balint2022-06-27
| | | | | | | | | | | Frame counters can overflow relatively easily (INT_MAX number of frames is slightly more than 1 year for 60 fps content), so make sure we are always using 64 bit values for them. A live stream can easily run for more than a year and the framedup logic breaks on an overflow. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mov: read PCM audio configuration box ('pcmC') if availableIvan Baykalov2022-06-27
| | | | | | | | | | | | | | For ipcm and fpcm streams, big-endian format is the default, but it can be changed with additional 'pcmC' sub-atom of audio sample description. Details can be found in ISO/IEC 23003-5:2020 Fixes ticket #9763. Fixes ticket #9790. Patch simplified by Marton Balint. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mov: factorize setting little endian PCM streamsMarton Balint2022-06-27
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/movenc: Support alpha channel for AVIFVignesh Venkatasubramanian2022-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AVIF specification allows for alpha channel as an auxiliary item (in case of still images) or as an auxiliary track (in case of animated images). Add support for both of these. The AVIF muxer will take exactly two streams (when alpha is present) as input (first one being the YUV planes and the second one being the alpha plane). The input has to come from two different images (one of it color and the other one being alpha), or it can come from a single file source with the alpha channel extracted using the "alphaextract" filter. Example using alphaextract: ffmpeg -i rgba.png -filter_complex "[0:v]alphaextract[a]" -map 0 -map "[a]" -still-picture 1 avif_with_alpha.avif Example using two sources (first source can be in any pixel format and the second source has to be in monochrome grey pixel format): ffmpeg -i color.avif -i grey.avif -map 0 -map 1 -c copy avif_with_alpha.avif The generated files pass the compliance checks in Compliance Warden: https://github.com/gpac/ComplianceWarden libavif (the reference avif library) is able to decode the files generated using this patch. They also play back properly (with transparent background) in: 1) Chrome 2) Firefox (only still AVIF, no animation support) Reviewed-by: James Zern <jzern@google.com> Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
* fftools/ffplay: fix YUV conversion modeNiklas Haas2022-06-27
| | | | | | | | | | | | | | GL and Metal cache the state at time of texture creation. GLES2 and Direct3D 11 use the state at time of the render copy call. So the only way we can get the correct behavior consistently is by making sure the state is set for both the upload *and* the draw call. This probably isn't our bug to fix (upstream should make itself behave consistently and also document its functions), but as it stands, `ffplay` is misrendering BT.709 as BT.601 on my stock Linux system, and that leaves a bad taste in my mouth. Signed-off-by: Niklas Haas <git@haasn.dev>
* avcodec/libx265: make X265 CSP selection pixel format independentJan Ekström2022-06-27
| | | | | | | | Currently the format listing misses the J formats completely, yet they are marked as supported in the encoder. Thus to make the logic support them while not explicitly listing them, make the logic utilize chroma subsampling information in both width and height available through the pixel format descriptor.
* libavcodec/qsvenc: Enable fixed QP configure in qsv CQP runtimeYue Heng2022-06-27
| | | | | | | | | | Enable dynamic QP configuration in runtime on qsv encoder. Through AVFrame->metadata, we can set key "qsv_config_qp" to change QP configuration when we encode video in CQP mode. Signed-off-by: Yue Heng <yue.heng@intel.com> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc_hevc: Use default value from MSDK to set bf.Wenbin Chen2022-06-27
| | | | | | | | Change the default value of "bf" for hevc_qsv to -1. 8 isn't the best choice so let MSDK to decide the number of b frames. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/cuviddec: fix null pointer dereferenceZhao Zhili2022-06-26
| | | | | | It can happened on error path of cuvid_decode_init(). Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/cuviddec: fix AV1 decoding errorZhao Zhili2022-06-26
| | | | | | | | | | | cuvidParseVideoData only supports pure OBUs, it reports an unknown error with AV1CodecConfigurationRecord. Check whether extradata is AV1CodecConfigurationRecord and skip the first 4 bytes to fix the issue. The bug is revealed in ffmpeg cmd since 45e3b6a68 and ffd1316e. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec: fix time reporting for DFPWM streamsJack Bruienne2022-06-26
| | | | | | | | | | This adds the exact bits per sample for DFPWM to av_get_exact_bits_per_sample. Previously, the DTS and PTS were set to 0 because the codec never reported them, but adding this allows libavformat to automatically set DTS and PTS from the byte position of the stream. Signed-off-by: Jack Bruienne <jackbruienne@gmail.com>
* avcodec/x86/h264_qpel: Remove unused functionsAndreas Rheinhardt2022-06-26
| | | | | | | | | | Forgotten in 4011a76494a5ff6844312813bc753aae8e54c2f0. The reason for this is that these functtions are marked as av_always_inline and GCC does not emit warnings if such functions are unused, so this went unnoticed. Yet Clang does, so this commit removes them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Fix use of uninitialized valueAndreas Rheinhardt2022-06-26
| | | | | | | | | Regression since 67eea6cf026a70940ea402d54685d67c660b49cd. Affects only WebVTT when muxing WebM. (This is covered by the webm-webvtt-remux FATE test which fails for several FATE boxes on fate-ffmpeg.org.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskadec: avoid integer overflows in SAR computationMichael Niedermayer2022-06-25
| | | | | | | | | | | | This ignores >64bit Alternatively we could support that if it occurs in reality Fixes: negation of -9223372036854775808 Fixes: integer overflows Fixes: 46072/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-5029840966778880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libjxlenc: properly read input colorspaceLeo Izen2022-06-25
| | | | | | | | | | | Whether an ICC profile is present or not, the libjxl encoder wrapper should now properly read colorspace tags and forward them to libjxl appropriately, rather than just assume sRGB as before. It will also print warnings when colorimetric assumptions are made about the input data. Reviewed-by: Niklas Haas <git@haasn.dev> Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avcodec/libjxldec: properly tag output colorspaceLeo Izen2022-06-25
| | | | | | | | | Whether an ICC profile is present or not, the decoder should now properly tag the colorspace of pixel data received by the decoder. Reviewed-by: Niklas Haas <git@haasn.dev> Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avfilter/Makefile: always make colorspace.oGyan Doshi2022-06-25
| | | | | | | Unbreaks libavfilter builds when configured with a subset of filters. drawutils added ff_draw_init2 in 6c3a82f043 which calls functions defined in colorspace.c. So the latter needs to be built alongside the former.
* avutil/ppc/cpu: Use proper header for OpenBSD PPC CPU detectionBrad Smith2022-06-25
| | | | | | | | Use the proper header for PPC CPU detection code. sys/param.h includes sys/types, but sys/types.h is the more appropriate header to be used here. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/http: include version.hJames Almer2022-06-24
| | | | | | | | This is needed to get LIBAVFORMAT_VERSION, used as part of the user agent. Fixes a recent regression. Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* AV1 VDPAU hwaccel Decode supportManojGuptaBonda2022-06-25
| | | | | | | | | | | | | | Support for VDPAU accelerated AV1 decoding was added with libvdpau-1.5. Support for the same in ffmpeg is added with this patch. Profiles related to VDPAU AV1 can be found in latest vdpau.h present in libvdpau-1.5. Add AV1 VDPAU to list of hwaccels and supported formats Added file vdpau_av1.c and Modified configure to add VDPAU AV1 support. Mapped AV1 profiles to VDPAU AV1 profiles. Populated the codec specific params that need to be passed to VDPAU. Signed-off-by: Philip Langdale <philipl@overt.org>