diff options
author | Dave Chapman <dave@dchapman.com> | 2007-07-03 09:25:36 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2007-07-03 09:25:36 +0000 |
commit | c72824786a0e8c68921ebb9b72f02a2e80aaee17 (patch) | |
tree | adf8dac26d074ee3620df4ab482ff108561ead01 /apps/codecs/libwma/avcodec.h | |
parent | 2ca895bae7a25ea8ef7f295b4e8ab01ff75a4914 (diff) | |
download | rockbox-c72824786a0e8c68921ebb9b72f02a2e80aaee17.tar.gz rockbox-c72824786a0e8c68921ebb9b72f02a2e80aaee17.zip |
Initial, work-in-progress, version of a WMA codec using Michael Giacomelli's fixed-point and malloc-less WMA decoder (based on the ffmpeg WMA decoder from early 2006, and also building on the work started by Paul Jones). The codec itself and the ASF parsing code were written by me, inspired by the ASF parser in libasf. Current performance is around 400% realtime on gigabeat, 100% realtime on PP and 20% realtime on Coldfire.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13769 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma/avcodec.h')
-rw-r--r-- | apps/codecs/libwma/avcodec.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/apps/codecs/libwma/avcodec.h b/apps/codecs/libwma/avcodec.h new file mode 100644 index 0000000000..3ddc2d6770 --- /dev/null +++ b/apps/codecs/libwma/avcodec.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef AVCODEC_H | ||
2 | #define AVCODEC_H | ||
3 | |||
4 | /** | ||
5 | * @file avcodec.h | ||
6 | * external api header. | ||
7 | */ | ||
8 | |||
9 | #include "common.h" | ||
10 | #include <sys/types.h> /* size_t */ | ||
11 | |||
12 | /** | ||
13 | * Required number of additionally allocated bytes at the end of the input bitstream for decoding. | ||
14 | * this is mainly needed because some optimized bitstream readers read | ||
15 | * 32 or 64 bit at once and could read over the end<br> | ||
16 | * Note, if the first 23 bits of the additional bytes are not 0 then damaged | ||
17 | * MPEG bitstreams could cause overread and segfault | ||
18 | */ | ||
19 | #define FF_INPUT_BUFFER_PADDING_SIZE 8 | ||
20 | |||
21 | /* memory */ | ||
22 | void *av_malloc(unsigned int size); | ||
23 | void *av_mallocz(unsigned int size); | ||
24 | void *av_realloc(void *ptr, unsigned int size); | ||
25 | void av_free(void *ptr); | ||
26 | char *av_strdup(const char *s); | ||
27 | void __av_freep(void **ptr); | ||
28 | #define av_freep(p) __av_freep((void **)(p)) | ||
29 | void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size); | ||
30 | /* for static data only */ | ||
31 | /* call av_free_static to release all staticaly allocated tables */ | ||
32 | void av_free_static(void); | ||
33 | void *__av_mallocz_static(void** location, unsigned int size); | ||
34 | #define av_mallocz_static(p, s) __av_mallocz_static((void **)(p), s) | ||
35 | |||
36 | /* av_log API */ | ||
37 | |||
38 | #include <stdarg.h> | ||
39 | |||
40 | #define AV_LOG_ERROR 0 | ||
41 | #define AV_LOG_INFO 1 | ||
42 | #define AV_LOG_DEBUG 2 | ||
43 | |||
44 | extern void av_log(int level, const char *fmt, ...); | ||
45 | extern void av_vlog(int level, const char *fmt, va_list); | ||
46 | extern int av_log_get_level(void); | ||
47 | extern void av_log_set_level(int); | ||
48 | extern void av_log_set_callback(void (*)(int, const char*, va_list)); | ||
49 | |||
50 | #undef AV_LOG_TRAP_PRINTF | ||
51 | #ifdef AV_LOG_TRAP_PRINTF | ||
52 | #define printf DO NOT USE | ||
53 | #define fprintf DO NOT USE | ||
54 | #undef stderr | ||
55 | #define stderr DO NOT USE | ||
56 | #endif | ||
57 | |||
58 | #endif /* AVCODEC_H */ | ||