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
01eed8c6
Commit
01eed8c6
authored
Nov 28, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iff demuxer: 16SV support
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
1b43fc12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
utils.c
libavcodec/utils.c
+2
-0
iff.c
libavformat/iff.c
+7
-1
No files found.
libavcodec/utils.c
View file @
01eed8c6
...
@@ -2297,6 +2297,8 @@ void avcodec_default_free_buffers(AVCodecContext *avctx)
...
@@ -2297,6 +2297,8 @@ void avcodec_default_free_buffers(AVCodecContext *avctx)
int
av_get_exact_bits_per_sample
(
enum
AVCodecID
codec_id
)
int
av_get_exact_bits_per_sample
(
enum
AVCodecID
codec_id
)
{
{
switch
(
codec_id
)
{
switch
(
codec_id
)
{
case
AV_CODEC_ID_8SVX_EXP
:
case
AV_CODEC_ID_8SVX_FIB
:
case
AV_CODEC_ID_ADPCM_CT
:
case
AV_CODEC_ID_ADPCM_CT
:
case
AV_CODEC_ID_ADPCM_IMA_APC
:
case
AV_CODEC_ID_ADPCM_IMA_APC
:
case
AV_CODEC_ID_ADPCM_IMA_EA_SEAD
:
case
AV_CODEC_ID_ADPCM_IMA_EA_SEAD
:
...
...
libavformat/iff.c
View file @
01eed8c6
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include "internal.h"
#include "internal.h"
#define ID_8SVX MKTAG('8','S','V','X')
#define ID_8SVX MKTAG('8','S','V','X')
#define ID_16SV MKTAG('1','6','S','V')
#define ID_VHDR MKTAG('V','H','D','R')
#define ID_VHDR MKTAG('V','H','D','R')
#define ID_ATAK MKTAG('A','T','A','K')
#define ID_ATAK MKTAG('A','T','A','K')
#define ID_RLSE MKTAG('R','L','S','E')
#define ID_RLSE MKTAG('R','L','S','E')
...
@@ -123,6 +124,7 @@ static int iff_probe(AVProbeData *p)
...
@@ -123,6 +124,7 @@ static int iff_probe(AVProbeData *p)
if
(
AV_RL32
(
d
)
==
ID_FORM
&&
if
(
AV_RL32
(
d
)
==
ID_FORM
&&
(
AV_RL32
(
d
+
8
)
==
ID_8SVX
||
(
AV_RL32
(
d
+
8
)
==
ID_8SVX
||
AV_RL32
(
d
+
8
)
==
ID_16SV
||
AV_RL32
(
d
+
8
)
==
ID_PBM
||
AV_RL32
(
d
+
8
)
==
ID_PBM
||
AV_RL32
(
d
+
8
)
==
ID_ACBM
||
AV_RL32
(
d
+
8
)
==
ID_ACBM
||
AV_RL32
(
d
+
8
)
==
ID_DEEP
||
AV_RL32
(
d
+
8
)
==
ID_DEEP
||
...
@@ -301,6 +303,9 @@ static int iff_read_header(AVFormatContext *s)
...
@@ -301,6 +303,9 @@ static int iff_read_header(AVFormatContext *s)
case
AVMEDIA_TYPE_AUDIO
:
case
AVMEDIA_TYPE_AUDIO
:
avpriv_set_pts_info
(
st
,
32
,
1
,
st
->
codec
->
sample_rate
);
avpriv_set_pts_info
(
st
,
32
,
1
,
st
->
codec
->
sample_rate
);
if
(
st
->
codec
->
codec_tag
==
ID_16SV
)
st
->
codec
->
codec_id
=
AV_CODEC_ID_PCM_S16BE_PLANAR
;
else
{
switch
(
iff
->
svx8_compression
)
{
switch
(
iff
->
svx8_compression
)
{
case
COMP_NONE
:
case
COMP_NONE
:
st
->
codec
->
codec_id
=
AV_CODEC_ID_PCM_S8_PLANAR
;
st
->
codec
->
codec_id
=
AV_CODEC_ID_PCM_S8_PLANAR
;
...
@@ -316,8 +321,9 @@ static int iff_read_header(AVFormatContext *s)
...
@@ -316,8 +321,9 @@ static int iff_read_header(AVFormatContext *s)
"Unknown SVX8 compression method '%d'
\n
"
,
iff
->
svx8_compression
);
"Unknown SVX8 compression method '%d'
\n
"
,
iff
->
svx8_compression
);
return
-
1
;
return
-
1
;
}
}
}
st
->
codec
->
bits_per_coded_sample
=
iff
->
svx8_compression
==
COMP_NONE
?
8
:
4
;
st
->
codec
->
bits_per_coded_sample
=
av_get_bits_per_sample
(
st
->
codec
->
codec_id
)
;
st
->
codec
->
bit_rate
=
st
->
codec
->
channels
*
st
->
codec
->
sample_rate
*
st
->
codec
->
bits_per_coded_sample
;
st
->
codec
->
bit_rate
=
st
->
codec
->
channels
*
st
->
codec
->
sample_rate
*
st
->
codec
->
bits_per_coded_sample
;
st
->
codec
->
block_align
=
st
->
codec
->
channels
*
st
->
codec
->
bits_per_coded_sample
;
st
->
codec
->
block_align
=
st
->
codec
->
channels
*
st
->
codec
->
bits_per_coded_sample
;
break
;
break
;
...
...
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