summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
* avutil/channel_layout: add av_get_extended_channel_layoutMarton Balint2017-01-24
| | | | | | | | | | | | | | Return a channel layout and the number of channels based on the specified name. This function is similar to av_get_channel_layout(), but can also parse unknown channel layout specifications. Unknown channel layout specifications are a decimal number and a capital 'C' suffix, in order to not break compatibility with the lowercase 'c' suffix, which is used for a guessed channel layout with the specified number of channels. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/channel_layout: fix remains of old syntax in docs and commentsMarton Balint2017-01-24
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* hwcontext_cuda: implement frames_get_constraintswm42017-01-23
| | | | Copied and modified from hwcontext_qsv.c.
* libavutil: add av_lfg_init_from_data() functionJonathan Campbell2017-01-22
| | | | | | seeds an AVLFG from binary data. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* hwcontext_vdpau: Fix missing subscriptsMark Thompson2017-01-17
| | | | | | Also remove the redundant casts which were hiding the error here. (cherry picked from commit 7081620aca36e616ea96f71fd71d2703e3abae09)
* avutil/tests: add aes_ctr, audio_fifo and imgutils to .gitignoreMatthieu Bouron2017-01-17
|
* avutil/tests/audio_fifo.c: pass by reference for efficiency and change ↵Thomas Turner2017-01-13
| | | | | | | datatype to const Signed-off-by: Thomas Turner <thomastdt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/reverse: move the ff_reverse declaration to a separate headerJames Almer2017-01-12
| | | | | | | | Fixes compilation with hardcoded tables after eaff1aa09e90e2711207c9463db8bf8e8dec8178 and e71b8119e7db675dd2dac3f7fb069b0df2943c38 Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: James Almer <jamrial@gmail.com>
* 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.
* avutil/tile: check clock_gettime at runtime for apple platformsWang Bin2017-01-09
| | | | | | | | | | | clock_gettime is avalible since macOS 10.12 and iOS 10.0. Because of weak linking, clock_gettime can be build without error with new macOS/iOS sdk, but the symbol may not exist on the target system. Explicitly checking the symbol is required. https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html Signed-off-by: Wang Bin <wbsecg1@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avutil/tests: added selftest for aes_ctr.cThomas Turner2017-01-02
| | | | | Signed-off-by: Thomas Turner <thomastdt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/tests: improved code coverage for atomicThomas Turner2017-01-01
| | | | | Signed-off-by: Thomas Turner <thomastdt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavutil/random_seed: Ensure that get_generic_seed() spends at least 1/32 ↵Michael Niedermayer2016-12-31
| | | | | | | | sec gathering entropy This may fix the failures on windows Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/tests/audio_fifo.c: Memory leak and tab space fixesThomas Turner2016-12-31
| | | | | | | | | | | Prevents memory leak when read_samples_from_audio_fifo() is called more than once by deallocating before reallocating more memory. Fixes space indentation for contents in ERROR(). Signed-off-by: Thomas Turner <thomastdt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/tests/audio_fifo.c: use av_malloc() family of functionsThomas Turner2016-12-31
| | | | | Signed-off-by: Thomas Turner <thomastdt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/tests/audio_fifo.c: Corrected test error messagesThomas Turner2016-12-28
| | | | | Signed-off-by: Thomas Turner <thomastdt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/random_seed: Reduce the time needed on systems with very low ↵Michael Niedermayer2016-12-24
| | | | | | | | | precission clock() This should fix issues on BSD CLOCKS_PER_SEC is 128 on BSD while SUSv2 requires it to be a million Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tests/audio_fifo: fix buffer allocation for non planar formatsJames Almer2016-12-23
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests/random_seed: eliminate gotoMichael Niedermayer2016-12-23
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/tests: Improved code coverage for random_seedThomas Turner2016-12-23
| | | | | Signed-off-by: Thomas Turner <thomastdt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tests/avstring: free the pointer after calls to av_d2str()James Almer2016-12-22
| | | | | | Fixes memleaks. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/random_seed: Improve get_generic_seed() with higher precission clock()Michael Niedermayer2016-12-22
| | | | | Tested-by: Thomas Turner <thomastdt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/random_seed: Use uint64 instead of uint8 for struct to avoid ↵Michael Niedermayer2016-12-21
| | | | | | potential alignment issues Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil: Added selftest for libavutil/audio_fifo.cThomas Turner2016-12-21
| | | | | Signed-off-by: Thomas Turner <thomastdt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil: Improved test coverage for avstring.cThomas Turner2016-12-20
| | | | | Signed-off-by: Thomas Turner <thomastdt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/imgutils: Clarify doxy for av_image_check_size2()Michael Niedermayer2016-12-16
| | | | | Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Add missing #includes for standalone spherical-information-related headersDiego Biurrun2016-12-14
| | | | | (cherry picked from commit f912fd767e55bbb5a1554bd99bacab007659609c) Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: fix data race in av_get_cpu_flags()Wan-Teh Chang2016-12-13
| | | | | | | | | | | | | | | | | | | | Make the one-time initialization in av_get_cpu_flags() thread-safe. The static variable |cpu_flags| in libavutil/cpu.c is read and written using normal load and store operations. These are considered as data races. The fix is to use atomic load and store operations. The fix can be verified by running the libavutil/tests/cpu_init.c test program under ThreadSanitizer: ./configure --toolchain=clang-tsan make libavutil/tests/cpu_init libavutil/tests/cpu_init There should be no warnings from ThreadSanitizer. Co-author: Dmitry Vyukov of Google, who suggested the data race fix. Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/tests/imgutils: Remove unused variableMichael Niedermayer2016-12-13
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* opt: reject denominator zero as out of rangeAndreas Cadhalpun2016-12-13
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avutil/tests: run the cpu_init.c test conditionally on HAVE_THREADSWan-Teh Chang2016-12-10
| | | | | | | Suggested by Diego Biurrun and James Almer. Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/cpu_init: remove unnecessary arguments to the main() functionWan-Teh Chang2016-12-10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: Add av_image_check_size2()Michael Niedermayer2016-12-10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate: add av_image_check_size() testMichael Niedermayer2016-12-10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavu: Add AVSphericalMapping type and frame side dataVittorio Giovara2016-12-07
| | | | | | | | While no decoder currently exports spherical information, this type represents a frame property that has to be passed through from container to frames. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avutil/hwcontext_cuda: check for missing pixel formatTimo Rothenpieler2016-11-30
|
* softfloat: decrease MIN_EXP to cover full float rangeAndreas Cadhalpun2016-11-25
| | | | | | | | floats are not necessarily normalized, so a normalized softfloat needs MIN_EXP lowered by 23 to cover that range. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avutil/tests: add cpu_init to .gitignore and tests/fateWan-Teh Chang2016-11-24
| | | | | | | This is a follow-up to commit d84a21207ea83055dc9b6dc1cd6a379f2ea756e7, which added the libavutil/tests/cpu_init.c. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* cuda: check for cuda.h when enabledJames Almer2016-11-24
| | | | | | | Fixes make checkheaders on systems without the Cuda Toolkit, which was broken after the dynlink changes. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests: Add cpu_init.c to check whether the one-time initialization in ↵Wan-Teh Chang2016-11-23
| | | | | | | | av_get_cpu_flags() has data races. Co-author: Dmitry Vyukov of Google Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/cpu: remove the |checked| static variableWan-Teh Chang2016-11-23
| | | | | | | | | | | Remove the |checked| variable because the invalid value of -1 for |flags| can be used to indicate the same condition. Also rename |flags| to |cpu_flags| because there are a local variable and a function parameter named |flags| in the same file. Co-author: Dmitry Vyukov of Google Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/opt: Add AV_OPT_TYPE_UINT64Michael Niedermayer2016-11-23
| | | | | | | Requested-by: wm4 ([FFmpeg-devel] [PATCH] avutil/opt: Support max > INT64_MAX in write_number() with AV_OPT_TYPE_INT64) Requested-by: ronald ([FFmpeg-devel] [PATCH] avutil/opt: Support max > INT64_MAX in write_number() with AV_OPT_TYPE_INT64) Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavutil/hwcontext_cuda: Support P010 and P016 formatsPhilip Langdale2016-11-22
| | | | | CUVID is now capable of returning 10bit and 12bit decoded content in P010/P016. Let's support transfering those formats.
* avutil: add P016 pixel formatPhilip Langdale2016-11-22
| | | | | | | | | P016 is the 16-bit variant of NV12 (planar luma, packed chroma), using two bytes per component. It may, and in fact is most likely to, be used in situations where there are less than 16 bits of data. It is the responsibility of the writer to zero out any unused LSBs.
* avutil/hwcontext_cuda: use dynamically loaded CUDATimo Rothenpieler2016-11-22
|
* avutil/opt: Fix setting int64 to its maximumMichael Niedermayer2016-11-20
| | | | | | Found-by: Andreas Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/frame: fix indention after last commitMichael Niedermayer2016-11-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/frame: Copy size=0 side data in ff_init_buffer_info()Michael Niedermayer2016-11-16
| | | | | | | | Fixes null pointer dereference Fixes: 189/FOO Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* aarch64: Add an offset parameter to the movrel macroMartin Storsjö2016-11-15
| | | | | | | | | | | | With apple tools, the linker fails with errors like these, if the offset is negative: ld: in section __TEXT,__text reloc 8: symbol index out of range for architecture arm64 This is cherry-picked from libav commit c44a8a3eabcd6acd2ba79f32ec8a432e6ebe552c. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* arm: Clear the gp register alias at the end of functionsMartin Storsjö2016-11-15
| | | | | | | | | | | | | | We reset .Lpic_gp to zero at the start of each function, which means that the logic within movrelx for clearing gp when necessary will be missed. This fixes using movrelx in different functions with a different helper register. This is cherry-picked from libav commit 824e8c284054f323f854892d1b4739239ed1fdc7. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>