Mercurial > mplayer.hg
changeset 6715:8c1f9e05dd5a
ad_dk4adpcm is done by ima_adpcm (obsoleted)
author | atmos4 |
---|---|
date | Fri, 12 Jul 2002 04:05:56 +0000 |
parents | be17a987e0a1 |
children | c9e526d4f60e |
files | libmpcodecs/Makefile libmpcodecs/ad_dk4adpcm.c |
diffstat | 2 files changed, 1 insertions(+), 68 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/Makefile Fri Jul 12 03:26:46 2002 +0000 +++ b/libmpcodecs/Makefile Fri Jul 12 04:05:56 2002 +0000 @@ -4,7 +4,7 @@ LIBNAME = libmpcodecs.a LIBNAME2 = libmpencoders.a -AUDIO_SRCS=dec_audio.c ad.c ad_a52.c ad_acm.c ad_alaw.c ad_dk3adpcm.c ad_dk4adpcm.c ad_dshow.c ad_dvdpcm.c ad_ffmpeg.c ad_hwac3.c ad_imaadpcm.c ad_mp3.c ad_msadpcm.c ad_pcm.c ad_roqaudio.c ad_msgsm.c ad_faad.c ad_vorbis.c ad_libmad.c ad_real.c +AUDIO_SRCS=dec_audio.c ad.c ad_a52.c ad_acm.c ad_alaw.c ad_dk3adpcm.c ad_dshow.c ad_dvdpcm.c ad_ffmpeg.c ad_hwac3.c ad_imaadpcm.c ad_mp3.c ad_msadpcm.c ad_pcm.c ad_roqaudio.c ad_msgsm.c ad_faad.c ad_vorbis.c ad_libmad.c ad_real.c VIDEO_SRCS=dec_video.c vd.c vd_null.c vd_real.c vd_cinepak.c vd_qtrpza.c vd_ffmpeg.c vd_dshow.c vd_vfw.c vd_odivx.c vd_divx4.c vd_raw.c vd_xanim.c vd_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_nuv.c vd_libmpeg2.c vd_msrle.c vd_huffyuv.c vd_zlib.c vd_mpegpes.c vd_svq1.c vd_xvid.c VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_pp.c vf_scale.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c vf_lavc.c vf_dvbscale.c vf_cropdetect.c vf_test.c vf_noise.c vf_yvu9.c ENCODER_SRCS=ve.c ve_divx4.c ve_lavc.c ve_vfw.c ve_rawrgb.c ve_libdv.c
--- a/libmpcodecs/ad_dk4adpcm.c Fri Jul 12 03:26:46 2002 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> - -#include "config.h" -#include "ad_internal.h" - -static ad_info_t info = -{ - "Duck DK4 ADPCM (rogue format number) audio decoder", - "dk4adpcm", - AFM_DK4ADPCM, - "Nick Kurshev", - "Mike Melanson", - "This format number was used by Duck Corp. but not officially registered with Microsoft" -}; - -LIBAD_EXTERN(dk4adpcm) - -#define DK4_ADPCM_PREAMBLE_SIZE 4 - -static int preinit(sh_audio_t *sh_audio) -{ - sh_audio->audio_out_minsize = - (((sh_audio->wf->nBlockAlign - DK4_ADPCM_PREAMBLE_SIZE) * 2) + 1) * 4; - sh_audio->ds->ss_div = - ((sh_audio->wf->nBlockAlign - DK4_ADPCM_PREAMBLE_SIZE) * 2) + 1; - sh_audio->audio_in_minsize= - sh_audio->ds->ss_mul=sh_audio->wf->nBlockAlign; - return 1; -} - -static int init(sh_audio_t *sh_audio) -{ - sh_audio->channels=sh_audio->wf->nChannels; - sh_audio->samplerate=sh_audio->wf->nSamplesPerSec; - sh_audio->i_bps = sh_audio->wf->nBlockAlign * - (sh_audio->channels*sh_audio->samplerate) / - (((sh_audio->wf->nBlockAlign - DK4_ADPCM_PREAMBLE_SIZE) * 2) + 1); - return 1; -} - -static void uninit(sh_audio_t *sh_audio) -{ -} - -static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...) -{ - // TODO! - if(cmd==ADCTRL_SKIP_FRAME){ - demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,sh_audio->wf->nBlockAlign); - return CONTROL_TRUE; - } - return CONTROL_UNKNOWN; -} - -static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen) -{ - if (demux_read_data(sh_audio->ds, sh_audio->a_in_buffer, - sh_audio->wf->nBlockAlign) != - sh_audio->wf->nBlockAlign) - return -1; /* EOF */ - - return 2 * dk4_adpcm_decode_block((unsigned short*)buf, - sh_audio->a_in_buffer, - sh_audio->wf->nChannels, sh_audio->wf->nBlockAlign); -}