Commit 6b547180 authored by Rodger Combs's avatar Rodger Combs Committed by Michael Niedermayer

lavc/adpcm: THP: allow channel counts up to 10

Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent db426031
...@@ -84,7 +84,7 @@ static const int swf_index_tables[4][16] = { ...@@ -84,7 +84,7 @@ static const int swf_index_tables[4][16] = {
/* end of tables */ /* end of tables */
typedef struct ADPCMDecodeContext { typedef struct ADPCMDecodeContext {
ADPCMChannelStatus status[6]; ADPCMChannelStatus status[10];
int vqa_version; /**< VQA version. Used for ADPCM_IMA_WS */ int vqa_version; /**< VQA version. Used for ADPCM_IMA_WS */
} ADPCMDecodeContext; } ADPCMDecodeContext;
...@@ -104,9 +104,11 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) ...@@ -104,9 +104,11 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
case AV_CODEC_ID_ADPCM_EA_R2: case AV_CODEC_ID_ADPCM_EA_R2:
case AV_CODEC_ID_ADPCM_EA_R3: case AV_CODEC_ID_ADPCM_EA_R3:
case AV_CODEC_ID_ADPCM_EA_XAS: case AV_CODEC_ID_ADPCM_EA_XAS:
max_channels = 6;
break;
case AV_CODEC_ID_ADPCM_THP: case AV_CODEC_ID_ADPCM_THP:
case AV_CODEC_ID_ADPCM_THP_LE: case AV_CODEC_ID_ADPCM_THP_LE:
max_channels = 6; max_channels = 10;
break; break;
} }
if (avctx->channels < min_channels || avctx->channels > max_channels) { if (avctx->channels < min_channels || avctx->channels > max_channels) {
...@@ -1428,7 +1430,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, ...@@ -1428,7 +1430,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
case AV_CODEC_ID_ADPCM_THP: case AV_CODEC_ID_ADPCM_THP:
case AV_CODEC_ID_ADPCM_THP_LE: case AV_CODEC_ID_ADPCM_THP_LE:
{ {
int table[6][16]; int table[10][16];
int ch; int ch;
#define THP_GET16(g) \ #define THP_GET16(g) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment