diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-26 12:28:31 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-26 12:28:31 +0100 |
commit | ac021fdc40631f77a727f076f8748f89109c785b (patch) | |
tree | a51ba691da5f29c81d3ea61848b2938236f88ec2 /libavcodec/metasound.c | |
parent | 0290a646ac662a8552dfdb2de4887cac7a79acd1 (diff) | |
parent | 56d061ce9da954560892e3551513d5ecc0439846 (diff) | |
download | ffmpeg-ac021fdc40631f77a727f076f8748f89109c785b.tar.gz |
Merge commit '56d061ce9da954560892e3551513d5ecc0439846'
* commit '56d061ce9da954560892e3551513d5ecc0439846':
metasound: add last missing modes (8kHz @ 6kbps per channel)
Conflicts:
Changelog
doc/general.texi
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/metasound.c')
-rw-r--r-- | libavcodec/metasound.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/metasound.c b/libavcodec/metasound.c index 3bbd791838..677e959d48 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); } |