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
39575eea
Commit
39575eea
authored
Feb 06, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apedec: do not unnecessarily zero output samples for mono frames
parent
1d3c672d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
apedec.c
libavcodec/apedec.c
+4
-11
No files found.
libavcodec/apedec.c
View file @
39575eea
...
...
@@ -474,16 +474,10 @@ static void entropy_decode(APEContext *ctx, int blockstodecode, int stereo)
int32_t
*
decoded0
=
ctx
->
decoded
[
0
];
int32_t
*
decoded1
=
ctx
->
decoded
[
1
];
if
(
ctx
->
frameflags
&
APE_FRAMECODE_STEREO_SILENCE
)
{
/* We are pure silence, just memset the output buffer. */
memset
(
decoded0
,
0
,
blockstodecode
*
sizeof
(
*
decoded0
));
memset
(
decoded1
,
0
,
blockstodecode
*
sizeof
(
*
decoded1
));
}
else
{
while
(
blockstodecode
--
)
{
*
decoded0
++
=
ape_decode_value
(
ctx
,
&
ctx
->
riceY
);
if
(
stereo
)
*
decoded1
++
=
ape_decode_value
(
ctx
,
&
ctx
->
riceX
);
}
while
(
blockstodecode
--
)
{
*
decoded0
++
=
ape_decode_value
(
ctx
,
&
ctx
->
riceY
);
if
(
stereo
)
*
decoded1
++
=
ape_decode_value
(
ctx
,
&
ctx
->
riceX
);
}
}
...
...
@@ -778,7 +772,6 @@ static int init_frame_decoder(APEContext *ctx)
static
void
ape_unpack_mono
(
APEContext
*
ctx
,
int
count
)
{
if
(
ctx
->
frameflags
&
APE_FRAMECODE_STEREO_SILENCE
)
{
entropy_decode
(
ctx
,
count
,
0
);
/* We are pure silence, so we're done. */
av_log
(
ctx
->
avctx
,
AV_LOG_DEBUG
,
"pure silence mono
\n
"
);
return
;
...
...
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