Commit Graph

4717 Commits

Author SHA1 Message Date
Carl Eugen Hoyos
9b79c65ec0 lavu/lavc/lavf/lavfi: Do not use type modifier %zu on Windows MSVCRT. 2017-12-17 18:05:42 +01:00
Aman Gupta
e4d9f05ca7 lavu/hwcontext: add AV_HWDEVICE_TYPE_MEDIACODEC
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2017-12-16 00:52:00 +01:00
Andrew D'Addesio
9b45bcf713 libavutil: Add saturating subtraction functions
Add av_sat_sub32 and av_sat_dsub32 as the subtraction analogues to
av_sat_add32/av_sat_dadd32.

Also clarify the formulas for dadd32/dsub32.

Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
2017-12-04 07:28:45 +00:00
Thomas Köppe
53c492640c avutil/mem: Add DECLARE_ASM_ALIGNED macro for DJGPP architecture.
The macro was added in 43171a2a73, but I forgot to add it to the DJGPP architecture in that change.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-02 19:14:09 +01:00
Martin Vignali
b37196adff avutil/x86util : add macro for loading a 128 bits constants in an xmm or in each part of an ymm in order to simplify avx2 asm func 2017-12-02 18:25:15 +01:00
James Almer
d268094f88 Merge commit '99e9697e3a12ab4a6638a36b95edafd6a98f9eaa'
* commit '99e9697e3a12ab4a6638a36b95edafd6a98f9eaa':
  stereo3d: Support view type for frame sequence type

Merged-by: James Almer <jamrial@gmail.com>
2017-11-29 21:06:49 -03:00
Vittorio Giovara
99e9697e3a stereo3d: Support view type for frame sequence type
Implement detection in h264 and hevc and insertion in framepack filter.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-11-28 14:56:51 -05:00
Rodger Combs
1204ce0b63 lavu/hwcontext_opencl.h: fix build on macOS 2017-11-28 00:23:42 -06:00
Mark Thompson
6e0e3e1d8d 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.
2017-11-26 15:40:24 +00: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
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
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
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
7faae6e745 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.
2017-11-22 23:02:33 +00:00
Mark Thompson
f06754e4f3 hwcontext_opencl: D3D11 to OpenCL mapping
Using cl_khr_d3d11_sharing and cl_intel_d3d11_nv12_media_sharing.
2017-11-22 23:02:33 +00:00
Mark Thompson
9e7cda1b1e hwcontext_opencl: DXVA2 to OpenCL mapping
Using cl_khr_dx9_media_sharing.
2017-11-22 23:02:33 +00:00
Mark Thompson
403cde8e85 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.
2017-11-22 23:02:33 +00:00
Mark Thompson
eb3e9f469a hwcontext_opencl: VAAPI to OpenCL mapping for Intel i965+beignet
Supports all surface formats in common between the two.
2017-11-22 23:02:33 +00:00
Mark Thompson
b25d8ef0a7 lavu: OpenCL hwcontext implementation 2017-11-22 23:02:29 +00:00
Mark Thompson
a050f56c09 lavu: Add OpenCL hardware pixfmt 2017-11-22 23:01:29 +00:00
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
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
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
Timo Rothenpieler
6fb6170776 hwcontext_d3d11va: add missing stdint.h include
This caused checkheaders to fail on cygwin on this file.
2017-11-17 23:27:43 +01:00
Dale Curtis
01763144dc Avoid corrupting diagnostic state with _Pragma changes.
The macros for ICC and MSVC correctly push and pop the diagnostic
state of the compiler when disabling deprecation warnings. The
ones for clang/gcc should do the same. Without this, if a blanket
deprecation warning is applied to the code base it'll be flipped
back on incorrectly with FF_ENABLE_DEPRECATION_WARNINGS.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-14 20:49:07 +01:00
Muhammad Faiz
8329ae781a avutil/crc: use ff_thread_once at av_crc_get_table
Fix tsan warnings.

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-11-14 06:25:05 +07:00
Thomas Köppe
43171a2a73 Fix missing used attribute for inline assembly variables
Variables used in inline assembly need to be marked with attribute((used)).
Static constants already were, via the define of DECLARE_ASM_CONST.
But DECLARE_ALIGNED does not add this attribute, and some of the variables
defined with it are const only used in inline assembly, and therefore
appeared dead. This change adds a macro DECLARE_ASM_ALIGNED that marks
variables as used.

This change makes FFMPEG work with Clang's ThinLTO.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 03:58:34 +01:00
Mark Thompson
1ef4af2d49 hwcontext_vaapi: Fix build with libva 2.0
vaExportSurfaceHandle() wasn't included in the 2.0 release.

Fixes ticket #6828.
2017-11-12 15:38:00 +00:00
James Almer
12f4e2ba02 Merge commit '0af8a72174108b9bb482f1073a1e9a3bc258af51'
* commit '0af8a72174108b9bb482f1073a1e9a3bc258af51':
  build: Drop support for legacy TI ARM compiler

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 23:41:35 -03:00
James Almer
529de4f1b6 Merge commit '69ac24e556c6fbc7138be5a60d0b90d2a5676c3d'
* commit '69ac24e556c6fbc7138be5a60d0b90d2a5676c3d':
  aarch64: Get rid of a stray double space

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 17:46:48 -03:00
James Almer
3f27200954 Merge commit '7ac092d05de487d088bc96ab4a7bd6207fbfa98c'
* commit '7ac092d05de487d088bc96ab4a7bd6207fbfa98c':
  build: CryptGenRandom --> wincrypt, it is a better name

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 16:53:19 -03:00
James Almer
4e754e9419 Merge commit 'b46900914a1f25ce8dbf49d7c53766ff1f18b60f'
* commit 'b46900914a1f25ce8dbf49d7c53766ff1f18b60f':
  build: Merge mach/mach_time.h and mach_absolute_time() checks

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 16:42:27 -03:00
James Almer
c584368817 Merge commit '09c98327b9f25c6c1716c0ee82ce09d8b484887a'
* commit '09c98327b9f25c6c1716c0ee82ce09d8b484887a':
  build: Drop support for Tru64 Unix (OSF/1)

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 15:56:27 -03:00
James Almer
8c82c4d25d Merge commit 'ccbb31c14b766ef666ef2daa8c467e478183a957'
* commit 'ccbb31c14b766ef666ef2daa8c467e478183a957':
  qsv: Make sure the session is set with the latest version

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 15:23:49 -03:00
James Almer
98a9b1f0de Merge commit 'accb06120c13a4ead442464d96f2fa318fa07a4e'
* commit 'accb06120c13a4ead442464d96f2fa318fa07a4e':
  configure: Use dllexport/dllimport for data symbols across DLLs with mingw

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 13:15:42 -03:00
James Almer
87865bf6c7 Merge commit 'abf1c058d1bd0ed1b820ea5e501a4484756f00b0'
* commit 'abf1c058d1bd0ed1b820ea5e501a4484756f00b0':
  msvc: Properly specify dllexport for data symbols shared across dll boundaries

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 11:29:16 -03:00
James Almer
f87ad3a058 Merge commit 'e41daa62465036ad36ad0bd14e4936e848d7f07e'
* commit 'e41daa62465036ad36ad0bd14e4936e848d7f07e':
  Remove support for building for mingw32ce (Windows CE)

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 10:22:11 -03:00
James Almer
28bb96c408 Merge commit '7b7760ad6efb7b96122aa7133ad21e22653ae222'
* commit '7b7760ad6efb7b96122aa7133ad21e22653ae222':
  aarch64: Fix negative movrel offsets for windows

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 10:02:43 -03:00
Michael Niedermayer
1fa3a9a31d avutil/frame: Add private_ref to AVFrame
This gives FFmpeg libs a field that they can freely and safely use.
Avoiding the need of wrapping of a users opaque_ref field and its issues.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-10 16:44:17 +01:00
Gyan Doshi
84556ef059 lavu/timecode: clarify error msg for timecode_rate
The user-supplied value for timecode_rate in drawtext is rounded
to nearest integer. So, a supplied value of 0.49 or lower is rounded to 0.
This throws a misleading error message which says "Timecode frame rate must be
specified". Changed message to account for values under one.

Also noted supported framerates for drop TC.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-10 00:53:11 +01:00
Greg Wessels
2c2f25eb89 avutil/hwcontext_d3d11va: Fix leak when wrapping texture in AVD3D11FrameDescriptor
Reviewed-by: Aaron Levinson <alevinsn_dev@levland.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-07 22:56:43 -03:00
Martin Vignali
bb3d62874e avutil/pixdesc: remove reference to avcodec_get_chroma_sub_sample
Don't recommend to use deprecated functions.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-06 19:16:46 -03:00
Michael Niedermayer
e34fe61bf4 avutil/softfloat: Add FLOAT_MIN
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-05 22:13:16 +01:00
James Almer
2eb20caccf Merge commit 'd76479c5020ca43e67d47ba3767146b192dc4782'
* commit 'd76479c5020ca43e67d47ba3767146b192dc4782':
  ppc: Drop support for Apple GCC

Merged-by: James Almer <jamrial@gmail.com>
2017-11-01 20:16:33 -03:00
James Almer
e621b1ca64 Merge commit '97cfe1d8bd1968143e2ba9aa46ebe9504a835e24'
* commit '97cfe1d8bd1968143e2ba9aa46ebe9504a835e24':
  Convert all AVClass struct declarations to designated initializers.

Merged-by: James Almer <jamrial@gmail.com>
2017-11-01 20:05:09 -03:00
Carl Eugen Hoyos
17806f6083 lavu/murmur3: Enforce usual function attribute order. 2017-11-01 03:05:51 +01:00
James Almer
71bf534dd6 Merge commit '59cee42d7d22530e66a155305389e29679b11f78'
* commit '59cee42d7d22530e66a155305389e29679b11f78':
  arm: Check for the .arch directive in configure

Merged-by: James Almer <jamrial@gmail.com>
2017-10-30 20:04:46 -03:00