Commit Graph

96522 Commits

Author SHA1 Message Date
Gyan Doshi fa677750de doc/ffmpeg: document value source for -force_key_frames
Also clarify behaviour in case of specified timestamps
2020-01-05 10:53:46 +05:30
Sebastian Pop c3a17ffff6 swscale/aarch64: use multiply accumulate and shift-right narrow
This patch rewrites the innermost loop of ff_yuv2planeX_8_neon to avoid zips and
horizontal adds by using fused multiply adds. The patch also uses ld1r to load
one element and replicate it across all lanes of the vector. The patch also
improves the clipping code by removing the shift right instructions and
performing the shift with the shift-right narrow instructions.

I see 8% difference on an m6g instance with neoverse-n1 CPUs:
$ ffmpeg -nostats -f lavfi -i testsrc2=4k:d=2 -vf bench=start,scale=1024x1024,bench=stop -f null -
before: t:0.014015 avg:0.014096 max:0.015018 min:0.013971
after:  t:0.012985 avg:0.013013 max:0.013996 min:0.012818

Tested with `make check` on aarch64-linux.

Signed-off-by: Sebastian Pop <spop@amazon.com>
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-04 20:59:31 +01:00
Limin Wang ebbc976ae6 avcodec/bsf: replace ctx->internal-> with bsfi-> for better readability
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-04 20:59:31 +01:00
Carl Eugen Hoyos f7c945abc0 doc: Fix a typo. 2020-01-04 20:58:10 +01:00
Jun Zhao 304eaa63a9 lavfi/buffersrc: Remove redundant free after ff_filter_frame() failure
ff_filter_frame() always frees the frame in case of error, so we don't
need to free the frame after ff_filter_frame() fails.

Fix CID 1457230.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-04 19:37:39 +01:00
Paul B Mahol 389865352d avfilter/af_dynaudnorm: fix another clipping with custom peak value
This always happened at start with alternative boundary mode disabled.
The clipping only occurred if starting samples where high enough.
2020-01-04 19:34:50 +01:00
Paul B Mahol c8253cb332 avfilter/af_dynaudnorm: implement threshold option 2020-01-04 18:17:32 +01:00
Paul B Mahol 6a1305e8b7 avfilter/af_dynaudnorm: do not clip audio
Clipping can happen when smoothed gain is higher than maximum
allowed gain factor for current frame and peak value option is
set to enough low value.
2020-01-04 10:27:46 +01:00
Jun Zhao 3c8da7b982 libavutil/opt: fix memory leak after av_dict_parse_string fail
In case of failure, all the successfully set entries are stored in
*pm. We need to manually free the created dictionary to avoid
memory leak.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-04 09:05:23 +08:00
Jun Zhao c8e72a6494 lavfi/coreimage: fix memory leak after av_dict_parse_string fail
In case of failure, all the successfully set entries are stored in
*pm. We need to manually free the created dictionary to avoid
memory leak.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-04 09:05:09 +08:00
Jun Zhao cf9c9a9db9 lavc/libkvazaar: fix memory leak after av_dict_parse_string fail
In case of failure, all the successfully set entries are stored in
*pm. We need to manually free the created dictionary to avoid
memory leak.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-04 09:04:58 +08:00
Jun Zhao 0099f71502 lavc/bsf: fix memory leak after av_dict_parse_string fail
In case of failure, all the successfully set entries are stored in
*pm. We need to manually free the created dictionary to avoid
memory leak.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-04 09:03:30 +08:00
Marton Balint 944203270d avdevice/decklink: deprecate the -list_devices option
The user should use ffmpeg -sources decklink or ffmpeg -sinks decklink instead.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 18:13:22 +01:00
Marton Balint 2b7097ef27 avdevice/decklink_dec: remove -bm_v210 option
Deprecated since Sep 28, 2017.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 18:13:22 +01:00
Marton Balint 78a233e6e9 avdevice/decklink_dec: remove the @mode syntax
Deprecated since March 28, 2017.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 18:13:22 +01:00
Marton Balint d111a41f9d avformat/img2enc: fix writing multiple streams in write_muxed_file
Maybe we should just reject multiple streams for the image2 muxer instead?

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 11:23:55 +01:00
Marton Balint beb7f93b23 avformat/img2enc: minor simplification
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 11:23:55 +01:00
Marton Balint 57df8839e1 avformat/img2enc: cleanup IO contexts on error
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 11:23:55 +01:00
Marton Balint 43d5ddb4b5 avformat/img2enc: reindent after last commit
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 11:23:55 +01:00
Marton Balint 04e36fc4e1 avformat/img2enc: factorize piped write_packet
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 11:23:55 +01:00
Marton Balint b693b06b22 avformat/img2enc: factorize writing fully muxed file
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 11:23:55 +01:00
Marton Balint bc17b831dd doc/muxers: fix order of options and examples for image2 muxer
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-03 11:23:55 +01:00
Paul B Mahol 81172b5e3a avfilter/af_dynaudnorm: fix previous commit
We still need to analyze frame for amplification at EOF.
2020-01-02 17:24:01 +01:00
Paul B Mahol ed02563ce0 avfilter/af_dynaudnorm: do not enqueue flush buffers 2020-01-02 16:28:38 +01:00
Zhong Li 12c4d00c10 avcodec/mpeg12dec: always submit the first field to hwaccel
Though this patch to fix ticket #6668, I belive it
is unnecessary to set SLICE_FLAG_ALLOW_FIELD flag to other
hwaccels(dxva, vdpau, etc). Please also refer the orginal comment
of 9cb150c9ab

Should also fix ticket #8442.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-01-02 13:29:46 +01:00
Timo Rothenpieler d4996a600c avcodec/nvdec_mpeg12: set field flags 2020-01-02 13:15:27 +01:00
Marton Balint e47a954631 avcodec/librav1e: use AV_OPT_TYPE_DICT for rav1e-params
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-01 21:22:11 +01:00
Marton Balint a613d042e7 avcodec/libxavs2: use AV_OPT_TYPE_DICT for xavs2-params
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-01 21:22:11 +01:00
Marton Balint 91f64ea4c5 avcodec/libx265: use AV_OPT_TYPE_DICT for x265-params
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-01 21:22:09 +01:00
Marton Balint dfea6d2e50 avcodec/libx264: use AV_OPT_TYPE_DICT for x264-params
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-01 20:41:34 +01:00
Marton Balint 9ac1066dc6 avcodec/libvpxenc: use AV_OPT_TYPE_DICT for ts-parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-01 20:41:34 +01:00
Marton Balint 710e9f3f18 avformat/tee: use AV_OPT_TYPE_DICT for fifo_options
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-01 20:41:34 +01:00
Marton Balint 7c3125133f avformat/segment: use AV_OPT_TYPE_DICT for segment_format_options
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-01 20:41:34 +01:00
Marton Balint 5d35a6e8e2 avformat/hlsenc: use AV_OPT_TYPE_DICT for hls_ts_options
Simplifies code and avoids memory leaks.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-01 20:41:34 +01:00
Marton Balint f20bdbff6d avformat/fifo: use AV_OPT_TYPE_DICT for format_opts
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-01 20:41:34 +01:00
Marton Balint 59172164f3 avformat/dashenc: use AV_OPT_TYPE_DICT for format_options
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-01 20:41:34 +01:00
James Almer 3670a10c2d avcodec/libx265: export encoded frame stats
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 66b6005301894823052b437a950003ffbe3ba6de)
2020-01-01 13:50:39 -03:00
James Almer 278a91f8fe avcodec/libx265: add a qp option and apply the relevant global AVCodecContext settings to the encoder context
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-01 13:48:02 -03:00
James Almer 3c22436ddf avcodec/libx265: apply some global AVCodecContext settings to the encoder context
There's no reason to ignore them if set.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-01 13:25:18 -03:00
Andreas Rheinhardt 40d9cbdc22 avformat/matroskadec: Use AV_DICT_DONT_STRDUP_VAL to save av_strdup
This will likely also fix CID 1452562, a false positive resulting from
Coverity thinking that av_dict_set() automatically frees its key and
value parameters (even without the AV_DICT_DONT_STRDUP_* flags).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-01 16:38:28 +01:00
Andreas Rheinhardt 34e3810b04 avformat/matroskaenc: Check return value of ff_isom_write_hvcc()
The Matroska muxer currently does not check the return value of
ff_isom_write_hvcc(), the function used to write mp4-style
HEVC-extradata as Matroska also uses it. This was intentionally done in
7a5356c72 to allow remuxing from mpeg-ts.

But if ff_isom_write_hvcc() fails, it has not output anything and the
file ends up without CodecPrivate and, if the input was Annex B, with
Annex B data, which is against the spec. So check the return value
again.

The underlying issue of not having extradata seems to have been fixed by
the introduction of the extract_extradata bitstream filter.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: "mypopy@gmail.com" <mypopy@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-01 16:38:28 +01:00
Andreas Rheinhardt 2968da7d9e avformat/matroskaenc: Adapt documentation of put_ebml_num
to its actual behaviour: That it uses the least amount of bytes unless
overridden.

The current documentation leaves it undefined how many bytes will be used
when no number to use has been given explicitly. But several estimates
(used to write EBML Master elements with a small length field) require
this number to be the least amount of bytes to work. Therefore change
the documentation; and remove a comment about writing length fields
indicating "unkown length". It has been outdated since 0580a122.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-01 16:38:28 +01:00
Andreas Rheinhardt 6d354aeb29 avformat/mpeg: Remove secondary packet for reading VobSub
When vobsub_read_packet() reads a packet, it uses a dedicated AVPacket
to get the subtitle timing and position from an FFDemuxSubtitlesQueue
(which has been filled with this data during reading the idx file in
vobsub_read_header); afterwards the actual subtitle data is read into
the packet destined for output and the timing and position are copied
to this packet. Afterwards, the local packet is unreferenced.

This can be simplified: Simply use the output packet to get the timing
and position from the FFDemuxSubtitlesQueue. The packet's size will be
zero afterwards, so that it can be directly used to read the actual
subtitle data. This makes copying the packet fields as well as
unreferencing the local packet unecessary and also removes an instance
of usage of sizeof(AVPacket) in libavformat.

The only difference is that the returned packet will already be flagged
as a keyframe. This currently only happens in compute_pkt_fields().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-01 16:38:28 +01:00
Matt Oliver 1fd8929450 compat/avisynth: Fix unicode compilation.
Reviewed-by: Stephen Hutchinson <qyot27@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-01 16:38:28 +01:00
Paul B Mahol d4d6280ab2 avfilter/af_dynaudnorm: do not hang forever if only EOF is received 2020-01-01 13:44:22 +01:00
Paul B Mahol 7bb09e57e0 avfilter/af_dynaudnorm: do not error out if even filter size was given
Instead issue a warning and make filter size odd number.
2020-01-01 13:44:22 +01:00
Jun Zhao d7e2a2bb35 lavf/libsrt: add version guard for srt encryption control
add version guard for srt encryption control. and use
SRTO_STRICTENC(53) for compatibility.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-01 19:35:53 +08:00
Gyan Doshi 7b58702cbd configure: bump year 2020-01-01 12:14:30 +05:30
Michael Niedermayer a15d904ad7 avcodec: Replace get_bits_long() by get_bits() where possible
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer 9a8471e3f0 avformat/oggparsetheora: Replace get_bits_long() by get_bits() where possible
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00