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
fcca826a
Commit
fcca826a
authored
Sep 28, 2011
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsputil: add vector_fmac_scalar()
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
32dfd8ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
dsputil.c
libavcodec/dsputil.c
+9
-0
dsputil.h
libavcodec/dsputil.h
+11
-0
No files found.
libavcodec/dsputil.c
View file @
fcca826a
...
...
@@ -2455,6 +2455,14 @@ static void vector_fmul_scalar_c(float *dst, const float *src, float mul,
dst
[
i
]
=
src
[
i
]
*
mul
;
}
static
void
vector_fmac_scalar_c
(
float
*
dst
,
const
float
*
src
,
float
mul
,
int
len
)
{
int
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
dst
[
i
]
+=
src
[
i
]
*
mul
;
}
static
void
butterflies_float_c
(
float
*
restrict
v1
,
float
*
restrict
v2
,
int
len
)
{
...
...
@@ -2994,6 +3002,7 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
c
->
scalarproduct_float
=
scalarproduct_float_c
;
c
->
butterflies_float
=
butterflies_float_c
;
c
->
vector_fmul_scalar
=
vector_fmul_scalar_c
;
c
->
vector_fmac_scalar
=
vector_fmac_scalar_c
;
c
->
shrink
[
0
]
=
av_image_copy_plane
;
c
->
shrink
[
1
]
=
ff_shrink22
;
...
...
libavcodec/dsputil.h
View file @
fcca826a
...
...
@@ -423,6 +423,17 @@ typedef struct DSPContext {
*/
void
(
*
vector_fmul_scalar
)(
float
*
dst
,
const
float
*
src
,
float
mul
,
int
len
);
/**
* Multiply a vector of floats by a scalar float and add to
* destination vector. Source and destination vectors must
* overlap exactly or not at all.
* @param dst result vector, 16-byte aligned
* @param src input vector, 16-byte aligned
* @param mul scalar value
* @param len length of vector, multiple of 4
*/
void
(
*
vector_fmac_scalar
)(
float
*
dst
,
const
float
*
src
,
float
mul
,
int
len
);
/**
* Calculate the scalar product of two vectors of floats.
* @param v1 first vector, 16-byte aligned
...
...
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