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
ca30ae12
Commit
ca30ae12
authored
Jun 08, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swr: add all in one rematrixing function ptr
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
dfde3d49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
rematrix.c
libswresample/rematrix.c
+7
-0
swresample_internal.h
libswresample/swresample_internal.h
+4
-0
No files found.
libswresample/rematrix.c
View file @
ca30ae12
...
...
@@ -291,6 +291,8 @@ int swri_rematrix_init(SwrContext *s){
int
nb_in
=
av_get_channel_layout_nb_channels
(
s
->
in_ch_layout
);
int
nb_out
=
av_get_channel_layout_nb_channels
(
s
->
out_ch_layout
);
s
->
mix_any_f
=
NULL
;
if
(
!
s
->
rematrix_custom
)
{
int
r
=
auto_matrix
(
s
);
if
(
r
)
...
...
@@ -346,6 +348,11 @@ void swri_rematrix_free(SwrContext *s){
int
swri_rematrix
(
SwrContext
*
s
,
AudioData
*
out
,
AudioData
*
in
,
int
len
,
int
mustcopy
){
int
out_i
,
in_i
,
i
,
j
;
if
(
s
->
mix_any_f
)
{
s
->
mix_any_f
(
out
->
ch
,
in
->
ch
,
s
->
native_matrix
,
len
);
return
0
;
}
av_assert0
(
out
->
ch_count
==
av_get_channel_layout_nb_channels
(
s
->
out_ch_layout
));
av_assert0
(
in
->
ch_count
==
av_get_channel_layout_nb_channels
(
s
->
in_ch_layout
));
...
...
libswresample/swresample_internal.h
View file @
ca30ae12
...
...
@@ -26,6 +26,8 @@
typedef
void
(
mix_1_1_func_type
)(
void
*
out
,
const
void
*
in
,
void
*
coeffp
,
int
index
,
int
len
);
typedef
void
(
mix_2_1_func_type
)(
void
*
out
,
const
void
*
in1
,
const
void
*
in2
,
void
*
coeffp
,
int
index1
,
int
index2
,
int
len
);
typedef
void
(
mix_any_func_type
)(
void
**
out
,
const
void
**
in1
,
void
*
coeffp
,
int
len
);
typedef
struct
AudioData
{
uint8_t
*
ch
[
SWR_CH_MAX
];
///< samples buffer per channel
uint8_t
*
data
;
///< samples buffer
...
...
@@ -98,6 +100,8 @@ struct SwrContext {
mix_1_1_func_type
*
mix_1_1_f
;
mix_2_1_func_type
*
mix_2_1_f
;
mix_any_func_type
*
mix_any_f
;
/* TODO: callbacks for ASM optimizations */
};
...
...
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