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
3a7f5d07
Commit
3a7f5d07
authored
Sep 27, 2007
by
Vitor Sessak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AMV audio decoder
Originally committed as revision 10598 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
815d96a6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
+18
-2
Makefile
libavcodec/Makefile
+1
-0
adpcm.c
libavcodec/adpcm.c
+15
-2
allcodecs.c
libavcodec/allcodecs.c
+1
-0
avcodec.h
libavcodec/avcodec.h
+1
-0
No files found.
libavcodec/Makefile
View file @
3a7f5d07
...
...
@@ -263,6 +263,7 @@ OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o
OBJS-$(CONFIG_ADPCM_EA_ENCODER)
+=
adpcm.o
OBJS-$(CONFIG_ADPCM_G726_DECODER)
+=
g726.o
OBJS-$(CONFIG_ADPCM_G726_ENCODER)
+=
g726.o
OBJS-$(CONFIG_ADPCM_IMA_AMV_DECODER)
+=
adpcm.o
OBJS-$(CONFIG_ADPCM_IMA_DK3_DECODER)
+=
adpcm.o
OBJS-$(CONFIG_ADPCM_IMA_DK3_ENCODER)
+=
adpcm.o
OBJS-$(CONFIG_ADPCM_IMA_DK4_DECODER)
+=
adpcm.o
...
...
libavcodec/adpcm.c
View file @
3a7f5d07
...
...
@@ -1182,16 +1182,28 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
}
}
break
;
case
CODEC_ID_ADPCM_IMA_AMV
:
case
CODEC_ID_ADPCM_IMA_SMJPEG
:
c
->
status
[
0
].
predictor
=
*
src
;
src
+=
2
;
c
->
status
[
0
].
step_index
=
*
src
++
;
src
++
;
/* skip another byte before getting to the meat */
if
(
avctx
->
codec
->
id
==
CODEC_ID_ADPCM_IMA_AMV
)
src
+=
4
;
while
(
src
<
buf
+
buf_size
)
{
char
hi
,
lo
;
lo
=
*
src
&
0x0F
;
hi
=
(
*
src
>>
4
)
&
0x0F
;
if
(
avctx
->
codec
->
id
==
CODEC_ID_ADPCM_IMA_AMV
)
FFSWAP
(
char
,
hi
,
lo
);
*
samples
++
=
adpcm_ima_expand_nibble
(
&
c
->
status
[
0
],
*
src
&
0x0F
,
3
);
lo
,
3
);
*
samples
++
=
adpcm_ima_expand_nibble
(
&
c
->
status
[
0
],
(
*
src
>>
4
)
&
0x0F
,
3
);
hi
,
3
);
src
++
;
}
break
;
...
...
@@ -1439,6 +1451,7 @@ ADPCM_ENCODER(id,name) ADPCM_DECODER(id,name)
ADPCM_CODEC
(
CODEC_ID_ADPCM_4XM
,
adpcm_4xm
);
ADPCM_CODEC
(
CODEC_ID_ADPCM_CT
,
adpcm_ct
);
ADPCM_CODEC
(
CODEC_ID_ADPCM_EA
,
adpcm_ea
);
ADPCM_CODEC
(
CODEC_ID_ADPCM_IMA_AMV
,
adpcm_ima_amv
);
ADPCM_CODEC
(
CODEC_ID_ADPCM_IMA_DK3
,
adpcm_ima_dk3
);
ADPCM_CODEC
(
CODEC_ID_ADPCM_IMA_DK4
,
adpcm_ima_dk4
);
ADPCM_CODEC
(
CODEC_ID_ADPCM_IMA_QT
,
adpcm_ima_qt
);
...
...
libavcodec/allcodecs.c
View file @
3a7f5d07
...
...
@@ -246,6 +246,7 @@ void avcodec_register_all(void)
REGISTER_ENCDEC
(
ADPCM_CT
,
adpcm_ct
);
REGISTER_ENCDEC
(
ADPCM_EA
,
adpcm_ea
);
REGISTER_ENCDEC
(
ADPCM_G726
,
adpcm_g726
);
REGISTER_DECODER
(
ADPCM_IMA_AMV
,
adpcm_ima_amv
);
REGISTER_ENCDEC
(
ADPCM_IMA_DK3
,
adpcm_ima_dk3
);
REGISTER_ENCDEC
(
ADPCM_IMA_DK4
,
adpcm_ima_dk4
);
REGISTER_ENCDEC
(
ADPCM_IMA_QT
,
adpcm_ima_qt
);
...
...
libavcodec/avcodec.h
View file @
3a7f5d07
...
...
@@ -208,6 +208,7 @@ enum CodecID {
CODEC_ID_ADPCM_SBPRO_3
,
CODEC_ID_ADPCM_SBPRO_2
,
CODEC_ID_ADPCM_THP
,
CODEC_ID_ADPCM_IMA_AMV
,
/* AMR */
CODEC_ID_AMR_NB
=
0x12000
,
...
...
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