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
4dc2dd80
Commit
4dc2dd80
authored
Apr 10, 2017
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/float_dsp: add vector_dmac_scalar()
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
9cd44e64
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
float_dsp.c
libavutil/float_dsp.c
+9
-0
float_dsp.h
libavutil/float_dsp.h
+16
-0
version.h
libavutil/version.h
+1
-1
No files found.
libavutil/float_dsp.c
View file @
4dc2dd80
...
...
@@ -40,6 +40,14 @@ static void vector_fmac_scalar_c(float *dst, const float *src, float mul,
dst
[
i
]
+=
src
[
i
]
*
mul
;
}
static
void
vector_dmac_scalar_c
(
double
*
dst
,
const
double
*
src
,
double
mul
,
int
len
)
{
int
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
dst
[
i
]
+=
src
[
i
]
*
mul
;
}
static
void
vector_fmul_scalar_c
(
float
*
dst
,
const
float
*
src
,
float
mul
,
int
len
)
{
...
...
@@ -125,6 +133,7 @@ av_cold AVFloatDSPContext *avpriv_float_dsp_alloc(int bit_exact)
fdsp
->
vector_fmul
=
vector_fmul_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
;
fdsp
->
vector_dmul_scalar
=
vector_dmul_scalar_c
;
fdsp
->
vector_fmul_window
=
vector_fmul_window_c
;
fdsp
->
vector_fmul_add
=
vector_fmul_add_c
;
...
...
libavutil/float_dsp.h
View file @
4dc2dd80
...
...
@@ -54,6 +54,22 @@ typedef struct AVFloatDSPContext {
void
(
*
vector_fmac_scalar
)(
float
*
dst
,
const
float
*
src
,
float
mul
,
int
len
);
/**
* Multiply a vector of doubles by a scalar double and add to
* destination vector. Source and destination vectors must
* overlap exactly or not at all.
*
* @param dst result vector
* constraints: 32-byte aligned
* @param src input vector
* constraints: 32-byte aligned
* @param mul scalar value
* @param len length of vector
* constraints: multiple of 16
*/
void
(
*
vector_dmac_scalar
)(
double
*
dst
,
const
double
*
src
,
double
mul
,
int
len
);
/**
* Multiply a vector of floats by a scalar float. Source and
* destination vectors must overlap exactly or not at all.
...
...
libavutil/version.h
View file @
4dc2dd80
...
...
@@ -80,7 +80,7 @@
#define LIBAVUTIL_VERSION_MAJOR 55
#define LIBAVUTIL_VERSION_MINOR 60
#define LIBAVUTIL_VERSION_MICRO 10
0
#define LIBAVUTIL_VERSION_MICRO 10
1
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
...
...
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