From f481eaddec671c3783cc098d65be29ea16ee81b1 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 7 Oct 2009 23:25:27 +0200 Subject: [PATCH] Rename mdcdt.c and mdcdt.h. libvorbis also has an mdct_init(), but our own one gets used. This makes the oggdec filter behave real funny. This patch makes the oggdec filter work again. --- configure.ac | 6 +++--- error.h | 2 +- mdct.c => imdct.c | 8 ++++---- mdct.h => imdct.h | 6 ++++-- wma_common.c | 2 +- wmadec_filter.c | 6 +++--- 6 files changed, 16 insertions(+), 14 deletions(-) rename mdct.c => imdct.c (98%) rename mdct.h => imdct.h (50%) diff --git a/configure.ac b/configure.ac index aadaee34..da9c5dbc 100644 --- a/configure.ac +++ b/configure.ac @@ -90,7 +90,7 @@ playlist sha1 sched audiod grab_client filter_common wav_filter compress_filter http_recv dccp_recv recv_common write_common file_write audiod_command client_common recv stdout filter stdin audioc write client exec send_common ggo udp_recv udp_send color fec fecdec_filter prebuffer_filter mm -server_command_list afs_command_list audiod_command_list bitstream mdct wma_afh +server_command_list afs_command_list audiod_command_list bitstream imdct wma_afh wma_common wmadec_filter " @@ -108,7 +108,7 @@ senders=" http dccp udp" filter_cmdline_objs="add_cmdline(filter compress_filter amp_filter prebuffer_filter)" filter_errlist_objs="filter_common wav_filter compress_filter filter string stdin stdout sched fd amp_filter ggo fecdec_filter fec - prebuffer_filter time bitstream mdct wma_common wmadec_filter" + prebuffer_filter time bitstream imdct wma_common wmadec_filter" filter_ldflags="-lm" filters=" compress wav amp fecdec wmadec prebuffer" @@ -121,7 +121,7 @@ audiod_errlist_objs="audiod signal string daemon stat net time grab_client filter_common wav_filter compress_filter amp_filter http_recv dccp_recv recv_common fd sched write_common file_write audiod_command crypt fecdec_filter client_common ggo udp_recv color fec prebuffer_filter sha1 audiod_command_list - bitstream mdct wma_common wmadec_filter" + bitstream imdct wma_common wmadec_filter" audiod_ldflags="" audiod_audio_formats="wma" diff --git a/error.h b/error.h index 0d2566d7..33d09f28 100644 --- a/error.h +++ b/error.h @@ -56,7 +56,7 @@ extern const char **para_errlist[]; PARA_ERROR(BAD_CODES, "detected incorrect codes") -#define MDCT_ERRORS \ +#define IMDCT_ERRORS \ PARA_ERROR(FFT_BAD_PARAMS, "invalid params for fft"), \ diff --git a/mdct.c b/imdct.c similarity index 98% rename from mdct.c rename to imdct.c index 9964d4b6..e3021b45 100644 --- a/mdct.c +++ b/imdct.c @@ -12,7 +12,7 @@ */ /** - * \file fft.c FFT/MDCT transforms. + * \file imdct.c Inverse modified discrete cosine transform. */ #include @@ -24,7 +24,7 @@ #include "para.h" #include "error.h" #include "string.h" -#include "mdct.h" +#include "imdct.h" #include "wma.h" typedef float fftsample_t; @@ -436,7 +436,7 @@ void sine_window_init(float *window, int n) /** * Init MDCT or IMDCT computation. */ -int mdct_init(int nbits, int inverse, struct mdct_context **result) +int imdct_init(int nbits, int inverse, struct mdct_context **result) { int ret, n, n4, i; double alpha; @@ -468,7 +468,7 @@ fail: return ret; } -void mdct_end(struct mdct_context *ctx) +void imdct_end(struct mdct_context *ctx) { freep(&ctx->tcos); freep(&ctx->tsin); diff --git a/mdct.h b/imdct.h similarity index 50% rename from mdct.h rename to imdct.h index ce346882..46fc4033 100644 --- a/mdct.h +++ b/imdct.h @@ -1,7 +1,9 @@ +/** \file imdct.h: Exported symbols from imdct.c. */ + struct mdct_context; float *ff_sine_windows[6]; void sine_window_init(float *window, int n); -int mdct_init(int nbits, int inverse, struct mdct_context **result); +int imdct_init(int nbits, int inverse, struct mdct_context **result); void imdct(struct mdct_context *s, float *output, const float *input); -void mdct_end(struct mdct_context *s); +void imdct_end(struct mdct_context *s); diff --git a/wma_common.c b/wma_common.c index c4d96ad0..cab89d3e 100644 --- a/wma_common.c +++ b/wma_common.c @@ -18,7 +18,7 @@ #include "error.h" #include "afh.h" #include "portable_io.h" -#include "mdct.h" +#include "imdct.h" #include "wma.h" const char *search_pattern(const char *pattern, int pattern_len, const char *buf, int buf_size) diff --git a/wmadec_filter.c b/wmadec_filter.c index 2ab6c178..a548d048 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -34,7 +34,7 @@ #include "sched.h" #include "filter.h" #include "bitstream.h" -#include "mdct.h" +#include "imdct.h" #include "wma.h" #include "wmadata.h" @@ -138,7 +138,7 @@ static int wmadec_cleanup(struct private_wmadec_data *s) int i; for (i = 0; i < s->nb_block_sizes; i++) - mdct_end(s->mdct_ctx[i]); + imdct_end(s->mdct_ctx[i]); if (s->use_exp_vlc) free_vlc(&s->exp_vlc); @@ -464,7 +464,7 @@ static int wma_decode_init(char *initial_buf, int len, struct private_wmadec_dat return ret; /* init MDCT */ for (i = 0; i < s->nb_block_sizes; i++) { - ret = mdct_init(s->frame_len_bits - i + 1, 1, &s->mdct_ctx[i]); + ret = imdct_init(s->frame_len_bits - i + 1, 1, &s->mdct_ctx[i]); if (ret < 0) return ret; } -- 2.39.5