summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
* configure: Support MSVC 2015Luca Barbato2015-06-08
| | | | | | | | | | | The C runtime C99 compatibility had been improved a lot and it now rejects some of the compatibility defines provided for the older versions. Many thanks to Ray for the time spent testing. Bug-Id: 864 CC: libav-stable@libav.org
* x86: check for AV_CPU_FLAG_AVXSLOW where usefulJames Almer2015-05-31
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* x86: Add helper macros to check for slow cpuflagsJames Almer2015-05-31
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* x86: add AV_CPU_FLAG_AVXSLOW flagJames Almer2015-05-31
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* ppc: vsx: Implement diff_pixels and get_pixelsLuca Barbato2015-05-31
| | | | Use a macro to abstract the endianness.
* ppc: vsx: Implement float_dspLuca Barbato2015-05-31
|
* ppc: cpu: Add support for VSX and POWER8 extensionsLuca Barbato2015-05-31
|
* ppc: Restrict some Altivec implementations to Big EndianLuca Barbato2015-05-31
| | | | | In Little Endian the vec_ld/vec_st operations work as expected only for byte-vectors.
* ppc: Clarify and extend the cpuid checkLuca Barbato2015-05-31
| | | | Add POWER entries.
* ppc: linux: Check altivec using the auxvLuca Barbato2015-05-31
| | | | Should prevent trying to use altivec when it is disabled by the kernel.
* ppc: avutil: Use the abriged vector typesLuca Barbato2015-05-31
|
* ppc: avutil: Drop a potentially dangerous workaroundLuca Barbato2015-05-31
| | | | The compiler is free to optimize such expressions in any sort of way.
* pixfmt: remove misleading and broken documentationwm42015-05-28
| | | | | | | | | | | | | | | | | | | | This was probably broken some time ago. The breakage is now part of the ABI. For example, we have: AV_PIX_FMT_XYZ12BE AV_PIX_FMT_NV16 AV_PIX_FMT_NV20LE AV_PIX_FMT_NV20LE is wrong. It has the value 113, but as little-endian format it should be even. This must have been quite obvious when these formats were added (because of the AV_PIX_FMT_XYZ12BE entry), but nobody cared or knew about this. The future libavutil major bump will also break this additionally, because disabling FF_API_VDPAU will remove an odd number of entries from the middle of the enum. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* x86inc: Clear __SECT__Timothy Gu2015-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silences warning(s) like: libavcodec/x86/fft.asm:93: warning: section flags ignored on section redeclaration The cause of this warning is that because `struc` and `endstruc` attempts to revert to the previous section state [1]. The section state is stored in the macro __SECT__, defined by x86inc.asm to be `.note.GNU-stack ...`, through the `SECTION` directive [2]. Thus, the `.note.GNU-stack` section is defined twice (once in x86inc.asm, once during `endstruc`), causing the warning. That is the first part of the commit: using the primitive `[section]` format for .note.GNU-stack etc., which does not update `__SECT__` [2]. That fixes only half of the problem. Even without any `SECTION` directives, `__SECT__` is predefined as `.text`, which conflicting with the later `SECTION_TEXT` (which expands to `.text align=16`). [1]: http://www.nasm.us/doc/nasmdoc6.html#section-6.4 [2]: http://www.nasm.us/doc/nasmdoc6.html#section-6.3 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* D3D11va: add a Direct3D11 video decoder similar to DXVA2Steve Lhomme2015-05-25
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* log: Print a full backtrace along with error messages under ValgrindVittorio Giovara2015-04-20
| | | | | | | | Useful to understand where and in what execution state a certain message is generated. It is enabled only when optimizations are disabled, since function names are not printed otherwise. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avutil: remove pointless bmi1 defineJames Almer2015-04-19
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* log: Introduce a more verbose debug levelVittorio Giovara2015-04-19
| | | | And deprecate av_dlog macro.
* parseutils: Make av_small_strptime publicLuca Barbato2015-04-07
| | | | | | And use it in libavformat. Based on a similar patch by Stefano Sabatini <stefasab@gmail.com>.
* parseutils: Extend small_strptime to be used in avformatLuca Barbato2015-04-06
| | | | The strptime implementation is supposed to support whitespace and %T.
* lavc: add MMAL hardware decoder wrapperwm42015-03-29
| | | | | | Based on a patch by Rodger Combs. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* pixfmt: Update documentation with prefixed pixel formatsVittorio Giovara2015-03-23
|
* pixdesc: Replace a few leftover instances of non AV-prefixed flagsVittorio Giovara2015-03-23
|
* mov: Write the display matrix in orderVittorio Giovara2015-03-23
| | | | | | | | | | This will allow to copy the matrix as is and it is just cleaner to keep the matrix in the same order specified by the mov standard (which is also explicitly described in the documentation). In order to preserve compatibility, flip the angle sign in the display API av_display_rotation_set() and av_display_rotation_get(), and improve the documentation mentioning the rotation direction.
* Replace a few leftover instances of enum PixelFormat with enum AVPixelFormatMartin Storsjö2015-03-17
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* arm: Suppress tags about used cpu arch and extensionsMartin Storsjö2015-03-07
| | | | | | | | | | When all the codepaths using manually set .arch/.fpu code is behind runtime detection, the elf attributes should be suppressed. This allows tools to know that the final built binary doesn't strictly require these extensions. Signed-off-by: Martin Storsjö <martin@martin.st>
* libavutil: Add ARM av_clip_intp2_armPeter Meerwald2015-02-21
| | | | | | | | | | add ARM code for implementing av_clip_intp2 using the ssat instruction on Cortex-A8, av_clip_intp2_arm() is faster than av_clip_intp2_c() and the generic av_clip(), about -19% Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* libavutil: Add av_clip_intp2Peter Meerwald2015-02-21
| | | | | | | | | | | | | | | | | there already is a function, av_clip_uintp2() that clips a signed integer to an unsigned power-of-two range, i.e. 0,2^p-1 this patch adds a function av_clip_intp2() that clips a signed integer to a signed power-of-two range, i.e. -(2^p),(2^p-1) the new function can be used as a special case for av_clip(), e.g. av_clip(x, -8192, 8191) can be rewritten as av_clip_intp2(x, 13) there are ARM instructions, usat and ssat resp., which map nicely to these functions (see next patch) Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* pixfmt: add a pixel format for QSV hwaccelAnton Khirnov2015-02-19
|
* Don't anonymously typedef structsDiego Biurrun2015-02-14
|
* frame: clarify buf documentationAnton Khirnov2015-02-08
| | | | Mention explicitly that the array must be filled contiguously.
* mem: fix pointer pointer aliasing violationsRémi Denis-Courmont2015-02-01
| | | | | | | | | This uses explicit memory copying to read and write pointer to pointers of arbitrary object types. This works provided that the architecture uses the same representation for all pointer types (the previous code made that assumption already anyway). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* lavu: Check av_dict_set allocationsLuca Barbato2015-01-29
| | | | | Bug-Id: CID 1257772 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* Add a side data type for audio service type.Anton Khirnov2015-01-27
| | | | | Currently, audio service type is a field in AVCodecContext. However, side data is more appropriate for this kind of information.
* lavu: add planar 16 bit and 8 bit rgb with alphaPaul B Mahol2015-01-14
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* imgutils: create misc functions for dealing with buffersStefano Sabatini2015-01-14
| | | | | | | | | | | | | | | | | Move the lavc/imgconvert functions and rename them as follows: avpicture_get_size -> av_image_get_buffer_size() avpicture_fill -> av_image_fill_arrays() avpicture_layout -> av_image_copy_to_buffer() The new functions have an align parameter, which allows to define the linesize alignment assumed in the buffer (which is set or read). The names of the functions are consistent with the lavu/samples API (av_samples_get_buffer_size(), av_samples_fill_arrays()). A redundant check has been dropped from av_image_fill_arrays(). Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* opt: check memory allocationVittorio Giovara2015-01-05
| | | | | CC: libav-stable@libav.org Bug-Id: CID 1257771
* check memory errors from av_strdup()Vittorio Giovara2014-12-18
|
* lavu: Refactor side data wipingLuca Barbato2014-12-18
| | | | | | | | And make sure the nb_side_data field is reset as well. Based on an initial patch from wm4 <nfxjfg@googlemail.com>. CC: libav-stable@libav.org
* thread: use "" instead of <> for including the w32pthreads wrapperAnton Khirnov2014-12-14
| | | | Found-by: Dave Yeo <dave.r.yeo@gmail.com>
* aarch64: Use .data.rel.ro for const data with relocationsMartin Storsjö2014-12-09
| | | | | | | This reverts commit c00365b46d464ce47716315c1801818d811bdb9a in addition to using a different section. Signed-off-by: Martin Storsjö <martin@martin.st>
* arm: Use .data.rel.ro for const data with relocationsMartin Storsjö2014-12-09
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* v210enc: Add SIMD optimised 8-bit and 10-bit encodersKieran Kunhya2014-12-05
| | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavu: fix memory leaks by using a mutex instead of atomicswm42014-11-27
| | | | | | | | | | | | | | | | | | | | | The buffer pool has to atomically add and remove entries from the linked list of available buffers. This was done by removing the entire list with a CAS operation, working on it, and then setting it back again (using a retry-loop in case another thread was doing the same thing). This could effectively cause memory leaks: while a thread was working on the buffer list, other threads would allocate new buffers, increasing the pool's total size. There was no real leak, but since these extra buffers were not needed, but not free'd either (except when the buffer pool was destroyed), this had the same effects as a real leak. For some reason, growth was exponential, and could easily kill the process due to OOM in real-world uses. Fix this by using a mutex to protect the list operations. The fancy way atomics remove the whole list to work on it is not needed anymore, which also avoids the situation which was causing the leak. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavu: add wrappers for the pthreads mutex APIAnton Khirnov2014-11-27
| | | | | | | | | | Also add no-op fallbacks when threading is disabled. This helps keeping the code clean if Libav is compiled for targets without threading. Since we assume that no threads of any kind are used in such configurations, doing nothing is ok by definition. Based on a patch by wm4 <nfxjfg@googlemail.com>.
* Share the utf8 to wchar conversion routine between lavf and lavuMartin Storsjö2014-11-27
| | | | | | | | This doesn't add any dependency on library internals, since this only is a static inline function that gets built into each of the calling functions - this is only to reduce the code duplication. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavu: move internal define to the only places where it is usedVittorio Giovara2014-11-24
|
* opt: Fix the documentation mentioning av_set_string3Luca Barbato2014-11-11
| | | | It is av_opt_set now.
* avstring: Mark some character handling functions av_constHenrik Gramner2014-11-07
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Use gmtime_r instead of gmtime and localtime_r instead of localtimeMartin Storsjö2014-10-26
| | | | | | | | | | | gmtime isn't thread safe in general. In msvcrt (which lacks gmtime_r), the buffer used by gmtime is thread specific though. One call to localtime is left in avconv_opt.c, where thread safety shouldn't matter (instead of making avconv depend on the libavutil internal header). Signed-off-by: Martin Storsjö <martin@martin.st>