diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-02 16:25:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-02 17:27:52 +0200 |
commit | e88ca80dc325a0291c64e1dd3245c4943397cfa3 (patch) | |
tree | df8abbc8d6defc5bf10932ed096ec18cd979d0eb /libavcodec/adpcm.c | |
parent | 82db8ee3211014a38db6b8cae03f1c3246938eee (diff) | |
parent | bfcd4b6a1691d20aebc6d2308424c2a88334a9f0 (diff) | |
download | ffmpeg-e88ca80dc325a0291c64e1dd3245c4943397cfa3.tar.gz |
Merge commit 'bfcd4b6a1691d20aebc6d2308424c2a88334a9f0'
* commit 'bfcd4b6a1691d20aebc6d2308424c2a88334a9f0':
adpcmdec: set AVCodec.sample_fmts
twinvq: use planar sample format
ralf: use planar sample format
mpc7/8: use planar sample format
iac/imc: use planar sample format
dcadec: use float planar sample format
cook: use planar sample format
atrac3: use float planar sample format
apedec: output in planar sample format
8svx: use planar sample format
Conflicts:
libavcodec/8svx.c
libavcodec/dcadec.c
libavcodec/mpc7.c
libavcodec/mpc8.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 852549638b..054fa0a73d 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -1268,7 +1268,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } -#define ADPCM_DECODER(id_, name_, long_name_) \ +static const enum AVSampleFormat sample_fmts_s16[] = { AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_NONE }; + +#define ADPCM_DECODER(id_, sample_fmts_, name_, long_name_) \ AVCodec ff_ ## name_ ## _decoder = { \ .name = #name_, \ .type = AVMEDIA_TYPE_AUDIO, \ @@ -1278,33 +1281,34 @@ AVCodec ff_ ## name_ ## _decoder = { \ .decode = adpcm_decode_frame, \ .capabilities = CODEC_CAP_DR1, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ + .sample_fmts = sample_fmts_, \ } /* Note: Do not forget to add new entries to the Makefile as well. */ -ADPCM_DECODER(AV_CODEC_ID_ADPCM_4XM, adpcm_4xm, "ADPCM 4X Movie"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_CT, adpcm_ct, "ADPCM Creative Technology"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA, adpcm_ea, "ADPCM Electronic Arts"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_MAXIS_XA, adpcm_ea_maxis_xa, "ADPCM Electronic Arts Maxis CDROM XA"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R1, adpcm_ea_r1, "ADPCM Electronic Arts R1"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R2, adpcm_ea_r2, "ADPCM Electronic Arts R2"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R3, adpcm_ea_r3, "ADPCM Electronic Arts R3"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_XAS, adpcm_ea_xas, "ADPCM Electronic Arts XAS"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_AMV, adpcm_ima_amv, "ADPCM IMA AMV"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_APC, adpcm_ima_apc, "ADPCM IMA CRYO APC"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3, "ADPCM IMA Duck DK3"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4, "ADPCM IMA Duck DK4"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs, "ADPCM IMA Electronic Arts EACS"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead, "ADPCM IMA Electronic Arts SEAD"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss, "ADPCM IMA Funcom ISS"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg, "ADPCM IMA Loki SDL MJPEG"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws, "ADPCM IMA Westwood"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_2, adpcm_sbpro_2, "ADPCM Sound Blaster Pro 2-bit"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_3, adpcm_sbpro_3, "ADPCM Sound Blaster Pro 2.6-bit"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_4, adpcm_sbpro_4, "ADPCM Sound Blaster Pro 4-bit"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_THP, adpcm_thp, "ADPCM Nintendo Gamecube THP"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_XA, adpcm_xa, "ADPCM CDROM XA"); -ADPCM_DECODER(AV_CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_4XM, sample_fmts_s16, adpcm_4xm, "ADPCM 4X Movie"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_CT, sample_fmts_s16, adpcm_ct, "ADPCM Creative Technology"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA, sample_fmts_s16, adpcm_ea, "ADPCM Electronic Arts"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_MAXIS_XA, sample_fmts_s16, adpcm_ea_maxis_xa, "ADPCM Electronic Arts Maxis CDROM XA"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R1, sample_fmts_s16, adpcm_ea_r1, "ADPCM Electronic Arts R1"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R2, sample_fmts_s16, adpcm_ea_r2, "ADPCM Electronic Arts R2"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R3, sample_fmts_s16, adpcm_ea_r3, "ADPCM Electronic Arts R3"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_XAS, sample_fmts_s16, adpcm_ea_xas, "ADPCM Electronic Arts XAS"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_AMV, sample_fmts_s16, adpcm_ima_amv, "ADPCM IMA AMV"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_APC, sample_fmts_s16, adpcm_ima_apc, "ADPCM IMA CRYO APC"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_DK3, sample_fmts_s16, adpcm_ima_dk3, "ADPCM IMA Duck DK3"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_DK4, sample_fmts_s16, adpcm_ima_dk4, "ADPCM IMA Duck DK4"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_EA_EACS, sample_fmts_s16, adpcm_ima_ea_eacs, "ADPCM IMA Electronic Arts EACS"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_EA_SEAD, sample_fmts_s16, adpcm_ima_ea_sead, "ADPCM IMA Electronic Arts SEAD"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_ISS, sample_fmts_s16, adpcm_ima_iss, "ADPCM IMA Funcom ISS"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_QT, sample_fmts_s16, adpcm_ima_qt, "ADPCM IMA QuickTime"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_SMJPEG, sample_fmts_s16, adpcm_ima_smjpeg, "ADPCM IMA Loki SDL MJPEG"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_WAV, sample_fmts_s16, adpcm_ima_wav, "ADPCM IMA WAV"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_WS, sample_fmts_s16, adpcm_ima_ws, "ADPCM IMA Westwood"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_MS, sample_fmts_s16, adpcm_ms, "ADPCM Microsoft"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_2, sample_fmts_s16, adpcm_sbpro_2, "ADPCM Sound Blaster Pro 2-bit"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_3, sample_fmts_s16, adpcm_sbpro_3, "ADPCM Sound Blaster Pro 2.6-bit"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_4, sample_fmts_s16, adpcm_sbpro_4, "ADPCM Sound Blaster Pro 4-bit"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_SWF, sample_fmts_s16, adpcm_swf, "ADPCM Shockwave Flash"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_THP, sample_fmts_s16, adpcm_thp, "ADPCM Nintendo Gamecube THP"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_XA, sample_fmts_s16, adpcm_xa, "ADPCM CDROM XA"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_YAMAHA, sample_fmts_s16, adpcm_yamaha, "ADPCM Yamaha"); |