Commit Graph

1479 Commits

Author SHA1 Message Date
Mans Rullgard 6eca84bad8 cpu: recognise only cpu flag names pertinent to the architecture
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Mans Rullgard 3527a73933 avutil: add av_parse_cpu_flags() function
This moves the cpu flag parsing code from avconv to avutil so
it can be accessed elsewhere.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Justin Ruggles c8af852b97 Add libavresample
This is a new library for audio sample format, channel layout, and sample rate
conversion.
2012-04-24 21:28:27 -04:00
Justin Ruggles 83b26046fc avutil: change default buffer size alignment for sample buffer functions
Aligning nb_samples will give both correct plane pointer alignment and enough
padding for SIMD-optimized functions.
2012-04-23 14:06:45 -04:00
Mans Rullgard d526c5338d ARM: allow runtime masking of CPU features
This allows masking CPU features with the -cpuflags avconv option
which is useful for testing different optimisations without rebuilding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-22 12:30:45 +01:00
Justin Ruggles 0c0d1bce7c avutil: add audio fifo buffer
The functions operate on the sample level rather than the byte level and work
with all audio sample formats.
2012-04-20 09:43:11 -04:00
Loren Merritt 705f3d4759 x86inc: support AVX abstraction for 2-operand instructions
Add cvtdq2ps and cvtps2dq to the AVX instruction list.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-18 21:14:32 -04:00
Justin Ruggles 5e8280d177 avutil: add better documentation for AVSampleFormat 2012-04-16 15:26:55 -04:00
Diego Biurrun baaab6069a build: Move all arch OBJS declarations into arch subdirectory Makefiles. 2012-04-12 21:30:13 +02:00
Henrik Gramner 729f90e268 x86inc improvements for 64-bit
Add support for all x86-64 registers
Prefer caller-saved register over callee-saved on WIN64
Support up to 15 function arguments

Also (by Ronald S. Bultje)
Fix up our asm to work with new x86inc.asm.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-11 15:47:00 -04:00
Martin Storsjö 14f063d294 mem: Consistently return NULL for av_malloc(0)
Plain POSIX malloc(0) is allowed to return either NULL or a
non-NULL pointer. The calling code should be ready to handle
a NULL return as a correct return (instead of a failure) if the size
to allocate was 0 - this makes sure the condition is handled
in a consistent way across platforms.

This also avoids calling posix_memalign(&ptr, 32, 0) on OS X,
which returns an invalid pointer (a non-NULL pointer that causes
crashes when passed to av_free).

Abort in debug mode, to help track down issues related to
incorrect handling of this case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-10 11:56:42 +03:00
Justin Ruggles 0109a09dc3 avutil: use align == 0 for default alignment in audio sample buffer functions 2012-04-09 10:20:35 -04:00
Justin Ruggles 18ed3788b0 avutil: allow NULL linesize in av_samples_fill_arrays() and av_samples_alloc() 2012-04-09 10:20:35 -04:00
Nicolas George b2db35995f audioconvert: make av_get_channel_layout accept composite names.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-08 18:35:49 -04:00
Justin Ruggles 4d693b023c avutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()
Based on a patch by Clément Bœsch <ubitux@gmail.com>
2012-04-08 15:13:28 -04:00
Justin Ruggles 5cc51a5847 avutil: Add av_get_default_channel_layout()
Also, use the new function in the AC-3 encoder.
2012-04-05 16:35:14 -04:00
Diego Biurrun 3dde147ff9 cosmetics: Consistently place static, inline and av_cold attributes/keywords. 2012-04-04 14:54:13 +02:00
Diego Biurrun a92be9b856 Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
2012-03-28 09:38:33 +02:00
Diego Biurrun e7e19b15c7 build: Only clean the architecture subdirectory we build for.
This allows simplifying the Makefiles; it is no longer necessary to register
arch subdirectory Makefiles, just putting them in place is enough.
2012-03-26 13:29:03 +02:00
Diego Biurrun 80391552c9 libavutil: Remove pointless rational test program. 2012-03-26 13:00:09 +02:00
Diego Biurrun 193d7eea95 libavutil: Remove broken and pointless lzo test program. 2012-03-26 13:00:09 +02:00
Martin Storsjö 27b7459b8d docs: Fix a stray reference to tags in the generic doxy on dicts
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-19 16:07:38 +02:00
Ronald S. Bultje 98b9da2ac7 x86inc: add *mp named argument support to DEFINE_ARGS. 2012-03-14 20:09:53 -07:00
Janne Grunau 363bd1c62c remove iwmmxt optimizations
The were broken since August of 2010 without anyone noticing until
three weeks ago. Nobody cares about it anymore and hopefully Marvell
will support NEON like in the PXA978 from now on.
2012-03-12 22:46:56 +01:00
Ronald S. Bultje a9c5b6f602 cpu: initialize mask to -1, so that by default, optimizations are used. 2012-03-06 12:53:02 -08:00
Anton Khirnov 4d851f8dcf cpu: add av_set_cpu_flags_mask(). 2012-03-06 15:02:28 +01:00
Loren Merritt 0f53d0cf4b x86inc: don't "bake" stack_offset in named arguments.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-03 20:39:59 -08:00
Diego Biurrun cfac648e6a doxygen: Remove documentation for non-existing parameters; misc small fixes. 2012-02-28 20:48:43 +01:00
Justin Ruggles c9bca80132 avutil: add AVERROR_UNKNOWN
Useful to return instead of -1 when the cause of the error is unknown,
typically from an external library.
2012-02-25 11:49:41 -05:00
Diego Biurrun b315042c8c Remove libpostproc.
This library does not fit into Libav as a whole and its code is just a
maintenance burden.  Furthermore it is now available as an external project,
which completely obviates any reason to keep it around.

URL: http://git.videolan.org/?p=libpostproc.git
2012-02-23 19:36:16 +01:00
Tim Walker 147715ca10 Add channel names to channel_names[] array for channels added in b2890f5
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-22 10:50:06 -05:00
Tim W b38b6d56ca Add names for more channel layouts to the channel layout map.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-21 16:10:05 -05:00
Alex Converse b0f29db5c2 Mark mutable static data const where appropriate. 2012-02-21 09:47:07 -08:00
Justin Ruggles 0b42a9388c avutil: add av_rescale_q_rnd() to allow different rounding 2012-02-20 15:08:40 -05:00
Diego Biurrun 6df5c528ca Move some conditionally used variables into the block where they are used.
This allows dropping the av_unused argument from them.
2012-02-13 19:20:54 +01:00
Diego Biurrun f769cfedd8 build: Add missing directories to DIRS declarations. 2012-02-09 12:26:48 +01:00
Anton Khirnov 38d5533228 pixdesc: mark pseudopaletted formats with a special flag.
This makes it possible to dintinguish them from PAL8.

Fixes an invalid write in avpicture_layout().
2012-02-08 21:01:31 +01:00
Haruhiko Yamagata 166f399377 x86inc: support yasm -f win64 flag also.
This sets __OUTPUT_FORMAT__ to win64 instead of win32, even though both
(through -m amd64) produce 64-bit binary code.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-08 10:31:14 -08:00
Henrik Gramner 9cf7385309 x86inc: allow manual use of WIN64_SPILL_XMM.
Functions using INIT_MMX may still access XMM registers through direct
means (xmm0-15). Therefore, they still need to be marked for clobber
so they can be properly saved/restored.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-08 10:31:14 -08:00
Alex Converse 314af0ff94 aacdec: Use correct speaker order for 7.1.
The spec says the following speaker mapping is default:
center front speaker
left, right center front speakers,
left, right outside front speakers,
left surround, right surround rear speakers,
front low frequency effects speaker
2012-02-08 09:56:37 -08:00
Ronald S. Bultje 7e4d9d5d45 win64: add a XMM clobber test configure option.
This will be useful to test more aggressively for failures to mark XMM
registers as clobbered in Win64 builds, and prevent regressions thereof.

Based on a patch by Ramiro Polla <ramiro.polla@gmail.com>
2012-02-02 12:00:48 -08:00
Paul B Mahol 8b933129b9 avutil: make intfloat api public
The functions are already av_ prefixed and intfloat header is already provided.
Install libavutil/intfloat.h

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-30 07:41:31 +01:00
Alex Converse 7181c4edee cosmetics: Remove extra newlines at EOF 2012-01-27 17:19:09 -08:00
Ronald S. Bultje 412b248edb x86inc.asm: fix typo.
Assemblers don't understand ! in %if statements.
2012-01-27 16:33:03 +08:00
Ronald S. Bultje 3b15a6d742 config.asm: change %ifdef directives to %if directives.
This allows combining multiple conditionals in a single statement.
2012-01-27 10:19:57 +08:00
Alex Converse 08628b6afb Revert "sws/pixfmt/pixdesc: add support for yuva444p"
This reverts commit fc115c80b7.

Tests are broken.
2012-01-26 18:06:57 -08:00
Paul B Mahol fc115c80b7 sws/pixfmt/pixdesc: add support for yuva444p
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-27 09:24:08 +08:00
Diego Biurrun 299ab0fd17 libavutil: Remove pointless file test program. 2012-01-26 22:44:37 +01:00
Vitor Sessak 39df0c434c mpegaudiodec: optimized iMDCT transform
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-08 17:40:55 -08:00
Diego Biurrun dff4af448d timer: K&R formatting cosmetics 2012-01-05 14:48:30 +01:00
Janne Grunau c04a954da6 lavu: bump lavu minor for av_popcount64
Add it to doc/APIchanges and update and correct other entries.
2012-01-03 15:42:26 +01:00
Daniel Verkamp b73ec05473 Add av_popcount64
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-03 14:25:43 +01:00
Diego Biurrun c18365402b Replace Subversion revisions in comments by Git hashes. 2011-12-21 09:04:25 +01:00
Luca Barbato 1ee5b5e823 lavu: add AVERROR_BUG error value
It should be used to mark codepath that can be reached only through
programming error.
2011-12-19 18:31:28 +01:00
Mans Rullgard 878dda5db1 build: move inclusion of subdir.mak to main subdir loop
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-13 14:26:49 +00:00
Diego Biurrun 58c42af722 doxygen: misc consistency, spelling and wording fixes 2011-12-12 23:06:23 +01:00
Anton Khirnov 1be323054e Add basic libavdevice documentation. 2011-12-12 19:43:37 +01:00
Mans Rullgard 5b0d35eaed x86: bswap: remove test for bswap instruction
Firstly, this test never worked as intended, always reporting
success.  Secondly, bswap is available from 486 onward and can
thus be assumed present.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-12 12:14:15 +00:00
Mans Rullgard f64c2e710f bswap: make generic implementation more compiler-friendly
With these changes, gcc 4.5 and later recognise it as a bswap
and use the proper instructions on ARM and x86.  On x86, the
16-bit bswap is recognised from gcc 4.1.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-12 12:14:14 +00:00
Mans Rullgard 3383a53e7d lavu: replace int/float punning functions
The existing functions defined in intfloat_readwrite.[ch] are
both slow and incorrect (infinities are not handled).

This introduces a new header with fast, inline conversion
functions using direct union punning assuming an IEEE-754
system, an assumption already made throughout the code.

The one use of Intel/Motorola extended 80-bit format is
replaced by simpler code sufficient under the present
constraints (positive normal values).

The old functions are marked deprecated and retained for
compatibility.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-11 18:47:19 +00:00
Diego Biurrun da9cea77e3 Fix a bunch of common typos. 2011-12-11 00:32:25 +01:00
Justin Ruggles b2890f5ed6 audioconvert: add some additional channel and channel layout macros 2011-12-09 16:12:58 -05:00
Justin Ruggles 1d2449a613 audioconvert: change 7.1 "wide" layout to use side surround channels 2011-12-09 16:12:58 -05:00
Diego Biurrun 4dccfff9dd tests/examples: Mark some variables only used within their files as static. 2011-12-08 01:01:00 +01:00
Sean McGovern be0675ce67 x86 cpuid: set vendor union members separately
Solaris Studio (suncc) has difficulty with filling in
members of a union. Instead, let's retrieve and store the
cpuid() results separately. This is still a compiler bug,
however this fix does not cause a regression on other platforms.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-08 00:57:11 +01:00
Diego Biurrun ff159e7816 doxygen: Replace '\' by '@' in Doxygen markup tags. 2011-12-07 15:29:14 +01:00
Diego Biurrun c68fafe0d2 doxygen: eliminate Qt-style doxygen syntax 2011-12-05 13:06:58 +01:00
Yordan Makariev 425b45d4b0 Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-03 15:13:48 -08:00
Tsvetelina Borisova 4a59eca97a Cleaned pixdesc.c file in libavutil
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-03 14:36:11 -08:00
Mans Rullgard 60084a1723 timer: fix misspelling of "decicycles"
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-28 14:34:42 +00:00
Vitor Sessak 6b6ee58249 x86inc: Flag shufps as an floating-point instruction for the AVX emulation code.
Without this, code like "shufps m0, m1, m2, 0xaa" would not work in CPUs
not supporting SSE2.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-27 13:10:33 -08:00
Mans Rullgard 019dd23657 Fix av_get_channel_layout_string() for positions >31
A value shifted left by >31 needs to have a 64-bit type.
As there are no defined channels in this range, the fix
is purely theoretical at this point, although it does
avoid some invalid shifts triggering the overflow
checker.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-25 15:19:55 +00:00
Mans Rullgard cc276c85d1 Make channel layout masks unsigned
It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.

Fixes a few invalid shifts.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-25 13:19:54 +00:00
Mans Rullgard 6b34fbba9b MK(BE)TAG: avoid undefined shifts
Casting the left-most byte to unsigned avoids an undefined
result of the shift by 24 if bit 7 is set.  This affects
the rm demuxer.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-25 00:20:03 +00:00
Ronald S. Bultje f7f1835258 swscale: fix failing fate tests.
isGray() is left as a FIXME for later.
2011-11-24 12:21:03 -08:00
Ronald S. Bultje 6b0768e202 Clean up swscale pixfmt macros using av_pix_fmt_descriptors[]. 2011-11-24 08:24:55 -08:00
Ronald S. Bultje bd97b2e1ce pixfmt: add planar RGB formats. 2011-11-24 08:13:50 -08:00
Justin Ruggles bbb46f3ec7 libavutil: add utility functions to simplify allocation of audio buffers.
Based on code by Stefano Sabatini.
2011-11-23 18:39:28 -05:00
Justin Ruggles 8889cc4f5b libavutil: add planar sample formats and av_sample_fmt_is_planar() 2011-11-23 18:39:28 -05:00
Luca Barbato e361b5089a doxy: structure libavformat groups 2011-11-22 17:16:02 +01:00
Luca Barbato e97e5a2e02 doxy: introduce an empty structure in libavcodec 2011-11-22 17:16:02 +01:00
Luca Barbato 757cd8d876 doxy: provide a start page and document libavutil
Introduce a basic layout, the subpages are currently left empty.

Split libavutil in multiple groups as example of the structure
2011-11-22 17:16:02 +01:00
Luca Barbato 384bdaceeb doxy: cleanup pixfmt.h
Remove the dubious warning about the header being private and
add some formatting
2011-11-22 17:16:02 +01:00
Thierry Foucu c693aa6f71 imgutils: Fix illegal read.
Found with address sanitizer.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-11-18 17:42:49 -08:00
Martin Storsjö 627067118c avutil: Add av_timegm as a public function
This is useful, since the normal timegm function isn't a standard
function (requiring _BSD_SOURCE or _SVID_SOURCE on glibc to
be visible, and not available on e.g. windows). The widely available
function mktime uses the local time zone, which requires ugly
workarounds to handle UTC time.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 11:22:41 +02:00
Sebastien Zwickert ac3dbb4d58 hwaccel: OS X Video Decoder Acceleration (VDA) support.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-11-14 16:07:32 +01:00
Anton Khirnov e1e22851c1 AVOptions: don't return an invalid option when option list is empty 2011-11-11 08:27:16 +01:00
Alex Converse c9e5ac3380 aes: Avoid illegal read and don't generate more key than we use. 2011-11-10 10:15:59 -08:00
Justin Ruggles f2bd8a0786 x86inc: use sse versions of common macros instead of sse2 when applicable 2011-11-06 19:14:13 -05:00
Martin Storsjö 3607ed70d5 Remove leftover includes of strings.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:53:05 +02:00
Reimar Döffinger de8d1940b5 avutil: Don't allow using strcasecmp/strncasecmp
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:59 +02:00
Reimar Döffinger bb3244dee2 Replace all usage of strcasecmp/strncasecmp
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.

Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:57 +02:00
Reimar Döffinger ba04ecfdac avstring: Add locale independent implementations of strcasecmp/strncasecmp
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:56 +02:00
Luca Barbato 07b172fe8f avstring: Add locale independent implementations of toupper/tolower
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:54 +02:00
Loren Merritt 2f7f2e4b41 Update x86inc.asm to latest x264 version, and add AVX symmetry.
We keep INIT_AVX (for backwards compatibility). 3arg AVX ops with
a memory arg can only have it in src2, whereas SSE emulation of
3arg prefers to have it in src1 (i.e. the mov). So, if the op is
symmetric and the wrong one is memory, swap them.
2011-11-05 20:48:14 -07:00
Diego Biurrun f36b390275 Replace some forgotten FFmpeg references by Libav. 2011-11-02 10:42:55 +01:00
Justin Ruggles 4e8e262476 fmtconvert: port int32_to_float_fmul_scalar() x86 inline asm to yasm 2011-10-21 10:13:05 -04:00
Ronald S. Bultje dc49bf1270 sws/pixfmt/pixdesc: add support for yuv420p9le/be. 2011-10-21 00:58:01 -07:00
Anton Khirnov 4e64c4d51a AVOptions: add documentation. 2011-10-19 06:59:58 +02:00
Martin Storsjö 299234a0a9 avoptions: Fix av_opt_flag_is_set
With the changes in 3b3ea34655,
"Remove all uses of deprecated AVOptions API", av_opt_flag_is_set
was broken, since it now uses av_opt_find, which doesn't return
named constants unless a unit to look for the constant in is given.

This broke enabling LATM encapsulated AAC output in RTP.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-10-17 21:35:41 +03:00
Anton Khirnov 85afbb1d00 AVOptions: don't segfault on NULL parameter in av_set_options_string() 2011-10-17 10:42:21 +02:00
Jindrich Makovicka 67bbf07fb5 log.h: make AVClass a named struct
'struct AVClass' is used in the code since
641c7afe3c, but AVClass is typedeffed as
an anonymous struct.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-12 23:39:31 +02:00
Anton Khirnov 492bd1a28f AVOptions: bump minor and add APIchanges entry. 2011-10-12 16:55:56 +02:00
Anton Khirnov 145f741e11 AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
Anton Khirnov 3b3ea34655 Remove all uses of deprecated AVOptions API. 2011-10-12 16:51:16 +02:00
Anton Khirnov 8c5dcaad13 AVOptions: add av_opt_next, deprecate av_next_option.
Just for naming consistency, no functional changes.
2011-10-12 16:51:16 +02:00
Anton Khirnov dca055be3a AVOptions: add functions for evaluating option strings. 2011-10-12 16:51:16 +02:00
Anton Khirnov 059a037fbd AVOptions: split get_number().
Split actual writing to read_number() in the same way as write_number().
Allows set_string_number() to write to a caller-provided destination.
2011-10-12 16:51:16 +02:00
Anton Khirnov 41d9d51a72 AVOptions: add av_opt_get*, deprecate av_get*.
New functions can get values from child objects, properly report error
codes and have consistent naming and signatures.
2011-10-12 16:51:16 +02:00
Anton Khirnov dac66da63d AVOptions: add av_opt_set*().
Deprecate av_set_*

New functions support setting values on children, return error codes
instead of options and have consistent naming and signatures.
2011-10-12 16:51:16 +02:00
Anton Khirnov 641c7afe3c AVOptions: add new API for enumerating children.
This will allow the caller to enumerate child contexts in a generic way
and since the API is recursive, it also allows for deeper nesting (e.g.
AVFormatContext->AVIOContext->URLContext)

This will also allow the new setting/reading API to transparently apply
to children contexts.
2011-10-12 16:51:16 +02:00
Mans Rullgard 88d1e2b2b0 intfloat_readwrite: fix signed addition overflows
These additions might overflow the signed range for large
input values.  Converting to unsigned before the addition
rather than after avoids such undefined behaviour.  The
result under normal two's complement wraparound remains
unchanged.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-11 14:42:28 +01:00
Anton Khirnov 7bb1807c2d AVOptions: refactor set_number/write_number
write_number() does the actual writing of the supplied
number to destination. Move finding the option and choosing destination
address out of it.
2011-10-10 20:27:31 +02:00
Anton Khirnov cf10095f0b AVOptions: cosmetics, rename static av_set_number2() to write_number(). 2011-10-10 20:27:31 +02:00
Anton Khirnov b003d0be5b AVOptions: cosmetics, move and rename static av_set_number(). 2011-10-10 20:27:31 +02:00
Anton Khirnov c8d787d2ef AVOptions: split av_set_string3 into opt type-specific functions
Also stop attempting to honor the alloc parameter, as things break
horribly in that case.
It will be removed in upcoming successor to av_set_string3.
2011-10-10 20:27:30 +02:00
Mans Rullgard 8b19ae0761 crc: fix signed overflow
This fixes a signed overflow from i << 24 when i == 255 by
making i unsigned.  The result of the shift is already
assigned to an variable of unsigned type.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-09 16:53:31 +01:00
Jason Garrett-Glaser 96a59cf37b x86: XOP/FMA4 CPU detection support 2011-09-26 15:30:31 -07:00
Anton Khirnov 775af761a0 eval: test isnan(sqrt(-1)) instead of just sqrt(-1)
sqrt(-1) returns "some NaN", it's not specified which exactly.
2011-09-22 08:13:55 +02:00
David Goldwich b3e144a7df des: add possibility to calculate DES-CBC-MAC with small buffer
This patch adds the possibility to calculate the DES-CBC-MAC of a
source buffer (i.e. the last block of the buffer encrypted in CBC
mode) without having to allocate a destination buffer that is as
long as the complete source buffer, but instead only 8 bytes
for the MAC.

Signed-off-by: David Goldwich <david.goldwich@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 08:28:20 +02:00
Stefano Sabatini 8cee38a298 eval: implement not() expression 2011-09-19 12:38:34 +02:00
Stefano Sabatini 9bc393908a eval: add sqrt function for computing the square root 2011-09-19 12:38:14 +02:00
Stefano Sabatini 6cfed11270 audioconvert: add explanatory comments to channel_names array
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-09-11 18:41:34 +02:00
Stefano Sabatini 3a0b5fa5e8 audioconvert: K&R whitespace cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-09-11 18:41:33 +02:00
Anton Khirnov 4dbcdfa86d AVOptions: remove AVOption.offset <= 0 checks
They will only ever be <=0 if the option is broken, in which case this
check is hiding a bug.
2011-09-07 11:20:29 +02:00
Anton Khirnov 79eff91325 AVOptions: deprecate av_opt_set_defaults2
It's a hack which was created to allow for multiple options with
different defaults to refer to same field (e.g. 'b' vs 'ab'). There is
no need for it anymore.
2011-09-07 11:19:43 +02:00
Anton Khirnov a7e2b2ccc9 AVOptions: move doxy for av_opt_set_defaults() from opt.c to opt.h
Also change it to be more readable.
2011-09-07 11:16:52 +02:00
Anton Khirnov e955a682e1 AVOptions: fix av_set_string3() doxy to match reality.
Fixes bug 28.
2011-09-03 21:00:52 +02:00
Anton Khirnov c11fb8288d AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find().
It allows to search for options only with AVClass, without allocating
the corresponding context.
2011-09-03 20:52:21 +02:00
Sean McGovern 5938e02185 cpu detection: avoid a signed overflow
1<<31 overflows because 1 is signed, so force it to unsigned.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-09-03 08:31:50 -07:00
Anton Khirnov bea5670a4f AVOptions: drop av_ prefix from static av_get_number(). 2011-09-01 10:37:04 +02:00
Diego Biurrun fa19c5c20e doxygen: drop another pointless star from pointer variable name 2011-08-27 14:00:54 +02:00
Stefano Sabatini 1717ba0cdd fifo: add FIFO API test program, and fate test
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-26 20:54:36 +02:00
Stefano Sabatini f2011ed234 fifo: add av_fifo_peek2(), and deprecate av_fifo_peek()
The new function provides a more generic interface than av_fifo_peek()
for peeking at a FIFO buffer data.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-26 20:53:02 +02:00
Diego Biurrun 0138a8dead doxygen: drop pointless star from pointer variable names 2011-08-26 18:08:38 +02:00
Ronald S. Bultje 38e06c2969 Move clipd macros to x86util.asm.
This allows sharing them between multiple .asm files.
2011-08-17 20:56:06 -07:00
Ronald S. Bultje b2c087871d Move x86util.asm from libavcodec/ to libavutil/.
This allows using it in swscale also.
2011-08-12 11:43:03 -07:00
Ronald S. Bultje 3a39195b1d Move x86inc.asm to libavutil/.
This allows using it in libswscale/ also.
2011-08-12 11:43:02 -07:00
Mans Rullgard 172ee1da2b random_seed: use proper #includes
Use <> for system headers, add needed math.h, drop unnecessary avutil.h.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-17 20:47:39 +01:00
Mans Rullgard bd39c07688 des: fix #if conditional around P_shuffle
CONFIG_SMALL is always defined as 0 or 1.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-16 19:39:19 +01:00
Diego Biurrun 66f6bab7ad mem.h: switch doxygen parameter order to match function prototype 2011-07-15 02:01:22 +02:00
Diego Biurrun 6168781f70 doxygen: do not include license boilerplate in Doxygen documentation 2011-07-15 00:52:09 +02:00
Diego Biurrun 96c1e6d40d doxygen: Make sure parameter names match between .c and .h files. 2011-07-14 04:09:49 +02:00
Oskar Arvidsson e59d6b4d72 pix_fmt: Fix number of bits per component in yuv444p9be
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-12 08:13:56 -07:00
Mans Rullgard 7ce914fb5a lls: use av_lfg instead of rand() in test program
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-11 21:09:27 +01:00
Anton Khirnov a726d7fd4e AVOptions: in av_opt_find() don't return named constants unless unit is specified.
That is, unless the caller explicitly asks for them.

Prevents conflict between e.g. the 'loop' option in img2 demuxer and
'loop' flag in AVCodecContext.
2011-07-08 18:34:18 +02:00
Anton Khirnov 8c28e01d31 dict: extend documentation. 2011-07-08 18:29:27 +02:00
Mans Rullgard fdaf1d0640 lls: whitespace cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-08 15:03:40 +01:00
Diego Biurrun 4904995652 avutil: Add missing test programs to Makefile. 2011-07-08 00:17:19 +02:00
Ronald S. Bultje dfd8116986 eval: add missing comma to tests. 2011-07-05 18:18:11 -07:00
Ronald S. Bultje fe277b16f0 eval: fix memleak. 2011-07-05 18:18:10 -07:00
Mans Rullgard 94350ab986 eval: clear Parser instances before using
This prevents random values from the stack being used as
"variables" in expressions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 12:31:47 +01:00
Kostya Shishkov 3e2aa268f6 sha: use AV_RB32() instead of assuming buffer can be cast to uint32_t*
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 11:16:52 +01:00
Mans Rullgard 9e52a40695 des: allow unaligned input and output buffers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 11:07:15 +01:00
Mans Rullgard d04d9f24a0 aes: allow unaligned input and output buffers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 11:07:15 +01:00
Mans Rullgard 6da812e4ee eval: make timing optional in test program
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-04 10:26:21 +01:00
Mans Rullgard abc78a5a7c Do not include log.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:07 +01:00
Mans Rullgard d49ea4afb4 Do not include pixfmt.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:07 +01:00
Mans Rullgard e91709ca17 Do not include rational.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
Mans Rullgard 0ebcdf5cda Do not include mathematics.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
Mans Rullgard ee8aecd23a Do not include intfloat_readwrite.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
Mans Rullgard add41decd9 Remove return statements following infinite loops without break
These statements cannot be reached and are thus not needed.
This removes a number of compiler warnings.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:39:07 +01:00
Mans Rullgard 82494cad9d md5: cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 18:19:19 +01:00
Mans Rullgard fa49fc72d9 md5: use AV_WL32 to write result
This is simpler, safer, and removes the undocumented requirement of
aligned output buffer.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 18:19:19 +01:00
Mans Rullgard 44496ff2d6 md5: include correct headers
This file needs stdint.h but not string.h

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 18:19:18 +01:00
Mans Rullgard edf4dbff33 md5: fix test program
This makes the md5-test program print something meaningful and not
smash the stack.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 18:19:18 +01:00
Diego Biurrun ff993cd7fc doxygen: Drop array size declarations from Doxygen parameter names.
Adding [] to a Doxygen parameter name clashes with Doxygen syntax.
2011-07-03 18:30:02 +02:00
Diego Biurrun 24c9babaaf doxygen: Fix parameter names to match the function prototypes. 2011-07-03 18:30:02 +02:00
Diego Biurrun 91c9aa0941 Move some conditionally used code below the appropriate #ifdef. 2011-07-03 18:30:01 +02:00
Mans Rullgard 8f175810be aes: fix for big endian systems
This was missed in 5d20f19 since CONFIG_SMALL was always broken
for big endian.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 13:41:42 +01:00
Mans Rullgard 66fe5970ab des: reduce number of iterations in test program
Testing a million random keys takes annoying long time.
1000 iterations should be enough.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 13:41:31 +01:00
Mans Rullgard 5d20f19be2 aes: fix invalid array indexing in init code
This makes the code work with clang/x86_32 and removes several warnings.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 03:09:22 +01:00
Mans Rullgard af2ea72495 aes: use direct assignments instead of memcpy() or loops
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 03:08:52 +01:00
Reinhard Tartler 21a19b7912 doxygen: Prefer member groups over grouping into modules
Before this, almost all module groups have been used for grouping functions
and fields in structures semantically. This causes them to not appear
properly in the file documentation and needlessly clutters up the "Modules"
index.

Additionally, this commit streamlines some spelling and appearances.
2011-07-02 13:52:29 +02:00
Reinhard Tartler 134557f3a4 doxygen: fix usage of @file directive in libavutil/{dict,file}.h 2011-07-01 15:12:33 +02:00
Reinhard Tartler 192bfbc1f1 avutil: elaborate documentation for av_get_random_seed 2011-06-30 21:19:16 +02:00
Mans Rullgard 4bfe064460 aes: whitespace cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-30 16:50:27 +01:00
Mans Rullgard bd55da1c08 adler32: whitespace cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-30 16:50:27 +01:00
Mans Rullgard c31bc5371e Fix cpu flags test program
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-30 14:19:51 +01:00
Diego Biurrun ce1e181b13 opt-test: Add missing braces to silence compiler warnings.
libavutil/opt.c:604:1: warning: missing braces around initializer [-Wmissing-braces]
2011-06-30 13:34:38 +02:00
Mans Rullgard 744765a9c5 aes: improve test program and add fate test
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-30 09:47:32 +01:00
Mans Rullgard f6252b4845 adler32: make test program more useful and add fate test
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-30 09:47:32 +01:00
Diego Biurrun 812f2376ee rational-test: Add proper main() declaration to fix gcc warnings. 2011-06-30 01:35:47 +02:00
Mans Rullgard cfa68a3381 Remove unused, never built libavutil/pca.[ch]
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-29 23:49:03 +01:00
Can Wu 86c3c1abf0 pixfmt: fix YUV422/444 wrong endian comment
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-29 11:56:56 +02:00
Mans Rullgard 57b4a3dd2b build: include sub-makefiles using full path instead of symlinks
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-28 18:15:19 +01:00
Diego Biurrun bb00b15f9e avutil: Remove unused arbitrary precision integer code. 2011-06-28 13:14:46 +02:00
Diego Biurrun a6213f3dce build: Remove redundant config.mak includes from subdirectory Makefiles.
Calling Make from subdirectories is not supported and config.mak has
multiple inclusion guards anyway, so the top-level include is enough.
2011-06-25 13:02:51 +02:00
Diego Biurrun adbfc605f6 doxygen: Consistently use '@' instead of '\' for Doxygen markup.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-24 00:37:49 +02:00
Martin Storsjö 9abbe8cc13 Use av_printf_format to check the usage of printf style functions
This helps catching cases where the format string doesn't
match what is passed in, or injection bugs where user data
is passed in as format string.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-06-23 20:17:46 +03:00
Martin Storsjö 67e9ae14d9 Add av_printf_format, for marking printf style format strings and their parameters
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-06-23 20:17:44 +03:00
Mans Rullgard 8986fddc2b ARM: allow building in Thumb2 mode
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-23 07:31:54 +01:00
Uoti Urpala c98b928fa7 intreadwrite.h: fix AV_RL32/AV_RB32 signedness.
The output type of the AV_RL32/AV_RB32 macros was signed int. The
resulting overflow broke at least some ASF streams with large
timestamps. Fix by adding a cast to uint32_t.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-16 20:49:19 +02:00
Anton Khirnov 7c44d716e7 Add minor bumps and APIChanges entries for lavf private options. 2011-06-16 20:24:58 +02:00
Anton Khirnov 1b9b37b8a4 dict: add AV_DICT_APPEND flag. 2011-06-16 20:24:56 +02:00
Anton Khirnov dc59ec5e79 AVOptions: add av_opt_find() as a replacement for av_find_opt. 2011-06-16 20:24:56 +02:00
Anton Khirnov 7e83e1c511 AVOptions: add av_opt_set_dict() mapping a dictionary struct to a context.
This way the caller can pass all the options in one nice package.
2011-06-16 20:24:56 +02:00
Ronald S. Bultje 103278f7b0 libavutil/swscale: YUV444P10/YUV444P9 support.
Also add missing glue code for recently added YUV422P10 formats
to swscale.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-10 15:12:24 -04:00
Martin Storsjö cb7c11cc9e avoptions: Add an av_opt_flag_is_set function for inspecting flag fields
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-06-10 10:47:42 +03:00
Anton Khirnov d9f80ea2a7 Move metadata API from lavf to lavu.
Rename it to AVDictionary, since it will be used as such.  Tags
documentation and metadata conversion API is lavf-specific, so remains
there.
2011-06-08 07:43:45 +02:00