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
da9620e8
Commit
da9620e8
authored
Aug 31, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adpcmdec: use planar sample format for adpcm_ea_r1/r2/r3
parent
d2b6ae02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
adpcm.c
libavcodec/adpcm.c
+10
-10
No files found.
libavcodec/adpcm.c
View file @
da9620e8
...
...
@@ -140,6 +140,9 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
case
AV_CODEC_ID_ADPCM_IMA_WAV
:
case
AV_CODEC_ID_ADPCM_4XM
:
case
AV_CODEC_ID_ADPCM_XA
:
case
AV_CODEC_ID_ADPCM_EA_R1
:
case
AV_CODEC_ID_ADPCM_EA_R2
:
case
AV_CODEC_ID_ADPCM_EA_R3
:
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S16P
;
break
;
case
AV_CODEC_ID_ADPCM_IMA_WS
:
...
...
@@ -1037,7 +1040,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
for
(
channel
=
0
;
channel
<
avctx
->
channels
;
channel
++
)
{
bytestream2_seek
(
&
gb
,
offsets
[
channel
],
SEEK_SET
);
samplesC
=
samples
+
channel
;
samplesC
=
samples
_p
[
channel
]
;
if
(
avctx
->
codec
->
id
==
AV_CODEC_ID_ADPCM_EA_R1
)
{
current_sample
=
sign_extend
(
bytestream2_get_le16
(
&
gb
),
16
);
...
...
@@ -1053,10 +1056,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
current_sample
=
sign_extend
(
bytestream2_get_be16
(
&
gb
),
16
);
previous_sample
=
sign_extend
(
bytestream2_get_be16
(
&
gb
),
16
);
for
(
count2
=
0
;
count2
<
28
;
count2
++
)
{
*
samplesC
=
sign_extend
(
bytestream2_get_be16
(
&
gb
),
16
);
samplesC
+=
avctx
->
channels
;
}
for
(
count2
=
0
;
count2
<
28
;
count2
++
)
*
samplesC
++
=
sign_extend
(
bytestream2_get_be16
(
&
gb
),
16
);
}
else
{
coeff1
=
ea_adpcm_table
[
byte
>>
4
];
coeff2
=
ea_adpcm_table
[(
byte
>>
4
)
+
4
];
...
...
@@ -1076,8 +1077,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
previous_sample
=
current_sample
;
current_sample
=
next_sample
;
*
samplesC
=
current_sample
;
samplesC
+=
avctx
->
channels
;
*
samplesC
++
=
current_sample
;
}
}
}
...
...
@@ -1309,9 +1309,9 @@ ADPCM_DECODER(AV_CODEC_ID_ADPCM_4XM, sample_fmts_s16p, adpcm_4xm,
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_CT
,
sample_fmts_s16
,
adpcm_ct
,
"ADPCM Creative Technology"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_EA
,
sample_fmts_s16
,
adpcm_ea
,
"ADPCM Electronic Arts"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_EA_MAXIS_XA
,
sample_fmts_s16
,
adpcm_ea_maxis_xa
,
"ADPCM Electronic Arts Maxis CDROM XA"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_EA_R1
,
sample_fmts_s16
,
adpcm_ea_r1
,
"ADPCM Electronic Arts R1"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_EA_R2
,
sample_fmts_s16
,
adpcm_ea_r2
,
"ADPCM Electronic Arts R2"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_EA_R3
,
sample_fmts_s16
,
adpcm_ea_r3
,
"ADPCM Electronic Arts R3"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_EA_R1
,
sample_fmts_s16
p
,
adpcm_ea_r1
,
"ADPCM Electronic Arts R1"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_EA_R2
,
sample_fmts_s16
p
,
adpcm_ea_r2
,
"ADPCM Electronic Arts R2"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_EA_R3
,
sample_fmts_s16
p
,
adpcm_ea_r3
,
"ADPCM Electronic Arts R3"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_EA_XAS
,
sample_fmts_s16
,
adpcm_ea_xas
,
"ADPCM Electronic Arts XAS"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_IMA_AMV
,
sample_fmts_s16
,
adpcm_ima_amv
,
"ADPCM IMA AMV"
);
ADPCM_DECODER
(
AV_CODEC_ID_ADPCM_IMA_APC
,
sample_fmts_s16
,
adpcm_ima_apc
,
"ADPCM IMA CRYO APC"
);
...
...
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