Commit Graph

101014 Commits

Author SHA1 Message Date
Paul B Mahol
a00ff56321 avfilter/vf_lut: add support for commands
While here remove excessive log and uninit() call in negate_init().
2021-02-08 16:37:23 +01:00
Paul B Mahol
dd01165f19 avfilter/vf_deband: add support for commands 2021-02-08 16:10:51 +01:00
Paul B Mahol
178a0d6f7d avfilter/vf_deband: avoid doubles 2021-02-08 16:10:51 +01:00
Andreas Rheinhardt
8d21eccd26 avcodec/g722enc: Validate parameters before using them
In case trellis is outside of 0..23, an invalid shift and/or a signed
integer overflow happens; furthermore, it can lead to the request to
allocate nonsense amounts of memory. So validate first.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-08 13:27:22 +01:00
Paul B Mahol
a773455c4f avfilter/vf_thumbnail: add support for rest of packed rgb formats 2021-02-08 13:01:28 +01:00
Paul B Mahol
3b65c848a6 avfilter/vf_thumbnail: add support for YUV and GBRP formats 2021-02-08 12:45:49 +01:00
Anton Khirnov
cc4feff861 vf_pp: remove unnecessary free
ff_qp_table_extract() frees the table on failure.

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-08 11:06:29 +01:00
Anton Khirnov
fffc35b870 mjpegdec: stop setting the QP table
MJPEG does not have a single quantiser scale, so this does not fit into
the intended API use.

This removes the last use of the long-deprecated QP table API.
2021-02-08 11:06:10 +01:00
Paul B Mahol
89f78dd0fe avfilter/vf_lut3d: lut3d, haldclut: add support for commands 2021-02-08 00:55:07 +01:00
Paul B Mahol
5f592136eb avfilter/vf_lut2: add support for commands 2021-02-07 22:41:49 +01:00
Paul B Mahol
629dd8efb5 avfilter/vf_extractplanes: add float formats support 2021-02-07 21:45:26 +01:00
Marton Balint
cae57cae1f avformat/libsrt: fix race condition with libsrt_network_wait_fd and epoll
The way SRT's async / epoll-based IO works is that the event status is stored
in the epoll containers. That is, if an event occurs on an SRT socket, and that
SRT socket isn't part of any epoll container, then that event is lost. If we
later add that socket to an epoll container, we still won't receive the event
even if it wasn't serviced.

Therefore we create the epoll and put the fd into it right after the connection
is established.

See http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2021-January/275334.html

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-02-07 19:42:22 +01:00
Marton Balint
5cf01ed5cd avformat/libsrt: fix or simplify some function return values
Sometimes there was a confusion between srt_*() function return values and
libavformat-style return values.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-02-07 19:42:22 +01:00
Marton Balint
d4e4ffd348 avformat/libsrt: close listen fd immediately after accept
There is no reason to keep it open.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-02-07 19:42:22 +01:00
Paul B Mahol
bd5226704a avfilter: add colorize filter 2021-02-07 11:48:28 +01:00
Andreas Rheinhardt
134193a2ff avcodec/ac3enc: Share options and defaults
Both AC-3 encoder share the same options, yet they are nevertheless
duplicated in the binary; and the options applying to the EAC-3 encoder
are a proper subset of the options for the AC-3 encoders, so that it can
use the same options as the former by putting the options specific to
AC-3 at the front. This commit implements this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-07 10:30:14 +01:00
Andreas Rheinhardt
bdd55e1dd8 avcodec/Makefile: Remove dependency for nonexistent files
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-07 10:29:19 +01:00
Andreas Rheinhardt
698a4b22d0 avcodec/aacdec_fixed: Move fixed-point sinewin tables to its only user
The fixed-point AAC decoder is the only user of the fixed-point sinewin
tables from sinewin; and it only uses a few of them (about 10% when
counting by size). This means that guarding initializing these tables by
an AVOnce (as done in 3719122065) is
unnecessary for them. Furthermore the array of pointers to the
individual arrays is also unneeded.

Therefore this commit moves these tables directly into aacdec_fixed.c;
this is done by ridding the original sinewin.h and sinewin_tablegen.h
headers completely of any fixed-point code at the cost of a bit of
duplicated code (the alternative is an ugly ifdef-mess).

This saves about 58KB from the binary when using hardcoded tables (as
these tables are hardcoded in this scenario); when not using hardcoded
tables, most of these savings only affect the .bss segment, but the rest
(< 1KB) contains relocations (i.e. savings in .data.rel.ro).

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-07 10:28:29 +01:00
Andreas Rheinhardt
3044d0efee ffbuild/common: Make deletion of templates possible
If a target to be built includes a template file, the target's .d file
includes the template file as a prerequisite; if the code were changed so
that the template file no longer exists, one would get an error from
make that it has no rule for the template file target. Therefore add a
dummy rule for template files to make deleting them possible.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-07 09:45:04 +01:00
Paul B Mahol
a52b9464e4 doc/general_contents: add few more entries
Also extend description of some entries.
2021-02-07 00:01:12 +01:00
Andriy Gelman
8e0a4d2d4d avdevice/xcbgrab: don't assume xserver endianness
xserver defines the endianness of the grabbed images. Use this information
to set the correct pixel format.

This also fixes format selection in configuration depth=32/bpp=32 with
xserver on a little endian machine. Before the patch, the big endian
layout 0RGB was always selected which is incorrect because BGR0 should
be used. RGB24 was also incorrectly assumed (but this format was removed
in xserver 1.20).

The big-endian settings can be tested using docker+qemu from a little-endian
machine:

$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
$ docker run --rm -it -v /tmp:/tmp powerpc64/debian /bin/bash

In docker container
$ apt-get update
$ apt-get install xvfb
$ apt-get install x11-apps

To test AV_PIX_FMT_0RGB32
$ Xvfb :2 -screen 0 720x480x24 &
$ export DISPLAY=:2
$ xclock -geometry 720x480 -bg green #test different colors

On your host machine grab the frames using the following
command. View output to check that colors are rendered correctly
$ ./ffmpeg -y -f x11grab -i :2.0 -codec:v mpeg2video out.mp4

Other pixel formats can be tested by modifying how Xvfb is started in the docker
container:

AV_PIX_FMT_RGB565
$ Xvfb :2 -screen 0 720x480x16

AV_PIX_FMT_RGB555
$ Xvfb :2 -screen 0 720x480x15

AV_PIX_FMT_BGR24 / AV_PIX_FMT_RGB24
This is difficult to test because bpp=24 support was removed in xserver 1.20
https://lists.x.org/archives/xorg-devel/2018-February/056175.html?hmsr=joyk.com&utm_source=joyk.com&utm_medium=referral
However, I was able to run previous version of Xvfb (with some
modifications to force 24bpp) to check that images are rendered correctly.

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2021-02-06 11:42:12 -05:00
Paul B Mahol
4b2968d305 avfilter/vf_deblock: add support for commands 2021-02-06 15:26:39 +01:00
Paul B Mahol
d8181cbbc4 avfilter/vf_lut3d: lut1d: add support for commands 2021-02-06 12:47:21 +01:00
Paul B Mahol
feea20e994 avfilter/vf_tile: remove extra whitespace in option description 2021-02-06 11:40:59 +01:00
Paul B Mahol
6317d40d08 avfilter/avfilter: move enable_str expression parsing into avfilter_init_dict()
This ensures that needed arrays are always allocated and properly initialized.

Previously if code would use only avfilter_init_dict() to set options for filters
it would not allocate arrays for timeline processing thus it would crash if
user supplied enable option for filter(s).
2021-02-06 11:40:59 +01:00
Paul B Mahol
d0a24bfad1 avfilter/vf_mix: add support for commands 2021-02-06 11:34:28 +01:00
Paul B Mahol
3583d2a837 avfilter/vf_mix: add timeline support 2021-02-06 11:34:28 +01:00
Paul B Mahol
e28b6e0448 avformat/img2dec: improve xbm probing 2021-02-05 22:37:34 +01:00
Gyan Doshi
d99cc17825 ffmpeg: add -fpsmax to clamp output framerate
Useful when encoding in batch or with aberrant inputs.
2021-02-05 22:54:18 +05:30
Paul B Mahol
6b8ef5119c avformat/cdxl: add back options to override sample and frame rate
It make sense to allow to control speed of playback when
no infomation is provided.
2021-02-05 18:11:42 +01:00
Paul B Mahol
2a2f685613 avcodec/xbm_parser: mark frame as intra only and as key frame 2021-02-05 15:49:13 +01:00
Paul B Mahol
4978512dcd avcodec/xbm_parser: split long line 2021-02-05 15:49:13 +01:00
Paul B Mahol
84d5df5446 avformat: add xbm_pipe demuxer 2021-02-05 15:36:19 +01:00
Paul B Mahol
7dfa98665c avcodec: add xbm parser 2021-02-05 15:35:29 +01:00
Paul B Mahol
d16293e76c avfilter/vf_lensfun: display list of possible values if user supplied none 2021-02-05 15:27:50 +01:00
Paul B Mahol
8b78eb312d avfilter/vf_lensfun: replace deprecated calls 2021-02-05 15:27:50 +01:00
Paul B Mahol
593817f51d avfilter/vf_frei0r: add timeline support 2021-02-05 13:18:21 +01:00
Gyan Doshi
5c8d4c4fac avfilter/drawbox: fix formatting after d64cbd4fda 2021-02-05 17:29:59 +05:30
Limin Wang
81c462ad95 avformat/mxfenc: prefer to use the configured metadata
The metadata company_name, product_name, product_version from input
file will be deleted to avoid overwriting information
Please to test with below commands:
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
and
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy \
        -metadata company_name="xxx" \
        -metadata product_name="xxx" \
        -metadata product_version="xxx" \
        out.mxf

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-05 09:27:06 +08:00
Limin Wang
9605307e78 avformat/mxf: add platform local tag
Please check the string of platform with below command:
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
./ffmpeg -i out.mxf
....
application_platform: Lavf (linux)

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-05 09:27:06 +08:00
Limin Wang
3f8db7eea0 avformat/mxfdec: set toolkit version metadata
Please check the string of toolkit version with below command:
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
./ffmpeg -i out.mxf
....
toolkit_version : 58.65.101.0.0

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-05 09:27:05 +08:00
Paul B Mahol
cba716f55e avformat/cdxl: improve frame rate guessing for standard cdxl
Use audio size and sample rate to get real frame rate.
Also make seeking more robust.
2021-02-05 00:43:11 +01:00
Paul B Mahol
fb9c56bbd5 avfilter/af_arnndn: add support for commands 2021-02-05 00:43:11 +01:00
Michael Niedermayer
996ef512fe tools/target_dec_fuzzer: Adjust threshold for interplayacm
Fixes: Timeout (long -> 1sec)
Fixes: 27439/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5145715814432768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-04 23:34:29 +01:00
Michael Niedermayer
842c268c64 avformat/4xm: Make audio_frame_count 64bit
Fixes: signed integer overflow: 2099257366 * 2 cannot be represented in type 'int'
Fixes: 27486/clusterfuzz-testcase-minimized-ffmpeg_dem_FOURXM_fuzzer-5112179134824448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-04 23:34:29 +01:00
Michael Niedermayer
4f70e1ec0c avformat/mov: Use av_mul_q() to avoid integer overflows
Fixes: signed integer overflow: 538976288 * 538976288 cannot be represented in type 'int'
Fixes: 27473/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5758978289827840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-04 23:34:29 +01:00
Michael Niedermayer
4dfb7ff528 avcodec/vp9dsp_template: Fix integer overflows in itxfm_wrapper
Fixes: signed integer overflow: 2147483641 + 32 cannot be represented in type 'int'
Fixes: 27452/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5078752576667648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-04 23:34:29 +01:00
Paul B Mahol
3d7ee5c91a avfilter/vf_blend: add support for commands 2021-02-04 21:44:31 +01:00
Paul B Mahol
89e2fbceee avcodec/utils: unbreak BINKAUDIO_DCT duration calculation 2021-02-04 17:54:13 +01:00
Paul B Mahol
5765149392 avfilter/af_amix: add sum option 2021-02-04 17:52:45 +01:00