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
e8d6a9ab
Commit
e8d6a9ab
authored
Dec 12, 2012
by
Mathis Rosenhauer
Committed by
Thomas Jahns
Feb 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slight speed-up for simpler code
parent
aa64e83e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
25 deletions
+16
-25
src/encode.c
src/encode.c
+16
-25
No files found.
src/encode.c
View file @
e8d6a9ab
...
...
@@ -284,32 +284,23 @@ static uint64_t block_fs(struct aec_stream *strm, int k)
Sum FS of all samples in block for given splitting position.
*/
int
j
;
uint64_t
fs
;
int
i
;
uint64_t
fs
=
0
;
struct
internal_state
*
state
=
strm
->
state
;
fs
=
(
uint64_t
)(
state
->
block
[
1
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
2
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
3
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
4
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
5
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
6
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
7
]
>>
k
);
if
(
strm
->
block_size
>
8
)
for
(
j
=
8
;
j
<
strm
->
block_size
;
j
+=
8
)
for
(
i
=
0
;
i
<
strm
->
block_size
;
i
+=
8
)
fs
+=
(
uint64_t
)(
state
->
block
[
j
+
0
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
j
+
1
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
j
+
2
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
j
+
3
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
j
+
4
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
j
+
5
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
j
+
6
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
j
+
7
]
>>
k
);
if
(
!
state
->
ref
)
fs
+
=
(
uint64_t
)(
state
->
block
[
0
]
>>
k
);
(
uint64_t
)(
state
->
block
[
i
+
0
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
i
+
1
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
i
+
2
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
i
+
3
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
i
+
4
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
i
+
5
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
i
+
6
]
>>
k
)
+
(
uint64_t
)(
state
->
block
[
i
+
7
]
>>
k
);
if
(
state
->
ref
)
fs
-
=
(
uint64_t
)(
state
->
block
[
0
]
>>
k
);
return
fs
;
}
...
...
@@ -355,7 +346,7 @@ static uint32_t assess_splitting_option(struct aec_stream *strm)
this_bs
=
strm
->
block_size
-
state
->
ref
;
len_min
=
UINT64_MAX
;
k
=
k_min
=
state
->
k
;
no_turn
=
(
k
==
0
)
?
1
:
0
;
no_turn
=
k
==
0
;
dir
=
1
;
for
(;;)
{
...
...
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