Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
4cfc9208
Commit
4cfc9208
authored
Jun 04, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swr: add native_simd_one
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
e3e398b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
0 deletions
+7
-0
rematrix.c
libswresample/rematrix.c
+1
-0
swresample_internal.h
libswresample/swresample_internal.h
+1
-0
swresample_x86.c
libswresample/x86/swresample_x86.c
+5
-0
No files found.
libswresample/rematrix.c
View file @
4cfc9208
...
...
@@ -403,6 +403,7 @@ av_cold void swri_rematrix_free(SwrContext *s){
av_freep
(
&
s
->
native_matrix
);
av_freep
(
&
s
->
native_one
);
av_freep
(
&
s
->
native_simd_matrix
);
av_freep
(
&
s
->
native_simd_one
);
}
int
swri_rematrix
(
SwrContext
*
s
,
AudioData
*
out
,
AudioData
*
in
,
int
len
,
int
mustcopy
){
...
...
libswresample/swresample_internal.h
View file @
4cfc9208
...
...
@@ -134,6 +134,7 @@ struct SwrContext {
float
matrix
[
SWR_CH_MAX
][
SWR_CH_MAX
];
///< floating point rematrixing coefficients
uint8_t
*
native_matrix
;
uint8_t
*
native_one
;
uint8_t
*
native_simd_one
;
uint8_t
*
native_simd_matrix
;
int32_t
matrix32
[
SWR_CH_MAX
][
SWR_CH_MAX
];
///< 17.15 fixed point rematrixing coefficients
uint8_t
matrix_ch
[
SWR_CH_MAX
][
SWR_CH_MAX
+
1
];
///< Lists of input channels per output channel that have non zero rematrixing coefficients
...
...
libswresample/x86/swresample_x86.c
View file @
4cfc9208
...
...
@@ -169,6 +169,7 @@ av_cold void swri_rematrix_init_x86(struct SwrContext *s){
s
->
mix_2_1_simd
=
ff_mix_2_1_a_int16_sse2
;
}
s
->
native_simd_matrix
=
av_mallocz
(
2
*
num
*
sizeof
(
int16_t
));
s
->
native_simd_one
=
av_mallocz
(
2
*
sizeof
(
int16_t
));
for
(
i
=
0
;
i
<
nb_out
;
i
++
){
int
sh
=
0
;
for
(
j
=
0
;
j
<
nb_in
;
j
++
)
...
...
@@ -180,6 +181,8 @@ av_cold void swri_rematrix_init_x86(struct SwrContext *s){
((((
int
*
)
s
->
native_matrix
)[
i
*
nb_in
+
j
])
+
(
1
<<
sh
>>
1
))
>>
sh
;
}
}
((
int16_t
*
)
s
->
native_simd_one
)[
1
]
=
14
;
((
int16_t
*
)
s
->
native_simd_one
)[
0
]
=
16384
;
}
else
if
(
s
->
midbuf
.
fmt
==
AV_SAMPLE_FMT_FLTP
){
if
(
mm_flags
&
AV_CPU_FLAG_SSE
)
{
s
->
mix_1_1_simd
=
ff_mix_1_1_a_float_sse
;
...
...
@@ -191,5 +194,7 @@ av_cold void swri_rematrix_init_x86(struct SwrContext *s){
}
s
->
native_simd_matrix
=
av_mallocz
(
num
*
sizeof
(
float
));
memcpy
(
s
->
native_simd_matrix
,
s
->
native_matrix
,
num
*
sizeof
(
float
));
s
->
native_simd_one
=
av_mallocz
(
sizeof
(
float
));
memcpy
(
s
->
native_simd_one
,
s
->
native_one
,
sizeof
(
float
));
}
}
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