summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* mfenc: Use dlopen instead of LoadLibrary for loading mfplat.dllMartin Storsjö2022-05-28
| | | | | | | The dlopen wrapper contains code to make loading libraries safer, to avoid loading a potentially malicious DLL with the same name. Signed-off-by: Martin Storsjö <martin@martin.st>
* swscale/aarch64: add hscale specializationsSwinney, Jonathan2022-05-28
| | | | | | | | | | | | | | | | | | | | | | | This patch adds code to support specializations of the hscale function and adds a specialization for filterSize == 4. ff_hscale8to15_4_neon is a complete rewrite. Since the main bottleneck here is loading the data from src, this data is loaded a whole block ahead and stored back to the stack to be loaded again with ld4. This arranges the data for most efficient use of the vector instructions and removes the need for completion adds at the end. The number of iterations of the C per iteration of the assembly is increased from 4 to 8, but because of the prefetching, there must be a special section without prefetching when dstW < 16. This improves speed on Graviton 2 (Neoverse N1) dramatically in the case where previously fs=8 would have been required. before: hscale_8_to_15__fs_8_dstW_512_neon: 1962.8 after : hscale_8_to_15__fs_4_dstW_512_neon: 1220.9 Signed-off-by: Jonathan Swinney <jswinney@amazon.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* checkasm: added additional dstW tests for hscaleSwinney, Jonathan2022-05-28
| | | | | Signed-off-by: Jonathan Swinney <jswinney@amazon.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/libaomenc: Add unmet target level warningBohan Li2022-05-27
| | | | | | | | | | | When target levels are set, this patch checks whether they are satisfied by libaom. If not, a warning is shown. Otherwise the output levels are also logged. This patch applies basically the same approach used for libvpx. Signed-off-by: Bohan Li <bohanli@google.com> Signed-off-by: James Zern <jzern@google.com>
* avfilter/af_biquads: fix low/highshelf 'k' calculationPaul B Mahol2022-05-27
|
* qsv: check for libmfx.pc instead of mfx.pcHaihao Xiang2022-05-26
| | | | | | | This fixed the regression caused by commit 478e1a98a Reported-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avfilter/vf_vpp_qsv: set outlink to EOF correctlyFei Wang2022-05-26
| | | | | | | | | | | | | | | | | 1. Return error if filter frame fail before set outlink to EOF in none pass through mode. 2. Set outlink to EOF before return success in pass through mode. Fix endless cmd: ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -hwaccel_output_format \ qsv -v debug -c:v hevc_qsv -i 4k.h265 \ -filter_complex "vpp_qsv=w=3840:h=2160:async_depth=4[o1];[o1]split=2[s1][s2]; [s2]vpp_qsv=w=1920:h=1080:async_depth=4[o2];[o2]split=2[s3][s4]; [s4]vpp_qsv=w=1920:h=1080:async_depth=4[o3]" \ -map [s1] -c:v hevc_qsv -async 3 -async_depth 3 -b:v 9000k -preset 7 -g 33 -y -f null - \ -map [s3] -c:v hevc_qsv -async 3 -async_depth 3 -b:v 4000k -preset 7 -g 33 -y -f null - \ -map [o3] -c:v hevc_qsv -async 3 -async_depth 3 -b:v 3100k -preset 7 -g 33 -y -f null -
* doc/protocols: add details and reformat IPFS sectionGyan Doshi2022-05-26
|
* doc/protocols: sort IPFS section alphabeticallyGyan Doshi2022-05-26
|
* avformat/matroskadec: assert non NULL bufMichael Niedermayer2022-05-26
| | | | | | | | | The code is only called if size is > 0 so buf should not be NULL Helps: CID610554 Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Changelog: Add line for IPFSMichael Niedermayer2022-05-26
| | | | | | Noticed-and-suggested-by: Mark Gaiser <markg85@gmail.com> Reviewed-by: Mark Gaiser <markg85@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/act: Check ff_get_wav_header() for failureMichael Niedermayer2022-05-26
| | | | | | | Fixes: missing error check Fixes: CID717495 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/jpegxl_probe: Check init_get_bits8() for failureMichael Niedermayer2022-05-26
| | | | | | | Fixes: missing error check Fixes: CID1504270 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/mem: fix doc for reallocsZhao Zhili2022-05-26
| | | | | | | | | | The doc says those function are like av_free if size or nmemb is zero. It doesn't match the code. av_realloc() realloc one byte if size is zero, which was added by 91ff05f6ac5 ten years ago. realloc() itself in C is implementation-dependent. Make the doc match the longstanding behaviour. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* lavc/aarch64: hevc_sao reschedule slightlyJ. Dekker2022-05-26
| | | | Signed-off-by: J. Dekker <jdek@itanimul.li>
* avcodec/mfenc: Dynamically load MFPlat.DLLTrystan Mata2022-05-25
| | | | | | | | | | | | Allows non-UWP builds of FFmpeg with MediaFoundation to work on N editions of Windows which are without MediaFoundation by default. On UWP target, FFmpeg is linked directly against MediaFoundation since LoadLibrary is not available. This commit adresses https://trac.ffmpeg.org/ticket/9788 Signed-off-by: Martin Storsjö <martin@martin.st>
* qsv: add requirement for the mininal version of libmfxHaihao Xiang2022-05-25
| | | | | | | | | | libmfx 1.28 was released 3 years ago, it is easy to get a greater version than 1.28. We may remove lots of compile-time checks if adding the requirement for the minimal version in the configure script. Reviewed-by: softworkz <softworkz@hotmail.com> Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: expose only supported optionsDmitry Rogozhkin2022-05-25
| | | | | | | | | | | | | | vp9, hevc, avc, mpeg2 QSV encoders inherit common list of options (QSV_COMMON_OPTS) while bunch of options is not actually supported by current qsv code. The only codec which supportes everything is avc, followed by hevc, while vp9 and mpeg2 significantly fall behind. This creates difficulties for the users to use qsv encoders. This patch fixes options list for encoders leaving only those which are actually supported. Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* checkasm: improve hevc_sao testJ. Dekker2022-05-25
| | | | | | | | The HEVC decoder can call these functions with smaller widths than the functions themselves are designed to operate on so we should only check the relevant output Signed-off-by: J. Dekker <jdek@itanimul.li>
* lavc/aarch64: add hevc sao edge 8x8J. Dekker2022-05-25
| | | | | | | | | bench on AWS Graviton: hevc_sao_edge_8x8_8_c: 516.0 hevc_sao_edge_8x8_8_neon: 81.0 Signed-off-by: J. Dekker <jdek@itanimul.li>
* lavc/aarch64: add hevc sao edge 16x16J. Dekker2022-05-25
| | | | | | | | | | | | | | | bench on AWS Graviton: hevc_sao_edge_16x16_8_c: 1857.0 hevc_sao_edge_16x16_8_neon: 211.0 hevc_sao_edge_32x32_8_c: 7802.2 hevc_sao_edge_32x32_8_neon: 808.2 hevc_sao_edge_48x48_8_c: 16764.2 hevc_sao_edge_48x48_8_neon: 1796.5 hevc_sao_edge_64x64_8_c: 32647.5 hevc_sao_edge_64x64_8_neon: 3118.5 Signed-off-by: J. Dekker <jdek@itanimul.li>
* lavc/aarch64: fix hevc sao band filterJ. Dekker2022-05-25
| | | | | | | The SAO band filter can be called with non-multiples of 8, we round up to the nearest multiple of 8 to account for this. Signed-off-by: J. Dekker <jdek@itanimul.li>
* avcodec/mjpegenc: Remove ineffective pred optionAndreas Rheinhardt2022-05-24
| | | | | | Never did anything, so it is removed immediately. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideoenc: Remove ineffective optionsAndreas Rheinhardt2022-05-24
| | | | | | | | | | | | | | | | This commit removes the ineffective FF_MPV_DEPRECATED_ options, namely mpeg_quant (this is only an option for MPEG-4), a53cc (this is only an option for MPEG-2), force_duplicated_matrix (applies only to MJPEG) and b_strategy, b_sensitivity and brd_scale (these options only make sense for encoders supporting B-frames, which currently means the MPEG-1/2 and MPEG-4 encoders). Given that these options never changed the outcome of encoding, they are removed at once. Notice that the options for the encoders for which it made sense are not affected by this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc: Remove pointless motion-estimation optionsAndreas Rheinhardt2022-05-24
| | | | | | | | (M)JPEG does not use motion estimation/motion vectors at all. These options therefore don't affect the output at all. So remove them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideoenc: Remove ineffective [pb]bias optionsAndreas Rheinhardt2022-05-24
| | | | | | | | | | | The user-provided value is overwritten in ff_mpv_encode_init() without having ever been read. (This has been broken when making these options mpegvideo-specific in commits 910247f1720c6aae422723c05dac6d0b19f20bec and cf7d2f2d2134c0854edf2db91e7436ac2bc9874f. No one has ever complained, so this commit removes these fields.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pthread_frame: Don't update the first thread ctx before freeingAndreas Rheinhardt2022-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, ff_frame_thread_free() uses the last worker thread to updates the first worker thread via update_context_from_thread() immediately before freeing all these worker threads. This is a remnant of the time in which the first worker was special. (E.g. the first worker shared its AVCodecInternal with the public AVCodecContext.) But these times are over (none of the uses of is_copy matter for ff_frame_thread_free()); nowadays the only thing that update_context_from_thread() does is referencing a few buffers/frames and replacing them with other references instead. These new references will then be freed immediately thereafter when the first worker thread is freed. Ensuring that the code is free of double-frees is achieved by using reference-counted structures (or in case of AVChannelLayouts: by giving each worker its own copy). Some archaeology: a) Updating the first worker thread from the last one used has been done since frame-threading was added in 37b00b47cbeecd66bb34c5c7c534d016d6e8da24. b) The precursor to ff_mpv_common_end() checked for is_copy before freeing pictures (i.e. it only freed them for the first worker thread). c) Commits c2dfb1e37cc72bf144545c4410a4621cbff5c4b1 and e33811bd2686411233cb0eb4a4ee45eb99d7e736 modified the update_thread_context function of the H.264 decoder so that it could fail before calling ff_mpeg_update_thread_context(). d) This led to a double free/an assert violation with a H.264 sample for which ff_mpeg_update_thread_context() is not reached for the final update_context_from_thread(). Commit a6e4796fbf0aa9b13451a8ef917ecc4e80d1d272 added code to fix this sample. e) This issue was fixed (even with the last mentioned commit reverted) when the H.264 decoder was deMpegEncContextized in commit b7fe35c9e50e1701274364adf7280bf4a02b092b (merging commit 2c541554076cc8a72e7145d4da30389ca763f32f). f) mpegvideo.c stopped using is_copy when it was switched to refcounted frames in 759001c534287a96dc96d1e274665feb7059145d. g) 1f4cf92cfbd3accbae582ac63126ed5570ddfd37 removed the init_thread_copy callbacks; now no FFCodec.close callback checks for is_copy at all any more. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* ffbuild/common: Fix CPPFLAGS applied for compiling C++ filesAndreas Rheinhardt2022-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, $(CPPFLAGS) and $(CFLAGS) are prepended to CXXFLAGS (the flags for compiling C++) like this: CXXFLAGS := $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) Using ":=" creates a simply expanded variable, i.e. the values of the variable at the time of assignment are used and later modifications to them are ignored (using a recursively expanding variable (i.e. "=" instead of ":=") is not really possible here, as there would be an infinite loop when evaluating CXXFLAGS). Yet we perform later additions to CPPFLAGS: HAVE_AV_CONFIG_H and BUILDING_libfoo are defined. These do not reach C++ compilations. To fix this a trick is employed to prepend to a recursively expanded variable while keeping it recursively expanded. There are two practical consequences of this: C++ files now no longer include the version.h header, but only the version_major.h header of their library, saving some recompilations. Furthermore, they now get some optimized math functions (namely the ones from lavu/intmath.h instead of the ones from lavu/common.h). (av_parity() is the only one for which it makes a difference.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg: move processing AV_PKT_DATA_QUALITY_STATS to do_video_stats()Anton Khirnov2022-05-24
| | | | | | | | | | This is a more appropriate place for this code, since the values we read from AV_PKT_DATA_QUALITY_STATS side data are primarily written into video stats. This ensures that the values written into stats actually apply to the right packet. Rename the function to update_video_stats() to better reflect its new purpose.
* fftools/ffmpeg: merge variable declaration and initializationAnton Khirnov2022-05-24
|
* fftools/ffmpeg: stop using av_stream_get_end_pts() in do_video_stats()Anton Khirnov2022-05-24
| | | | | | It retrieves libavformat's internal dts value (contrary to the function's name), which is not only incorrect in general, but also unnecessary because we can access the packet directly.
* fftools/ffmpeg: stop using AVStream.nb_frames in do_video_stats()Anton Khirnov2022-05-24
| | | | | | | | | | Its use for muxing is not documented, in practice it is incremented per each packet successfully passed to the muxer's write_packet(). Since there is a lot of indirection between ffmpeg receiving a packet from the encoder and it actually being written (e.g. bitstream filters, the interleaving queue), using nb_frames here is incorrect. Add a new counter for packets received from encoder instead.
* fftools/ffmpeg: move do_video_stats() to avoid a forward declarationAnton Khirnov2022-05-24
|
* fftools/ffmpeg: drop a useless check and reduce indentationAnton Khirnov2022-05-24
| | | | do_video_stats() is only ever called for video.
* fftools/ffmpeg: reindent after previous commitAnton Khirnov2022-05-24
|
* fftools/ffmpeg: reuse the encoding code for flushing encodersAnton Khirnov2022-05-24
|
* fftools/ffmpeg: share the code encoding a single frame between video and audioAnton Khirnov2022-05-24
| | | | | Call do_video_stats() for every video packet produced by the encoder, rather than for every frame sent to the encoder.
* lavfi/vf_v360: implement output mask for barrelsplitAnton Khirnov2022-05-24
| | | | | | | | | The top/bottom of the barrel are each coded as two semicircles inside a square block in the frame. Mask out the parts of the square that lie outside of these semicircles, so they are made transparent when alpha_mask=1. Fixes the other part of #9725.
* lavfi/vf_v360: fix barrelsplit transform with paddingAnton Khirnov2022-05-24
| | | | | | | Make it match Facebook's transform360 (https://github.com/facebook/transform360) Fixes one part of #9725.
* lavfi/vf_v360: factorize vector computation for barrelsplitAnton Khirnov2022-05-24
|
* lavfi/vf_v360: drop nonsense inline specifierAnton Khirnov2022-05-24
| | | | This function is always called indirectly, it cannot be inlined.
* tests/fate/vcodec: add tests for ffv1 2pass modeAnton Khirnov2022-05-24
|
* fftools/ffmpeg: fix 2pass log file namesAnton Khirnov2022-05-24
| | | | | | | Use the global stream index rather than an unrelated variable in the filename. Broken in 6d5d9246042.
* tests/fate-run: give consistent names to enc_dec() argumentsAnton Khirnov2022-05-24
| | | | | | | | | | | | | | | enc_dec() performs two ffmpeg runs - the first one encoding a source file into a specified output format, the second one decoding previously encoded file. The arguments to this function currently have confusing names - e.g. dec_opt contains _output_ (i.e. encoding) options for the second (decoding) ffmpeg invocation. It is also possible to supply _input_ (i.e. decoding) options for the second ffmpeg run, but the argument is currently unnamed and referred to by number. Add an _in/_out suffix to argument names to make it clear what they are used for. Give a name to input options for the decoding ffmpeg run.
* tests/fate/vcodec: drop unnecessary optionsAnton Khirnov2022-05-24
| | | | | jpeg2000 will be chosen by default, there is no reason to prescribe it explicitly. No other test does so.
* avcodec/libdavs2: export has_b_frames infoZhao Zhili2022-05-24
| | | | | | | More precisely, we should use picture_reorder_delay, but it's unavailable yet. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/libuavs3d: use output_reorder_delay as has_b_framesZhao Zhili2022-05-24
| | | | | | | has_b_frames is more than a bool, it's the size of the frame reordering buffer in the decoder. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/avs3_parser: set has_b_frames properlyZhao Zhili2022-05-24
| | | | | | | | | has_b_frames should be output_reorder_delay field in AVS3 sequence header and larger than 1. The parser implementation doesn't parse that field. Decoder can set has_b_frames properly, so use FFMAX here to avoid resetting has_b_frames from output_reorder_delay to 1. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avfilter: Add blockdetect filterThilo Borgmann2022-05-24
|
* avcodec/dvdsubdec: use avpriv_fopen_utf8() instead of plain fopen()softworkz2022-05-24
| | | | | | | | Unify file access operations by replacing usages of direct calls to posix fopen() to prepare for long filename support on Windows. Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>