summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
* hwcontext_vaapi: Fix build failure with old libdrmJun Zhao2017-09-14
| | | | | Signed-off-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* hwcontext_vaapi: Add DRM to VAAPI mappingMark Thompson2017-09-13
|
* lavu: Add DRM hwcontextMark Thompson2017-09-13
|
* add missing ignore filesJesse Liu2017-09-10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavu/timer.h: add Linux Perf API supportClément Bœsch2017-09-08
| | | | | | | | | | | | Refer to "checkasm: use perf API on Linux ARM*" commit for the rationale. The implementation is somehow duplicated with checkasm, but so is the current usage of AV_READ_TIME(). Until these implementations and heuristics are made consistent, I don't see a way of sharing that code. Note: when using libavutil/timer.h, it is now important to include before any other include due to the _GNU_SOURCE requirement.
* lavu/tests: move timer.h include earlierClément Bœsch2017-09-08
| | | | | In the next commit, timer.h will require a _GNU_SOURCE to be set before including system headers. This commit prevents compilation failures.
* lavu/tests/des: rename crypt to crypt_refClément Bœsch2017-09-08
| | | | | This will prevent a symbol clash with crypt(3) after unistd.h is included.
* lavu/timer.h: factor out timer reportClément Bœsch2017-09-08
| | | | This commit is meant to reduce the diff in the following one.
* avcodec/mips: Improve vp9 mc msa functionsKaustubh Raste2017-09-08
| | | | | | | | Load the specific destination bytes instead of MSA load and pack. Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com> Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavutil/opencl: fix potential null dereferenceTimo Rothenpieler2017-08-27
| | | | | | | Fixes CID 1396840 Reviewed-by: Wei Gao <highgod0401@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avutil/eval: add linear interpolation helperPaul B Mahol2017-08-19
|
* Add macros to x86util.asm .Ivan Kalvachev2017-08-18
| | | | | | | | | Improved version of VBROADCASTSS that works like the avx2 instruction. Emulation of vpbroadcastd. Horizontal sum HSUMPS that places the result in all elements. Emulation of blendvps and pblendvb. Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
* Add single precision planar RGB pixel formatsVittorio Giovara2017-08-15
| | | | | | Add a pixel format flag to identify this family. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* pixfmt: Support chroma-derived and ictcp color matricesVittorio Giovara2017-08-10
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARYMartin Storsjö2017-08-10
| | | | | | | | | | | | | | | If using the winstore compat library, a fallback LoadLibrary function does exist, that only calls LoadPackagedLibrary though (which doesn't work for dynamically loading d3d11 DLLs). Therefore explicitly check the targeted API family instead. Make this check a reusable HAVE_* component which other parts of the libraries can check when necessary as well. Signed-off-by: Martin Storsjö <martin@martin.st> Merged from Libav commit 4d330da006fe48178.
* imgutils: add function to clear an image to blackwm42017-08-08
| | | | | | | | | | | | | | | | | | | | | Black isn't always just memset(ptr, 0, size). Limited YUV in particular requires relatively non-obvious values, and filling a frame with repeating 0 bytes is disallowed in some contexts. With component sizes larger than 8 or packed YUV, this can become relatively complicated. So having a generic function for this seems helpful. In order to handle the complex cases in a generic way without destroying performance, this code attempts to compute a black pixel, and then uses that value to clear the image data quickly by using a function like memset. Common cases like yuv410p10 or rgba can't be handled with a simple memset, so there is some code to fill memory with 2/4/8 byte patterns. For the remaining cases, a generic slow fallback is used. Signed-off-by: Anton Khirnov <anton@khirnov.net> Merged from Libav commit 45df7adc1d9b7.
* lavc, lavu: move frame cropping to a convenience functionwm42017-08-08
| | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net> Merged from Libav commit 47399ccdfd.
* libavutil: add GRAY9 pixel formatPaul B Mahol2017-08-07
|
* hwcontext_cuda : Support YUV444P16 formatYogender Gupta2017-08-03
| | | | Signed-off-by: Philip Langdale <philipl@overt.org>
* fate: update pixfmt_best test to check for endiannessTobias Rapp2017-07-27
| | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* avutil/frame: add ICC Profile to av_frame_side_data_nameJames Almer2017-07-26
| | | | | Reviwed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/mips: Optimize avc idct 4x4 for msaKaustubh Raste2017-07-25
| | | | | | | | Removed memset call and improved performance. Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com> Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavu/frame: add new side data type for ICC profilesRostislav Pehlivanov2017-07-25
| | | | | | | | Many image formats support embedding of ICC profiles directly in their bitstreams. Add a new side data type to allow exposing them to API users. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* pixdesc: Reindent after previous commitMark Thompson2017-07-22
|
* pixdesc: Explicitly handle invalid arguments to av_find_best_pix_fmt_of_2()Mark Thompson2017-07-22
|
* libavutil/mips: Updated msa generic macrosKaustubh Raste2017-07-21
| | | | | | | | | | | Reduced msa load-store code. Removed inline asm of GP load-store for 64 bit. Updated variable names in GP load-store macros for naming consistency. Corrected macro descriptions. Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com> Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil: merge slice threading implementation from avcodec and avfilterMuhammad Faiz2017-07-19
| | | | | | | | | | | | Rework it to improve performance. Now mutex is not shared by workers, instead each worker has its own mutex and condition variable. This reduces lock contention between workers. Also use atomic variable for counter. The interface also allows execute to run special function on main thread, requested by Ronald. Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* pixdesc: Add a test for av_find_best_pix_fmt_of_2()Mark Thompson2017-07-18
|
* pixdesc: Improve scoring for opaque/unknown pixel formatsMark Thompson2017-07-18
| | | | | | | | | | | | | Hardware pixel formats do not tell you anything about their actual contents, but should still score higher than formats with completely unknown properties, which in turn should score higher than invalid formats. Do not return an AVERROR code as a score. Fixes a hang in libavfilter where format negotiation gets stuck in a loop because AV_PIX_FMT_NONE scores more highly than all other possibilities.
* avutil/threadmessage: fix error return in case of av_fifo_alloc failureAleksandr Slobodeniuk2017-07-14
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavu/cpu: disable MMX warning on non x86 platformsClément Bœsch2017-06-29
| | | | | We have AV_CPU_FLAG_ARMV8 == AV_CPU_FLAG_SSE3 which causes a trigger of this MMX warning on AArch64.
* hwcontext_d3d11va: use correct license headerHendrik Leppkes2017-06-28
|
* hwcontext_d3d11va: add option to enable debug modewm42017-06-27
| | | | | | | | | | | Basically copied from VLC (LGPL): http://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/win32/direct3d11.c;h=e9fcb83dcabfe778f26e63d19f218caf06a7c3ae;hb=HEAD#l1482 http://git.videolan.org/?p=vlc.git;a=blob;f=modules/codec/avcodec/d3d11va.c;h=85e7d25caebc059a9770da2ef4bb8fe90816d76d;hb=HEAD#l599 Merges Libav commit cfc9e7c94eafa33e7f109099664ec4fb57ac5ca3. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dxva: support DXGI_FORMAT_420_OPAQUE decodingwm42017-06-27
| | | | | | | | | | | | | | Some devices (some phones, apparently) will support only this opaque format. Of course this won't work with CLI, because copying data directly is not supported. Automatic frame allocation (setting AVCodecContext.hw_device_ctx) does not support this mode, even if it's the only supported mode. But since opaque surfaces are generally less useful, that's probably ok. Merges Libav commit 5030e3856c2126fb829edb828f5aae011d178eb4. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* hwcontext_d3d11va: allocate staging texture lazilywm42017-06-27
| | | | | | | | | | Makes dealing with formats that can not be used for staging textures easier (DXGI_FORMAT_420_OPAQUE). It also saves memory if the staging texture is never needed, so this is a good thing. Merges Libav commit 98d73e4174333b37d961b79e1182be5a02156c02. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* hwcontext_d3d11va: fix crash on frames_init failurewm42017-06-27
| | | | | | | | | It appears in this case, frames_ininit is called twice (once by av_hwframe_ctx_init(), and again by unreffing the frames ctx ref). Merges Libav commit 086321c612185469ebb85a1887527c8915b488b7. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* d3d11va: Link directly to dxgi.dll and d3d11.dll functions if LoadLibrary is ↵Martin Storsjö2017-06-27
| | | | | | | | | | | | | unavailable When targeting the UWP API subset, the LoadLibrary function is not available (and the fallback, LoadPackagedLibrary, can't be used to load system DLLs). In these cases, link directly to the functions in the DLLs instead of trying to load them dynamically at runtime. Merges Libav commit fd1ffa1f10e940165035ccb79d4a6523da196062. Signed-off-by: Martin Storsjö <martin@martin.st>
* dxva: add support for new dxva2 and d3d11 hwaccel APIswm42017-06-27
| | | | | | | | | | | | | | | This also adds support to avconv (which is trivial due to the new hwaccel API being generic enough). The new decoder setup code in dxva2.c is significantly based on work by Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites. Merges Libav commit f9e7a2f95a7194a8736cc1416a03a1a0155a3e9f. Also adds untested VP9 support. The check for DXVA2 COBJs is removed. Just update your MinGW to something newer than a 5 year old release. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavu: add new D3D11 pixfmt and hwcontextwm42017-06-27
| | | | | | | | | | | | | | | | | | | | | | 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. Merges Libav commit fff90422d181744cd75dbf011687ee7095f02875. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* x86inc: don't use read-only data sections on COFF targetsJames Almer2017-06-27
| | | | | | | | | | | | | Yasm: src/libavfilter/x86/af_volume.asm:24: warning: Standard COFF does not support read-only data sections src/libavfilter/x86/af_volume.asm:24: warning: Unrecognized qualifier `align' Nasm: src/libavfilter/x86/af_volume.asm:24: error: standard COFF does not support section alignment specification src/libavutil/x86/x86inc.asm:92: ... from macro `SECTION_RODATA' defined here Tested-by: Clément Bœsch <u@pkh.me> Signed-off-by: James Almer <jamrial@gmail.com>
* build: Generalize yasm/nasm-related variable namesDiego Biurrun2017-06-21
| | | | | | | | None of them are specific to the YASM assembler. (Cherry-picked from libav commit 39e208f4d4756367c7cd2d581847e0c1b8a429c1) Signed-off-by: James Almer <jamrial@gmail.com>
* x86/aacpsdsp: add ff_ps_hybrid_synthesis_deint_{sse,sse4}James Almer2017-06-18
| | | | About 2x faster than the c version.
* avutil/tests: remove float_dsp testJames Almer2017-06-14
| | | | | | It's been ported to checkasm. Signed-off-by: James Almer <jamrial@gmail.com>
* hwcontext: Improve allocation in derived contextsMark Thompson2017-06-14
| | | | | | | | | 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. (cherry picked from commit c5714b51aad41fef56dddac1d542e7fc6b984627)
* hwcontext_qsv: Implement mapping frames to the child device typeMark Thompson2017-06-14
| | | | (cherry picked from commit e1c5d56b18b82e3fb42382b1b1f972e8b371fc38)
* hwcontext_qsv: Implement mapping frames from the child device typeMark Thompson2017-06-14
| | | | | | Factorises out existing surface initialisation code to reuse. (cherry picked from commit eaa5e0710496db50fc164806e5f49eaaccc83bb5)
* hwcontext: Add frame context mapping for nontrivial contextsMark Thompson2017-06-14
| | | | | | | | | 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. (cherry picked from commit 27978155bc661eec9f22bcf82c9cfc099cff4365)
* hwcontext_qsv: Support derivation from child devicesMark Thompson2017-06-14
| | | | (cherry picked from commit aa51bb3d2756ed912ee40645efccf5f4a9609696)
* hwcontext: Make it easier to work with device typesMark Thompson2017-06-14
| | | | | | | | 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. (cherry picked from commit b7487f4f3c39b4b202e1ea7bb2de13902f2dee45)
* hwcontext: Add device derivationMark Thompson2017-06-14
| | | | | | | Creates a new device context from another of a different type which refers to the same underlying hardware. (cherry picked from commit b266ad56fe0e4ce5bb70118ba2e2b1dabfaf76ce)