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
7a539e67
Commit
7a539e67
authored
Jul 29, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8svx: unify mono and stereo code paths.
parent
5caea648
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
8svx.c
libavcodec/8svx.c
+9
-8
No files found.
libavcodec/8svx.c
View file @
7a539e67
...
...
@@ -121,8 +121,9 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
/* decompress */
if
(
esc
->
table
)
{
const
uint8_t
*
buf
=
avpkt
->
data
;
uint8_t
*
dst
;
int
buf_size
=
avpkt
->
size
;
int
n
=
esc
->
samples_size
;
int
i
,
n
=
esc
->
samples_size
;
if
(
buf_size
<
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"packet size is too small
\n
"
);
...
...
@@ -130,15 +131,15 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
}
if
(
!
(
deinterleaved_samples
=
av_mallocz
(
n
)))
return
AVERROR
(
ENOMEM
);
p
=
deinterleaved_samples
;
dst
=
p
=
deinterleaved_samples
;
/* the uncompressed starting value is contained in the first byte */
if
(
avctx
->
channels
==
2
)
{
delta_decode
(
deinterleaved_samples
,
buf
+
1
,
buf_size
/
2
-
1
,
buf
[
0
],
esc
->
table
);
buf
+=
buf_size
/
2
;
delta_decode
(
deinterleaved_samples
+
n
/
2
-
1
,
buf
+
1
,
buf_size
/
2
-
1
,
buf
[
0
],
esc
->
table
)
;
}
else
delta_decode
(
deinterleaved_samples
,
buf
+
1
,
buf_size
-
1
,
buf
[
0
],
esc
->
table
);
dst
=
deinterleaved_samples
;
for
(
i
=
0
;
i
<
avctx
->
channels
;
i
++
)
{
delta_decode
(
dst
,
buf
+
1
,
buf_size
/
avctx
->
channels
-
1
,
buf
[
0
],
esc
->
table
)
;
buf
+=
buf_size
/
avctx
->
channels
;
dst
+=
n
/
avctx
->
channels
-
1
;
}
}
else
{
deinterleaved_samples
=
avpkt
->
data
;
}
...
...
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