[FFmpeg-devel] [PATCH 1/2] ADPCM DTK decoder
James Almer
jamrial at gmail.com
Sat Apr 20 21:19:16 CEST 2013
On 20/04/13 8:34 AM, Paul B Mahol wrote:
> On 4/20/13, James Almer <jamrial at gmail.com> wrote:
>> diff --git a/libavcodec/adpcm.h b/libavcodec/adpcm.h
>> index 08fd23f..f43a28c 100644
>> --- a/libavcodec/adpcm.h
>> +++ b/libavcodec/adpcm.h
>> @@ -38,8 +38,8 @@ typedef struct ADPCMChannelStatus {
>> int prev_sample;
>>
>> /* MS version */
>> - int16_t sample1;
>> - int16_t sample2;
>> + int sample1;
>> + int sample2;
>
> Does this breaks fate?
No, it doesn't break fate.
I can make two new int variables if that's preferred nonetheless.
>> int coeff1;
>> int coeff2;
>> int idelta;
>> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
>> index 19a638c..35e0408 100644
>> --- a/libavcodec/allcodecs.c
>> +++ b/libavcodec/allcodecs.c
>> @@ -418,6 +418,7 @@ void avcodec_register_all(void)
>> REGISTER_ENCDEC (ADPCM_ADX, adpcm_adx);
>> REGISTER_DECODER(ADPCM_AFC, adpcm_afc);
>> REGISTER_DECODER(ADPCM_CT, adpcm_ct);
>> + REGISTER_DECODER(ADPCM_DTK, adpcm_dtk);
>> REGISTER_DECODER(ADPCM_EA, adpcm_ea);
>> REGISTER_DECODER(ADPCM_EA_MAXIS_XA, adpcm_ea_maxis_xa);
>> REGISTER_DECODER(ADPCM_EA_R1, adpcm_ea_r1);
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index aba3aea..9f5d7cf 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -362,6 +362,7 @@ enum AVCodecID {
>> AV_CODEC_ID_VIMA = MKBETAG('V','I','M','A'),
>> AV_CODEC_ID_ADPCM_AFC = MKBETAG('A','F','C',' '),
>> AV_CODEC_ID_ADPCM_IMA_OKI = MKBETAG('O','K','I',' '),
>> + AV_CODEC_ID_ADPCM_DTK,
>
> AV_CODEC_ID_ADPCM_DTK = MKBETAG('D','T','K',' '),
>
> or similar
Ok.
>>
>> /* AMR */
>> AV_CODEC_ID_AMR_NB = 0x12000,
>> diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
>> index c973025..a36aaad 100644
>> --- a/libavcodec/codec_desc.c
>> +++ b/libavcodec/codec_desc.c
>> @@ -1816,6 +1816,13 @@ static const AVCodecDescriptor codec_descriptors[] =
>> {
>> .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Dialogic OKI"),
>> .props = AV_CODEC_PROP_LOSSY,
>> },
>> + {
>> + .id = AV_CODEC_ID_ADPCM_DTK,
>> + .type = AVMEDIA_TYPE_AUDIO,
>> + .name = "adpcm_dtk",
>> + .long_name = NULL_IF_CONFIG_SMALL("ADPCM Nintendo Gamecube DTK"),
>> + .props = AV_CODEC_PROP_LOSSY,
>> + },
>>
>> /* AMR */
>> {
>> diff --git a/libavcodec/version.h b/libavcodec/version.h
>> index b1918f1..d6f7b8e 100644
>> --- a/libavcodec/version.h
>> +++ b/libavcodec/version.h
>> @@ -29,7 +29,7 @@
>> #include "libavutil/avutil.h"
>>
>> #define LIBAVCODEC_VERSION_MAJOR 55
>> -#define LIBAVCODEC_VERSION_MINOR 5
>> +#define LIBAVCODEC_VERSION_MINOR 6
>> #define LIBAVCODEC_VERSION_MICRO 100
>>
>> #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
>> --
>> 1.8.1.msysgit.1
>>
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>
> Link to samples so I can test it?
"type_adp - shakespr.adp" in in_cube_samples.zip
Regards.
More information about the ffmpeg-devel
mailing list