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
2279dd9e
Commit
2279dd9e
authored
May 24, 2008
by
Vitor Sessak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify final()
Originally committed as revision 13277 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
08533939
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
ra144.c
libavcodec/ra144.c
+12
-17
No files found.
libavcodec/ra144.c
View file @
2279dd9e
...
...
@@ -145,38 +145,33 @@ static void add_wav(int n, int f, int m1, int m2, int m3, const short *s1,
static
void
final
(
const
short
*
i1
,
const
short
*
i2
,
void
*
out
,
int
*
statbuf
,
int
len
)
{
int
x
,
sum
,
i
;
int
buffer
[
10
];
short
*
ptr
;
short
*
ptr2
;
int
x
,
i
;
unsigned
short
int
work
[
50
];
short
*
ptr
=
work
;
memcpy
(
work
,
statbuf
,
20
);
memcpy
(
work
+
10
,
i2
,
len
*
2
);
for
(
i
=
0
;
i
<
10
;
i
++
)
buffer
[
9
-
i
]
=
i1
[
i
];
ptr2
=
(
ptr
=
work
)
+
len
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
int
sum
=
0
;
while
(
ptr
<
ptr2
)
{
for
(
sum
=
0
,
x
=
0
;
x
<=
9
;
x
++
)
sum
+=
buffer
[
x
]
*
(
ptr
[
x
]);
for
(
x
=
0
;
x
<
10
;
x
++
)
sum
+=
i1
[
9
-
x
]
*
ptr
[
x
];
sum
=
sum
>>
12
;
x
=
ptr
[
10
]
-
sum
;
sum
>>=
12
;
if
(
x
<-
32768
||
x
>
32767
)
{
if
(
ptr
[
10
]
-
sum
<
-
32768
||
ptr
[
10
]
-
sum
>
32767
)
{
memset
(
out
,
0
,
len
*
2
);
memset
(
statbuf
,
0
,
20
);
return
;
}
ptr
[
10
]
=
x
;
ptr
[
10
]
-=
sum
;
ptr
++
;
}
memcpy
(
out
,
ptr
+
10
-
len
,
len
*
2
);
memcpy
(
statbuf
,
ptr
,
20
);
memcpy
(
out
,
work
+
10
,
len
*
2
);
memcpy
(
statbuf
,
work
+
40
,
20
);
}
static
unsigned
int
rms
(
const
int
*
data
,
int
f
)
...
...
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