diff options
author | Frederik M J Vestre <freqmod@gmail.com> | 2012-07-26 14:38:32 +0200 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2012-09-20 20:47:44 +0200 |
commit | 1b8e3801b2444f6e466e1b7c09cfc51605e80fb3 (patch) | |
tree | bd1d6fe08452d388d0d160ec02e03963f3f9525d /lib/rbcodec/codecs/libopus/ogg/os_types.h | |
parent | 72ebcbf73b4db911d517a66c820fdceccb8ec798 (diff) | |
download | rockbox-1b8e3801b2444f6e466e1b7c09cfc51605e80fb3.tar.gz rockbox-1b8e3801b2444f6e466e1b7c09cfc51605e80fb3.zip |
Initial opus codec support
Synchronised with opus repo on github (https://github.com/freqmod/rockbox-opus)
Status:
* Seeking ported from speex, but fails on some cases (e.g. seek to granule 0)
* ReplayGain parsing needs to be reworked, we do vorbis-style replaygain now.
http://wiki.xiph.org/OggOpus#Comment_Header explicitly forbids these in
favour of R128_TRACK_GAIN tag.
* No optimisation yet, source files still nearly identical to opus upstream
* Multi-stream opus files may not be parsed correctly
Change-Id: Ia66f1027dc1d288083e3c57b2816700078376f9a
Reviewed-on: http://gerrit.rockbox.org/300
Reviewed-by: Bertrik Sikken <bertrik@sikken.nl>
Tested-by: Bertrik Sikken <bertrik@sikken.nl>
Diffstat (limited to 'lib/rbcodec/codecs/libopus/ogg/os_types.h')
-rw-r--r-- | lib/rbcodec/codecs/libopus/ogg/os_types.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libopus/ogg/os_types.h b/lib/rbcodec/codecs/libopus/ogg/os_types.h new file mode 100644 index 0000000000..55f0bf559c --- /dev/null +++ b/lib/rbcodec/codecs/libopus/ogg/os_types.h @@ -0,0 +1,56 @@ +#include "config.h" +#include <stdint.h> +#include "codeclib.h" + +#ifdef SIMULATOR + +#include <stdio.h> + +static inline void* _ogg_malloc(size_t size) +{ + void *buf; + + printf("ogg_malloc %d", size); + buf = codec_malloc(size); + printf(" = %p\n", buf); + + return buf; +} + +static inline void* _ogg_calloc(size_t nmemb, size_t size) +{ + printf("ogg_calloc %d %d\n", nmemb, size); + return codec_calloc(nmemb, size); +} + +static inline void* _ogg_realloc(void *ptr, size_t size) +{ + void *buf; + + printf("ogg_realloc %p %d", ptr, size); + buf = codec_realloc(ptr, size); + printf(" = %p\n", buf); + return buf; +} + +static inline void _ogg_free(void *ptr) +{ + printf("ogg_free %p\n", ptr); + codec_free(ptr); +} + +#else + +#define _ogg_malloc codec_malloc +#define _ogg_calloc codec_calloc +#define _ogg_realloc codec_realloc +#define _ogg_free codec_free + +#endif + +typedef int16_t ogg_int16_t; +typedef uint16_t ogg_uint16_t; +typedef int32_t ogg_int32_t; +typedef uint32_t ogg_uint32_t; +typedef int64_t ogg_int64_t; + |