Commit Graph

92246 Commits

Author SHA1 Message Date
Dave Rice 110b4a4918 avdevice/sdl2: add option to set window position
Allows arrangement of multiple windows such as:
ffmpeg -re -f lavfi -i mandelbrot -f sdl -window_x 1 -window_y 1 mandelbrot -vf waveform,format=yuv420p -f sdl -window_x 641 -window_y 1 waveform -vf vectorscope,format=yuv420p -f sdl -window_x 1 -window_y 481 vectorscop

Some changes by Marton Balint:
- allow negative position (partially or fully out-of-screen positions seem to
  be sanitized automatically by SDL (or my WM?), so no special handling is
  needed)
- only show window after the position is set
- do not use resizable and borderless flags at the same time, that caused
  issues in ffplay
- add docs

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-23 19:42:32 +02:00
Josh de Kock 3f2103ec73 fate: add h264 timecode test 2018-10-23 15:46:30 +01:00
Josh de Kock 0ac82eed6f lavfi/vf_showinfo: support displaying S12M timecode sidedata 2018-10-23 15:46:30 +01:00
Josh de Kock 76a8c3b522 h264/pic_timing: support multiple timecodes 2018-10-23 15:46:30 +01:00
Devin Heitmueller 4241e44a3c lavc/h264: create AVFrame side data from H.264 timecodes
Create SMPTE ST 12-1 timecodes based on H.264 SEI picture timing
info.

For framerates > 30 FPS, the field flag is used in conjunction with
pairs of frames which contain the same frame timestamp in S12M.
Ensure the field is properly set per the spec.
2018-10-23 15:46:30 +01:00
Zhong Li 92c25963e8 lavc/qsvenc_jpeg: set a default quality
Keep alignment with vaapi mjpeg encoder.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-10-23 19:52:47 +08:00
Zhong Li 0e3d7d845d lavc/qsvenc_jpeg: add async_depth support
Currently qsv (m)jpeg encoding is broken.
Regression introducing by the commit(id: c1bcd3): fix async support,
which requires the minimum async_depth to be 1, instead previous zero.
But the default async_depth of qsv (m)jpeg encoding is still initialized
(mostly) as zero.

This patch also abviously improves qsv (m)jpeg encoding performance
due to the default async_depth is changed to 4.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-10-23 19:52:41 +08:00
Paul B Mahol b7b3e8c5c7 avfilter: add vibrance filter 2018-10-23 11:12:41 +02:00
Michael Niedermayer 305e523105 avcodec/jpeg2000dec: Fix off by 1 error in JPEG2000_PGOD_CPRL handling
Fixes: assertion failure
Fixes: 10785/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5672160496975872

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-23 00:51:55 +02:00
Michael Niedermayer e90f0ac334 avcodec/ilbcdec: Check startindex
Fixes: Out of array read
Fixes: 10789/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5153255445757952

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>
2018-10-23 00:51:55 +02:00
Mark Thompson da6db843b8 cbs_h2645: Allocate all internal buffers with padding
Any of these buffers (for both H.264 and H.265) might reasonably be
parsed using the bitstream reader, so include padding on all of them.
2018-10-22 23:01:32 +01:00
Mark Thompson e5fda1ff28 cbs_h264: Fix SPS used for pic_timing timestamp
It should be the same as the one used for the rest of the pic_timing
structure.
2018-10-22 23:01:30 +01:00
Mark Thompson 3143fe34f6 cbs_h264: Actually decompose end-of-sequence NAL units
64c50c0e97 declared support for decomposing
them but omitted to implement it; this adds an implementation.

Also do the same for end-of-stream NAL units, since they are equivalent.
2018-10-22 23:01:29 +01:00
Michael Niedermayer b737317a88 avcodec/mpeg4videodec: Fix typo in sprite delta check
Fixes: Integer overflow
Fixes: 10890/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5636062181851136

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-22 21:43:17 +02:00
Jun Zhao 18fce29d8f lavf/vc1test: add rcv to vc1test demuxer extensions
rcv is commonly used as extension for vc1 test stream files.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
2018-10-22 19:09:47 +08:00
Jun Zhao cc82402ed3 lavf/vc1test: fix vc1test can't probe some RCV file.
case 1:
use the hexdump -C SMM0005.rcv get:
                     size              skip (size - 4)
                      |                        |
                      V                        V
00000000  18 00 00 c5 05 00 00 00  4d f1 0a 11 00 e0 01 00
00000010  00 d0 02 00 00 0c 00 00  00 88 13 00 00 c0 65 52
                         ^
			 |
		     size + 16
case 2:
same the command for SMM0015.rcv get:
                    size
                      |
                      V
00000000  19 00 00 c5 04 00 00 00  41 f3 80 01 40 02 00 00
00000010  d0 02 00 00 0c 00 00 00  00 00 00 10 00 00 00 00
                      ^
		      |
		   size + 16

There are different the RCV file format for VC-1, vc1test
just handle the case 2 now, this fix will support the case 1.
(Both of test clips come from: SMPTE Recommended Practice -
VC-1 Decoder and Bitstream Conformance). And I think I got
a older VC-1 test clip in the case 1.

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Reviewed-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Yan, FengX <fengx.yan@intel.com>
2018-10-22 19:09:20 +08:00
Martin Vignali 6953ff714f avfilter/setparams : fix colorspace option 2018-10-22 11:26:31 +02:00
Martin Vignali cfdbefdd90 avfilter/setfield, setrange : set color property to auto 2018-10-22 11:26:28 +02:00
Martin Vignali 997f03cd7e avfilter/setparams : update filter description 2018-10-22 11:26:24 +02:00
Timo Rothenpieler 2797bd5c81 avfilter/*_cuda: don't include internal header
It's not used, and pulls in the ffnvcodec header, which does not neccesarily have to exist to build these filters, since they include the full cuda.h.
2018-10-21 22:55:21 +02:00
Martin Vignali 8d3f364630 avfilter/setparam : add options to set color primaries, trc, space 2018-10-21 22:00:06 +02:00
Martin Vignali 02ad0416c0 avfilter/setparams : merge setfield and setrange filter to setparams filter
setfield and setrange filters are kept.
2018-10-21 22:00:01 +02:00
Paul B Mahol 18d391cffe avfilter: add chromahold filter 2018-10-21 12:57:58 +02:00
kjeyapal@akamai.com e715b8e10d avformat/dashenc: URL close unconditionally after DELETE segments
Fixes bug with HTTP DELETE when HTTP Persistent is ON.
Right now, HTTP Persistent connections is supported only for POSTs and PUTs.
HTTP DELETE will still open a new connection every time.
2018-10-21 16:26:32 +05:30
kjeyapal@akamai.com f848d384dd avformat/dashenc: Support HTTP Persistent for master.m3u8 as well 2018-10-21 16:26:32 +05:30
Paul B Mahol 0939c33b54 avfilter/af_afir: calculate group delay too 2018-10-21 12:47:07 +02:00
Devin Heitmueller 9e21ba3dc3 avdevice/decklink: Fix compile breakage on OSX
Make the function static, or else Clang complains with:

error: no previous prototype for function 'decklink_get_attr_string' [-Werror,-Wmissing-prototypes]

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-20 01:57:08 +02:00
Carl Eugen Hoyos 6871c17173 lavf/matroskadec: Simplify string length calculation.
FFmpeg relies on sizeof(char) == 1.
2018-10-19 20:36:55 +02:00
Carl Eugen Hoyos 10f468156c lavc/sinewin: Do not declare AAC 120/960 tables as const.
ff_sine_window_init() is writing to these tables causing
a crash if compiled with gcc 8 and lto.

Analyzed by Martin Liška in:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85132

Fixes ticket #7491.
2018-10-19 20:30:48 +02:00
Carl Eugen Hoyos feb05ffa99 lavf/dump: Fix a typo: comentary -> commentary.
Fixes ticket #7499.
2018-10-19 20:19:25 +02:00
Paul B Mahol 8baaed7889 avfilter: add sinc source filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-10-19 17:43:29 +02:00
Martin Vignali db4771af81 swscale : add YA16 LE/BE output 2018-10-18 21:43:24 +02:00
Martin Vignali 658bbc0060 swscale/x86/rgb2rgb.asm : add Ivo Van Poorten name to the top of the file
suggested by Carl Eugen Hoyos
2018-10-18 21:43:19 +02:00
Martin Vignali e832d769f4 avcodec/proresenc_aw : use for frame flag in the header the same value than the official encoder 2018-10-18 21:39:06 +02:00
Martin Vignali c51b36ec8f avcodec/proresenc_aw : add support for prores 444 2018-10-18 21:38:58 +02:00
Martin Vignali 98637be753 avcodec/prores_enc : not calculate dct a each quantif search step
Improve encoding speed by 2% (using prores input)
2018-10-18 21:38:54 +02:00
Martin Vignali cea5e90bde avcodec/proresenc_aw : use qp close to the official encoder 2018-10-18 21:38:48 +02:00
Martin Vignali 1a45b12cdc avcodec/proresenc_aw : use AVframe primaries, transfert, colorspace for frame header instead of default (unknown, unknown, Rec601)
avoid color shift, on some decoding software
2018-10-18 21:38:44 +02:00
Martin Vignali d7731ea9d4 avcodec/proresenc_aw : use scan table from prores_data file
Doesn't seems to make speed loss
2018-10-18 21:38:39 +02:00
Paul B Mahol 2d9c290a2f avfilter/vf_lensfun: use av_malloc_array() 2018-10-18 11:36:20 +02:00
Paul B Mahol 0ce7005d34 avfilter/vf_lensfun: use av_freep 2018-10-18 11:30:11 +02:00
Paul B Mahol bf5bdbdb92 avfilter/af_adelay: do not crash if allocation of chandelay failed 2018-10-18 10:24:16 +02:00
Karthick Jeyapal 444cdb422d avformat/dashenc: Dont ignore the codec tag from codec parameters 2018-10-18 10:56:05 +05:30
Michael Niedermayer f72b9904fe avcodec/h264_cavlc: Check mb_skip_run
Fixes: 10300/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6292205497483264
Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in 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-10-18 02:28:54 +02:00
Michael Niedermayer d7dbad12f8 avcodec/ilbcdec: Fix multiple integer overflows
Fixes: 10651/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5202341540659200
Fixes: signed integer overflow: -1707705920 - 1703592888 cannot be represented in type 'int'

This tries to follow the webrtc code. For example using cliping and 64 bit as in WebRtcSpl_DotProductWithScale()
and not doing so in other places.
I could not find anything in rfc3951 and the reference code inside which would
explain what to do in these corner cases.

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-18 02:28:54 +02:00
Michael Niedermayer d017886657 avcodec/ilbcdec: Fix multiple invalid left shifts
Fixes: 10651/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5202341540659200
Fixes: left shift of negative value -512

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-18 02:28:54 +02:00
Michael Niedermayer 25eb10d941 avcodec/ilbcdec: Limit indexes in create_augmented_vector()
These limits are based on limiting done in WebRtcIlbcfix_CreateAugmentedVec()
Fixes: out of array accesses
Fixes: 10652/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5638941487661056
Fixes: 10655/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5699970020147200

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-18 02:28:54 +02:00
Michael Niedermayer c6282141cb avcodec/ra144: Fix integer overflow in add_wav()
Fixes: signed integer overflow: -2144033225 + -5208934 cannot be represented in type 'int'
Fixes: 10633/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RA_144_fuzzer-5679133791617024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-18 02:28:54 +02:00
Michael Niedermayer 079d1a7175 avformat/utils: Never store negative values in last_IP_duration
Fixes: integer overflow compute_pkt_fields()
Fixes: compute_pkt_usan

Reported-by: Thomas Guilbert <tguilbert@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-18 02:28:54 +02:00
Michael Niedermayer 4e19cfcfa3 avformat/utils: Fix integer overflow in discontinuity check
Fixes: signed integer overflow: 7738135736989908991 - -7954308516317364223 cannot be represented in type 'long'
Fixes: find_stream_info_usan

Reported-by: Thomas Guilbert <tguilbert@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-18 02:28:54 +02:00