summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
* 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)
* hwcontext_vaapi: Try to support the VDPAU wrapperMark Thompson2017-06-14
| | | | | | | | | | 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>. (cherry picked from commit e791b915c774408fbc0ec9e7270b021899e08ccc)
* x86inc: Add some additional cpuflag relationsHenrik Gramner2017-06-12
| | | | | | | | Simplifies writing assembly code that depends on available instructions. LZCNT implies SSE2 BMI1 implies AVX+LZCNT AVX2 implies BMI2
* x86inc: Remove argument from WIN64_RESTORE_XMMAnton Mitrofanov2017-06-09
| | | | | The use of rsp was pretty much hardcoded there and probably didn't work otherwise with stack_size > 0.
* x86inc: Prefer r14/r15 over r12/r13 on x86-64Henrik Gramner2017-06-09
| | | | | | | Due to a peculiarity in the ModR/M addressing encoding, the r12 and r13 registers sometimes requires an additional byte when used as a base register. r14 and r15 doesn't have that issue, so prefer using them.
* x86inc: Make REP_RET identical to RET in SSSE3+ functionsHenrik Gramner2017-06-09
| | | | There's no point in emitting a rep prefix before ret on modern CPUs.
* x86inc: Fix call with memory operandsHenrik Gramner2017-06-09
| | | | | | We overload the `call` instruction with a macro, but it would misbehave when the macro argument wasn't a valid identifier. Fix it by explicitly checking if the argument is an identifier.
* libavutil/eval: Add round function to expression parserKevin Mark2017-06-06
| | | | | | | We have floor, ceil, and trunc. Let's add round. Signed-off-by: Kevin Mark <kmark937@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/softfloat: Fix sign error in and improve documentation of av_int2sf()Michael Niedermayer2017-06-04
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/pixfmt: remove superfluous defineJames Almer2017-06-01
| | | | | | It's an AVColorSpace value since 82ad9cbd32c873bced9adf4a2bb67dcda7294c61. Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit 'b83aea73404f6f9314e72fe5d6238deaffa12b2c'Clément Bœsch2017-05-19
|\ | | | | | | | | | | | | | | | | * commit 'b83aea73404f6f9314e72fe5d6238deaffa12b2c': des-test: Pass the proper types to av_des_*() functions See 183c3fa48acaf4561d5269ab9a766d13ae70140c Merged-by: Clément Bœsch <u@pkh.me>
| * des-test: Pass the proper types to av_des_*() functionsDiego Biurrun2017-01-24
| | | | | | | | Fixes a number of incompatible pointer type warnings.
* | avutil/hwcontext_dxva2: Don't improperly free IDirect3DSurface9 objectsAaron Levinson2017-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | hwcontext_videotoolbox: fix fate-sourcewm42017-05-15
| | | | | | | | Thanks to James Darnley for figuring out what the hell it wanted.
* | videotoolbox: add hwcontext supportwm42017-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds tons of code for no other benefit than making VideoToolbox support conform with the new hwaccel API (using hw_device_ctx and hw_frames_ctx). Since VideoToolbox decoding does not actually require the user to allocate frames, the new code does mostly nothing. One benefit is that ffmpeg_videotoolbox.c can be dropped once generic hwaccel support for ffmpeg.c is merged from Libav. Does not consider VDA or VideoToolbox encoding. Fun fact: the frame transfer functions are copied from vaapi, as the mapping makes copying generic boilerplate. Mapping itself is not exported by the VT code, because I don't know how to test.
* | x86/float_dsp: remove usage of integer instructionsJames Almer2017-05-12
| |
* | Merge commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3'James Almer2017-05-08
|\| | | | | | | | | | | | | * commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3': frame: add a cropping rectangle to AVFrame Merged-by: James Almer <jamrial@gmail.com>
| * frame: add a cropping rectangle to AVFrameAnton Khirnov2017-01-12
| | | | | | | | | | Extend the width/height doxy to clarify that it should store coded values.
* | avutil/softfloat: Fix overflow in av_div_sf()Michael Niedermayer2017-05-06
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/softfloat: Fix multiple runtime error: left shift of negative value -8Michael Niedermayer2017-05-06
| | | | | | | | | | | | | | Fixes: 1352/clusterfuzz-testcase-minimized-5757565017260032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '00b6a765430e5c5cacf0bd1be8b318d631cd4e14'Clément Bœsch2017-05-05
|\| | | | | | | | | | | | | * commit '00b6a765430e5c5cacf0bd1be8b318d631cd4e14': hmac: Explicitly convert types at function pointer assignment Merged-by: Clément Bœsch <cboesch@gopro.com>
| * hmac: Explicitly convert types at function pointer assignmentDiego Biurrun2017-01-09
| | | | | | | | | | Fixes a number of warnings of the type libavutil/hmac.c:61:21: warning: assignment from incompatible pointer type
* | lavu/sha512: update length argument following sha+md5 changesClément Bœsch2017-05-05
| |
* | Merge commit 'e435beb1ea5380a90774dbf51fdc8c941e486551'Clément Bœsch2017-05-05
|\| | | | | | | | | | | | | * commit 'e435beb1ea5380a90774dbf51fdc8c941e486551': crypto: consistently use size_t as type for length parameters Merged-by: Clément Bœsch <cboesch@gopro.com>
| * crypto: consistently use size_t as type for length parametersDiego Biurrun2017-01-09
| | | | | | | | size_t is the correct type to use for sizes.
| * x86inc: Avoid using eax/rax for storing the stack pointerHenrik Gramner2017-01-09
| | | | | | | | | | | | | | | | | | | | | | 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>
* | lavu/timecode: Increase AV_TIMECODE_STR_SIZE.Carl Eugen Hoyos2017-05-05
| | | | | | | | | | Fixes the following warning: libavutil/timecode.c:103:60: warning: '%02d' directive output may be truncated writing between 2 and 10 bytes into a region of size between 0 and 7
* | Merge commit '92db5083077a8b0f8e1050507671b456fd155125'James Almer2017-05-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '92db5083077a8b0f8e1050507671b456fd155125': build: Generate pkg-config files from Make and not from configure build: Store library version numbers in .version files Includes cherry-picked commits 8a34f3659371680ca523aecfd9098c28f0f809eb and ee164727dd64c199b87118917e674b17c25e0da3 to fix issues. Changes were also made to retain support for raise_major and build_suffix. Reviewed-by: ubitux Merged-by: James Almer <jamrial@gmail.com>
| * build: Generate pkg-config files from Make and not from configureDiego Biurrun2016-12-22
| | | | | | | | | | | | | | | | 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
* | Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'Clément Bœsch2017-05-03
|\| | | | | | | | | | | | | | | | | * commit '11a9320de54759340531177c9f2b1e31e6112cc2': build: Move build-system-related helper files to a separate subdirectory "ffbuild" directory name is used instead of "avbuild". Merged-by: Clément Bœsch <u@pkh.me>
* | avutil/softfloat: use ldexp(), fixes undefined shiftMichael Niedermayer2017-05-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>