Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
6e91f622
Commit
6e91f622
authored
Jul 09, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alac: reduce the number of parameters to bastardized_rice_decompress()
Use the ALACContext fields directly instead.
parent
836e8b9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
alac.c
libavcodec/alac.c
+5
-11
No files found.
libavcodec/alac.c
View file @
6e91f622
...
...
@@ -107,13 +107,10 @@ static void bastardized_rice_decompress(ALACContext *alac,
int32_t
*
output_buffer
,
int
output_size
,
int
readsamplesize
,
int
rice_initial_history
,
int
rice_limit
,
int
rice_history_mult
,
int
rice_kmodifier_mask
)
int
rice_history_mult
)
{
int
output_count
;
unsigned
int
history
=
rice_initial_history
;
unsigned
int
history
=
alac
->
rice_initial_history
;
int
sign_modifier
=
0
;
for
(
output_count
=
0
;
output_count
<
output_size
;
output_count
++
)
{
...
...
@@ -126,7 +123,7 @@ static void bastardized_rice_decompress(ALACContext *alac,
/* read k, that is bits as is */
k
=
av_log2
((
history
>>
9
)
+
3
);
x
=
decode_scalar
(
&
alac
->
gb
,
k
,
rice_limit
,
readsamplesize
);
x
=
decode_scalar
(
&
alac
->
gb
,
k
,
alac
->
rice_limit
,
readsamplesize
);
x_modified
=
sign_modifier
+
x
;
final_val
=
(
x_modified
+
1
)
/
2
;
...
...
@@ -152,7 +149,7 @@ static void bastardized_rice_decompress(ALACContext *alac,
k
=
7
-
av_log2
(
history
)
+
((
history
+
16
)
>>
6
/* / 64 */
);
block_size
=
decode_scalar
(
&
alac
->
gb
,
k
,
rice_limit
,
16
);
block_size
=
decode_scalar
(
&
alac
->
gb
,
k
,
alac
->
rice_limit
,
16
);
if
(
block_size
>
0
)
{
if
(
block_size
>=
output_size
-
output_count
){
...
...
@@ -434,10 +431,7 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
alac
->
predict_error_buffer
[
ch
],
outputsamples
,
readsamplesize
,
alac
->
rice_initial_history
,
alac
->
rice_limit
,
ricemodifier
[
ch
]
*
alac
->
rice_history_mult
/
4
,
(
1
<<
alac
->
rice_limit
)
-
1
);
ricemodifier
[
ch
]
*
alac
->
rice_history_mult
/
4
);
/* adaptive FIR filter */
if
(
prediction_type
[
ch
]
==
15
)
{
...
...
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