Commit Graph

90202 Commits

Author SHA1 Message Date
Philip Langdale 9d5aff09a7 swscale: Add p016 output support and generalise yuv420p1x to p010
To make the best use of existing code, I generalised the wrapper
that currently does yuv420p10 to p010 to support any mixture of
input and output sizes between 10 and 16 bits. This had the side
effect of yielding a working code path for all yuv420p1x formats
to p01x.
2018-03-02 14:52:48 -08:00
Philip Langdale e990713ff9 avcodec/hevcdec: Declare that nvdec supports 12bit decoding 2018-03-02 14:28:13 -08:00
Aurelien Jacobs 61c972384d parseutils: add support for ms and us suffix for AV_OPT_TYPE_DURATION
supported suffixes are:
- s: seconds (default when no suffix specified)
- m or ms: milliseconds
- u or us: microseconds
2018-03-02 22:57:08 +01:00
James Almer 6ce5dd228c avformat/mxg: return reference counted packets
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-02 12:26:09 -03:00
Steven Liu aa294ad00a avformat/hlsenc: add reference stream index for split segment
fix ticket: #7044
Get the first video stream to reference for split segment
when there have more than one video stream

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Reviewed-by: Karthick Jeyapal <kjeyapal@akamai.com>
2018-03-02 10:56:36 +08:00
Xiaohan Wang f5f2209d68 ffmpeg: Fix memset size on ctts_data in mov_read_trun() (round 2)
The allocated size of sc->ctts_data is
(st->nb_index_entries + entries) * sizeof(*sc->ctts_data).

The size to memset at offset sc->ctts_data + sc->ctts_count should be
(st->nb_index_entries + entries - sc->ctts_count) *
sizeof(*sc->ctts_data))

The current code missed |entries| I believe, which was introduced in
https://patchwork.ffmpeg.org/patch/5541/.

However, after offline discussion, it seems the original code is much
more clear to read (before https://patchwork.ffmpeg.org/patch/5541/).

Hence this CL revert the memset logic to it's previous state by
remembering the |old_ctts_allocated_size|, and only memset the newly
allocated entries.

BUG=812567

Change-Id: Ibe94c7138e5818bfaae76866bfa6619a9b8a2b6b
Reviewed-on: https://chromium-review.googlesource.com/934925
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-01 22:54:49 +01:00
Marton Balint f50741147c avformat/mxfdec: always use a stream which matches the first index table when seeking
Obviously this is still not perfect, but better then it was. Using the first
index table and mxf->current_edit_unit is still hardcoded in many places, so
this change has hopefully the less chance of breaking anything that works
now.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-01 22:03:53 +01:00
Marton Balint e8e1c22f21 avformat/mxfdec: compute sample_count after seek from index for audio streams
This fixes audio timestamps if the audio streams are not frame wrapped with the
video.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-01 22:03:53 +01:00
Marton Balint 0827c78e98 avformat/mxfdec: use body_offset of the partitions in mxf_absolute_bodysid_offset
Use body_offset of the partitions to search for the partition with the given
offset in the essence. This makes the function find the correct partition for
non frame-wrapped essences as well, where only the essence data is part of the
the edit unit byte count, not the KLV-s.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-01 22:03:53 +01:00
Marton Balint 5b36379eb6 avformat/mxfdec: set index_duration from the track using the index
Also use original_duration as index_duration is in edit units.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-01 22:03:53 +01:00
Marton Balint c46e430c5b avformat/mxfdec: fix sorting of index segments
Fixes ticket #5320.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-01 22:03:53 +01:00
Marton Balint 9492bb58ee avformat/mxfdec: use both body_sid and track_number to find the track of a packet
In order to do that we have to parse the EssenceContainerData and assign the
proper body_sid and index_sid to the tracks from the corresponding source
packages.

This fixes packets returned in the wrong stream for some OP1-b files.

Based on a patch by Alex Mogurenko from https://github.com/da8eat/FFmpeg

Reference: http://mogurenko.com/2018/01/02/mxf-op1b-ffmpeg-part1/

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-01 22:03:53 +01:00
Marton Balint 9ec3e61fc3 avformat/mxfdec: use full UMID to resolve source package
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-01 22:03:53 +01:00
Marton Balint 5c2fd59700 avformat/mxfdec: use the first system item if available for calculating essence_offset
Also add an additional system item key.

Fixes parsing of ffmpeg-bugs/trac/ticket2817/warehouse.mxf

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-01 22:03:53 +01:00
Marton Balint e9b0e42e77 avformat/mxfdec: fix essence_offset calculation
The reference point for a KAG is the first byte of the key of a Partition Pack.

Fixes ticket #2817.
Fixes ticket #5317.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-01 22:03:53 +01:00
Marton Balint d54a04b69b avformat/mxfdec: fix indentation
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-01 22:03:53 +01:00
Rostislav Pehlivanov 6731f60598 frame: add an av_frame_new_side_data_from_buf function
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-03-01 20:37:18 +00:00
Maxton 1be4c85790 avcodec/wmaprodec: support decoding up to 16 channels of xma
Signed-off by: Maxton <maxton@maxton.xyz>
2018-03-01 20:01:53 +01:00
Bodecs Bela d723994449 avfilter/avf_concat: add next command
This patch makes it possible to dinamically close the current segment
and step to the next one by introducing command handling capabilities
into the filter. This new feature is very usefull when working with
real-time sources or live streams as source. Combinig usage with zmqsend
tool you can interactively end the current segment and step to next one.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2018-03-01 12:54:06 +01:00
James Almer 40102a2137 avcodec/Makefile: skip nvdec.h header when nvdec is not enabled
Fixes make checkheaders now that the cuda headers are no longer in-tree

Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-27 17:51:02 -03:00
Michael Niedermayer f9cb17f988 avcodec/msmpeg4dec: Check for input end in msmpeg4v34_decode_mb()
Fixes: Timeout
Fixes: 6276/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV1_fuzzer-5881196690014208

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-27 19:37:06 +01:00
Michael Niedermayer 8b5c29b6c2 avcodec/truemotion2rt: Check input buffer size
Fixes: Timeout
Fixes: 6250/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2RT_fuzzer-5479814011027456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-27 19:37:06 +01:00
Michael Niedermayer 3981fb8d2a avcodec/g2meet: Check tile dimensions with av_image_check_size2()
Fixes: OOM
Fixes: 6216/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-4983807968018432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-27 19:37:06 +01:00
Michael Niedermayer 49062a9017 avcodec/exr: fix invalid shift in unpack_14()
Fixes: 6154/clusterfuzz-testcase-minimized-5762231061970944
Fixes: runtime error: shift exponent 63 is too large for 32-bit type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-27 19:37:06 +01:00
Michael Niedermayer 090c0abff9 avcodec/bintext: sanity check dimensions
Fixes: Timeout
Fixes: 6277/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XBIN_fuzzer-6047202288861184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-27 19:37:06 +01:00
Timo Rothenpieler 27cbbbb33f compat: remove in-tree NVidia headers
External headers are no longer welcome in the ffmpeg codebase because they
increase the maintenance burden. However, in the NVidia case the vanilla
headers need some modifications to be usable in ffmpeg therefore we still
provide them, but in a separate repository.

The external headers can be found at
https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git

Fate-source is updated because of the deleted files, and dynlink_loader.h
license headers were updated with the standard FFmpeg headers.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-02-27 16:22:12 +01:00
Michael Niedermayer 7414d0bda7 avcodec/utvideodec: Check subsample factors
Fixes: Out of array read
Fixes: heap_poc

Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-27 12:23:23 +01:00
Michael Niedermayer bbed942dfd avcodec/rscc: Skip empty frames (nb_tiles == 0)
Fixes: Timeout
Fixes: 6266/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-5692431816196096

Its not known if nb_tiles is allowed so it is not treated as an error

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-27 12:23:23 +01:00
Tobias Rapp fa0c9d69d3 fftools/ffmpeg: replace call to av_strerror with av_err2str
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-02-27 08:34:35 +01:00
Karthick Jeyapal e3851f6a37 avformat/dashenc: Removed usage of deprecated 'filename' variable 2018-02-27 08:40:48 +05:30
Serhii Marchuk 6d763ab588 avformat/dashenc: add option to change HTTP method 2018-02-27 08:39:47 +05:30
James Almer f235359b2b avformat/utils: don't overwrite the return value of read_packet()
This only affected demuxers that didn't return reference counted packets.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-26 22:17:21 -03:00
James Almer f4709f1b7b configure: add missing audio_frame_queue dependency to vorbis encoder
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-26 01:43:54 -03:00
Martin Vignali c0919c4985 checkasm/vf_blend : add test for blend_simple_16, phoenix_16 and difference_16 2018-02-24 21:44:23 +01:00
Martin Vignali 53a03b5c8c avfilter/x86/vf_blend : add 16 bit version for BLEND_SIMPLE, phoenix, difference for SSE and AVX2 (x86_64) 2018-02-24 21:44:19 +01:00
Martin Vignali 6c6c9d14a8 avfilter/x86/vf_blend : indent 2018-02-24 21:44:16 +01:00
Martin Vignali 7590d58b61 avfilter/x86/vf_blend : reorganize init in order to add 16 bit version 2018-02-24 21:44:13 +01:00
Martin Vignali e3fc36a84c checkasm/vf_blend : add depth param in order to add test for 16 bit version 2018-02-24 21:44:09 +01:00
Martin Vignali c8552b7858 fate/exr : add test for long name flag
ticket 6994
2018-02-24 21:42:46 +01:00
Martin Vignali ea03f295ec avcodec/exr : add support for long name flag and be more explicit about unsupported flag
based-on patch by Carl Eugen Hoyos

Fix ticket 6994
2018-02-24 21:42:04 +01:00
Marton Balint ffabff1baa avformat/concatdec: add support for very long line sizes
Fixes ticket #6761.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-02-24 20:21:35 +01:00
Marton Balint dcb2ef2211 avformat/aviobuf: add ff_read_line_to_bprint and ff_read_line_to_bprint_overwrite functions
To be able to read lines longer than a static buffer size.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-02-24 20:17:04 +01:00
Tomas Härdin 5f36c546ec Add myself as codec2 maintainer 2018-02-24 17:06:31 +01:00
Tomas Härdin 5caae27979 Don't complain about codec2's 700 bit/s modes in ffmpeg.c 2018-02-24 17:06:31 +01:00
Tomas Härdin 5655048c73 Add muxer/demuxer for raw codec2 and .c2 files 2018-02-24 17:06:31 +01:00
Tomas Härdin f958f431ec Add libcodec2 en/decoder 2018-02-24 17:06:31 +01:00
Vishwanath Dixit 28924f4b48 avformat/dashenc: chunk streaming support for low latency use cases 2018-02-24 10:55:28 +05:30
Vishwanath Dixit ffe7cc89d0 avformat/dashenc: opening a segment file when its first frame is ready 2018-02-24 10:54:09 +05:30
Jun Zhao 74afa54528 ffmpeg_opt: fix max_error_rate help info display issue.
ffmpeg -h display "max_error_rate" option help information have
been cut off, the root cause is used a wrong initial order.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-24 04:50:55 +01:00
Michael Niedermayer 0293663483 avcodec/smc: Check input packet size
Fixes: Timeout
Fixes: 6261/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMC_fuzzer-5811309653262336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-24 04:50:55 +01:00