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
5a54d510
Commit
5a54d510
authored
Sep 11, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpcm: use sol_table_16 directly instead of through the DPCMContext.
parent
f47f7efd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
dpcm.c
libavcodec/dpcm.c
+2
-3
No files found.
libavcodec/dpcm.c
View file @
5a54d510
...
@@ -146,7 +146,6 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
...
@@ -146,7 +146,6 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
s
->
sample
[
0
]
=
s
->
sample
[
1
]
=
0x80
;
s
->
sample
[
0
]
=
s
->
sample
[
1
]
=
0x80
;
break
;
break
;
case
3
:
case
3
:
s
->
sol_table
=
sol_table_16
;
break
;
break
;
default:
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unknown SOL subcodec
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unknown SOL subcodec
\n
"
);
...
@@ -297,8 +296,8 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
...
@@ -297,8 +296,8 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
else
{
}
else
{
while
(
buf
<
buf_end
)
{
while
(
buf
<
buf_end
)
{
uint8_t
n
=
*
buf
++
;
uint8_t
n
=
*
buf
++
;
if
(
n
&
0x80
)
s
->
sample
[
ch
]
-=
s
->
sol_table
[
n
&
0x7F
];
if
(
n
&
0x80
)
s
->
sample
[
ch
]
-=
s
ol_table_16
[
n
&
0x7F
];
else
s
->
sample
[
ch
]
+=
s
->
sol_table
[
n
&
0x7F
];
else
s
->
sample
[
ch
]
+=
s
ol_table_16
[
n
&
0x7F
];
s
->
sample
[
ch
]
=
av_clip_int16
(
s
->
sample
[
ch
]);
s
->
sample
[
ch
]
=
av_clip_int16
(
s
->
sample
[
ch
]);
*
output_samples
++
=
s
->
sample
[
ch
];
*
output_samples
++
=
s
->
sample
[
ch
];
/* toggle channel */
/* toggle channel */
...
...
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