Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Michael Niedermayer
66872161cb
avutil/common: error out with clear message if __STDC_CONSTANT_MACROS is not defined with c++
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
719b4eef5d
lavu/common: add warning to GET_UTF8 doxy
...
Should prevent wrong uses, or at least decrease their chance.
11 years ago
Alfred E. Heggestad
16c3ed5837
libavutil: cast truncated values to uint32_t
...
programs using ffmpeg that are compiled with -Wshorten-64-to-32
gives a warning when using header files common.h and rational.h
cast 64-bit truncated values to (uint32_t) to avoid the warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Clément Bœsch
b3c263e209
lavu/common: make FF_CEIL_RSHIFT faster when shift is constant.
...
See "[PATCH] lavfi/lut: use FF_CEIL_RSHIFT for chroma w/h rounding."
thread for more information.
12 years ago
Clément Bœsch
570d63eef3
lavu: add FF_CEIL_RSHIFT and use it in various places.
12 years ago
Nicolas George
29ebb7ba8d
lavu: fix GET_UTF8 macro.
...
Prevent 0xFE and 0xFF from being considered the start of
non-standard 7-bytes sequences. No noticeable effect on speed.
12 years ago
Paul B Mahol
3e9c0217fd
lavu: add av_clipd_c
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Reimar Döffinger
efa7f42020
Use the avstring.h locale-independent character type functions
...
Make sure the behavior does not change with the locale.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Reimar Döffinger
88d55b827d
Remove incorrect use of ctype.h functions.
...
As far as I can tell the code should not change behaviour
depending on locale in any of these places.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Michael Niedermayer
f27eb1b702
lavu: check that assert level is defined
...
fix warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
498e1c6bb9
lavu: check av_clip*() limits
...
This code cannot use av_assert* due to circular header dependancies
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
7ba0c1b390
avutil: change GET_UTF8 to not use av_log2()
...
This removes an inter-library dependency on ff_log2_tab causing
linking errors in some configurations.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Michael Niedermayer
ae52eb7fc7
lavu: add av_clip64()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
8c0a3d5fe0
avutil: remove inline av_log2 from public API
...
This removes inline av_log2 and av_log2_16bit from the public API,
instead exporting them as regular functions. In-tree code still
gets the inline and otherwise optimised variants.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Diego Biurrun
d5c62122a7
Move av_reverse table to libavcodec
...
It is only used in that library.
12 years ago
Mans Rullgard
6c4975eaaf
libavutil: add saturating addition functions
...
Fixed-point audio codecs often use saturating arithmetic, and
special instructions for these operations are common.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Michael Bradshaw
b0e1557fe7
Fixed warnings about int64 to int32 conversion
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
f16c950f32
lavu: document av_reverse.
13 years ago
Daniel Verkamp
b73ec05473
Add av_popcount64
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
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>
13 years ago
Diego Biurrun
adbfc605f6
doxygen: Consistently use '@' instead of '\' for Doxygen markup.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Mans Rullgard
1550f45a89
Add av_clip_uintp2() function
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Michael Niedermayer
5192788321
avutil: add divide & modulo that round like unsigned ones do that is down.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Jason Garrett-Glaser
545dc699f8
Force inlining of avutil common routines
...
On some versions of gcc, these weren't always getting inlined due to hitting
the inline cap limit in some files. This is generally bad, as most of these
functions are smaller inlined than not.
(cherry picked from commit eb3755a5aa
)
14 years ago
Jason Garrett-Glaser
eb3755a5aa
Force inlining of avutil common routines
...
On some versions of gcc, these weren't always getting inlined due to hitting
the inline cap limit in some files. This is generally bad, as most of these
functions are smaller inlined than not.
14 years ago
Tomas Härdin
bc6f0af289
Add av_popcount() to libavutil/common.h and bump minor version
...
Originally committed as revision 25120 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Benoit Fouet
573af7545e
Add missing parentheses to AV_NE macro.
...
Originally committed as revision 24885 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
6a36facc3d
Fix out-of-tree build
...
Originally committed as revision 24816 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
4f2d2e4ed9
Define macro AV_NE() and use it in libavdevice.
...
Help further refactoring.
Originally committed as revision 24814 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
216b43aed2
Allow arch-overrides for all common.h clip and log2 functions
...
Originally committed as revision 24087 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
a955b59658
Remove macro duplication between common.h and intmath.h
...
Originally committed as revision 24086 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
c2a5b4731b
Improve GET_UTF{8,16} documentation
...
Originally committed as revision 23909 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
49bd8e4b84
Fix grammar errors in documentation
...
Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Ronald S. Bultje
45a1b86a05
Add av_clip_int8(), used in the upcoming VP8 decoder.
...
Originally committed as revision 23713 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Benoit Fouet
1c7c0e2d40
Add missing parentheses in MKTAG and MKBETAG macros.
...
Originally committed as revision 23711 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Ronald S. Bultje
90bc36b063
Reindent after r22968.
...
Originally committed as revision 22969 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Ronald S. Bultje
ad6408960b
Write clip-related decimal numbers into hex, where they make more sense.
...
Originally committed as revision 22968 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Ronald S. Bultje
2d0525c27c
Fix broken 32-bit clipping, and write numbers in hex instead of decimal so
...
they are easier to understand. Also give the add a 'u' postfix to silence
a pre-c99 compiler warning.
Originally committed as revision 22965 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
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
15 years ago
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
15 years ago
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
15 years ago
Måns Rullgård
3369888aa5
cosmetics: indent
...
Originally committed as revision 22348 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
2acb5e10b9
Merge two adjacent ifdef blocks
...
Originally committed as revision 22347 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
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
15 years ago
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
15 years ago
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
15 years ago
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
15 years ago
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
15 years ago