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

96809 Commits

Author SHA1 Message Date
Paul B Mahol
ebc8806b9f avfilter/vf_v360: improve equirect_to_xyz() quality 2020-02-23 18:15:06 +01:00
James Almer
c48e5431c8 avcodec: add some documentation to the AVProducerReferenceTime struct
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-22 23:19:08 -03:00
James Almer
3d4510384d avcodec/libx264: add a check for the prft AVCodecContext export_side_data flag
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-22 23:19:07 -03:00
James Almer
d005a7cdfd avcodec: add an AVCodecContext flag to export PRFT side data on demand
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-22 23:19:07 -03:00
James Almer
c666689491 avcodec: add an AVCodecContext field to signal types of packet, frame, and coded stream side data to export
Add an initial mvs flag to is, analog to the export_mvs flags2 one.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-22 23:19:07 -03:00
James Almer
5dda6c173f avformat/dashenc: always attempt to enable prft in ldash mode
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-22 23:19:07 -03:00
James Almer
dbd02443ae avformat/dashenc: write a capture time Producer Reference Time element when none is provided by the encoder
This way, the element will be present in any scenario when the write_prft option is used.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-22 23:19:07 -03:00
James Almer
7098989e70 avformat/dashenc: write the styp box when the first frame of a segment is ready
This ensures it's written at the beginning of a segment in non streaming mode
when segment duration differs from fragment duration.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-22 23:19:07 -03:00
Dale Curtis
a0faf0db4f avformat/utils: Don't trigger errors for multiple id3 tags.
Such errors may make sense for specific formats, but general parsing
logic shouldn't be treating these as errors regardless of the error
recognition mode.

Fixes loading of the following wave when using -err_detect explode:
https://cs.chromium.org/chromium/src/third_party/blink/web_tests/external/wpt/webaudio/resources/4ch-440.wav

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-22 20:52:32 +01:00
Zane van Iperen
3de8ca21ab fate/adpcm: add adpcm_ima_apm tests
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-22 20:45:45 +01:00
Andreas Rheinhardt
c790500644 avformat/segafilmenc: Remove redundant checks
If an audio stream is present, the Sega FILM muxer checks for its
compability with the container during init, so that the very same check
needn't be repeated during writing the trailer.

Essentially the same is true for the presence of a video stream: It has
already been checked during init. Furthermore, after the check for the
presence of a video stream succeeded, a pointer is set to point to the
video stream. Yet said pointer (which was NULL before) will be
derefenced anyway regardless of the result of the check. Coverity thus
complained about this in CID 1434155 and removing this pointless check
will also fix this issue.

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>
2020-02-22 20:45:45 +01:00
Paul B Mahol
c116dd8468 avcodec/apedec: fix decoding 3800 version with 2000 compression level 2020-02-22 15:27:05 +01:00
Paul B Mahol
8e197a9638 avcodec/dxv: make prev variable unsigned 2020-02-22 00:15:43 +01:00
Michael Niedermayer
051d11f659 avcodec/pcm: Fix invalid shift in AV_CODEC_ID_PCM_LXF
Fixes: left shift of 233 by 24 places cannot be represented in type 'int'
Fixes: 20736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_LXF_fuzzer-4829212685107200

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>
2020-02-21 21:42:11 +01:00
Michael Niedermayer
d2aff350bc avcodec/cdtoons: Fix off by 4 check on diff_size
Fixes: out of array read
Fixes: 20742/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDTOONS_fuzzer-5738148607033344

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>
2020-02-21 21:42:11 +01:00
Michael Niedermayer
4c31db5a32 avcodec/cdtoons: Correct several end of data checks in cdtoons_render_sprite()
No testcases, found by code review when debuging issue found by oss-fuzz

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-21 21:42:11 +01:00
Paul B Mahol
553d836d62 avcodec/adpcm: cosmetics; reindent 2020-02-21 14:47:29 +01:00
Zane van Iperen
55af03dbb5 avformat: add demuxer for Rayman 2's APM format
Adds support for the APM file format used by Ubisoft's Rayman 2.

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-02-21 14:47:29 +01:00
Zane van Iperen
af65357207 avcodec: add decoder for Rayman 2's ADPCM variant
Adds support for the ADPCM variant used in Rayman 2's files.

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-02-21 14:46:19 +01:00
Anssi Hannula
56df8296f5 avformat/spdifenc: fix TrueHD streams over 48kHz
Commit 36e156bef0 ("avformat/spdifenc: fix handling of large TrueHD
frame") added an obviously incorrect bitshift that caused incorrect
samples-per-frame calculation for TrueHD streams over 48kHz.

Fix that.
2020-02-20 23:04:50 +02:00
Anssi Hannula
36e156bef0 avformat/spdifenc: fix handling of large TrueHD frames
The TrueHD IEC 61937 encapsulation code uses a very naive method of
always inserting 24 TrueHD frames evenly in a MAT frame. This does not
work for larger frames as they may exceed the size of 1/24th of a MAT
frame.

To fix that, use the input_timing field in the TrueHD frame to determine
the proper position of the TrueHD frame in the MAT frame. That field is
basically a dts field, telling the time to feed this frame to the
decoder in sample count units.

This can cause a TrueHD frame to be split between two MAT frames, so a
second concatenation hd_buf is added, alternating with the first buffer.

Large frames are preceded by smaller frames that have input_timing
values that cause the frames to be sent out faster than the nominal rate
(i.e. increasing decoder latency, long decoder buffer), allowing the
larger frames to then be sent out slower than the nominal rate as the
decoder has enough data buffered to keep it busy.
2020-02-20 22:18:18 +02:00
Anssi Hannula
1d5338e450 avformat/spdifenc: make hd_buf an array
This is preparation for adding a second hd_buf in a followup commit.

Also, slightly improve the comments for hd_buf_x members to clarify
which ones are actually used and kept up-to-date depending on which
codec is being muxed.
2020-02-20 21:54:03 +02:00
Paul B Mahol
a07b19d9af avformat/vivo: set packet duration
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2020-02-20 14:41:26 +01:00
Paul B Mahol
b4305d60f6 avformat/vivo: improve probing of some files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2020-02-20 14:41:26 +01:00
Paul B Mahol
464310c160 avcodec: add siren audio decoder 2020-02-20 14:41:26 +01:00
Nicolas George
26ae9c9f8a lavd/opengl_enc: check strings before parsing them.
Fix a segfault if OpenGL was not initialized before calling
write_header().
2020-02-20 14:37:11 +01:00
Nicolas George
fbb36d74ac lavd/opengl_enc: use proper context for logging.
Log as [opengl @ 0xaddress] instead of [opengl outdev @ 0xaddress].
2020-02-20 14:27:11 +01:00
Andreas Rheinhardt
acbd950ed2 avformat/wtvdec: Forward errors when reading packet
wtvfile_read_packet did not abide by the requirements of an
AVIOContext's read_packet-function: If it did not read anything,
it returned zero, which currently leads to a warning in read_packet_wrapper
in aviobuf.c. Said warning will be an av_assert2 as soon as
FF_API_OLD_AVIO_EOF_0 is zero (probably the next major version bump).
So instead forward the error code from the underlying protocol.

This error/assert is triggered in the wtv-demux FATE test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-19 22:37:30 +01:00
Michael Niedermayer
b4a4aadfaf libavcodec/svq: Remove ff_svq1_packet_checksum()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-19 22:37:30 +01:00
Michael Niedermayer
9fc73bf022 avcodec/qdm2: Check fft_coefs_index
Fixes: out of array access
Fixes: 20660/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5658290216501248

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>
2020-02-19 22:37:30 +01:00
Peter Ross
bb01baae26 ansi: process ESC[3m italics attribute
squelch unknown escape code warnings

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2020-02-19 20:48:49 +11:00
Linjie Fu
ebee808595 lavc/qsvenc: add support for external bitrate control for HEVC
Enables option for hevc_qsv encoder:
    -extbrc

Improvements in BD-Rate could be observed with extbrc on.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2020-02-18 10:27:54 +08:00
Linjie Fu
edf2c7be5c lavfi/vf_scale_qsv: fix the class_name in help for scale_qsv
Class name is used in show_help_children(avfilter_get_class(),...)
to prompt the available filters.

$ ffmpeg -h full

Before:
qsvscale AVOptions:

After:
scale_qsv AVOptions:

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2020-02-18 10:27:02 +08:00
JonCookCubic
566de25599 libavcodec/qsvenc.c: Set mjpeg height and width alignment
Currently width_align and height_align are zero when encoding with mjpeg_qsv,
which causes "Error submitting the frame for encoding". This patch sets the alignments.

There is a little bit more about the problem here http://ffmpeg.org/pipermail/ffmpeg-user/2019-November/046143.html

Signed-off-by: JonCookCubic <jon.cook@cubicmotion.com>
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2020-02-18 10:21:02 +08:00
James Almer
601d574440 avformat/dashenc: warn if Producer Reference Time element option is missing when ldash mode is used
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-17 12:44:18 -03:00
James Almer
55cbccbc2c avformat/dashenc: disable Resync elements when using DVB-DASH profile
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-17 12:16:07 -03:00
Andriy Gelman
8578433d20 avcodec/v4l2_m2m: Fix typo in log message and cosmetics
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2020-02-16 20:29:32 +00:00
James Almer
17ece3f745 avformat/dashenc: always set coding_dependency to 1 if a parser isn't used
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-16 14:42:00 -03:00
James Almer
29be3de926 avformat/dashenc: include an availabilityTimeComplete element in all streaming modes
It's not exclusive for Low Latency streaming. The muxer will serve partial
segments regardless of streaming mode.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-16 14:02:45 -03:00
James Almer
d2a33f665c avformat/dashenc: add Trick Mode support for AdaptationSets
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-16 14:02:38 -03:00
James Almer
4d27def59c avformat/dashenc: make AdaptationSet id an integer value
Unlike Representation id, it's defined as an integer in the spec, and not as a
string.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-16 13:11:16 -03:00
Michael Niedermayer
f3d8f517db avformat/utils: Fix integer overflow with complex time bases in avformat_find_stream_info()
Fixes: signed integer overflow: 2045163756 * 2 cannot be represented in type 'int'
Fixes: Ticket5132

Found-by: tsmith
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-16 15:13:30 +01:00
Michael Niedermayer
347920ca21 avformat/avidec: Avoid integer overflow in NI switch check
Fixes: signed integer overflow: 0 - -9223372036854775808 cannot be represented in type 'long'
Fixes: Ticket8149

Found-by: Suhwan
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-16 15:13:25 +01:00
Michael Niedermayer
4f4ad33d96 fftools/ffmpeg: Fix integer overflow in duration computation in seek_to_start()
Fixes: signed integer overflow: -9223372036854775808 - 9223372036854775807 cannot be represented in type 'long'
Fixes: Ticket8142

Found-by: Suhwan
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-16 15:13:20 +01:00
Michael Niedermayer
0c0ca0f244 avfilter/vf_aspect: Fix integer overflow in compute_dar()
Fixes: signed integer overflow: 1562273630 * 17 cannot be represented in type 'int'
Fixes: Ticket8323

Found-by: Suhwan
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-16 15:13:10 +01:00
Paul B Mahol
96840e47de avformat/utils: avoid unsigned integer overflows 2020-02-16 13:04:01 +01:00
Paul B Mahol
dfb0b9370d avcodec: fix pcm zork decoder
Fixes #1939
2020-02-16 12:54:57 +01:00
Andreas Rheinhardt
7b7b418277 avformat/segafilmenc: Remove AVClass
This muxer does not have any private options and so does not need a
private class.

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>
2020-02-15 22:11:56 +01:00
Marton Balint
6f2e38990c avformat/ftp: slightly rework file retrieval with seeking
- do not require a known file size for seek to work
- read the files till the actual end, do not limit data at the queried file
  size
- fix a bug which causes reading 0 byte files for non-existing files
- properly check the return status of the FTP server at the end of the file
  retrieval

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-15 18:41:36 +01:00
Marton Balint
04f1d49709 avformat/ftp: do not break protocol on username or password with newlines
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-15 18:41:36 +01:00