parent
dd54d748a8
commit
ce2f0f7d6e
|
|
@ -9,11 +9,11 @@ LOCAL_SRC_FILES = \
|
|||
Tremolo/floor1.c \
|
||||
Tremolo/floor_lookup.c \
|
||||
Tremolo/framing.c \
|
||||
Tremolo/info.c \
|
||||
Tremolo/mapping0.c \
|
||||
Tremolo/mdct.c \
|
||||
Tremolo/misc.c \
|
||||
Tremolo/res012.c \
|
||||
Tremolo/treminfo.c \
|
||||
Tremolo/vorbisfile.c
|
||||
|
||||
# Disable arm optimization which will cause the issue https://github.com/cocos2d/cocos2d-x/issues/17148
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
This version of Tremolo is derived from Tremolo library version
|
||||
0.07. It has been patched against publicly known vulnerabilities
|
||||
with sample files available here:
|
||||
|
||||
http://static.dataspill.org/releases/ogg/examples/
|
||||
|
||||
When syncing with svn, please ensure that these defects are not
|
||||
reintroduced.
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
UPDATE: 2018-11-07
|
||||
URL: http://wss.co.uk/pinknoise/tremolo/Tremolo008.zip
|
||||
Version: 0.08
|
||||
|
||||
URL: http://wss.co.uk/pinknoise/tremolo/Tremolo007.zip
|
||||
Version: 0.07
|
||||
BugComponent: 99142
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
Tremolo changelog:
|
||||
|
||||
*** 20100110: 0.8 ***
|
||||
|
||||
First "post Google" version. Shift fixes in mdctARM.s and
|
||||
mdctLARM.s. Many thanks to Gloria Wang for finding the example
|
||||
file that showed this up. Thanks to everyone else at Google for
|
||||
making the BSD rerelease possible!
|
||||
|
||||
Also, some (mainly error handling) fixes in codebook.c imported
|
||||
from the trunk version of Tremor.
|
||||
|
||||
*** 20071129: 0.7 ***
|
||||
|
||||
Bugs in mdct.c, mdctARM.s, mdctLARM.s that caused 'chirping'
|
||||
and 'popping' fixed. Many thanks to Dan Silsby for spotting
|
||||
the problem, narrowing it down to the code concerned and
|
||||
testing potential fixes.
|
||||
|
||||
|
||||
*** 20070807: 0.6 ***
|
||||
|
||||
Initial optimisation port from low memory branch of Tremor,
|
||||
v1.0.2
|
||||
|
||||
--------------------------------------------------------------------
|
||||
Original Tremor changelog follows:
|
||||
|
||||
*** 20020517: 1.0.2 ***
|
||||
|
||||
Playback bugfix to floor1; mode mistakenly used for sizing instead
|
||||
of blockflag
|
||||
|
||||
*** 20020515: 1.0.1 ***
|
||||
|
||||
Added complete API documentation to source tarball. No code
|
||||
changes.
|
||||
|
||||
*** 20020412: 1.0.1 ***
|
||||
|
||||
Fixed a clipping bug that affected ARM processors; negative
|
||||
overflows were being properly clipped, but then clobbered to
|
||||
positive by the positive overflow chec (asm_arm.h:CLIP_TO_15)
|
||||
|
||||
*** 20020403: 1.0.0 ***
|
||||
|
||||
Initial version
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
Previous versions of this software have been released under the
|
||||
terms of the GNU GPL. Thanks to a grant from Google, this version
|
||||
is released is under the same BSD style license as the original
|
||||
Theora software was.
|
||||
|
||||
|
||||
Copyright (C) 2002-2009 Xiph.org Foundation
|
||||
Changes Copyright (C) 2009-2010 Robin Watts for Pinknoise Productions Ltd
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
# Tremolo Makefile for Windows CE port
|
||||
# Uses the VLC toolchain
|
||||
# $URL$
|
||||
# $Id$
|
||||
|
||||
wince_gcc_root = /usr/local/wince/cross-tools
|
||||
srcdir = .
|
||||
VPATH = $(srcdir)
|
||||
|
||||
CC = arm-wince-pe-gcc
|
||||
CXX = arm-wince-pe-g++
|
||||
LD = arm-wince-pe-g++
|
||||
AR = arm-wince-pe-ar cru
|
||||
RANLIB = arm-wince-pe-ranlib
|
||||
STRIP = arm-wince-pe-strip
|
||||
WINDRES= arm-wince-pe-windres
|
||||
MKDIR = mkdir -p
|
||||
RM = rm -f
|
||||
RM_REC = rm -rf
|
||||
ECHO = echo -n
|
||||
CAT = cat
|
||||
AS = arm-wince-pe-as
|
||||
|
||||
DEFINES :=
|
||||
|
||||
CFLAGS := -O2 -march=armv4 -mtune=xscale -I$(srcdir) -I$(wince_gcc_root)/include -D__cdecl= -D_WIN32_WCE=300 -D_ARM_ASSEM_ -static
|
||||
|
||||
CXXFLAGS := $(CFLAGS)
|
||||
|
||||
LDFLAGS := -Llibs/lib -L$(wince_gcc_root)/lib
|
||||
LIBS := --entry WinMainCRTStartup
|
||||
|
||||
OBJS :=
|
||||
MODULE_DIRS += .
|
||||
|
||||
LIBOBJS := bitwise.o bitwiseARM.o codebook.o dpen.o dsp.o floor0.o \
|
||||
floor1.o floor1ARM.o floor_lookup.o framing.o info.o mapping0.o \
|
||||
mdct.o mdctARM.o misc.o res012.o vorbisfile.o speed.o
|
||||
EXEOBJS := testtremor.o
|
||||
|
||||
LIBOBJS_C := bitwise.oc codebook.oc dsp.oc floor0.oc floor1.oc \
|
||||
floor_lookup.oc framing.oc info.oc mapping0.oc mdct.oc misc.oc \
|
||||
res012.oc vorbisfile.oc speed.o
|
||||
EXEOBJS_C := testtremor.oc
|
||||
|
||||
LIBOBJS_L := bitwise.ol bitwiseARM.o codebook.ol dpen.o dsp.ol floor0.ol \
|
||||
floor1.ol floor1LARM.o floor_lookup.ol framing.ol info.ol mapping0.ol \
|
||||
mdct.ol mdctLARM.o misc.ol res012.ol vorbisfile.ol speed.o
|
||||
EXEOBJS_L := testtremor.ol
|
||||
|
||||
LIBOBJS_LC := bitwise.olc codebook.olc dsp.olc floor0.olc floor1.olc \
|
||||
floor_lookup.olc framing.olc info.olc mapping0.olc mdct.olc misc.olc \
|
||||
res012.olc vorbisfile.olc speed.o
|
||||
EXEOBJS_LC := testtremor.olc
|
||||
|
||||
# Rules
|
||||
.SUFFIXES: .oc .ol .olc
|
||||
|
||||
.c.oc:
|
||||
$(CC) $(CFLAGS) -c $(<) -o $*.oc -DONLY_C
|
||||
|
||||
.c.ol:
|
||||
$(CC) $(CFLAGS) -c $(<) -o $*.ol -D_LOW_ACCURACY_
|
||||
|
||||
.c.olc:
|
||||
$(CC) $(CFLAGS) -c $(<) -o $*.olc -D_LOW_ACCURACY_ -DONLY_C
|
||||
|
||||
all: libTremolo006.lib bittest.exe testtremor.exe testtremorC.exe testtremorL.exe testtremorLC.exe annotate.exe
|
||||
cp libTremolo006.lib /cygdrive/c/cvs/scummvm/trunk/backends/platform/wince/libs/lib/
|
||||
cp ivorbisfile.h /cygdrive/c/cvs/scummvm/trunk/backends/platform/wince/libs/include/tremolo006/tremor/
|
||||
cp config_types.h /cygdrive/c/cvs/scummvm/trunk/backends/platform/wince/libs/include/tremolo006/
|
||||
cp ivorbiscodec.h /cygdrive/c/cvs/scummvm/trunk/backends/platform/wince/libs/include/tremolo006/
|
||||
cp ogg.h /cygdrive/c/cvs/scummvm/trunk/backends/platform/wince/libs/include/tremolo006/
|
||||
cp os_types.h /cygdrive/c/cvs/scummvm/trunk/backends/platform/wince/libs/include/tremolo006/
|
||||
|
||||
libTremolo006.lib: $(LIBOBJS)
|
||||
arm-wince-pe-ar cru $@ $^
|
||||
arm-wince-pe-ranlib $@
|
||||
|
||||
bitwiseTEST.o: bitwise.c
|
||||
$(CC) $(CFLAGS) -c -o bitwiseTEST.o bitwise.c -D_V_BIT_TEST
|
||||
|
||||
bittest.exe: bitwiseTEST.o bitwiseARM.o dpen.o
|
||||
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@ -Wl,-Map,bittest.exe.map -Wl,--stack,65536
|
||||
|
||||
testtremor.exe: testtremor.o profile.o $(LIBOBJS)
|
||||
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@ -Wl,-Map,testtremor.exe.map -Wl,--stack,65536 -debug
|
||||
|
||||
testtremorC.exe: testtremor.oc profile.o $(LIBOBJS_C)
|
||||
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@ -Wl,-Map,testtremorC.exe.map -Wl,--stack,65536
|
||||
|
||||
testtremorL.exe: testtremor.ol profile.o $(LIBOBJS_L)
|
||||
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@ -Wl,-Map,testtremorL.exe.map -Wl,--stack,65536
|
||||
|
||||
testtremorLC.exe: testtremor.olc profile.o $(LIBOBJS_LC)
|
||||
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@ -Wl,-Map,testtremorLC.exe.map -Wl,--stack,65536
|
||||
|
||||
annotate.exe: annotate.c
|
||||
gcc $^ -o $@
|
||||
|
||||
clean:
|
||||
rm `find . -name \*.o`
|
||||
rm `find . -name \*.ol`
|
||||
rm `find . -name \*.oc`
|
||||
rm `find . -name \*.olc`
|
||||
|
|
@ -0,0 +1,496 @@
|
|||
Profile by Address
|
||||
00000000 ( 42.09%: 2139) Address 0
|
||||
00011008 ( 0.00%: 0) WinMainCRTStartup
|
||||
00011078 ( 0.00%: 0) _cinit
|
||||
000110d8 ( 0.00%: 0) exit
|
||||
000111b8 ( 0.00%: 0) _exit
|
||||
000111c4 ( 0.00%: 0) _cexit
|
||||
000111d4 ( 0.00%: 0) _c_exit
|
||||
000111e4 ( 0.00%: 0) Output
|
||||
000112b0 ( 0.00%: 0) main2
|
||||
000115d4 ( 0.00%: 0) WinMain
|
||||
00011610 ( 0.00%: 0) speedtest
|
||||
000117d4 ( 0.00%: 0) Profile_dump
|
||||
00011984 ( 0.65%: 33) Profile_init
|
||||
00011a60 ( 0.00%: 0) oggpack_eop
|
||||
00011a74 ( 0.00%: 0) oggpack_bytes
|
||||
00011aa4 ( 1.10%: 56) oggpack_bits
|
||||
00011ae0 ( 2.48%: 126) oggpack_look
|
||||
00011c04 ( 0.02%: 1) oggpack_adv
|
||||
00011c8c ( 0.00%: 0) oggpack_readinit
|
||||
00011cc4 ( 0.04%: 2) oggpack_read
|
||||
00011e58 ( 0.00%: 0) _ilog
|
||||
00012728 ( 0.02%: 1) _book_maptype1_quantvals
|
||||
000127a8 ( 0.00%: 0) vorbis_book_clear
|
||||
000127e8 ( 0.33%: 17) vorbis_book_unpack
|
||||
00013008 ( 0.00%: 0) vorbis_book_decode
|
||||
00013020 ( 0.00%: 0) vorbis_book_decodevs_add
|
||||
000130c8 ( 0.00%: 0) vorbis_book_decodev_add
|
||||
00013160 ( 0.00%: 0) vorbis_book_decodev_set
|
||||
00013238 ( 2.77%: 141) decode_packed_entry_number_REALSTART
|
||||
00013264 ( 9.41%: 478) decode_packed_entry_number
|
||||
0001341c ( 5.51%: 280) decode_map
|
||||
000135bc ( 5.31%: 270) vorbis_book_decodevv_add
|
||||
0001364c ( 3.31%: 168) _checksum
|
||||
000136ac ( 0.00%: 0) vorbis_dsp_restart
|
||||
00013714 ( 0.00%: 0) vorbis_dsp_create
|
||||
000137c8 ( 0.02%: 1) vorbis_dsp_destroy
|
||||
00013918 ( 0.06%: 3) vorbis_dsp_pcmout
|
||||
00013a44 ( 0.00%: 0) vorbis_dsp_read
|
||||
00013a84 ( 0.00%: 0) vorbis_packet_blocksize
|
||||
00013b04 ( 0.04%: 2) vorbis_dsp_synthesis
|
||||
00013f04 ( 0.00%: 0) floor0_free_info
|
||||
00013f10 ( 0.00%: 0) floor0_info_unpack
|
||||
00014020 ( 0.00%: 0) floor0_memosize
|
||||
0001402c ( 0.00%: 0) floor0_inverse1
|
||||
00014188 ( 0.00%: 0) vorbis_lsp_to_curve
|
||||
000147ec ( 0.00%: 0) floor0_inverse2
|
||||
00014880 ( 0.00%: 0) floor1_free_info
|
||||
00014938 ( 0.12%: 6) floor1_info_unpack
|
||||
00014fc8 ( 0.12%: 6) render_point
|
||||
00015014 ( 0.00%: 0) floor1_memosize
|
||||
0001501c ( 0.85%: 43) floor1_inverse1
|
||||
00015308 ( 1.20%: 61) floor1_inverse2
|
||||
000154c4 ( 0.91%: 46) render_lineARM
|
||||
00015698 ( 1.40%: 71) ogg_buffer_dup
|
||||
00015b70 ( 0.04%: 2) ogg_page_version
|
||||
00015bb0 ( 0.00%: 0) ogg_page_continued
|
||||
00015bf0 ( 0.00%: 0) ogg_page_bos
|
||||
00015c30 ( 0.04%: 2) ogg_page_eos
|
||||
00015c70 ( 0.08%: 4) ogg_page_granulepos
|
||||
00015d38 ( 0.06%: 3) ogg_page_serialno
|
||||
00015d78 ( 0.00%: 0) ogg_page_pageno
|
||||
00015db8 ( 0.00%: 0) ogg_page_packets
|
||||
00015e1c ( 0.00%: 0) ogg_sync_create
|
||||
00015e70 ( 0.00%: 0) ogg_sync_reset
|
||||
00015ea0 ( 0.02%: 1) ogg_sync_destroy
|
||||
00015ef8 ( 0.22%: 11) ogg_sync_bufferin
|
||||
00015fb4 ( 0.16%: 8) ogg_sync_wrote
|
||||
00016010 ( 0.02%: 1) ogg_page_release
|
||||
00016050 ( 0.33%: 17) ogg_sync_pageseek
|
||||
00016304 ( 0.00%: 0) ogg_sync_pageout
|
||||
0001634c ( 0.00%: 0) ogg_stream_create
|
||||
00016370 ( 0.04%: 2) ogg_stream_destroy
|
||||
00016410 ( 0.08%: 4) ogg_stream_pagein
|
||||
000164f8 ( 0.00%: 0) ogg_stream_reset
|
||||
0001656c ( 0.00%: 0) ogg_stream_reset_serialno
|
||||
00016588 ( 0.12%: 6) ogg_packet_release
|
||||
00016a8c ( 0.00%: 0) ogg_stream_packetout
|
||||
00016a94 ( 0.00%: 0) ogg_stream_packetpeek
|
||||
00016a9c ( 0.00%: 0) ogg_page_dup
|
||||
00016b0c ( 0.00%: 0) vorbis_comment_init
|
||||
00016b80 ( 0.00%: 0) vorbis_comment_query
|
||||
00016c54 ( 0.00%: 0) vorbis_comment_query_count
|
||||
00016d04 ( 0.00%: 0) vorbis_comment_clear
|
||||
00016d90 ( 0.00%: 0) vorbis_info_blocksize
|
||||
00016da4 ( 0.00%: 0) vorbis_info_init
|
||||
00016dec ( 0.00%: 0) vorbis_info_clear
|
||||
00016f9c ( 0.00%: 0) vorbis_dsp_headerin
|
||||
000175b8 ( 0.00%: 0) mapping_clear_info
|
||||
00017634 ( 0.00%: 0) mapping_info_unpack
|
||||
00017888 ( 0.77%: 39) mapping_inverse
|
||||
00017d28 ( 0.00%: 0) mdct_unroll_lap
|
||||
00017fa4 ( 0.00%: 0) mdct_backward
|
||||
00018200 ( 0.10%: 5) mdct_unroll_prelap
|
||||
000182a0 ( 0.08%: 4) mdct_unroll_postlap
|
||||
00018364 ( 2.74%: 139) mdct_unroll_part2
|
||||
000183bc ( 1.79%: 91) mdct_unroll_part3
|
||||
00018414 ( 0.67%: 34) mdct_shift_right
|
||||
00018470 ( 12.20%: 620) mdct_backwardARM
|
||||
00018dc0 ( 0.00%: 0) _VDBG_dump
|
||||
00018e24 ( 0.00%: 0) _VDBG_malloc
|
||||
00018f70 ( 0.00%: 0) _VDBG_free
|
||||
00018f98 ( 0.00%: 0) res_clear_info
|
||||
00018fe8 ( 0.00%: 0) res_unpack
|
||||
000191fc ( 1.77%: 90) res_inverse
|
||||
0001a6f8 ( 0.00%: 0) ov_clear
|
||||
0001a89c ( 0.00%: 0) ov_test_callbacks
|
||||
0001a8dc ( 0.00%: 0) ov_test
|
||||
0001a928 ( 0.00%: 0) ov_streams
|
||||
0001a930 ( 0.00%: 0) ov_seekable
|
||||
0001a938 ( 0.00%: 0) ov_time_total
|
||||
0001a9fc ( 0.00%: 0) ov_bitrate
|
||||
0001ab84 ( 0.00%: 0) ov_bitrate_instant
|
||||
0001ac00 ( 0.00%: 0) ov_serialnumber
|
||||
0001ac78 ( 0.00%: 0) ov_raw_total
|
||||
0001ad28 ( 0.00%: 0) ov_pcm_total
|
||||
0001adcc ( 0.00%: 0) ov_raw_seek
|
||||
0001b6bc ( 0.00%: 0) ov_test_open
|
||||
0001b6d4 ( 0.00%: 0) ov_open_callbacks
|
||||
0001b72c ( 0.00%: 0) ov_open
|
||||
0001b778 ( 0.00%: 0) ov_pcm_seek_page
|
||||
0001c020 ( 0.00%: 0) ov_pcm_seek
|
||||
0001c444 ( 0.00%: 0) ov_time_seek
|
||||
0001c5c4 ( 0.00%: 0) ov_time_seek_page
|
||||
0001c744 ( 0.00%: 0) ov_raw_tell
|
||||
0001c768 ( 0.00%: 0) ov_pcm_tell
|
||||
0001c78c ( 0.00%: 0) ov_time_tell
|
||||
0001c8a8 ( 0.00%: 0) ov_info
|
||||
0001c8ec ( 0.02%: 1) ov_comment
|
||||
0001c930 ( 0.02%: 1) ov_read
|
||||
0001ca10 ( 0.00%: 0) stmiaTest
|
||||
0001ca74 ( 0.00%: 0) strTest
|
||||
0001caf4 ( 0.00%: 0) smullTest
|
||||
0001cb38 ( 0.00%: 0) __udivdi3
|
||||
0001d0a8 ( 0.00%: 0) __aeabi_drsub
|
||||
0001d0b0 ( 0.00%: 0) __aeabi_dsub
|
||||
0001d0b0 ( 0.00%: 0) __subdf3
|
||||
0001d0b4 ( 0.00%: 0) __adddf3
|
||||
0001d0b4 ( 0.00%: 0) __aeabi_dadd
|
||||
0001d394 ( 0.00%: 0) __aeabi_ui2d
|
||||
0001d394 ( 0.00%: 0) __floatunsidf
|
||||
0001d3b8 ( 0.00%: 0) __floatsidf
|
||||
0001d3b8 ( 0.00%: 0) __aeabi_i2d
|
||||
0001d3e0 ( 0.00%: 0) __extendsfdf2
|
||||
0001d3e0 ( 0.00%: 0) __aeabi_f2d
|
||||
0001d420 ( 0.00%: 0) __aeabi_ul2d
|
||||
0001d420 ( 0.00%: 0) __floatundidf
|
||||
0001d434 ( 0.00%: 0) __floatdidf
|
||||
0001d434 ( 0.00%: 0) __aeabi_l2d
|
||||
0001d494 ( 0.00%: 0) __aeabi_dmul
|
||||
0001d494 ( 0.00%: 0) __muldf3
|
||||
0001d7bc ( 0.00%: 0) __aeabi_ddiv
|
||||
0001d7bc ( 0.00%: 0) __divdf3
|
||||
0001d9c0 ( 0.06%: 3) __modsi3
|
||||
0001daa4 ( 0.28%: 14) __divsi3
|
||||
0001dbcc ( 0.00%: 0) __aeabi_idivmod
|
||||
0001dbe4 ( 0.14%: 7) __udivsi3
|
||||
0001dcdc ( 0.00%: 0) __aeabi_uidivmod
|
||||
0001dcf4 ( 0.00%: 0) __divdi3
|
||||
0001e2b0 ( 0.00%: 0) __umodsi3
|
||||
0001e37c ( 0.00%: 0) __aeabi_ldiv0
|
||||
0001e37c ( 0.00%: 0) __div0
|
||||
0001e37c ( 0.00%: 0) __aeabi_idiv0
|
||||
0001e380 ( 0.00%: 0) _XcptFilter
|
||||
0001e38c ( 0.00%: 0) __C_specific_handler
|
||||
0001e398 ( 0.00%: 0) LocalFree
|
||||
0001e3a4 ( 0.00%: 0) vsprintf
|
||||
0001e3b0 ( 0.00%: 0) OutputDebugStringW
|
||||
0001e3bc ( 0.39%: 20) fopen
|
||||
0001e3c8 ( 0.00%: 0) fwrite
|
||||
0001e3d4 ( 0.00%: 0) fread
|
||||
0001e3e0 ( 0.00%: 0) GetThreadTimes
|
||||
0001e3ec ( 0.00%: 0) Sleep
|
||||
0001e3f8 ( 0.04%: 2) fputc
|
||||
0001e404 ( 0.00%: 0) fclose
|
||||
0001e410 ( 0.00%: 0) memset
|
||||
0001e41c ( 0.00%: 0) GetThreadContext
|
||||
0001e428 ( 0.00%: 0) malloc
|
||||
0001e434 ( 0.00%: 0) CreateThread
|
||||
0001e440 ( 0.00%: 0) SetThreadPriority
|
||||
0001e44c ( 0.00%: 0) free
|
||||
0001e458 ( 0.00%: 0) calloc
|
||||
0001e464 ( 0.00%: 0) realloc
|
||||
0001e470 ( 0.00%: 0) memchr
|
||||
0001e47c ( 0.00%: 0) toupper
|
||||
0001e488 ( 0.00%: 0) strlen
|
||||
0001e494 ( 0.00%: 0) strcpy
|
||||
0001e4a0 ( 0.00%: 0) memcmp
|
||||
0001e4ac ( 0.00%: 0) _getstdfilex
|
||||
0001e4b8 ( 0.00%: 0) fprintf
|
||||
0001e4c4 ( 0.00%: 0) fseek
|
||||
0001e4d0 ( 0.00%: 0) memcpy
|
||||
0001e4dc ( 0.00%: 0) ftell
|
||||
0001f018 ( 0.00%: 0) crc_lookup
|
||||
0001f418 ( 0.00%: 0) start_time
|
||||
00028764 ( 0.00%: 0) FLOOR_fromdB_LOOKUP
|
||||
00028b88 ( 0.00%: 0) sincos_lookup0
|
||||
00029b90 ( 0.00%: 0) sincos_lookup1
|
||||
0002ada4 ( 0.00%: 0) __clz_tab
|
||||
0002d014 ( 0.00%: 0) global_bytes
|
||||
0002d030 ( 0.00%: 0) __onexitbegin
|
||||
0002d034 ( 0.00%: 0) __onexitend
|
||||
0002d038 ( 0.00%: 0) _exitflag
|
||||
0002d03c ( 0.00%: 0) pcmout
|
||||
0002e03c ( 0.00%: 0) ref
|
||||
0002f03c ( 0.00%: 0) text
|
||||
0003003c ( 0.00%: 0) speedblock
|
||||
00039000 ( 0.00%: 0) __IMPORT_DESCRIPTOR_COREDLL
|
||||
00039014 ( 0.00%: 0) __NULL_IMPORT_DESCRIPTOR
|
||||
000390b8 ( 0.00%: 0) __imp__XcptFilter
|
||||
000390bc ( 0.00%: 0) __imp___C_specific_handler
|
||||
000390c0 ( 0.00%: 0) __imp_LocalFree
|
||||
000390c4 ( 0.00%: 0) __imp_vsprintf
|
||||
000390c8 ( 0.00%: 0) __imp_OutputDebugStringW
|
||||
000390cc ( 0.00%: 0) __imp_fopen
|
||||
000390d0 ( 0.00%: 0) __imp_fwrite
|
||||
000390d4 ( 0.00%: 0) __imp_fread
|
||||
000390d8 ( 0.00%: 0) __imp_GetThreadTimes
|
||||
000390dc ( 0.00%: 0) __imp_Sleep
|
||||
000390e0 ( 0.00%: 0) __imp_fputc
|
||||
000390e4 ( 0.00%: 0) __imp_fclose
|
||||
000390e8 ( 0.00%: 0) __imp_memset
|
||||
000390ec ( 0.00%: 0) __imp_GetThreadContext
|
||||
000390f0 ( 0.00%: 0) __imp_malloc
|
||||
000390f4 ( 0.00%: 0) __imp_CreateThread
|
||||
000390f8 ( 0.00%: 0) __imp_SetThreadPriority
|
||||
000390fc ( 0.00%: 0) __imp_free
|
||||
00039100 ( 0.00%: 0) __imp_calloc
|
||||
00039104 ( 0.00%: 0) __imp_realloc
|
||||
00039108 ( 0.00%: 0) __imp_memchr
|
||||
0003910c ( 0.00%: 0) __imp_toupper
|
||||
00039110 ( 0.00%: 0) __imp_strlen
|
||||
00039114 ( 0.00%: 0) __imp_strcpy
|
||||
00039118 ( 0.00%: 0) __imp_memcmp
|
||||
0003911c ( 0.00%: 0) __imp__getstdfilex
|
||||
00039120 ( 0.00%: 0) __imp_fprintf
|
||||
00039124 ( 0.00%: 0) __imp_fseek
|
||||
00039128 ( 0.00%: 0) __imp_memcpy
|
||||
0003912c ( 0.00%: 0) __imp_ftell
|
||||
0003a000 ( 0.00%: 0) __xc_a
|
||||
0003a004 ( 0.00%: 0) __xc_z
|
||||
0003a008 ( 0.00%: 0) __xi_a
|
||||
0003a00c ( 0.00%: 0) __xi_z
|
||||
0003a010 ( 0.00%: 0) __xp_a
|
||||
0003a014 ( 0.00%: 0) __xp_z
|
||||
0003a018 ( 0.00%: 0) __xt_a
|
||||
0003a01c ( 0.00%: 0) __xt_z
|
||||
|
||||
|
||||
Profile by Time
|
||||
00000000 ( 42.09%: 2139) Address 0
|
||||
00018470 ( 12.20%: 620) mdct_backwardARM
|
||||
00013264 ( 9.41%: 478) decode_packed_entry_number
|
||||
0001341c ( 5.51%: 280) decode_map
|
||||
000135bc ( 5.31%: 270) vorbis_book_decodevv_add
|
||||
0001364c ( 3.31%: 168) _checksum
|
||||
00013238 ( 2.77%: 141) decode_packed_entry_number_REALSTART
|
||||
00018364 ( 2.74%: 139) mdct_unroll_part2
|
||||
00011ae0 ( 2.48%: 126) oggpack_look
|
||||
000183bc ( 1.79%: 91) mdct_unroll_part3
|
||||
000191fc ( 1.77%: 90) res_inverse
|
||||
00015698 ( 1.40%: 71) ogg_buffer_dup
|
||||
00015308 ( 1.20%: 61) floor1_inverse2
|
||||
00011aa4 ( 1.10%: 56) oggpack_bits
|
||||
000154c4 ( 0.91%: 46) render_lineARM
|
||||
0001501c ( 0.85%: 43) floor1_inverse1
|
||||
00017888 ( 0.77%: 39) mapping_inverse
|
||||
00018414 ( 0.67%: 34) mdct_shift_right
|
||||
00011984 ( 0.65%: 33) Profile_init
|
||||
0001e3bc ( 0.39%: 20) fopen
|
||||
000127e8 ( 0.33%: 17) vorbis_book_unpack
|
||||
00016050 ( 0.33%: 17) ogg_sync_pageseek
|
||||
0001daa4 ( 0.28%: 14) __divsi3
|
||||
00015ef8 ( 0.22%: 11) ogg_sync_bufferin
|
||||
00015fb4 ( 0.16%: 8) ogg_sync_wrote
|
||||
0001dbe4 ( 0.14%: 7) __udivsi3
|
||||
00014fc8 ( 0.12%: 6) render_point
|
||||
00014938 ( 0.12%: 6) floor1_info_unpack
|
||||
00016588 ( 0.12%: 6) ogg_packet_release
|
||||
00018200 ( 0.10%: 5) mdct_unroll_prelap
|
||||
000182a0 ( 0.08%: 4) mdct_unroll_postlap
|
||||
00015c70 ( 0.08%: 4) ogg_page_granulepos
|
||||
00016410 ( 0.08%: 4) ogg_stream_pagein
|
||||
00015d38 ( 0.06%: 3) ogg_page_serialno
|
||||
0001d9c0 ( 0.06%: 3) __modsi3
|
||||
00013918 ( 0.06%: 3) vorbis_dsp_pcmout
|
||||
00015c30 ( 0.04%: 2) ogg_page_eos
|
||||
00011cc4 ( 0.04%: 2) oggpack_read
|
||||
00015b70 ( 0.04%: 2) ogg_page_version
|
||||
00013b04 ( 0.04%: 2) vorbis_dsp_synthesis
|
||||
0001e3f8 ( 0.04%: 2) fputc
|
||||
00016370 ( 0.04%: 2) ogg_stream_destroy
|
||||
00016010 ( 0.02%: 1) ogg_page_release
|
||||
00015ea0 ( 0.02%: 1) ogg_sync_destroy
|
||||
00011c04 ( 0.02%: 1) oggpack_adv
|
||||
0001c8ec ( 0.02%: 1) ov_comment
|
||||
0001c930 ( 0.02%: 1) ov_read
|
||||
000137c8 ( 0.02%: 1) vorbis_dsp_destroy
|
||||
00012728 ( 0.02%: 1) _book_maptype1_quantvals
|
||||
00015bb0 ( 0.00%: 0) ogg_page_continued
|
||||
00015bf0 ( 0.00%: 0) ogg_page_bos
|
||||
0003a018 ( 0.00%: 0) __xt_a
|
||||
00015d78 ( 0.00%: 0) ogg_page_pageno
|
||||
00015db8 ( 0.00%: 0) ogg_page_packets
|
||||
00015e1c ( 0.00%: 0) ogg_sync_create
|
||||
00015e70 ( 0.00%: 0) ogg_sync_reset
|
||||
00011c8c ( 0.00%: 0) oggpack_readinit
|
||||
00011a74 ( 0.00%: 0) oggpack_bytes
|
||||
00016304 ( 0.00%: 0) ogg_sync_pageout
|
||||
0001634c ( 0.00%: 0) ogg_stream_create
|
||||
0003a01c ( 0.00%: 0) __xt_z
|
||||
000164f8 ( 0.00%: 0) ogg_stream_reset
|
||||
0001656c ( 0.00%: 0) ogg_stream_reset_serialno
|
||||
00011a60 ( 0.00%: 0) oggpack_eop
|
||||
00016a8c ( 0.00%: 0) ogg_stream_packetout
|
||||
00016a94 ( 0.00%: 0) ogg_stream_packetpeek
|
||||
00016a9c ( 0.00%: 0) ogg_page_dup
|
||||
00016b0c ( 0.00%: 0) vorbis_comment_init
|
||||
00016b80 ( 0.00%: 0) vorbis_comment_query
|
||||
00016c54 ( 0.00%: 0) vorbis_comment_query_count
|
||||
00016d04 ( 0.00%: 0) vorbis_comment_clear
|
||||
00016d90 ( 0.00%: 0) vorbis_info_blocksize
|
||||
00016da4 ( 0.00%: 0) vorbis_info_init
|
||||
00016dec ( 0.00%: 0) vorbis_info_clear
|
||||
00016f9c ( 0.00%: 0) vorbis_dsp_headerin
|
||||
000175b8 ( 0.00%: 0) mapping_clear_info
|
||||
00017634 ( 0.00%: 0) mapping_info_unpack
|
||||
000117d4 ( 0.00%: 0) Profile_dump
|
||||
00017d28 ( 0.00%: 0) mdct_unroll_lap
|
||||
00017fa4 ( 0.00%: 0) mdct_backward
|
||||
00011610 ( 0.00%: 0) speedtest
|
||||
000115d4 ( 0.00%: 0) WinMain
|
||||
000112b0 ( 0.00%: 0) main2
|
||||
000111e4 ( 0.00%: 0) Output
|
||||
000111d4 ( 0.00%: 0) _c_exit
|
||||
000111c4 ( 0.00%: 0) _cexit
|
||||
00018dc0 ( 0.00%: 0) _VDBG_dump
|
||||
00018e24 ( 0.00%: 0) _VDBG_malloc
|
||||
00018f70 ( 0.00%: 0) _VDBG_free
|
||||
00018f98 ( 0.00%: 0) res_clear_info
|
||||
00018fe8 ( 0.00%: 0) res_unpack
|
||||
000111b8 ( 0.00%: 0) _exit
|
||||
0001a6f8 ( 0.00%: 0) ov_clear
|
||||
0001a89c ( 0.00%: 0) ov_test_callbacks
|
||||
0001a8dc ( 0.00%: 0) ov_test
|
||||
0001a928 ( 0.00%: 0) ov_streams
|
||||
0001a930 ( 0.00%: 0) ov_seekable
|
||||
0001a938 ( 0.00%: 0) ov_time_total
|
||||
0001a9fc ( 0.00%: 0) ov_bitrate
|
||||
0001ab84 ( 0.00%: 0) ov_bitrate_instant
|
||||
0001ac00 ( 0.00%: 0) ov_serialnumber
|
||||
0001ac78 ( 0.00%: 0) ov_raw_total
|
||||
0001ad28 ( 0.00%: 0) ov_pcm_total
|
||||
0001adcc ( 0.00%: 0) ov_raw_seek
|
||||
0001b6bc ( 0.00%: 0) ov_test_open
|
||||
0001b6d4 ( 0.00%: 0) ov_open_callbacks
|
||||
0001b72c ( 0.00%: 0) ov_open
|
||||
0001b778 ( 0.00%: 0) ov_pcm_seek_page
|
||||
0001c020 ( 0.00%: 0) ov_pcm_seek
|
||||
0001c444 ( 0.00%: 0) ov_time_seek
|
||||
0001c5c4 ( 0.00%: 0) ov_time_seek_page
|
||||
0001c744 ( 0.00%: 0) ov_raw_tell
|
||||
0001c768 ( 0.00%: 0) ov_pcm_tell
|
||||
0001c78c ( 0.00%: 0) ov_time_tell
|
||||
0001c8a8 ( 0.00%: 0) ov_info
|
||||
0001ca10 ( 0.00%: 0) stmiaTest
|
||||
0001ca74 ( 0.00%: 0) strTest
|
||||
0001caf4 ( 0.00%: 0) smullTest
|
||||
0001cb38 ( 0.00%: 0) __udivdi3
|
||||
0001d0a8 ( 0.00%: 0) __aeabi_drsub
|
||||
0001d0b0 ( 0.00%: 0) __aeabi_dsub
|
||||
0001d0b0 ( 0.00%: 0) __subdf3
|
||||
0001d0b4 ( 0.00%: 0) __adddf3
|
||||
0001d0b4 ( 0.00%: 0) __aeabi_dadd
|
||||
0001d394 ( 0.00%: 0) __aeabi_ui2d
|
||||
0001d394 ( 0.00%: 0) __floatunsidf
|
||||
0001d3b8 ( 0.00%: 0) __floatsidf
|
||||
0001d3b8 ( 0.00%: 0) __aeabi_i2d
|
||||
0001d3e0 ( 0.00%: 0) __extendsfdf2
|
||||
0001d3e0 ( 0.00%: 0) __aeabi_f2d
|
||||
0001d420 ( 0.00%: 0) __aeabi_ul2d
|
||||
0001d420 ( 0.00%: 0) __floatundidf
|
||||
0001d434 ( 0.00%: 0) __floatdidf
|
||||
0001d434 ( 0.00%: 0) __aeabi_l2d
|
||||
0001d494 ( 0.00%: 0) __aeabi_dmul
|
||||
0001d494 ( 0.00%: 0) __muldf3
|
||||
0001d7bc ( 0.00%: 0) __aeabi_ddiv
|
||||
0001d7bc ( 0.00%: 0) __divdf3
|
||||
000110d8 ( 0.00%: 0) exit
|
||||
0001dbcc ( 0.00%: 0) __aeabi_idivmod
|
||||
00011078 ( 0.00%: 0) _cinit
|
||||
0001dcdc ( 0.00%: 0) __aeabi_uidivmod
|
||||
0001dcf4 ( 0.00%: 0) __divdi3
|
||||
0001e2b0 ( 0.00%: 0) __umodsi3
|
||||
0001e37c ( 0.00%: 0) __aeabi_ldiv0
|
||||
0001e37c ( 0.00%: 0) __div0
|
||||
0001e37c ( 0.00%: 0) __aeabi_idiv0
|
||||
0001e380 ( 0.00%: 0) _XcptFilter
|
||||
0001e38c ( 0.00%: 0) __C_specific_handler
|
||||
0001e398 ( 0.00%: 0) LocalFree
|
||||
0001e3a4 ( 0.00%: 0) vsprintf
|
||||
0001e3b0 ( 0.00%: 0) OutputDebugStringW
|
||||
00011008 ( 0.00%: 0) WinMainCRTStartup
|
||||
0001e3c8 ( 0.00%: 0) fwrite
|
||||
0001e3d4 ( 0.00%: 0) fread
|
||||
0001e3e0 ( 0.00%: 0) GetThreadTimes
|
||||
0001e3ec ( 0.00%: 0) Sleep
|
||||
0001e404 ( 0.00%: 0) fclose
|
||||
0001e410 ( 0.00%: 0) memset
|
||||
0001e41c ( 0.00%: 0) GetThreadContext
|
||||
0001e428 ( 0.00%: 0) malloc
|
||||
0001e434 ( 0.00%: 0) CreateThread
|
||||
0001e440 ( 0.00%: 0) SetThreadPriority
|
||||
0001e44c ( 0.00%: 0) free
|
||||
0001e458 ( 0.00%: 0) calloc
|
||||
0001e464 ( 0.00%: 0) realloc
|
||||
0001e470 ( 0.00%: 0) memchr
|
||||
0001e47c ( 0.00%: 0) toupper
|
||||
0001e488 ( 0.00%: 0) strlen
|
||||
0001e494 ( 0.00%: 0) strcpy
|
||||
0001e4a0 ( 0.00%: 0) memcmp
|
||||
0001e4ac ( 0.00%: 0) _getstdfilex
|
||||
0001e4b8 ( 0.00%: 0) fprintf
|
||||
0001e4c4 ( 0.00%: 0) fseek
|
||||
0001e4d0 ( 0.00%: 0) memcpy
|
||||
0001e4dc ( 0.00%: 0) ftell
|
||||
0001f018 ( 0.00%: 0) crc_lookup
|
||||
0001f418 ( 0.00%: 0) start_time
|
||||
00028764 ( 0.00%: 0) FLOOR_fromdB_LOOKUP
|
||||
00028b88 ( 0.00%: 0) sincos_lookup0
|
||||
00029b90 ( 0.00%: 0) sincos_lookup1
|
||||
0002ada4 ( 0.00%: 0) __clz_tab
|
||||
0002d014 ( 0.00%: 0) global_bytes
|
||||
0002d030 ( 0.00%: 0) __onexitbegin
|
||||
0002d034 ( 0.00%: 0) __onexitend
|
||||
0002d038 ( 0.00%: 0) _exitflag
|
||||
0002d03c ( 0.00%: 0) pcmout
|
||||
0002e03c ( 0.00%: 0) ref
|
||||
0002f03c ( 0.00%: 0) text
|
||||
0003003c ( 0.00%: 0) speedblock
|
||||
00039000 ( 0.00%: 0) __IMPORT_DESCRIPTOR_COREDLL
|
||||
00039014 ( 0.00%: 0) __NULL_IMPORT_DESCRIPTOR
|
||||
000390b8 ( 0.00%: 0) __imp__XcptFilter
|
||||
000390bc ( 0.00%: 0) __imp___C_specific_handler
|
||||
000390c0 ( 0.00%: 0) __imp_LocalFree
|
||||
000390c4 ( 0.00%: 0) __imp_vsprintf
|
||||
000390c8 ( 0.00%: 0) __imp_OutputDebugStringW
|
||||
000390cc ( 0.00%: 0) __imp_fopen
|
||||
000390d0 ( 0.00%: 0) __imp_fwrite
|
||||
000390d4 ( 0.00%: 0) __imp_fread
|
||||
000390d8 ( 0.00%: 0) __imp_GetThreadTimes
|
||||
000390dc ( 0.00%: 0) __imp_Sleep
|
||||
000390e0 ( 0.00%: 0) __imp_fputc
|
||||
000390e4 ( 0.00%: 0) __imp_fclose
|
||||
000390e8 ( 0.00%: 0) __imp_memset
|
||||
000390ec ( 0.00%: 0) __imp_GetThreadContext
|
||||
000390f0 ( 0.00%: 0) __imp_malloc
|
||||
000390f4 ( 0.00%: 0) __imp_CreateThread
|
||||
000390f8 ( 0.00%: 0) __imp_SetThreadPriority
|
||||
000390fc ( 0.00%: 0) __imp_free
|
||||
00039100 ( 0.00%: 0) __imp_calloc
|
||||
00039104 ( 0.00%: 0) __imp_realloc
|
||||
00039108 ( 0.00%: 0) __imp_memchr
|
||||
0003910c ( 0.00%: 0) __imp_toupper
|
||||
00039110 ( 0.00%: 0) __imp_strlen
|
||||
00039114 ( 0.00%: 0) __imp_strcpy
|
||||
00039118 ( 0.00%: 0) __imp_memcmp
|
||||
0003911c ( 0.00%: 0) __imp__getstdfilex
|
||||
00039120 ( 0.00%: 0) __imp_fprintf
|
||||
00039124 ( 0.00%: 0) __imp_fseek
|
||||
00039128 ( 0.00%: 0) __imp_memcpy
|
||||
0003912c ( 0.00%: 0) __imp_ftell
|
||||
0003a000 ( 0.00%: 0) __xc_a
|
||||
0003a004 ( 0.00%: 0) __xc_z
|
||||
0003a008 ( 0.00%: 0) __xi_a
|
||||
0003a00c ( 0.00%: 0) __xi_z
|
||||
0003a010 ( 0.00%: 0) __xp_a
|
||||
0003a014 ( 0.00%: 0) __xp_z
|
||||
00013160 ( 0.00%: 0) vorbis_book_decodev_set
|
||||
000136ac ( 0.00%: 0) vorbis_dsp_restart
|
||||
000130c8 ( 0.00%: 0) vorbis_book_decodev_add
|
||||
00013714 ( 0.00%: 0) vorbis_dsp_create
|
||||
00013a44 ( 0.00%: 0) vorbis_dsp_read
|
||||
00013a84 ( 0.00%: 0) vorbis_packet_blocksize
|
||||
00013f04 ( 0.00%: 0) floor0_free_info
|
||||
00013f10 ( 0.00%: 0) floor0_info_unpack
|
||||
00014020 ( 0.00%: 0) floor0_memosize
|
||||
0001402c ( 0.00%: 0) floor0_inverse1
|
||||
00014188 ( 0.00%: 0) vorbis_lsp_to_curve
|
||||
000147ec ( 0.00%: 0) floor0_inverse2
|
||||
00014880 ( 0.00%: 0) floor1_free_info
|
||||
00013020 ( 0.00%: 0) vorbis_book_decodevs_add
|
||||
00013008 ( 0.00%: 0) vorbis_book_decode
|
||||
00015014 ( 0.00%: 0) floor1_memosize
|
||||
000127a8 ( 0.00%: 0) vorbis_book_clear
|
||||
00011e58 ( 0.00%: 0) _ilog
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
This README covers the Tremolo library, version 0.08.
|
||||
|
||||
Tremolo is a modified version of the Ogg Vorbis 'Tremor' integer
|
||||
playback codec, branching from 1.0.2 of the low memory branch of
|
||||
that source from svn.
|
||||
|
||||
Previous versions of Tremolo have been released under the GNU GPL
|
||||
but thanks to a grant from Google, this version is back to being
|
||||
released under the same license as vanilla Tremor.
|
||||
|
||||
Robin Watts
|
||||
|
||||
tremolo@wss.co.uk
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
This README covers the Ogg Vorbis 'Tremor' integer playback codec
|
||||
source as of date 2002 09 02, version 1.0.0.
|
||||
|
||||
******
|
||||
|
||||
The C source in this package will build on any ANSI C compiler and
|
||||
function completely and properly on any platform. The included build
|
||||
system assumes GNU build system and make tools (m4, automake,
|
||||
autoconf, libtool and gmake). GCC is not required, although GCC is
|
||||
the most tested compiler. To build using GNU tools, type in the
|
||||
source directory:
|
||||
|
||||
./autogen.sh
|
||||
make
|
||||
|
||||
Currently, the source implements playback in pure C on all platforms
|
||||
except ARM, where a [currently] small amount of assembly (see
|
||||
asm_arm.h) is used to implement 64 bit math operations and fast LSP
|
||||
computation. If building on ARM without the benefit of GNU build
|
||||
system tools, be sure that '_ARM_ASSEM_' is #defined by the build
|
||||
system if this assembly is desired, else the resulting library will
|
||||
use whatever 64 bit math builtins the compiler implements.
|
||||
|
||||
No math library is required by this source. No floating point
|
||||
operations are used at any point in either setup or decode. This
|
||||
decoder library will properly decode any past, current or future
|
||||
Vorbis I file or stream.
|
||||
|
||||
********
|
||||
|
||||
The build system produces a static and [when supported by the OS]
|
||||
dynamic library named 'libvorbisidec'. This library exposes an API
|
||||
nearly identical to the BSD reference library's 'libvorbisfile',
|
||||
including all the features familiar to users of vorbisfile. This API
|
||||
is similar enough that the proper header file to include is named
|
||||
'ivorbisfile.h' [included in the source build directory]. Lower level
|
||||
libvorbis-style headers and structures are in 'ivorbiscodec.h'
|
||||
[included in the source build directory]. A simple example program,
|
||||
ivorbisfile_example.c, can be built with 'make example'.
|
||||
|
||||
********
|
||||
|
||||
Detailed Tremor API Documentation begins at doc/index.html
|
||||
|
||||
Monty
|
||||
xiph.org
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Add explicit 64 bit integer support rather than relying on compiler
|
||||
Roll in optional use of bounded heap memory manager
|
||||
|
|
@ -0,0 +1,300 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
int offset;
|
||||
int count;
|
||||
float percent;
|
||||
}
|
||||
Profile_Entry;
|
||||
|
||||
static const char *profile_filename;
|
||||
static const char *map_filename;
|
||||
static int granularity;
|
||||
static int *profile;
|
||||
static int profile_len;
|
||||
static Profile_Entry *functionTable;
|
||||
static int numFunctions;
|
||||
static int maxFunctions;
|
||||
|
||||
static void read_args(int argc, const char *argv[])
|
||||
{
|
||||
if (argc < 3)
|
||||
{
|
||||
fprintf(stderr, "annotate <profile file> <map file>\n");
|
||||
fclose(stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
profile_filename = argv[1];
|
||||
map_filename = argv[2];
|
||||
}
|
||||
|
||||
static void read_profile()
|
||||
{
|
||||
FILE *in = fopen(profile_filename, "rb");
|
||||
|
||||
if (in == NULL)
|
||||
{
|
||||
fprintf(stderr, "Failed to open profile file '%s'\n",
|
||||
profile_filename);
|
||||
fclose(stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
fseek(in, 0, SEEK_END);
|
||||
profile_len = (int)ftell(in)-8;
|
||||
fseek(in, 0, SEEK_SET);
|
||||
|
||||
if ((fgetc(in) != 'P') ||
|
||||
(fgetc(in) != 'R') ||
|
||||
(fgetc(in) != '0') ||
|
||||
(fgetc(in) != 'F'))
|
||||
{
|
||||
fclose(in);
|
||||
fprintf(stderr, "'%s' is not a profile file\n",
|
||||
profile_filename);
|
||||
fclose(stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
fread(&granularity, 4, 1, in);
|
||||
profile = malloc(profile_len);
|
||||
if (profile == NULL)
|
||||
{
|
||||
fclose(in);
|
||||
fprintf(stderr, "Out of memory reading profile\n");
|
||||
fclose(stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
fread(profile, 4, profile_len>>2, in);
|
||||
fclose(in);
|
||||
}
|
||||
|
||||
static void addFn(const char *text, int offset)
|
||||
{
|
||||
if (numFunctions == maxFunctions)
|
||||
{
|
||||
int newSize = maxFunctions*2;
|
||||
|
||||
if (newSize == 0)
|
||||
newSize = 128;
|
||||
|
||||
functionTable = realloc(functionTable,
|
||||
newSize*sizeof(Profile_Entry));
|
||||
if (functionTable == NULL)
|
||||
{
|
||||
fprintf(stderr, "Out of memory reading mapfile\n");
|
||||
fflush(stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
maxFunctions = newSize;
|
||||
}
|
||||
|
||||
functionTable[numFunctions].name = malloc(strlen(text)+1);
|
||||
strcpy(functionTable[numFunctions].name, text);
|
||||
functionTable[numFunctions].offset = offset;
|
||||
functionTable[numFunctions].count = 0;
|
||||
functionTable[numFunctions].percent = 0.0;
|
||||
//fprintf(stdout, "%s %x\n", functionTable[numFunctions].name,
|
||||
// functionTable[numFunctions].offset);
|
||||
numFunctions++;
|
||||
}
|
||||
|
||||
static void read_map()
|
||||
{
|
||||
FILE *in = fopen(map_filename, "rb");
|
||||
char text[2048];
|
||||
|
||||
if (in == NULL)
|
||||
{
|
||||
fprintf(stderr, "Failed to open map file '%s'\n",
|
||||
map_filename);
|
||||
fclose(stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
functionTable = NULL;
|
||||
numFunctions = 0;
|
||||
maxFunctions = 0;
|
||||
|
||||
addFn("Address 0", 0);
|
||||
|
||||
while (!feof(in))
|
||||
{
|
||||
int offset;
|
||||
char c;
|
||||
char *t;
|
||||
|
||||
/* Skip over any whitespace */
|
||||
do
|
||||
{
|
||||
c = fgetc(in);
|
||||
}
|
||||
while (((c == 32) || (c == 9)) && (!feof(in)));
|
||||
ungetc(c, in);
|
||||
|
||||
/* Try to read an offset */
|
||||
if (fscanf(in, "0x%x", &offset) != 1)
|
||||
{
|
||||
goto over;
|
||||
}
|
||||
/* Skip over any whitespace */
|
||||
do
|
||||
{
|
||||
c = fgetc(in);
|
||||
}
|
||||
while ((c == 32) && (!feof(in)));
|
||||
ungetc(c, in);
|
||||
|
||||
/* Names never start with . or (*/
|
||||
if ((c != '_') &&
|
||||
((c < 'a') || (c > 'z')) &&
|
||||
((c < 'A') || (c > 'Z')))
|
||||
goto over;
|
||||
|
||||
/* Read the name */
|
||||
t = text;
|
||||
do
|
||||
{
|
||||
c = fgetc(in);
|
||||
*t++ = c;
|
||||
}
|
||||
while (c > 32);
|
||||
t[-1] = 0;
|
||||
|
||||
/* Now there should be nothing left on this line */
|
||||
if ((c != 10) && (c != 13))
|
||||
goto over;
|
||||
|
||||
/* And put the return back */
|
||||
ungetc(c, in);
|
||||
|
||||
if (t != text)
|
||||
{
|
||||
addFn(text, offset);
|
||||
}
|
||||
|
||||
over:
|
||||
/* Skip to the end of the line */
|
||||
do
|
||||
{
|
||||
c = fgetc(in);
|
||||
}
|
||||
while ((c >= 32) && (!feof(in)));
|
||||
|
||||
/* Skip over any newlines */
|
||||
while (((c == 10) || (c == 13)) && (!feof(in)))
|
||||
{
|
||||
c = fgetc(in);
|
||||
}
|
||||
|
||||
/* And put the first non whitespace/non return char back */
|
||||
ungetc(c, in);
|
||||
}
|
||||
|
||||
fclose(in);
|
||||
}
|
||||
|
||||
static void show_profile()
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i < numFunctions; i++)
|
||||
{
|
||||
fprintf(stdout, "%08x (%6.2f%%: %6d) %s\n",
|
||||
functionTable[i].offset,
|
||||
functionTable[i].percent,
|
||||
functionTable[i].count,
|
||||
functionTable[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
int byAddress(const void *_e1, const void *_e2)
|
||||
{
|
||||
const Profile_Entry *e1 = (const Profile_Entry *)_e1;
|
||||
const Profile_Entry *e2 = (const Profile_Entry *)_e2;
|
||||
|
||||
return e1->offset - e2->offset;
|
||||
}
|
||||
|
||||
int byTime(const void *_e1, const void *_e2)
|
||||
{
|
||||
const Profile_Entry *e1 = (const Profile_Entry *)_e1;
|
||||
const Profile_Entry *e2 = (const Profile_Entry *)_e2;
|
||||
|
||||
return e2->count - e1->count;
|
||||
}
|
||||
|
||||
static void process_profile()
|
||||
{
|
||||
int next;
|
||||
int fn;
|
||||
int idx;
|
||||
int max;
|
||||
int total;
|
||||
|
||||
/* Sort into address order */
|
||||
qsort(functionTable,
|
||||
numFunctions,
|
||||
sizeof(Profile_Entry),
|
||||
byAddress);
|
||||
|
||||
/* Run through the profile adding it to the appropriate function */
|
||||
fn = -1; /* Which function are we looking at */
|
||||
next = -1; /* At what address should we move to the next function */
|
||||
idx = 0; /* Where are we in the profile */
|
||||
max = profile_len>>2;
|
||||
total = 0;
|
||||
for (idx = 0; idx < max; idx++)
|
||||
{
|
||||
while ((idx<<(granularity+2)) >= next)
|
||||
{
|
||||
/* Move to the next function */
|
||||
fn++;
|
||||
//fprintf(stdout, "Will be on fn %s until we pass %x\n",
|
||||
// functionTable[fn].name, functionTable[fn+1].offset);
|
||||
next = 0x7FFFFFFF;
|
||||
if (fn+1 < numFunctions)
|
||||
{
|
||||
next = functionTable[fn+1].offset;
|
||||
}
|
||||
}
|
||||
//fprintf(stdout, "fn=%d count=%d idx=%d next=%x\n",
|
||||
// fn, functionTable[fn].count, idx, next);
|
||||
functionTable[fn].count += profile[idx];
|
||||
total += profile[idx];
|
||||
}
|
||||
|
||||
for (fn = 0; fn < numFunctions; fn++)
|
||||
{
|
||||
functionTable[fn].percent = 100.0*functionTable[fn].count/total;
|
||||
}
|
||||
|
||||
fprintf(stdout, "Profile by Address\n");
|
||||
show_profile();
|
||||
|
||||
/* Sort into time order */
|
||||
qsort(functionTable,
|
||||
numFunctions,
|
||||
sizeof(Profile_Entry),
|
||||
byTime);
|
||||
|
||||
fprintf(stdout, "\n\n");
|
||||
fprintf(stdout, "Profile by Time\n");
|
||||
show_profile();
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
read_args(argc, argv);
|
||||
|
||||
read_profile();
|
||||
read_map();
|
||||
|
||||
process_profile();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: arm7 and later wide math functions
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#ifdef _ARM_ASSEM_
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,486 @@
|
|||
Profile by Address
|
||||
00000000 ( 40.06%: 2115) Address 0
|
||||
00011008 ( 0.00%: 0) WinMainCRTStartup
|
||||
00011078 ( 0.00%: 0) _cinit
|
||||
000110d8 ( 0.00%: 0) exit
|
||||
000111b8 ( 0.00%: 0) _exit
|
||||
000111c4 ( 0.00%: 0) _cexit
|
||||
000111d4 ( 0.00%: 0) _c_exit
|
||||
000111e4 ( 0.00%: 0) Output
|
||||
000112b0 ( 0.00%: 0) main2
|
||||
000115c8 ( 0.00%: 0) WinMain
|
||||
00011604 ( 0.00%: 0) speedtest
|
||||
000117c8 ( 0.00%: 0) Profile_dump
|
||||
00011978 ( 0.42%: 22) Profile_init
|
||||
00011a54 ( 0.00%: 0) oggpack_eop
|
||||
00011a68 ( 0.00%: 0) oggpack_bytes
|
||||
00011a98 ( 1.84%: 97) oggpack_bits
|
||||
00011ad4 ( 1.55%: 82) oggpack_look
|
||||
00011bf8 ( 0.97%: 51) oggpack_adv
|
||||
00011c80 ( 0.00%: 0) oggpack_readinit
|
||||
00011cb8 ( 0.02%: 1) oggpack_read
|
||||
00011e4c ( 0.02%: 1) _ilog
|
||||
0001271c ( 0.02%: 1) _book_maptype1_quantvals
|
||||
0001279c ( 0.00%: 0) vorbis_book_clear
|
||||
000127d0 ( 1.08%: 57) vorbis_book_unpack
|
||||
00012fd8 ( 0.00%: 0) vorbis_book_decode
|
||||
00012ff0 ( 7.61%: 402) decode_map
|
||||
00013230 ( 0.00%: 0) vorbis_book_decodevs_add
|
||||
000132f8 ( 0.00%: 0) vorbis_book_decodev_add
|
||||
000133b0 ( 0.32%: 17) vorbis_book_decodev_set
|
||||
000134a4 ( 4.30%: 227) vorbis_book_decodevv_add
|
||||
00013578 ( 0.00%: 0) vorbis_dsp_restart
|
||||
000135e0 ( 0.00%: 0) vorbis_dsp_create
|
||||
00013694 ( 0.04%: 2) vorbis_dsp_destroy
|
||||
000137e4 ( 0.04%: 2) vorbis_dsp_pcmout
|
||||
00013910 ( 0.00%: 0) vorbis_dsp_read
|
||||
00013950 ( 0.00%: 0) vorbis_packet_blocksize
|
||||
000139d0 ( 0.02%: 1) vorbis_dsp_synthesis
|
||||
00013dd0 ( 0.00%: 0) floor0_free_info
|
||||
00013ddc ( 0.00%: 0) floor0_info_unpack
|
||||
00013eec ( 0.00%: 0) floor0_memosize
|
||||
00013ef8 ( 0.00%: 0) floor0_inverse1
|
||||
00014054 ( 0.00%: 0) vorbis_lsp_to_curve
|
||||
000146b8 ( 0.00%: 0) floor0_inverse2
|
||||
0001474c ( 0.04%: 2) floor1_free_info
|
||||
00014804 ( 0.04%: 2) floor1_info_unpack
|
||||
00014e94 ( 0.00%: 0) floor1_memosize
|
||||
00014e9c ( 0.49%: 26) floor1_inverse1
|
||||
000151b8 ( 4.89%: 258) floor1_inverse2
|
||||
00015588 ( 1.19%: 63) ogg_buffer_dup
|
||||
00015a60 ( 0.08%: 4) ogg_page_version
|
||||
00015aa0 ( 0.02%: 1) ogg_page_continued
|
||||
00015ae0 ( 0.02%: 1) ogg_page_bos
|
||||
00015b20 ( 0.00%: 0) ogg_page_eos
|
||||
00015b60 ( 0.11%: 6) ogg_page_granulepos
|
||||
00015c28 ( 0.15%: 8) ogg_page_serialno
|
||||
00015c68 ( 0.00%: 0) ogg_page_pageno
|
||||
00015ca8 ( 0.00%: 0) ogg_page_packets
|
||||
00015d0c ( 0.00%: 0) ogg_sync_create
|
||||
00015d60 ( 0.00%: 0) ogg_sync_reset
|
||||
00015d90 ( 0.11%: 6) ogg_sync_destroy
|
||||
00015de8 ( 0.13%: 7) ogg_sync_bufferin
|
||||
00015ea4 ( 0.08%: 4) ogg_sync_wrote
|
||||
00015f00 ( 0.11%: 6) ogg_page_release
|
||||
00015f40 ( 2.90%: 153) ogg_sync_pageseek
|
||||
00016260 ( 0.00%: 0) ogg_sync_pageout
|
||||
000162a8 ( 0.00%: 0) ogg_stream_create
|
||||
000162cc ( 0.08%: 4) ogg_stream_destroy
|
||||
0001636c ( 0.21%: 11) ogg_stream_pagein
|
||||
00016454 ( 0.06%: 3) ogg_stream_reset
|
||||
000164c8 ( 0.00%: 0) ogg_stream_reset_serialno
|
||||
000164e4 ( 0.40%: 21) ogg_packet_release
|
||||
000169e8 ( 0.00%: 0) ogg_stream_packetout
|
||||
000169f0 ( 0.00%: 0) ogg_stream_packetpeek
|
||||
000169f8 ( 0.00%: 0) ogg_page_dup
|
||||
00016a68 ( 0.00%: 0) vorbis_comment_init
|
||||
00016adc ( 0.00%: 0) vorbis_comment_query
|
||||
00016bb0 ( 0.00%: 0) vorbis_comment_query_count
|
||||
00016c60 ( 0.00%: 0) vorbis_comment_clear
|
||||
00016cec ( 0.00%: 0) vorbis_info_blocksize
|
||||
00016d00 ( 0.00%: 0) vorbis_info_init
|
||||
00016d48 ( 0.00%: 0) vorbis_info_clear
|
||||
00016ef8 ( 0.00%: 0) vorbis_dsp_headerin
|
||||
00017514 ( 0.00%: 0) mapping_clear_info
|
||||
00017590 ( 0.02%: 1) mapping_info_unpack
|
||||
000177e4 ( 1.59%: 84) mapping_inverse
|
||||
00017c84 ( 0.04%: 2) mdct_unroll_lap
|
||||
00017f00 ( 0.02%: 1) mdct_backward
|
||||
00018244 ( 0.00%: 0) _VDBG_dump
|
||||
000182a8 ( 0.00%: 0) _VDBG_malloc
|
||||
000183f4 ( 0.00%: 0) _VDBG_free
|
||||
0001841c ( 0.00%: 0) res_clear_info
|
||||
0001846c ( 0.00%: 0) res_unpack
|
||||
00018680 ( 1.86%: 98) res_inverse
|
||||
00019b7c ( 0.00%: 0) ov_clear
|
||||
00019d20 ( 0.00%: 0) ov_test_callbacks
|
||||
00019d60 ( 0.00%: 0) ov_test
|
||||
00019dac ( 0.00%: 0) ov_streams
|
||||
00019db4 ( 0.00%: 0) ov_seekable
|
||||
00019dbc ( 0.00%: 0) ov_time_total
|
||||
00019e80 ( 0.00%: 0) ov_bitrate
|
||||
0001a008 ( 0.00%: 0) ov_bitrate_instant
|
||||
0001a084 ( 0.00%: 0) ov_serialnumber
|
||||
0001a0fc ( 0.00%: 0) ov_raw_total
|
||||
0001a1ac ( 0.00%: 0) ov_pcm_total
|
||||
0001a250 ( 0.00%: 0) ov_raw_seek
|
||||
0001ab40 ( 0.00%: 0) ov_test_open
|
||||
0001ab58 ( 0.00%: 0) ov_open_callbacks
|
||||
0001abb0 ( 0.00%: 0) ov_open
|
||||
0001abfc ( 0.00%: 0) ov_pcm_seek_page
|
||||
0001b4a4 ( 0.00%: 0) ov_pcm_seek
|
||||
0001b8c8 ( 0.00%: 0) ov_time_seek
|
||||
0001ba48 ( 0.00%: 0) ov_time_seek_page
|
||||
0001bbc8 ( 0.00%: 0) ov_raw_tell
|
||||
0001bbec ( 0.00%: 0) ov_pcm_tell
|
||||
0001bc10 ( 0.00%: 0) ov_time_tell
|
||||
0001bd2c ( 0.00%: 0) ov_info
|
||||
0001bd70 ( 0.00%: 0) ov_comment
|
||||
0001bdb4 ( 0.09%: 5) ov_read
|
||||
0001be94 ( 0.00%: 0) mdct_unroll_prelap
|
||||
0001bf34 ( 0.06%: 3) mdct_unroll_postlap
|
||||
0001bff8 ( 3.43%: 181) mdct_unroll_part2
|
||||
0001c050 ( 1.21%: 64) mdct_unroll_part3
|
||||
0001c0a8 ( 0.85%: 45) mdct_shift_right
|
||||
0001c104 ( 14.45%: 763) mdct_backwardARM
|
||||
0001c998 ( 6.04%: 319) decode_packed_entry_number
|
||||
0001cb58 ( 0.00%: 0) stmiaTest
|
||||
0001cbbc ( 0.00%: 0) strTest
|
||||
0001cc3c ( 0.00%: 0) smullTest
|
||||
0001cc80 ( 0.00%: 0) __udivdi3
|
||||
0001d1f0 ( 0.00%: 0) __aeabi_drsub
|
||||
0001d1f8 ( 0.00%: 0) __aeabi_dsub
|
||||
0001d1f8 ( 0.00%: 0) __subdf3
|
||||
0001d1fc ( 0.00%: 0) __adddf3
|
||||
0001d1fc ( 0.00%: 0) __aeabi_dadd
|
||||
0001d4dc ( 0.00%: 0) __aeabi_ui2d
|
||||
0001d4dc ( 0.00%: 0) __floatunsidf
|
||||
0001d500 ( 0.00%: 0) __floatsidf
|
||||
0001d500 ( 0.00%: 0) __aeabi_i2d
|
||||
0001d528 ( 0.00%: 0) __extendsfdf2
|
||||
0001d528 ( 0.00%: 0) __aeabi_f2d
|
||||
0001d568 ( 0.00%: 0) __aeabi_ul2d
|
||||
0001d568 ( 0.00%: 0) __floatundidf
|
||||
0001d57c ( 0.00%: 0) __floatdidf
|
||||
0001d57c ( 0.00%: 0) __aeabi_l2d
|
||||
0001d5dc ( 0.00%: 0) __aeabi_dmul
|
||||
0001d5dc ( 0.00%: 0) __muldf3
|
||||
0001d904 ( 0.00%: 0) __aeabi_ddiv
|
||||
0001d904 ( 0.00%: 0) __divdf3
|
||||
0001db08 ( 0.00%: 0) __modsi3
|
||||
0001dbec ( 0.30%: 16) __divsi3
|
||||
0001dd14 ( 0.00%: 0) __aeabi_idivmod
|
||||
0001dd2c ( 0.04%: 2) __udivsi3
|
||||
0001de24 ( 0.00%: 0) __aeabi_uidivmod
|
||||
0001de3c ( 0.00%: 0) __divdi3
|
||||
0001e3f8 ( 0.00%: 0) __umodsi3
|
||||
0001e4c4 ( 0.00%: 0) __aeabi_ldiv0
|
||||
0001e4c4 ( 0.00%: 0) __div0
|
||||
0001e4c4 ( 0.00%: 0) __aeabi_idiv0
|
||||
0001e4c8 ( 0.00%: 0) _XcptFilter
|
||||
0001e4d4 ( 0.00%: 0) __C_specific_handler
|
||||
0001e4e0 ( 0.00%: 0) LocalFree
|
||||
0001e4ec ( 0.00%: 0) vsprintf
|
||||
0001e4f8 ( 0.57%: 30) OutputDebugStringW
|
||||
0001e504 ( 0.00%: 0) fopen
|
||||
0001e510 ( 0.00%: 0) fwrite
|
||||
0001e51c ( 0.00%: 0) fread
|
||||
0001e528 ( 0.00%: 0) GetThreadTimes
|
||||
0001e534 ( 0.00%: 0) Sleep
|
||||
0001e540 ( 0.04%: 2) fputc
|
||||
0001e54c ( 0.00%: 0) fclose
|
||||
0001e558 ( 0.00%: 0) memset
|
||||
0001e564 ( 0.00%: 0) GetThreadContext
|
||||
0001e570 ( 0.00%: 0) malloc
|
||||
0001e57c ( 0.00%: 0) CreateThread
|
||||
0001e588 ( 0.00%: 0) SetThreadPriority
|
||||
0001e594 ( 0.00%: 0) free
|
||||
0001e5a0 ( 0.00%: 0) calloc
|
||||
0001e5ac ( 0.00%: 0) realloc
|
||||
0001e5b8 ( 0.00%: 0) memchr
|
||||
0001e5c4 ( 0.00%: 0) toupper
|
||||
0001e5d0 ( 0.00%: 0) strlen
|
||||
0001e5dc ( 0.00%: 0) strcpy
|
||||
0001e5e8 ( 0.00%: 0) memcmp
|
||||
0001e5f4 ( 0.00%: 0) _getstdfilex
|
||||
0001e600 ( 0.00%: 0) fprintf
|
||||
0001e60c ( 0.00%: 0) fseek
|
||||
0001e618 ( 0.00%: 0) memcpy
|
||||
0001e624 ( 0.00%: 0) ftell
|
||||
0001f418 ( 0.00%: 0) start_time
|
||||
00028764 ( 0.00%: 0) FLOOR_fromdB_LOOKUP
|
||||
00028b88 ( 0.00%: 0) sincos_lookup0
|
||||
00029b90 ( 0.00%: 0) sincos_lookup1
|
||||
0002ada4 ( 0.00%: 0) __clz_tab
|
||||
0002d014 ( 0.00%: 0) global_bytes
|
||||
0002d030 ( 0.00%: 0) __onexitbegin
|
||||
0002d034 ( 0.00%: 0) __onexitend
|
||||
0002d038 ( 0.00%: 0) _exitflag
|
||||
0002d03c ( 0.00%: 0) pcmout
|
||||
0002e03c ( 0.00%: 0) ref
|
||||
0002f03c ( 0.00%: 0) text
|
||||
0003003c ( 0.00%: 0) speedblock
|
||||
00039000 ( 0.00%: 0) __IMPORT_DESCRIPTOR_COREDLL
|
||||
00039014 ( 0.00%: 0) __NULL_IMPORT_DESCRIPTOR
|
||||
000390b8 ( 0.00%: 0) __imp__XcptFilter
|
||||
000390bc ( 0.00%: 0) __imp___C_specific_handler
|
||||
000390c0 ( 0.00%: 0) __imp_LocalFree
|
||||
000390c4 ( 0.00%: 0) __imp_vsprintf
|
||||
000390c8 ( 0.00%: 0) __imp_OutputDebugStringW
|
||||
000390cc ( 0.00%: 0) __imp_fopen
|
||||
000390d0 ( 0.00%: 0) __imp_fwrite
|
||||
000390d4 ( 0.00%: 0) __imp_fread
|
||||
000390d8 ( 0.00%: 0) __imp_GetThreadTimes
|
||||
000390dc ( 0.00%: 0) __imp_Sleep
|
||||
000390e0 ( 0.00%: 0) __imp_fputc
|
||||
000390e4 ( 0.00%: 0) __imp_fclose
|
||||
000390e8 ( 0.00%: 0) __imp_memset
|
||||
000390ec ( 0.00%: 0) __imp_GetThreadContext
|
||||
000390f0 ( 0.00%: 0) __imp_malloc
|
||||
000390f4 ( 0.00%: 0) __imp_CreateThread
|
||||
000390f8 ( 0.00%: 0) __imp_SetThreadPriority
|
||||
000390fc ( 0.00%: 0) __imp_free
|
||||
00039100 ( 0.00%: 0) __imp_calloc
|
||||
00039104 ( 0.00%: 0) __imp_realloc
|
||||
00039108 ( 0.00%: 0) __imp_memchr
|
||||
0003910c ( 0.00%: 0) __imp_toupper
|
||||
00039110 ( 0.00%: 0) __imp_strlen
|
||||
00039114 ( 0.00%: 0) __imp_strcpy
|
||||
00039118 ( 0.00%: 0) __imp_memcmp
|
||||
0003911c ( 0.00%: 0) __imp__getstdfilex
|
||||
00039120 ( 0.00%: 0) __imp_fprintf
|
||||
00039124 ( 0.00%: 0) __imp_fseek
|
||||
00039128 ( 0.00%: 0) __imp_memcpy
|
||||
0003912c ( 0.00%: 0) __imp_ftell
|
||||
0003a000 ( 0.00%: 0) __xc_a
|
||||
0003a004 ( 0.00%: 0) __xc_z
|
||||
0003a008 ( 0.00%: 0) __xi_a
|
||||
0003a00c ( 0.00%: 0) __xi_z
|
||||
0003a010 ( 0.00%: 0) __xp_a
|
||||
0003a014 ( 0.00%: 0) __xp_z
|
||||
0003a018 ( 0.00%: 0) __xt_a
|
||||
0003a01c ( 0.00%: 0) __xt_z
|
||||
|
||||
|
||||
Profile by Time
|
||||
00000000 ( 40.06%: 2115) Address 0
|
||||
0001c104 ( 14.45%: 763) mdct_backwardARM
|
||||
00012ff0 ( 7.61%: 402) decode_map
|
||||
0001c998 ( 6.04%: 319) decode_packed_entry_number
|
||||
000151b8 ( 4.89%: 258) floor1_inverse2
|
||||
000134a4 ( 4.30%: 227) vorbis_book_decodevv_add
|
||||
0001bff8 ( 3.43%: 181) mdct_unroll_part2
|
||||
00015f40 ( 2.90%: 153) ogg_sync_pageseek
|
||||
00018680 ( 1.86%: 98) res_inverse
|
||||
00011a98 ( 1.84%: 97) oggpack_bits
|
||||
000177e4 ( 1.59%: 84) mapping_inverse
|
||||
00011ad4 ( 1.55%: 82) oggpack_look
|
||||
0001c050 ( 1.21%: 64) mdct_unroll_part3
|
||||
00015588 ( 1.19%: 63) ogg_buffer_dup
|
||||
000127d0 ( 1.08%: 57) vorbis_book_unpack
|
||||
00011bf8 ( 0.97%: 51) oggpack_adv
|
||||
0001c0a8 ( 0.85%: 45) mdct_shift_right
|
||||
0001e4f8 ( 0.57%: 30) OutputDebugStringW
|
||||
00014e9c ( 0.49%: 26) floor1_inverse1
|
||||
00011978 ( 0.42%: 22) Profile_init
|
||||
000164e4 ( 0.40%: 21) ogg_packet_release
|
||||
000133b0 ( 0.32%: 17) vorbis_book_decodev_set
|
||||
0001dbec ( 0.30%: 16) __divsi3
|
||||
0001636c ( 0.21%: 11) ogg_stream_pagein
|
||||
00015c28 ( 0.15%: 8) ogg_page_serialno
|
||||
00015de8 ( 0.13%: 7) ogg_sync_bufferin
|
||||
00015d90 ( 0.11%: 6) ogg_sync_destroy
|
||||
00015f00 ( 0.11%: 6) ogg_page_release
|
||||
00015b60 ( 0.11%: 6) ogg_page_granulepos
|
||||
0001bdb4 ( 0.09%: 5) ov_read
|
||||
000162cc ( 0.08%: 4) ogg_stream_destroy
|
||||
00015ea4 ( 0.08%: 4) ogg_sync_wrote
|
||||
00015a60 ( 0.08%: 4) ogg_page_version
|
||||
0001bf34 ( 0.06%: 3) mdct_unroll_postlap
|
||||
00016454 ( 0.06%: 3) ogg_stream_reset
|
||||
0001e540 ( 0.04%: 2) fputc
|
||||
00014804 ( 0.04%: 2) floor1_info_unpack
|
||||
0001474c ( 0.04%: 2) floor1_free_info
|
||||
0001dd2c ( 0.04%: 2) __udivsi3
|
||||
00017c84 ( 0.04%: 2) mdct_unroll_lap
|
||||
00013694 ( 0.04%: 2) vorbis_dsp_destroy
|
||||
000137e4 ( 0.04%: 2) vorbis_dsp_pcmout
|
||||
00011cb8 ( 0.02%: 1) oggpack_read
|
||||
00017f00 ( 0.02%: 1) mdct_backward
|
||||
000139d0 ( 0.02%: 1) vorbis_dsp_synthesis
|
||||
00011e4c ( 0.02%: 1) _ilog
|
||||
0001271c ( 0.02%: 1) _book_maptype1_quantvals
|
||||
00017590 ( 0.02%: 1) mapping_info_unpack
|
||||
00015ae0 ( 0.02%: 1) ogg_page_bos
|
||||
00015aa0 ( 0.02%: 1) ogg_page_continued
|
||||
00018244 ( 0.00%: 0) _VDBG_dump
|
||||
000182a8 ( 0.00%: 0) _VDBG_malloc
|
||||
000183f4 ( 0.00%: 0) _VDBG_free
|
||||
0001841c ( 0.00%: 0) res_clear_info
|
||||
0001846c ( 0.00%: 0) res_unpack
|
||||
00019b7c ( 0.00%: 0) ov_clear
|
||||
00019d20 ( 0.00%: 0) ov_test_callbacks
|
||||
00019d60 ( 0.00%: 0) ov_test
|
||||
00019dac ( 0.00%: 0) ov_streams
|
||||
00019db4 ( 0.00%: 0) ov_seekable
|
||||
00019dbc ( 0.00%: 0) ov_time_total
|
||||
00019e80 ( 0.00%: 0) ov_bitrate
|
||||
0001a008 ( 0.00%: 0) ov_bitrate_instant
|
||||
0001a084 ( 0.00%: 0) ov_serialnumber
|
||||
0001a0fc ( 0.00%: 0) ov_raw_total
|
||||
0001a1ac ( 0.00%: 0) ov_pcm_total
|
||||
0001a250 ( 0.00%: 0) ov_raw_seek
|
||||
0001ab40 ( 0.00%: 0) ov_test_open
|
||||
0001ab58 ( 0.00%: 0) ov_open_callbacks
|
||||
0001abb0 ( 0.00%: 0) ov_open
|
||||
0001abfc ( 0.00%: 0) ov_pcm_seek_page
|
||||
0001b4a4 ( 0.00%: 0) ov_pcm_seek
|
||||
0001b8c8 ( 0.00%: 0) ov_time_seek
|
||||
0001ba48 ( 0.00%: 0) ov_time_seek_page
|
||||
0001bbc8 ( 0.00%: 0) ov_raw_tell
|
||||
0001bbec ( 0.00%: 0) ov_pcm_tell
|
||||
0001bc10 ( 0.00%: 0) ov_time_tell
|
||||
0001bd2c ( 0.00%: 0) ov_info
|
||||
0001bd70 ( 0.00%: 0) ov_comment
|
||||
0001be94 ( 0.00%: 0) mdct_unroll_prelap
|
||||
0001cb58 ( 0.00%: 0) stmiaTest
|
||||
0001cbbc ( 0.00%: 0) strTest
|
||||
0001cc3c ( 0.00%: 0) smullTest
|
||||
0001cc80 ( 0.00%: 0) __udivdi3
|
||||
0001d1f0 ( 0.00%: 0) __aeabi_drsub
|
||||
0001d1f8 ( 0.00%: 0) __aeabi_dsub
|
||||
0001d1f8 ( 0.00%: 0) __subdf3
|
||||
0001d1fc ( 0.00%: 0) __adddf3
|
||||
0001d1fc ( 0.00%: 0) __aeabi_dadd
|
||||
0001d4dc ( 0.00%: 0) __aeabi_ui2d
|
||||
0001d4dc ( 0.00%: 0) __floatunsidf
|
||||
0001d500 ( 0.00%: 0) __floatsidf
|
||||
0001d500 ( 0.00%: 0) __aeabi_i2d
|
||||
0001d528 ( 0.00%: 0) __extendsfdf2
|
||||
0001d528 ( 0.00%: 0) __aeabi_f2d
|
||||
0001d568 ( 0.00%: 0) __aeabi_ul2d
|
||||
0001d568 ( 0.00%: 0) __floatundidf
|
||||
0001d57c ( 0.00%: 0) __floatdidf
|
||||
0001d57c ( 0.00%: 0) __aeabi_l2d
|
||||
0001d5dc ( 0.00%: 0) __aeabi_dmul
|
||||
0001d5dc ( 0.00%: 0) __muldf3
|
||||
0001d904 ( 0.00%: 0) __aeabi_ddiv
|
||||
0001d904 ( 0.00%: 0) __divdf3
|
||||
0001db08 ( 0.00%: 0) __modsi3
|
||||
0001dd14 ( 0.00%: 0) __aeabi_idivmod
|
||||
0001de24 ( 0.00%: 0) __aeabi_uidivmod
|
||||
0001de3c ( 0.00%: 0) __divdi3
|
||||
0001e3f8 ( 0.00%: 0) __umodsi3
|
||||
0001e4c4 ( 0.00%: 0) __aeabi_ldiv0
|
||||
0001e4c4 ( 0.00%: 0) __div0
|
||||
0001e4c4 ( 0.00%: 0) __aeabi_idiv0
|
||||
0001e4c8 ( 0.00%: 0) _XcptFilter
|
||||
0001e4d4 ( 0.00%: 0) __C_specific_handler
|
||||
0001e4e0 ( 0.00%: 0) LocalFree
|
||||
0001e4ec ( 0.00%: 0) vsprintf
|
||||
0001e504 ( 0.00%: 0) fopen
|
||||
0001e510 ( 0.00%: 0) fwrite
|
||||
0001e51c ( 0.00%: 0) fread
|
||||
0001e528 ( 0.00%: 0) GetThreadTimes
|
||||
0001e534 ( 0.00%: 0) Sleep
|
||||
0001e54c ( 0.00%: 0) fclose
|
||||
0001e558 ( 0.00%: 0) memset
|
||||
0001e564 ( 0.00%: 0) GetThreadContext
|
||||
0001e570 ( 0.00%: 0) malloc
|
||||
0001e57c ( 0.00%: 0) CreateThread
|
||||
0001e588 ( 0.00%: 0) SetThreadPriority
|
||||
0001e594 ( 0.00%: 0) free
|
||||
0001e5a0 ( 0.00%: 0) calloc
|
||||
0001e5ac ( 0.00%: 0) realloc
|
||||
0001e5b8 ( 0.00%: 0) memchr
|
||||
0001e5c4 ( 0.00%: 0) toupper
|
||||
0001e5d0 ( 0.00%: 0) strlen
|
||||
0001e5dc ( 0.00%: 0) strcpy
|
||||
0001e5e8 ( 0.00%: 0) memcmp
|
||||
0001e5f4 ( 0.00%: 0) _getstdfilex
|
||||
0001e600 ( 0.00%: 0) fprintf
|
||||
0001e60c ( 0.00%: 0) fseek
|
||||
0001e618 ( 0.00%: 0) memcpy
|
||||
0001e624 ( 0.00%: 0) ftell
|
||||
0001f418 ( 0.00%: 0) start_time
|
||||
00028764 ( 0.00%: 0) FLOOR_fromdB_LOOKUP
|
||||
00028b88 ( 0.00%: 0) sincos_lookup0
|
||||
00029b90 ( 0.00%: 0) sincos_lookup1
|
||||
0002ada4 ( 0.00%: 0) __clz_tab
|
||||
0002d014 ( 0.00%: 0) global_bytes
|
||||
0002d030 ( 0.00%: 0) __onexitbegin
|
||||
0002d034 ( 0.00%: 0) __onexitend
|
||||
0002d038 ( 0.00%: 0) _exitflag
|
||||
0002d03c ( 0.00%: 0) pcmout
|
||||
0002e03c ( 0.00%: 0) ref
|
||||
0002f03c ( 0.00%: 0) text
|
||||
0003003c ( 0.00%: 0) speedblock
|
||||
00039000 ( 0.00%: 0) __IMPORT_DESCRIPTOR_COREDLL
|
||||
00039014 ( 0.00%: 0) __NULL_IMPORT_DESCRIPTOR
|
||||
000390b8 ( 0.00%: 0) __imp__XcptFilter
|
||||
000390bc ( 0.00%: 0) __imp___C_specific_handler
|
||||
000390c0 ( 0.00%: 0) __imp_LocalFree
|
||||
000390c4 ( 0.00%: 0) __imp_vsprintf
|
||||
000390c8 ( 0.00%: 0) __imp_OutputDebugStringW
|
||||
000390cc ( 0.00%: 0) __imp_fopen
|
||||
000390d0 ( 0.00%: 0) __imp_fwrite
|
||||
000390d4 ( 0.00%: 0) __imp_fread
|
||||
000390d8 ( 0.00%: 0) __imp_GetThreadTimes
|
||||
000390dc ( 0.00%: 0) __imp_Sleep
|
||||
000390e0 ( 0.00%: 0) __imp_fputc
|
||||
000390e4 ( 0.00%: 0) __imp_fclose
|
||||
000390e8 ( 0.00%: 0) __imp_memset
|
||||
000390ec ( 0.00%: 0) __imp_GetThreadContext
|
||||
000390f0 ( 0.00%: 0) __imp_malloc
|
||||
000390f4 ( 0.00%: 0) __imp_CreateThread
|
||||
000390f8 ( 0.00%: 0) __imp_SetThreadPriority
|
||||
000390fc ( 0.00%: 0) __imp_free
|
||||
00039100 ( 0.00%: 0) __imp_calloc
|
||||
00039104 ( 0.00%: 0) __imp_realloc
|
||||
00039108 ( 0.00%: 0) __imp_memchr
|
||||
0003910c ( 0.00%: 0) __imp_toupper
|
||||
00039110 ( 0.00%: 0) __imp_strlen
|
||||
00039114 ( 0.00%: 0) __imp_strcpy
|
||||
00039118 ( 0.00%: 0) __imp_memcmp
|
||||
0003911c ( 0.00%: 0) __imp__getstdfilex
|
||||
00039120 ( 0.00%: 0) __imp_fprintf
|
||||
00039124 ( 0.00%: 0) __imp_fseek
|
||||
00039128 ( 0.00%: 0) __imp_memcpy
|
||||
0003912c ( 0.00%: 0) __imp_ftell
|
||||
0003a000 ( 0.00%: 0) __xc_a
|
||||
0003a004 ( 0.00%: 0) __xc_z
|
||||
0003a008 ( 0.00%: 0) __xi_a
|
||||
0003a00c ( 0.00%: 0) __xi_z
|
||||
0003a010 ( 0.00%: 0) __xp_a
|
||||
0003a014 ( 0.00%: 0) __xp_z
|
||||
0003a018 ( 0.00%: 0) __xt_a
|
||||
0003a01c ( 0.00%: 0) __xt_z
|
||||
00011008 ( 0.00%: 0) WinMainCRTStartup
|
||||
00011078 ( 0.00%: 0) _cinit
|
||||
000110d8 ( 0.00%: 0) exit
|
||||
000111b8 ( 0.00%: 0) _exit
|
||||
000111c4 ( 0.00%: 0) _cexit
|
||||
000111d4 ( 0.00%: 0) _c_exit
|
||||
000111e4 ( 0.00%: 0) Output
|
||||
000112b0 ( 0.00%: 0) main2
|
||||
000115c8 ( 0.00%: 0) WinMain
|
||||
00011604 ( 0.00%: 0) speedtest
|
||||
000117c8 ( 0.00%: 0) Profile_dump
|
||||
00011a54 ( 0.00%: 0) oggpack_eop
|
||||
00011a68 ( 0.00%: 0) oggpack_bytes
|
||||
00011c80 ( 0.00%: 0) oggpack_readinit
|
||||
0001279c ( 0.00%: 0) vorbis_book_clear
|
||||
00012fd8 ( 0.00%: 0) vorbis_book_decode
|
||||
00013230 ( 0.00%: 0) vorbis_book_decodevs_add
|
||||
000132f8 ( 0.00%: 0) vorbis_book_decodev_add
|
||||
00013578 ( 0.00%: 0) vorbis_dsp_restart
|
||||
000135e0 ( 0.00%: 0) vorbis_dsp_create
|
||||
00013910 ( 0.00%: 0) vorbis_dsp_read
|
||||
00013950 ( 0.00%: 0) vorbis_packet_blocksize
|
||||
00013dd0 ( 0.00%: 0) floor0_free_info
|
||||
00013ddc ( 0.00%: 0) floor0_info_unpack
|
||||
00013eec ( 0.00%: 0) floor0_memosize
|
||||
00013ef8 ( 0.00%: 0) floor0_inverse1
|
||||
00014054 ( 0.00%: 0) vorbis_lsp_to_curve
|
||||
000146b8 ( 0.00%: 0) floor0_inverse2
|
||||
00014e94 ( 0.00%: 0) floor1_memosize
|
||||
00015b20 ( 0.00%: 0) ogg_page_eos
|
||||
00015c68 ( 0.00%: 0) ogg_page_pageno
|
||||
00015ca8 ( 0.00%: 0) ogg_page_packets
|
||||
00015d0c ( 0.00%: 0) ogg_sync_create
|
||||
00015d60 ( 0.00%: 0) ogg_sync_reset
|
||||
00016260 ( 0.00%: 0) ogg_sync_pageout
|
||||
000162a8 ( 0.00%: 0) ogg_stream_create
|
||||
000164c8 ( 0.00%: 0) ogg_stream_reset_serialno
|
||||
000169e8 ( 0.00%: 0) ogg_stream_packetout
|
||||
000169f0 ( 0.00%: 0) ogg_stream_packetpeek
|
||||
000169f8 ( 0.00%: 0) ogg_page_dup
|
||||
00016a68 ( 0.00%: 0) vorbis_comment_init
|
||||
00016adc ( 0.00%: 0) vorbis_comment_query
|
||||
00016bb0 ( 0.00%: 0) vorbis_comment_query_count
|
||||
00016c60 ( 0.00%: 0) vorbis_comment_clear
|
||||
00016cec ( 0.00%: 0) vorbis_info_blocksize
|
||||
00016d00 ( 0.00%: 0) vorbis_info_init
|
||||
00016d48 ( 0.00%: 0) vorbis_info_clear
|
||||
00016ef8 ( 0.00%: 0) vorbis_dsp_headerin
|
||||
00017514 ( 0.00%: 0) mapping_clear_info
|
||||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: packing variable sized words into an octet stream
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
/* We're 'LSb' endian; if we write a word but read individual bits,
|
||||
then we'll read the lsb first */
|
||||
|
|
@ -163,7 +143,7 @@ static void _span(oggpack_buffer *b){
|
|||
b->headend-=b->headbit>>3;
|
||||
b->headbit&=0x7;
|
||||
|
||||
if(b->head && b->head->next){
|
||||
if(b->head->next){
|
||||
b->count+=b->head->length;
|
||||
b->head=b->head->next;
|
||||
|
||||
|
|
@ -187,13 +167,8 @@ void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){
|
|||
|
||||
b->tail=b->head=r;
|
||||
b->count=0;
|
||||
if (b->head && r->length) {
|
||||
b->headptr=b->head->buffer->data+b->head->begin;
|
||||
b->headend=b->head->length;
|
||||
} else {
|
||||
b->headptr=0;
|
||||
b->headend=0;
|
||||
}
|
||||
_span(b);
|
||||
|
||||
//fprintf(stderr,
|
||||
|
|
@ -214,11 +189,9 @@ void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){
|
|||
/* Read in bits without advancing the bitptr; bits <= 32 */
|
||||
long oggpack_look(oggpack_buffer *b,int bits){
|
||||
unsigned long m=mask[bits];
|
||||
unsigned long ret = 0;
|
||||
unsigned long ret;
|
||||
int BITS = bits;
|
||||
|
||||
if (!b->headptr) return 0;
|
||||
|
||||
bits+=b->headbit;
|
||||
|
||||
if(bits >= b->headend<<3){
|
||||
|
|
@ -226,8 +199,7 @@ long oggpack_look(oggpack_buffer *b,int bits){
|
|||
unsigned char *ptr=b->headptr;
|
||||
ogg_reference *head=b->head;
|
||||
|
||||
if(end<0)return 0;
|
||||
if (!head || !end)return 0;
|
||||
if(end<0)return -1;
|
||||
|
||||
if(bits){
|
||||
_lookspan();
|
||||
|
|
|
|||
|
|
@ -1,37 +1,3 @@
|
|||
@ Tremolo library
|
||||
@-----------------------------------------------------------------------
|
||||
@ Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
@ All rights reserved.
|
||||
|
||||
@ Redistribution and use in source and binary forms, with or without
|
||||
@ modification, are permitted provided that the following conditions
|
||||
@ are met:
|
||||
|
||||
@ * Redistributions of source code must retain the above copyright
|
||||
@ notice, this list of conditions and the following disclaimer.
|
||||
@ * Redistributions in binary form must reproduce the above
|
||||
@ copyright notice, this list of conditions and the following disclaimer
|
||||
@ in the documentation and/or other materials provided with the
|
||||
@ distribution.
|
||||
@ * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
@ Productions Ltd nor the names of its contributors may be used to
|
||||
@ endorse or promote products derived from this software without
|
||||
@ specific prior written permission.
|
||||
@
|
||||
@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ ----------------------------------------------------------------------
|
||||
|
||||
.text
|
||||
|
||||
.global oggpack_look
|
||||
|
|
@ -125,8 +91,7 @@ look_really_slow:
|
|||
LDMFD r13!,{r5,r6,r10,r11,PC}
|
||||
|
||||
look_out_of_data:
|
||||
@MVN r0,#0 ; return -1
|
||||
MOV r0,#0
|
||||
MVN r0,#0 @ return -1
|
||||
LDMFD r13!,{r5,r6,r10,r11,PC}
|
||||
|
||||
look_overrun:
|
||||
|
|
@ -169,7 +134,7 @@ oggpack_adv:
|
|||
ADDLE r12,r12,#32
|
||||
ADDLE r3,r3,#4
|
||||
STMIA r0,{r2,r3,r12}
|
||||
BX LR
|
||||
MOV PC,R14
|
||||
adv_slow:
|
||||
STMFD r13!,{r10,r14}
|
||||
|
||||
|
|
@ -203,8 +168,6 @@ adv_slow_loop:
|
|||
|
||||
LDMFD r13!,{r10,PC}
|
||||
adv_end:
|
||||
MOV r2, #0
|
||||
MOV r12,#0
|
||||
STMIA r0,{r2,r3,r12}
|
||||
|
||||
LDMFD r13!,{r10,PC}
|
||||
|
|
@ -227,7 +190,7 @@ oggpack_readinit:
|
|||
RSB r3,r3,#32 @ r3 = BitsInWord
|
||||
STMIA r0,{r1,r2,r3}
|
||||
STR r12,[r0,#20]
|
||||
BX LR
|
||||
MOV PC,R14
|
||||
|
||||
oggpack_read:
|
||||
@ r0 = oggpack_buffer *b
|
||||
|
|
@ -365,8 +328,7 @@ read_out_of_data:
|
|||
RSBS r3,r3,#32 @ r3 = bitsLeftInWord
|
||||
MVN r1,#0 @ r1 = -1 = bitsLeftInSegment
|
||||
STMIA r0,{r1,r2,r3}
|
||||
@MVN r0,#0 ; return -1
|
||||
MOV r0,#0
|
||||
MVN r0,#0 @ return -1
|
||||
LDMFD r13!,{r5,r6,r10,r11,PC}
|
||||
|
||||
read_overrun:
|
||||
|
|
@ -395,5 +357,3 @@ read_overrun_next_segment:
|
|||
ADD r6,r10,r10,LSR #3 @ r6 = pointer to data
|
||||
MOV r10,#0
|
||||
B read_slow_loop
|
||||
|
||||
@ END
|
||||
|
|
|
|||
|
|
@ -1,52 +1,30 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: basic codebook pack/unpack/code/decode operations
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
// #include <log/log.h>
|
||||
#include "ogg.h"
|
||||
#include "ivorbiscodec.h"
|
||||
#include "codebook.h"
|
||||
#include "misc.h"
|
||||
#include "os.h"
|
||||
|
||||
#define MARKER_SIZE 33
|
||||
|
||||
/**** pack/unpack helpers ******************************************/
|
||||
int _ilog(unsigned int v){
|
||||
|
|
@ -147,7 +125,7 @@ static int _make_words(char *l,long n,ogg_uint32_t *r,long quantvals,
|
|||
codebook *b, oggpack_buffer *opb,int maptype){
|
||||
long i,j,count=0;
|
||||
long top=0;
|
||||
ogg_uint32_t marker[MARKER_SIZE];
|
||||
ogg_uint32_t marker[33];
|
||||
|
||||
if (n<1)
|
||||
return 1;
|
||||
|
|
@ -160,10 +138,6 @@ static int _make_words(char *l,long n,ogg_uint32_t *r,long quantvals,
|
|||
for(i=0;i<n;i++){
|
||||
long length=l[i];
|
||||
if(length){
|
||||
if (length < 0 || length >= MARKER_SIZE) {
|
||||
//cjh ALOGE("b/23881715");
|
||||
return 1;
|
||||
}
|
||||
ogg_uint32_t entry=marker[length];
|
||||
long chase=0;
|
||||
if(count && !entry)return -1; /* overpopulated tree! */
|
||||
|
|
@ -206,7 +180,7 @@ static int _make_words(char *l,long n,ogg_uint32_t *r,long quantvals,
|
|||
/* prune the tree; the implicit invariant says all the longer
|
||||
markers were dangling from our just-taken node. Dangle them
|
||||
from our *new* node. */
|
||||
for(j=length+1;j<MARKER_SIZE;j++)
|
||||
for(j=length+1;j<33;j++)
|
||||
if((marker[j]>>1) == entry){
|
||||
entry=marker[j];
|
||||
marker[j]=marker[j-1]<<1;
|
||||
|
|
@ -216,20 +190,6 @@ static int _make_words(char *l,long n,ogg_uint32_t *r,long quantvals,
|
|||
}
|
||||
}
|
||||
|
||||
// following sanity check copied from libvorbis
|
||||
/* sanity check the huffman tree; an underpopulated tree must be
|
||||
rejected. The only exception is the one-node pseudo-nil tree,
|
||||
which appears to be underpopulated because the tree doesn't
|
||||
really exist; there's only one possible 'codeword' or zero bits,
|
||||
but the above tree-gen code doesn't mark that. */
|
||||
if(b->used_entries != 1){
|
||||
for(i=1;i<MARKER_SIZE;i++)
|
||||
if(marker[i] & (0xffffffffUL>>(32-i))){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -259,14 +219,13 @@ static int _make_decode_table(codebook *s,char *lengthlist,long quantvals,
|
|||
if (s->used_entries > INT_MAX/2 ||
|
||||
s->used_entries*2 > INT_MAX/((long) sizeof(*work)) - 1) return 1;
|
||||
/* Overallocate as above */
|
||||
work=calloc((s->entries*2+1),sizeof(*work));
|
||||
if (!work) return 1;
|
||||
if(_make_words(lengthlist,s->entries,work,quantvals,s,opb,maptype)) goto error_out;
|
||||
if (s->used_entries > INT_MAX/(s->dec_leafw+1)) goto error_out;
|
||||
if (s->dec_nodeb && s->used_entries * (s->dec_leafw+1) > INT_MAX/s->dec_nodeb) goto error_out;
|
||||
work=alloca((s->entries*2+1)*sizeof(*work));
|
||||
if(_make_words(lengthlist,s->entries,work,quantvals,s,opb,maptype))return 1;
|
||||
if (s->used_entries > INT_MAX/(s->dec_leafw+1)) return 1;
|
||||
if (s->dec_nodeb && s->used_entries * (s->dec_leafw+1) > INT_MAX/s->dec_nodeb) return 1;
|
||||
s->dec_table=_ogg_malloc((s->used_entries*(s->dec_leafw+1)-2)*
|
||||
s->dec_nodeb);
|
||||
if (!s->dec_table) goto error_out;
|
||||
if (!s->dec_table) return 1;
|
||||
|
||||
if(s->dec_leafw==1){
|
||||
switch(s->dec_nodeb){
|
||||
|
|
@ -350,11 +309,7 @@ static int _make_decode_table(codebook *s,char *lengthlist,long quantvals,
|
|||
}
|
||||
}
|
||||
|
||||
free(work);
|
||||
return 0;
|
||||
error_out:
|
||||
free(work);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* most of the time, entries%dimensions == 0, but we need to be
|
||||
|
|
@ -428,7 +383,7 @@ int vorbis_book_unpack(oggpack_buffer *opb,codebook *s){
|
|||
switch((int)oggpack_read(opb,1)){
|
||||
case 0:
|
||||
/* unordered */
|
||||
lengthlist=(char *)calloc(s->entries, sizeof(*lengthlist));
|
||||
lengthlist=(char *)alloca(sizeof(*lengthlist)*s->entries);
|
||||
if(!lengthlist) goto _eofout;
|
||||
|
||||
/* allocated but unused entries? */
|
||||
|
|
@ -463,7 +418,7 @@ int vorbis_book_unpack(oggpack_buffer *opb,codebook *s){
|
|||
long length=oggpack_read(opb,5)+1;
|
||||
|
||||
s->used_entries=s->entries;
|
||||
lengthlist=(char *)calloc(s->entries, sizeof(*lengthlist));
|
||||
lengthlist=(char *)alloca(sizeof(*lengthlist)*s->entries);
|
||||
if (!lengthlist) goto _eofout;
|
||||
|
||||
for(i=0;i<s->entries;){
|
||||
|
|
@ -527,12 +482,13 @@ int vorbis_book_unpack(oggpack_buffer *opb,codebook *s){
|
|||
/* use dec_type 1: vector of packed values */
|
||||
|
||||
/* need quantized values before */
|
||||
s->q_val=calloc(sizeof(ogg_uint16_t), quantvals);
|
||||
s->q_val=alloca(sizeof(ogg_uint16_t)*quantvals);
|
||||
if (!s->q_val) goto _eofout;
|
||||
for(i=0;i<quantvals;i++)
|
||||
((ogg_uint16_t *)s->q_val)[i]=(ogg_uint16_t)oggpack_read(opb,s->q_bits);
|
||||
|
||||
if(oggpack_eop(opb)){
|
||||
s->q_val=0; /* cleanup must not free alloca memory */
|
||||
goto _eofout;
|
||||
}
|
||||
|
||||
|
|
@ -542,11 +498,12 @@ int vorbis_book_unpack(oggpack_buffer *opb,codebook *s){
|
|||
s->dec_leafw=_determine_leaf_words(s->dec_nodeb,
|
||||
(s->q_bits*s->dim+8)/8);
|
||||
if(_make_decode_table(s,lengthlist,quantvals,opb,maptype)){
|
||||
s->q_val=0; /* cleanup must not free alloca memory */
|
||||
goto _errout;
|
||||
}
|
||||
|
||||
free(s->q_val);
|
||||
s->q_val=0;
|
||||
s->q_val=0; /* about to go out of scope; _make_decode_table
|
||||
was using it */
|
||||
|
||||
}else{
|
||||
/* use dec_type 2: packed vector of column offsets */
|
||||
|
|
@ -631,13 +588,10 @@ int vorbis_book_unpack(oggpack_buffer *opb,codebook *s){
|
|||
|
||||
if(oggpack_eop(opb))goto _eofout;
|
||||
|
||||
free(lengthlist);
|
||||
return 0;
|
||||
_errout:
|
||||
_eofout:
|
||||
vorbis_book_clear(s);
|
||||
free(lengthlist);
|
||||
free(s->q_val);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -786,7 +740,7 @@ static int decode_map(codebook *s, oggpack_buffer *b, ogg_int32_t *v, int point)
|
|||
}
|
||||
case 3:{
|
||||
/* offset into array */
|
||||
void *ptr=((char *)s->q_val)+entry*s->q_pack;
|
||||
void *ptr=s->q_val+entry*s->q_pack;
|
||||
|
||||
if(s->q_bits<=8){
|
||||
for(i=0;i<s->dim;i++)
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: basic shared codebook operations
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#ifndef _V_CODEBOOK_H_
|
||||
#define _V_CODEBOOK_H_
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: libvorbis codec headers
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#ifndef _V_CODECI_H_
|
||||
#define _V_CODECI_H_
|
||||
|
|
@ -113,12 +93,12 @@ typedef struct{
|
|||
} floor1class;
|
||||
|
||||
typedef struct{
|
||||
floor1class *klass; /* [VIF_CLASS] */
|
||||
ogg_uint8_t *partitionclass; /* [VIF_PARTS]; 0 to 15 */
|
||||
floor1class *class; /* [VIF_CLASS] */
|
||||
char *partitionclass; /* [VIF_PARTS]; 0 to 15 */
|
||||
ogg_uint16_t *postlist; /* [VIF_POSIT+2]; first two implicit */
|
||||
ogg_uint8_t *forward_index; /* [VIF_POSIT+2]; */
|
||||
ogg_uint8_t *hineighbor; /* [VIF_POSIT]; */
|
||||
ogg_uint8_t *loneighbor; /* [VIF_POSIT]; */
|
||||
char *forward_index; /* [VIF_POSIT+2]; */
|
||||
char *hineighbor; /* [VIF_POSIT]; */
|
||||
char *loneighbor; /* [VIF_POSIT]; */
|
||||
|
||||
int partitions; /* 0 to 31 */
|
||||
int posts;
|
||||
|
|
@ -215,8 +195,6 @@ typedef struct codec_setup_info {
|
|||
|
||||
} codec_setup_info;
|
||||
|
||||
extern int vorbis_dsp_init(vorbis_dsp_state *v, vorbis_info *vi);
|
||||
extern void vorbis_dsp_clear(vorbis_dsp_state *v);
|
||||
extern vorbis_dsp_state *vorbis_dsp_create(vorbis_info *vi);
|
||||
extern void vorbis_dsp_destroy(vorbis_dsp_state *v);
|
||||
extern int vorbis_dsp_headerin(vorbis_info *vi,vorbis_comment *vc,
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
#ifndef _OS_CVTYPES_H
|
||||
#define _OS_CVTYPES_H
|
||||
|
||||
|
|
@ -42,6 +22,5 @@ typedef int ogg_int32_t;
|
|||
typedef unsigned int ogg_uint32_t;
|
||||
typedef short ogg_int16_t;
|
||||
typedef unsigned short ogg_uint16_t;
|
||||
typedef unsigned char ogg_uint8_t;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,37 +1,3 @@
|
|||
@ Tremolo library
|
||||
@-----------------------------------------------------------------------
|
||||
@ Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
@ All rights reserved.
|
||||
|
||||
@ Redistribution and use in source and binary forms, with or without
|
||||
@ modification, are permitted provided that the following conditions
|
||||
@ are met:
|
||||
|
||||
@ * Redistributions of source code must retain the above copyright
|
||||
@ notice, this list of conditions and the following disclaimer.
|
||||
@ * Redistributions in binary form must reproduce the above
|
||||
@ copyright notice, this list of conditions and the following disclaimer
|
||||
@ in the documentation and/or other materials provided with the
|
||||
@ distribution.
|
||||
@ * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
@ Productions Ltd nor the names of its contributors may be used to
|
||||
@ endorse or promote products derived from this software without
|
||||
@ specific prior written permission.
|
||||
@
|
||||
@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ ----------------------------------------------------------------------
|
||||
|
||||
.text
|
||||
|
||||
.global decode_packed_entry_number
|
||||
|
|
@ -40,12 +6,6 @@
|
|||
.global vorbis_book_decodevv_add
|
||||
.global _checksum
|
||||
|
||||
.extern oggpack_adv
|
||||
.extern oggpack_look
|
||||
.extern oggpack_eop
|
||||
.extern crc_lookup
|
||||
.hidden crc_lookup
|
||||
|
||||
decode_packed_entry_number_REALSTART:
|
||||
dpen_nobits:
|
||||
MOV r0,r5 @ r0 = b
|
||||
|
|
@ -140,7 +100,7 @@ m1_loop:
|
|||
LDRNEB r14,[r6, r7] @ r14= t[chase]
|
||||
MOVEQ r14,#128
|
||||
ADC r12,r8, r6 @ r12= chase+bit+1+t
|
||||
LDRB r14,[r12,r14,LSR #7] @ r14= t[chase+bit+1+(!bit || t[chase]0x0x80)]
|
||||
LDRB r14,[r12,r14,LSR #7] @ r14= t[chase+bit+1+(!bit || t[chase]&0x80)]
|
||||
BIC r10,r10,#0x80 @ r3 = next &= ~0x80
|
||||
@ stall Xscale
|
||||
ORR r0, r14,r10,LSL #8 @ r7 = chase = (next<<8) | r14
|
||||
|
|
@ -198,8 +158,8 @@ m3_loop:
|
|||
CMP r8, r7 @ if bit==0 (chase+bit==chase) sets C
|
||||
LDRNEH r14,[r6, r7] @ r14= t[chase]
|
||||
MOVEQ r14,#0x8000
|
||||
ADC r12,r8, r14,LSR #15 @ r12= 1+((chase+bit)<<1)+(!bit || t[chase]0x0x8000)
|
||||
ADC r12,r12,r14,LSR #15 @ r12= t + (1+chase+bit+(!bit || t[chase]0x0x8000))<<1
|
||||
ADC r12,r8, r14,LSR #15 @ r12= 1+((chase+bit)<<1)+(!bit || t[chase]&0x8000)
|
||||
ADC r12,r12,r14,LSR #15 @ r12= t + (1+chase+bit+(!bit || t[chase]&0x8000))<<1
|
||||
LDRH r14,[r6, r12] @ r14= t[chase+bit+1
|
||||
BIC r10,r10,#0x8000 @ r3 = next &= ~0x8000
|
||||
@ stall Xscale
|
||||
|
|
@ -405,9 +365,9 @@ vorbis_book_decodevv_add:
|
|||
STMFD r13!,{r4-r11,R14}
|
||||
LDR r7, [r0, #13*4] @ r7 = used_entries
|
||||
MOV r9, r0 @ r9 = book
|
||||
MOV r10,r1 @ r10= 0xa[chptr] chptr=0
|
||||
MOV r10,r1 @ r10= &a[chptr] chptr=0
|
||||
MOV r6, r3 @ r6 = ch
|
||||
ADD r8, r10,r3, LSL #2 @ r8 = 0xa[ch]
|
||||
ADD r8, r10,r3, LSL #2 @ r8 = &a[ch]
|
||||
MOV r11,r2 @ r11= offset
|
||||
CMP r7, #0 @ if (used_entries <= 0)
|
||||
BLE vbdvva_exit @ exit
|
||||
|
|
@ -415,9 +375,9 @@ vorbis_book_decodevv_add:
|
|||
vbdvva_loop1:
|
||||
@ r5 = n
|
||||
@ r6 = ch
|
||||
@ r8 = 0xa[ch]
|
||||
@ r8 = &a[ch]
|
||||
@ r9 = book
|
||||
@ r10= 0xa[chptr]
|
||||
@ r10= &a[chptr]
|
||||
@ r11= offset
|
||||
MOV r0, r9 @ r0 = book
|
||||
LDR r1, [r13,# 9*4] @ r1 = b
|
||||
|
|
@ -434,7 +394,7 @@ vbdvva_loop2:
|
|||
LDR r12,[r1], #4 @ r1 = v[j++]
|
||||
CMP r10,r8 @ if (chptr == ch)
|
||||
SUBEQ r10,r10,r6, LSL #2 @ chptr = 0
|
||||
LDR r14,[r2, r11,LSL #2]! @ r2 = 0xa[chptr++][i] r14=[r12]
|
||||
LDR r14,[r2, r11,LSL #2]! @ r2 = &a[chptr++][i] r14=[r12]
|
||||
ADDEQ r11,r11,#1 @ i++
|
||||
SUBEQ r5, r5, #1 @ n--
|
||||
SUBS r0, r0, #1 @ r0--
|
||||
|
|
@ -455,9 +415,7 @@ _checksum:
|
|||
@ r1 = bytes
|
||||
STMFD r13!,{r5-r6,r14}
|
||||
|
||||
ADR r6,.Lcrc_lookup
|
||||
LDR r5,[r6]
|
||||
ADD r5,r6
|
||||
LDR r5,=crc_lookup
|
||||
MOV r14,#0 @ r14= crc_reg = 0
|
||||
MOVS r12,r0
|
||||
BEQ _cs_end
|
||||
|
|
@ -489,8 +447,3 @@ _cs_no_bytes:
|
|||
_cs_end:
|
||||
MOV r0,r14
|
||||
LDMFD r13!,{r5-r6,PC}
|
||||
|
||||
.Lcrc_lookup:
|
||||
.WORD crc_lookup-.Lcrc_lookup
|
||||
|
||||
@ END
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: PCM data vector blocking, windowing and dis/reassembly
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "ogg.h"
|
||||
|
|
@ -63,9 +43,10 @@ int vorbis_dsp_restart(vorbis_dsp_state *v){
|
|||
return 0;
|
||||
}
|
||||
|
||||
int vorbis_dsp_init(vorbis_dsp_state *v,vorbis_info *vi){
|
||||
vorbis_dsp_state *vorbis_dsp_create(vorbis_info *vi){
|
||||
int i;
|
||||
|
||||
vorbis_dsp_state *v=_ogg_calloc(1,sizeof(*v));
|
||||
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
|
||||
|
||||
v->vi=vi;
|
||||
|
|
@ -83,16 +64,10 @@ int vorbis_dsp_init(vorbis_dsp_state *v,vorbis_info *vi){
|
|||
v->W=0; /* current window size */
|
||||
|
||||
vorbis_dsp_restart(v);
|
||||
return 0;
|
||||
}
|
||||
|
||||
vorbis_dsp_state *vorbis_dsp_create(vorbis_info *vi){
|
||||
vorbis_dsp_state *v=_ogg_calloc(1,sizeof(*v));
|
||||
vorbis_dsp_init(v,vi);
|
||||
return v;
|
||||
}
|
||||
|
||||
void vorbis_dsp_clear(vorbis_dsp_state *v){
|
||||
void vorbis_dsp_destroy(vorbis_dsp_state *v){
|
||||
int i;
|
||||
if(v){
|
||||
vorbis_info *vi=v->vi;
|
||||
|
|
@ -107,13 +82,10 @@ void vorbis_dsp_clear(vorbis_dsp_state *v){
|
|||
if(v->mdctright[i])_ogg_free(v->mdctright[i]);
|
||||
_ogg_free(v->mdctright);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void vorbis_dsp_destroy(vorbis_dsp_state *v){
|
||||
vorbis_dsp_clear(v);
|
||||
_ogg_free(v);
|
||||
}
|
||||
}
|
||||
|
||||
static LOOKUP_T *_vorbis_window(int left){
|
||||
switch(left){
|
||||
|
|
@ -291,10 +263,10 @@ int vorbis_dsp_synthesis(vorbis_dsp_state *vd,ogg_packet *op,int decodep){
|
|||
/* granulepos could be -1 due to a seek, but that would result
|
||||
in a long coun t, not short count */
|
||||
|
||||
vd->out_end-=(int)(vd->sample_count-vd->granulepos);
|
||||
vd->out_end-=vd->sample_count-vd->granulepos;
|
||||
}else{
|
||||
/* trim the beginning */
|
||||
vd->out_begin+=(int)(vd->sample_count-vd->granulepos);
|
||||
vd->out_begin+=vd->sample_count-vd->granulepos;
|
||||
if(vd->out_begin>vd->out_end)
|
||||
vd->out_begin=vd->out_end;
|
||||
}
|
||||
|
|
@ -308,7 +280,7 @@ int vorbis_dsp_synthesis(vorbis_dsp_state *vd,ogg_packet *op,int decodep){
|
|||
if(op->granulepos!=-1 && vd->granulepos!=op->granulepos){
|
||||
|
||||
if(vd->granulepos>op->granulepos){
|
||||
long extra=(long)(vd->granulepos-op->granulepos);
|
||||
long extra=vd->granulepos-op->granulepos;
|
||||
|
||||
if(extra)
|
||||
if(op->e_o_s){
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: floor backend 0 implementation
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -72,13 +52,13 @@ static inline ogg_int32_t vorbis_invsqlook_i(long a,long e){
|
|||
#ifdef _LOW_ACCURACY_
|
||||
static inline ogg_int32_t vorbis_fromdBlook_i(long a){
|
||||
if(a>0) return 0x7fffffff;
|
||||
if(a<(int)(((unsigned)-140)<<12)) return 0;
|
||||
if(a<(-140<<12)) return 0;
|
||||
return FLOOR_fromdB_LOOKUP[((a+140)*467)>>20]<<9;
|
||||
}
|
||||
#else
|
||||
static inline ogg_int32_t vorbis_fromdBlook_i(long a){
|
||||
if(a>0) return 0x7fffffff;
|
||||
if(a<(int)(((unsigned)-140)<<12)) return 0;
|
||||
if(a<(-140<<12)) return 0;
|
||||
return FLOOR_fromdB_LOOKUP[((a+(140<<12))*467)>>20];
|
||||
}
|
||||
#endif
|
||||
|
|
@ -380,7 +360,7 @@ vorbis_info_floor *floor0_info_unpack (vorbis_info *vi,oggpack_buffer *opb){
|
|||
if(info->barkmap<1)goto err_out;
|
||||
|
||||
for(j=0;j<info->numbooks;j++){
|
||||
info->books[j]=(char)oggpack_read(opb,8);
|
||||
info->books[j]=oggpack_read(opb,8);
|
||||
if(info->books[j]>=ci->books)goto err_out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: floor backend 1 implementation
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -53,7 +33,7 @@ extern const ogg_int32_t FLOOR_fromdB_LOOKUP[];
|
|||
void floor1_free_info(vorbis_info_floor *i){
|
||||
vorbis_info_floor1 *info=(vorbis_info_floor1 *)i;
|
||||
if(info){
|
||||
if(info->klass)_ogg_free(info->klass);
|
||||
if(info->class)_ogg_free(info->class);
|
||||
if(info->partitionclass)_ogg_free(info->partitionclass);
|
||||
if(info->postlist)_ogg_free(info->postlist);
|
||||
if(info->forward_index)_ogg_free(info->forward_index);
|
||||
|
|
@ -73,9 +53,9 @@ static int ilog(unsigned int v){
|
|||
return(ret);
|
||||
}
|
||||
|
||||
static void floor1_mergesort(ogg_uint8_t *index,ogg_uint16_t *vals,ogg_uint16_t n){
|
||||
static void mergesort(char *index,ogg_uint16_t *vals,ogg_uint16_t n){
|
||||
ogg_uint16_t i,j;
|
||||
ogg_uint8_t *temp,*A=index,*B=_ogg_malloc(n*sizeof(*B));
|
||||
char *temp,*A=index,*B=_ogg_malloc(n*sizeof(*B));
|
||||
|
||||
for(i=1;i<n;i<<=1){
|
||||
for(j=0;j+i<n;){
|
||||
|
|
@ -112,28 +92,28 @@ vorbis_info_floor *floor1_info_unpack (vorbis_info *vi,oggpack_buffer *opb){
|
|||
/* read partitions */
|
||||
info->partitions=oggpack_read(opb,5); /* only 0 to 31 legal */
|
||||
info->partitionclass=
|
||||
(ogg_uint8_t *)_ogg_malloc(info->partitions*sizeof(*info->partitionclass));
|
||||
(char *)_ogg_malloc(info->partitions*sizeof(*info->partitionclass));
|
||||
for(j=0;j<info->partitions;j++){
|
||||
info->partitionclass[j]=(char)oggpack_read(opb,4); /* only 0 to 15 legal */
|
||||
info->partitionclass[j]=oggpack_read(opb,4); /* only 0 to 15 legal */
|
||||
if(maxclass<info->partitionclass[j])maxclass=info->partitionclass[j];
|
||||
}
|
||||
|
||||
/* read partition classes */
|
||||
info->klass=
|
||||
(floor1class *)_ogg_malloc((maxclass+1)*sizeof(*info->klass));
|
||||
info->class=
|
||||
(floor1class *)_ogg_malloc((maxclass+1)*sizeof(*info->class));
|
||||
for(j=0;j<maxclass+1;j++){
|
||||
info->klass[j].class_dim=(char)oggpack_read(opb,3)+1; /* 1 to 8 */
|
||||
info->klass[j].class_subs=(char)oggpack_read(opb,2); /* 0,1,2,3 bits */
|
||||
info->class[j].class_dim=oggpack_read(opb,3)+1; /* 1 to 8 */
|
||||
info->class[j].class_subs=oggpack_read(opb,2); /* 0,1,2,3 bits */
|
||||
if(oggpack_eop(opb)<0) goto err_out;
|
||||
if(info->klass[j].class_subs)
|
||||
info->klass[j].class_book=(unsigned char)oggpack_read(opb,8);
|
||||
if(info->class[j].class_subs)
|
||||
info->class[j].class_book=oggpack_read(opb,8);
|
||||
else
|
||||
info->klass[j].class_book=0;
|
||||
if(info->klass[j].class_book>=ci->books)goto err_out;
|
||||
for(k=0;k<(1<<info->klass[j].class_subs);k++){
|
||||
info->klass[j].class_subbook[k]=(unsigned char)(oggpack_read(opb,8)-1);
|
||||
if(info->klass[j].class_subbook[k]>=ci->books &&
|
||||
info->klass[j].class_subbook[k]!=0xff)goto err_out;
|
||||
info->class[j].class_book=0;
|
||||
if(info->class[j].class_book>=ci->books)goto err_out;
|
||||
for(k=0;k<(1<<info->class[j].class_subs);k++){
|
||||
info->class[j].class_subbook[k]=oggpack_read(opb,8)-1;
|
||||
if(info->class[j].class_subbook[k]>=ci->books &&
|
||||
info->class[j].class_subbook[k]!=0xff)goto err_out;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -142,21 +122,21 @@ vorbis_info_floor *floor1_info_unpack (vorbis_info *vi,oggpack_buffer *opb){
|
|||
rangebits=oggpack_read(opb,4);
|
||||
|
||||
for(j=0,k=0;j<info->partitions;j++)
|
||||
count+=info->klass[info->partitionclass[j]].class_dim;
|
||||
count+=info->class[info->partitionclass[j]].class_dim;
|
||||
info->postlist=
|
||||
(ogg_uint16_t *)_ogg_malloc((count+2)*sizeof(*info->postlist));
|
||||
info->forward_index=
|
||||
(ogg_uint8_t *)_ogg_malloc((count+2)*sizeof(*info->forward_index));
|
||||
(char *)_ogg_malloc((count+2)*sizeof(*info->forward_index));
|
||||
info->loneighbor=
|
||||
(ogg_uint8_t *)_ogg_malloc(count*sizeof(*info->loneighbor));
|
||||
(char *)_ogg_malloc(count*sizeof(*info->loneighbor));
|
||||
info->hineighbor=
|
||||
(ogg_uint8_t *)_ogg_malloc(count*sizeof(*info->hineighbor));
|
||||
(char *)_ogg_malloc(count*sizeof(*info->hineighbor));
|
||||
|
||||
count=0;
|
||||
for(j=0,k=0;j<info->partitions;j++){
|
||||
count+=info->klass[info->partitionclass[j]].class_dim;
|
||||
count+=info->class[info->partitionclass[j]].class_dim;
|
||||
for(;k<count;k++){
|
||||
int t=info->postlist[k+2]=(ogg_uint16_t)oggpack_read(opb,rangebits);
|
||||
int t=info->postlist[k+2]=oggpack_read(opb,rangebits);
|
||||
if(t>=(1<<rangebits))goto err_out;
|
||||
}
|
||||
}
|
||||
|
|
@ -167,7 +147,7 @@ vorbis_info_floor *floor1_info_unpack (vorbis_info *vi,oggpack_buffer *opb){
|
|||
|
||||
/* also store a sorted position index */
|
||||
for(j=0;j<info->posts;j++)info->forward_index[j]=j;
|
||||
floor1_mergesort(info->forward_index,info->postlist,info->posts);
|
||||
mergesort(info->forward_index,info->postlist,info->posts);
|
||||
|
||||
/* discover our neighbors for decode where we don't use fit flags
|
||||
(that would push the neighbors outward) */
|
||||
|
|
@ -218,10 +198,6 @@ int render_point(int x0,int x1,int y0,int y1,int x){
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef ONLY_C
|
||||
void render_lineARM(int n, ogg_int32_t *d,const ogg_int32_t *floor, int base, int err, int adx, int ady);
|
||||
#endif
|
||||
|
||||
static void render_line(int n,int x0,int x1,int y0,int y1,ogg_int32_t *d){
|
||||
int dy;
|
||||
int adx;
|
||||
|
|
@ -232,9 +208,8 @@ static void render_line(int n,int x0,int x1,int y0,int y1,ogg_int32_t *d){
|
|||
|
||||
if(n>x1)n=x1;
|
||||
n -= x0;
|
||||
if (n <= 0 || y0 < 0 || y0 > 255 || y1 < 0 || y1 > 255) {
|
||||
if (n <= 0)
|
||||
return;
|
||||
}
|
||||
dy=y1-y0;
|
||||
adx=x1-x0;
|
||||
ady=abs(dy);
|
||||
|
|
@ -304,20 +279,20 @@ ogg_int32_t *floor1_inverse1(vorbis_dsp_state *vd,vorbis_info_floor *in,
|
|||
/* partition by partition */
|
||||
for(i=0,j=2;i<info->partitions;i++){
|
||||
int classv=info->partitionclass[i];
|
||||
int cdim=info->klass[classv].class_dim;
|
||||
int csubbits=info->klass[classv].class_subs;
|
||||
int cdim=info->class[classv].class_dim;
|
||||
int csubbits=info->class[classv].class_subs;
|
||||
int csub=1<<csubbits;
|
||||
int cval=0;
|
||||
|
||||
/* decode the partition's first stage cascade value */
|
||||
if(csubbits){
|
||||
cval=vorbis_book_decode(books+info->klass[classv].class_book,&vd->opb);
|
||||
cval=vorbis_book_decode(books+info->class[classv].class_book,&vd->opb);
|
||||
|
||||
if(cval==-1)goto eop;
|
||||
}
|
||||
|
||||
for(k=0;k<cdim;k++){
|
||||
int book=info->klass[classv].class_subbook[cval&(csub-1)];
|
||||
int book=info->class[classv].class_subbook[cval&(csub-1)];
|
||||
cval>>=csubbits;
|
||||
if(book!=0xff){
|
||||
if((fit_value[j+k]=vorbis_book_decode(books+book,&vd->opb))==-1)
|
||||
|
|
|
|||
|
|
@ -1,37 +1,3 @@
|
|||
@ Tremolo library
|
||||
@-----------------------------------------------------------------------
|
||||
@ Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
@ All rights reserved.
|
||||
|
||||
@ Redistribution and use in source and binary forms, with or without
|
||||
@ modification, are permitted provided that the following conditions
|
||||
@ are met:
|
||||
|
||||
@ * Redistributions of source code must retain the above copyright
|
||||
@ notice, this list of conditions and the following disclaimer.
|
||||
@ * Redistributions in binary form must reproduce the above
|
||||
@ copyright notice, this list of conditions and the following disclaimer
|
||||
@ in the documentation and/or other materials provided with the
|
||||
@ distribution.
|
||||
@ * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
@ Productions Ltd nor the names of its contributors may be used to
|
||||
@ endorse or promote products derived from this software without
|
||||
@ specific prior written permission.
|
||||
@
|
||||
@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ ----------------------------------------------------------------------
|
||||
|
||||
.text
|
||||
|
||||
.global render_lineARM
|
||||
|
|
@ -63,5 +29,3 @@ rl_loop:
|
|||
BGT rl_loop
|
||||
|
||||
LDMFD r13!,{r4-r6,r11,PC}
|
||||
|
||||
@ END
|
||||
|
|
|
|||
|
|
@ -1,37 +1,3 @@
|
|||
@ Tremolo library
|
||||
@-----------------------------------------------------------------------
|
||||
@ Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
@ All rights reserved.
|
||||
|
||||
@ Redistribution and use in source and binary forms, with or without
|
||||
@ modification, are permitted provided that the following conditions
|
||||
@ are met:
|
||||
|
||||
@ * Redistributions of source code must retain the above copyright
|
||||
@ notice, this list of conditions and the following disclaimer.
|
||||
@ * Redistributions in binary form must reproduce the above
|
||||
@ copyright notice, this list of conditions and the following disclaimer
|
||||
@ in the documentation and/or other materials provided with the
|
||||
@ distribution.
|
||||
@ * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
@ Productions Ltd nor the names of its contributors may be used to
|
||||
@ endorse or promote products derived from this software without
|
||||
@ specific prior written permission.
|
||||
@
|
||||
@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ ----------------------------------------------------------------------
|
||||
|
||||
.text
|
||||
|
||||
.global render_lineARM
|
||||
|
|
@ -62,5 +28,3 @@ rl_loop:
|
|||
BGT rl_loop
|
||||
|
||||
LDMFD r13!,{r4-r6,r11,PC}
|
||||
|
||||
@ END
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: floor dB lookup
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include "os.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,35 +1,15 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: decode Ogg streams back into raw packets
|
||||
|
||||
|
|
@ -37,7 +17,7 @@
|
|||
Ross Williams (ross@guest.adelaide.edu.au). See docs/framing.html
|
||||
for details.
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -577,11 +557,6 @@ ogg_uint32_t crc_lookup[256]={
|
|||
0xafb010b1,0xab710d06,0xa6322bdf,0xa2f33668,
|
||||
0xbcb4666d,0xb8757bda,0xb5365d03,0xb1f740b4};
|
||||
|
||||
void ogg_sync_init(ogg_sync_state *oy){
|
||||
memset(oy,0,sizeof(*oy));
|
||||
oy->bufferpool=ogg_buffer_create();
|
||||
}
|
||||
|
||||
ogg_sync_state *ogg_sync_create(void){
|
||||
ogg_sync_state *oy=_ogg_calloc(1,sizeof(*oy));
|
||||
memset(oy,0,sizeof(*oy));
|
||||
|
|
@ -589,15 +564,6 @@ ogg_sync_state *ogg_sync_create(void){
|
|||
return oy;
|
||||
}
|
||||
|
||||
int ogg_sync_clear(ogg_sync_state *oy){
|
||||
if(oy){
|
||||
ogg_sync_reset(oy);
|
||||
ogg_buffer_destroy(oy->bufferpool);
|
||||
memset(oy,0,sizeof(*oy));
|
||||
}
|
||||
return OGG_SUCCESS;
|
||||
}
|
||||
|
||||
int ogg_sync_destroy(ogg_sync_state *oy){
|
||||
if(oy){
|
||||
ogg_sync_reset(oy);
|
||||
|
|
@ -661,9 +627,7 @@ int ogg_sync_wrote(ogg_sync_state *oy, long bytes){
|
|||
return OGG_SUCCESS;
|
||||
}
|
||||
|
||||
#ifndef ONLY_C
|
||||
ogg_uint32_t _checksum(ogg_reference *or, int bytes);
|
||||
#else
|
||||
#ifdef ONLY_C
|
||||
static ogg_uint32_t _checksum(ogg_reference *or, int bytes){
|
||||
ogg_uint32_t crc_reg=0;
|
||||
int j,post;
|
||||
|
|
@ -849,12 +813,6 @@ int ogg_sync_reset(ogg_sync_state *oy){
|
|||
return OGG_SUCCESS;
|
||||
}
|
||||
|
||||
void ogg_stream_init(ogg_stream_state *os, int serialno){
|
||||
memset(os, 0, sizeof(*os));
|
||||
os->serialno=serialno;
|
||||
os->pageno=-1;
|
||||
}
|
||||
|
||||
ogg_stream_state *ogg_stream_create(int serialno){
|
||||
ogg_stream_state *os=_ogg_calloc(1,sizeof(*os));
|
||||
os->serialno=serialno;
|
||||
|
|
@ -862,15 +820,6 @@ ogg_stream_state *ogg_stream_create(int serialno){
|
|||
return os;
|
||||
}
|
||||
|
||||
int ogg_stream_clear(ogg_stream_state *os){
|
||||
if(os){
|
||||
ogg_buffer_release(os->header_tail);
|
||||
ogg_buffer_release(os->body_tail);
|
||||
memset(os,0,sizeof(*os));
|
||||
}
|
||||
return OGG_SUCCESS;
|
||||
}
|
||||
|
||||
int ogg_stream_destroy(ogg_stream_state *os){
|
||||
if(os){
|
||||
ogg_buffer_release(os->header_tail);
|
||||
|
|
@ -999,11 +948,11 @@ int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){
|
|||
|
||||
/* check the serial number */
|
||||
if(serialno!=os->serialno){
|
||||
//ogg_page_release(og);
|
||||
ogg_page_release(og);
|
||||
return OGG_ESERIAL;
|
||||
}
|
||||
if(version>0){
|
||||
//ogg_page_release(og);
|
||||
ogg_page_release(og);
|
||||
return OGG_EVERSION;
|
||||
}
|
||||
|
||||
|
|
|
|||
97
sources/tremolo/Tremolo/treminfo.c → sources/tremolo/Tremolo/info.c
Normal file → Executable file
97
sources/tremolo/Tremolo/treminfo.c → sources/tremolo/Tremolo/info.c
Normal file → Executable file
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: maintain the info structure, info <-> header packets
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
/* general handling of the header and the vorbis_info structure (and
|
||||
substructures) */
|
||||
|
|
@ -51,7 +31,7 @@
|
|||
/* helpers */
|
||||
static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){
|
||||
while(bytes--){
|
||||
*buf++=(char)oggpack_read(o,8);
|
||||
*buf++=oggpack_read(o,8);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +156,7 @@ void vorbis_info_clear(vorbis_info *vi){
|
|||
|
||||
/* Header packing/unpacking ********************************************/
|
||||
|
||||
int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){
|
||||
static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){
|
||||
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
|
||||
if(!ci)return(OV_EFAULT);
|
||||
|
||||
|
|
@ -213,29 +193,22 @@ int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){
|
|||
return(OV_EBADHEADER);
|
||||
}
|
||||
|
||||
int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){
|
||||
static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){
|
||||
int i;
|
||||
int vendorlen=oggpack_read(opb,32);
|
||||
if(vendorlen<0)goto err_out;
|
||||
vc->vendor=(char *)_ogg_calloc(vendorlen+1,1);
|
||||
if(!vc->vendor)goto err_out;
|
||||
_v_readstring(opb,vc->vendor,vendorlen);
|
||||
vc->comments=oggpack_read(opb,32);
|
||||
if(vc->comments<0)goto err_out;
|
||||
vc->user_comments=(char **)_ogg_calloc(vc->comments+1,sizeof(*vc->user_comments));
|
||||
if (!vc->user_comments){
|
||||
vc->comments=0;
|
||||
goto err_out;
|
||||
}
|
||||
vc->comment_lengths=(int *)_ogg_calloc(vc->comments+1, sizeof(*vc->comment_lengths));
|
||||
if (!vc->comment_lengths)goto err_out;
|
||||
|
||||
for(i=0;i<vc->comments;i++){
|
||||
int len=oggpack_read(opb,32);
|
||||
if(len<0)goto err_out;
|
||||
vc->comment_lengths[i]=len;
|
||||
vc->user_comments[i]=(char *)_ogg_calloc(len+1,1);
|
||||
if(!vc->user_comments[i])goto err_out;
|
||||
_v_readstring(opb,vc->user_comments[i],len);
|
||||
}
|
||||
if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */
|
||||
|
|
@ -248,7 +221,7 @@ int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){
|
|||
|
||||
/* all of the real encoding details are here. The modes, books,
|
||||
everything */
|
||||
int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
|
||||
static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
|
||||
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
|
||||
int i;
|
||||
if(!ci)return(OV_EFAULT);
|
||||
|
|
@ -256,10 +229,6 @@ int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
|
|||
/* codebooks */
|
||||
ci->books=oggpack_read(opb,8)+1;
|
||||
ci->book_param=(codebook *)_ogg_calloc(ci->books,sizeof(*ci->book_param));
|
||||
if(!ci->book_param){
|
||||
ci->books=0;
|
||||
goto err_out;
|
||||
}
|
||||
for(i=0;i<ci->books;i++)
|
||||
if(vorbis_book_unpack(opb,ci->book_param+i))goto err_out;
|
||||
|
||||
|
|
@ -270,14 +239,10 @@ int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
|
|||
|
||||
/* floor backend settings */
|
||||
ci->floors=oggpack_read(opb,6)+1;
|
||||
ci->floor_param=_ogg_calloc(ci->floors, sizeof(*ci->floor_param));
|
||||
ci->floor_type=_ogg_calloc(ci->floors, sizeof(*ci->floor_type));
|
||||
if(!ci->floor_param || !ci->floor_type){
|
||||
ci->floors=0;
|
||||
goto err_out;
|
||||
}
|
||||
ci->floor_param=_ogg_malloc(sizeof(*ci->floor_param)*ci->floors);
|
||||
ci->floor_type=_ogg_malloc(sizeof(*ci->floor_type)*ci->floors);
|
||||
for(i=0;i<ci->floors;i++){
|
||||
ci->floor_type[i]=(char)oggpack_read(opb,16);
|
||||
ci->floor_type[i]=oggpack_read(opb,16);
|
||||
if(ci->floor_type[i]<0 || ci->floor_type[i]>=VI_FLOORB)goto err_out;
|
||||
if(ci->floor_type[i])
|
||||
ci->floor_param[i]=floor1_info_unpack(vi,opb);
|
||||
|
|
@ -288,21 +253,13 @@ int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
|
|||
|
||||
/* residue backend settings */
|
||||
ci->residues=oggpack_read(opb,6)+1;
|
||||
ci->residue_param=_ogg_calloc(ci->residues, sizeof(*ci->residue_param));
|
||||
if (!ci->residue_param){
|
||||
ci->residues=0;
|
||||
goto err_out;
|
||||
}
|
||||
ci->residue_param=_ogg_malloc(sizeof(*ci->residue_param)*ci->residues);
|
||||
for(i=0;i<ci->residues;i++)
|
||||
if(res_unpack(ci->residue_param+i,vi,opb))goto err_out;
|
||||
|
||||
/* map backend settings */
|
||||
ci->maps=oggpack_read(opb,6)+1;
|
||||
ci->map_param=_ogg_calloc(ci->maps, sizeof(*ci->map_param));
|
||||
if (!ci->map_param){
|
||||
ci->maps=0;
|
||||
goto err_out;
|
||||
}
|
||||
ci->map_param=_ogg_malloc(sizeof(*ci->map_param)*ci->maps);
|
||||
for(i=0;i<ci->maps;i++){
|
||||
if(oggpack_read(opb,16)!=0)goto err_out;
|
||||
if(mapping_info_unpack(ci->map_param+i,vi,opb))goto err_out;
|
||||
|
|
@ -311,16 +268,12 @@ int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
|
|||
/* mode settings */
|
||||
ci->modes=oggpack_read(opb,6)+1;
|
||||
ci->mode_param=
|
||||
(vorbis_info_mode *)_ogg_calloc(ci->modes, sizeof(*ci->mode_param));
|
||||
if (!ci->mode_param){
|
||||
ci->modes=0;
|
||||
goto err_out;
|
||||
}
|
||||
(vorbis_info_mode *)_ogg_malloc(ci->modes*sizeof(*ci->mode_param));
|
||||
for(i=0;i<ci->modes;i++){
|
||||
ci->mode_param[i].blockflag=(unsigned char)oggpack_read(opb,1);
|
||||
ci->mode_param[i].blockflag=oggpack_read(opb,1);
|
||||
if(oggpack_read(opb,16))goto err_out;
|
||||
if(oggpack_read(opb,16))goto err_out;
|
||||
ci->mode_param[i].mapping=(unsigned char)oggpack_read(opb,8);
|
||||
ci->mode_param[i].mapping=oggpack_read(opb,8);
|
||||
if(ci->mode_param[i].mapping>=ci->maps)goto err_out;
|
||||
}
|
||||
|
||||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: libvorbis codec headers
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#ifndef _vorbis_codec_h_
|
||||
#define _vorbis_codec_h_
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: stdio-based convenience library for opening/seeking/decoding
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#ifndef _OV_FILE_H_
|
||||
#define _OV_FILE_H_
|
||||
|
|
|
|||
|
|
@ -0,0 +1,86 @@
|
|||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: simple example decoder using vorbisidec
|
||||
|
||||
********************************************************************/
|
||||
|
||||
/* Takes a vorbis bitstream from stdin and writes raw stereo PCM to
|
||||
stdout using vorbisfile. Using vorbisfile is much simpler than
|
||||
dealing with libvorbis. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "ivorbiscodec.h"
|
||||
#include "ivorbisfile.h"
|
||||
|
||||
#ifdef _WIN32 /* We need the following two to set stdin/stdout to binary */
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
char pcmout[4096]; /* take 4k out of the data segment, not the stack */
|
||||
|
||||
int main(){
|
||||
OggVorbis_File vf;
|
||||
int eof=0;
|
||||
int current_section;
|
||||
|
||||
#ifdef _WIN32 /* We need to set stdin/stdout to binary mode. Damn windows. */
|
||||
/* Beware the evil ifdef. We avoid these where we can, but this one we
|
||||
cannot. Don't add any more, you'll probably go to hell if you do. */
|
||||
_setmode( _fileno( stdin ), _O_BINARY );
|
||||
_setmode( _fileno( stdout ), _O_BINARY );
|
||||
#endif
|
||||
|
||||
if(ov_open(stdin, &vf, NULL, 0) < 0) {
|
||||
fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Throw the comments plus a few lines about the bitstream we're
|
||||
decoding */
|
||||
{
|
||||
char **ptr=ov_comment(&vf,-1)->user_comments;
|
||||
vorbis_info *vi=ov_info(&vf,-1);
|
||||
while(*ptr){
|
||||
fprintf(stderr,"%s\n",*ptr);
|
||||
++ptr;
|
||||
}
|
||||
fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate);
|
||||
fprintf(stderr,"\nDecoded length: %ld samples\n",
|
||||
(long)ov_pcm_total(&vf,-1));
|
||||
fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
|
||||
}
|
||||
|
||||
while(!eof){
|
||||
long ret=ov_read(&vf,pcmout,sizeof(pcmout),¤t_section);
|
||||
if (ret == 0) {
|
||||
/* EOF */
|
||||
eof=1;
|
||||
} else if (ret < 0) {
|
||||
/* error in the stream. Not a problem, just reporting it in
|
||||
case we (the app) cares. In this case, we don't. */
|
||||
} else {
|
||||
/* we don't bother dealing with sample rate changes, etc, but
|
||||
you'll have to*/
|
||||
fwrite(pcmout,1,ret,stdout);
|
||||
}
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
ov_clear(&vf);
|
||||
|
||||
fprintf(stderr,"Done.\n");
|
||||
return(0);
|
||||
}
|
||||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: lookup data
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#ifndef _V_LOOKUP_DATA_H_
|
||||
#define _V_LOOKUP_DATA_H_
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: channel mapping 0 implementation
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -84,8 +64,8 @@ int mapping_info_unpack(vorbis_info_mapping *info,vorbis_info *vi,
|
|||
_ogg_malloc(info->coupling_steps*sizeof(*info->coupling));
|
||||
|
||||
for(i=0;i<info->coupling_steps;i++){
|
||||
int testM=info->coupling[i].mag=(unsigned char)(oggpack_read(opb,ilog(vi->channels)));
|
||||
int testA=info->coupling[i].ang=(unsigned char)(oggpack_read(opb,ilog(vi->channels)));
|
||||
int testM=info->coupling[i].mag=oggpack_read(opb,ilog(vi->channels));
|
||||
int testA=info->coupling[i].ang=oggpack_read(opb,ilog(vi->channels));
|
||||
|
||||
if(testM<0 ||
|
||||
testA<0 ||
|
||||
|
|
@ -101,7 +81,7 @@ int mapping_info_unpack(vorbis_info_mapping *info,vorbis_info *vi,
|
|||
if(info->submaps>1){
|
||||
info->chmuxlist=_ogg_malloc(sizeof(*info->chmuxlist)*vi->channels);
|
||||
for(i=0;i<vi->channels;i++){
|
||||
info->chmuxlist[i]=(unsigned char)(oggpack_read(opb,4));
|
||||
info->chmuxlist[i]=oggpack_read(opb,4);
|
||||
if(info->chmuxlist[i]>=info->submaps)goto err_out;
|
||||
}
|
||||
}
|
||||
|
|
@ -109,9 +89,9 @@ int mapping_info_unpack(vorbis_info_mapping *info,vorbis_info *vi,
|
|||
info->submaplist=_ogg_malloc(sizeof(*info->submaplist)*info->submaps);
|
||||
for(i=0;i<info->submaps;i++){
|
||||
int temp=oggpack_read(opb,8);
|
||||
info->submaplist[i].floor=(char)oggpack_read(opb,8);
|
||||
info->submaplist[i].floor=oggpack_read(opb,8);
|
||||
if(info->submaplist[i].floor>=ci->floors)goto err_out;
|
||||
info->submaplist[i].residue=(char)oggpack_read(opb,8);
|
||||
info->submaplist[i].residue=oggpack_read(opb,8);
|
||||
if(info->submaplist[i].residue>=ci->residues)goto err_out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,35 +1,15 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: normalized modified discrete cosine transform
|
||||
power of two length transform only [64 <= n ]
|
||||
|
|
@ -50,7 +30,7 @@
|
|||
happen to like the properties of y=sin(.5PI*sin^2(x)), but others may
|
||||
vehemently disagree.
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include "ivorbiscodec.h"
|
||||
#include "os.h"
|
||||
|
|
@ -426,7 +406,7 @@ void mdct_backward(int n, DATA_TYPE *in){
|
|||
mdct_step8(in,n,step>>2);
|
||||
#else
|
||||
step = mdct_backwardARM(n, in);
|
||||
if (step <= 1)
|
||||
if (step < 1)
|
||||
mdct_step8(in,n,step);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: modified discrete cosine transform prototypes
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#ifndef _OGG_mdct_H_
|
||||
#define _OGG_mdct_H_
|
||||
|
|
|
|||
|
|
@ -1,37 +1,3 @@
|
|||
@ Tremolo library
|
||||
@-----------------------------------------------------------------------
|
||||
@ Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
@ All rights reserved.
|
||||
|
||||
@ Redistribution and use in source and binary forms, with or without
|
||||
@ modification, are permitted provided that the following conditions
|
||||
@ are met:
|
||||
|
||||
@ * Redistributions of source code must retain the above copyright
|
||||
@ notice, this list of conditions and the following disclaimer.
|
||||
@ * Redistributions in binary form must reproduce the above
|
||||
@ copyright notice, this list of conditions and the following disclaimer
|
||||
@ in the documentation and/or other materials provided with the
|
||||
@ distribution.
|
||||
@ * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
@ Productions Ltd nor the names of its contributors may be used to
|
||||
@ endorse or promote products derived from this software without
|
||||
@ specific prior written permission.
|
||||
@
|
||||
@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ ----------------------------------------------------------------------
|
||||
|
||||
.text
|
||||
|
||||
@ full accuracy version
|
||||
|
|
@ -43,11 +9,6 @@
|
|||
.global mdct_unroll_part3
|
||||
.global mdct_unroll_postlap
|
||||
|
||||
.extern sincos_lookup0
|
||||
.extern sincos_lookup1
|
||||
.hidden sincos_lookup0
|
||||
.hidden sincos_lookup1
|
||||
|
||||
mdct_unroll_prelap:
|
||||
@ r0 = out
|
||||
@ r1 = post
|
||||
|
|
@ -312,9 +273,7 @@ find_shift_loop:
|
|||
ADD r4, r1, r0, LSL #1 @ r4 = aX = in+(n>>1)
|
||||
ADD r14,r1, r0 @ r14= in+(n>>2)
|
||||
SUB r4, r4, #3*4 @ r4 = aX = in+n2-3
|
||||
ADRL r7, .Lsincos_lookup
|
||||
LDR r5, [r7] @ r5 = T=sincos_lookup0
|
||||
ADD r5, r7
|
||||
LDR r5, =sincos_lookup0 @ r5 = T=sincos_lookup0
|
||||
|
||||
presymmetry_loop1:
|
||||
LDR r7, [r4,#8] @ r6 = s2 = aX[2]
|
||||
|
|
@ -322,7 +281,7 @@ presymmetry_loop1:
|
|||
LDR r6, [r4] @ r6 = s0 = aX[0]
|
||||
LDR r10,[r5],r2,LSL #2 @ r10= T[0] T += step
|
||||
|
||||
@ XPROD31(s0, s2, T[0], T[1], 0xaX[0], &ax[2])
|
||||
@ XPROD31(s0, s2, T[0], T[1], &aX[0], &ax[2])
|
||||
SMULL r8, r9, r7, r11 @ (r8, r9) = s2*T[1]
|
||||
@ stall
|
||||
@ stall ?
|
||||
|
|
@ -346,7 +305,7 @@ presymmetry_loop2:
|
|||
LDR r7,[r4,#8] @ r6 = s2 = aX[2]
|
||||
LDR r11,[r5],-r2,LSL #2 @ r11= T[0] T -= step
|
||||
|
||||
@ XPROD31(s0, s2, T[1], T[0], 0xaX[0], &ax[2])
|
||||
@ XPROD31(s0, s2, T[1], T[0], &aX[0], &ax[2])
|
||||
SMULL r8, r9, r6, r10 @ (r8, r9) = s0*T[1]
|
||||
@ stall
|
||||
@ stall ?
|
||||
|
|
@ -369,9 +328,7 @@ presymmetry_loop2:
|
|||
@ r2 = step
|
||||
@ r3 = shift
|
||||
STMFD r13!,{r3}
|
||||
ADRL r4, .Lsincos_lookup
|
||||
LDR r5, [r4] @ r5 = T=sincos_lookup0
|
||||
ADD r5, r4
|
||||
LDR r5, =sincos_lookup0 @ r5 = T=sincos_lookup0
|
||||
ADD r4, r1, r0, LSL #1 @ r4 = aX = in+(n>>1)
|
||||
SUB r4, r4, #4*4 @ r4 = aX = in+(n>>1)-4
|
||||
LDR r11,[r5,#4] @ r11= T[1]
|
||||
|
|
@ -381,7 +338,7 @@ presymmetry_loop3:
|
|||
LDR r9,[r1,#8-16] @ r9 = ro2 = bX[2]
|
||||
LDR r6,[r4] @ r6 = ri0 = aX[0]
|
||||
|
||||
@ XNPROD31( ro2, ro0, T[1], T[0], 0xaX[0], &aX[2] )
|
||||
@ XNPROD31( ro2, ro0, T[1], T[0], &aX[0], &aX[2] )
|
||||
@ aX[0] = (ro2*T[1] - ro0*T[0])>>31 aX[2] = (ro0*T[1] + ro2*T[0])>>31
|
||||
SMULL r14,r12,r8, r11 @ (r14,r12) = ro0*T[1]
|
||||
RSB r8,r8,#0 @ r8 = -ro0
|
||||
|
|
@ -398,7 +355,7 @@ presymmetry_loop3:
|
|||
MOV r3, r3, LSL #1
|
||||
STR r3, [r4],#-16
|
||||
|
||||
@ XNPROD31( ri2, ri0, T[0], T[1], 0xbX[0], &bX[2] )
|
||||
@ XNPROD31( ri2, ri0, T[0], T[1], &bX[0], &bX[2] )
|
||||
@ bX[0] = (ri2*T[0] - ri0*T[1])>>31 bX[2] = (ri0*T[0] + ri2*T[1])>>31
|
||||
SMULL r14,r12,r6, r10 @ (r14,r12) = ri0*T[0]
|
||||
RSB r6,r6,#0 @ r6 = -ri0
|
||||
|
|
@ -428,10 +385,8 @@ presymmetry_loop3:
|
|||
@ r2 = i
|
||||
@ r3 = shift
|
||||
STMFD r13!,{r0-r1}
|
||||
ADRL r4, .Lsincos_lookup
|
||||
LDR r5, [r4]
|
||||
ADD r5, r4
|
||||
RSBS r4,r3,#6 @ r4 = stages = 7-shift then --stages
|
||||
LDR r5,=sincos_lookup0
|
||||
BLE no_generics
|
||||
MOV r14,#4 @ r14= 4 (i=0)
|
||||
MOV r6, r14,LSL r3 @ r6 = (4<<i)<<shift
|
||||
|
|
@ -993,7 +948,7 @@ mdct_bufferflies_loop3:
|
|||
LDMFD r13,{r0-r3}
|
||||
|
||||
mdct_bitreverseARM:
|
||||
@ r0 = points = n
|
||||
@ r0 = points
|
||||
@ r1 = in
|
||||
@ r2 = step
|
||||
@ r3 = shift
|
||||
|
|
@ -1030,10 +985,8 @@ brev_lp:
|
|||
@ r3 = shift
|
||||
|
||||
CMP r2, #4 @ r5 = T = (step>=4) ?
|
||||
ADR r7, .Lsincos_lookup @ sincos_lookup0 +
|
||||
ADDLT r7, #4 @ sincos_lookup1
|
||||
LDR r5, [r7]
|
||||
ADD r5, r7
|
||||
LDRGE r5, =sincos_lookup0 @ sincos_lookup0 +
|
||||
LDRLT r5, =sincos_lookup1 @ sincos_lookup0 +
|
||||
ADD r7, r1, r0, LSL #1 @ r7 = w1 = x + (n>>1)
|
||||
ADDGE r5, r5, r2, LSL #1 @ (step>>1)
|
||||
ADD r8, r5, #1024*4 @ r8 = Ttop
|
||||
|
|
@ -1124,10 +1077,8 @@ step7_loop2:
|
|||
|
||||
@ step > 1 (default case)
|
||||
CMP r2, #4 @ r5 = T = (step>=4) ?
|
||||
ADR r7, .Lsincos_lookup @ sincos_lookup0 +
|
||||
ADDLT r7, #4 @ sincos_lookup1
|
||||
LDR r5, [r7]
|
||||
ADD r5, r7
|
||||
LDRGE r5, =sincos_lookup0 @ sincos_lookup0 +
|
||||
LDRLT r5, =sincos_lookup1 @ sincos_lookup1
|
||||
ADD r7, r1, r0, LSL #1 @ r7 = iX = x + (n>>1)
|
||||
ADDGE r5, r5, r2, LSL #1 @ (step>>1)
|
||||
mdct_step8_default:
|
||||
|
|
@ -1226,9 +1177,3 @@ bitrev:
|
|||
.byte 47
|
||||
.byte 31
|
||||
.byte 63
|
||||
|
||||
.Lsincos_lookup:
|
||||
.word sincos_lookup0-.Lsincos_lookup
|
||||
.word sincos_lookup1-(.Lsincos_lookup+4)
|
||||
|
||||
@ END
|
||||
|
|
|
|||
|
|
@ -1,37 +1,3 @@
|
|||
@ Tremolo library
|
||||
@-----------------------------------------------------------------------
|
||||
@ Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
@ Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
@ All rights reserved.
|
||||
|
||||
@ Redistribution and use in source and binary forms, with or without
|
||||
@ modification, are permitted provided that the following conditions
|
||||
@ are met:
|
||||
|
||||
@ * Redistributions of source code must retain the above copyright
|
||||
@ notice, this list of conditions and the following disclaimer.
|
||||
@ * Redistributions in binary form must reproduce the above
|
||||
@ copyright notice, this list of conditions and the following disclaimer
|
||||
@ in the documentation and/or other materials provided with the
|
||||
@ distribution.
|
||||
@ * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
@ Productions Ltd nor the names of its contributors may be used to
|
||||
@ endorse or promote products derived from this software without
|
||||
@ specific prior written permission.
|
||||
@
|
||||
@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
@ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
@ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ ----------------------------------------------------------------------
|
||||
|
||||
.text
|
||||
|
||||
@ low accuracy version
|
||||
|
|
@ -43,9 +9,6 @@
|
|||
.global mdct_unroll_part3
|
||||
.global mdct_unroll_postlap
|
||||
|
||||
.extern sincos_lookup0
|
||||
.extern sincos_lookup1
|
||||
|
||||
mdct_unroll_prelap:
|
||||
@ r0 = out
|
||||
@ r1 = post
|
||||
|
|
@ -323,7 +286,7 @@ presymmetry_loop1:
|
|||
MOV r6, r6, ASR #8
|
||||
MOV r7, r7, ASR #8
|
||||
|
||||
@ XPROD31(s0, s2, T[0], T[1], 0xaX[0], &ax[2])
|
||||
@ XPROD31(s0, s2, T[0], T[1], &aX[0], &ax[2])
|
||||
MUL r9, r6, r10 @ r9 = s0*T[0]
|
||||
RSB r6, r6, #0
|
||||
MLA r9, r7, r11,r9 @ r9 += s2*T[1]
|
||||
|
|
@ -343,7 +306,7 @@ presymmetry_loop2:
|
|||
MOV r6, r6, ASR #8
|
||||
MOV r7, r7, ASR #8
|
||||
|
||||
@ XPROD31(s0, s2, T[1], T[0], 0xaX[0], &ax[2])
|
||||
@ XPROD31(s0, s2, T[1], T[0], &aX[0], &ax[2])
|
||||
MUL r9, r6, r10 @ r9 = s0*T[1]
|
||||
RSB r6, r6, #0
|
||||
MLA r9, r7, r11,r9 @ r9 += s2*T[0]
|
||||
|
|
@ -374,7 +337,7 @@ presymmetry_loop3:
|
|||
MOV r9, r9, ASR #8
|
||||
MOV r6, r6, ASR #8
|
||||
|
||||
@ XNPROD31( ro2, ro0, T[1], T[0], 0xaX[0], &aX[2] )
|
||||
@ XNPROD31( ro2, ro0, T[1], T[0], &aX[0], &aX[2] )
|
||||
@ aX[0] = (ro2*T[1] - ro0*T[0])>>31 aX[2] = (ro0*T[1] + ro2*T[0])>>31
|
||||
MUL r12,r8, r11 @ r12 = ro0*T[1]
|
||||
MOV r7, r7, ASR #8
|
||||
|
|
@ -387,7 +350,7 @@ presymmetry_loop3:
|
|||
STR r12,[r4,#16+8]
|
||||
STR r3, [r4,#16]
|
||||
|
||||
@ XNPROD31( ri2, ri0, T[0], T[1], 0xbX[0], &bX[2] )
|
||||
@ XNPROD31( ri2, ri0, T[0], T[1], &bX[0], &bX[2] )
|
||||
@ bX[0] = (ri2*T[0] - ri0*T[1])>>31 bX[2] = (ri0*T[0] + ri2*T[1])>>31
|
||||
MUL r12,r6, r10 @ r12 = ri0*T[0]
|
||||
RSB r6, r6, #0 @ r6 = -ri0
|
||||
|
|
@ -987,7 +950,6 @@ mdct_bitreverseARM:
|
|||
MOV r4, #0 @ r4 = bit = 0
|
||||
ADD r5, r1, r0, LSL #1 @ r5 = w = x + (n>>1)
|
||||
ADR r6, bitrev
|
||||
SUB r3, r3, #2 @ r3 = shift -= 2
|
||||
SUB r5, r5, #8
|
||||
brev_lp:
|
||||
LDRB r7, [r6, r4, LSR #6]
|
||||
|
|
@ -996,7 +958,8 @@ brev_lp:
|
|||
ADD r4, r4, #1 @ bit++
|
||||
@ stall XScale
|
||||
ORR r7, r7, r8, LSL #6 @ r7 = bitrev[bit]
|
||||
ADD r9, r1, r7, LSR r3 @ r9 = xx = x + (b>>shift)
|
||||
MOV r7, r7, LSR r3
|
||||
ADD r9, r1, r7, LSL #2 @ r9 = xx = x + (b>>shift)
|
||||
CMP r5, r9 @ if (w > xx)
|
||||
LDR r10,[r5],#-8 @ r10 = w[0] w -= 2
|
||||
LDRGT r11,[r5,#12] @ r11 = w[1]
|
||||
|
|
@ -1013,7 +976,7 @@ brev_lp:
|
|||
@ r0 = points
|
||||
@ r1 = in
|
||||
@ r2 = step
|
||||
@ r3 = shift-2
|
||||
@ r3 = shift
|
||||
|
||||
CMP r2, #4 @ r5 = T = (step>=4) ?
|
||||
LDRGE r5, =sincos_lookup0 @ sincos_lookup0 +
|
||||
|
|
@ -1202,5 +1165,3 @@ bitrev:
|
|||
.byte 47
|
||||
.byte 31
|
||||
.byte 63
|
||||
|
||||
@ END
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: sin,cos lookup tables
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include "os_types.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,35 +1,14 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************/
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* by the XIPHOPHORUS Company http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************/
|
||||
|
||||
#define HEAD_ALIGN 64
|
||||
#include <stdlib.h>
|
||||
|
|
@ -37,7 +16,7 @@
|
|||
#include <stdio.h>
|
||||
#define MISC_C
|
||||
#include "misc.h"
|
||||
//#include <sys/time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
static void **pointers=NULL;
|
||||
static long *insertlist=NULL; /* We can't embed this in the pointer list;
|
||||
|
|
@ -136,7 +115,7 @@ static void *_insert(void *ptr,long bytes,char *file,long line){
|
|||
|
||||
global_bytes+=(bytes-HEAD_ALIGN);
|
||||
|
||||
return(void *)(((char *)ptr)+HEAD_ALIGN);
|
||||
return(ptr+HEAD_ALIGN);
|
||||
}
|
||||
|
||||
static void _ripremove(void *ptr){
|
||||
|
|
@ -209,7 +188,7 @@ void _VDBG_dump(void){
|
|||
extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line){
|
||||
bytes+=HEAD_ALIGN;
|
||||
if(ptr){
|
||||
ptr=(void *)(((char *)ptr)-HEAD_ALIGN);
|
||||
ptr-=HEAD_ALIGN;
|
||||
_ripremove(ptr);
|
||||
ptr=realloc(ptr,bytes);
|
||||
}else{
|
||||
|
|
@ -219,9 +198,9 @@ extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line){
|
|||
return _insert(ptr,bytes,file,line);
|
||||
}
|
||||
|
||||
extern void _VDBG_free(void *ptr){
|
||||
extern void _VDBG_free(void *ptr,char *file,long line){
|
||||
if(ptr){
|
||||
ptr=(void *)(((char *)ptr)-HEAD_ALIGN);
|
||||
ptr-=HEAD_ALIGN;
|
||||
_ripremove(ptr);
|
||||
free(ptr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: miscellaneous math and prototypes
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#ifndef _V_RANDOM_H_
|
||||
#define _V_RANDOM_H_
|
||||
|
|
@ -45,7 +25,7 @@
|
|||
|
||||
#ifdef _VDBG_GRAPHFILE
|
||||
extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line);
|
||||
extern void _VDBG_free(void *ptr);
|
||||
extern void _VDBG_free(void *ptr,char *file,long line);
|
||||
|
||||
#undef _ogg_malloc
|
||||
#undef _ogg_calloc
|
||||
|
|
@ -55,7 +35,7 @@ extern void _VDBG_free(void *ptr);
|
|||
#define _ogg_malloc(x) _VDBG_malloc(NULL,(x),__FILE__,__LINE__)
|
||||
#define _ogg_calloc(x,y) _VDBG_malloc(NULL,(x)*(y),__FILE__,__LINE__)
|
||||
#define _ogg_realloc(x,y) _VDBG_malloc((x),(y),__FILE__,__LINE__)
|
||||
#define _ogg_free(x) _VDBG_free((x))
|
||||
#define _ogg_free(x) _VDBG_free((x),__FILE__,__LINE__)
|
||||
#endif
|
||||
|
||||
#include "asm_arm.h"
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: subsumed libogg includes
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
#ifndef _OGG_H
|
||||
#define _OGG_H
|
||||
|
||||
|
|
@ -177,14 +157,9 @@ extern long oggpack_bytes(oggpack_buffer *b);
|
|||
extern long oggpack_bits(oggpack_buffer *b);
|
||||
extern int oggpack_eop(oggpack_buffer *b);
|
||||
|
||||
// Quick hack
|
||||
#define oggpack_bytesleft(B) (((B)->bitsLeftInSegment+7)/8)
|
||||
|
||||
/* Ogg BITSTREAM PRIMITIVES: decoding **************************/
|
||||
|
||||
extern void ogg_sync_init(ogg_sync_state *oy);
|
||||
extern ogg_sync_state *ogg_sync_create(void);
|
||||
extern int ogg_sync_clear(ogg_sync_state *oy);
|
||||
extern int ogg_sync_destroy(ogg_sync_state *oy);
|
||||
extern int ogg_sync_reset(ogg_sync_state *oy);
|
||||
|
||||
|
|
@ -198,10 +173,8 @@ extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
|
|||
|
||||
/* Ogg BITSTREAM PRIMITIVES: general ***************************/
|
||||
|
||||
extern void ogg_stream_init(ogg_stream_state *os, int serialno);
|
||||
extern ogg_stream_state *ogg_stream_create(int serialno);
|
||||
extern int ogg_stream_destroy(ogg_stream_state *os);
|
||||
extern int ogg_stream_clear(ogg_stream_state *os);
|
||||
extern int ogg_stream_reset(ogg_stream_state *os);
|
||||
extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno);
|
||||
extern int ogg_stream_eos(ogg_stream_state *os);
|
||||
|
|
|
|||
|
|
@ -1,41 +1,21 @@
|
|||
#ifndef _OS_H
|
||||
#define _OS_H
|
||||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include "os_types.h"
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
#ifndef _OS_TYPES_H
|
||||
#define _OS_TYPES_H
|
||||
|
||||
|
|
@ -58,9 +38,7 @@
|
|||
typedef short ogg_int16_t;
|
||||
typedef int ogg_int32_t;
|
||||
typedef unsigned int ogg_uint32_t;
|
||||
typedef __int64 ogg_int64_t;
|
||||
|
||||
#define inline
|
||||
typedef long long ogg_int64_t;
|
||||
|
||||
#elif defined(_WIN32)
|
||||
|
||||
|
|
@ -117,7 +95,6 @@
|
|||
|
||||
# include <sys/types.h>
|
||||
# include "config_types.h"
|
||||
# include <endian.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* Dead simple processor sampling profiling code.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "windows.h"
|
||||
|
||||
static int *Profile_table = NULL;
|
||||
static int Profile_table_size = 0;
|
||||
static int Profile_table_granularity = 0;
|
||||
static DWORD (*ProfileFn)(void *);
|
||||
static void *ProfileArgs;
|
||||
static volatile HANDLE threadToProfile = NULL;
|
||||
static volatile HANDLE thread = NULL;
|
||||
static volatile int die = 0;
|
||||
static volatile int taskDone = 0;
|
||||
|
||||
void Profile_dump()
|
||||
{
|
||||
FILE *file;
|
||||
|
||||
die = 1;
|
||||
while (die)
|
||||
{
|
||||
Sleep(1);
|
||||
}
|
||||
|
||||
file = fopen("profile", "wb");
|
||||
if(file == NULL)
|
||||
{
|
||||
Output("Failed to open profile output");
|
||||
return;
|
||||
}
|
||||
Output("Dumping profile...");
|
||||
|
||||
fputc('P', file);
|
||||
fputc('R', file);
|
||||
fputc('0', file);
|
||||
fputc('F', file);
|
||||
|
||||
fwrite(&Profile_table_granularity, 4, 1, file);
|
||||
fwrite(Profile_table, 4, Profile_table_size>>2, file);
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
static DWORD ticker(LPVOID dummy)
|
||||
{
|
||||
CONTEXT context;
|
||||
int offset;
|
||||
|
||||
memset(&context, 0, sizeof(CONTEXT));
|
||||
{
|
||||
while (!die)
|
||||
{
|
||||
Sleep(10);
|
||||
context.ContextFlags = CONTEXT_FULL;
|
||||
if (GetThreadContext(thread, &context))
|
||||
{
|
||||
offset = context.Pc & ~0xF0000000;
|
||||
|
||||
offset >>= Profile_table_granularity+2;
|
||||
if (offset >= (Profile_table_size>>2))
|
||||
{
|
||||
offset = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
offset = 0;
|
||||
}
|
||||
Profile_table[offset]++;
|
||||
}
|
||||
}
|
||||
die = 0;
|
||||
}
|
||||
|
||||
void Profile_init(int size,
|
||||
int granularity)
|
||||
{
|
||||
HANDLE myThread;
|
||||
|
||||
Profile_table_granularity = granularity;
|
||||
Profile_table_size = (size+(1<<granularity)-1)>>granularity;
|
||||
Profile_table = (int *)malloc(Profile_table_size);
|
||||
if (Profile_table == NULL)
|
||||
{
|
||||
Output("Failed to get memory for Profile table\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
memset(Profile_table, 0, Profile_table_size);
|
||||
|
||||
thread = (HANDLE)GetCurrentThreadId();
|
||||
|
||||
Output("Commencing profiling");
|
||||
myThread = CreateThread(NULL, /* Security Attributes */
|
||||
0,
|
||||
&ticker,
|
||||
NULL,
|
||||
0,
|
||||
NULL);
|
||||
if (myThread == NULL)
|
||||
{
|
||||
Output("Profiler failed to start");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
SetThreadPriority(myThread, THREAD_PRIORITY_ABOVE_NORMAL);
|
||||
}
|
||||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: residue backend 0, 1 and 2 implementation
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -66,8 +46,8 @@ int res_unpack(vorbis_info_residue *info,
|
|||
info->begin=oggpack_read(opb,24);
|
||||
info->end=oggpack_read(opb,24);
|
||||
info->grouping=oggpack_read(opb,24)+1;
|
||||
info->partitions=(char)(oggpack_read(opb,6)+1);
|
||||
info->groupbook=(unsigned char)oggpack_read(opb,8);
|
||||
info->partitions=oggpack_read(opb,6)+1;
|
||||
info->groupbook=oggpack_read(opb,8);
|
||||
if(info->groupbook>=ci->books)goto errout;
|
||||
|
||||
info->stagemasks=_ogg_malloc(info->partitions*sizeof(*info->stagemasks));
|
||||
|
|
@ -83,7 +63,7 @@ int res_unpack(vorbis_info_residue *info,
|
|||
for(j=0;j<info->partitions;j++){
|
||||
for(k=0;k<8;k++){
|
||||
if((info->stagemasks[j]>>k)&1){
|
||||
unsigned char book=(unsigned char)oggpack_read(opb,8);
|
||||
unsigned char book=oggpack_read(opb,8);
|
||||
if(book>=ci->books)goto errout;
|
||||
info->stagebooks[j*8+k]=book;
|
||||
if(k+1>info->stages)info->stages=k+1;
|
||||
|
|
@ -164,8 +144,7 @@ int res_inverse(vorbis_dsp_state *vd,vorbis_info_residue *info,
|
|||
for(k=0;k<partitions_per_word && i<partvals;k++,i++)
|
||||
for(j=0;j<ch;j++){
|
||||
long offset=info->begin+i*samples_per_partition;
|
||||
int idx = (int)partword[j][i];
|
||||
if(idx < info->partitions && info->stagemasks[idx]&(1<<s)){
|
||||
if(info->stagemasks[(int)partword[j][i]]&(1<<s)){
|
||||
codebook *stagebook=ci->book_param+
|
||||
info->stagebooks[(partword[j][i]<<3)+s];
|
||||
if(info->type){
|
||||
|
|
@ -224,9 +203,8 @@ int res_inverse(vorbis_dsp_state *vd,vorbis_info_residue *info,
|
|||
}
|
||||
|
||||
/* now we decode residual values for the partitions */
|
||||
for(k=0;k<partitions_per_word && i<partvals;k++,i++){
|
||||
if(partword[i] >= 0 && partword[i] < info->partitions &&
|
||||
(info->stagemasks[(int)partword[i]] & (1 << s))){
|
||||
for(k=0;k<partitions_per_word && i<partvals;k++,i++)
|
||||
if(info->stagemasks[(int)partword[i]]&(1<<s)){
|
||||
codebook *stagebook=ci->book_param+
|
||||
info->stagebooks[(partword[i]<<3)+s];
|
||||
if(vorbis_book_decodevv_add(stagebook,in,
|
||||
|
|
@ -239,7 +217,7 @@ int res_inverse(vorbis_dsp_state *vd,vorbis_info_residue *info,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
errout:
|
||||
eopbreak:
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,120 @@
|
|||
.text
|
||||
|
||||
.global stmiaTest
|
||||
.global strTest
|
||||
.global smullTest
|
||||
|
||||
stmiaTest:
|
||||
STMFD r13!,{r4-r12,r14}
|
||||
|
||||
@ r0 = start
|
||||
@ r1 = size
|
||||
@ r2 = loops
|
||||
stmiaTestLoop2:
|
||||
MOV r3,r0
|
||||
MOV r4,r1
|
||||
stmiaTestLoop:
|
||||
STMIA r3!,{r6,r7,r8,r9,r10,r11,r12,r14}
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
|
||||
SUBS r4,r4,#8*4
|
||||
BGT stmiaTestLoop
|
||||
|
||||
SUBS r2,r2,#1
|
||||
BGT stmiaTestLoop2
|
||||
|
||||
|
||||
LDMFD r13!,{r4-r12,PC}
|
||||
|
||||
strTest:
|
||||
STMFD r13!,{r4-r12,r14}
|
||||
|
||||
@ r0 = start
|
||||
@ r1 = size
|
||||
@ r2 = loops
|
||||
strTestLoop2:
|
||||
MOV r3,r0
|
||||
MOV r4,r1
|
||||
strTestLoop:
|
||||
STR r6,[r3],#4
|
||||
STR r7,[r3],#4
|
||||
STR r8,[r3],#4
|
||||
STR r9,[r3],#4
|
||||
STR r10,[r3],#4
|
||||
STR r11,[r3],#4
|
||||
STR r12,[r3],#4
|
||||
STR r14,[r3],#4
|
||||
@STMIA r3!,{r6,r7,r8,r9,r10,r11,r12,r14}
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
MOV r6,#0
|
||||
|
||||
SUBS r4,r4,#8*4
|
||||
BGT strTestLoop
|
||||
|
||||
SUBS r2,r2,#1
|
||||
BGT strTestLoop2
|
||||
|
||||
LDMFD r13!,{r4-r12,PC}
|
||||
|
||||
smullTest:
|
||||
STMFD r13!,{r4-r12,r14}
|
||||
|
||||
@ r0 = start
|
||||
@ r1 = size
|
||||
@ r2 = loops
|
||||
smullTestLoop2:
|
||||
MVN r7,#0xAA000000
|
||||
MVN r8,#0xAA000000
|
||||
MOV r3,r0
|
||||
MOV r4,r1
|
||||
smullTestLoop:
|
||||
SMULL r14,r12,r7,r8
|
||||
MOV r6,#0
|
||||
SMLAL r14,r12,r7,r8
|
||||
MOV r6,#0
|
||||
SMULL r14,r11,r7,r8
|
||||
MOV r6,#0
|
||||
SMLAL r14,r11,r7,r8
|
||||
|
||||
SUBS r4,r4,#8*4
|
||||
BGT smullTestLoop
|
||||
|
||||
SUBS r2,r2,#1
|
||||
BGT smullTestLoop2
|
||||
|
||||
LDMFD r13!,{r4-r12,PC}
|
||||
|
|
@ -0,0 +1,423 @@
|
|||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: simple example decoder using vorbisidec
|
||||
|
||||
********************************************************************/
|
||||
|
||||
/* Takes a vorbis bitstream from stdin and writes raw stereo PCM to
|
||||
stdout using vorbisfile. Using vorbisfile is much simpler than
|
||||
dealing with libvorbis. */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "ivorbiscodec.h"
|
||||
#include "ivorbisfile.h"
|
||||
#include "time.h"
|
||||
#include "windows.h"
|
||||
|
||||
#define PROFILE
|
||||
|
||||
#ifdef _WIN32 /* We need the following two to set stdin/stdout to binary */
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
char pcmout[4096]; /* take 4k out of the data segment, not the stack */
|
||||
char ref[4096]; /* take 4k out of the data segment, not the stack */
|
||||
char text[4096];
|
||||
|
||||
void Output(const char *fmt, ...)
|
||||
{
|
||||
#ifdef _WIN32_WCE
|
||||
va_list ap;
|
||||
char *t = text;
|
||||
WCHAR uni[4096];
|
||||
WCHAR *u = uni;
|
||||
|
||||
va_start(ap,fmt);
|
||||
vsprintf(text, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
while (*t != 0)
|
||||
{
|
||||
*u++ = (WCHAR)(*t++);
|
||||
}
|
||||
*u++ = 0;
|
||||
OutputDebugString(uni);
|
||||
#else
|
||||
vfprintf(stderr, fmt, ap);
|
||||
#endif
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FILE *in;
|
||||
FILE *out;
|
||||
FILE *refin;
|
||||
FILE *refout;
|
||||
int max_samples;
|
||||
} TestParams;
|
||||
|
||||
static DWORD run_test(void *tp)
|
||||
{
|
||||
TestParams *params = (TestParams *)tp;
|
||||
FILE *in = params->in;
|
||||
FILE *out = params->out;
|
||||
FILE *refin = params->refin;
|
||||
FILE *refout = params->refout;
|
||||
int max_samples = params->max_samples;
|
||||
OggVorbis_File vf;
|
||||
int eof=0;
|
||||
int current_section;
|
||||
int maxdiff = 0;
|
||||
int countdiffs = 0;
|
||||
int samples = 0;
|
||||
|
||||
if(ov_open(in, &vf, NULL, 0) < 0) {
|
||||
Output("Input does not appear to be an Ogg bitstream.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Throw the comments plus a few lines about the bitstream we're
|
||||
decoding */
|
||||
{
|
||||
char **ptr=ov_comment(&vf,-1)->user_comments;
|
||||
vorbis_info *vi=ov_info(&vf,-1);
|
||||
if (out != NULL)
|
||||
{
|
||||
while(*ptr){
|
||||
Output("%s\n",*ptr);
|
||||
++ptr;
|
||||
}
|
||||
Output("\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate);
|
||||
Output("\nDecoded length: %ld samples\n",
|
||||
(long)ov_pcm_total(&vf,-1));
|
||||
Output("Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
|
||||
}
|
||||
}
|
||||
|
||||
while((!eof) && (max_samples > 0)){
|
||||
long ret=ov_read(&vf,pcmout,sizeof(pcmout),¤t_section);
|
||||
if (ret == 0) {
|
||||
/* EOF */
|
||||
eof=1;
|
||||
} else if (ret < 0) {
|
||||
/* error in the stream. Not a problem, just reporting it in
|
||||
case we (the app) cares. In this case, we don't. */
|
||||
} else {
|
||||
/* we don't bother dealing with sample rate changes, etc, but
|
||||
you'll have to*/
|
||||
if (out != NULL)
|
||||
{
|
||||
fwrite(pcmout,1,ret,out);
|
||||
}
|
||||
max_samples -= ret>>1;
|
||||
if (refout != NULL)
|
||||
{
|
||||
fwrite(pcmout,1,ret,refout);
|
||||
samples += ret>>1;
|
||||
Output("%d", samples);
|
||||
}
|
||||
if (refin != NULL)
|
||||
{
|
||||
int i, diff;
|
||||
|
||||
fread(ref,1,ret,refin);
|
||||
for (i=0; i<(ret>>1);i++)
|
||||
{
|
||||
diff = ((short *)pcmout)[i] - ((short *)ref)[i];
|
||||
if (diff != 0)
|
||||
{
|
||||
if (diff < 0)
|
||||
diff = -diff;
|
||||
if (diff > maxdiff)
|
||||
maxdiff = diff;
|
||||
countdiffs++;
|
||||
if (countdiffs < 50)
|
||||
{
|
||||
Output("samples differ: %x vs %x\n",
|
||||
((unsigned short *)pcmout)[i],
|
||||
((unsigned short *)ref)[i]);
|
||||
}
|
||||
else if ((countdiffs % 100) == 0)
|
||||
{
|
||||
Output("%d differences, maximum = %d\n",
|
||||
countdiffs, maxdiff);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
ov_clear(&vf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int filetimetoms(FILETIME *time)
|
||||
{
|
||||
unsigned long long l;
|
||||
|
||||
l = ((unsigned long long)time->dwLowDateTime) + (((unsigned long long)time->dwHighDateTime)<<32);
|
||||
|
||||
return (int)(l/10000);
|
||||
}
|
||||
|
||||
char speedblock[32768];
|
||||
void speedtest()
|
||||
{
|
||||
int readtime;
|
||||
FILETIME userStartTime, userStopTime;
|
||||
FILETIME kernelStartTime, kernelStopTime;
|
||||
FILETIME exitStartTime, exitStopTime;
|
||||
FILETIME creationStartTime, creationStopTime;
|
||||
|
||||
Output("Speed test: STMIA speed\n");
|
||||
|
||||
GetThreadTimes(GetCurrentThread(),
|
||||
&creationStartTime,
|
||||
&exitStartTime,
|
||||
&kernelStartTime,
|
||||
&userStartTime);
|
||||
stmiaTest(speedblock, 32768, 65536);
|
||||
GetThreadTimes(GetCurrentThread(),
|
||||
&creationStopTime,
|
||||
&exitStopTime,
|
||||
&kernelStopTime,
|
||||
&userStopTime);
|
||||
readtime = filetimetoms(&userStopTime)-filetimetoms(&userStartTime);
|
||||
Output("Speed test complete: Timing=%g\n",
|
||||
((double)readtime)/1000);
|
||||
|
||||
Output("Speed test: STR speed\n");
|
||||
|
||||
GetThreadTimes(GetCurrentThread(),
|
||||
&creationStartTime,
|
||||
&exitStartTime,
|
||||
&kernelStartTime,
|
||||
&userStartTime);
|
||||
strTest(speedblock, 32768, 65536);
|
||||
GetThreadTimes(GetCurrentThread(),
|
||||
&creationStopTime,
|
||||
&exitStopTime,
|
||||
&kernelStopTime,
|
||||
&userStopTime);
|
||||
readtime = filetimetoms(&userStopTime)-filetimetoms(&userStartTime);
|
||||
Output("Speed test complete: Timing=%g\n",
|
||||
((double)readtime)/1000);
|
||||
|
||||
Output("Speed test: SMULL speed\n");
|
||||
|
||||
GetThreadTimes(GetCurrentThread(),
|
||||
&creationStartTime,
|
||||
&exitStartTime,
|
||||
&kernelStartTime,
|
||||
&userStartTime);
|
||||
smullTest(speedblock, 32768, 65536);
|
||||
GetThreadTimes(GetCurrentThread(),
|
||||
&creationStopTime,
|
||||
&exitStopTime,
|
||||
&kernelStopTime,
|
||||
&userStopTime);
|
||||
readtime = filetimetoms(&userStopTime)-filetimetoms(&userStartTime);
|
||||
Output("Speed test complete: Timing=%g\n",
|
||||
((double)readtime)/1000);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
FILE *in;
|
||||
FILE *out = NULL;
|
||||
FILE *refin = NULL;
|
||||
FILE *refout = NULL;
|
||||
int dectime, readtime;
|
||||
FILETIME userStartTime, userStopTime;
|
||||
FILETIME kernelStartTime, kernelStopTime;
|
||||
FILETIME exitStartTime, exitStopTime;
|
||||
FILETIME creationStartTime, creationStopTime;
|
||||
TestParams params;
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
Output("Syntax: testtremor <infile> [<outfile>]\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#ifdef PROFILE
|
||||
in = fopen(argv[1], "rb");
|
||||
if (in == NULL)
|
||||
{
|
||||
Output("Failed to open '%s' for input\n", argv[1]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
params.in = in;
|
||||
params.out = NULL;
|
||||
params.refin = NULL;
|
||||
params.refout = NULL;
|
||||
params.max_samples = 0x7FFFFFFF;
|
||||
Profile_init(184000, 4);
|
||||
run_test(¶ms);
|
||||
Profile_dump();
|
||||
#else
|
||||
in = fopen(argv[1], "rb");
|
||||
if (in == NULL)
|
||||
{
|
||||
Output("Failed to open '%s' for input\n", argv[1]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (argc >= 3)
|
||||
{
|
||||
out = fopen(argv[2], "wb");
|
||||
if (out == NULL)
|
||||
{
|
||||
Output("Failed to open '%s' for output\n", argv[2]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (argc >= 4)
|
||||
{
|
||||
refin = fopen(argv[3], "rb");
|
||||
if (refin == NULL)
|
||||
{
|
||||
Output("Can't find reference file. Creating instead.\n");
|
||||
refout = fopen(argv[3], "wb");
|
||||
if (refout == NULL)
|
||||
{
|
||||
Output("Failed to open '%s' as output reference file\n", argv[3]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Output("First test: Decode correctness\n");
|
||||
params.in = in;
|
||||
params.out = out;
|
||||
params.refin = refin;
|
||||
params.refout = refout;
|
||||
params.max_samples = 1*1024*1024;
|
||||
run_test(¶ms);
|
||||
Output("First test complete\n");
|
||||
if (out != NULL)
|
||||
fclose(out);
|
||||
if (refin != NULL)
|
||||
fclose(refin);
|
||||
if (refout != NULL)
|
||||
fclose(refout);
|
||||
Output("Second test: Decode speed\n");
|
||||
in = fopen(argv[1], "rb");
|
||||
if (in == NULL)
|
||||
{
|
||||
Output("Failed to open '%s' for input\n", argv[1]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
GetThreadTimes(GetCurrentThread(),
|
||||
&creationStartTime,
|
||||
&exitStartTime,
|
||||
&kernelStartTime,
|
||||
&userStartTime);
|
||||
params.in = in;
|
||||
params.out = NULL;
|
||||
params.refin = NULL;
|
||||
params.refout = NULL;
|
||||
params.max_samples = 0x7FFFFFFF;
|
||||
run_test(¶ms);
|
||||
GetThreadTimes(GetCurrentThread(),
|
||||
&creationStopTime,
|
||||
&exitStopTime,
|
||||
&kernelStopTime,
|
||||
&userStopTime);
|
||||
|
||||
dectime = filetimetoms(&userStopTime)-filetimetoms(&userStartTime);
|
||||
Output("Second test complete: Timing=%g\n",
|
||||
((double)dectime)/1000);
|
||||
Output("Third test: File read speed\n");
|
||||
|
||||
in = fopen(argv[1], "rb");
|
||||
if (in == NULL)
|
||||
{
|
||||
Output("Failed to open '%s' for input\n", argv[1]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
GetThreadTimes(GetCurrentThread(),
|
||||
&creationStartTime,
|
||||
&exitStartTime,
|
||||
&kernelStartTime,
|
||||
&userStartTime);
|
||||
while (!feof(in))
|
||||
{
|
||||
fread(pcmout,1,4096,in);
|
||||
}
|
||||
GetThreadTimes(GetCurrentThread(),
|
||||
&creationStopTime,
|
||||
&exitStopTime,
|
||||
&kernelStopTime,
|
||||
&userStopTime);
|
||||
readtime = filetimetoms(&userStopTime)-filetimetoms(&userStartTime);
|
||||
Output("Third test complete: Timing=%g\n",
|
||||
((double)readtime)/1000);
|
||||
Output("Adjusted decode time: Timing=%g\n",
|
||||
((double)(dectime-readtime))/1000);
|
||||
#endif
|
||||
Output("Done.\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
#define TESTFILE 0
|
||||
|
||||
int WinMain(HINSTANCE h,HINSTANCE i,LPWSTR l,int n)
|
||||
{
|
||||
#if TESTFILE == 9
|
||||
char *argv[] = { "testtremor",
|
||||
"\\Storage Card\\Tremolo\\infile9.ogg",
|
||||
"\\Storage Card\\Tremolo\\output9.pcm",
|
||||
#ifdef _LOW_ACCURACY_
|
||||
"\\Storage Card\\Tremolo\\outputL9.ref",
|
||||
#else
|
||||
"\\Storage Card\\Tremolo\\output9.ref",
|
||||
#endif /* _LOW_ACCURACY_ */
|
||||
NULL };
|
||||
#endif
|
||||
#if TESTFILE == 2
|
||||
char *argv[] = { "testtremor",
|
||||
"\\Storage Card\\Tremolo\\infile2.ogg",
|
||||
"\\Storage Card\\Tremolo\\output2.pcm",
|
||||
#ifdef _LOW_ACCURACY_
|
||||
"\\Storage Card\\Tremolo\\outputL2.ref",
|
||||
#else
|
||||
"\\Storage Card\\Tremolo\\output2.ref",
|
||||
#endif /* _LOW_ACCURACY_ */
|
||||
NULL };
|
||||
#endif
|
||||
#if TESTFILE == 0
|
||||
char *argv[] = { "testtremor",
|
||||
"\\Storage Card\\Tremolo\\infile.ogg",
|
||||
"\\Storage Card\\Tremolo\\output.pcm",
|
||||
#ifdef _LOW_ACCURACY_
|
||||
"\\Storage Card\\Tremolo\\outputL.ref",
|
||||
#else
|
||||
"\\Storage Card\\Tremolo\\output.ref",
|
||||
#endif /* _LOW_ACCURACY_ */
|
||||
NULL };
|
||||
#endif
|
||||
return main(4, argv);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -1,44 +1,24 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: stdio-based convenience library for opening/seeking/decoding
|
||||
last mod: $Id: vorbisfile.c,v 1.6.2.5 2003/11/20 06:16:17 xiphmont Exp $
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
//#include <gerrno.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
|
|
@ -48,8 +28,6 @@
|
|||
#include "os.h"
|
||||
#include "misc.h"
|
||||
|
||||
int gerrno;
|
||||
|
||||
#define NOTOPEN 0
|
||||
#define PARTOPEN 1
|
||||
#define OPENED 2
|
||||
|
|
@ -89,12 +67,12 @@ int gerrno;
|
|||
|
||||
/* read a little more data from the file/pipe into the ogg_sync framer */
|
||||
static long _get_data(OggVorbis_File *vf){
|
||||
gerrno=0;
|
||||
errno=0;
|
||||
if(vf->datasource){
|
||||
unsigned char *buffer=ogg_sync_bufferin(vf->oy,CHUNKSIZE);
|
||||
long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource);
|
||||
if(bytes>0)ogg_sync_wrote(vf->oy,bytes);
|
||||
if(bytes==0 && gerrno)return -1;
|
||||
if(bytes==0 && errno)return -1;
|
||||
return bytes;
|
||||
}else
|
||||
return 0;
|
||||
|
|
@ -515,7 +493,7 @@ static int _open_seekable2(OggVorbis_File *vf){
|
|||
/* We get the offset for the last page of the physical bitstream.
|
||||
Most OggVorbis files will contain a single logical bitstream */
|
||||
end=_get_prev_page(vf,&og);
|
||||
if(end<0)return (int)end;
|
||||
if(end<0)return end;
|
||||
|
||||
/* more than one logical bitstream? */
|
||||
tempserialno=ogg_page_serialno(&og);
|
||||
|
|
@ -633,8 +611,7 @@ static int _fetch_and_process_packet(OggVorbis_File *vf,
|
|||
ret=0;
|
||||
goto cleanup;
|
||||
}
|
||||
ret=(int)_get_next_page(vf,&og,-1);
|
||||
if(ret<0){
|
||||
if((ret=_get_next_page(vf,&og,-1))<0){
|
||||
ret=OV_EOF; /* eof. leave unitialized */
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
@ -714,7 +691,7 @@ static int _fetch_and_process_packet(OggVorbis_File *vf,
|
|||
fseek64 */
|
||||
static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){
|
||||
if(f==NULL)return -1;
|
||||
return fseek(f,(long)off,whence);
|
||||
return fseek(f,off,whence);
|
||||
}
|
||||
|
||||
static int _ov_open1(void *f,OggVorbis_File *vf,char *initial,
|
||||
|
|
@ -884,11 +861,11 @@ long ov_bitrate(OggVorbis_File *vf,int i){
|
|||
* gcc 3.x on x86 miscompiled this at optimisation level 2 and above,
|
||||
* so this is slightly transformed to make it work.
|
||||
*/
|
||||
return (long)(bits*1000/ov_time_total(vf,-1));
|
||||
return bits*1000/ov_time_total(vf,-1);
|
||||
}else{
|
||||
if(vf->seekable){
|
||||
/* return the actual bitrate */
|
||||
return (long)((vf->offsets[i+1]-vf->dataoffsets[i])*8000/ov_time_total(vf,i));
|
||||
return (vf->offsets[i+1]-vf->dataoffsets[i])*8000/ov_time_total(vf,i);
|
||||
}else{
|
||||
/* return nominal if set */
|
||||
if(vf->vi.bitrate_nominal>0){
|
||||
|
|
@ -915,7 +892,7 @@ long ov_bitrate_instant(OggVorbis_File *vf){
|
|||
long ret;
|
||||
if(vf->ready_state<OPENED)return OV_EINVAL;
|
||||
if(vf->samptrack==0)return OV_FALSE;
|
||||
ret=(long)(vf->bittrack/vf->samptrack*vf->vi.rate);
|
||||
ret=vf->bittrack/vf->samptrack*vf->vi.rate;
|
||||
vf->bittrack=0;
|
||||
vf->samptrack=0;
|
||||
return ret;
|
||||
|
|
@ -1410,7 +1387,7 @@ int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){
|
|||
ogg_int64_t target=pos-vf->pcm_offset;
|
||||
long samples=vorbis_dsp_pcmout(vf->vd,NULL,0);
|
||||
|
||||
if(samples>target)samples=(long)target;
|
||||
if(samples>target)samples=target;
|
||||
vorbis_dsp_read(vf->vd,samples);
|
||||
vf->pcm_offset+=samples;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,39 +1,19 @@
|
|||
/************************************************************************
|
||||
* Copyright (C) 2002-2009, Xiph.org Foundation
|
||||
* Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the names of the Xiph.org Foundation nor Pinknoise
|
||||
* Productions Ltd nor the names of its contributors may be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
************************************************************************
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
||||
* *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: window lookup tables
|
||||
|
||||
************************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
|
||||
#include "os_types.h"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
diff -ru ./codebook.c /Users/cocos/Downloads/Tremolo008/codebook.c
|
||||
--- ./codebook.c 2018-11-07 16:47:06.000000000 +0800
|
||||
+++ /Users/cocos/Downloads/Tremolo008/codebook.c 2010-02-01 21:45:48.000000000 +0800
|
||||
@@ -679,7 +679,7 @@
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
- //Output("32/32");
|
||||
+ Output("32/32");
|
||||
for(i=0;i<read;i++){
|
||||
chase=((ogg_uint32_t *)(book->dec_table))[chase*2+((lok>>i)&1)];
|
||||
if(chase&0x80000000UL)break;
|
||||
Only in .: local_modification.diff
|
||||
diff -ru ./misc.h /Users/cocos/Downloads/Tremolo008/misc.h
|
||||
--- ./misc.h 2018-11-07 16:46:32.000000000 +0800
|
||||
+++ /Users/cocos/Downloads/Tremolo008/misc.h 2007-07-05 18:35:10.000000000 +0800
|
||||
@@ -46,7 +46,6 @@
|
||||
#ifndef _LOW_ACCURACY_
|
||||
/* 64 bit multiply */
|
||||
|
||||
-#include <endian.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if BYTE_ORDER==LITTLE_ENDIAN
|
||||
Loading…
Reference in New Issue