summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libwma
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-07-04 20:45:00 +0000
committerDave Chapman <dave@dchapman.com>2007-07-04 20:45:00 +0000
commit9b96d66621ce0a7266df2f232b60683248d532e8 (patch)
tree877bfb511b11297a554c449c330c6fdd387d6046 /apps/codecs/libwma
parentba3f4ed565ed9fdfb696f44193958e68d6acc19f (diff)
downloadrockbox-9b96d66621ce0a7266df2f232b60683248d532e8.tar.gz
rockbox-9b96d66621ce0a7266df2f232b60683248d532e8.zip
Yet more dead code removal
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13789 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma')
-rw-r--r--apps/codecs/libwma/avcodec.h58
-rw-r--r--apps/codecs/libwma/common.c2
-rw-r--r--apps/codecs/libwma/common.h60
-rw-r--r--apps/codecs/libwma/dsputil.h22
-rw-r--r--apps/codecs/libwma/ffmpeg_config.h11
5 files changed, 1 insertions, 152 deletions
diff --git a/apps/codecs/libwma/avcodec.h b/apps/codecs/libwma/avcodec.h
deleted file mode 100644
index 3ddc2d6770..0000000000
--- a/apps/codecs/libwma/avcodec.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef AVCODEC_H
-#define AVCODEC_H
-
-/**
- * @file avcodec.h
- * external api header.
- */
-
-#include "common.h"
-#include <sys/types.h> /* size_t */
-
-/**
- * Required number of additionally allocated bytes at the end of the input bitstream for decoding.
- * this is mainly needed because some optimized bitstream readers read
- * 32 or 64 bit at once and could read over the end<br>
- * Note, if the first 23 bits of the additional bytes are not 0 then damaged
- * MPEG bitstreams could cause overread and segfault
- */
-#define FF_INPUT_BUFFER_PADDING_SIZE 8
-
-/* memory */
-void *av_malloc(unsigned int size);
-void *av_mallocz(unsigned int size);
-void *av_realloc(void *ptr, unsigned int size);
-void av_free(void *ptr);
-char *av_strdup(const char *s);
-void __av_freep(void **ptr);
-#define av_freep(p) __av_freep((void **)(p))
-void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size);
-/* for static data only */
-/* call av_free_static to release all staticaly allocated tables */
-void av_free_static(void);
-void *__av_mallocz_static(void** location, unsigned int size);
-#define av_mallocz_static(p, s) __av_mallocz_static((void **)(p), s)
-
-/* av_log API */
-
-#include <stdarg.h>
-
-#define AV_LOG_ERROR 0
-#define AV_LOG_INFO 1
-#define AV_LOG_DEBUG 2
-
-extern void av_log(int level, const char *fmt, ...);
-extern void av_vlog(int level, const char *fmt, va_list);
-extern int av_log_get_level(void);
-extern void av_log_set_level(int);
-extern void av_log_set_callback(void (*)(int, const char*, va_list));
-
-#undef AV_LOG_TRAP_PRINTF
-#ifdef AV_LOG_TRAP_PRINTF
-#define printf DO NOT USE
-#define fprintf DO NOT USE
-#undef stderr
-#define stderr DO NOT USE
-#endif
-
-#endif /* AVCODEC_H */
diff --git a/apps/codecs/libwma/common.c b/apps/codecs/libwma/common.c
index 4d165ed0a8..619ce47197 100644
--- a/apps/codecs/libwma/common.c
+++ b/apps/codecs/libwma/common.c
@@ -25,7 +25,7 @@
* common internal api.
*/
-#include "avcodec.h"
+#include "common.h"
const uint8_t ff_sqrt_tab[128]={
0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5,
diff --git a/apps/codecs/libwma/common.h b/apps/codecs/libwma/common.h
index dc55dcaed2..b627bfb710 100644
--- a/apps/codecs/libwma/common.h
+++ b/apps/codecs/libwma/common.h
@@ -6,69 +6,9 @@
#ifndef COMMON_H
#define COMMON_H
-/* only include the following when compiling package */
#include "ffmpeg_config.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <math.h>
-#include <stddef.h>
#include <inttypes.h>
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
-# define always_inline __attribute__((always_inline)) inline
-#else
-# define always_inline inline
-#endif
-
-#ifndef INT64_MAX
-#define INT64_MAX 9223372036854775807LL
-#endif
-
-# if defined(__MINGW32__) || defined(__CYGWIN__) || \
- defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__))
-# define MANGLE(a) "_" #a
-# else
-# define MANGLE(a) #a
-# endif
-
-/* debug stuff */
-
-# ifndef DEBUG
-# define NDEBUG
-# endif
-# include <assert.h>
-
-/* dprintf macros */
-# if defined(CONFIG_WIN32) && !defined(__MINGW32__)
-
-inline void dprintf(const char* fmt,...) {}
-
-# else
-
-# ifdef DEBUG
-# define dprintf(fmt,...) printf(fmt, __VA_ARGS__)
-# else
-# define dprintf(fmt,...)
-# endif
-
-# endif /* !CONFIG_WIN32 */
-
-# define av_abort() do { av_log(AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)
-
-//rounded divison & shift
-#define RSHIFT(a,b) ((a) > 0 ? ((a) + (1<<((b)-1)))>>(b) : ((a) + (1<<((b)-1))-1)>>(b))
-/* assume b>0 */
-#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
-
-extern const uint32_t inverse[256];
-
#define NEG_SSR32(a,s) ((( int32_t)(a))>>(32-(s)))
#define NEG_USR32(a,s) (((uint32_t)(a))>>(32-(s)))
diff --git a/apps/codecs/libwma/dsputil.h b/apps/codecs/libwma/dsputil.h
index a5b2af3039..794af1e285 100644
--- a/apps/codecs/libwma/dsputil.h
+++ b/apps/codecs/libwma/dsputil.h
@@ -30,8 +30,6 @@
#include "common.h"
-//#define DEBUG
-
void dsputil_static_init(void);
/* FFT computation */
@@ -83,24 +81,4 @@ void ff_mdct_calc(MDCTContext *s, FFTSample *out,
const FFTSample *input, FFTSample *tmp);
void ff_mdct_end(MDCTContext *s);
-#define WARPER8_16(name8, name16)\
-static int name16(void /*MpegEncContext*/ *s, uint8_t *dst, uint8_t *src, int stride, int h){\
- return name8(s, dst , src , stride, h)\
- +name8(s, dst+8 , src+8 , stride, h);\
-}
-
-#define WARPER8_16_SQ(name8, name16)\
-static int name16(void /*MpegEncContext*/ *s, uint8_t *dst, uint8_t *src, int stride, int h){\
- int score=0;\
- score +=name8(s, dst , src , stride, 8);\
- score +=name8(s, dst+8 , src+8 , stride, 8);\
- if(h==16){\
- dst += 8*stride;\
- src += 8*stride;\
- score +=name8(s, dst , src , stride, 8);\
- score +=name8(s, dst+8 , src+8 , stride, 8);\
- }\
- return score;\
-}
-
#endif
diff --git a/apps/codecs/libwma/ffmpeg_config.h b/apps/codecs/libwma/ffmpeg_config.h
index 4b5f4f7fa6..40815cb54b 100644
--- a/apps/codecs/libwma/ffmpeg_config.h
+++ b/apps/codecs/libwma/ffmpeg_config.h
@@ -4,15 +4,4 @@
#define CONFIG_ALIGN 1
-#define ARCH_X86 1
-#undef HAVE_MMX
-#define __CPU__ 586
-#define HAVE_BUILTIN_VECTOR 1
-#define HAVE_LOCALTIME_R 1
-#define HAVE_LRINTF 1
-#undef HAVE_VHOOK
-#define HAVE_MALLOC_H 1
-#define HAVE_MEMALIGN 1
-#define SIMPLE_IDCT 1
-
#endif