Commit Graph

91519 Commits

Author SHA1 Message Date
Marcin Gorzel
8b710ea5e7 swresample: Use channel count in rematrix initialization
Rematrixing supports up to 64 channels. However, there is only a limited number of channel layouts defined. Since the in/out channel count is currently obtained from the channel layout, for undefined layouts (e.g. for 9, 10, 11 channels etc.) the rematrixing fails.

This patch changes rematrix init methods to use in (used) and out channel count directly instead of computing it from channel layout.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-26 02:42:42 +02:00
Carl Eugen Hoyos
d01d46ad86 configure: Force pie for Android.
Position-independent executables are required since Lollipop.

Reported-by: Mohammed Bey Ahmed Khernache
2018-07-25 20:43:02 +02:00
James Almer
81a18f219e avutil/hwcontext_d3d11va: fix type arguments passed to IDXGIAdapter2_GetDesc()
libavutil/hwcontext_d3d11va.c: In function 'd3d11va_device_create':
libavutil/hwcontext_d3d11va.c:554:46: warning: passing argument 2 of 'pAdapter->lpVtbl->GetDesc' from incompatible pointer type [-Wincompatible-pointer-types]
         hr = IDXGIAdapter2_GetDesc(pAdapter, &desc);
                                              ^
libavutil/hwcontext_d3d11va.c:554:46: note: expected 'DXGI_ADAPTER_DESC * {aka struct DXGI_ADAPTER_DESC *}' but argument is of type 'DXGI_ADAPTER_DESC2 * {aka struct DXGI_ADAPTER_DESC2 *}'

Reviewed-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-25 15:22:30 -03:00
Carl Eugen Hoyos
fa35ab80f3 lavf/isom: Make auxiliary_offsets consistently uint64_t.
Fixes a compilation warning if size_t != uint64_t:
libavformat/mov.c: In function ‘mov_read_saio’:
libavformat/mov.c:6207:45: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
         encryption_index->auxiliary_offsets = auxiliary_offsets;
                                             ^
2018-07-25 20:06:04 +02:00
Carl Eugen Hoyos
c51e0cd6ed lavf/flvdec: Remove an outdated comment.
The buffer size was increased in b2fecce3 to prepare for 790a3cdf.
2018-07-25 15:08:43 +02:00
Lou Logan
0e554bf4b9 doc/mailing-list-faq: user lists are subscribe only
Includes a few other minor changes and updates.

Signed-off-by: Lou Logan <lou@lrcd.com>
2018-07-24 13:35:38 -08:00
Marton Balint
a5c17cf43e avformat/mxfdec: drop invalid index table segments when sorting them
This way if an index table segment is present multiple times, we can always use
the proper one instead of the invalid one.

Fixes seeking in the sample of ticket #5671.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-07-24 09:06:55 +02:00
Mina
0bb5cd8c4d avfilter: Add colorconstancy filter
Signed-off-by: Mina <minasamy_@hotmail.com>
2018-07-23 22:34:52 +02:00
Michael Niedermayer
d134b8d85f avcodec/cdgraphics: Clear first frame only once
frame_number will not increase if nothing is output

Fixes: Timeout
Fixes: 9057/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-4844661498707968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-23 02:58:38 +02:00
Michael Niedermayer
d2015e6b86 avcodec/tscc: Do not duplicate images
This improves speed

Fixes: Timeout
Fixes: 9010/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TSCC_fuzzer-6042614817095680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-23 02:58:38 +02:00
Michael Niedermayer
679bfa453f avcodec/tscc: Move reading the side data palette before other checks
We do not want to loose the side data in case of errors

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-23 02:58:38 +02:00
Paul B Mahol
3237f018fd avcodec/bink: set color range 2018-07-22 10:19:03 +02:00
Paul B Mahol
1b0922584e avcodec/bink: add 'k' version support 2018-07-22 10:03:56 +02:00
Paul B Mahol
251329fa76 avformat/bink: move code for skipping unknown fields to correct place 2018-07-22 10:03:56 +02:00
James Almer
3735d55af3 avcodec/parser: move parsers list and related API to its own file
And add it to the CONFIGURABLE_COMPONENTS list in Makefile. This way, changes
to the new file will be tracked and the usual warning to suggest re-running
configure will be shown.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-21 16:08:29 -03:00
Danil Iashchenko
9d6efefaf4 doc/filters: use radius instead of kernel in avgblur 2018-07-21 21:29:58 +05:30
Carl Eugen Hoyos
9617178800 lavc/fft_template: Do not define unneded functions with --enable-small.
Fixes the following warnings:
In file included from libavcodec/fft_fixed.c:21:0:
libavcodec/fft_template.c:528:6: warning: ‘pass_big’ defined but not used [-Wunused-function]
 PASS(pass_big)
      ^
libavcodec/fft_template.c:505:13: note: in definition of macro ‘PASS’
 static void name(FFTComplex *z, const FFTSample *wre, unsigned int n)\
             ^~~~
CC      libavcodec/ffv1.o
In file included from libavcodec/fft_float.c:21:0:
libavcodec/fft_template.c:528:6: warning: ‘pass_big’ defined but not used [-Wunused-function]
 PASS(pass_big)
      ^
libavcodec/fft_template.c:505:13: note: in definition of macro ‘PASS’
 static void name(FFTComplex *z, const FFTSample *wre, unsigned int n)\
             ^~~~
2018-07-21 14:05:41 +02:00
A. Wilcox
153fcd6de6 libavcodec/ppc: Fix HEVC AltiVec routines with --enable-small
GCC requires the argument to vec_splat_u32 to be a literal.  The easiest
way to accomplish this is to change 'shift' to be const in scale (as it
is in the transform routine above), and convert both routines to be
inline.  This way, GCC can coerce the values to literals.

Tested on a 970 (Apple G5) and POWER9 (Talos II); passed fate and played
a clip of Big Buck Bunny correctly.

Fixes ticket #7048

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
2018-07-21 13:36:24 +02:00
James Almer
3870ed7ab3 avcodec/extract_extradata_bsf: make sure a Sequence Header was found for av1
A packet may have Metadata OBUs but no Sequence Header OBU, which is
useless as extradata.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 20:43:40 -03:00
James Almer
5abbb1430d avcodec: bump micro version after previous changes
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 15:49:36 -03:00
James Almer
9888a19db4 avformat/movenc: add support for AV1 streams
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 12:00:32 -03:00
James Almer
9ca7ad246d avformat/mov: add support for AV1 streams
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 11:43:25 -03:00
James Almer
a754af942a avcodec/libaomenc: export Sequence Header and Metadata OBUs as extradata
aom_codec_get_global_headers() is not implemented as of libaom 1.0.0 for AV1, so
we're forced to extract the relevant header OBUs from the first packet and propagate
them as packet side data.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 11:43:25 -03:00
James Almer
f9af3929c0 avcodec/extract_extradata: add support for AV1
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 11:43:24 -03:00
James Almer
45f52d19b9 avcodec: add AV1 packet split API
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 11:43:24 -03:00
Michael Niedermayer
be0b77e6e8 avutil/pixfmt: Document chroma plane size for odd resolutions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-20 13:13:52 +02:00
Carl Eugen Hoyos
9cb3d8fcb7 lavfi/af_afir,af_aiir: Remove a variable that is always -1.
Fixes two warnings:
libavfilter/af_afir.c:194:45: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
     int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
                                 ~~~~~~~~~~~~^~~~
libavfilter/af_aiir.c:689:45: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
     int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
                                 ~~~~~~~~~~~~^~~~
2018-07-19 23:13:24 +02:00
alexander schmid
b23c4a9dbd lavu/x86/cpu: Fix aesni detection 2018-07-19 20:17:44 +02:00
Thomas Guillem
93e157f40f avcodec/videotoolboxenc: fix undefined behavior with rc_max_rate=0
On macOS, a zero rc_max_rate cause an error from
VTSessionSetProperty(kVTCompressionPropertyKey_DataRateLimits).

on iOS (depending on device/version), a zero rc_max_rate cause invalid
arguments from the vtenc_output_callback after few frames and then a crash
within the VideoToolbox library.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-07-19 09:26:01 -07:00
Aman Gupta
37644f0477 avcodec: parse options from AVCodec.bsfs
Fixes a bug that would prevent using multiple comma-separated filters,
and allows options to be passed to each filter.

Based on similar loop in ffmpeg_opt.c's new_output_stream().

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-07-19 09:15:13 -07:00
Baptiste Coudurier
b420fead53 avformat/mxfdec: only call mxf_free_metadataset when ctx_size is != 0, otherwise ctx == mxf 2018-07-19 08:25:24 -07:00
Michael Niedermayer
1809f1cda9 avcodec/dvbsub_parser: Do not discard data
May fix: oss fuzz issue 9220

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-18 13:59:25 +02:00
Michael Niedermayer
4a657acaef avcodec/cfhd: Use bytestream2 for peaks
This fixes out of array accesses
No testcase known

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-18 13:59:25 +02:00
Michael Niedermayer
91578f5798 avcodec/tscc: Move reget buffer to after decoding
reget buffer can be time consuming, theres no need to do it if failures
occur

Testcase: 9010/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TSCC_fuzzer-6042614817095680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-18 13:59:25 +02:00
Michael Niedermayer
706c9beaea avcodec/lagarith: Remove redundant varianble init
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-18 13:59:25 +02:00
James Darnley
088b07427d fate: add more vc2 encoder tests 2018-07-18 11:32:20 +02:00
Gyan Doshi
8aa6d9a8d3 avformat/mov: only set handler_name from mdia->hdlr
6 FATE references updated.

Fixes #7104
2018-07-16 21:33:01 +05:30
Gyan Doshi
b8c4d2b2ed doc/filters: add missing details to aphasemeter
First output is audio and is rematrixed to stereo
2018-07-16 11:20:22 +05:30
Michael Niedermayer
cd86b5cfe2 avcodec/dvdsub_parser: Allocate input padding
Fixes: out of array read
Fixes: 9350/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVDSUB_fuzzer-5746777750765568

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-15 19:42:25 +02:00
Michael Niedermayer
2e6ea39386 avcodec/vp8_parser: Remove redundant output initialization
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-15 19:42:25 +02:00
Michael Niedermayer
9e6c843776 avcodec/dvdsub_parser: Init output buf/size
No testcase

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-15 19:42:25 +02:00
Michael Niedermayer
8d21ab4d12 avcodec/lagarith: Check that the range coded data stream is consistent when the probabilities indicate no data could have been coded.
Fixes: Timeout
Fixes: 8638/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LAGARITH_fuzzer-5132046098759680
Fixes: 8943/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LAGARITH_fuzzer-4883030219948032

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-15 19:42:25 +02:00
Michael Niedermayer
7334985ffa libavcodec/cfhd: Fix signed overflow in shift
Fixes: 8695/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4906172426485760

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-15 19:42:25 +02:00
Paul B Mahol
5d8df3cc4a Update Changelog for lensfun addition and bump minor 2018-07-15 10:23:20 +02:00
Stephen Seo
0ea20124b7 Add lensfun filter
Lensfun is a library that applies lens correction to an image using a
database of cameras/lenses (you provide the camera and lens models, and
it uses the corresponding database entry's parameters to apply lens
correction). It is licensed under LGPL3.

The lensfun filter utilizes the lensfun library to apply lens
correction to videos as well as images.

This filter was created out of necessity since I wanted to apply lens
correction to a video and the lenscorrection filter did not work for me.

While this filter requires little info from the user to apply lens
correction, the flaw is that lensfun is intended to be used on indvidual
images. When used on a video, the parameters such as focal length is
constant, so lens correction may fail on videos where the camera's focal
length changes (zooming in or out via zoom lens). To use this filter
correctly on videos where such parameters change, timeline editing may
be used since this filter supports it.

Note that valgrind shows a small memory leak which is not from this
filter but from the lensfun library (memory is allocated when loading
the lensfun database but it somehow isn't deallocated even during
cleanup; it is briefly created in the init function of the filter, and
destroyed before the init function returns). This may have been fixed by
the latest commit in the lensfun repository; the current latest release
of lensfun is almost 3 years ago.

Bi-Linear interpolation is used by default as lanczos interpolation
shows more artifacts in the corrected image in my tests.

The lanczos interpolation is derived from lenstool's implementation of
lanczos interpolation. Lenstool is an app within the lensfun repository
which is licensed under GPL3.

v2 of this patch fixes license notice in libavfilter/vf_lensfun.c

v3 of this patch fixes code style and dependency to gplv3 (thanks to
Paul B Mahol for pointing out the mentioned issues).

v4 of this patch fixes more code style issues that were missed in
v3.

v5 of this patch adds line breaks to some of the documentation in
doc/filters.texi (thanks to Gyan Doshi for pointing out the issue).

v6 of this patch fixes more problems (thanks to Moritz Barsnick for
pointing them out).

v7 of this patch fixes use of sqrt() (changed to sqrtf(); thanks to
Moritz Barsnick for pointing this out). Also should be rebased off of
latest master branch commits at this point.

Signed-off-by: Stephen Seo <seo.disparate@gmail.com>
2018-07-15 10:07:54 +02:00
Karsten Otto
c5329d64b1 aadec: improve seeking in mp3 content
MP3 frames may not be aligned to aa chunk boundaries. When seeking,
calculate the expected frame offset in the target chunk. Adjust the
timestamp and truncate the next packet accordingly.

This solution works for the majority of tested audio material. For
some rare encodings with mp3 padding or embedded id3 tags, it will
mispredict the correct offset, and at worst skip an extra frame.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-14 19:04:48 +02:00
Michael Niedermayer
181435a4de avcodec/dirac_dwt_template: Fix signedness regression in interleave()
Found-by: <jdarnley>
Tested-by: James Darnley <james.darnley@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-14 18:02:26 +02:00
Shiyou Yin
c0b42987a2 avcodec/mips: fix conflicting types error of ff_vc1_h_s_overlap_mmi.
In commit 975a1a8,function ff_vc1_h_s_overlap_mmi was refactored,
but the declaration in libavcodec/mips/vc1dsp_mips.h was unchanged.

Change-Id: I90beae683511622a0cc1130ab1660ac8669ec3ef
Signed-off-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Reviewed-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-14 18:02:26 +02:00
Gyan Doshi
28ed68fa31 avformat/movenc: add reason for minf->hdlr in MOV only 2018-07-14 12:03:50 +05:30
Marton Balint
e5ff2c0c06 avformat/mxfdec: only return stream indexes which have a corresponding track
Without this check some crafted files might crash because a packet might be
demuxed which have no corresponding mxf track.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-07-13 22:58:40 +02:00