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
1ed96518
Commit
1ed96518
authored
Dec 13, 2012
by
Mathis Rosenhauer
Committed by
Thomas Jahns
Feb 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let compiler decide how to unroll
parent
e8d6a9ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
29 deletions
+4
-29
src/encode.c
src/encode.c
+4
-29
No files found.
src/encode.c
View file @
1ed96518
...
@@ -278,33 +278,6 @@ static void preprocess_signed(struct aec_stream *strm)
...
@@ -278,33 +278,6 @@ static void preprocess_signed(struct aec_stream *strm)
state
->
uncomp_len
=
(
strm
->
block_size
-
1
)
*
strm
->
bits_per_sample
;
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
)
static
uint32_t
assess_splitting_option
(
struct
aec_stream
*
strm
)
{
{
/**
/**
...
@@ -332,7 +305,7 @@ static uint32_t assess_splitting_option(struct aec_stream *strm)
...
@@ -332,7 +305,7 @@ static uint32_t assess_splitting_option(struct aec_stream *strm)
analogue check can be done for decreasing k.
analogue check can be done for decreasing k.
*/
*/
int
k
;
int
i
,
k
;
int
k_min
;
int
k_min
;
int
this_bs
;
/* Block size of current block */
int
this_bs
;
/* Block size of current block */
int
no_turn
;
/* 1 if we shouldn't reverse */
int
no_turn
;
/* 1 if we shouldn't reverse */
...
@@ -350,7 +323,9 @@ static uint32_t assess_splitting_option(struct aec_stream *strm)
...
@@ -350,7 +323,9 @@ static uint32_t assess_splitting_option(struct aec_stream *strm)
dir
=
1
;
dir
=
1
;
for
(;;)
{
for
(;;)
{
fs_len
=
block_fs
(
strm
,
k
);
fs_len
=
0
;
for
(
i
=
state
->
ref
;
i
<
strm
->
block_size
;
i
++
)
fs_len
+=
(
uint64_t
)(
state
->
block
[
i
]
>>
k
);
len
=
fs_len
+
this_bs
*
(
k
+
1
);
len
=
fs_len
+
this_bs
*
(
k
+
1
);
if
(
len
<
len_min
)
{
if
(
len
<
len_min
)
{
...
...
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