Commit Graph

89150 Commits

Author SHA1 Message Date
Mark Thompson 1dc483a6f2 compat/cuda: Pass a logging context to load functions
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-11-20 15:47:05 +00:00
Zhong Li f7d77b4112 lavf/qsv_vpp: check the return value of ff_formats_ref()
Fixes the build warning of "ignoring return value of ‘ff_formats_ref’,
declared with attribute warn_unused_result"

Signed-off-by: Zhong Li <zhong.li@intel.com>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-11-20 15:47:05 +00:00
Zhong Li 81c615f0fe lavf/qsv_overlay: check the return value of ff_formats_ref()
Fixes the build warning of "ignoring return value of ‘ff_formats_ref’,
declared with attribute warn_unused_result"

Signed-off-by: Zhong Li <zhong.li@intel.com>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-11-20 15:47:05 +00:00
Zhong Li 0f0b2ece38 lavu/qsv: remove unused variable
Fixes build warning of "variable 's' is declared but not used"

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-11-20 15:45:01 +00:00
Jun Zhao 3db5961727 hwcontext_vaapi: add the fourcc of I420 format map.
VA-API 2.0 have enable the I420, so enable this map.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-11-20 15:42:50 +00:00
Philip Langdale 6b77a10e43 avcodec: Implement mpeg4 nvdec hwaccel
This was predictably nightmarish, given how ridiculous mpeg4 is.
I had to stare at the cuvid parser output for a long time to work
out what each field was supposed to be, and even then, I still don't
fully understand some of them. Particularly:

vop_coded: If I'm reading the decoder correctly, this flag will always
           be 1 as the decoder will not pass the hwaccel any frame
           where it is not 1.
divx_flags: There's obviously no documentation on what the possible
            flags are. I simply observed that this is '0' for a
            normal bitstream and '5' for packed b-frames.
gmc_enabled: I had a number of guesses as to what this mapped to.
             I picked the condition I did based on when the cuvid
             parser was setting flag.

Also note that as with the vdpau hwaccel, the decoder needs to
consume the entire frame and not the slice.
2017-11-20 07:21:41 -08:00
Philip Langdale 8bca292c30 avcodec: Implement mpeg1 nvdec hwaccel
Once I remembered that there's a separate decoder type for mpeg1,
even though params struct is shared with mpeg2, everything worked.
2017-11-20 07:03:26 -08:00
Philip Langdale 4c7b023d56 avcodec: Refactor common nvdec hwaccel logic
The 'simple' hwaccels (not h.264 and hevc) all use the same bitstream
management and reference lookup logic so let's refactor all that into
common functions.

I verified that casting a signed int -1 to unsigned char produces 255
according to the C language specification.
2017-11-20 07:03:26 -08:00
Paul B Mahol 16d67fabb1 avfilter/avfiltergraph: pass correct audio/video flags
Previously video flags where set for audio option.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:58:50 +01:00
Paul B Mahol 5c7c0c5b58 avfilter/af_afftfilt: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:54:04 +01:00
Paul B Mahol 4073046089 avfilter/af_headphone: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:54:04 +01:00
Paul B Mahol d1b284119b avfilter/af_afir: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:54:04 +01:00
Paul B Mahol 200f497997 avfilter/af_surround: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:54:04 +01:00
Carl Eugen Hoyos 0f75d77a16 lavf/mov: Do not mix variable declaration and code.
Fixes a warning:
libavformat/mov.c:1195:5: warning: ISO C90 forbids mixed declarations and code
2017-11-20 13:48:28 +01:00
Paul B Mahol 185af4ccb1 avfilter/af_extrastereo: fix filtering when clipping is disabled
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 10:58:35 +01:00
Steven Liu 25aff9d820 avformat/hlsenc: use FFABS to instead of abs
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-11-20 10:51:57 +08:00
Steven Liu 462a14b1e9 avformat/swfenc: use FFABS to instead of abs
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-11-20 10:51:06 +08:00
Steven Liu cb259467d1 avformat/mxf: use FFABS to instead of abs
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-11-20 10:50:30 +08:00
Steven Liu a30085f570 avformat/mp3dec: use FFABS to instead of abs
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-11-20 10:49:42 +08:00
Vishwanath Dixit 218ce1f623 tests/fate: addition of test case for hls variant stream creation with master playlist
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2017-11-20 10:05:33 +08:00
Vishwanath Dixit 77ab1d7bae avformat/hlsenc: creation of hls master playlist file
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2017-11-20 10:04:34 +08:00
Vishwanath Dixit 92a32d0747 avformat/hlsenc: creation of hls variant streams in a single hlsenc instance
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2017-11-20 10:02:11 +08:00
Dave Rice 8f4702a93f avformat/movenc: write clap atom for uncompressed yuv in mov
fixes 6145

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-20 02:40:45 +01:00
Dave Rice 1e5f923416 avformat/movenc: correct ImageDescription for uncompressed ycbcr
Per
https://developer.apple.com/library/content/technotes/tn2162/_index.html

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-20 02:40:45 +01:00
pkviet 77b6e3ee27 ffmpeg: add ui64 type to SpecifierOpt
Adds ui64 (uint64_t) as a possible type for SpecifierOpt. This enables
 use of uint64_t options with SpecifierOpt such as channel_layout
 when expressed as a 64 bit channel mask.

Signed-off-by: pkviet <pkv.stream@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-20 02:40:30 +01:00
James Almer 54486e3f09 avcodec: remove unnecessary AVPacketSideDataType enum offset
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-19 22:07:48 -03:00
Carl Eugen Hoyos 3c113421ed doc/codecs.texi: Remove documentation of removed codec flags.
The flags were removed in b79a7da3
2017-11-20 01:10:54 +01:00
James Almer c9cd990dcc Merge commit '3152058bf1dca318898550efacf0286f4836cae6'
* commit '3152058bf1dca318898550efacf0286f4836cae6':
  libavcodec: Don't use dllexport, only dllimport when building DLLs

Merged-by: James Almer <jamrial@gmail.com>
2017-11-19 18:26:45 -03:00
James Almer c6f7eb8663 configure: fix module dependencies on zlib
select should not be used with external libraries. It's mean to soft
enable internal modules/features.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-19 18:14:48 -03:00
Paul B Mahol 69cbebbd3d avfilter/af_surround: add some more layouts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-19 21:20:16 +01:00
Paul B Mahol 460df96904 avfilter: fix indentation
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-19 21:18:00 +01:00
Martin Storsjö 3152058bf1 libavcodec: Don't use dllexport, only dllimport when building DLLs
The only purpose of dllexport (which is set while building the library
that exports the symbols) is to have the linker automatically
export such symbols into a DLL without using a def file - it doesn't
affect the generated code.

For both MSVC and mingw builds, this isn't essential since we override
what symbols to export via an autogenerated def file instead.

Update a comment in configure to refer to the right concept.

With lld, this avoids warnings about duplicate export directives,
when some symbols are requested to be exported both via dllexport
attributes and via the autogenerated def file.

This also reduces the number of lines of code marginally.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-11-19 22:01:38 +02:00
Gyan Doshi e75fe0ef21 avformat/subfile: allow to extract till EOF
Users can set end offset as 0 to extract till end of file.
Tested locally and documented.
2017-11-19 19:11:50 +01:00
Michael Roitzsch 4f4e19914d lavfi/af_pan: fix sign handling in channel coefficient parser
When a channel formula ends with a subtraction, the next formula will
otherwise have its first coefficient negated.
2017-11-19 17:32:11 +01:00
James Darnley 0b7cd29d47 configure: add audio_frame_queue dependency for aptx codec 2017-11-19 14:54:34 +01:00
Paul B Mahol e679ac8d7c avfilter: add acontrast filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-19 12:50:04 +01:00
James Cowgill 0ecb1c53c8 avformat/dashenc: fix min_seg_duration option size
In the DASHContext structure, min_seg_duration is declared as an int,
but the AVOption list claimed it was an INT64. Change the option list
to use the correct size, which should fix some initialization errors
seen on big-endian platforms.

Signed-off-by: James Cowgill <jcowgill@debian.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-19 04:38:29 +01:00
Vitaly _Vi Shukela 80ef3c8360 ffmpeg: Allow "-to" on input files in addition to "-t"
For some strange reason "-t" option was only implemented
for input files while both "-t" and "-to" were available
for use for output files. This made extracting a range from
input file inconvenient.

This patch enables -to option for input so one can do

    ffmpeg -ss 1:23:20 -to 1:27:22.3 -i myinput.mkv ...

Signed-off-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-19 04:38:29 +01:00
DHE ae61bcbdf8 ffmpeg_filter: use nb_threads=1 on unused filtergraph
Signed-off-by: DHE <git@dehacked.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-19 04:38:29 +01:00
James Almer 936a4c04b9 avformat: remove unnecessary AVStreamParseType enum offset
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-18 20:17:05 -03:00
Carl Eugen Hoyos c3b5ea7530 lavf/tcp: Fix the type of the optlen argument to getsockopt().
Fixes a warning on aix:
libavformat/tcp.c:283:58: warning: passing argument 5 of 'getsockopt' from incompatible pointer type
2017-11-18 17:40:18 +01:00
Philip Langdale 7c9f739d86 avcodec: Implement mpeg2 nvdec hwaccel
This is mostly straight-forward. The weird part is that it should
just work for mpeg1, but I see corruption in my test cases, so I'm
going to try and fix that separately.
2017-11-18 08:13:50 -08:00
Philip Langdale 5a0f6b099f avcodec: Fix reference data type for nvdec vc1 hwaccel
I took the reference lookup code from the vp9 hwaccel where the
type is unsigned char, but for vc1, the type is signed int.

This is particularly important because the value used when there's
no reference is different (255 vs -1).

It didn't seem to break anything, but for mpeg1/2/4, this mistake
caused decode errors.
2017-11-18 08:05:21 -08:00
Jim DeLaHunt fb791d2876 Ignore libavcodec/tests/mpeg12framerate, a test program
Add to libavcodec/tests/.gitignore an entry for test
program libavcodec/tests/mpeg12framerate . Other
similar test programs, e.g. jpeg2000dwt and dct, are
ignored in a similar way.

On initially checking out master, and doing "./configure"
and "make clean", "git status" reports no untracked
files. After running "make fate", "git status" reports
untracked file "libavcodec/tests/mpeg12framerate".

mpeg12framerate is a unit test program. It was apparently
introduced in commit
278c308cea, on
Tue Sep 12 22:11:56 2017 +0100. It added a new function
ff_mpeg12_find_best_frame_rate() to
libavcodec/mpeg12framerate.c , and the code in
libavcodec/tests/mpeg12framerate.c to exercise that
function. This commit also added the new program to
the FATE suite, but it omitted a .gitignore entry.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-18 11:57:57 +01:00
John Stebbins 20c38f2e70 lavf/mov: don't read outside frag_index bounds
Potentially fixes:
https://bugs.chromium.org/p/chromium/issues/detail?id=786269#c1

In theory, the crash can be triggered by an invalid stream that has
either tfdt or trun outside of the moof

Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-18 11:57:57 +01:00
Dale Curtis 5eaaffaf64 Use ff_thread_once for fixed, float table init.
These tables are static so they should only be initialized once
instead of on every call to ff_mpadsp_init().

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-18 11:57:57 +01:00
Dale Curtis d073be2291 Fix leak of frame_duration_buffer in mov_fix_index().
Should be unconditionally freed at the end of mov_fix_index() in
case it hasn't been used during the fix up.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Sasi Inguva <isasi-at-google.com@ffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-18 11:57:57 +01:00
Michael Niedermayer 4f7f70738e avcodec/mlpdsp: Fix undefined shift ff_mlp_pack_output()
Fixes: runtime error: left shift of negative value -7862264
Fixes: 4074/clusterfuzz-testcase-minimized-4516104123711488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-18 11:57:57 +01:00
Michael Niedermayer 2ab9568a2c avcodec/zmbv: Check that the buffer is large enough for mvec
Fixes: Timeout
Fixes: 4143/clusterfuzz-testcase-4736864637419520

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-18 11:57:57 +01:00
Michael Niedermayer 73964680d7 avcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD137iL0()
Fixes: 4035/clusterfuzz-testcase-minimized-6479308925173760
Fixes: runtime error: signed integer overflow: 9 * 402653183 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>
2017-11-18 11:57:57 +01:00