Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
libaec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mathis Rosenhauer
libaec
Commits
790a3612
Commit
790a3612
authored
12 years ago
by
Mathis Rosenhauer
Committed by
Thomas Jahns
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Let compiler decide how to unroll"
This reverts commit fdc6797ea6f3865ca079ebc260814a6f584b1cff.
parent
1ed96518
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/encode.c
+29
-4
29 additions, 4 deletions
src/encode.c
with
29 additions
and
4 deletions
src/encode.c
+
29
−
4
View file @
790a3612
...
...
@@ -278,6 +278,33 @@ static void preprocess_signed(struct aec_stream *strm)
state
->
uncomp_len
=
(
strm
->
block_size
-
1
)
*
strm
->
bits_per_sample
;
}
static
uint64_t
block_fs
(
struct
aec_stream
*
strm
,
int
k
)
{
/**
Sum FS of all samples in block for given splitting position.
*/
int
i
;
uint64_t
fs
=
0
;
struct
internal_state
*
state
=
strm
->
state
;
for
(
i
=
0
;
i
<
strm
->
block_size
;
i
+=
8
)
fs
+=
(
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
;
}
static
uint32_t
assess_splitting_option
(
struct
aec_stream
*
strm
)
{
/**
...
...
@@ -305,7 +332,7 @@ static uint32_t assess_splitting_option(struct aec_stream *strm)
analogue check can be done for decreasing k.
*/
int
i
,
k
;
int
k
;
int
k_min
;
int
this_bs
;
/* Block size of current block */
int
no_turn
;
/* 1 if we shouldn't reverse */
...
...
@@ -323,9 +350,7 @@ static uint32_t assess_splitting_option(struct aec_stream *strm)
dir
=
1
;
for
(;;)
{
fs_len
=
0
;
for
(
i
=
state
->
ref
;
i
<
strm
->
block_size
;
i
++
)
fs_len
+=
(
uint64_t
)(
state
->
block
[
i
]
>>
k
);
fs_len
=
block_fs
(
strm
,
k
);
len
=
fs_len
+
this_bs
*
(
k
+
1
);
if
(
len
<
len_min
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment