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
e047ec68
Commit
e047ec68
authored
8 years ago
by
Mathis Rosenhauer
Browse files
Options
Downloads
Patches
Plain Diff
Fix ROS detection in combination with incomplete RSI
parent
1e1919a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/encode.c
+4
-2
4 additions, 2 deletions
src/encode.c
src/encode.h
+3
-0
3 additions, 0 deletions
src/encode.h
with
7 additions
and
2 deletions
src/encode.c
+
4
−
2
View file @
e047ec68
...
...
@@ -646,10 +646,10 @@ static int m_check_zero_block(struct aec_stream *strm)
state
->
zero_ref
=
state
->
ref
;
state
->
zero_ref_sample
=
state
->
ref_sample
;
}
if
(
state
->
blocks_avail
==
0
||
(
strm
->
rsi
-
state
->
blocks_avail
)
%
64
==
0
)
{
if
(
state
->
blocks_avail
==
0
||
state
->
blocks_dispensed
%
64
==
0
)
{
if
(
state
->
zero_blocks
>
4
)
state
->
zero_blocks
=
ROS
;
state
->
mode
=
m_encode_zero
;
return
M_CONTINUE
;
}
...
...
@@ -728,6 +728,7 @@ static int m_get_block(struct aec_stream *strm)
if
(
state
->
blocks_avail
==
0
)
{
state
->
blocks_avail
=
strm
->
rsi
-
1
;
state
->
block
=
state
->
data_pp
;
state
->
blocks_dispensed
=
1
;
if
(
strm
->
avail_in
>=
state
->
rsi_len
)
{
state
->
get_rsi
(
strm
);
...
...
@@ -745,6 +746,7 @@ static int m_get_block(struct aec_stream *strm)
state
->
uncomp_len
=
strm
->
block_size
*
strm
->
bits_per_sample
;
}
state
->
block
+=
strm
->
block_size
;
state
->
blocks_dispensed
++
;
state
->
blocks_avail
--
;
return
m_check_zero_block
(
strm
);
}
...
...
This diff is collapsed.
Click to expand it.
src/encode.h
+
3
−
0
View file @
e047ec68
...
...
@@ -94,6 +94,9 @@ struct internal_state {
/* remaining blocks in buffer */
int
blocks_avail
;
/* blocks encoded so far in RSI */
int
blocks_dispensed
;
/* current (preprocessed) input block */
uint32_t
*
block
;
...
...
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