1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

95877 Commits

Author SHA1 Message Date
Paul B Mahol
6a38538a09 avfilter/vf_avgblur: add support for 12bit yuva formats 2019-11-18 17:27:42 +01:00
Paul B Mahol
1b26f27026 avfilter/vf_gblur: add support for 12bit yuva formats 2019-11-18 17:26:59 +01:00
Paul B Mahol
97cf49b7fe avfilter/vf_median: add support for 12bit yuva formats 2019-11-18 17:24:52 +01:00
Paul B Mahol
f490c71553 avfilter/vf_remap: add support for 12bit yuva format 2019-11-18 17:21:09 +01:00
Paul B Mahol
410f81f822 avfilter/vf_lut2: add 12bit depth alpha formats 2019-11-18 17:15:29 +01:00
Paul B Mahol
a50bd3a50e avfilter/vf_atadenoise: support alpha formats 2019-11-18 17:06:59 +01:00
Paul B Mahol
73b730e3e6 avfilter/vf_xmedian: add support for alpha formats 2019-11-18 17:06:05 +01:00
Gyan Doshi
f897d8c863 doc/filters: improve libvmaf section
Added default values, correct strings for default model path and pool
method.
2019-11-18 19:32:07 +05:30
Gyan Doshi
d831edc387 avdevice/decklink: add option to drop frames till timecode is seen
Option wait_for_tc only takes effect if tc_format is set
2019-11-18 10:01:03 +05:30
Andreas Rheinhardt
cda3e8ca04 avcodec/cbs: Fix potential overflow
The number of bits in a PutBitContext must fit into an int, yet nothing
guaranteed the size argument cbs_write_unit_data() uses in init_put_bits()
to be in the range 0..INT_MAX / 8. This has been changed.

Furthermore, the check 8 * data_size > data_bit_start that there is
data beyond the initial padding when writing mpeg2 or H.264/5 slices
could also overflow, so divide it by 8 to get an equivalent check
without this problem.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-11-17 23:31:45 +00:00
Andreas Rheinhardt
7c92eaace2 avcodec/cbs: Factor out common code for writing units
All cbs-functions to write units share a common pattern:
1. They check whether they have a write buffer (that is used to store
the unit's data until the needed size becomes known after writing the
unit when a dedicated buffer will be allocated).
2. They use this buffer for a PutBitContext.
3. The (codec-specific) writing takes place through the PutBitContext.
4. The return value is checked. AVERROR(ENOSPC) here always indicates
that the buffer was too small and leads to a reallocation of said
buffer.
5. The final buffer will be allocated and the data copied.

This commit factors this common code out in a single function in cbs.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-11-17 23:31:44 +00:00
Andreas Rheinhardt
5d8d9e032c avformat/flacdec: Remove useless packet
flac_read_timestamp() applied av_init_packet() to a packet (which
initializes all fields of the packet except for data and size) and then
went on to use only the data and size fields. In other words: Said
packet can be removed and replaced by an uint8_t * and an int.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-17 23:44:17 +01:00
Carl Eugen Hoyos
56f25c11a9 lavf/Makefile: Specify sln demuxer requirements.
Mentioned in ticket #8378.
2019-11-17 23:40:14 +01:00
Carl Eugen Hoyos
ce8faea9fd configure: Add fft dependency for showspatial filter.
Mentioned in ticket #8378.
2019-11-17 23:29:23 +01:00
Carl Eugen Hoyos
8038a87d49 configure: Add fft dependency for headphone filter.
Mentioned in ticket #8378.
2019-11-17 23:24:38 +01:00
Nomis101
5e0a3278bb avcodec: Add more kCVImageBufferColorPrimaries to videotoolboxenc
Signed-off-by: Rick Kern <kernrj@gmail.com>
2019-11-17 16:30:15 -05:00
Paul B Mahol
315a4496ea avfilter/f_loop: switch aloop to activate 2019-11-17 16:20:58 +01:00
Paul B Mahol
2e7ccd493a avfilter/f_loop: fix pts handling when timebase and 1/samplerate differ 2019-11-17 16:19:07 +01:00
Paul B Mahol
f7ad9a6c16 avfilter/af_sidechaincompress: fix pts handling when timebase and 1/samplerate differ 2019-11-17 12:30:10 +01:00
Paul B Mahol
b66acf4a34 avfilter/af_anlmdn: fix pts handling when timebase and 1/samplerate differ 2019-11-17 12:25:54 +01:00
Paul B Mahol
0a17a30150 avfilter/af_agate: fix pts handling when timebase and 1/samplerate differ 2019-11-17 12:23:48 +01:00
Paul B Mahol
115537f487 avfilter/af_afftdn: fix pts handling when timebase and 1/samplerate differ 2019-11-17 12:21:10 +01:00
Paul B Mahol
c588a0f528 avfilter/af_afftfilt: fix pts handling when timebase and 1/samplerate differ 2019-11-17 12:19:39 +01:00
Paul B Mahol
7db61bf0e3 avfilter/af_adeclick: fix pts handling when timebase and 1/samplerate differ 2019-11-17 12:17:51 +01:00
Paul B Mahol
90622f9e8f avfilter/af_aecho: switch to activate 2019-11-17 11:57:52 +01:00
Gyan Doshi
b741a84a15 doc/APIchanges: update for av_expr_count_vars 2019-11-17 11:09:13 +05:30
Gyan Doshi
1c23abc88f avutil/eval: add function to track variable use
1)Some filters allow cross-referenced expressions e.g. x=y+10. In
such cases, filters evaluate expressions multiple times for
successful evaluation of all expressions. If the expression for one or
more variables contains a RNG, the result may vary across evaluation
leading to inconsistent values across the cross-referenced expressions.

2)A related case is circular expressions e.g. x=y+10 and y=x+10 which
cannot be succesfully resolved.

3)Certain filter variables may only be applicable in specific eval modes
and lead to a failure of evaluation in other modes e.g. pts is only
relevant for frame eval mode.

At present, there is no reliable means to identify these occurrences and
thus the error messages provided are broad or inaccurate. The helper
function introduced - av_expr_count_vars - allows developers to identify
the use and count of variables in expressions and thus tailor the error
message, allow for a graceful fallback and/or decide evaluation order.
2019-11-17 11:07:05 +05:30
Jun Zhao
487e7e9670 lavf/rtmpproto: fix the playpath truncation if the len > 512
fix the playpath truncation if the len > 512

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Found-by: liuwenhuang <liuwenhuang@tencent.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-11-17 09:09:38 +08:00
Timo Rothenpieler
4fb6ce27f0 avcodec/nvenc: make sure newly allocated packets are refcounted
Fixes ticket 8383

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-11-17 01:37:34 +01:00
Carl Eugen Hoyos
eeab18329f lavc/libopencore-amr: Silence a warning about an unused function. 2019-11-17 00:35:14 +01:00
Paul B Mahol
9498ce0c23 avfilter/vf_framepack: really fix ef466a8b29 2019-11-17 00:23:03 +01:00
Paul B Mahol
9db24ee26d avfilter/vf_framepack: switch to activate 2019-11-17 00:23:03 +01:00
Limin Wang
c22665ae69 avformat/mp3dec: Check for occurances of headers within frames during probing
Fixes misdetection of zYLx.wav

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-16 23:40:39 +01:00
Michael Niedermayer
e9a335150a avformat/mp3dec: Check that the frame fits within the probe buffer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-16 23:38:43 +01:00
Paul B Mahol
ef466a8b29 avfilter/vf_framepack: fix timestamps for frameseq format 2019-11-16 23:33:02 +01:00
Paul B Mahol
d52342a563 avfilter/vf_framepack: add missing filtering flag 2019-11-16 23:33:02 +01:00
Michael Niedermayer
ec3d8a0e69 avcodec/mjpeg_parser: Make parser a bit more robust with unclean input
Helps: test_roman.mjpeg (note this is not really just mjpeg)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-16 22:04:54 +01:00
Andreas Rheinhardt
27522fb64c avcodec/put_bits: Relax requirements to rebase PutBitContext
The earlier requirement was for the new buffer to be bigger than the old
one. This has been relaxed to only demand that the new buffer can hold
all the data written so far. This is in preparation for further commits.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-16 20:57:45 +01:00
Zhao Zhili
57db9f488f avformat/mov: fix typo in help text
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-16 20:57:45 +01:00
James Almer
81d54531f7 avformat/av1dec: simplify annexb_probe()
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-16 15:56:36 -03:00
James Almer
2703068110 avcodec/cbs_av1: fix reading reference order hint in skip_mode_params()
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-16 15:56:36 -03:00
Paul B Mahol
d7ffa4bd3e avcodec/codec_desc: add mising .type for acelp.kelvin 2019-11-16 15:06:20 +01:00
Michael Niedermayer
bfa8272f40 vcodec/agm: Alloc based on coded dimensions
Fixes: out of array read
Fixes: 18715/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5659333417500672

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>
2019-11-15 21:31:43 +01:00
James Almer
73ee53f317 avcodec/encode: add missing assert to avcodec_receive_packet()
Encoders must return reference counted packets.

This was checked only for encoders using the AVCodec->encode2() API, while
blindly accepting whatever encoders using the AVCodec->receive_packet() API
were returning.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-14 12:30:51 -03:00
Andreas Rheinhardt
f01f9f1793 avformat/av1dec: Redo flushing of bsf
The current approach has two different calls to av_bsf_send_packet():
A normal one, sending a packet; and an extraordinary one just for
flushing. These can be unified into one by making use of the newly
documented fact that av_bsf_send_packet() allows to signal flushing via
empty packets (i.e. packets without data and side-data).

This also fixes CID 1455685 which resulted from the fact that the call
for flushing was not checked given that it couldn't fail.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-14 12:02:51 -03:00
Andreas Rheinhardt
41b05b849f avcodec/avcodec: Adapt the doc of av_bsf_send_packet to match its actual implementation.
Explicitly allowing empty packets to signal flushing helps getting rid
of special cases. It does not hinder the ability to send i.e.
timing-only packets, because one can send packets with zero size and
pkt->data set.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-14 12:02:41 -03:00
Andreas Rheinhardt
a7245adee3 avformat/id3v2: Avoid av_strdup for key and value of dict
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-13 23:35:21 +01:00
Michael Niedermayer
8d5f9daacd tests/ref/vsynth: add missing reference files, fix build 2019-11-13 23:34:56 +01:00
Derek Buitenhuis
1354c39c78 librav1e: Don't make users explicitly set -qp -1 to use bit rate mode
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2019-11-13 18:00:51 +00:00
Baptiste Coudurier
a1403032c8 avcodec/dvenc: support encoding dvcprohd 2019-11-13 09:08:43 -08:00