Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathis Rosenhauer
libaec
Commits
fa68d153
Commit
fa68d153
authored
Oct 02, 2012
by
Mathis Rosenhauer
Committed by
Thomas Jahns
Feb 19, 2013
Browse files
some cleanup
parent
4ea7b4b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/encode.c
View file @
fa68d153
...
...
@@ -328,18 +328,18 @@ static uint64_t block_fs(struct aec_stream *strm, int k)
+
(
uint64_t
)(
state
->
block_p
[
7
]
>>
k
);
if
(
strm
->
block_size
>
8
)
for
(
j
=
1
;
j
<
strm
->
block_size
/
8
;
j
++
)
for
(
j
=
8
;
j
<
strm
->
block_size
;
j
+=
8
)
fs
+=
(
uint64_t
)(
state
->
block_p
[
j
*
8
+
0
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
*
8
+
1
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
*
8
+
2
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
*
8
+
3
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
*
8
+
4
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
*
8
+
5
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
*
8
+
6
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
*
8
+
7
]
>>
k
);
if
(
state
->
ref
==
0
)
(
uint64_t
)(
state
->
block_p
[
j
+
0
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
+
1
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
+
2
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
+
3
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
+
4
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
+
5
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
+
6
]
>>
k
)
+
(
uint64_t
)(
state
->
block_p
[
j
+
7
]
>>
k
);
if
(
!
state
->
ref
)
fs
+=
(
uint64_t
)(
state
->
block_p
[
0
]
>>
k
);
return
fs
;
...
...
@@ -486,13 +486,15 @@ static int m_encode_splitting(struct aec_stream *strm)
emit
(
state
,
state
->
block_p
[
0
],
strm
->
bit_per_sample
);
for
(
i
=
1
;
i
<
strm
->
block_size
;
i
++
)
emitfs
(
state
,
state
->
block_p
[
i
]
>>
k
);
if
(
k
)
emitblock_1
(
strm
,
k
);
if
(
k
)
emitblock_1
(
strm
,
k
);
}
else
{
for
(
i
=
0
;
i
<
strm
->
block_size
;
i
++
)
emitfs
(
state
,
state
->
block_p
[
i
]
>>
k
);
if
(
k
)
emitblock_0
(
strm
,
k
);
if
(
k
)
emitblock_0
(
strm
,
k
);
}
return
m_flush_block
(
strm
);
...
...
@@ -502,7 +504,7 @@ static int m_encode_uncomp(struct aec_stream *strm)
{
struct
internal_state
*
state
=
strm
->
state
;
emit
(
state
,
(
1
<<
state
->
id_len
)
-
1
,
state
->
id_len
);
emit
(
state
,
(
1
U
<<
state
->
id_len
)
-
1
,
state
->
id_len
);
emitblock_0
(
strm
,
strm
->
bit_per_sample
);
return
m_flush_block
(
strm
);
...
...
src/encode.h
View file @
fa68d153
...
...
@@ -24,7 +24,7 @@ struct internal_state {
int
i
;
/* counter */
uint32_t
*
block_buf
;
/* RSI blocks of input */
int
blocks_avail
;
/* remaining blocks in buffer */
uint32_t
*
block_p
;
/* pointer to current block */
uint32_t
*
block_p
;
/* pointer to current block */
int
block_len
;
/* input block length in byte */
uint8_t
*
cds_buf
;
/* Buffer for one Coded Data Set */
int
cds_len
;
/* max cds length in byte */
...
...
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