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
bb16a062
Commit
bb16a062
authored
Sep 12, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil: add float_dsp.vector_dmul
parent
b69ea742
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
float_dsp.c
libavutil/float_dsp.c
+9
-0
float_dsp.h
libavutil/float_dsp.h
+16
-0
No files found.
libavutil/float_dsp.c
View file @
bb16a062
...
...
@@ -32,6 +32,14 @@ static void vector_fmul_c(float *dst, const float *src0, const float *src1,
dst
[
i
]
=
src0
[
i
]
*
src1
[
i
];
}
static
void
vector_dmul_c
(
double
*
dst
,
const
double
*
src0
,
const
double
*
src1
,
int
len
)
{
int
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
dst
[
i
]
=
src0
[
i
]
*
src1
[
i
];
}
static
void
vector_fmac_scalar_c
(
float
*
dst
,
const
float
*
src
,
float
mul
,
int
len
)
{
...
...
@@ -131,6 +139,7 @@ av_cold AVFloatDSPContext *avpriv_float_dsp_alloc(int bit_exact)
return
NULL
;
fdsp
->
vector_fmul
=
vector_fmul_c
;
fdsp
->
vector_dmul
=
vector_dmul_c
;
fdsp
->
vector_fmac_scalar
=
vector_fmac_scalar_c
;
fdsp
->
vector_fmul_scalar
=
vector_fmul_scalar_c
;
fdsp
->
vector_dmac_scalar
=
vector_dmac_scalar_c
;
...
...
libavutil/float_dsp.h
View file @
bb16a062
...
...
@@ -173,6 +173,22 @@ typedef struct AVFloatDSPContext {
* @return sum of elementwise products
*/
float
(
*
scalarproduct_float
)(
const
float
*
v1
,
const
float
*
v2
,
int
len
);
/**
* Calculate the entry wise product of two vectors of doubles and store the result in
* a vector of doubles.
*
* @param dst output vector
* constraints: 32-byte aligned
* @param src0 first input vector
* constraints: 32-byte aligned
* @param src1 second input vector
* constraints: 32-byte aligned
* @param len number of elements in the input
* constraints: multiple of 16
*/
void
(
*
vector_dmul
)(
double
*
dst
,
const
double
*
src0
,
const
double
*
src1
,
int
len
);
}
AVFloatDSPContext
;
/**
...
...
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