Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
libaec
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mathis Rosenhauer
libaec
Commits
9bd2d085
Commit
9bd2d085
authored
Aug 19, 2016
by
Mathis Rosenhauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OS X and clang fixes
parent
9e22ee53
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
6 deletions
+13
-6
src/decode.c
src/decode.c
+4
-1
tests/bdec.sh
tests/bdec.sh
+1
-1
tests/benc.sh
tests/benc.sh
+1
-1
tests/sampledata.sh
tests/sampledata.sh
+7
-3
No files found.
src/decode.c
View file @
9bd2d085
...
...
@@ -322,7 +322,10 @@ static inline uint32_t direct_get_fs(struct aec_stream *strm)
state
->
bitp
=
56
;
}
#if HAVE_DECL___BUILTIN_CLZLL
#ifndef __has_builtin
#define __has_builtin(x) 0
/* Compatibility with non-clang compilers. */
#endif
#if HAVE_DECL___BUILTIN_CLZLL || __has_builtin(__builtin_clzll)
i
=
63
-
__builtin_clzll
(
state
->
acc
);
#elif HAVE_BSR64
_BitScanReverse64
(
&
i
,
state
->
acc
);
...
...
tests/bdec.sh
View file @
9bd2d085
...
...
@@ -8,7 +8,7 @@ if [ ! -f bench.rz ]; then
"
${
path
}
"
/benc.sh
fi
rm
-f
dec.dat
bsize
=
$(
stat
-c
"%s"
bench.dat
)
bsize
=
$(
wc
-c
bench.dat |
awk
'{print $1}'
)
utime
=
$(
../src/utime
$AEC
-d
-n16
-j64
-r256
-m
bench.rz dec.dat 2>&1
)
perf
=
$(
echo
"
$bsize
/1048576/
$utime
"
| bc
)
echo
"[0;32m*** Decoding with
$perf
MiB/s user time ***[0m"
...
...
tests/benc.sh
View file @
9bd2d085
...
...
@@ -23,6 +23,6 @@ if [ ! -f bench.dat ]; then
fi
rm
-f
bench.rz
utime
=
$(
../src/utime
$AEC
-n16
-j64
-r256
-m
bench.dat bench.rz 2>&1
)
bsize
=
$(
stat
-c
"%s"
bench.dat
)
bsize
=
$(
wc
-c
bench.dat |
awk
'{print $1}'
)
perf
=
$(
echo
"
$bsize
/1048576/
$utime
"
| bc
)
echo
"[0;32m*** Encoding with
$perf
MiB/s user time ***[0m"
tests/sampledata.sh
View file @
9bd2d085
...
...
@@ -19,9 +19,13 @@ if [ ! -f $archive ]; then
fi
unzip
-oq
$archive
filesize
()
{
wc
-c
$1
|
awk
'{print $1}'
}
decode
()
{
$AEC
-d
$3
$1
test.dat
cmp
-n
$(
stat
-c
"%s"
$2
)
$2
test.dat
cmp
-n
$(
filesize
$2
)
$2
test.dat
}
code
()
{
...
...
@@ -31,7 +35,7 @@ code () {
code_size
()
{
$AEC
$3
$2
test.rz
if
[
!
$(
stat
-c
"%s"
test.rz
)
-eq
$(
stat
-c
"%s"
$1
)
]
;
then
if
[
!
$(
filesize test.rz
)
-eq
$(
filesize
$1
)
]
;
then
echo
"
$1
size mismatch"
exit
1
fi
...
...
@@ -48,7 +52,7 @@ cosdec () {
}
echo
All Options
ln
-f
${
ALLO
}
/test_P512n22.dat
${
ALLO
}
/test_p512n22.dat
mv
-f
${
ALLO
}
/test_P512n22.dat
${
ALLO
}
/test_p512n22.dat
for
i
in
01 02 03 04
do
uf
=
$ALLO
/test_p256n
${
i
}
.dat
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment