]> git.sesse.net Git - ffmpeg/log
ffmpeg
6 years agovaapi: Add VP8 decode hwaccel
Mark Thompson [Sat, 18 Nov 2017 17:55:24 +0000 (17:55 +0000)]
vaapi: Add VP8 decode hwaccel

6 years agovp8: Add hwaccel hooks
Mark Thompson [Sat, 18 Nov 2017 17:55:18 +0000 (17:55 +0000)]
vp8: Add hwaccel hooks

Also adds some extra fields to the main context structure that may
be needed by a hwaccel decoder.

The current behaviour of the WebP decoder is maintained by adding an
additional field to the VP8 decoder private context to indicate that
it is actually being used as WebP (no hwaccel is supported for that
case).

6 years agovaapi: Make the decode profile matching more explicit
Mark Thompson [Thu, 9 Nov 2017 01:04:44 +0000 (01:04 +0000)]
vaapi: Make the decode profile matching more explicit

Also fixes a bug where it could attempt to decode with an unsupported
codec if allow-profile-mismatch was set.

6 years agoffmpeg: Use codec hardware config to configure hwaccels
Mark Thompson [Wed, 25 Oct 2017 23:18:47 +0000 (00:18 +0100)]
ffmpeg: Use codec hardware config to configure hwaccels

Removes specific support for all hwaccels supported by the generic code
(DXVA2, D3D11VA, NVDEC, VAAPI and VDPAU).

6 years agolavc: Mark all AVHWAccel structures as const
Mark Thompson [Sat, 4 Nov 2017 18:53:26 +0000 (18:53 +0000)]
lavc: Mark all AVHWAccel structures as const

6 years agolavc: Delete all fake hwaccels
Mark Thompson [Wed, 25 Oct 2017 23:18:46 +0000 (00:18 +0100)]
lavc: Delete all fake hwaccels

They are now unused.

6 years agolavc: Remove register mechanism for hwaccels
Mark Thompson [Wed, 25 Oct 2017 23:18:45 +0000 (00:18 +0100)]
lavc: Remove register mechanism for hwaccels

There is no longer any need for a list of them at runtime, because
decoders now carry the pointers to their associated hwaccels internally.
The file containing external declarations is now used to make the list
of hwaccels for configure.

6 years agolavc: Deprecate av_hwaccel_next() and av_register_hwaccel()
Mark Thompson [Wed, 25 Oct 2017 23:18:44 +0000 (00:18 +0100)]
lavc: Deprecate av_hwaccel_next() and av_register_hwaccel()

6 years agolavc: Use hardware config information in ff_get_format()
Mark Thompson [Wed, 25 Oct 2017 23:18:43 +0000 (00:18 +0100)]
lavc: Use hardware config information in ff_get_format()

This removes the dependency that hardware pixel formats previously had on
AVHWAccel instances, meaning only those which actually do something need
exist after this patch.

Also updates avcodec_default_get_format() to be able to choose hardware
formats if either a matching device has been supplied or no additional
external configuration is required, and avcodec_get_hw_frames_parameters()
to use the hardware config rather than searching the old hwaccel list.

The FF_CODEC_CAP_HWACCEL_REQUIRE_CLASS mechanism is deleted because it
no longer does anything (the codec already contains the pointers to the
matching hwaccels).

6 years agolavc: Add hardware config metadata for decoders supporting hardware output
Mark Thompson [Wed, 25 Oct 2017 23:18:40 +0000 (00:18 +0100)]
lavc: Add hardware config metadata for decoders supporting hardware output

This includes a pointer to the associated hwaccel for decoders using
hwaccels - these will be used later to implement the hwaccel setup
without needing a global list.

Also added is a new file listing all hwaccels as external declarations -
this will be used later to generate the hwaccel list at configure time.

6 years agolavc: Add codec metadata to indicate hardware support
Mark Thompson [Wed, 25 Oct 2017 23:18:39 +0000 (00:18 +0100)]
lavc: Add codec metadata to indicate hardware support

6 years agoavformat/aacdec: Fix leak in adts_aac_read_packet()
Michael Niedermayer [Sat, 25 Nov 2017 18:22:51 +0000 (19:22 +0100)]
avformat/aacdec: Fix leak in adts_aac_read_packet()

Fixes: chromium-773637/clusterfuzz-testcase-minimized-6418078673141760
Found-by: ossfuzz/chromium
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/dirac_dwt: Fix integer overflow in COMPOSE_FIDELITYi*
Michael Niedermayer [Sat, 25 Nov 2017 02:15:16 +0000 (03:15 +0100)]
avcodec/dirac_dwt: Fix integer overflow in COMPOSE_FIDELITYi*

Fixes: runtime error: signed integer overflow: -2143827186 - 7404944 cannot be represented in type 'int'
Fixes: 4354/clusterfuzz-testcase-minimized-4671122764201984
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agovorbisenc: Check the return value of av_frame_clone
Derek Buitenhuis [Fri, 24 Nov 2017 19:24:41 +0000 (19:24 +0000)]
vorbisenc: Check the return value of av_frame_clone

Prevents a segfault when alloc fails.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agodoc/ffmpeg: Document opencl for -init_hw_device
Mark Thompson [Sun, 26 Nov 2017 15:35:27 +0000 (15:35 +0000)]
doc/ffmpeg: Document opencl for -init_hw_device

6 years agodoc/fftools: Remove documentation for old -opencl_bench option
Mark Thompson [Sun, 26 Nov 2017 10:29:24 +0000 (10:29 +0000)]
doc/fftools: Remove documentation for old -opencl_bench option

6 years agonvenc: Include config.h before checking for D3D11 support
Mark Thompson [Sat, 25 Nov 2017 23:05:24 +0000 (23:05 +0000)]
nvenc: Include config.h before checking for D3D11 support

Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
6 years agohwcontext_vaapi: Do not assume that sw_format is transferable
Mark Thompson [Fri, 24 Nov 2017 00:21:26 +0000 (00:21 +0000)]
hwcontext_vaapi: Do not assume that sw_format is transferable

Drivers can support a format for surfaces without also supporting it for
images, so we can't assume that sw_format is usable for transfer.  This
would previously hit an assert in cases where it isn't.

6 years agoh264_picture: Actually return error during alloc failure
Derek Buitenhuis [Fri, 24 Nov 2017 18:21:57 +0000 (18:21 +0000)]
h264_picture: Actually return error during alloc failure

Fixes NULL dereference during alloc failure.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoavfilter: add lv2 wrapper filter
Paul B Mahol [Thu, 23 Nov 2017 15:08:42 +0000 (16:08 +0100)]
avfilter: add lv2 wrapper filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoerror_resilience: remove avpriv_atomic usage
Rostislav Pehlivanov [Fri, 24 Nov 2017 23:34:16 +0000 (23:34 +0000)]
error_resilience: remove avpriv_atomic usage

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agolibavcodec/utils.c: simplify avcodec locking with atomics
Rostislav Pehlivanov [Sat, 25 Nov 2017 16:55:44 +0000 (16:55 +0000)]
libavcodec/utils.c: simplify avcodec locking with atomics

Also makes it more robust than using volatiles.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agolavc/utils.c: use C11 atomics for entangled thread handling
Rostislav Pehlivanov [Fri, 24 Nov 2017 23:38:44 +0000 (23:38 +0000)]
lavc/utils.c: use C11 atomics for entangled thread handling

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agoavformat/mov_esds: check return value of ff_mp4_read_dec_config_descr
James Almer [Fri, 24 Nov 2017 20:55:19 +0000 (17:55 -0300)]
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>
6 years agoavformat/isom: return proper error values in ff_mp4_read_dec_config_descr
James Almer [Fri, 24 Nov 2017 20:55:05 +0000 (17:55 -0300)]
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>
6 years agofate/hapAlphaOnly : add test for hap alpha only decoding
Martin Vignali [Sat, 25 Nov 2017 18:47:06 +0000 (19:47 +0100)]
fate/hapAlphaOnly : add test for hap alpha only decoding

6 years agoavcodec/hapdec : use gray8 for HapAlphaOnly decoding instead of RGB0
Martin Vignali [Sat, 25 Nov 2017 18:46:48 +0000 (19:46 +0100)]
avcodec/hapdec : use gray8 for HapAlphaOnly decoding instead of RGB0

6 years agoavcodec/texturedsp : add rgtc1u gray decoding
Martin Vignali [Sat, 25 Nov 2017 18:41:50 +0000 (19:41 +0100)]
avcodec/texturedsp : add rgtc1u gray decoding

decode rgtc1 block in gray8 picture

6 years agohwcontext_d3d11va: properly reset values after release/close
Jan Ekström [Fri, 24 Nov 2017 00:44:44 +0000 (02:44 +0200)]
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.

6 years agoavcodec/fft: fix INTERL macro on 3dnow
Mikulas Patocka [Thu, 23 Nov 2017 19:12:55 +0000 (20:12 +0100)]
avcodec/fft: fix INTERL macro on 3dnow

The commit b7c16a3f2c4921f613319938b8ee0e3d6fa83e8d ("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>
6 years agohwcontext_opencl: Reset internal command queue on device_uninit
Mark Thompson [Sat, 25 Nov 2017 15:34:43 +0000 (15:34 +0000)]
hwcontext_opencl: Reset internal command queue on device_uninit

device_uninit can be called twice if device_init fails.

6 years agohwcontext_d3d11: Log adapter details on device creation
Mark Thompson [Tue, 14 Nov 2017 13:02:26 +0000 (13:02 +0000)]
hwcontext_d3d11: Log adapter details on device creation

This is helpful to know what device has actually been used.

6 years agoconfigure: remove superfluous cuvid and nvdec checks
James Almer [Sat, 25 Nov 2017 01:48:24 +0000 (22:48 -0300)]
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>
6 years agodoc/APIchanges: Fix lavu versions for OpenCL changes
Mark Thompson [Sat, 25 Nov 2017 14:51:55 +0000 (14:51 +0000)]
doc/APIchanges: Fix lavu versions for OpenCL changes

Also fix a typo and fill hashes and dates.

6 years agolavu/pixfmt: Remove gap in the middle of enum AVPixelFormat
Mark Thompson [Fri, 24 Nov 2017 12:36:09 +0000 (12:36 +0000)]
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>
6 years agoMerge commit '136e7cf64ce9e78de7158d6720539d51cb96b743'
Mark Thompson [Sat, 25 Nov 2017 14:38:03 +0000 (14:38 +0000)]
Merge commit '136e7cf64ce9e78de7158d6720539d51cb96b743'

* commit '136e7cf64ce9e78de7158d6720539d51cb96b743':
  qsv/hevcdec: Load hw plugin by default on non-windows os

Merged-by: Mark Thompson <sw@jkqxz.net>
6 years agoavfilter: add normalize filter
Richard Ling [Tue, 21 Nov 2017 10:32:06 +0000 (21:32 +1100)]
avfilter: add normalize filter

6 years agoffmpeg libopusdec: fix missing include file in libopusdec.c
Mikulas Patocka [Thu, 23 Nov 2017 19:22:56 +0000 (20:22 +0100)]
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>
6 years agolavf/mov: fix crash in mov_read_sidx
John Stebbins [Fri, 24 Nov 2017 16:18:16 +0000 (08:18 -0800)]
lavf/mov: fix crash in mov_read_sidx

Use correct index into streams

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/dashenc: Associate mpd extension with dash muxer
Karthick J [Wed, 22 Nov 2017 08:20:03 +0000 (13:50 +0530)]
avformat/dashenc: Associate mpd extension with dash muxer

Reviewed-by: 刘歧 <lq@chinaffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/sbrdsp_fixed: Fix integer overflow
Michael Niedermayer [Wed, 22 Nov 2017 19:18:40 +0000 (20:18 +0100)]
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>
6 years agoavformat/utils: fix mixed declarations and code
James Almer [Fri, 24 Nov 2017 20:46:16 +0000 (17:46 -0300)]
avformat/utils: fix mixed declarations and code

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavcodec/nvdec: Round up odd width/height values
Philip Langdale [Fri, 24 Nov 2017 18:05:49 +0000 (10:05 -0800)]
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.

6 years agoavformat/ttaenc: add tta_init()
James Almer [Mon, 20 Nov 2017 20:43:23 +0000 (17:43 -0300)]
avformat/ttaenc: add tta_init()

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavformat/ttaenc: buffer packets directly
James Almer [Mon, 20 Nov 2017 19:16:11 +0000 (16:16 -0300)]
avformat/ttaenc: buffer packets directly

This is a bit more robust in case of OOM.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavcodec/vorbis: 1 << 31 > int32_t::max(), so use 1u << 31 instead.
Dale Curtis [Wed, 22 Nov 2017 18:58:39 +0000 (10:58 -0800)]
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>
6 years agoavformat/utils: Prevent undefined shift with wrap_bits > 64.
Dale Curtis [Fri, 17 Nov 2017 21:35:56 +0000 (13:35 -0800)]
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>
6 years agoavfilter/af_amix: make use of av_asprintf()
Paul B Mahol [Fri, 24 Nov 2017 16:09:48 +0000 (17:09 +0100)]
avfilter/af_amix: make use of av_asprintf()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter: add mix filter
Paul B Mahol [Mon, 20 Nov 2017 18:58:44 +0000 (19:58 +0100)]
avfilter: add mix filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/af_ladspa: remove duplicate code lines
Paul B Mahol [Fri, 24 Nov 2017 12:36:26 +0000 (13:36 +0100)]
avfilter/af_ladspa: remove duplicate code lines

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcodec/j2kenc: Only allocate cblk.data once
Michael Niedermayer [Fri, 24 Nov 2017 02:49:55 +0000 (03:49 +0100)]
avcodec/j2kenc: Only allocate cblk.data once

Fixes: memleak
Found-by: <jamrial>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/hlsenc: Added option to add EXT-X-INDEPENDENT-SEGMENTS tag
Karthick J [Thu, 23 Nov 2017 22:57:36 +0000 (06:57 +0800)]
avformat/hlsenc: Added option to add EXT-X-INDEPENDENT-SEGMENTS tag

6 years agoavformat/hlsenc: Refactor an inconsistent variable name
Karthick J [Thu, 23 Nov 2017 22:42:35 +0000 (06:42 +0800)]
avformat/hlsenc: Refactor an inconsistent variable name

6 years agoavformat/hlsenc: Minor fix in setting http options for master playlist
Karthick J [Thu, 23 Nov 2017 22:41:25 +0000 (06:41 +0800)]
avformat/hlsenc: Minor fix in setting http options for master playlist

6 years agoavfilter/Makefile: skip building opencl.h when opencl is disabled
James Almer [Thu, 23 Nov 2017 22:11:17 +0000 (19:11 -0300)]
avfilter/Makefile: skip building opencl.h when opencl is disabled

Fixes make checkheaders.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agodoc/filters: mention (a)loop defaults
Lou Logan [Thu, 23 Nov 2017 20:54:26 +0000 (11:54 -0900)]
doc/filters: mention (a)loop defaults

Signed-off-by: Lou Logan <lou@lrcd.com>
6 years agodoc/filters.texi: explain infinite looping
Werner Robitza [Thu, 23 Nov 2017 12:16:53 +0000 (13:16 +0100)]
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>
6 years agoavcodec/x86/exrdsp : use ymm constant for pb_80
Martin Vignali [Tue, 21 Nov 2017 21:02:07 +0000 (22:02 +0100)]
avcodec/x86/exrdsp : use ymm constant for pb_80

speed seems to be similar, but simplify code

6 years agoRevert "udp: fix compilation when HAVE_PTHREAD_CANCEL isnt defined"
Derek Buitenhuis [Wed, 22 Nov 2017 15:28:40 +0000 (15:28 +0000)]
Revert "udp: fix compilation when HAVE_PTHREAD_CANCEL isnt defined"

This was an mplayer-specific hack.

This reverts commit a4f94f24b4f153c30bbcaa700bedfb2b3a581e5e.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoqsv/hevcdec: Load hw plugin by default on non-windows os
Li, Zhong [Fri, 10 Nov 2017 08:03:42 +0000 (03:03 -0500)]
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
b05128f3c953bd66483e697d60a2e7e45ee9cfa0.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
6 years agolavf/mov: Read aspect ratio from AVID jpeg2000 mov files.
Carl Eugen Hoyos [Thu, 23 Nov 2017 01:57:24 +0000 (02:57 +0100)]
lavf/mov: Read aspect ratio from AVID jpeg2000 mov files.

6 years agoopus_pvq: fix crashing on analysis of mono
Rostislav Pehlivanov [Thu, 23 Nov 2017 00:58:36 +0000 (00:58 +0000)]
opus_pvq: fix crashing on analysis of mono

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agotools/cl2c: Add a copyright header
Mark Thompson [Wed, 22 Nov 2017 23:55:03 +0000 (23:55 +0000)]
tools/cl2c: Add a copyright header

6 years agolavu,lavfi,ffmpeg: Remove experimental OpenCL API
Mark Thompson [Tue, 14 Nov 2017 19:47:30 +0000 (19:47 +0000)]
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).

6 years agohwcontext: Perform usual uninitialisation on derived frames contexts
Mark Thompson [Mon, 26 Jun 2017 19:28:07 +0000 (20:28 +0100)]
hwcontext: Perform usual uninitialisation on derived frames contexts

6 years agovf_hwmap: Pass mapping mode when deriving frames context on an existing device
Mark Thompson [Sun, 25 Jun 2017 21:13:03 +0000 (22:13 +0100)]
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.)

6 years agolavfi: Add OpenCL unsharp mask filter
Mark Thompson [Tue, 14 Nov 2017 19:47:27 +0000 (19:47 +0000)]
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.

6 years agolavfi: Add OpenCL overlay filter
Mark Thompson [Sun, 10 Sep 2017 20:53:36 +0000 (21:53 +0100)]
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.

6 years agolavfi: Add infrastructure for building OpenCL source into libavfilter
Mark Thompson [Sun, 10 Sep 2017 20:53:35 +0000 (21:53 +0100)]
lavfi: Add infrastructure for building OpenCL source into libavfilter

6 years agolavfi: Add some common code for OpenCL filtering
Mark Thompson [Tue, 27 Jun 2017 21:50:49 +0000 (22:50 +0100)]
lavfi: Add some common code for OpenCL filtering

6 years agohwcontext_opencl: DRM to OpenCL mapping for ARM
Mark Thompson [Sun, 10 Sep 2017 12:37:20 +0000 (13:37 +0100)]
hwcontext_opencl: DRM to OpenCL mapping for ARM

Using cl_arm_import_memory.  Unfortunately, despite this not being a
standard extension, the function clImportMemoryARM() is not accessible
via clGetExtensionFunctionAddressForPlatform().  This means that it has
to be linked directly to the ARM OpenCL binary, so making a portable
binary is not possible as it is with all other mapping extensions.

6 years agohwcontext_opencl: D3D11 to OpenCL mapping
Mark Thompson [Sun, 25 Jun 2017 21:34:40 +0000 (22:34 +0100)]
hwcontext_opencl: D3D11 to OpenCL mapping

Using cl_khr_d3d11_sharing and cl_intel_d3d11_nv12_media_sharing.

6 years agohwcontext_opencl: DXVA2 to OpenCL mapping
Mark Thompson [Sun, 5 Mar 2017 16:21:41 +0000 (16:21 +0000)]
hwcontext_opencl: DXVA2 to OpenCL mapping

Using cl_khr_dx9_media_sharing.

6 years agohwcontext_opencl: QSV to OpenCL mapping for Intel Media SDK
Mark Thompson [Sat, 4 Mar 2017 23:57:49 +0000 (23:57 +0000)]
hwcontext_opencl: QSV to OpenCL mapping for Intel Media SDK

Uses the cl_intel_va_api_media_sharing extension, which supports only
NV12 surfaces and only mapping from QSV to OpenCL.

6 years agohwcontext_opencl: VAAPI to OpenCL mapping for Intel i965+beignet
Mark Thompson [Sat, 4 Mar 2017 23:57:48 +0000 (23:57 +0000)]
hwcontext_opencl: VAAPI to OpenCL mapping for Intel i965+beignet

Supports all surface formats in common between the two.

6 years agolavu: OpenCL hwcontext implementation
Mark Thompson [Sat, 4 Mar 2017 23:57:47 +0000 (23:57 +0000)]
lavu: OpenCL hwcontext implementation

6 years agolavu: Add OpenCL hardware pixfmt
Mark Thompson [Sat, 4 Mar 2017 23:57:46 +0000 (23:57 +0000)]
lavu: Add OpenCL hardware pixfmt

6 years agodoc: Add FAQs about running in background (rev 2)
Jim DeLaHunt [Wed, 15 Nov 2017 08:43:30 +0000 (00:43 -0800)]
doc: Add FAQs about running in background (rev 2)

Add two FAQs about running FFmpeg in the background.
The first explains the use of the -nostdin option in
a straightforward way. Text revised based on review.

The second FAQ starts from a confusing error message,
and leads to the solution, use of the -nostdin option.
The purpose of the second FAQ is to attract web searches
from people having the problem, and offer them a solution.

Add an anchor to the Main Options section of the ffmpeg
documentation, so that the FAQs can link directly there.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mov: Increment stsd_count while processing stsd data; avoids leaks.
Dale Curtis [Tue, 21 Nov 2017 23:40:22 +0000 (15:40 -0800)]
avformat/mov: Increment stsd_count while processing stsd data; avoids leaks.

In the event of ff_mov_read_stsd_entries() failure, sc->stsd_count
is not updated, even if the function allocates extradata memory.
Instead update the sc->stsd_count as entries are parsed so that
mov_read_close() can do the right thing.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/jpeg2000: Dynamically allocate codeblock data
Michael Niedermayer [Sat, 18 Nov 2017 00:33:18 +0000 (01:33 +0100)]
avcodec/jpeg2000: Dynamically allocate codeblock data

Fixes: OOM
Fixes: 3541/clusterfuzz-testcase-minimized-6469958596820992
Adds support for decoding codeblock data larger than 8kb
Reduces decoder memory consumption

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavdevice/decklink_dec: autodetect the video input format
Karthick J [Fri, 27 Oct 2017 06:30:23 +0000 (12:00 +0530)]
avdevice/decklink_dec: autodetect the video input format

When -format_code is not specified autodetection will happen.

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavdevice/decklink: refactor ff_decklink_set_format function
Karthick J [Tue, 7 Nov 2017 04:02:23 +0000 (09:32 +0530)]
avdevice/decklink: refactor ff_decklink_set_format function

This is done to enable input format autodetection in decklink_dec.

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavcodec/mpeg4videodec: Check also for negative versions in the validity check
Michael Niedermayer [Tue, 21 Nov 2017 02:15:53 +0000 (03:15 +0100)]
avcodec/mpeg4videodec: Check also for negative versions in the validity check

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavfilter/af_asetnsamples: add missing error check
Paul B Mahol [Mon, 20 Nov 2017 13:02:28 +0000 (14:02 +0100)]
avfilter/af_asetnsamples: add missing error check

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agocheckasm/utvideodsp: zero initialize the entire buffer
James Almer [Tue, 21 Nov 2017 14:14:33 +0000 (11:14 -0300)]
checkasm/utvideodsp: zero initialize the entire buffer

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agocheckasm/utvideodsp: fix mixed declarations and code
James Almer [Tue, 21 Nov 2017 14:13:24 +0000 (11:13 -0300)]
checkasm/utvideodsp: fix mixed declarations and code

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agox86/utvideodsp: reuse shared constants
James Almer [Tue, 21 Nov 2017 13:57:06 +0000 (10:57 -0300)]
x86/utvideodsp: reuse shared constants

Remove the broadcast instructions as well now that they are wide
enough.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agox86/constants: make pb_80 32 byte wide
James Almer [Tue, 21 Nov 2017 13:57:03 +0000 (10:57 -0300)]
x86/constants: make pb_80 32 byte wide

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavfilter/avf_avectorscope: add swap and mirror options
Paul B Mahol [Tue, 21 Nov 2017 11:07:13 +0000 (12:07 +0100)]
avfilter/avf_avectorscope: add swap and mirror options

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agofate/hapdec : add test for hapqa decoding
Martin Vignali [Tue, 21 Nov 2017 11:01:00 +0000 (12:01 +0100)]
fate/hapdec : add test for hapqa decoding

6 years agoavcodec/hapdec : add support for hapqa decoding
Martin Vignali [Tue, 21 Nov 2017 10:59:02 +0000 (11:59 +0100)]
avcodec/hapdec : add support for hapqa decoding

6 years agoavcodec/hapdec : indent after previous commit
Martin Vignali [Tue, 21 Nov 2017 10:55:56 +0000 (11:55 +0100)]
avcodec/hapdec : indent after previous commit

6 years agoavcodec/hapdec : reorganize code before adding multi-texture decoding
Martin Vignali [Tue, 21 Nov 2017 10:55:37 +0000 (11:55 +0100)]
avcodec/hapdec : reorganize code before adding multi-texture decoding

6 years agoavcodec/huffyuvdspenc : add diff_int16 AVX2 func
Martin Vignali [Tue, 21 Nov 2017 08:17:44 +0000 (09:17 +0100)]
avcodec/huffyuvdspenc : add diff_int16 AVX2 func

6 years agoavcodec/huffyuvdspenc : reorganize diff_int16
Martin Vignali [Tue, 21 Nov 2017 08:16:18 +0000 (09:16 +0100)]
avcodec/huffyuvdspenc : reorganize diff_int16

6 years agoavcodec/huffyuvdsp : add add_int16 AVX2 func
Martin Vignali [Tue, 21 Nov 2017 08:14:35 +0000 (09:14 +0100)]
avcodec/huffyuvdsp : add add_int16 AVX2 func

6 years agoavcodec/huffyuvdsp : reorganize add_int16 asm
Martin Vignali [Tue, 21 Nov 2017 08:11:36 +0000 (09:11 +0100)]
avcodec/huffyuvdsp : reorganize add_int16 asm

6 years agoavcodec/huffyuvdsp(enc) : move duplicate macro to a template file
Martin Vignali [Tue, 21 Nov 2017 08:10:52 +0000 (09:10 +0100)]
avcodec/huffyuvdsp(enc) : move duplicate macro to a template file

6 years agocheckasm : add test for huffyuvdsp add_int16
Martin Vignali [Tue, 21 Nov 2017 08:09:42 +0000 (09:09 +0100)]
checkasm : add test for huffyuvdsp add_int16

6 years agoavcodec/x86/utvideodsp.asm : cosmetic
Martin Vignali [Tue, 21 Nov 2017 07:36:00 +0000 (08:36 +0100)]
avcodec/x86/utvideodsp.asm : cosmetic

better func separator
and add comment for the restore rgb planes10 declaration