1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

106645 Commits

Author SHA1 Message Date
Michael Niedermayer
fbd22504c4 avfilter/vsrc_mandelbrot: Check for malloc failure
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-22 12:24:14 +02:00
Martin Storsjö
70db14376c swscale: aarch64: Optimize the final summation in the hscale routine
Before:                     Cortex A53      A72      A73  Graviton 2  Graviton 3
hscale_8_to_15_width8_neon:     8273.0   4602.5   4289.5      2429.7      1629.1
hscale_8_to_15_width16_neon:   12405.7   6803.0   6359.0      3549.0      2378.4
hscale_8_to_15_width32_neon:   21258.7  11491.7  11469.2      5797.2      3919.6
hscale_8_to_15_width40_neon:   25652.0  14173.7  12488.2      6893.5      4810.4

After:
hscale_8_to_15_width8_neon:     7633.0   3981.5   3350.2      1980.7      1261.1
hscale_8_to_15_width16_neon:   11666.7   5951.0   5512.0      3080.7      2131.4
hscale_8_to_15_width32_neon:   20900.7  10733.2   9481.7      5275.2      3862.1
hscale_8_to_15_width40_neon:   24826.0  13536.2  11502.0      6397.2      4731.9

Thus, this gives overall a 8-29% speedup for the smaller filter
sizes, around 1-8% for the larger filter sizes.

Inspired by a patch by Jonathan Swinney <jswinney@amazon.com>.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-04-22 10:49:46 +03:00
Zhao Zhili
d1a44f261a examples/decode_video: flush parser to fix missing frame
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-04-22 11:26:51 +08:00
Paul B Mahol
0b6e801d4a avfilter/avf_showfreqs: add option to draw subset of channels 2022-04-22 01:20:21 +02:00
Paul B Mahol
fd834924d7 avfilter/avf_showfreqs: filter support all channel counts 2022-04-22 01:20:21 +02:00
Michael Niedermayer
d353909e77 avfilter/vf_frei0r: Copy to frame allocated according to frei0r requirements
Fixes: issues with non trivial linesize

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-21 22:42:20 +02:00
Michael Niedermayer
d740782701 avfilter/video: Add ff_default_get_video_buffer2() to set specific alignment
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-21 22:42:20 +02:00
Michael Niedermayer
a3d790f197 avformat/genh: Check sample rate
Fixes: signed integer overflow: -2515507630940093440 * 4 cannot be represented in type 'long'
Fixes: 46318/clusterfuzz-testcase-minimized-ffmpeg_dem_GENH_fuzzer-5009637474172928

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-21 22:42:20 +02:00
Michael Niedermayer
6007d5688c avformat/demux: Use unsigned to check duration vs duration_text
Fixes: signed integer overflow: 9223371898743775808 - -138111000000 cannot be represented in type 'long'
Fixes: 46245/clusterfuzz-testcase-minimized-ffmpeg_dem_OGG_fuzzer-5075129786302464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-21 22:42:20 +02:00
Stefano Sabatini
83e1a1de88 doc/ffprobe: clarify that the input file is not optional
Fix trac issue http://trac.ffmpeg.org/ticket/9562
2022-04-21 12:34:04 +05:30
Stefano Sabatini
0059c7c07d doc/ffplay: put keystrokes to decrease and increase volume on the same line
Fix trac issue http://trac.ffmpeg.org/ticket/7832
2022-04-21 12:28:05 +05:30
Tristan Matthews
25d3f96db7 librtmp: use AVBPrint instead of char *
This avoids having to do one pass to calculate the full length to allocate
followed by a second pass to actually append values.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-04-19 23:19:16 +03:00
Paul B Mahol
b9e75c1862 avfilter/vf_ciescope: add option to disable CIE tongue filling 2022-04-19 22:08:15 +02:00
Paul B Mahol
da4b7c2be4 avfilter/vf_ciescope: little optimizations 2022-04-19 20:32:23 +02:00
Paul B Mahol
8b717a4044 avfilter/avf_ahistogram: set time_base to outlink
And rescale timestamps.
2022-04-19 19:22:40 +02:00
Timo Rothenpieler
b2823333d5 doc: fix css file install for out-of-tree builds 2022-04-19 13:04:42 +02:00
Paul B Mahol
d41f85235d avfilter/avf_avectorscope: set time_base to outlink
And rescale timestamps.
2022-04-18 20:24:54 +02:00
Paul B Mahol
9f73c40d32 avfilter/avf_showvolume: set time_base to outlink
And rescale timestamps.
2022-04-18 20:24:54 +02:00
Timo Rothenpieler
d5687236ab doc: install css files along html docs 2022-04-18 12:55:32 +02:00
Paul B Mahol
4e98cc29f4 avfilter/vf_feedback: add missing .process_command 2022-04-15 18:57:36 +02:00
Paul B Mahol
391ce570c8 avfilter: add pixelize video filter 2022-04-14 22:37:21 +02:00
Paul B Mahol
7e81295488 avfilter: add feedback video filter 2022-04-14 22:29:46 +02:00
Paul B Mahol
a34fe3dfa9 avfilter/avf_showspectrum: fix pts offset by one 2022-04-14 22:26:54 +02:00
Andreas Rheinhardt
fe2eb9760f fate/oma: Use REMUX where appropriate
Simplifies the checks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:40:30 +02:00
Andreas Rheinhardt
c3b2bee589 fate/subtitles: Use REMUX where appropriate
It also adds the missing depenencies on the file and pipe protocols
and the framecrc muxer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:39:57 +02:00
Andreas Rheinhardt
c4c38d2d14 fate/image: Use TRANSCODE where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:39:35 +02:00
Andreas Rheinhardt
7297b17a84 tests/Makefile: Add auxiliary functions for transcode and stream_remux
Tests using the transcode and stream_remux functions have some common
requirements (namely the file and pipe protocols as well as the framecrc
muxer) and also other commonalities: The create a file and read it
immediately afterwards, so that they typically rely on a corresponding
muxer+demuxer pair which typically shares the same name; for transcode
(if it does not use stream copy) the same is true for encoders and
decoders. This means that using special Makefile-functions instead
of the general ALLYES is worthwhile. This commit adds such functions.

These functions allow to add arbitrary CONFIG-checks on top of the
aforementioned ones in order to satisfy special needs (for e.g. parsers,
filters) that several intended users have.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:38:55 +02:00
Andreas Rheinhardt
202da3bf48 avcodec/mjpegenc: Don't unnecessarily grow buffer
The size of the ICC chunk has already been accounted for when
the packet's buffer was initially set in ff_mpv_encode_picture()
and the header (including the ICC chunk) has already been written
at this point.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:38:55 +02:00
Andreas Rheinhardt
f703cbabdb avcodec/mpegvideo_enc: Remove always-true check
It is a remnant of the old way for user-supplied buffers;
it is always-true since 93016f5d1d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:38:55 +02:00
Andreas Rheinhardt
c3047da646 avcodec/mpegvideo_enc: Fix unnecessary linear growth of buffer
If one encodes MJPEG with a single slice and uses input with
AV_FRAME_DATA_ICC_PROFILE side data, the current allocation code
in ff_mpv_encode_picture() will always increase the size of the
temporary buffer used for allocating packets by the size needed
for to write the ICC chunk even when the current buffer is actually
large enough. This commit fixes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:38:55 +02:00
Andreas Rheinhardt
4487dd8bb5 avcodec/mpegvideo_enc: Ignore ICC profile size when not MJPEG
MJPEG is the only mpegvideo-based encoder making use of it.
Fixes linking failures in case mpegvideo_enc.c is compiled
with AMV, LJPEG and MJPEG encoders disabled.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:38:55 +02:00
Paul B Mahol
1764a6887b avfilter/avf_showspectrum: add alpha pixel format support 2022-04-14 17:29:14 +02:00
Mark Gaiser
ea84eb2db1 avformat/ipfsgateway: define PATH_MAX
PATH_MAX is posix. Some compilers (MSVC) don't define this
thus failing to compile the ipfsgateway file.
Defining it fixes the compile.

Signed-off-by: Mark Gaiser <markg85@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-04-14 10:52:21 +03:00
Paul B Mahol
bf6735e945 avfilter/af_adenorm: simplify handling of commands 2022-04-13 22:02:47 +02:00
Paul B Mahol
24144af2dd avfilter/avf_showvolume: check for allocation error and stop leaks 2022-04-13 18:24:25 +02:00
Andreas Rheinhardt
fa3f9f2f6a avcodec/avcodec: Don't reset decoder-fields for encoders when flushing
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 18:04:25 +02:00
Andreas Rheinhardt
f6e167998f avcodec/avcodec: Simplify accessing AVSubtitleRect via dedicated pointer
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 18:03:40 +02:00
Andreas Rheinhardt
3649051dc4 avcodec/avcodec: Avoid av_frame_unref(NULL)
It works, but it is not documented to work.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 18:03:25 +02:00
Andreas Rheinhardt
3a920372a1 avcodec/encode: Fix check for encoders impl. encode-simple API
FFCodec.cb is a union.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 17:59:34 +02:00
Paul B Mahol
f67403edb3 avcodec/mlpenc: fix encoding after receiving last frame
This happened when major header needed to be written
after input EOF.
2022-04-13 14:22:39 +02:00
Anton Khirnov
e663030267 lavc/encode: pick a sane default for bits_per_raw_sample if it's not set
Fixes #9563.
2022-04-13 12:48:19 +02:00
Anton Khirnov
ee26138e67 lavc/encode: reindent 2022-04-13 12:48:18 +02:00
Anton Khirnov
15975881ae lavc/encode: factor audio/video-specific parts out of ff_encode_preinit() 2022-04-13 12:45:47 +02:00
Anton Khirnov
ce3c20f2aa lavc: move default get_buffer2() to its own file
It is also used by some encoders, so decode.c is not the right place for
it.
2022-04-13 12:15:02 +02:00
Anton Khirnov
32413600e8 lavc/encode: drop EncodeSimpleContext
It has only a single member.
2022-04-13 12:14:30 +02:00
Anton Khirnov
1c01dca144 lavc/avcodec: only allocate the encoding frame for encoders
And only when needed, i.e. for encoders using the simple API.
2022-04-13 12:14:08 +02:00
Anton Khirnov
7efa6418b8 lavc/avcodec: simplify codec id/type validity checking
On entry to avcodec_open2(), the AVCodecContext type and id either have
to be UNKNOWN/NONE or have to match the codec to be used.
2022-04-13 12:13:15 +02:00
Anton Khirnov
4a7c8bb3d8 fftools/ffmpeg: store output format separately from the muxer context
Allows accessing it without going through the muxer context. This will
be useful in the following commits, where the muxer context will be
hidden.
2022-04-13 12:07:54 +02:00
Anton Khirnov
5c66ee6351 fftools/ffmpeg: move freeing the output file to ffmpeg_mux.c 2022-04-13 12:07:54 +02:00
Anton Khirnov
5bc644ea8a fftools/ffmpeg: move writing the trailer to ffmpeg_mux.c 2022-04-13 12:07:54 +02:00