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
24fd85af
Commit
24fd85af
authored
Oct 01, 2012
by
Mathis Rosenhauer
Committed by
Thomas Jahns
Feb 19, 2013
Browse files
The MIN is redundant, as can be easily seen
parent
d4ddf3a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/encode.c
View file @
24fd85af
...
...
@@ -26,8 +26,6 @@
/* Marker for Remainder Of Segment condition in zero block encoding */
#define ROS -1
#define MIN(a, b) (((a) < (b))? (a): (b))
static
int
m_get_block
(
struct
aec_stream
*
strm
);
static
int
m_get_block_cautious
(
struct
aec_stream
*
strm
);
static
int
m_check_zero_block
(
struct
aec_stream
*
strm
);
...
...
@@ -135,11 +133,14 @@ static void preprocess_unsigned(struct aec_stream *strm)
while
(
rsi
--
)
{
s
=
*
buf
<
prev
;
if
(
s
)
if
(
s
)
{
d
=
prev
-
*
buf
;
else
t
=
xmax
-
prev
;
}
else
{
d
=
*
buf
-
prev
;
t
=
MIN
(
prev
,
xmax
-
prev
);
t
=
prev
;
}
prev
=
*
buf
;
if
(
d
<=
t
)
*
buf
=
2
*
d
-
s
;
...
...
@@ -166,11 +167,14 @@ static void preprocess_signed(struct aec_stream *strm)
while
(
rsi
--
)
{
v
=
(((
int64_t
)
*
buf
)
<<
m
)
>>
m
;
s
=
v
<
prev
;
if
(
s
)
if
(
s
)
{
d
=
prev
-
v
;
else
t
=
xmax
-
prev
;
}
else
{
d
=
v
-
prev
;
t
=
MIN
(
prev
-
xmin
,
xmax
-
prev
);
t
=
prev
-
xmin
;
}
prev
=
v
;
if
(
d
<=
t
)
*
buf
=
2
*
d
-
s
;
...
...
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