summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
* 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>
* softfloat: handle -INT_MAX correctlyAndreas Cadhalpun2016-11-14
| | | | | | | This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* Merge commit 'd20c118975220a0256027d1c2410bade94b8534d'Hendrik Leppkes2016-11-14
|\ | | | | | | | | | | | | * commit 'd20c118975220a0256027d1c2410bade94b8534d': hwcontext_qsv: add support for p010 Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext_qsv: add support for p010Anton Khirnov2016-07-03
| |
| * hwcontext_vaapi: Add driver quirks to the hwdeviceMark Thompson2016-07-02
| | | | | | | | | | | | | | | | | | | | | | The driver being used is detected inside av_hwdevice_ctx_init() and the quirks field then set from a table of known device. If this behaviour is unwanted, the user can also set the quirks field manually. Also adds the Intel i965 driver quirk (it does not destroy parameter buffers used in a call to vaRenderPicture()) and detects that driver to set it.
* | Merge commit '2ef87815fec059504370ae3050cc243a53553915'Hendrik Leppkes2016-11-14
|\| | | | | | | | | | | | | * commit '2ef87815fec059504370ae3050cc243a53553915': hwcontext_dxva2: add support for p010 Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext_dxva2: add support for p010Anton Khirnov2016-07-02
| |
| * pixfmt: add P010 pixel formatHendrik Leppkes2016-07-02
| | | | | | | | | | | | | | P010 is the 10-bit variant of NV12 (planar luma, packed chroma), using two bytes per component to store 10-bit data plus 6-bit zeroes in the LSBs. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | lavu/pixfmt: Add GRAY10Carl Eugen Hoyos2016-11-14
| | | | | | | | Based on 7471352f by Luca Barbato.
* | Merge commit 'f62bb216ac4cfbbff16108c6bac35a0282532972'Hendrik Leppkes2016-11-13
|\| | | | | | | | | | | | | * commit 'f62bb216ac4cfbbff16108c6bac35a0282532972': hwcontext_vaapi: allow transfers to/from any size of sw frame Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext_vaapi: allow transfers to/from any size of sw frameMark Thompson2016-06-28
| | | | | | | | | | | | | | | | The hw frame used as reference has an attached size but it need not match the actual size of the surface, so enforcing that the sw frame used in copying matches its size exactly is not useful. Signed-off-by: Anton Khirnov <anton@khirnov.net>