Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
56d061ce
Commit
56d061ce
authored
Nov 18, 2013
by
Kostya Shishkov
Committed by
Anton Khirnov
Nov 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
metasound: add last missing modes (8kHz @ 6kbps per channel)
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
de44dfc7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
4 deletions
+31
-4
Changelog
Changelog
+1
-1
general.texi
doc/general.texi
+0
-1
metasound.c
libavcodec/metasound.c
+8
-1
metasound_data.c
libavcodec/metasound_data.c
+18
-0
twinvq.c
libavcodec/twinvq.c
+1
-1
twinvq.h
libavcodec/twinvq.h
+2
-0
twinvqdec.c
libavcodec/twinvqdec.c
+1
-0
No files found.
Changelog
View file @
56d061ce
...
@@ -32,7 +32,7 @@ version 10:
...
@@ -32,7 +32,7 @@ version 10:
the -noaccurate_seek option.
the -noaccurate_seek option.
- avconv -t option can now be used for inputs, to limit the duration of
- avconv -t option can now be used for inputs, to limit the duration of
data read from an input file
data read from an input file
-
incomplete
Voxware MetaSound decoder
- Voxware MetaSound decoder
- WebP decoder
- WebP decoder
- Error Resilient AAC syntax (ER AAC LC) decoding
- Error Resilient AAC syntax (ER AAC LC) decoding
- Low Delay AAC (ER AAC LD) decoding
- Low Delay AAC (ER AAC LD) decoding
...
...
doc/general.texi
View file @
56d061ce
...
@@ -827,7 +827,6 @@ following image formats are supported:
...
@@ -827,7 +827,6 @@ following image formats are supported:
@item Vorbis @tab E @tab X
@item Vorbis @tab E @tab X
@tab A native but very primitive encoder exists.
@tab A native but very primitive encoder exists.
@item Voxware MetaSound @tab @tab X
@item Voxware MetaSound @tab @tab X
@tab imperfect and incomplete support
@item WavPack @tab E @tab X
@item WavPack @tab E @tab X
@tab supported through external library libwavpack
@tab supported through external library libwavpack
@item Westwood Audio (SND1) @tab @tab X
@item Westwood Audio (SND1) @tab @tab X
...
...
libavcodec/metasound.c
View file @
56d061ce
...
@@ -187,7 +187,7 @@ static int metasound_read_bitstream(AVCodecContext *avctx, TwinVQContext *tctx,
...
@@ -187,7 +187,7 @@ static int metasound_read_bitstream(AVCodecContext *avctx, TwinVQContext *tctx,
sub
=
mtab
->
fmode
[
bits
->
ftype
].
sub
;
sub
=
mtab
->
fmode
[
bits
->
ftype
].
sub
;
if
(
bits
->
ftype
!=
TWINVQ_FT_SHORT
)
if
(
bits
->
ftype
!=
TWINVQ_FT_SHORT
&&
!
tctx
->
is_6kbps
)
get_bits
(
&
gb
,
2
);
get_bits
(
&
gb
,
2
);
read_cb_data
(
tctx
,
&
gb
,
bits
->
main_coeffs
,
bits
->
ftype
);
read_cb_data
(
tctx
,
&
gb
,
bits
->
main_coeffs
,
bits
->
ftype
);
...
@@ -307,6 +307,12 @@ static av_cold int metasound_decode_init(AVCodecContext *avctx)
...
@@ -307,6 +307,12 @@ static av_cold int metasound_decode_init(AVCodecContext *avctx)
ibps
=
avctx
->
bit_rate
/
(
1000
*
avctx
->
channels
);
ibps
=
avctx
->
bit_rate
/
(
1000
*
avctx
->
channels
);
switch
((
avctx
->
channels
<<
16
)
+
(
isampf
<<
8
)
+
ibps
)
{
switch
((
avctx
->
channels
<<
16
)
+
(
isampf
<<
8
)
+
ibps
)
{
case
(
1
<<
16
)
+
(
8
<<
8
)
+
6
:
tctx
->
mtab
=
&
ff_metasound_mode0806
;
break
;
case
(
2
<<
16
)
+
(
8
<<
8
)
+
6
:
tctx
->
mtab
=
&
ff_metasound_mode0806s
;
break
;
case
(
1
<<
16
)
+
(
8
<<
8
)
+
8
:
case
(
1
<<
16
)
+
(
8
<<
8
)
+
8
:
tctx
->
mtab
=
&
ff_metasound_mode0808
;
tctx
->
mtab
=
&
ff_metasound_mode0808
;
break
;
break
;
...
@@ -362,6 +368,7 @@ static av_cold int metasound_decode_init(AVCodecContext *avctx)
...
@@ -362,6 +368,7 @@ static av_cold int metasound_decode_init(AVCodecContext *avctx)
tctx
->
decode_ppc
=
decode_ppc
;
tctx
->
decode_ppc
=
decode_ppc
;
tctx
->
frame_size
=
avctx
->
bit_rate
*
tctx
->
mtab
->
size
tctx
->
frame_size
=
avctx
->
bit_rate
*
tctx
->
mtab
->
size
/
avctx
->
sample_rate
;
/
avctx
->
sample_rate
;
tctx
->
is_6kbps
=
ibps
==
6
;
return
ff_twinvq_decode_init
(
avctx
);
return
ff_twinvq_decode_init
(
avctx
);
}
}
...
...
libavcodec/metasound_data.c
View file @
56d061ce
...
@@ -15190,6 +15190,24 @@ static const uint16_t bark_tab_s44_128[] = {
...
@@ -15190,6 +15190,24 @@ static const uint16_t bark_tab_s44_128[] = {
1
,
2
,
1
,
2
,
3
,
4
,
6
,
10
,
23
,
76
1
,
2
,
1
,
2
,
3
,
4
,
6
,
10
,
23
,
76
};
};
const
TwinVQModeTab
ff_metasound_mode0806
=
{
{
{
8
,
bark_tab_s8_64
,
10
,
fcb8s
,
1
,
5
,
cb0806ss0
,
cb0806ss1
,
27
},
{
2
,
bark_tab_m8_256
,
20
,
fcb8m
,
2
,
5
,
cb0806sm0
,
cb0806sm1
,
22
},
{
1
,
bark_tab_l8_512
,
30
,
fcb8l
,
3
,
6
,
cb0806sl0
,
cb0806sl1
,
24
}
},
512
,
12
,
lsp8
,
1
,
5
,
3
,
3
,
shape8
,
8
,
28
,
20
,
6
,
200
};
const
TwinVQModeTab
ff_metasound_mode0806s
=
{
{
{
8
,
bark_tab_s8s_64
,
10
,
fcb8ss
,
1
,
5
,
cb0806ss0
,
cb0806ss1
,
27
},
{
2
,
bark_tab_m8s_256
,
20
,
fcb8sm
,
2
,
5
,
cb0806sm0
,
cb0806sm1
,
22
},
{
1
,
bark_tab_l8s_512
,
30
,
fcb8sl
,
3
,
6
,
cb0806sl0
,
cb0806sl1
,
24
}
},
512
,
12
,
lsp8s
,
1
,
5
,
3
,
3
,
shape8s
,
8
,
28
,
20
,
6
,
200
};
const
TwinVQModeTab
ff_metasound_mode0808
=
{
const
TwinVQModeTab
ff_metasound_mode0808
=
{
{
{
{
8
,
bark_tab_s8_64
,
10
,
fcb8s
,
1
,
5
,
cb0808s0
,
cb0808s1
,
18
},
{
8
,
bark_tab_s8_64
,
10
,
fcb8s
,
1
,
5
,
cb0808s0
,
cb0808s1
,
18
},
...
...
libavcodec/twinvq.c
View file @
56d061ce
...
@@ -706,7 +706,7 @@ static av_cold void init_bitstream_params(TwinVQContext *tctx)
...
@@ -706,7 +706,7 @@ static av_cold void init_bitstream_params(TwinVQContext *tctx)
TWINVQ_WINDOW_TYPE_BITS
+
TWINVQ_WINDOW_TYPE_BITS
+
mtab
->
fmode
[
i
].
sub
*
(
bse_bits
[
i
]
+
n_ch
*
TWINVQ_SUB_GAIN_BITS
);
mtab
->
fmode
[
i
].
sub
*
(
bse_bits
[
i
]
+
n_ch
*
TWINVQ_SUB_GAIN_BITS
);
if
(
tctx
->
codec
==
TWINVQ_CODEC_METASOUND
)
{
if
(
tctx
->
codec
==
TWINVQ_CODEC_METASOUND
&&
!
tctx
->
is_6kbps
)
{
bsize_no_main_cb
[
1
]
+=
2
;
bsize_no_main_cb
[
1
]
+=
2
;
bsize_no_main_cb
[
2
]
+=
2
;
bsize_no_main_cb
[
2
]
+=
2
;
}
}
...
...
libavcodec/twinvq.h
View file @
56d061ce
...
@@ -141,6 +141,8 @@ typedef struct TwinVQContext {
...
@@ -141,6 +141,8 @@ typedef struct TwinVQContext {
const
TwinVQModeTab
*
mtab
;
const
TwinVQModeTab
*
mtab
;
int
is_6kbps
;
// history
// history
float
lsp_hist
[
2
][
20
];
///< LSP coefficients of the last frame
float
lsp_hist
[
2
][
20
];
///< LSP coefficients of the last frame
float
bark_hist
[
3
][
2
][
40
];
///< BSE coefficients of last frame
float
bark_hist
[
3
][
2
][
40
];
///< BSE coefficients of last frame
...
...
libavcodec/twinvqdec.c
View file @
56d061ce
...
@@ -402,6 +402,7 @@ static av_cold int twinvq_decode_init(AVCodecContext *avctx)
...
@@ -402,6 +402,7 @@ static av_cold int twinvq_decode_init(AVCodecContext *avctx)
tctx
->
decode_ppc
=
decode_ppc
;
tctx
->
decode_ppc
=
decode_ppc
;
tctx
->
frame_size
=
avctx
->
bit_rate
*
tctx
->
mtab
->
size
tctx
->
frame_size
=
avctx
->
bit_rate
*
tctx
->
mtab
->
size
/
avctx
->
sample_rate
+
8
;
/
avctx
->
sample_rate
+
8
;
tctx
->
is_6kbps
=
0
;
if
(
avctx
->
block_align
&&
avctx
->
block_align
*
8
/
tctx
->
frame_size
>
1
)
{
if
(
avctx
->
block_align
&&
avctx
->
block_align
*
8
/
tctx
->
frame_size
>
1
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"VQF TwinVQ should have only one frame per packet
\n
"
);
"VQF TwinVQ should have only one frame per packet
\n
"
);
...
...
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