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
659c719b
Commit
659c719b
authored
Sep 12, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws_snd: remove the 2-bit ADPCM table and just subtract 2 instead.
parent
618b067d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
ws-snd1.c
libavcodec/ws-snd1.c
+4
-5
No files found.
libavcodec/ws-snd1.c
View file @
659c719b
...
...
@@ -32,7 +32,6 @@
* http://www.multimedia.cx
*/
static
const
int8_t
ws_adpcm_2bit
[]
=
{
-
2
,
-
1
,
0
,
1
};
static
const
int8_t
ws_adpcm_4bit
[]
=
{
-
9
,
-
8
,
-
6
,
-
5
,
-
4
,
-
3
,
-
2
,
-
1
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
8
};
...
...
@@ -117,16 +116,16 @@ static int ws_snd_decode_frame(AVCodecContext *avctx,
case
0
:
/* ADPCM 2-bit */
for
(
count
++
;
count
>
0
;
count
--
)
{
code
=
*
buf
++
;
sample
+=
ws_adpcm_2bit
[
code
&
0x3
]
;
sample
+=
(
code
&
0x3
)
-
2
;
sample
=
av_clip_uint8
(
sample
);
*
samples
++
=
sample
;
sample
+=
ws_adpcm_2bit
[(
code
>>
2
)
&
0x3
]
;
sample
+=
((
code
>>
2
)
&
0x3
)
-
2
;
sample
=
av_clip_uint8
(
sample
);
*
samples
++
=
sample
;
sample
+=
ws_adpcm_2bit
[(
code
>>
4
)
&
0x3
]
;
sample
+=
((
code
>>
4
)
&
0x3
)
-
2
;
sample
=
av_clip_uint8
(
sample
);
*
samples
++
=
sample
;
sample
+=
ws_adpcm_2bit
[(
code
>>
6
)
&
0x3
]
;
sample
+=
(
code
>>
6
)
-
2
;
sample
=
av_clip_uint8
(
sample
);
*
samples
++
=
sample
;
}
...
...
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