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
08c43397
Commit
08c43397
authored
Oct 30, 2008
by
Vitor Sessak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ff_dot_productf() in ra288.c
Originally committed as revision 15757 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
3ef08e32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
Makefile
libavcodec/Makefile
+1
-1
ra288.c
libavcodec/ra288.c
+3
-13
No files found.
libavcodec/Makefile
View file @
08c43397
...
...
@@ -160,7 +160,7 @@ OBJS-$(CONFIG_QPEG_DECODER) += qpeg.o
OBJS-$(CONFIG_QTRLE_DECODER)
+=
qtrle.o
OBJS-$(CONFIG_QTRLE_ENCODER)
+=
qtrleenc.o
OBJS-$(CONFIG_RA_144_DECODER)
+=
ra144.o
celp_filters.o
OBJS-$(CONFIG_RA_288_DECODER)
+=
ra288.o
OBJS-$(CONFIG_RA_288_DECODER)
+=
ra288.o
celp_math.o
OBJS-$(CONFIG_RAWVIDEO_DECODER)
+=
rawdec.o
OBJS-$(CONFIG_RAWVIDEO_ENCODER)
+=
rawenc.o
OBJS-$(CONFIG_RL2_DECODER)
+=
rl2.o
...
...
libavcodec/ra288.c
View file @
08c43397
...
...
@@ -24,6 +24,7 @@
#include "bitstream.h"
#include "ra288.h"
#include "lpc.h"
#include "celp_math.h"
typedef
struct
{
float
sp_lpc
[
36
];
///< LPC coefficients for speech data (spec: A)
...
...
@@ -52,17 +53,6 @@ static av_cold int ra288_decode_init(AVCodecContext *avctx)
return
0
;
}
static
inline
float
scalar_product_float
(
const
float
*
v1
,
const
float
*
v2
,
int
size
)
{
float
res
=
0
.;
while
(
size
--
)
res
+=
*
v1
++
*
*
v2
++
;
return
res
;
}
static
void
apply_window
(
float
*
tgt
,
const
float
*
m1
,
const
float
*
m2
,
int
n
)
{
while
(
n
--
)
...
...
@@ -72,7 +62,7 @@ static void apply_window(float *tgt, const float *m1, const float *m2, int n)
static
void
convolve
(
float
*
tgt
,
const
float
*
src
,
int
len
,
int
n
)
{
for
(;
n
>=
0
;
n
--
)
tgt
[
n
]
=
scalar_product_float
(
src
,
src
-
n
,
len
);
tgt
[
n
]
=
ff_dot_productf
(
src
,
src
-
n
,
len
);
}
...
...
@@ -101,7 +91,7 @@ static void decode(RA288Context *ractx, float gain, int cb_coef)
for
(
i
=
0
;
i
<
5
;
i
++
)
buffer
[
i
]
=
codetable
[
cb_coef
][
i
]
*
sumsum
;
sum
=
scalar_product_float
(
buffer
,
buffer
,
5
)
*
((
1
<<
24
)
/
5
.);
sum
=
ff_dot_productf
(
buffer
,
buffer
,
5
)
*
((
1
<<
24
)
/
5
.);
sum
=
FFMAX
(
sum
,
1
);
...
...
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