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
11ca2a7f
Commit
11ca2a7f
authored
8 years ago
by
Mathis Rosenhauer
Browse files
Options
Downloads
Patches
Plain Diff
Add macro for used RSI
parent
92870774
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/decode.c
+4
-4
4 additions, 4 deletions
src/decode.c
with
4 additions
and
4 deletions
src/decode.c
+
4
−
4
View file @
11ca2a7f
...
...
@@ -60,7 +60,7 @@
#endif
#define ROS 5
#define RSI_USED(state) ((size_t)(state->rsip - state->rsi_buffer))
#define BUFFERSPACE(strm) (strm->avail_in >= strm->state->in_blklen \
&& strm->avail_out >= strm->state->out_blklen)
...
...
@@ -203,7 +203,7 @@ static inline void check_rsi_end(struct aec_stream *strm)
*/
struct
internal_state
*
state
=
strm
->
state
;
if
(
state
->
rsi_size
==
(
size_t
)(
state
->
rsip
-
state
->
rsi_buffer
))
{
if
(
state
->
rsi_size
==
RSI_USED
(
state
))
{
state
->
flush_output
(
strm
);
state
->
flush_start
=
state
->
rsi_buffer
;
state
->
rsip
=
state
->
rsi_buffer
;
...
...
@@ -523,7 +523,7 @@ static int m_zero_block(struct aec_stream *strm)
fs_drop
(
strm
);
if
(
zero_blocks
==
ROS
)
{
b
=
(
int
)
(
state
->
rsip
-
state
->
rsi_buffer
)
/
strm
->
block_size
;
b
=
(
int
)
RSI_USED
(
state
)
/
strm
->
block_size
;
zero_blocks
=
MIN
(
strm
->
rsi
-
b
,
64
-
(
b
%
64
));
}
else
if
(
zero_blocks
>
ROS
)
{
zero_blocks
--
;
...
...
@@ -537,7 +537,7 @@ static int m_zero_block(struct aec_stream *strm)
zero_bytes
=
i
*
state
->
bytes_per_sample
;
if
(
strm
->
avail_out
>=
zero_bytes
)
{
if
(
state
->
rsi_size
-
(
state
->
rsip
-
state
->
rsi_buffer
)
<
i
)
if
(
state
->
rsi_size
-
RSI_USED
(
state
)
<
i
)
return
M_ERROR
;
memset
(
state
->
rsip
,
0
,
i
*
sizeof
(
uint32_t
));
...
...
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