Mercurial > libavcodec.hg
comparison adxdec.c @ 7451:85ab7655ad4d libavcodec
Modify all codecs to report their supported input and output sample format(s).
author | pross |
---|---|
date | Thu, 31 Jul 2008 10:47:31 +0000 |
parents | e943e1409077 |
children | 3e0103ac9d76 |
comparison
equal
deleted
inserted
replaced
7450:30d38a880fde | 7451:85ab7655ad4d |
---|---|
27 * | 27 * |
28 * Reference documents: | 28 * Reference documents: |
29 * http://ku-www.ss.titech.ac.jp/~yatsushi/adx.html | 29 * http://ku-www.ss.titech.ac.jp/~yatsushi/adx.html |
30 * adx2wav & wav2adx http://www.geocities.co.jp/Playtown/2004/ | 30 * adx2wav & wav2adx http://www.geocities.co.jp/Playtown/2004/ |
31 */ | 31 */ |
32 | |
33 static av_cold void adx_decode_init(AVCodecContext *avctx) | |
34 { | |
35 avctx->sample_fmt = SAMPLE_FMT_S16; | |
36 return 0; | |
37 } | |
32 | 38 |
33 /* 18 bytes <-> 32 samples */ | 39 /* 18 bytes <-> 32 samples */ |
34 | 40 |
35 static void adx_decode(short *out,const unsigned char *in,PREV *prev) | 41 static void adx_decode(short *out,const unsigned char *in,PREV *prev) |
36 { | 42 { |
159 AVCodec adpcm_adx_decoder = { | 165 AVCodec adpcm_adx_decoder = { |
160 "adpcm_adx", | 166 "adpcm_adx", |
161 CODEC_TYPE_AUDIO, | 167 CODEC_TYPE_AUDIO, |
162 CODEC_ID_ADPCM_ADX, | 168 CODEC_ID_ADPCM_ADX, |
163 sizeof(ADXContext), | 169 sizeof(ADXContext), |
164 NULL, | 170 adx_decode_init, |
165 NULL, | 171 NULL, |
166 NULL, | 172 NULL, |
167 adx_decode_frame, | 173 adx_decode_frame, |
168 .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX"), | 174 .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX"), |
169 }; | 175 }; |