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
9a6c528e
Commit
9a6c528e
authored
Jul 09, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alac: factor out output_size check in predictor_decompress_fir_adapt()
parent
ebd4c3ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
alac.c
libavcodec/alac.c
+3
-5
No files found.
libavcodec/alac.c
View file @
9a6c528e
...
@@ -173,10 +173,10 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer,
...
@@ -173,10 +173,10 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer,
/* first sample always copies */
/* first sample always copies */
*
buffer_out
=
*
error_buffer
;
*
buffer_out
=
*
error_buffer
;
if
(
!
predictor_coef_num
)
{
if
(
output_size
<=
1
)
if
(
output_size
<=
1
)
return
;
return
;
if
(
!
predictor_coef_num
)
{
memcpy
(
&
buffer_out
[
1
],
&
error_buffer
[
1
],
memcpy
(
&
buffer_out
[
1
],
&
error_buffer
[
1
],
(
output_size
-
1
)
*
sizeof
(
*
buffer_out
));
(
output_size
-
1
)
*
sizeof
(
*
buffer_out
));
return
;
return
;
...
@@ -184,8 +184,6 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer,
...
@@ -184,8 +184,6 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer,
if
(
predictor_coef_num
==
31
)
{
if
(
predictor_coef_num
==
31
)
{
/* simple 1st-order prediction */
/* simple 1st-order prediction */
if
(
output_size
<=
1
)
return
;
for
(
i
=
1
;
i
<
output_size
;
i
++
)
{
for
(
i
=
1
;
i
<
output_size
;
i
++
)
{
buffer_out
[
i
]
=
sign_extend
(
buffer_out
[
i
-
1
]
+
error_buffer
[
i
],
buffer_out
[
i
]
=
sign_extend
(
buffer_out
[
i
-
1
]
+
error_buffer
[
i
],
readsamplesize
);
readsamplesize
);
...
...
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