1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

91525 Commits

Author SHA1 Message Date
Thomas Guillem
513e6a30fb avcodec/videotoolboxenc: fix invalid session on iOS
Cf. comment. Restart the VT session when the APP goes from foreground to
background and vice versa.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-06-18 11:48:05 -07:00
Thomas Guillem
9e11d27c25 avcodec/videotoolboxenc: split initialization
Split vtenc_init() into vtenc_init() (VTEncContext initialization) and
vtenc_configure_encoder() (creates the vt session).

This commit will allow to restart the vt session while encoding.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-06-18 11:48:05 -07:00
Thomas Guillem
ce2330bdf8 avcodec/videotoolboxenc: fix mutex/cond leak in error path
The leak could happen when the vtenc_create_encoder() function failed.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-06-18 11:48:05 -07:00
Jerome Borsboom
e85c608a46 avcodec/vc1: remove unused ff_vc1_loop_filter_iblk
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-18 11:57:56 +02:00
Jerome Borsboom
c68f60e80a avcodec/vc1: rewrite vc1_decode_i_blocks to align with VC-1 spec
Change vc1_decode_i_blocks to use vc1_put_blocks_clamped and
ff_vc1_i_loop_filter.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-18 11:56:45 +02:00
Jerome Borsboom
4dc7ff7e10 avcodec/vc1: add Simple and Main profile to vc1_put_signed_blocks_clamped
Simple and Main Profile also need unsigned put_pixels_clamped. Add an argument
to choose between signed and unsigned put_pixels and change function name to
vc1_put_blocks_clamped.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-18 11:55:26 +02:00
Carl Eugen Hoyos
a707a0b657 Revert "avcodec/vc1: add Simple and Main profile to vc1_put_signed_blocks_clamped"
This reverts commit 2065317db6.

I committed a wrong version of this patch.
Also reverts the follow-up commits 77a3dfb3 and 8331e591.
2018-06-18 11:53:56 +02:00
Danil Iashchenko
b41b6b3234 libavfilter/opencl: Add macro for setting opencl kernel arguments 2018-06-17 17:58:17 +01:00
Jerome Borsboom
89651c82b8 avcodec/vc1: support multi-slice field interlaced pictures with hwaccel
When using hardware accelerated decoding for multi-slice field interlaced pictures,
only the first slice was decoded. This patch adds the neccesary looping over the
remaining slices that may exist in field interlaced pictures. Additionally, we align
the calculation of mby_start for the second field with the method given in VC-1 spec.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-17 16:35:36 +01:00
Jerome Borsboom
3d028b7b72 avcodec/vaapi_vc1: slice_vertical_position starts from zero for the second field
Contrary to VC-1 spec, VAAPI expects the row address of the first
macroblock row in the first slice to start from zero for the second
field in a field interlaced picture.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-17 16:35:30 +01:00
Jun Zhao
bd47cca6a7 fftools/cmdutils: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 10:00:23 +08:00
Jun Zhao
7f5b8f0883 tests/bprint: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
9ba94ac57a avutil/log: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
f7ffb10fb7 lavf/tedcaptionsdec: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
abb28d41ea lavf/icecast: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
483532bc72 lavfi/graphdump: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
9809ac98bd lavfi/af_amerge: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
e4d14b046e lavc/pngdec: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
d0a2ad241c lavc/dvdsubenc: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
df9fe79b3c fftools/ffmpeg_filter: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
24be912827 fftools/ffmpeg: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jerome Borsboom
8331e59133 avcodec/vc1: remove unused ff_vc1_loop_filter_iblk
Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-16 19:26:14 +02:00
Jerome Borsboom
77a3dfb328 avcodec/vc1: rewrite vc1_decode_i_blocks to align with VC-1 spec
Change vc1_decode_i_blocks to use vc1_put_blocks_clamped and
ff_vc1_i_loop_filter.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-16 19:24:54 +02:00
Jerome Borsboom
2065317db6 avcodec/vc1: add Simple and Main profile to vc1_put_signed_blocks_clamped
Simple and Main profile also need unsigned put_pixels_clamped. Add an argument
to choose between signed and unsigned put_pixels and change function name to
vc1_put_blocks_clamped.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-16 19:24:03 +02:00
Jerome Borsboom
a8622497d3 avcodec/vc1: fix overlap and loop filtering for Simple and Main profile
Overlap filtering I and BI frames for Simple and Main profile is only
dependent on PQUANT. Restrict testing for CONDOVER and OVERFLAGS to
advanced profile. Change from mb_width to end_mb_x in ff_vc1_i_loop_filter
to avoid breaking the Microsoft Screen 2 decoder.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-16 19:18:48 +02:00
Jerome Borsboom
a43cdd7693 avcodec/vc1: fix overlap smoothing filter for P frames
The v_overlap_filter needs to run on the colocated block of the previous
macroblock. For the luma plane, the colocated block is located two blocks
on the left instead of one. In addition, the overlap filter needs to run
on the non-edge blocks of the first macroblock row and column.

Fixes ticket #7171.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-06-16 19:15:07 +02:00
Carl Eugen Hoyos
07d1c4ae3f lavc/dpx: Allow packed 12-bit little-endian images.
Can be tested with GraphicsMagick.
2018-06-16 16:18:06 +02:00
Gyan Doshi
70742f0264 fate: correct filename references of qt-faststart binary
qt-faststart build doesn't have PROGSSUF added.
2018-06-16 09:20:57 +05:30
Carl Eugen Hoyos
e3b339cc92 lavf/aviobuf: Increase Statistics verbosity to AV_LOG_VERBOSE. 2018-06-16 02:37:09 +02:00
Michael Niedermayer
8bd514d934 avcodec/aacdec_fixed: Fix undefined integer overflow in apply_independent_coupling_fixed()
Fixes: signed integer overflow: 1195517 * 2048 cannot be represented in type 'int'
Fixes: 8636/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-4695836326887424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-15 21:52:38 +02:00
Michael Niedermayer
575d8ca026 avcodec/dirac_dwt_template: Fix undefined behavior in interleave()
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 8697/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5197148130902016

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-15 21:52:33 +02:00
Michael Niedermayer
aa41d322be avutil/common: Fix undefined behavior in av_clip_uintp2_c()
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 8521/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5639024952737792

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-15 21:52:29 +02:00
Michael Niedermayer
2e205bfc14 avcodec/decode: Consider STRIDE_ALIGN in get_buffer_internal() when checking width
STRIDE_ALIGN is not known in libavutil so av_image_check_size* cannot consider it

Fixes: OOM
Fixes: 8291/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5176528009691136

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-15 21:51:42 +02:00
erankor
3dc5aa36fb qt-faststart - print errors to stderr
instead of stdout

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-15 21:42:18 +02:00
Timo Rothenpieler
6129b13dad configure: simplify ffnvcodec version logic 2018-06-15 11:18:47 +02:00
Pavel Koshevoy
f7d117b484 avcodec/nvenc: enable nvenc encoder instance reuse
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-06-15 11:18:47 +02:00
Pavel Koshevoy
29cddc99cd lavfi/atempo: raise max tempo limit (v2) 2018-06-14 19:19:17 -06:00
Carl Eugen Hoyos
78298bce70 lavc/dpx: Reset n_datum for every new line when decoding 12bit.
Fixes odd unpacked 12bit decoding.
Reported-by: Piotr Bandurski
2018-06-15 01:21:48 +02:00
Michael Niedermayer
28d33c252e ffmpeg: assert that audio packet duration in process_input_packet() is non negative
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-14 18:55:45 +02:00
Michael Niedermayer
16d8b13b3b fftools/ffmpeg: Fallback to duration if sample rate is unavailable
Regression since: af1761f7
Fixes: Division by 0
Fixes: ffmpeg_crash_1

Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-14 18:55:45 +02:00
Michael Niedermayer
8176799f31 avformat/mov: Only set pkt->duration to non negative values
Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-14 18:55:45 +02:00
Gyan Doshi
daf38d0753 doc/formats: get fflags values up-to-date 2018-06-14 17:28:45 +05:30
erankor
c5e6c0b5f6 qt-faststart: add fate test for stco overflow
verify that the stco atom is upgraded to co64 when the addition of moov
size to the offsets results in an overflow

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-13 21:55:19 +02:00
erankor
dc16c9dd90 qt-faststart - stco offset bug fix
when the last offsets in the stco atom are close to 4GB, the addition of
the moov atom size can overflow, causing corruption near the end of the
mp4 file.
this patch upgrades all stco atoms to co64 when such an edge case is
detected. in order to accomplish this, the implementation was changed to
walk the atom tree, instead of searching for the strings 'stco'/'co64'.
this was required since when an stco atom is changed to co64, its size
changes, and the sizes of all containing atoms (moov, trak, etc.) have
to be updated as well.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-13 21:55:19 +02:00
erankor
ee09ffbfd2 qt-faststart: add validation on ftyp atom size
avoid trying to allocate an unreasonably sized buffer on corrupt files

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-13 21:55:19 +02:00
Michael Niedermayer
2fc108f60f avcodec/mpeg4videodec: Clear bits_per_raw_sample if it has originated from a previous instance
Fixes: assertion failure
Fixes: ffmpeg_crash_5.avi

Found-by: Thuan Pham <thuanpv@comp.nus.edu.sg>, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-13 21:55:19 +02:00
Lou Logan
30af29a712 doc/devices: order alphabetically and add missing v4l2 outdev
Signed-off-by: Lou Logan <lou@lrcd.com>
2018-06-13 11:21:12 -08:00
Timo Teräs
2223811b01 avformat/movenc: fix recognization of cover image streams
For chapter images, the mov demux produces streams with disposition set
to attached_pic+timed_thumbnails. This patch fixes to properly recognize
streams that should be encoded as cover image (ones with only and only
attached_pic disposition set).

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-13 16:46:40 +02:00
Timo Teräs
12205d2c89 avformat/movenc: properly handle cover image codecs
Find codec tag for attached images using appropriate list of
supported image formats.

This fixes writing the cover image to m4v/m4a and other container
formats that do not allow these codecs as a track.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-13 16:46:40 +02:00
Jacob Trimble
4aba45ca1f avformat/mov: Add check for per-sample IV size.
Found by Chrome's ClusterFuzz: http://crbug.com/849062.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-13 16:46:40 +02:00