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
ff994c2a
Commit
ff994c2a
authored
Oct 28, 2017
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lswr/rematrix: Support s32p.
Fixes ticket #6785.
parent
7a02b364
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
rematrix.c
libswresample/rematrix.c
+14
-5
version.h
libswresample/version.h
+1
-1
No files found.
libswresample/rematrix.c
View file @
ff994c2a
...
...
@@ -445,14 +445,23 @@ av_cold int swri_rematrix_init(SwrContext *s){
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
if
(
s
->
midbuf
.
fmt
==
AV_SAMPLE_FMT_S32P
){
// Only for dithering currently
// s->native_matrix = av_calloc(nb_in * nb_out, sizeof(double));
s
->
native_one
=
av_mallocz
(
sizeof
(
int
));
if
(
!
s
->
native_one
)
return
AVERROR
(
ENOMEM
);
// for (i = 0; i < nb_out; i++)
// for (j = 0; j < nb_in; j++)
// ((double*)s->native_matrix)[i * nb_in + j] = s->matrix[i][j];
s
->
native_matrix
=
av_calloc
(
nb_in
*
nb_out
,
sizeof
(
int
));
if
(
!
s
->
native_matrix
)
{
av_freep
(
&
s
->
native_one
);
return
AVERROR
(
ENOMEM
);
}
for
(
i
=
0
;
i
<
nb_out
;
i
++
)
{
double
rem
=
0
;
for
(
j
=
0
;
j
<
nb_in
;
j
++
)
{
double
target
=
s
->
matrix
[
i
][
j
]
*
32768
+
rem
;
((
int
*
)
s
->
native_matrix
)[
i
*
nb_in
+
j
]
=
lrintf
(
target
);
rem
+=
target
-
((
int
*
)
s
->
native_matrix
)[
i
*
nb_in
+
j
];
}
}
*
((
int
*
)
s
->
native_one
)
=
32768
;
s
->
mix_1_1_f
=
(
mix_1_1_func_type
*
)
copy_s32
;
s
->
mix_2_1_f
=
(
mix_2_1_func_type
*
)
sum2_s32
;
...
...
libswresample/version.h
View file @
ff994c2a
...
...
@@ -30,7 +30,7 @@
#define LIBSWRESAMPLE_VERSION_MAJOR 3
#define LIBSWRESAMPLE_VERSION_MINOR 0
#define LIBSWRESAMPLE_VERSION_MICRO 10
0
#define LIBSWRESAMPLE_VERSION_MICRO 10
1
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
LIBSWRESAMPLE_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