summaryrefslogtreecommitdiffstats
path: root/libavutil
Commit message (Collapse)AuthorAgeFilesLines
* lavu: add new D3D11 pixfmt and hwcontextwm42017-06-089-3/+678
| | | | | | | | | | | | | | | | | | | | To be used with the new d3d11 hwaccel decode API. With the new hwaccel API, we don't want surfaces to depend on the decoder (other than the required dimension and format). The old D3D11VA pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the decoder configuration, and thus is incompatible with the new hwaccel API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D and an index. It's simpler and compatible with the new hwaccel API. The introduced hwcontext supports only the new pixfmt. Frame upload code untested. Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avutil/md5: fix misaligned readsJames Almer2017-06-021-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes ubsan happy and also considerably increases performance on big endian systems. Tested on an IBM POWER7 3.55 GHz Before: 2.24user 0.14system 0:02.39elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k 2.26user 0.11system 0:02.38elapsed 99%CPU (0avgtext+0avgdata 2688maxresident)k 2.23user 0.15system 0:02.38elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k 2.25user 0.12system 0:02.38elapsed 100%CPU (0avgtext+0avgdata 2624maxresident)k 2.20user 0.15system 0:02.36elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k After: 1.86user 0.13system 0:02.00elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k 1.89user 0.11system 0:02.01elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k 1.85user 0.14system 0:02.00elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k 1.84user 0.15system 0:01.99elapsed 99%CPU (0avgtext+0avgdata 2624maxresident)k 1.89user 0.13system 0:02.02elapsed 99%CPU (0avgtext+0avgdata 2688maxresident)k Tested-by: Nicolas George <george@nsup.org> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
* vaapi: Add ABGR map only if VA_FOURCC_ABGR is definedElviss Strazdins2017-05-291-0/+2
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avutil/hwcontext_dxva2: Don't improperly free IDirect3DSurface9 objectsAaron Levinson2017-05-201-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Add dxva2_pool_release_dummy() and use it in call to av_buffer_create() in dxva2_pool_alloc(). Prior to this change, av_buffer_create() was called with NULL for the third argument, which indicates that av_buffer_default_free() should be used to free the buffer's data. Eventually, it gets to buffer_pool_free() and calls buf->free() on a surface object (which is av_buffer_default_free()). This can result in a crash when the debug version of the C-runtime is used on Windows. While it doesn't appear to result in a crash when the release version of the C-runtime is used on Windows, it likely results in memory corruption, since av_free() is being called on memory that was allocated using IDirectXVideoAccelerationService::CreateSurface(). Signed-off-by: Aaron Levinson <alevinsn@aracnet.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* arm: Check for the .arch directive in configureMartin Storsjö2017-05-081-0/+2
| | | | | | | | | | | | When targeting windows, the .arch directive isn't available. So far, when building for windows, we've always used gas-preprocessor, both when using msvc's armasm and when using clang. Lately, clang/llvm has implemented the last missing piece (altmacro support) for building our assembly without gas-preprocessor. This means that we now build for arm/windows with clang without any extra compatibility layer. Signed-off-by: Martin Storsjö <martin@martin.st>
* hwcontext: Improve allocation in derived contextsMark Thompson2017-04-304-3/+22
| | | | | | | Use the flags argument of av_hwframe_ctx_create_derived() to pass the mapping flags which will be used on allocation. Also, set the format and hardware context on the allocated frame automatically - the user should not be required to do this themselves.
* hwcontext_qsv: Implement mapping frames to the child device typeMark Thompson2017-04-301-2/+86
|
* hwcontext_qsv: Implement mapping frames from the child device typeMark Thompson2017-04-301-32/+142
| | | | Factorises out existing surface initialisation code to reuse.
* hwcontext: Add frame context mapping for nontrivial contextsMark Thompson2017-04-302-1/+13
| | | | | | | Some frames contexts are not usable without additional format-specific state in hwctx. This change adds new functions frames_derive_from and frames_derive_to to initialise this state appropriately when deriving a frames context which will require it to be set.
* hwcontext_qsv: Support derivation from child devicesMark Thompson2017-04-301-29/+84
|
* spherical: add functions to retrieve and request projection namesJames Almer2017-04-273-1/+47
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mem: uninline av_malloc(z)_array()Anton Khirnov2017-04-262-12/+16
| | | | | | Inlining public functions hardcodes their implementation into the ABI, so it should be avoided unless there is a very good reason for it. No such reason exists in this case.
* pixfmt: Add gbrap10 pixel formatPaul B Mahol2017-04-132-0/+32
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* thread: Define ff_mutex_* macros as stub functions when threads are disabledDiego Biurrun2017-04-121-4/+4
| | | | Silences a bunch of "statement with no effect" warnings with threads disabled.
* libavutil: Make LOCAL_ALIGNED(xx be equal to LOCAL_ALIGNED_xx(Martin Storsjö2017-03-311-4/+5
| | | | | | | | | | | Previously, the former form always produced a manually aligned, padded buffer, while the latter can use DECLARE_ALIGNED, if that amount of stack alignment is supported. libavutil/internal.h needs to include mem.h, since it uses the DECLARE_ALIGNED macro. Signed-off-by: Martin Storsjö <martin@martin.st>
* hwcontext: Move NONE to the be the first member of AVHWDeviceTypeMark Thompson2017-03-272-2/+3
| | | | Also use that to fix a warning in av_hwdevice_get_type_name().
* spherical: Change types of bounding and pad to uint32_tVittorio Giovara2017-03-231-5/+5
| | | | | | | | | These values are defined to be 32bit in the specification, so it makes more sense to store them as fixed width. Based on a patch by Micahel Niedermayer <michael@niedermayer.cc>. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavu: Drop deprecated av_dlog macroVittorio Giovara2017-03-232-17/+0
| | | | Deprecated in 05/2015.
* lavu: Drop deprecated option typeVittorio Giovara2017-03-232-6/+0
| | | | Deprecated in 02/2014.
* lavu: Drop deprecated VDPAU pixel formatsVittorio Giovara2017-03-233-51/+0
| | | | Deprecated in 07/2013.
* lavc: Drop deprecated stream codec tagVittorio Giovara2017-03-231-2/+2
| | | | Deprecated in 07/2015.
* lavc: Remove deprecated XvMC support hacksDiego Biurrun2017-03-233-17/+0
| | | | Deprecated in 11/2013.
* Bump major versions of all librariesVittorio Giovara2017-03-231-6/+6
| | | | | | | | | This disables everything that was deprecated at least 18 months ago. Readjust the minimum API version as needed, postponing any API-incompatible changes until the next bump. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* libavutil: Hook up the rest of the gcc specific attributes to clang as wellMartin Storsjö2017-03-221-6/+6
| | | | | | | | | | | | | | | | | | | | | Hook up all attributes that don't have a MSVC specific version at the moment. See f637046d313 for details. These don't seem to be critical for building with clang in MSVC mode though, and thus haven't been hooked up until now. These seem to build fine with as old clang as 3.3 at least. (clang 3.3 disguises itself as gcc 4.2 normally, so all of these have been used for clang before, except for av_cold.) The clang version numbers themselves are useless for detecting what attributes are available, since Apple's clang builds use a completely different versioning (presenting itself as e.g. clang 8.0 instead of 3.8). Signed-off-by: Martin Storsjö <martin@martin.st>
* libavutil: Define the noreturn attribute for clang in MSVC mode as wellMartin Storsjö2017-03-211-1/+1
| | | | | | | | | | | This is a follow-up to f637046d313. Without the noreturn attribute set, avconv_opt.c fails to build after d2e6dd32a44 with the error "control may reach end of non-void function". By making sure the noreturn attribute is set properly, this compiles as intended. Signed-off-by: Martin Storsjö <martin@martin.st>
* hwcontext: Make it easier to work with device typesMark Thompson2017-03-203-1/+70
| | | | | | Adds functions to convert to/from strings and a function to iterate over all supported device types. Also adds a new invalid type AV_HWDEVICE_TYPE_NONE, which acts as a sentinel value.
* hwcontext: Add device derivationMark Thompson2017-03-204-1/+100
| | | | | Creates a new device context from another of a different type which refers to the same underlying hardware.
* x86util: Port all macros to cpuflagsDiego Biurrun2017-03-141-21/+31
| | | | | | Also do some small cosmetic changes: Drop pointless _MMX suffix from ABSD2 macro name, drop pointless check for MMX support, we always assume MMX is available in our SIMD code, fix spelling.
* spherical: Add tiled equirectangular type and projection-specific propertiesVittorio Giovara2017-03-073-1/+93
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* libavutil: add av_mod_uintp2James Almer2017-03-011-0/+14
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* intmath: add faster clz supportGanesh Ajjanagadde2017-03-011-0/+19
|
* build: Generalize yasm/nasm-related variable namesDiego Biurrun2017-03-012-7/+7
| | | | None of them are specific to the YASM assembler.
* aarch64: Add parentheses around the offset parameter in movrelMartin Storsjö2017-02-161-2/+2
| | | | | | This fixes building with clang for linux with PIC enabled. Signed-off-by: Martin Storsjö <martin@martin.st>
* hwcontext_vaapi: Try to support the VDPAU wrapperMark Thompson2017-02-132-34/+52
| | | | | | | | The driver is somewhat bitrotten (not updated for years) but is still usable for decoding with this change. To support it, this adds a new driver quirk to indicate no support at all for surface attributes. Based on a patch by wm4 <nfxjfg@googlemail.com>.
* hwcontext_dxva2: support D3D9Exwm42017-02-111-30/+87
| | | | | | | | D3D9Ex uses different driver paths. This helps with "headless" configurations when no user logs in. Plain D3D9 device creation will fail if no user is logged in, while it works with D3D9Ex. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* AVFrame: add an opaque_ref fieldwm42017-02-113-2/+22
| | | | | | | | | | | | | | | This is an extended version of the AVFrame.opaque field, which can be used to attach arbitrary user information to an AVFrame. The usefulness of the opaque field is rather limited, because it can store only up to 32 bits of information (or 64 bit on 64 bit systems). It's not possible to set this field to a memory allocation, because there is no way to deallocate it correctly. The opaque_ref field circumvents this by letting the user set an AVBuffer, which makes the user data refcounted. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* frame: allow align=0 (meaning automatic) for av_frame_get_buffer()Anton Khirnov2017-02-113-2/+8
| | | | | This will avoid every caller from hardcoding some specific alignment, which may break in the future with new instruction sets.
* cpu: add a function for querying maximum required data alignmentAnton Khirnov2017-02-113-1/+27
|
* imgutils: Document av_image_get_buffer_size()Vittorio Giovara2017-02-101-1/+5
|
* asm: Consistently uppercase SECTION markersDiego Biurrun2017-02-031-1/+1
|
* hwcontext_cuda: implement frames_get_constraintswm42017-02-011-0/+26
| | | | | | Copied and modified from hwcontext_qsv.c. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Mark some arrays that never change as const.Anton Khirnov2017-02-015-9/+9
|
* fifo: Return the correct AVERROR valueLuca Barbato2017-01-261-1/+1
|
* des-test: Pass the proper types to av_des_*() functionsDiego Biurrun2017-01-241-16/+19
| | | | Fixes a number of incompatible pointer type warnings.
* frame: add a cropping rectangle to AVFrameAnton Khirnov2017-01-123-2/+32
| | | | | Extend the width/height doxy to clarify that it should store coded values.
* hmac: Explicitly convert types at function pointer assignmentDiego Biurrun2017-01-091-12/+23
| | | | | Fixes a number of warnings of the type libavutil/hmac.c:61:21: warning: assignment from incompatible pointer type
* crypto: consistently use size_t as type for length parametersDiego Biurrun2017-01-095-4/+30
| | | | size_t is the correct type to use for sizes.
* x86inc: Avoid using eax/rax for storing the stack pointerHenrik Gramner2017-01-091-0/+7
| | | | | | | | | | | When allocating stack space with an alignment requirement that is larger than the current stack alignment we need to store a copy of the original stack pointer in order to be able to restore it later. If we chose to use another register for this purpose we should not pick eax/rax since it can be overwritten as a return value. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* build: Generate pkg-config files from Make and not from configureDiego Biurrun2016-12-221-0/+1
| | | | | | | | This moves work from the configure to the Make stage where it can be parallelized and ensures that pkgconfig files are updated when library versions change. Bug-Id: 449
* ppc: Merge types_altivec.h into util_altivec.hDiego Biurrun2016-12-142-48/+22
| | | | There is no point in keeping the two separate.
OpenPOWER on IntegriCloud