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
a4ecd414
Commit
a4ecd414
authored
Jul 09, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alac: use index into buffer_out instead of incrementing the pointer
parent
f2515cd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
alac.c
libavcodec/alac.c
+6
-8
No files found.
libavcodec/alac.c
View file @
a4ecd414
...
...
@@ -202,29 +202,29 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer,
/* NOTE: 4 and 8 are very common cases that could be optimized. */
/* general case */
for
(
i
=
predictor_coef_num
+
1
;
i
<
output_size
;
i
++
)
{
for
(
i
=
predictor_coef_num
;
i
<
output_size
-
1
;
i
++
)
{
int
j
;
int
val
=
0
;
int
error_val
=
error_buffer
[
i
];
int
error_val
=
error_buffer
[
i
+
1
];
int
error_sign
;
for
(
j
=
0
;
j
<
predictor_coef_num
;
j
++
)
{
val
+=
(
buffer_out
[
predictor_coef_num
-
j
]
-
buffer_out
[
0
])
*
val
+=
(
buffer_out
[
i
-
j
]
-
buffer_out
[
i
-
predictor_coef_num
])
*
predictor_coef_table
[
j
];
}
val
=
(
val
+
(
1
<<
(
predictor_quantitization
-
1
)))
>>
predictor_quantitization
;
val
+=
buffer_out
[
0
]
+
error_val
;
val
+=
buffer_out
[
i
-
predictor_coef_num
]
+
error_val
;
buffer_out
[
predictor_coef_num
+
1
]
=
sign_extend
(
val
,
readsamplesize
);
buffer_out
[
i
+
1
]
=
sign_extend
(
val
,
readsamplesize
);
/* adapt LPC coefficients */
error_sign
=
sign_only
(
error_val
);
if
(
error_sign
)
{
for
(
j
=
predictor_coef_num
-
1
;
j
>=
0
&&
error_val
*
error_sign
>
0
;
j
--
)
{
int
sign
;
val
=
buffer_out
[
0
]
-
buffer_out
[
predictor_coef_num
-
j
];
val
=
buffer_out
[
i
-
predictor_coef_num
]
-
buffer_out
[
i
-
j
];
sign
=
sign_only
(
val
)
*
error_sign
;
predictor_coef_table
[
j
]
-=
sign
;
val
*=
sign
;
...
...
@@ -232,8 +232,6 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer,
(
predictor_coef_num
-
j
));
}
}
buffer_out
++
;
}
}
...
...
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