Michael Niedermayer
2d216566f2
libavutil/base64: Try not to write over the array end
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-13 03:26:57 +02:00
Andreas Rheinhardt
636631d9db
Remove unnecessary libavutil/(avutil|common|internal).h inclusions
...
Some of these were made possible by moving several common macros to
libavutil/macros.h.
While just at it, also improve the other headers a bit.
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-24 12:56:49 +01:00
Andreas Rheinhardt
bbf8431b1b
avutil/base64: Fix undefined NULL + 0
...
Affected the base64 FATE test.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-04-01 14:47:00 +02:00
Derek Buitenhuis
96d616052b
Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'
...
* commit 'd12b5b2f135aade4099f4b26b0fe678656158c13':
build: Split test programs off into separate files
Some conversions done by: James Almer <jamrial@gmail.com>
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-11 19:13:03 +01:00
Diego Biurrun
d12b5b2f13
build: Split test programs off into separate files
...
This avoids spurious library rebuilds when only the test program
code is changed and simplifies the build system.
2016-04-07 16:14:42 +02:00
Michael Niedermayer
965fa6b0d9
Merge commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec'
...
* commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec':
avutil: remove timer.h include from internal.h
Conflicts:
libavcodec/ffv1dec.c
libavutil/internal.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 01:54:55 +01:00
Derek Buitenhuis
8dc1b7bd22
base64-test: Remove posibility of returning restricted exit codes
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-25 11:06:32 +01:00
Derek Buitenhuis
cbbd0ac764
base64-test: Remove posibility of returning restrcted exit codes
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-24 10:51:52 +01:00
Nicolas George
305180f525
lavu/base64: return meaningful error code.
2013-01-05 15:40:40 +01:00
Michael Niedermayer
99efd59626
Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967'
...
* commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967':
Remove pointless #undefs of previously forbidden functions.
fate: Add dependencies for bmp, cdxl, dfa, mp3
Conflicts:
doc/examples/muxing.c
libavfilter/filtfmts.c
libavutil/des.c
libavutil/eval.c
libavutil/log.c
libavutil/parseutils.c
tests/fate/mp3.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 13:34:45 +01:00
Anton Khirnov
cb45553f57
Remove pointless #undefs of previously forbidden functions.
2012-12-04 21:40:22 +01:00
Mans Rullgard
dd3b73f390
base64: fix signed overflow in shift
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-11-26 13:34:58 +00:00
Michael Niedermayer
2bb7396bfd
base64: 10l endian fix.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-22 23:06:04 +01:00
Reimar Döffinger
daa47fdd2c
Optimized base64 decode by writing 3 bytes at once.
...
About 25% faster.
decode: 248852 -> 200385 decicycles
(syntax check unchanged)
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-22 14:41:15 +01:00
Reimar Döffinger
420719e141
Cosmetics: add do {} while 0 to macro.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-22 14:41:15 +01:00
Reimar Döffinger
def19c9036
Unroll base64 decode loop.
...
Around 50% faster.
decode: 374139 -> 248852 decicycles
syntax check: 236955 -> 123854 decicycles
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-21 16:35:11 +01:00
Reimar Döffinger
523f676b51
Use a full table for base64 decode.
...
Also encodes error or end marker into table.
About 20% faster.
decode: 466491 -> 374139 decicycles
syntax check: 236955 -> 161182 decicycles
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-21 14:52:05 +01:00
Reimar Döffinger
8650d5faf9
base64: more thorough decode tests.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-21 12:04:46 +01:00
Michael Niedermayer
bdd739e91c
base64: Only run benchmark when "-t" is specified.
...
As the test is run during fate and the benchmark is useless for fate
this very slightly speeds up fate. Its also consistent with the other
tests.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-21 05:13:56 +01:00
Michael Niedermayer
57822f0660
base64: fix little typo
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-21 02:10:19 +01:00
Michael Niedermayer
01084336b7
base64: add a benchmark for a pure syntax check.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-21 00:32:52 +01:00
Michael Niedermayer
ea4da94895
base64: simplify end handling in av_base64_encode()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-21 00:24:10 +01:00
Michael Niedermayer
112bca91b0
base64: optimize av_base64_encode()
...
This makes the code 2-3 times as fast
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-21 00:24:10 +01:00
Michael Niedermayer
a41687c2d6
base64: add benchmark
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-21 00:24:10 +01:00
Reimar Döffinger
d60d718c49
Slightly optimize base64 encode.
...
Move handling of last byte outside of innermost loop.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-20 23:28:31 +01:00
Reimar Döffinger
6af4c9814a
Optimize output buffer size check in base64 decode.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-20 23:28:26 +01:00
Reimar Döffinger
686ba5f4ea
Minor optimization of base64 decode.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-20 23:27:16 +01:00
Reimar Döffinger
d086c1203c
Add coverage exclusions for test code.
...
For some of the code e.g. doing timing measurements there is no
real point in running regression testing on it, thus it should
not be counted against coverage.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-12-05 20:05:44 +01:00
Howard Chu
784824a68c
Use AV_BASE64_SIZE() macro
...
Originally committed as revision 23462 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-04 01:15:41 +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
Diego Biurrun
504ffed19f
Mark non-exported functions in test and example programs as static.
...
Originally committed as revision 18259 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-31 09:32:59 +00:00
Stefano Sabatini
ac76729c10
Cosmetics: "* out" -> "*out" for consistency with the other
...
parameters.
Originally committed as revision 17072 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-08 21:19:04 +00:00
Stefano Sabatini
5118bd441d
Cosmetics: rename the "size" parameter of av_base64_encode() to "in_size".
...
Originally committed as revision 17071 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-08 21:16:36 +00:00
Stefano Sabatini
52ef50a080
Cosmetics: prefer out/in over buf/src for the parameter names of
...
av_base64_encode(), for consistency/readability reasons.
Originally committed as revision 17069 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-08 21:13:11 +00:00
Stefano Sabatini
61ccbc52ea
Cosmetics: consistently prefer "size" over "len"/"length" for the
...
variable names.
Originally committed as revision 17067 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-08 21:08:42 +00:00
Stefano Sabatini
0d20c3fdad
Make av_base64_encode() do not require the user to provide an
...
overallocated buffer where to put the encoded string.
See the thread:
"[PATCH] Improve documentation for libavutil/base64.h".
Originally committed as revision 17065 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-08 21:00:39 +00:00
Stefano Sabatini
21eff9ced7
Add a new test program for base64, based on that removed in r17024.
...
See the thread:
"[PATCH] remove unused and broken test program in libavutil/base64.c".
Originally committed as revision 17025 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-06 23:29:25 +00:00
Stefano Sabatini
33094be894
Remove broken test program.
...
Originally committed as revision 17024 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-06 23:24:17 +00:00
Diego Biurrun
bad5537e2c
Use full internal pathname in doxygen @file directives.
...
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.
Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-01 02:00:19 +00:00
Diego Biurrun
bfe3676feb
spelling/grammar/consistency review part II
...
Originally committed as revision 16848 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-28 23:03:17 +00:00
Diego Biurrun
448887a6bb
Make base64 test program compilable as a standard test program.
...
Originally committed as revision 16713 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-21 17:34:40 +00:00
Diego Biurrun
40f5cd89c9
Add void keyword to parameterless function declaration.
...
Originally committed as revision 16712 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-21 14:28:16 +00:00
Aurelien Jacobs
37d3e0667a
uses FF_ARRAY_ELEMS() where appropriate
...
Originally committed as revision 15662 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-21 21:40:24 +00:00
Diego Biurrun
ccd425e799
Remove unnecessary parentheses from return calls.
...
Originally committed as revision 13069 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-06 09:16:36 +00:00
Sigbjørn Skjæret
9ad5675f25
Add a couple of missing consts.
...
patch by Sigbjørn Skjæret, cisc broadpark no
Originally committed as revision 11528 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-14 22:10:19 +00:00
Luca Abeni
353fa898bb
Reindent the code after last commit
...
Originally committed as revision 10958 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-11-08 11:59:39 +00:00
Luca Abeni
cd250e581b
Remove redundant "if(len)"
...
Originally committed as revision 10957 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-11-08 11:56:50 +00:00
Luca Abeni
e76e2bbc09
Mark the source buffer as "const"
...
Originally committed as revision 10877 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-10-30 15:32:52 +00:00
Luca Barbato
bd03c380ce
expose av_base64_decode and av_base64_encode
...
Originally committed as revision 8448 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-03-19 00:48:47 +00:00
Luca Barbato
558b86a5d0
Reverting stray commit part II, r8156 had the base64 export patch mixed with the nutdec patch
...
Originally committed as revision 8158 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-02-28 03:40:23 +00:00