On 5/15/2016 6:33 PM, Paul B Mahol wrote: > diff --git a/libavcodec/Makefile b/libavcodec/Makefile > index 3f0ffd1..3a9dd95 100644 > --- a/libavcodec/Makefile > +++ b/libavcodec/Makefile > @@ -707,6 +707,7 @@ OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER) += adpcmenc.o > adpcm_data.o > OBJS-$(CONFIG_ADPCM_IMA_WS_DECODER) += adpcm.o adpcm_data.o > OBJS-$(CONFIG_ADPCM_MS_DECODER) += adpcm.o adpcm_data.o > OBJS-$(CONFIG_ADPCM_MS_ENCODER) += adpcmenc.o adpcm_data.o > +OBJS-$(CONFIG_ADPCM_MTAF_DECODER) += adpcm.o adpcm_data.o > OBJS-$(CONFIG_ADPCM_PSX_DECODER) += adpcm.o adpcm_data.o > OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER) += adpcm.o adpcm_data.o > OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER) += adpcm.o adpcm_data.o > diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c > index 0b6b92e..e624b85 100644 > --- a/libavcodec/adpcm.c > +++ b/libavcodec/adpcm.c > @@ -107,6 +107,10 @@ static av_cold int adpcm_decode_init(AVCodecContext * > avctx) > case AV_CODEC_ID_ADPCM_EA_XAS: > max_channels = 6; > break; > + case AV_CODEC_ID_ADPCM_MTAF: > + min_channels = 2; > + max_channels = 8; > + break; > case AV_CODEC_ID_ADPCM_PSX: > max_channels = 8; > break; > @@ -159,6 +163,7 @@ static av_cold int adpcm_decode_init(AVCodecContext * > avctx) > case AV_CODEC_ID_ADPCM_AFC: > case AV_CODEC_ID_ADPCM_DTK: > case AV_CODEC_ID_ADPCM_PSX: > + case AV_CODEC_ID_ADPCM_MTAF: > avctx->sample_fmt = AV_SAMPLE_FMT_S16P; > break; > case AV_CODEC_ID_ADPCM_IMA_WS: > @@ -342,6 +347,15 @@ static inline int16_t > adpcm_yamaha_expand_nibble(ADPCMChannelStatus *c, uint8_t > return c->predictor; > } > > +static inline int16_t adpcm_mtaf_expand_nibble(ADPCMChannelStatus *c, > uint8_t nibble) > +{
You should use local variables here, like in other expand_nibbble() functions. > + c->predictor += ff_adpcm_mtaf_stepsize[c->step][nibble]; > + c->predictor = av_clip_int16(c->predictor); > + c->step += ff_adpcm_index_table[nibble]; > + c->step = av_clip(c->step, 0, 31); av_clip_uintp2(step, 5); _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel