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
7885ec21
Commit
7885ec21
authored
Jul 31, 2014
by
Mathis Rosenhauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Omit redundant SE-encoding of reference sample.
parent
415afb96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/encode.c
src/encode.c
+8
-5
No files found.
src/encode.c
View file @
7885ec21
...
...
@@ -429,8 +429,11 @@ static uint32_t assess_se_option(struct aec_stream *strm)
len
=
1
;
for
(
i
=
0
;
i
<
strm
->
block_size
;
i
+=
2
)
{
d
=
(
uint64_t
)
state
->
block
[
i
]
+
(
uint64_t
)
state
->
block
[
i
+
1
];
if
(
i
==
0
&&
state
->
ref
)
d
=
state
->
block
[
i
+
1
];
else
d
=
(
uint64_t
)
state
->
block
[
i
]
+
(
uint64_t
)
state
->
block
[
i
+
1
];
/* we have to worry about overflow here */
if
(
d
>
state
->
uncomp_len
)
{
len
=
UINT32_MAX
;
...
...
@@ -531,7 +534,6 @@ static int m_encode_splitting(struct aec_stream *strm)
int
k
=
state
->
k
;
emit
(
state
,
k
+
1
,
state
->
id_len
);
if
(
state
->
ref
)
emit
(
state
,
state
->
block
[
0
],
strm
->
bits_per_sample
);
...
...
@@ -548,7 +550,6 @@ static int m_encode_uncomp(struct aec_stream *strm)
emit
(
state
,
(
1U
<<
state
->
id_len
)
-
1
,
state
->
id_len
);
emitblock
(
strm
,
strm
->
bits_per_sample
,
0
);
return
m_flush_block
(
strm
);
}
...
...
@@ -559,8 +560,10 @@ static int m_encode_se(struct aec_stream *strm)
struct
internal_state
*
state
=
strm
->
state
;
emit
(
state
,
1
,
state
->
id_len
+
1
);
if
(
state
->
ref
)
if
(
state
->
ref
)
{
emit
(
state
,
state
->
block
[
0
],
strm
->
bits_per_sample
);
state
->
block
[
0
]
=
0
;
}
for
(
i
=
0
;
i
<
strm
->
block_size
;
i
+=
2
)
{
d
=
state
->
block
[
i
]
+
state
->
block
[
i
+
1
];
...
...
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