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
5d2f52b9
Commit
5d2f52b9
authored
Jul 02, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify
Originally committed as revision 5576 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b2e30cb3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
flacenc.c
libavcodec/flacenc.c
+3
-8
No files found.
libavcodec/flacenc.c
View file @
5d2f52b9
...
...
@@ -649,7 +649,7 @@ static void quantize_lpc_coefs(double *lpc_in, int order, int precision,
int32_t
*
lpc_out
,
int
*
shift
)
{
int
i
;
double
d
,
cmax
;
double
cmax
;
int32_t
qmax
;
int
sh
;
...
...
@@ -659,18 +659,13 @@ static void quantize_lpc_coefs(double *lpc_in, int order, int precision,
/* find maximum coefficient value */
cmax
=
0
.
0
;
for
(
i
=
0
;
i
<
order
;
i
++
)
{
d
=
lpc_in
[
i
];
if
(
d
<
0
)
d
=
-
d
;
if
(
d
>
cmax
)
cmax
=
d
;
cmax
=
FFMAX
(
cmax
,
fabs
(
lpc_in
[
i
]));
}
/* if maximum value quantizes to zero, return all zeros */
if
(
cmax
*
(
1
<<
MAX_LPC_SHIFT
)
<
1
.
0
)
{
*
shift
=
0
;
for
(
i
=
0
;
i
<
order
;
i
++
)
{
lpc_out
[
i
]
=
0
;
}
memset
(
lpc_out
,
0
,
sizeof
(
int32_t
)
*
order
);
return
;
}
...
...
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