summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
* timecode: Support HFR valuesVittorio Giovara2015-10-26
|
* timecode: Do not fail for non-standard frameratesVittorio Giovara2015-10-26
| | | | | | Instead just warn, and use the parse fps normally. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avutil/opt: print more meaningful default flags valuesClément Bœsch2015-10-25
| | | | | | | | | | Example: % ./ffmpeg -h encoder=gif [...] GIF encoder AVOptions: -gifflags <flags> E..V.... set GIF flags (default offsetting+transdiff) offsetting E..V.... enable picture offsetting transdiff E..V.... enable transparency detection between frames
* avutil/tree: clean up pointer incompatibility warningsGanesh Ajjanagadde2015-10-25
| | | | | | | Commit 7c8fcbbde3a299096974f9061c8b5be0e526f4c2 introduced some warnings that get triggered on the test build. This should fix them. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil/tree: Document the guaranteed ordering of compare arguments for ↵Michael Niedermayer2015-10-25
| | | | | | av_tree_find() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/tree: add additional const qualifier to the comparatorGanesh Ajjanagadde2015-10-24
| | | | | | | | | | | | | libc's qsort comparator has a const qualifier on both arguments. This adds a missing const qualifier to exactly match the comparator API. Existing usages of av_tree_find, av_tree_insert are appropriately modified: type signature changes of the comparators, and removal of unnecessary void * casts of function pointers. Reviewed-by: Henrik Gramner <henrik@gramner.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil/tree: improve documentation for av_tree_find, av_tree_insertGanesh Ajjanagadde2015-10-24
| | | | | | | | | This documents the additional constness, and provides a useful libc reference for the API specification of the comparator. Reviewed-by: Henrik Gramner <henrik@gramner.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil/qsort: use the do while form for AV_QSORT, AV_MSORTGanesh Ajjanagadde2015-10-23
| | | | | Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil/intmath: fix undefined behavior in ff_ctzll_c()Michael Niedermayer2015-10-22
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil: merge avpriv_float_dsp_init into avpriv_float_dsp_allocAndreas Cadhalpun2015-10-21
| | | | | | | | Also replace the last two usages of avpriv_float_dsp_init with avpriv_float_dsp_alloc. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avutil: install des.h, rc4.h and tree.h as public headersAndreas Cadhalpun2015-10-21
| | | | | | | | | | | | | | | | | | | | | | | | These headers contain functions supposed to be public. libavutil/des.h: av_des_alloc av_des_crypt av_des_init av_des_mac libavutil/rc4.h: av_rc4_alloc av_rc4_crypt av_rc4_init libavutil/tree.h av_tree_destroy av_tree_enumerate av_tree_find av_tree_insert av_tree_node_alloc av_tree_node_size Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* lavu/intmath.h: Move x86 only msvc/icl functions to x86 specific header.Matt Oliver2015-10-19
| | | | Signed-off-by: Matt Oliver <protogonoi@gmail.com>
* lavu/intmath.h: Add msvc/icl ctzll optimisations.Matt Oliver2015-10-19
| | | | Signed-off-by: Matt Oliver <protogonoi@gmail.com>
* avutil/opt: display a better default value for int/int64 optionsClément Bœsch2015-10-19
| | | | | | | | | | | | Example: % ./ffmpeg -h encoder=aac -aac_coder <int> E...A... Coding algorithm (from -1 to 3) (default twoloop) faac E...A... FAAC-inspired method anmr E...A... ANMR method twoloop E...A... Two loop searching method fast E...A... Constant quantizer [...]
* avutil: use EINVAL instead of -1 for the return code of crypto related init ↵Ganesh Ajjanagadde2015-10-18
| | | | | | | | | | | functions These functions return an error typically when the key size is an incorrect number. AVERROR(EINVAL) is more specific than -1. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* opencl: Force the use of 1.2 APIsTimothy Gu2015-10-17
| | | | | | | | Silences warnings regarding `clCreateCommandQueue` being deprecated. Only a very limited number of products support 2.0. Since the replacement API (`clCreateCommandQueueWithProperties`) is only available in 2.0, we should not update it just yet.
* opencl: Use "opencl" as log context nameTimothy Gu2015-10-17
| | | | All other classes use lowercase names.
* opencl: Print compilation logTimothy Gu2015-10-17
| | | | Useful when debugging.
* opencl: Print error string when compilation failsTimothy Gu2015-10-17
|
* avutil/mem: add av_warn_unused_resultGanesh Ajjanagadde2015-10-16
| | | | | | | | This adds av_warn_unused_result to functions whose return codes need to be checked. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil: undo FF_API_CRYPTO_CONTEXT deprecationJames Almer2015-10-16
| | | | | | | | | | It's been argued that the benefits of the current implementation far outweight those of making the structs opaque. This deprecation is not present in any release, so it can be safely removed. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/file: add av_warn_unused_result to av_file_mapGanesh Ajjanagadde2015-10-16
| | | | | | | The return code here should be checked. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil/internal: add av_warn_unused_result to avpriv_openGanesh Ajjanagadde2015-10-16
| | | | | | | | The open syscall can obviously fail, and its return code needs to be checked. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil/cast5: update Doxygen for av_cast5_init with return informationGanesh Ajjanagadde2015-10-15
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avutil/crc: use EINVAL instead of -1 for the return code of av_crc_init()Michael Niedermayer2015-10-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* winrt: multithreading supportwang-bin2015-10-16
| | | | | | _beginthreadex is for desktop only. CreateThread is available for windows store apps on windows (and phone) 8.1 and later. http://msdn.microsoft.com/en-us/library/ms682453%28VS.85%29.aspx Signed-off-by: Matt Oliver <protogonoi@gmail.com>
* Merge commit 'c53e796f8b69799b7ad6d28fbab981d37edf1bc9'Hendrik Leppkes2015-10-14
|\ | | | | | | | | | | | | * commit 'c53e796f8b69799b7ad6d28fbab981d37edf1bc9': thread: Provide no-op variants for pthread_once Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * thread: Provide no-op variants for pthread_onceLuca Barbato2015-10-14
| |
* | avutil/fifo: add function av_fifo_generic_peek_at()Zhang Rui2015-10-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/intmath: use de Bruijn based ff_ctzGanesh Ajjanagadde2015-10-14
| | | | | | | | | | | | | | | | | | | | | | It has already been demonstrated that the de Bruijn method has benefits over the current implementation: commit 971d12b7f9d7be3ca8eb98e6c04ed521f83cbd3c. That commit implemented it for long long, this extends it to the int version. Tested with FATE. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Merge commit '11c5f438ff83da5040e85bfa6299f56b321d32ef'Hendrik Leppkes2015-10-14
|\| | | | | | | | | | | | | * commit '11c5f438ff83da5040e85bfa6299f56b321d32ef': dict: Change return type of av_dict_copy() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dict: Change return type of av_dict_copy()Vittorio Giovara2015-10-12
| | | | | | | | | | | | av_dict_set() could return an error, so forward it appropriately. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * avutil/avstring: Inline some tiny functionsHenrik Gramner2015-10-03
| | | | | | | | | | | | | | They're short enough that inlining them actually reduces code size due to all the overhead associated with making a function call. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avutil/fifo: Fix thread saftey of av_fifo_generic_peek()Michael Niedermayer2015-10-13
| | | | | | | | | | | | | | changing the context state and restoring it is not safe if another thread writes data into the fifo Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | intmath: remove av_ctz.Ronald S. Bultje2015-10-11
| | | | | | | | | | It's a non-installed header and only used in one place (flacenc). Since ff_ctz is static inline, it's fine to use that instead.
* | avutil/intmath: Change debruijn_ctz64 to use 8bit elementsMichael Niedermayer2015-10-11
| | | | | | | | | | | | | | This reduces the memory & cache need from 256 to 64 bytes the code also seems faster with this change Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/mathematics: speed up av_gcd by using Stein's binary GCD algorithmGanesh Ajjanagadde2015-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses Stein's binary GCD algorithm: https://en.wikipedia.org/wiki/Binary_GCD_algorithm to get a roughly 4x speedup over Euclidean GCD on standard architectures with a compiler intrinsic for ctzll, and a roughly 2x speedup otherwise. At the moment, the compiler intrinsic is used on GCC and Clang due to its easy availability. Quick note regarding overflow: yes, subtractions on int64_t can, but the llabs takes care of that. The llabs is also guaranteed to be safe, with no annoying INT64_MIN business since INT64_MIN being a power of 2, is shifted down before being sent to llabs. The binary GCD needs ff_ctzll, an extension of ff_ctz for long long (int64_t). On GCC, this is provided by a built-in. On Microsoft, there is a BitScanForward64 analog of BitScanForward that should work; but I can't confirm. Apparently it is not available on 32 bit builds; so this may or may not work correctly. On Intel, per the documentation there is only an intrinsic for _bit_scan_forward and people have posted on forums regarding _bit_scan_forward64, but often their documentation is woeful. Again, I don't have it, so I can't test. As such, to be safe, for now only the GCC/Clang intrinsic is added, the rest use a compiled version based on the De-Bruijn method of Leiserson et al: http://supertech.csail.mit.edu/papers/debruijn.pdf. Tested with FATE, sample benchmark (x86-64, GCC 5.2.0, Haswell) with a START_TIMER and STOP_TIMER in libavutil/rationsl.c, followed by a make fate. aac-am00_88.err: builtin: 714 decicycles in av_gcd, 4095 runs, 1 skips de-bruijn: 1440 decicycles in av_gcd, 4096 runs, 0 skips previous: 2889 decicycles in av_gcd, 4096 runs, 0 skips Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavu/opt: add flag to return NULL when applicable in av_opt_getRodger Combs2015-10-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavu/opt: switch AV_OPT flags to shift-based formattingRodger Combs2015-10-09
| |
* | avutil/attributes: add av_warn_unused_resultGanesh Ajjanagadde2015-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 3.4 introduced an attribute warn_unused_result to warn when a programmer discards the return value. Applying this judiciously across the codebase can help in fixing a lot of problems. At a high level, functions which return error codes should always be checked. More concretely, consider the functions ff_add_format and the like in avfilter/formats.h. A quick examination shows that a large portion of libavfilter fails to handle the associated errors, usually AVERROR(ENOMEM). The above example was where I observed the utility of this, but it should be useful in many places across the code base. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '1aa24df74c052a73175c43e57d35b4835e537ec8'Hendrik Leppkes2015-10-03
|\| | | | | | | | | | | | | * commit '1aa24df74c052a73175c43e57d35b4835e537ec8': lavu: Deprecate AVFrame.error[] Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavu: Deprecate AVFrame.error[]Vittorio Giovara2015-09-30
| | | | | | | | | | | | | | | | | | | | | | These field are difficult to interpret, and are provided by a single encoder (mpegvideoenc). In general they do not belong to a structure containing raw data only, so remove them from AVFrame. Mpegvideoenc now uses a private field in Picture for its internal computations. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * mips: intreadwrite: Only execute that code for mips r1 or r2Vicente Olivert Riera2015-09-29
| | | | | | | | | | | | | | | | | | MIPS R6 supports unaligned memory access and does not have the load/store-left/right family of instructions. Signed-off-by: Vicente Olivert Riera <Vincent.Riera at imgtec.com> Signed-off-by: Luca Barbato <lu_zero at gentoo.org> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * pixfmt: Add new SMPTE color primaries and transfer characteristic valuesKevin Wheatley2015-09-17
| | | | | | | | | | | | Appeared in ITU-T Rec H.265 10/2014. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | x86inc: Make cpuflag() and notcpuflag() return 0 or 1Henrik Gramner2015-10-01
| | | | | | | | Makes it possible to use them in arithmetic expressions.
* | avutil/avstring: Inline some tiny functionsHenrik Gramner2015-09-26
| | | | | | | | | | They're short enough that inlining them actually reduces code size due to all the overhead associated with making a function call.
* | avutil/opencl: Fix volatile pointerTimo Rothenpieler2015-09-26
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* | avutil/attributes: add AV_GCC_VERSION_AT_MOSTJames Almer2015-09-18
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* | avutil/log: fix zero length gnu_printf format string warningGanesh Ajjanagadde2015-09-17
| | | | | | | | | | | | | | | | | | This should fix warning reported by fate client: http://fate.ffmpeg.org/report.cgi?time=20150917113121&slot=x86_32-linux-gnu-gcc-4.5.1-have_6regs. Untested. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavu/avstring: switch AV_ESCAPE_FLAGs to shift-based formattingRodger Combs2015-09-15
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>