Commit Graph

991 Commits

Author SHA1 Message Date
Ronald S. Bultje b1078e9fe6 Move clipping of audio samples (for those codecs outputting float) from decoder
to the audio conversion routines.

Originally committed as revision 22937 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-21 17:57:48 +00:00
Diego Biurrun ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Andreas Öman 4744f896e5 Add PIX_FMT_Y400A, 8bit gray, 8bit alpha
Originally committed as revision 22881 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-14 20:15:19 +00:00
Alex Converse b9f60bd8fd Add M_SQRT2 to the constants in mathematics.h.
Originally committed as revision 22825 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-09 23:29:47 +00:00
Stefano Sabatini b9bd6589d7 Clarify doxy for av_fifo_alloc().
Originally committed as revision 22812 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-06 22:31:59 +00:00
Michael Niedermayer 4ed39eedca av_builtin_constant_p()
Originally committed as revision 22770 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-02 01:03:27 +00:00
Stefano Sabatini 11491503c4 Move AVMediaType from libavcodec to libavutil.
This allows applications/libraries which require that symbol
(e.g. libavfilter) to be compiled without to depend on the presence of
libavcodec/avcodec.h, which may not be installed.

Originally committed as revision 22736 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:31:16 +00:00
Benoit Fouet 32e543f866 Replace @returns by @return.
Originally committed as revision 22729 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 15:50:57 +00:00
Stefano Sabatini 87958234f9 Implement av_strerror().
Originally committed as revision 22684 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-25 22:46:35 +00:00
Stefano Sabatini 0394c928db Prefer '///< ...' doxygen inline syntax over '/**< ... */'.
Originally committed as revision 22683 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-25 22:46:32 +00:00
Stefano Sabatini b748b9d69b Use consistent punctuation rules for the error message descriptions.
Originally committed as revision 22682 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-25 22:46:28 +00:00
Stefano Sabatini 68006ed062 Drop AVERROR_NOFMT at the next libavutil major bump.
Originally committed as revision 22626 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-21 16:34:06 +00:00
Stefano Sabatini 72af5d8a02 Change the definition of AVERROR_INVALIDDATA at the next libavutil
major bump, using an FFmpeg specific error code rather than EINVAL,
which has a quite different semantics.

Originally committed as revision 22601 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-19 23:34:36 +00:00
Stefano Sabatini 0029156589 Extend description for AVERROR_INVALIDDATA.
Originally committed as revision 22600 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-19 23:34:34 +00:00
Måns Rullgård 6d2877f47e error.h: test EDOM instead of EINVAL
C99 doesn't require EINVAL, only EDOM, EILSEQ, and ERANGE.

Originally committed as revision 22530 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-14 22:25:35 +00:00
Måns Rullgård e4836e3c07 Add missing includes to libavutil/error.h
Originally committed as revision 22529 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-14 22:25:31 +00:00
Stefano Sabatini 73ddbd9d0e Change the definition of AVERROR_NUMEXPECTED at the next libavutil
major bump, using an FFmpeg specific error code rather than EDOM,
which has a quite different semantics.

Originally committed as revision 22528 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-14 21:16:29 +00:00
Stefano Sabatini c6a7b97c8e Mark AVERROR_ENOENT for deletion at the next libavutil major bump.
The symbol is currently unused, AVERROR(ENOENT) must be used instead.

Originally committed as revision 22519 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-14 01:32:44 +00:00
Stefano Sabatini 9b359f517e Lexically sort the error code definitions.
Originally committed as revision 22518 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-14 01:32:41 +00:00
Stefano Sabatini 7c074320ba Mark AVERROR_ENOMEM to be deleted at the next major bump.
AVERROR(ENOMEM) must be used instead, and there are no occurrences of
AVERROR_ENOMEM in the FFmpeg basecode so it can be safely dropped.

Originally committed as revision 22514 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-13 19:19:46 +00:00
Stefano Sabatini 5ae092ee34 Replace all the occurrences of AVERROR_EIO with AVERROR(EIO), and mark
AVERROR_EIO for deletion at the next major bump.

Originally committed as revision 22513 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-13 19:19:44 +00:00
Stefano Sabatini 0edfa79b23 Make iff.c:decode_init return the value returned by
avctx->get_buffer() in case of error, rather than AVERROR_UNKNOWN
which is deprecated, and mark AVERROR_UNKNOWN for deletion at the next
major bump.

Originally committed as revision 22512 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-13 19:19:40 +00:00
Stefano Sabatini dbfa5e7861 Add missing parentheses around the AVERROR_PATCHWELCOME macro
definition.

Originally committed as revision 22502 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-13 09:52:43 +00:00
Stefano Sabatini 60c144f700 Move error code definitions from libavcodec/avcodec.h to
libavutil/error.h.

Error code definitions and handling code belong to libavutil, where
they can be shared by all the libav* libraries.

See the thread:
Subject: [FFmpeg-devel] [PATCH] Move error codes definitions from lavc to lavu
Date: Sun, 19 Jul 2009 12:09:16 +0200

Originally committed as revision 22501 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-13 09:43:24 +00:00
Måns Rullgård 5de91783bf indent
Originally committed as revision 22451 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-11 02:32:14 +00:00
Måns Rullgård 49e9287878 random_seed: try other alternatives if reading /dev/random fails
Originally committed as revision 22450 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-11 02:32:11 +00:00
Måns Rullgård 32f40ace25 sha: add missing include
Originally committed as revision 22449 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-11 02:32:08 +00:00
Måns Rullgård 2ed6f39944 Replace many includes of libavutil/common.h with what is actually needed
This reduces the number of false dependencies on header files and
speeds up compilation.

Originally committed as revision 22407 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-09 17:39:19 +00:00
Måns Rullgård 297bfb2fe6 libm.h needs attributes.h
Originally committed as revision 22405 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-09 16:17:59 +00:00
Måns Rullgård 335ee1aadd Move libm replacements to new header libm.h
ffmpeg.c uses lrintf(), which is missing on some systems.  Previously
it picked up the replacement via libavutil/internal.h due to
HAVE_AV_CONFIG_H being erroneously defined.

Moving these replacements to a separate header enables ffmpeg.c to
use them without being exposed to internal interfaces.

This use of a non-public header is justified by the header in question
not being part of the internal interface either.  It should rather be
considered as part of the build system, which is shared between the
libraries and the applications.

This header cannot be installed since the tested conditions depend on
the compiler.

Originally committed as revision 22399 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-09 15:10:23 +00:00
Måns Rullgård b90b1b4c3c Fix build on configurations without fast av_log2()
This is a bit hackish.  I will try to think of something nicer, but
this will do for now.

Originally committed as revision 22366 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-09 01:19:28 +00:00
Måns Rullgård f0a912d3b8 More descriptive names for av_stristr() parameters
Originally committed as revision 22349 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 22:16:05 +00:00
Måns Rullgård 3369888aa5 cosmetics: indent
Originally committed as revision 22348 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 21:29:01 +00:00
Måns Rullgård 2acb5e10b9 Merge two adjacent ifdef blocks
Originally committed as revision 22347 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 21:28:58 +00:00
Måns Rullgård 2791730dbf Move gcc attribute macros to new header libavutil/attributes.h
Originally committed as revision 22346 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 21:28:56 +00:00
Måns Rullgård 94ca624fbc Move ff_sqrt() to libavutil/intmath.h
Originally committed as revision 22345 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 21:19:56 +00:00
Måns Rullgård f89c14027a checkheaders: skip per-arch headers not meant for direct inclusion
Some of the per-arch headers are only meant to be used through
the parent header of the same name.  Testing these standalone
does not make sense.

Originally committed as revision 22341 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 20:17:47 +00:00
Måns Rullgård 4a89e0a675 ARM: add some missing includes
Originally committed as revision 22340 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 19:59:54 +00:00
Måns Rullgård 9c9a0840d0 Add lots of missing includes
Originally committed as revision 22337 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 18:43:52 +00:00
Stefano Sabatini c18fb6310d Bump minor number and add APIchanges entry after the inclusion of
av_stristr().

Originally committed as revision 22254 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-06 20:07:52 +00:00
Måns Rullgård ac6ef8682d Add av_stristr() function
This is a case-insensitive version of strstr().

Originally committed as revision 22251 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-06 19:41:22 +00:00
Måns Rullgård 84dc2d8afa Remove DECLARE_ALIGNED_{8,16} macros
These macros are redundant.  All uses are replaced with the generic
DECLARE_ALIGNED macro instead.

Originally committed as revision 22233 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-06 14:24:59 +00:00
Måns Rullgård 4b9905d1dc Move DECLARE_ALIGNED_{8,16} macros to mem.h
These macros naturally belong next to the generic DECLARE_ALIGNED
macro.

Originally committed as revision 22230 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-06 12:40:43 +00:00
Janusz Krzysztofik 2b7cf1678e Add initial support for 12-bit color mode.
Patch by Janusz Krzysztofik jkrzyszt tis icnet pl
Original thread:
Subject: [FFmpeg-devel] [PATCH v2] Add initial support for 12-bit color mode.
Date: Mon, 1 Mar 2010 02:05:07 +0100

Originally committed as revision 22220 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-05 08:26:23 +00:00
Stefano Sabatini ce7c717900 Declare the PIX_FMT_GRAY8 pixel format as a paletted format. This is
consistent with the allocation currently done for PIX_FMT_GRAY8
pictures.

No significant slow-downs have been measured.

See the thread:
Subject: [FFmpeg-devel] [PATCH] Is gray8 a paletted format?
Date: Sun, 15 Nov 2009 23:36:03 +0100

Originally committed as revision 22191 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-04 00:27:46 +00:00
Vitor Sessak 4b83fc0fe4 Plug memory leak in NUT muxer and demuxer
Originally committed as revision 22174 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-03 17:31:24 +00:00
Måns Rullgård 3d7b94ba5a Fix build failure with fast_unaligned and non-gcc-compatible compilers
Originally committed as revision 22142 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-02 03:16:24 +00:00
Vitor Sessak 8a4d067dfc Revert r22119 and partially revert 22120.
Originally committed as revision 22135 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-01 18:16:10 +00:00
Vitor Sessak fee6faa2b6 Implement av_tree_destroy_free_elem() to destroy a tree and free all the
values stored on it.

Originally committed as revision 22119 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-28 20:48:42 +00:00
Carl Eugen Hoyos 0fcbcad140 Include sha1.h from sha.c: It contains several prototypes.
Originally committed as revision 22099 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-28 02:32:16 +00:00
Stefano Sabatini 3314799368 Extend doxy for the src parameter of av_fifo_generic_write().
@patchby Tomas Härdin |tomas dot hardin at codemill dot se|

Originally committed as revision 22043 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-24 23:52:52 +00:00
Michael Niedermayer 8ef4e65e94 AV_COPY16() & AV_ZERO16()
Originally committed as revision 22037 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-24 20:38:31 +00:00
Anton Khirnov ae529ddb32 Add PUT_UTF16() macro.
Patch by Anton Khirnov <wyskas gmail com>.

Originally committed as revision 22030 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-24 18:08:30 +00:00
Michael Niedermayer fc323a5480 Clarify non constness of src in av_fifo_generic_write()
Originally committed as revision 21997 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-23 12:14:13 +00:00
Måns Rullgård ac73f1a816 ARM: change argument/return type of bswap_16() to unsigned 32-bit
This avoids unnecessary masking otherwise added by the compilers.

Originally committed as revision 21953 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-22 00:34:08 +00:00
Måns Rullgård 94a5218c10 More accurate value for log2(10)
Originally committed as revision 21946 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-21 20:47:10 +00:00
Måns Rullgård e4a35244fa Replace log2f(10) with a constant
Originally committed as revision 21924 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-20 20:13:48 +00:00
Måns Rullgård 7ed63ca2e7 Add casts to correct return type in macros for missing libm funcs
Originally committed as revision 21922 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-20 16:02:48 +00:00
Carl Eugen Hoyos 8e339d4aa0 Gcc attribute may_alias is not supported (or silently ignored) by all supported compilers.
Originally committed as revision 21917 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-20 12:22:24 +00:00
Måns Rullgård 95c0d02ddc TOMI: 16- and 32-bit intreadwrite functions
Originally committed as revision 21890 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-19 03:20:01 +00:00
Måns Rullgård f4a7434f16 Add alias-safe aligned AV_[RW]N macros
Originally committed as revision 21880 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-18 13:44:38 +00:00
Måns Rullgård 7a6053ef72 Use alias-safe types in AV_COPY/SWAP/ZERO macros
Originally committed as revision 21879 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-18 13:40:24 +00:00
Måns Rullgård 0c76e635f5 Use alias-safe types in AV_[RW] macros
Originally committed as revision 21878 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-18 13:40:21 +00:00
Måns Rullgård d10458c9e2 Add alias-safe union typedefs
Originally committed as revision 21877 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-18 13:40:19 +00:00
Stefano Sabatini f47a7cb777 Move read_line() and write_line() definition from pixdesc.h to
pixdesc.c, which are now not anymore marked as static inline.

Fix the inclusion of the private header intreadwrite.h in the public
header pixdesc.h.

Originally committed as revision 21854 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-16 20:17:50 +00:00
Kostya Shishkov a768816c33 Simplify expression as suggested by Måns Rullgård
Originally committed as revision 21756 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-11 14:08:40 +00:00
Kostya Shishkov 045b60bf9b Make SHA digest function write digest value with AV_WN32 instead of assuming
that output may be written as uint32_t since output buffer may not be aligned
(and it's silly to force alignment on it) and it does not work in that case
properly on some architectures.

Originally committed as revision 21754 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-11 11:45:35 +00:00
Måns Rullgård 8e05f06912 Define missing llrint() as macro instead of inline function
This fixes building on some broken systems.

Originally committed as revision 21735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-09 22:55:16 +00:00
Michael Niedermayer b687c1aaac Bump minor for av_compare_ts()
Originally committed as revision 21673 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 17:13:59 +00:00
Michael Niedermayer 78b0182375 av_compare_ts()
Originally committed as revision 21671 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 16:26:50 +00:00
Stefano Sabatini 351aff72a4 Fix grammar: write to DST THING -> write THING to DST.
Originally committed as revision 21576 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-31 17:13:57 +00:00
Stefano Sabatini 22bf4592c8 Remove duplicated word in av_strlcat() doxy.
Originally committed as revision 21549 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 19:03:37 +00:00
Stefano Sabatini 80a07f6e47 Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
Originally committed as revision 21545 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 18:50:00 +00:00
Måns Rullgård 6c88973a75 Add AV_COPY32
Originally committed as revision 21524 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-29 03:26:17 +00:00
Måns Rullgård 788627dea6 Define av_alias if supported by compiler
Originally committed as revision 21523 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-29 03:26:14 +00:00
Måns Rullgård 4ae406856f Add --malloc-prefix to apply a prefix to malloc, free etc
This makes it easy to use a replacement allocator instead of the
system default one.

Originally committed as revision 21509 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 13:06:31 +00:00
Måns Rullgård 87fec35d8d Add macro AV_JOIN() for joining two tokens into one
Originally committed as revision 21482 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 17:38:53 +00:00
Måns Rullgård 34e52abb62 DECLARE_ALIGNED macro for TMS470 compiler
This compiler supports gcc-style alignment attributes for struct,
but not for global variables.  For the latter, alignment can be
specified with a pragma, which does not work for struct members or
local variables.  By using both pragma and attribute, one or the
other will always take effect.

Unfortunately, no means exists for aligning stack variables.

Originally committed as revision 21379 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-22 03:25:25 +00:00
Måns Rullgård d408b77a3a Add an AV_PRAGMA() macro for constructing _Pragma() directives
The seemingly equivalent _Pragma(AV_STRINGIFY(x)) is not accepted
by some compilers.

Originally committed as revision 21378 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-22 03:25:21 +00:00
Måns Rullgård c67278098d Move array specifiers outside DECLARE_ALIGNED() invocations
Originally committed as revision 21377 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-22 03:25:11 +00:00
Måns Rullgård 8a24e98d50 Make DECLARE_ALIGNED macros work with external array specifiers
The macro implementation might need the name of the variable being
declared for compiler-specific syntax.  Moving array specifiers outside
the macro invocation allows this to work.

Originally committed as revision 21363 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-21 12:59:22 +00:00
Laurent Aimar 92c6a099ba H264 DXVA2 implementation
It allows VLD H264 decoding using DXVA2 (GPU assisted decoding API under
VISTA and Windows 7).
 It is implemented by using AVHWAccel API. It has been tested successfully
for some time in VLC using an nvidia card on Windows 7.

 To compile it, you need to have the system header dxva2api.h (either from
microsoft or using http://downloads.videolan.org/pub/videolan/testing/contrib/dxva2api.h)
 The generated libavcodec.dll does not depend directly on any new lib as
the necessary objects are given by the application using FFmpeg.

Originally committed as revision 21353 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 18:54:51 +00:00
Måns Rullgård 5e7dfb7de1 Move COPY3_IF_LT to lavc/mathops.h
This obscure macro is only used in motion_est.c so having it in lavc
makes more sense.  See discussion here:
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-November/056561.html

Originally committed as revision 21346 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 06:01:54 +00:00
Måns Rullgård 75fb5c24ed Move FASTDIV macro to intmath.h
Originally committed as revision 21335 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 23:25:36 +00:00
Måns Rullgård 1d52b4b390 Use avconfig.h in pixfmt.h
Originally committed as revision 21322 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 04:40:18 +00:00
Måns Rullgård a3e02a8cad Create and install libavutil/avconfig.h
This file contains a safe subset of the config.h settings.
Only bigendian is included for now, more can be added as
need arises.

Originally committed as revision 21321 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 04:40:16 +00:00
Alexander Strange f6d0390657 Add macros for 64- and 128-bit write-combining optimization to intreadwrite.h.
Add x86 implementation using MMX/SSE.

Originally committed as revision 21281 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 10:24:33 +00:00
Måns Rullgård bdd19e29df Mark all intreadwrite functions av_always_inline
Originally committed as revision 21278 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 01:35:19 +00:00
Reimar Döffinger 3f37ab8e41 Make sure we do not export incorrect _NE pixformat descriptions by either
including config.h if available or not defining them if it isn't.

Originally committed as revision 21262 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-17 14:17:03 +00:00
Måns Rullgård c25210278c Add missing parens in AV_WN macros
Originally committed as revision 21260 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-17 12:47:06 +00:00
Måns Rullgård a482e61bd6 Add symbol versioning for shared libraries
Based on patch by Reinhard Tartler <siretart tauware de>

Originally committed as revision 21236 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 04:49:02 +00:00
Vitor Sessak 06cb7a1c8f Use macros instead of inline functions to replace the following missing C99
functions: exp2, exp2f, log2, log2f.

Should fix compilation in systems where these functions are defined in math.h
but not implemented.

Originally committed as revision 21231 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 01:27:46 +00:00
Måns Rullgård 544f5a922f Optimise av_log2 with clz when available
10% faster flac decoding on x86 and ARM.

Originally committed as revision 21217 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-14 19:58:12 +00:00
Vitor Sessak 6b7c7703f4 Add replacements for log2f(), exp2() and exp2f() for platforms that lacks it.
Should fix build breakage on some platforms introduced in r21125.

Originally committed as revision 21155 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 02:19:51 +00:00
Stefano Sabatini 4160069067 Prefer "*FUNC_NAME(" over "* FUNC_NAME(" for XXX_configuration() and
XXX_license() functions, consistent with the rest of FFmpeg.

Originally committed as revision 21005 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-03 14:31:25 +00:00
Stefano Sabatini 702d0a9e85 Remove residual use of the doxygen markup which is deprecated,
consistent with r19122.

Originally committed as revision 20989 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-01 12:28:18 +00:00
Michael Niedermayer bac24dd2a5 2nd try on documenting av_gcd().
Originally committed as revision 20939 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-27 14:40:49 +00:00
Michael Niedermayer 03703cb3d1 Document av_gcd().
Originally committed as revision 20935 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-27 12:20:06 +00:00
Michael Niedermayer b3e88ae84b Place { of the function where indent -kr wants it.
Also more consistent with the rest of the code.

Originally committed as revision 20851 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-14 01:15:02 +00:00
Michael Niedermayer 64b12fc317 Move #include where it belongs.
This as a sideeffect fixes the linking failure of ffplay.

Originally committed as revision 20832 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 18:42:39 +00:00
Michael Niedermayer 277c733237 Add a function to convert a number to a av_malloced string.
Originally committed as revision 20829 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 17:09:41 +00:00
Stefano Sabatini 3ba69a15c6 Implement av_bmg_next(), a Box-Muller Gaussian random generator.
See the thread:
"[FFmpeg-devel] [PATCH] Box-Muller gaussian generator".

Originally committed as revision 20808 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-12 16:24:37 +00:00
Ramiro Polla e244f54e78 Make av_log_level static at next lavu major version bump.
Originally committed as revision 20721 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-03 18:15:54 +00:00
Stefano Sabatini 382cb1154c Make av_pix_fmt_descriptors use the same pixel format names as defined
in libavcodec/imgconvert.c.

Avoid to break compatility when making the functions dealing with
pixel format names in imgconvert.c use the names defined in pixdescs.

Originally committed as revision 20624 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-26 20:58:37 +00:00
Stefano Sabatini 74a0059f2c Make the pixdesc API public.
Originally committed as revision 20603 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-24 23:33:41 +00:00
Stefano Sabatini 60fa95683d Clarify PIX_FMT_BE flag doxy. Increase consistency / pickiness.
Originally committed as revision 20592 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-23 20:14:47 +00:00
Stefano Sabatini 357561e73f Clarify relations between log2_chroma_w, log2_chroma_h and comp.
Originally committed as revision 20550 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-18 22:32:32 +00:00
Diego Biurrun c173693698 Add functions to return library license and library configuration.
Originally committed as revision 20547 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-18 17:15:17 +00:00
Stefano Sabatini b8873c2a8f Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
is more clear and lexically more consistent with API and
documentation.

Originally committed as revision 20545 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-18 00:07:20 +00:00
Michael Niedermayer b154ed5abe Fix indention after last commit.
Originally committed as revision 20538 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-14 19:15:09 +00:00
Michael Niedermayer edabf35926 Fix crash with av_tree_enumerate(NULL).
Originally committed as revision 20537 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-14 19:14:14 +00:00
Michael Niedermayer 1bf83b9548 Make sure av_tree_enumerate() enumerates left->right.
Originally committed as revision 20535 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-14 11:19:08 +00:00
Carl Eugen Hoyos dd6308addd Add PIX_FMT_VDPAU_MPEG4 to pixdesc.c.
Originally committed as revision 20509 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-11 00:02:36 +00:00
NVIDIA Corporation 70e0c871eb Add VDPAU hardware accelerated decoding for MPEG-4 ASP which can be used
by video players.

Original patch by NVIDIA corporation.

Originally committed as revision 20502 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-10 18:52:39 +00:00
Reimar Döffinger 7fc58b1eeb Remove code checking for __PIC__ or __pic__ and setting PIC from libavutil/internal.h,
configure is supposed to take care of that already.

Originally committed as revision 20498 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-10 12:59:56 +00:00
Francesco Lavra 91cc5d3767 Move ff_reverse in libavcodec to av_reverse in libavutil.
Patch by Francesco Lavra, francescolavra interfree it

Originally committed as revision 20484 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-09 09:11:35 +00:00
Stefano Sabatini 3fa70a3bc8 Add pixel format descriptors for the HW-accelerated formats.
This completes the list of all descriptors in av_pix_fmt_descriptors.

Originally committed as revision 20467 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-05 23:45:15 +00:00
Stefano Sabatini d71ad089ef Add PIX_FMT_PAL flag to BGR8, BGR4_BYTE, RGB8, and RGB4_BYTE formats.
Originally committed as revision 20434 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-02 20:23:47 +00:00
Stefano Sabatini 51135d1d8e Move pixdesc.{h,c} from libavcodec to libavutil.
This way pixdescs can be used without requiring a dependency on
libavcodec.

Originally committed as revision 20389 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-27 20:56:56 +00:00
Anton Khirnov 20c6837880 id3v2: Add support for UTF-16 encoding.
patch by Anton Khirnov, wyskas gmail com

Originally committed as revision 20006 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 18:22:00 +00:00
Loren Merritt 1a918c08e4 extend ff_inverse[], and fix its documentation
Originally committed as revision 19942 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-21 03:01:57 +00:00
Reimar Döffinger 46f3b40eb3 Add warnings to av_strlcat and av_strlcpy doxygen that the input strings
already must be properly 0-terminated strings. Unlike strncpy it
cannot be used on raw data read from a file.

Originally committed as revision 19800 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-09 21:00:51 +00:00
Ramiro Polla d31dbec374 Rename CHECKED_ALLOC(Z) to FF_ALLOC(Z)_OR_GOTO and add context and label
parameters.

Originally committed as revision 19776 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-06 00:08:19 +00:00
Lars Täuber 35f6c15405 Make 16bit YUV formats compatible with NE avcodec_get_pix_fmt().
Patch by Lars Täuber <lars <dot> taeuber <at> gmx <dot> net>.

Originally committed as revision 19775 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-05 23:33:25 +00:00
Ramiro Polla 5ce6934e0a Add a newline in error message in CHECKED_ALLOC(Z).
Originally committed as revision 19758 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-04 16:59:28 +00:00
Diego Biurrun ee1550116b whitespace cosmetics, prettyprinting
Originally committed as revision 19751 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-01 16:00:45 +00:00
Thilo Borgmann c6dbbc4576 Add function to compute ceil(log2(x)).
Patch by Thilo Borgmann <thilo.borgmann _at_ googlemail.com>

Originally committed as revision 19747 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-30 15:50:03 +00:00
Ramiro Polla e48a0966ca Add CHECKED_ALLOC macro.
It works the same as CHECKED_ALLOCZ except that it does not zero the allocated
memory.

Originally committed as revision 19742 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-29 22:38:48 +00:00
Måns Rullgård d691da9508 AVR32: optimisations for intreadwrite.h
Originally committed as revision 19665 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-17 00:15:53 +00:00
Måns Rullgård e482c2e2fb AVR32: inline asm for bswap.h
Originally committed as revision 19664 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-17 00:15:51 +00:00
Måns Rullgård 9dc6bb7b9f MIPS: 100L: fix AV_[RW]N64 on MIPS64
Originally committed as revision 19660 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-16 18:43:36 +00:00
Måns Rullgård 4a051891f6 cosmetics: reformat intreadwrite.h
Originally committed as revision 19659 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-16 18:06:25 +00:00
Måns Rullgård 63826ceb32 intreadwrite: ensure arch-specific versions are always used if defined
The per-arch headers can define any combination of B/L/N variants.
This ensures that whatever is defined in an arch header gets used
for all equivalents not defined there.  E.g. on a little-endian
machine, AV_RN and AV_RL should give the same code.

Originally committed as revision 19658 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-16 15:51:55 +00:00
Måns Rullgård 57c36bdcea intreadwrite: allow arch-specific 24-bit access macros
Originally committed as revision 19657 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-16 15:51:52 +00:00
Måns Rullgård e6956a6e48 ARM: first value loaded in AV_RN64 needs to be early-clobber
Originally committed as revision 19656 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-16 15:51:50 +00:00
Ramiro Polla f51fb686de Introduce av_clip_uint16().
Originally committed as revision 19636 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-13 18:47:13 +00:00
Diego Biurrun 3d7b15e450 Remove disabled code cruft.
Originally committed as revision 19616 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-10 13:42:16 +00:00
Måns Rullgård bd41c06f18 Define INFINITIY and NAN in mathematics.h if missing
Originally committed as revision 19611 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-10 01:27:27 +00:00
Diego Biurrun 75af07495a Revert addition of '#undef av_always_inline' to config.h in the small case.
Instead, #include config.h at the top of common.h so that av_always_inline
does not get doubly defined.

Originally committed as revision 19553 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-30 21:58:43 +00:00
Diego Biurrun 8b4e7c28fb Mark conditionally used variable T2 as av_unused; avoids the warning:
libavutil/sha.c:183: warning: unused variable `T2'

Originally committed as revision 19551 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-30 21:21:30 +00:00
Måns Rullgård b6ec1f47c7 PPC: fix asm operand constraints in AV_RL64
The target register of first word loaded must be marked early-clobber.

Originally committed as revision 19536 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-29 19:06:55 +00:00
Måns Rullgård 63613fe615 Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN
Originally committed as revision 19508 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-26 12:20:04 +00:00
Måns Rullgård e7ea5e3d8d Check for __attribute__((packed)) support
Not all compilers claiming to be gcc support this attribute.

Originally committed as revision 19453 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-17 08:21:43 +00:00
Kostya Shishkov 87d718aefc cosmetics: reindent after last commit
Originally committed as revision 19450 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-17 04:30:49 +00:00
Kostya Shishkov aa5a99ae0c Add SHA-2 hashing
Originally committed as revision 19449 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-17 04:30:06 +00:00
Stefano Sabatini 68485d2728 Remove useless definition of struct AVCLASS.
Originally committed as revision 19402 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-12 11:30:42 +00:00
Alex Converse 291fd18a6e Add a log2 replacement for systems that haven't quite caught up with the C99
standard library.

Originally committed as revision 19395 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-10 19:20:06 +00:00
Kostya Shishkov 451ae25724 Prepare SHA code to handle SHA-2 as well. For now rename files and functions
and leave av_sha1_* functions for compatibility until next major bump.

Originally committed as revision 19394 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-10 15:50:49 +00:00
Kostya Shishkov 0d73abb86a Rename function to sha1_transform so it won't be confused with SHA-2 transform
when it's added.

Originally committed as revision 19389 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-09 07:29:03 +00:00
Kostya Shishkov 2c6361e009 Use pointer to hash transform function to make adding SHA-2 support easier.
Originally committed as revision 19388 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-09 07:23:43 +00:00