Commit Graph

91119 Commits

Author SHA1 Message Date
Tobias Rapp
eb28b5ec8a avfilter/vsrc_testsrc: add pal75bars and pal100bars video filter sources
Generates color bar test patterns based on EBU PAL recommendations.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-05-18 15:39:54 +02:00
Paul B Mahol
e9dd5b4f5e avfilter/vf_waveform: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-18 13:15:09 +02:00
Rostislav Pehlivanov
8e7b13b971 opusenc: use for loops with declarations
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-05-18 02:38:08 +01:00
Rostislav Pehlivanov
62a7a70484 doc/developer: update style guidelines to include for loops with declarations
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-05-18 02:24:28 +01:00
Rostislav Pehlivanov
ce943dd6ac configure: error out on unsupported MSVC versions
The FATE tests for MSVC versions older than 2013 are untested in FATE
and apparently are no longer supported.

This commit makes the configure process error out in case an older version
is used, and suggests to use a supported version of MSVC to compile.

This also changes the documentation to reflect this.

As discussed on IRC:

2018-05-12 19:45:16     jamrial then again, most of those were for old msvc, and i think we're not supporting versions older than 2013 (first one c99 compliant) anymore
2018-05-12 19:45:43     +JEEB   yea, I think 2013 update 2 is needed

22:53 <@atomnuker> nevcairiel: which commit broke/unsupported support for msvc 2013?
23:23 <@atomnuker> okay, it was JEEB
23:25 <+JEEB> which was for 2012 and older
23:25 <+JEEB> and IIRC we no longer test those in FATE so that was my assumption
23:26 <+JEEB> 2013 is when MS got trolled enough to actually update their C part
23:26 <+JEEB> aand actually advertised FFmpeg support
23:26 <+JEEB> (although it was semi-failing until VS2013 update 1 or 2)

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-05-18 02:22:57 +01:00
Aman Gupta
5dfeb7f081 avformat/mpegts: tag video streams with still images
Parses the video_stream_descriptor (H.222 2.6.2) to look
for the still_picture_flag. This is exposed to the user
via a new AV_DISPOSITION_STILL_IMAGE.

See for example https://tmm1.s3.amazonaws.com/music-choice.ts,
whose video stream only updates every ~6 seconds.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-17 12:03:22 -07:00
Aman Gupta
2734f8d63a avformat: add skip_estimate_duration_from_pts
For seekable mpegts streams, duration is calculated from
pts by seeking to the end of the file for a pts and subtracting
the initial pts to compute a duration.

This can be expensive in terms of added latency during
probe, especially when streaming over a network. This new
option lets you skip the duration calculation, which is useful
when you don't care about the value and want to save some overhead.

This patch is particularly useful when dealing with live mpegts
streams. Normally such streams are not seekable, so durations
are not calculated. However in my case I am dealing with a seekable
live mpegts stream (networked access to a .ts file which is still
being appended to).

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-17 11:33:01 -07:00
Carl Eugen Hoyos
380ca1bc0c lavc/v210dec: Skip Canopus C210 extradata.
Unbreaks files with unknown extradata, the Canopus decoder accepts both files
with and without this extradata (24 byte "INFO", 16 byte "RDRT", rest "FIEL").

Reported-by: Peter Bubestinger
Tested-by: Piotr Bandurski
2018-05-17 12:19:38 +02:00
Michael Niedermayer
cb944fc7f1 avcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD97iH0 / COMPOSE_DD137iL0
Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int');
Fixes: 6500/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-4523620274536448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-17 02:23:06 +02:00
Michael Niedermayer
cb2f7ea96b avcodec/fic: Check available input space for cursor
Fixes: out of array read
Fixes: 6546/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-6317064647081984

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-17 02:23:06 +02:00
Michael Niedermayer
c6a11714c4 avcodec/fic: Avoid some magic numbers related to cursors
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-17 02:23:06 +02:00
Michael Niedermayer
ba97d75ac6 avcodec/mpeg4video: Detect reference studio streams as studio streams
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-17 02:23:06 +02:00
Michael Niedermayer
b3a18511cc avcodec/mpeg4videodec: Check bps (VOL header) before VOP for studio profile
Fixes: runtime error: shift exponent -1 is negative
Fixes: 7486/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-4977380939530240

Fixes: runtime error: index 36 out of bounds for type 'const uint8_t [32]'
Fixes: 7566/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6536620682510336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-17 02:23:06 +02:00
Michael Niedermayer
9e5d0860c0 avcodec/mpeg4videodec: Do not corrupt bits_per_raw_sample
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-17 02:23:06 +02:00
Michael Niedermayer
9f73ae31e0 avcodec/mpeg4videode: Eliminate out of loop VOP startcode reading for studio profile
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-17 02:23:06 +02:00
Michael Niedermayer
ab834b8f36 avcodec/g2meet: ask for sample with overflowing RGB
Suggested-by: Tomas Härdin <tjoppen@acc.umu.se>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-17 02:23:06 +02:00
Michael Niedermayer
4dd2c8b9ea avcodec/g2meet: Check RGB upper limit
Fixes: runtime error: left shift of 1876744317 by 16 places cannot be represented in type 'int'
Fixes: 6799/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5115274731716608

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-17 02:23:06 +02:00
Marton Balint
50d6b7bd83 avcodec/xwddec: fix palette alpha
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-05-16 22:34:27 +02:00
Aman Gupta
673d8cfd51 avformat/hls: fix seeking around EVENT playlist after media sequence changes
The seek functions use first_timestamp, so keep that up to date as
old segments drop off the playlist.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-16 10:19:34 -07:00
Jun Zhao
b7cd2ab22e lavc/h2645_parse: add h264_nal_unit_name for h264 NAL type.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-16 20:24:48 +08:00
Jun Zhao
7582a907e4 lavc/h2645_parse: rename the nal_unit_name to hevc_nal_unit_name.
Rename the nal_unit_name to hevc_nal_unit_name, will add a
h264_nal_unit_name function.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-16 20:24:48 +08:00
Jun Zhao
48c5ac8b0f lavc/h2645_parse: log more HEVC NAL type.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-16 20:24:48 +08:00
Paul B Mahol
4e816b5491 avfilter: add aderivative and aintegral filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-16 12:20:38 +02:00
Michael Niedermayer
64f59a21b3 avcodec: Disable new iterate API for ossfuzz
A few days ago ossfuzz stoped testing new FFmpeg as it run out of diskspacee

https://oss-fuzz-build-logs.storage.googleapis.com/index.html

An alternative would be to revert the API.

This changes for example
-rwxr-x--- 1 michael michael 144803654 May 14 12:54 tools/target_dec_ac3_fixed_fuzzer*
to
-rwxr-x--- 1 michael michael  30333852 May 14 12:51 tools/target_dec_ac3_fixed_fuzzer*

Which should massively decrease space requirements

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-16 00:39:52 +02:00
Zhao Zhili
d0b5952325 doc/examples: add missing ignore files
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-16 00:39:52 +02:00
Zhao Zhili
f24b2e64b0 examples/filtering_video: fix memory leak
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-16 00:39:52 +02:00
Zhao Zhili
c0a845f948 examples/filtering_video: add missing headers
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-16 00:39:52 +02:00
Zhao Zhili
84d4af4ea8 examples/filtering_video: drop an always true condition
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-16 00:39:52 +02:00
Mark Thompson
989c5a84ac lavu/Makefile: Fix alignment and ordering 2018-05-15 22:16:03 +01:00
Mark Thompson
136260eb88 hwcontext: Do not call device_init again when deriving an existing device
The change in 309d660775 to call device_init
when doing derivation missed this case - we should only call it if we
actually made a new device.
2018-05-15 22:16:03 +01:00
Marton Balint
1b2471039b avutil/hwcontext_cuda: fix YUV420P cuda_get_buffer
Regression since ece068a771.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-05-15 22:18:58 +02:00
Marton Balint
2dbe936bf7 avformat/webm_chunk: always use a static buffer for get_chunk_filename
My conversation from AVFormatContext->filename to AVFormatContext->url was
wrong in this case because get_chunk_filename uses filename as an output
buffer, and not as an input buffer.

Fixes ticket #7188.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-05-15 22:18:58 +02:00
Aman Gupta
64bf915cd8 avformat/mpegts: fix incorrect indentation
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-15 11:47:30 -07:00
Vishwanath Dixit
e3518821c9 avformat/dashenc: configuring container format options 2018-05-15 11:13:36 +05:30
James Almer
9a09f4c54a avcodec/h2645_parse: skip NALUs with no content after stripping all the trailing zeros
The GetBitContext is effectively empty in them.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-14 18:09:32 -03:00
Carl Eugen Hoyos
20b8807622 configure: Mention the dash demuxer in the libxml2 help text. 2018-05-14 21:00:26 +02:00
Aman Gupta
42a03e7700 avformat/mpegts: initialize section_buf to fix valgrind test failure
http://fate.ffmpeg.org/report.cgi?slot=x86_64-archlinux-gcc-valgrind&time=20180513001958

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-14 10:26:13 -07:00
Paul B Mahol
2bde38c0ab avfilter/vf_lut2: add timeline support to tlut2 filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-14 18:26:16 +02:00
Paul B Mahol
a27cab9eca avfilter/vf_blend: add timeline support to tblend filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-14 18:08:35 +02:00
Reino Wijnsma
1548d2a5a5 configure: add pkg-config check for libmysofa
This does require libmysofa with today's latest commit (08f243d1ec).
They already had a pkg-config file, but the dependencies weren't setup right. Until now.
2018-05-14 17:26:23 +02:00
Paul B Mahol
80b474875e avfilter/vf_srcnn: use function to get number of threads
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-14 16:04:33 +02:00
Paul B Mahol
e3a697eda3 avfilter/vf_amplify: check if array is availabe before using it
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-14 16:04:33 +02:00
Tomas Härdin
10ed9f2b12 Add IRC nicknames 2018-05-14 11:36:40 +02:00
Karthick Jeyapal
c76a6c93bf avformat/dashenc: Add documentation for http method option 2018-05-14 10:20:54 +05:30
Michael Niedermayer
62f07825ba avcodec/vp3: Check that there will be sufficient input for the coded fragments in unpack_superblocks()
Fixes: Timeout
Fixes: 6292/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-4871218218926080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-13 23:52:16 +02:00
Niklas Haas
32234e03a7 configure: fix configure check for lilv-0
This should be included as `<lilv/lilv.h>`, same as is done in af_lv2.c.
Forcing the extra lilv-0 breaks platforms where the include dir is
`/usr/include/lilv/lilv.h` rather than
`/usr/include/lilv-0/lilv/lilv.h`.

The new include path works for both, because the `pkg-config --cflags`
includes `-I/usr/include/lilv-0`.
2018-05-13 18:55:43 +03:00
Aman Gupta
cae004cabb doc: fix incorrect reference to xsd_compliant option
reported by Mindless` on IRC
2018-05-12 12:09:20 -07:00
Aman Gupta
7db022e67b avformat/mpegts: reindent after last change
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-12 11:50:16 -07:00
Aman Gupta
9152c1e495 avformat/mpegts: parse sections with multiple tables
Fixes PMT parsing in some mpegts streams which contain
multiple tables within the PMT pid. Previously, the parser
assumed only one table was present in each packet, and discarded
the rest of the section data after attempting to parse the first
table.

A similar issue was documented in the BeyondTV software[1], which
helped me diagnose the same bug in the ffmpeg mpegts demuxer. I also
tried DVBInspector, libdvbpsi's dvbinfo, and tstools' tsinfo to
help debug. The former two properly read PMTs with multiple tables,
whereas the last has the same bug as ffmpeg.

I've created a minimal sample[2] which contains the combined PMT.
Here's what ffmpeg probe shows before and after this patch:

Before:

    Input #0, mpegts, from 'combined-pmt-tids.ts':
      Duration: 00:00:01.08, start: 4932.966167, bitrate: 741 kb/s
      Program 1
      No Program
        Stream #0:0[0xf9d]: Audio: ac3, 48000 Hz, mono, fltp, 96 kb/s
        Stream #0:1[0xf9b]: Audio: mp3, 0 channels, fltp
        Stream #0:2[0xf9c]: Unknown: none

After:

    Input #0, mpegts, from 'combined-pmt-tids.ts':
      Duration: 00:00:01.11, start: 4932.966167, bitrate: 718 kb/s
      Program 1
        Stream #0:0[0xf9b]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv, top first), 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
        Stream #0:1[0xf9c](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
        Stream #0:2[0xf9d](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, mono, fltp, 96 kb/s

With the patch, the PMT is parsed correctly so the streams are
created in the correct order, are associated with "Program 1",
and their codecs are set correctly.

[1] http://forums.snapstream.com/vb/showpost.php?p=343816&postcount=201
[2] https://s3.amazonaws.com/tmm1/combined-pmt-tids.ts

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-12 11:50:00 -07:00
Aman Gupta
18074b309f avformat/hlsenc: set AVFMT_NODIMENSIONS
Same as previous commit but for mpegts inside HLS.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-12 11:48:46 -07:00