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
04b5eb47
Commit
04b5eb47
authored
12 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
swr: fix mix* related function pointer warnings
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c855ce26
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
libswresample/rematrix.c
+9
-9
9 additions, 9 deletions
libswresample/rematrix.c
libswresample/rematrix_template.c
+2
-1
2 additions, 1 deletion
libswresample/rematrix_template.c
with
11 additions
and
10 deletions
libswresample/rematrix.c
+
9
−
9
View file @
04b5eb47
...
...
@@ -308,9 +308,9 @@ int swri_rematrix_init(SwrContext *s){
for
(
j
=
0
;
j
<
nb_in
;
j
++
)
((
int
*
)
s
->
native_matrix
)[
i
*
nb_in
+
j
]
=
lrintf
(
s
->
matrix
[
i
][
j
]
*
32768
);
*
((
int
*
)
s
->
native_one
)
=
32768
;
s
->
mix_1_1_f
=
copy_s16
;
s
->
mix_2_1_f
=
sum2_s16
;
s
->
mix_any_f
=
get_mix_any_func_s16
(
s
);
s
->
mix_1_1_f
=
(
mix_1_1_func_type
*
)
copy_s16
;
s
->
mix_2_1_f
=
(
mix_2_1_func_type
*
)
sum2_s16
;
s
->
mix_any_f
=
(
mix_any_func_type
*
)
get_mix_any_func_s16
(
s
);
}
else
if
(
s
->
midbuf
.
fmt
==
AV_SAMPLE_FMT_FLTP
){
s
->
native_matrix
=
av_mallocz
(
nb_in
*
nb_out
*
sizeof
(
float
));
s
->
native_one
=
av_mallocz
(
sizeof
(
float
));
...
...
@@ -318,9 +318,9 @@ int swri_rematrix_init(SwrContext *s){
for
(
j
=
0
;
j
<
nb_in
;
j
++
)
((
float
*
)
s
->
native_matrix
)[
i
*
nb_in
+
j
]
=
s
->
matrix
[
i
][
j
];
*
((
float
*
)
s
->
native_one
)
=
1
.
0
;
s
->
mix_1_1_f
=
copy_float
;
s
->
mix_2_1_f
=
sum2_float
;
s
->
mix_any_f
=
get_mix_any_func_float
(
s
);
s
->
mix_1_1_f
=
(
mix_1_1_func_type
*
)
copy_float
;
s
->
mix_2_1_f
=
(
mix_2_1_func_type
*
)
sum2_float
;
s
->
mix_any_f
=
(
mix_any_func_type
*
)
get_mix_any_func_float
(
s
);
}
else
if
(
s
->
midbuf
.
fmt
==
AV_SAMPLE_FMT_DBLP
){
s
->
native_matrix
=
av_mallocz
(
nb_in
*
nb_out
*
sizeof
(
double
));
s
->
native_one
=
av_mallocz
(
sizeof
(
double
));
...
...
@@ -328,9 +328,9 @@ int swri_rematrix_init(SwrContext *s){
for
(
j
=
0
;
j
<
nb_in
;
j
++
)
((
double
*
)
s
->
native_matrix
)[
i
*
nb_in
+
j
]
=
s
->
matrix
[
i
][
j
];
*
((
double
*
)
s
->
native_one
)
=
1
.
0
;
s
->
mix_1_1_f
=
copy_double
;
s
->
mix_2_1_f
=
sum2_double
;
s
->
mix_any_f
=
get_mix_any_func_double
(
s
);
s
->
mix_1_1_f
=
(
mix_1_1_func_type
*
)
copy_double
;
s
->
mix_2_1_f
=
(
mix_2_1_func_type
*
)
sum2_double
;
s
->
mix_any_f
=
(
mix_any_func_type
*
)
get_mix_any_func_double
(
s
);
}
else
av_assert0
(
0
);
//FIXME quantize for integeres
...
...
This diff is collapsed.
Click to expand it.
libswresample/rematrix_template.c
+
2
−
1
View file @
04b5eb47
...
...
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
typedef
void
(
RENAME
(
mix_any_func_type
))(
SAMPLE
**
out
,
const
SAMPLE
**
in1
,
COEFF
*
coeffp
,
int
len
);
static
void
RENAME
(
sum2
)(
SAMPLE
*
out
,
const
SAMPLE
*
in1
,
const
SAMPLE
*
in2
,
COEFF
*
coeffp
,
int
index1
,
int
index2
,
int
len
){
int
i
;
...
...
@@ -55,7 +56,7 @@ static void RENAME(mix8to2)(SAMPLE **out, const SAMPLE **in, COEFF *coeffp, int
}
}
static
mix_any_func_type
*
RENAME
(
get_mix_any_func
)(
SwrContext
*
s
){
static
RENAME
(
mix_any_func_type
)
*
RENAME
(
get_mix_any_func
)(
SwrContext
*
s
){
if
(
s
->
out_ch_layout
==
AV_CH_LAYOUT_STEREO
&&
(
s
->
in_ch_layout
==
AV_CH_LAYOUT_5POINT1
||
s
->
in_ch_layout
==
AV_CH_LAYOUT_5POINT1_BACK
)
&&
s
->
matrix
[
0
][
2
]
==
s
->
matrix
[
1
][
2
]
&&
s
->
matrix
[
0
][
3
]
==
s
->
matrix
[
1
][
3
]
&&
!
s
->
matrix
[
0
][
1
]
&&
!
s
->
matrix
[
0
][
5
]
&&
!
s
->
matrix
[
1
][
0
]
&&
!
s
->
matrix
[
1
][
4
]
...
...
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