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
60abdb6c
Commit
60abdb6c
authored
Sep 15, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_aecho & af_compand: use extended_data
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
a06e2088
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
af_aecho.c
libavfilter/af_aecho.c
+2
-2
af_compand.c
libavfilter/af_compand.c
+5
-5
No files found.
libavfilter/af_aecho.c
View file @
60abdb6c
...
@@ -282,7 +282,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
...
@@ -282,7 +282,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
av_frame_copy_props
(
out_frame
,
frame
);
av_frame_copy_props
(
out_frame
,
frame
);
}
}
s
->
echo_samples
(
s
,
s
->
delayptrs
,
frame
->
data
,
out_frame
->
data
,
s
->
echo_samples
(
s
,
s
->
delayptrs
,
frame
->
extended_data
,
out_frame
->
extended_
data
,
frame
->
nb_samples
,
inlink
->
channels
);
frame
->
nb_samples
,
inlink
->
channels
);
if
(
frame
!=
out_frame
)
if
(
frame
!=
out_frame
)
...
@@ -314,7 +314,7 @@ static int request_frame(AVFilterLink *outlink)
...
@@ -314,7 +314,7 @@ static int request_frame(AVFilterLink *outlink)
outlink
->
channels
,
outlink
->
channels
,
frame
->
format
);
frame
->
format
);
s
->
echo_samples
(
s
,
s
->
delayptrs
,
frame
->
data
,
frame
->
data
,
s
->
echo_samples
(
s
,
s
->
delayptrs
,
frame
->
extended_data
,
frame
->
extended_
data
,
frame
->
nb_samples
,
outlink
->
channels
);
frame
->
nb_samples
,
outlink
->
channels
);
frame
->
pts
=
s
->
next_pts
;
frame
->
pts
=
s
->
next_pts
;
...
...
libavfilter/af_compand.c
View file @
60abdb6c
...
@@ -190,8 +190,8 @@ static int compand_nodelay(AVFilterContext *ctx, AVFrame *frame)
...
@@ -190,8 +190,8 @@ static int compand_nodelay(AVFilterContext *ctx, AVFrame *frame)
}
}
for
(
chan
=
0
;
chan
<
channels
;
chan
++
)
{
for
(
chan
=
0
;
chan
<
channels
;
chan
++
)
{
const
double
*
src
=
(
double
*
)
frame
->
data
[
chan
];
const
double
*
src
=
(
double
*
)
frame
->
extended_
data
[
chan
];
double
*
dst
=
(
double
*
)
out_frame
->
data
[
chan
];
double
*
dst
=
(
double
*
)
out_frame
->
extended_
data
[
chan
];
ChanParam
*
cp
=
&
s
->
channels
[
chan
];
ChanParam
*
cp
=
&
s
->
channels
[
chan
];
for
(
i
=
0
;
i
<
nb_samples
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_samples
;
i
++
)
{
...
@@ -221,7 +221,7 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame)
...
@@ -221,7 +221,7 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame)
av_assert1
(
channels
>
0
);
/* would corrupt delay_count and delay_index */
av_assert1
(
channels
>
0
);
/* would corrupt delay_count and delay_index */
for
(
chan
=
0
;
chan
<
channels
;
chan
++
)
{
for
(
chan
=
0
;
chan
<
channels
;
chan
++
)
{
const
double
*
src
=
(
double
*
)
frame
->
data
[
chan
];
const
double
*
src
=
(
double
*
)
frame
->
extended_
data
[
chan
];
double
*
dbuf
=
(
double
*
)
s
->
delayptrs
[
chan
];
double
*
dbuf
=
(
double
*
)
s
->
delayptrs
[
chan
];
ChanParam
*
cp
=
&
s
->
channels
[
chan
];
ChanParam
*
cp
=
&
s
->
channels
[
chan
];
double
*
dst
;
double
*
dst
;
...
@@ -242,7 +242,7 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame)
...
@@ -242,7 +242,7 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame)
s
->
pts
+=
av_rescale_q
(
nb_samples
-
i
,
(
AVRational
){
1
,
inlink
->
sample_rate
},
inlink
->
time_base
);
s
->
pts
+=
av_rescale_q
(
nb_samples
-
i
,
(
AVRational
){
1
,
inlink
->
sample_rate
},
inlink
->
time_base
);
}
}
dst
=
(
double
*
)
out_frame
->
data
[
chan
];
dst
=
(
double
*
)
out_frame
->
extended_
data
[
chan
];
dst
[
oindex
++
]
=
av_clipd
(
dbuf
[
dindex
]
*
get_volume
(
s
,
cp
->
volume
),
-
1
,
1
);
dst
[
oindex
++
]
=
av_clipd
(
dbuf
[
dindex
]
*
get_volume
(
s
,
cp
->
volume
),
-
1
,
1
);
}
else
{
}
else
{
count
++
;
count
++
;
...
@@ -276,7 +276,7 @@ static int compand_drain(AVFilterLink *outlink)
...
@@ -276,7 +276,7 @@ static int compand_drain(AVFilterLink *outlink)
for
(
chan
=
0
;
chan
<
channels
;
chan
++
)
{
for
(
chan
=
0
;
chan
<
channels
;
chan
++
)
{
double
*
dbuf
=
(
double
*
)
s
->
delayptrs
[
chan
];
double
*
dbuf
=
(
double
*
)
s
->
delayptrs
[
chan
];
double
*
dst
=
(
double
*
)
frame
->
data
[
chan
];
double
*
dst
=
(
double
*
)
frame
->
extended_
data
[
chan
];
ChanParam
*
cp
=
&
s
->
channels
[
chan
];
ChanParam
*
cp
=
&
s
->
channels
[
chan
];
dindex
=
s
->
delay_index
;
dindex
=
s
->
delay_index
;
...
...
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