Commit Graph

89250 Commits

Author SHA1 Message Date
Paul B Mahol
ffc01280be avfilter: add lv2 wrapper filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-26 14:05:25 +01:00
Rostislav Pehlivanov
3701d499f8 error_resilience: remove avpriv_atomic usage
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-11-26 02:17:23 +00:00
Rostislav Pehlivanov
590136e78d libavcodec/utils.c: simplify avcodec locking with atomics
Also makes it more robust than using volatiles.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-11-26 02:17:23 +00:00
Rostislav Pehlivanov
3154f4417a lavc/utils.c: use C11 atomics for entangled thread handling
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-11-26 02:17:23 +00:00
James Almer
abf669479c avformat/mov_esds: check return value of ff_mp4_read_dec_config_descr
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-25 23:15:28 -03:00
James Almer
08b294bf5f avformat/isom: return proper error values in ff_mp4_read_dec_config_descr
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-25 23:15:28 -03:00
Martin Vignali
8794e0c037 fate/hapAlphaOnly : add test for hap alpha only decoding 2017-11-25 19:49:34 +01:00
Martin Vignali
21c06c4095 avcodec/hapdec : use gray8 for HapAlphaOnly decoding instead of RGB0 2017-11-25 19:49:30 +01:00
Martin Vignali
07e427aa56 avcodec/texturedsp : add rgtc1u gray decoding
decode rgtc1 block in gray8 picture
2017-11-25 19:49:25 +01:00
Jan Ekström
f6d49a0dc8 hwcontext_d3d11va: properly reset values after release/close
Makes the uninit function re-entrable, which can be a common case
when an API user first tries to initialize its context, fails, and
then finally unrefs the AVHWDevice.

Fixes a crash reported by sm2345 on IRC.
2017-11-25 18:51:41 +02:00
Mikulas Patocka
fbdd78fa3e avcodec/fft: fix INTERL macro on 3dnow
The commit b7c16a3f2c ("x86: fft: Port to
cpuflags") breaks the opus decoder in ffmpeg when compiling for 3dnow. The
output is audible, but there's a lot of noise.

The reason for the breakage is that the commit unintentionally changed the
INTERL macro so that it is empty when compiling for 3dnow. This patch
fixes it.

Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-25 13:11:45 -03:00
Mark Thompson
f4e319d8a9 hwcontext_opencl: Reset internal command queue on device_uninit
device_uninit can be called twice if device_init fails.
2017-11-25 15:44:31 +00:00
Mark Thompson
8bbf2dacbf hwcontext_d3d11: Log adapter details on device creation
This is helpful to know what device has actually been used.
2017-11-25 15:44:31 +00:00
James Almer
4af050c46e configure: remove superfluous cuvid and nvdec checks
Both are autodetected, and their dependency on cuda is checked
elsewhere.

Fixes ticket #6849.

Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-25 12:43:09 -03:00
Mark Thompson
8921689575 doc/APIchanges: Fix lavu versions for OpenCL changes
Also fix a typo and fill hashes and dates.
2017-11-25 15:13:15 +00:00
Mark Thompson
e1d1924427 lavu/pixfmt: Remove gap in the middle of enum AVPixelFormat
This was added for compatibility with libav, by leaving a space for
formats added in libav to be merged.  Since that feature has been
removed, we don't need a gap here.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-25 14:42:10 +00:00
Mark Thompson
b26dd5ae2f Merge commit '136e7cf64ce9e78de7158d6720539d51cb96b743'
* commit '136e7cf64ce9e78de7158d6720539d51cb96b743':
  qsv/hevcdec: Load hw plugin by default on non-windows os

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-11-25 14:38:03 +00:00
Richard Ling
7d4fe0c5cb avfilter: add normalize filter 2017-11-25 09:51:33 +01:00
Mikulas Patocka
279d2599dd ffmpeg libopusdec: fix missing include file in libopusdec.c
This patch fixes the following error when compiling mplayer with libopus.

libavcodec/libopusdec.c: In function 'libopus_decode_init':
libavcodec/libopusdec.c:130:27: error: implicit declaration of function 'ff_exp10'; did you mean 'ff_exp2fi'? [-Werror=implicit-function-declaration]
         double gain_lin = ff_exp10(gain_db / (20.0 * 256));
                           ^~~~~~~~
                           ff_exp2fi

Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-25 02:32:54 +01:00
John Stebbins
bdddcb7b03 lavf/mov: fix crash in mov_read_sidx
Use correct index into streams

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-25 02:32:33 +01:00
Karthick J
a1f8f1340a avformat/dashenc: Associate mpd extension with dash muxer
Reviewed-by: 刘歧 <lq@chinaffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-25 02:32:33 +01:00
Michael Niedermayer
12a511f2c2 avcodec/sbrdsp_fixed: Fix integer overflow
Fixes: signed integer overflow: 2147483598 + 64 cannot be represented in type 'int'
Fixes: 4337/clusterfuzz-testcase-minimized-6192658616680448

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-25 02:32:33 +01:00
James Almer
31de45d20b avformat/utils: fix mixed declarations and code
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-24 17:46:16 -03:00
Philip Langdale
4186a77f26 avcodec/nvdec: Round up odd width/height values
nvdec will not produce odd width/height output, and while this is
basically never an issue with most codecs, due to internal alignment
requirements, you can get odd sized jpegs.

If an odd-sized jpeg is encountered, nvdec will actually round down
internally and produce output that is slightly smaller. This isn't
the end of the world, as long as you know the output size doesn't
match the original image resolution.

However, with an hwaccel, we don't know. The decoder controls
the reported output size and the hwaccel cannot change it. I was
able to trigger an error in mpv where it tries to copy the output
surface as part of rendering and triggers a cuda error because
cuda knows the output frame is smaller than expected.

To fix this, we can round up the configured width/height passed
to nvdec so that the frames are always at least as large as the
decoder's reported size, and data can be copied out safely.

In this particular jpeg case, you end up with a blank (green) line
at the bottom due to nvdec refusing to decode the last line, but
the behaviour matches cuviddec, so it's as good as you're going to
get.
2017-11-24 12:19:31 -08:00
James Almer
fa4121507c avformat/ttaenc: add tta_init()
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-24 15:05:35 -03:00
James Almer
e97667c82f avformat/ttaenc: buffer packets directly
This is a bit more robust in case of OOM.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-24 15:05:35 -03:00
Dale Curtis
9648cc6d7f avcodec/vorbis: 1 << 31 > int32_t::max(), so use 1u << 31 instead.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-24 19:03:03 +01:00
Dale Curtis
03fbc0daa7 avformat/utils: Prevent undefined shift with wrap_bits > 64.
2LL << (wrap_bits=64 - 1) does not fit in int64_t; change the
code to use a uint64_t (2ULL) and add an av_assert2() to
ensure wrap_bits <= 64.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-24 19:03:03 +01:00
Paul B Mahol
63826a0b82 avfilter/af_amix: make use of av_asprintf()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-24 17:09:48 +01:00
Paul B Mahol
ec5328aa6f avfilter: add mix filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-24 16:51:33 +01:00
Paul B Mahol
59365e6345 avfilter/af_ladspa: remove duplicate code lines
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-24 13:36:26 +01:00
Michael Niedermayer
7c191dfba7 avcodec/j2kenc: Only allocate cblk.data once
Fixes: memleak
Found-by: <jamrial>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-24 04:04:39 +01:00
Karthick J
efb51c8ebb avformat/hlsenc: Added option to add EXT-X-INDEPENDENT-SEGMENTS tag 2017-11-24 06:57:36 +08:00
Karthick J
241c1192d6 avformat/hlsenc: Refactor an inconsistent variable name 2017-11-24 06:42:35 +08:00
Karthick J
f335efc0ad avformat/hlsenc: Minor fix in setting http options for master playlist 2017-11-24 06:41:25 +08:00
James Almer
ef8979f199 avfilter/Makefile: skip building opencl.h when opencl is disabled
Fixes make checkheaders.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-23 19:11:17 -03:00
Lou Logan
a60b2425c3 doc/filters: mention (a)loop defaults
Signed-off-by: Lou Logan <lou@lrcd.com>
2017-11-23 11:54:26 -09:00
Werner Robitza
5f278620b8 doc/filters.texi: explain infinite looping
Explain how to achieve infinite looping with the loop / aloop filters.

Signed-off-by: Werner Robitza <werner.robitza@gmail.com>
2017-11-23 11:44:34 -09:00
Martin Vignali
515555af6c avcodec/x86/exrdsp : use ymm constant for pb_80
speed seems to be similar, but simplify code
2017-11-23 20:00:13 +01:00
Derek Buitenhuis
cce33ed10f Revert "udp: fix compilation when HAVE_PTHREAD_CANCEL isnt defined"
This was an mplayer-specific hack.

This reverts commit a4f94f24b4.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-11-23 14:20:32 +00:00
Li, Zhong
136e7cf64c qsv/hevcdec: Load hw plugin by default on non-windows os
Software plugin is not available on Linux, Only works on Windows.
Similar changes have been applied to qsv hevc encoder by
b05128f3c9.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2017-11-23 12:59:02 +01:00
Carl Eugen Hoyos
8b62647a5f lavf/mov: Read aspect ratio from AVID jpeg2000 mov files. 2017-11-23 02:57:24 +01:00
Rostislav Pehlivanov
6e0723470b opus_pvq: fix crashing on analysis of mono
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-11-23 01:00:08 +00:00
Mark Thompson
79a26ef802 tools/cl2c: Add a copyright header 2017-11-22 23:55:23 +00:00
Mark Thompson
3650cb2dfa lavu,lavfi,ffmpeg: Remove experimental OpenCL API
This was added in early 2013 and abandoned several months later; as far as
I can tell, there are no external users.  Future OpenCL use will be via
hwcontext, which requires neither special OpenCL-only API nor global state
in libavutil.

All internal users are also deleted - this is just the unsharp filter
(replaced by unsharp_opencl, which is more flexible) and the deshake filter
(no replacement).
2017-11-22 23:20:39 +00:00
Mark Thompson
0f93cef2d6 hwcontext: Perform usual uninitialisation on derived frames contexts 2017-11-22 23:20:32 +00:00
Mark Thompson
5514bab37a vf_hwmap: Pass mapping mode when deriving frames context on an existing device
To match creation on a newly-derived device.  (This was missed earlier
because the mode is only used in some cases.)
2017-11-22 23:18:42 +00:00
Mark Thompson
7faa8d8b03 lavfi: Add OpenCL unsharp mask filter
Intended to replace existing opencl mode of the unsharp filter.
Supports many more pixel formats and works without immediate upload
and download of frame data.  The options are compatible with the
existing filter.
2017-11-22 23:18:35 +00:00
Mark Thompson
9204b2deea lavfi: Add OpenCL overlay filter
Input and output formats must be the same, the overlay format must be
the same as the input except possibly with an additional alpha component.
2017-11-22 23:18:02 +00:00
Mark Thompson
59d6529333 lavfi: Add infrastructure for building OpenCL source into libavfilter 2017-11-22 23:17:34 +00:00