Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathis Rosenhauer
libaec
Commits
63bcbe00
Commit
63bcbe00
authored
Feb 10, 2014
by
Mathis Rosenhauer
Browse files
Make RSI padding for encoding compile time option as it affects performance
parent
e6138416
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/decode.c
View file @
63bcbe00
...
...
@@ -358,14 +358,14 @@ static int m_id(struct aec_stream *strm)
{
struct
internal_state
*
state
=
strm
->
state
;
if
(
state
->
pp
&&
state
->
rsip
==
state
->
rsi_buffer
)
{
state
->
ref
=
1
;
if
(
strm
->
flags
&
AEC_PAD_RSI
)
if
(
state
->
rsip
==
state
->
rsi_buffer
)
{
if
(
strm
->
flags
&
AEC_PAD_RSI
)
state
->
bitp
-=
state
->
bitp
%
8
;
}
else
if
(
state
->
pp
)
state
->
ref
=
1
;
}
else
{
state
->
ref
=
0
;
}
if
(
bits_ask
(
strm
,
state
->
id_len
)
==
0
)
return
M_EXIT
;
state
->
id
=
bits_get
(
strm
,
state
->
id_len
);
...
...
src/encode.c
View file @
63bcbe00
...
...
@@ -511,11 +511,13 @@ static int m_flush_block(struct aec_stream *strm)
int
n
;
struct
internal_state
*
state
=
strm
->
state
;
#ifdef ENABLE_RSI_PADDING
if
(
state
->
blocks_avail
==
0
&&
strm
->
flags
&
AEC_PAD_RSI
&&
state
->
block_nonzero
==
0
)
emit
(
state
,
0
,
state
->
bits
%
8
);
#endif
if
(
state
->
direct_out
)
{
n
=
state
->
cds
-
strm
->
next_out
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment