summaryrefslogtreecommitdiff
path: root/libavcodec/metasound.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2013-11-18 12:07:14 +0100
committerAnton Khirnov <anton@khirnov.net>2013-11-26 08:29:42 +0100
commit56d061ce9da954560892e3551513d5ecc0439846 (patch)
tree997058b72819c43a81c3d9289699fa9cb1ab31e5 /libavcodec/metasound.c
parentde44dfc7c0ec02bda7d846ef713145c890bfae3f (diff)
metasound: add last missing modes (8kHz @ 6kbps per channel)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/metasound.c')
-rw-r--r--libavcodec/metasound.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/metasound.c b/libavcodec/metasound.c
index 39af4189c5..ae16ad0dad 100644
--- a/libavcodec/metasound.c
+++ b/libavcodec/metasound.c
@@ -187,7 +187,7 @@ static int metasound_read_bitstream(AVCodecContext *avctx, TwinVQContext *tctx,
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);
read_cb_data(tctx, &gb, bits->main_coeffs, bits->ftype);
@@ -307,6 +307,12 @@ static av_cold int metasound_decode_init(AVCodecContext *avctx)
ibps = avctx->bit_rate / (1000 * avctx->channels);
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:
tctx->mtab = &ff_metasound_mode0808;
break;
@@ -362,6 +368,7 @@ static av_cold int metasound_decode_init(AVCodecContext *avctx)
tctx->decode_ppc = decode_ppc;
tctx->frame_size = avctx->bit_rate * tctx->mtab->size
/ avctx->sample_rate;
+ tctx->is_6kbps = ibps == 6;
return ff_twinvq_decode_init(avctx);
}