1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-25 04:38:01 +00:00

ad_dk4adpcm is done by ima_adpcm (obsoleted)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6716 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
atmos4 2002-07-12 04:05:56 +00:00
parent 0c0b59c992
commit 01245f416f
2 changed files with 1 additions and 68 deletions

View File

@ -4,7 +4,7 @@ include ../config.mak
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

View File

@ -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);
}