Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
bb16a062
Commit
bb16a062
authored
6 years ago
by
Paul B Mahol
Browse files
Options
Downloads
Patches
Plain Diff
avutil: add float_dsp.vector_dmul
parent
b69ea742
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavutil/float_dsp.c
+9
-0
9 additions, 0 deletions
libavutil/float_dsp.c
libavutil/float_dsp.h
+16
-0
16 additions, 0 deletions
libavutil/float_dsp.h
with
25 additions
and
0 deletions
libavutil/float_dsp.c
+
9
−
0
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
;
...
...
This diff is collapsed.
Click to expand it.
libavutil/float_dsp.h
+
16
−
0
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
;
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment