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
5e5ce70f
Commit
5e5ce70f
authored
Oct 13, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
truespeech: decode directly to output buffer instead of a temp buffer
parent
3e7a1767
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
truespeech.c
libavcodec/truespeech.c
+6
-10
No files found.
libavcodec/truespeech.c
View file @
5e5ce70f
...
...
@@ -346,7 +346,6 @@ static int truespeech_decode_frame(AVCodecContext *avctx,
int
i
,
j
;
short
*
samples
=
data
;
int
consumed
=
0
;
int16_t
out_buf
[
240
];
int
iterations
,
out_size
;
iterations
=
buf_size
/
32
;
...
...
@@ -363,6 +362,8 @@ static int truespeech_decode_frame(AVCodecContext *avctx,
return
AVERROR
(
EINVAL
);
}
memset
(
samples
,
0
,
out_size
);
for
(
j
=
0
;
j
<
iterations
;
j
++
)
{
truespeech_read_frame
(
c
,
buf
+
consumed
);
consumed
+=
32
;
...
...
@@ -370,20 +371,15 @@ static int truespeech_decode_frame(AVCodecContext *avctx,
truespeech_correlate_filter
(
c
);
truespeech_filters_merge
(
c
);
memset
(
out_buf
,
0
,
240
*
2
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
truespeech_apply_twopoint_filter
(
c
,
i
);
truespeech_place_pulses
(
c
,
out_buf
+
i
*
60
,
i
);
truespeech_update_filters
(
c
,
out_buf
+
i
*
60
,
i
);
truespeech_synth
(
c
,
out_buf
+
i
*
60
,
i
);
truespeech_place_pulses
(
c
,
samples
,
i
);
truespeech_update_filters
(
c
,
samples
,
i
);
truespeech_synth
(
c
,
samples
,
i
);
samples
+=
60
;
}
truespeech_save_prevvec
(
c
);
/* finally output decoded frame */
for
(
i
=
0
;
i
<
240
;
i
++
)
*
samples
++
=
out_buf
[
i
];
}
*
data_size
=
out_size
;
...
...
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