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
12ea267b
Commit
12ea267b
authored
Jul 04, 2008
by
Vitor Sessak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify
Originally committed as revision 14065 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
8a322796
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
ra288.c
libavcodec/ra288.c
+4
-6
No files found.
libavcodec/ra288.c
View file @
12ea267b
...
@@ -38,7 +38,7 @@ typedef struct {
...
@@ -38,7 +38,7 @@ typedef struct {
}
Real288_internal
;
}
Real288_internal
;
/* Decode and produce output */
/* Decode and produce output */
static
void
decode
(
Real288_internal
*
glob
,
int
amp_coef
,
int
cb_coef
)
static
void
decode
(
Real288_internal
*
glob
,
float
gain
,
int
cb_coef
)
{
{
unsigned
int
x
,
y
;
unsigned
int
x
,
y
;
float
f
;
float
f
;
...
@@ -56,8 +56,6 @@ static void decode(Real288_internal *glob, int amp_coef, int cb_coef)
...
@@ -56,8 +56,6 @@ static void decode(Real288_internal *glob, int amp_coef, int cb_coef)
glob
->
sb
[
x
]
=
sum
;
glob
->
sb
[
x
]
=
sum
;
}
}
f
=
amptable
[
amp_coef
];
/* convert log and do rms */
/* convert log and do rms */
for
(
sum
=
32
,
x
=
10
;
x
--
;
sum
-=
glob
->
pr2
[
x
]
*
glob
->
lhist
[
x
]);
for
(
sum
=
32
,
x
=
10
;
x
--
;
sum
-=
glob
->
pr2
[
x
]
*
glob
->
lhist
[
x
]);
...
@@ -66,7 +64,7 @@ static void decode(Real288_internal *glob, int amp_coef, int cb_coef)
...
@@ -66,7 +64,7 @@ static void decode(Real288_internal *glob, int amp_coef, int cb_coef)
else
if
(
sum
>
60
)
else
if
(
sum
>
60
)
sum
=
60
;
sum
=
60
;
sumsum
=
exp
(
sum
*
0
.
1151292546497
)
*
f
;
/* pow(10.0,sum/20)*f */
sumsum
=
exp
(
sum
*
0
.
1151292546497
)
*
gain
;
/* pow(10.0,sum/20)*f */
for
(
sum
=
0
,
x
=
5
;
x
--
;)
{
for
(
sum
=
0
,
x
=
5
;
x
--
;)
{
buffer
[
x
]
=
codetable
[
cb_coef
][
x
]
*
sumsum
;
buffer
[
x
]
=
codetable
[
cb_coef
][
x
]
*
sumsum
;
...
@@ -223,10 +221,10 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
...
@@ -223,10 +221,10 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
init_get_bits
(
&
gb
,
buf
,
avctx
->
block_align
*
8
);
init_get_bits
(
&
gb
,
buf
,
avctx
->
block_align
*
8
);
for
(
x
=
0
;
x
<
32
;
x
++
)
{
for
(
x
=
0
;
x
<
32
;
x
++
)
{
int
amp_coef
=
get_bits
(
&
gb
,
3
)
;
float
gain
=
amptable
[
get_bits
(
&
gb
,
3
)]
;
int
cb_coef
=
get_bits
(
&
gb
,
6
+
(
x
&
1
));
int
cb_coef
=
get_bits
(
&
gb
,
6
+
(
x
&
1
));
glob
->
phasep
=
(
glob
->
phase
=
x
&
7
)
*
5
;
glob
->
phasep
=
(
glob
->
phase
=
x
&
7
)
*
5
;
decode
(
glob
,
amp_coef
,
cb_coef
);
decode
(
glob
,
gain
,
cb_coef
);
for
(
y
=
0
;
y
<
5
;
*
(
out
++
)
=
8
*
glob
->
output
[
glob
->
phasep
+
(
y
++
)]);
for
(
y
=
0
;
y
<
5
;
*
(
out
++
)
=
8
*
glob
->
output
[
glob
->
phasep
+
(
y
++
)]);
...
...
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