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
a2e4b4e9
Commit
a2e4b4e9
authored
Feb 26, 2014
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_compand: some more cosmetics to decrease difference with qatar
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
8f946ac8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
af_compand.c
libavfilter/af_compand.c
+6
-6
No files found.
libavfilter/af_compand.c
View file @
a2e4b4e9
...
@@ -173,7 +173,7 @@ static int compand_nodelay(AVFilterContext *ctx, AVFrame *frame)
...
@@ -173,7 +173,7 @@ static int compand_nodelay(AVFilterContext *ctx, AVFrame *frame)
{
{
CompandContext
*
s
=
ctx
->
priv
;
CompandContext
*
s
=
ctx
->
priv
;
AVFilterLink
*
inlink
=
ctx
->
inputs
[
0
];
AVFilterLink
*
inlink
=
ctx
->
inputs
[
0
];
const
int
channels
=
inlink
->
channels
;
const
int
channels
=
inlink
->
channels
;
const
int
nb_samples
=
frame
->
nb_samples
;
const
int
nb_samples
=
frame
->
nb_samples
;
AVFrame
*
out_frame
;
AVFrame
*
out_frame
;
int
chan
,
i
;
int
chan
,
i
;
...
@@ -233,8 +233,8 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame)
...
@@ -233,8 +233,8 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame)
for
(
chan
=
0
;
chan
<
channels
;
chan
++
)
{
for
(
chan
=
0
;
chan
<
channels
;
chan
++
)
{
AVFrame
*
delay_frame
=
s
->
delay_frame
;
AVFrame
*
delay_frame
=
s
->
delay_frame
;
const
double
*
src
=
(
double
*
)
frame
->
extended_data
[
chan
];
const
double
*
src
=
(
double
*
)
frame
->
extended_data
[
chan
];
double
*
dbuf
=
(
double
*
)
delay_frame
->
extended_data
[
chan
];
double
*
dbuf
=
(
double
*
)
delay_frame
->
extended_data
[
chan
];
ChanParam
*
cp
=
&
s
->
channels
[
chan
];
ChanParam
*
cp
=
&
s
->
channels
[
chan
];
double
*
dst
;
double
*
dst
;
...
@@ -286,9 +286,9 @@ static int compand_drain(AVFilterLink *outlink)
...
@@ -286,9 +286,9 @@ static int compand_drain(AVFilterLink *outlink)
{
{
AVFilterContext
*
ctx
=
outlink
->
src
;
AVFilterContext
*
ctx
=
outlink
->
src
;
CompandContext
*
s
=
ctx
->
priv
;
CompandContext
*
s
=
ctx
->
priv
;
const
int
channels
=
outlink
->
channels
;
const
int
channels
=
outlink
->
channels
;
AVFrame
*
frame
=
NULL
;
int
chan
,
i
,
dindex
;
int
chan
,
i
,
dindex
;
AVFrame
*
frame
=
NULL
;
/* 2048 is to limit output frame size during drain */
/* 2048 is to limit output frame size during drain */
frame
=
ff_get_audio_buffer
(
outlink
,
FFMIN
(
2048
,
s
->
delay_count
));
frame
=
ff_get_audio_buffer
(
outlink
,
FFMIN
(
2048
,
s
->
delay_count
));
...
@@ -307,7 +307,7 @@ static int compand_drain(AVFilterLink *outlink)
...
@@ -307,7 +307,7 @@ static int compand_drain(AVFilterLink *outlink)
dindex
=
s
->
delay_index
;
dindex
=
s
->
delay_index
;
for
(
i
=
0
;
i
<
frame
->
nb_samples
;
i
++
)
{
for
(
i
=
0
;
i
<
frame
->
nb_samples
;
i
++
)
{
dst
[
i
]
=
av_clipd
(
dbuf
[
dindex
]
*
get_volume
(
s
,
cp
->
volume
),
dst
[
i
]
=
av_clipd
(
dbuf
[
dindex
]
*
get_volume
(
s
,
cp
->
volume
),
-
1
,
1
);
-
1
,
1
);
dindex
=
MOD
(
dindex
+
1
,
s
->
delay_samples
);
dindex
=
MOD
(
dindex
+
1
,
s
->
delay_samples
);
}
}
}
}
...
...
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