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
992cb15e
Commit
992cb15e
authored
Dec 20, 2016
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmavoice: move wmavoice_flush() up.
parent
1c8fbd7b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
wmavoice.c
libavcodec/wmavoice.c
+28
-28
No files found.
libavcodec/wmavoice.c
View file @
992cb15e
...
@@ -337,6 +337,34 @@ static av_cold void wmavoice_init_static_data(AVCodec *codec)
...
@@ -337,6 +337,34 @@ static av_cold void wmavoice_init_static_data(AVCodec *codec)
bits
,
1
,
1
,
codes
,
2
,
2
,
132
);
bits
,
1
,
1
,
codes
,
2
,
2
,
132
);
}
}
static
av_cold
void
wmavoice_flush
(
AVCodecContext
*
ctx
)
{
WMAVoiceContext
*
s
=
ctx
->
priv_data
;
int
n
;
s
->
postfilter_agc
=
0
;
s
->
sframe_cache_size
=
0
;
s
->
skip_bits_next
=
0
;
for
(
n
=
0
;
n
<
s
->
lsps
;
n
++
)
s
->
prev_lsps
[
n
]
=
M_PI
*
(
n
+
1
.
0
)
/
(
s
->
lsps
+
1
.
0
);
memset
(
s
->
excitation_history
,
0
,
sizeof
(
*
s
->
excitation_history
)
*
MAX_SIGNAL_HISTORY
);
memset
(
s
->
synth_history
,
0
,
sizeof
(
*
s
->
synth_history
)
*
MAX_LSPS
);
memset
(
s
->
gain_pred_err
,
0
,
sizeof
(
s
->
gain_pred_err
));
if
(
s
->
do_apf
)
{
memset
(
&
s
->
synth_filter_out_buf
[
MAX_LSPS_ALIGN16
-
s
->
lsps
],
0
,
sizeof
(
*
s
->
synth_filter_out_buf
)
*
s
->
lsps
);
memset
(
s
->
dcf_mem
,
0
,
sizeof
(
*
s
->
dcf_mem
)
*
2
);
memset
(
s
->
zero_exc_pf
,
0
,
sizeof
(
*
s
->
zero_exc_pf
)
*
s
->
history_nsamples
);
memset
(
s
->
denoise_filter_cache
,
0
,
sizeof
(
s
->
denoise_filter_cache
));
}
}
/**
/**
* Set up decoder with parameters from demuxer (extradata etc.).
* Set up decoder with parameters from demuxer (extradata etc.).
*/
*/
...
@@ -2046,34 +2074,6 @@ static av_cold int wmavoice_decode_end(AVCodecContext *ctx)
...
@@ -2046,34 +2074,6 @@ static av_cold int wmavoice_decode_end(AVCodecContext *ctx)
return
0
;
return
0
;
}
}
static
av_cold
void
wmavoice_flush
(
AVCodecContext
*
ctx
)
{
WMAVoiceContext
*
s
=
ctx
->
priv_data
;
int
n
;
s
->
postfilter_agc
=
0
;
s
->
sframe_cache_size
=
0
;
s
->
skip_bits_next
=
0
;
for
(
n
=
0
;
n
<
s
->
lsps
;
n
++
)
s
->
prev_lsps
[
n
]
=
M_PI
*
(
n
+
1
.
0
)
/
(
s
->
lsps
+
1
.
0
);
memset
(
s
->
excitation_history
,
0
,
sizeof
(
*
s
->
excitation_history
)
*
MAX_SIGNAL_HISTORY
);
memset
(
s
->
synth_history
,
0
,
sizeof
(
*
s
->
synth_history
)
*
MAX_LSPS
);
memset
(
s
->
gain_pred_err
,
0
,
sizeof
(
s
->
gain_pred_err
));
if
(
s
->
do_apf
)
{
memset
(
&
s
->
synth_filter_out_buf
[
MAX_LSPS_ALIGN16
-
s
->
lsps
],
0
,
sizeof
(
*
s
->
synth_filter_out_buf
)
*
s
->
lsps
);
memset
(
s
->
dcf_mem
,
0
,
sizeof
(
*
s
->
dcf_mem
)
*
2
);
memset
(
s
->
zero_exc_pf
,
0
,
sizeof
(
*
s
->
zero_exc_pf
)
*
s
->
history_nsamples
);
memset
(
s
->
denoise_filter_cache
,
0
,
sizeof
(
s
->
denoise_filter_cache
));
}
}
AVCodec
ff_wmavoice_decoder
=
{
AVCodec
ff_wmavoice_decoder
=
{
.
name
=
"wmavoice"
,
.
name
=
"wmavoice"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Windows Media Audio Voice"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Windows Media Audio Voice"
),
...
...
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