mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
f2b6a8b7fe
--HG-- rename : modules/libfishsound/AUTHORS => media/libfishsound/AUTHORS rename : modules/libfishsound/COPYING => media/libfishsound/COPYING rename : modules/libfishsound/ChangeLog => media/libfishsound/ChangeLog rename : modules/libfishsound/Makefile.in => media/libfishsound/Makefile.in rename : modules/libfishsound/README => media/libfishsound/README rename : modules/libfishsound/README_MOZILLA => media/libfishsound/README_MOZILLA rename : modules/libfishsound/include/Makefile.in => media/libfishsound/include/Makefile.in rename : modules/libfishsound/include/fishsound/Makefile.in => media/libfishsound/include/fishsound/Makefile.in rename : modules/libfishsound/include/fishsound/comments.h => media/libfishsound/include/fishsound/comments.h rename : modules/libfishsound/include/fishsound/config.h => media/libfishsound/include/fishsound/config.h rename : modules/libfishsound/include/fishsound/constants.h => media/libfishsound/include/fishsound/constants.h rename : modules/libfishsound/include/fishsound/decode.h => media/libfishsound/include/fishsound/decode.h rename : modules/libfishsound/include/fishsound/deprecated.h => media/libfishsound/include/fishsound/deprecated.h rename : modules/libfishsound/include/fishsound/encode.h => media/libfishsound/include/fishsound/encode.h rename : modules/libfishsound/include/fishsound/fishsound.h => media/libfishsound/include/fishsound/fishsound.h rename : modules/libfishsound/src/Makefile.in => media/libfishsound/src/Makefile.in rename : modules/libfishsound/src/libfishsound/Makefile.in => media/libfishsound/src/libfishsound/Makefile.in rename : modules/libfishsound/src/libfishsound/config.h => media/libfishsound/src/libfishsound/config.h rename : modules/libfishsound/src/libfishsound/convert.h => media/libfishsound/src/libfishsound/convert.h rename : modules/libfishsound/src/libfishsound/convert_c.h => media/libfishsound/src/libfishsound/convert_c.h rename : modules/libfishsound/src/libfishsound/convert_oil.h => media/libfishsound/src/libfishsound/convert_oil.h rename : modules/libfishsound/src/libfishsound/fishsound.c => media/libfishsound/src/libfishsound/fishsound.c rename : modules/libfishsound/src/libfishsound/fishsound_comments.c => media/libfishsound/src/libfishsound/fishsound_comments.c rename : modules/libfishsound/src/libfishsound/fishsound_decode.c => media/libfishsound/src/libfishsound/fishsound_decode.c rename : modules/libfishsound/src/libfishsound/fishsound_encode.c => media/libfishsound/src/libfishsound/fishsound_encode.c rename : modules/libfishsound/src/libfishsound/fishsound_flac.c => media/libfishsound/src/libfishsound/fishsound_flac.c rename : modules/libfishsound/src/libfishsound/fishsound_speex.c => media/libfishsound/src/libfishsound/fishsound_speex.c rename : modules/libfishsound/src/libfishsound/fishsound_vorbis.c => media/libfishsound/src/libfishsound/fishsound_vorbis.c rename : modules/libfishsound/src/libfishsound/fs_compat.h => media/libfishsound/src/libfishsound/fs_compat.h rename : modules/libfishsound/src/libfishsound/fs_vector.c => media/libfishsound/src/libfishsound/fs_vector.c rename : modules/libfishsound/src/libfishsound/fs_vector.h => media/libfishsound/src/libfishsound/fs_vector.h rename : modules/libfishsound/src/libfishsound/private.h => media/libfishsound/src/libfishsound/private.h rename : modules/libfishsound/update.sh => media/libfishsound/update.sh rename : modules/libogg/AUTHORS => media/libogg/AUTHORS rename : modules/libogg/CHANGES => media/libogg/CHANGES rename : modules/libogg/COPYING => media/libogg/COPYING rename : modules/libogg/Makefile.in => media/libogg/Makefile.in rename : modules/libogg/README => media/libogg/README rename : modules/libogg/README_MOZILLA => media/libogg/README_MOZILLA rename : modules/libogg/include/Makefile.in => media/libogg/include/Makefile.in rename : modules/libogg/include/ogg/Makefile.in => media/libogg/include/ogg/Makefile.in rename : modules/libogg/include/ogg/config_types.h => media/libogg/include/ogg/config_types.h rename : modules/libogg/include/ogg/ogg.h => media/libogg/include/ogg/ogg.h rename : modules/libogg/include/ogg/os_types.h => media/libogg/include/ogg/os_types.h rename : modules/libogg/src/Makefile.in => media/libogg/src/Makefile.in rename : modules/libogg/src/bitwise.c => media/libogg/src/bitwise.c rename : modules/libogg/src/framing.c => media/libogg/src/framing.c rename : modules/libogg/src/ogg_bitwise.c => media/libogg/src/ogg_bitwise.c rename : modules/libogg/src/ogg_framing.c => media/libogg/src/ogg_framing.c rename : modules/libogg/update.sh => media/libogg/update.sh rename : modules/liboggplay/Makefile.in => media/liboggplay/Makefile.in rename : modules/liboggplay/README => media/liboggplay/README rename : modules/liboggplay/README_MOZILLA => media/liboggplay/README_MOZILLA rename : modules/liboggplay/include/Makefile.in => media/liboggplay/include/Makefile.in rename : modules/liboggplay/include/oggplay/Makefile.in => media/liboggplay/include/oggplay/Makefile.in rename : modules/liboggplay/include/oggplay/config_win32.h => media/liboggplay/include/oggplay/config_win32.h rename : modules/liboggplay/include/oggplay/oggplay.h => media/liboggplay/include/oggplay/oggplay.h rename : modules/liboggplay/include/oggplay/oggplay_callback_info.h => media/liboggplay/include/oggplay/oggplay_callback_info.h rename : modules/liboggplay/include/oggplay/oggplay_enums.h => media/liboggplay/include/oggplay/oggplay_enums.h rename : modules/liboggplay/include/oggplay/oggplay_query.h => media/liboggplay/include/oggplay/oggplay_query.h rename : modules/liboggplay/include/oggplay/oggplay_reader.h => media/liboggplay/include/oggplay/oggplay_reader.h rename : modules/liboggplay/include/oggplay/oggplay_seek.h => media/liboggplay/include/oggplay/oggplay_seek.h rename : modules/liboggplay/include/oggplay/oggplay_tools.h => media/liboggplay/include/oggplay/oggplay_tools.h rename : modules/liboggplay/src/Makefile.in => media/liboggplay/src/Makefile.in rename : modules/liboggplay/src/liboggplay/Makefile.in => media/liboggplay/src/liboggplay/Makefile.in rename : modules/liboggplay/src/liboggplay/config.h => media/liboggplay/src/liboggplay/config.h rename : modules/liboggplay/src/liboggplay/oggplay.c => media/liboggplay/src/liboggplay/oggplay.c rename : modules/liboggplay/src/liboggplay/oggplay_buffer.c => media/liboggplay/src/liboggplay/oggplay_buffer.c rename : modules/liboggplay/src/liboggplay/oggplay_buffer.h => media/liboggplay/src/liboggplay/oggplay_buffer.h rename : modules/liboggplay/src/liboggplay/oggplay_callback.c => media/liboggplay/src/liboggplay/oggplay_callback.c rename : modules/liboggplay/src/liboggplay/oggplay_callback.h => media/liboggplay/src/liboggplay/oggplay_callback.h rename : modules/liboggplay/src/liboggplay/oggplay_callback_info.c => media/liboggplay/src/liboggplay/oggplay_callback_info.c rename : modules/liboggplay/src/liboggplay/oggplay_data.c => media/liboggplay/src/liboggplay/oggplay_data.c rename : modules/liboggplay/src/liboggplay/oggplay_data.h => media/liboggplay/src/liboggplay/oggplay_data.h rename : modules/liboggplay/src/liboggplay/oggplay_file_reader.c => media/liboggplay/src/liboggplay/oggplay_file_reader.c rename : modules/liboggplay/src/liboggplay/oggplay_file_reader.h => media/liboggplay/src/liboggplay/oggplay_file_reader.h rename : modules/liboggplay/src/liboggplay/oggplay_private.h => media/liboggplay/src/liboggplay/oggplay_private.h rename : modules/liboggplay/src/liboggplay/oggplay_query.c => media/liboggplay/src/liboggplay/oggplay_query.c rename : modules/liboggplay/src/liboggplay/oggplay_seek.c => media/liboggplay/src/liboggplay/oggplay_seek.c rename : modules/liboggplay/src/liboggplay/oggplay_tcp_reader.c => media/liboggplay/src/liboggplay/oggplay_tcp_reader.c rename : modules/liboggplay/src/liboggplay/oggplay_tcp_reader.h => media/liboggplay/src/liboggplay/oggplay_tcp_reader.h rename : modules/liboggplay/src/liboggplay/oggplay_tools.c => media/liboggplay/src/liboggplay/oggplay_tools.c rename : modules/liboggplay/src/liboggplay/oggplay_yuv2rgb.c => media/liboggplay/src/liboggplay/oggplay_yuv2rgb.c rename : modules/liboggplay/src/liboggplay/std_semaphore.h => media/liboggplay/src/liboggplay/std_semaphore.h rename : modules/liboggplay/update.sh => media/liboggplay/update.sh rename : modules/liboggplay_audio/Makefile.in => media/liboggplay_audio/Makefile.in rename : modules/liboggplay_audio/README_MOZILLA => media/liboggplay_audio/README_MOZILLA rename : modules/liboggplay_audio/sydney_audio.h => media/liboggplay_audio/sydney_audio.h rename : modules/liboggplay_audio/sydney_audio_alsa.c => media/liboggplay_audio/sydney_audio_alsa.c rename : modules/liboggplay_audio/sydney_audio_mac.c => media/liboggplay_audio/sydney_audio_mac.c rename : modules/liboggplay_audio/sydney_audio_oss.c => media/liboggplay_audio/sydney_audio_oss.c rename : modules/liboggplay_audio/sydney_audio_waveapi.c => media/liboggplay_audio/sydney_audio_waveapi.c rename : modules/liboggplay_audio/update.sh => media/liboggplay_audio/update.sh rename : modules/liboggz/AUTHORS => media/liboggz/AUTHORS rename : modules/liboggz/COPYING => media/liboggz/COPYING rename : modules/liboggz/ChangeLog => media/liboggz/ChangeLog rename : modules/liboggz/Makefile.in => media/liboggz/Makefile.in rename : modules/liboggz/README => media/liboggz/README rename : modules/liboggz/README_MOZILLA => media/liboggz/README_MOZILLA rename : modules/liboggz/include/Makefile.in => media/liboggz/include/Makefile.in rename : modules/liboggz/include/oggz/Makefile.in => media/liboggz/include/oggz/Makefile.in rename : modules/liboggz/include/oggz/config.h => media/liboggz/include/oggz/config.h rename : modules/liboggz/include/oggz/config_win32.h => media/liboggz/include/oggz/config_win32.h rename : modules/liboggz/include/oggz/oggz.h => media/liboggz/include/oggz/oggz.h rename : modules/liboggz/include/oggz/oggz_comments.h => media/liboggz/include/oggz/oggz_comments.h rename : modules/liboggz/include/oggz/oggz_constants.h => media/liboggz/include/oggz/oggz_constants.h rename : modules/liboggz/include/oggz/oggz_deprecated.h => media/liboggz/include/oggz/oggz_deprecated.h rename : modules/liboggz/include/oggz/oggz_io.h => media/liboggz/include/oggz/oggz_io.h rename : modules/liboggz/include/oggz/oggz_off_t.h => media/liboggz/include/oggz/oggz_off_t.h rename : modules/liboggz/include/oggz/oggz_off_t_generated.h => media/liboggz/include/oggz/oggz_off_t_generated.h rename : modules/liboggz/include/oggz/oggz_read.h => media/liboggz/include/oggz/oggz_read.h rename : modules/liboggz/include/oggz/oggz_seek.h => media/liboggz/include/oggz/oggz_seek.h rename : modules/liboggz/include/oggz/oggz_stream.h => media/liboggz/include/oggz/oggz_stream.h rename : modules/liboggz/include/oggz/oggz_table.h => media/liboggz/include/oggz/oggz_table.h rename : modules/liboggz/include/oggz/oggz_write.h => media/liboggz/include/oggz/oggz_write.h rename : modules/liboggz/src/Makefile.in => media/liboggz/src/Makefile.in rename : modules/liboggz/src/liboggz/Makefile.in => media/liboggz/src/liboggz/Makefile.in rename : modules/liboggz/src/liboggz/metric_internal.c => media/liboggz/src/liboggz/metric_internal.c rename : modules/liboggz/src/liboggz/oggz.c => media/liboggz/src/liboggz/oggz.c rename : modules/liboggz/src/liboggz/oggz_auto.c => media/liboggz/src/liboggz/oggz_auto.c rename : modules/liboggz/src/liboggz/oggz_auto.h => media/liboggz/src/liboggz/oggz_auto.h rename : modules/liboggz/src/liboggz/oggz_byteorder.h => media/liboggz/src/liboggz/oggz_byteorder.h rename : modules/liboggz/src/liboggz/oggz_comments.c => media/liboggz/src/liboggz/oggz_comments.c rename : modules/liboggz/src/liboggz/oggz_compat.h => media/liboggz/src/liboggz/oggz_compat.h rename : modules/liboggz/src/liboggz/oggz_dlist.c => media/liboggz/src/liboggz/oggz_dlist.c rename : modules/liboggz/src/liboggz/oggz_dlist.h => media/liboggz/src/liboggz/oggz_dlist.h rename : modules/liboggz/src/liboggz/oggz_io.c => media/liboggz/src/liboggz/oggz_io.c rename : modules/liboggz/src/liboggz/oggz_macros.h => media/liboggz/src/liboggz/oggz_macros.h rename : modules/liboggz/src/liboggz/oggz_private.h => media/liboggz/src/liboggz/oggz_private.h rename : modules/liboggz/src/liboggz/oggz_read.c => media/liboggz/src/liboggz/oggz_read.c rename : modules/liboggz/src/liboggz/oggz_seek.c => media/liboggz/src/liboggz/oggz_seek.c rename : modules/liboggz/src/liboggz/oggz_stream.c => media/liboggz/src/liboggz/oggz_stream.c rename : modules/liboggz/src/liboggz/oggz_stream.h => media/liboggz/src/liboggz/oggz_stream.h rename : modules/liboggz/src/liboggz/oggz_stream_private.h => media/liboggz/src/liboggz/oggz_stream_private.h rename : modules/liboggz/src/liboggz/oggz_table.c => media/liboggz/src/liboggz/oggz_table.c rename : modules/liboggz/src/liboggz/oggz_vector.c => media/liboggz/src/liboggz/oggz_vector.c rename : modules/liboggz/src/liboggz/oggz_vector.h => media/liboggz/src/liboggz/oggz_vector.h rename : modules/liboggz/src/liboggz/oggz_write.c => media/liboggz/src/liboggz/oggz_write.c rename : modules/liboggz/update.sh => media/liboggz/update.sh rename : modules/libtheora/AUTHORS => media/libtheora/AUTHORS rename : modules/libtheora/CHANGES => media/libtheora/CHANGES rename : modules/libtheora/COPYING => media/libtheora/COPYING rename : modules/libtheora/LICENSE => media/libtheora/LICENSE rename : modules/libtheora/Makefile.in => media/libtheora/Makefile.in rename : modules/libtheora/README => media/libtheora/README rename : modules/libtheora/README_MOZILLA => media/libtheora/README_MOZILLA rename : modules/libtheora/changeset_r15144.diff => media/libtheora/changeset_r15144.diff rename : modules/libtheora/include/Makefile.in => media/libtheora/include/Makefile.in rename : modules/libtheora/include/theora/Makefile.in => media/libtheora/include/theora/Makefile.in rename : modules/libtheora/include/theora/codec.h => media/libtheora/include/theora/codec.h rename : modules/libtheora/include/theora/config.h => media/libtheora/include/theora/config.h rename : modules/libtheora/include/theora/theora.h => media/libtheora/include/theora/theora.h rename : modules/libtheora/include/theora/theoradec.h => media/libtheora/include/theora/theoradec.h rename : modules/libtheora/lib/Makefile.in => media/libtheora/lib/Makefile.in rename : modules/libtheora/lib/config.h => media/libtheora/lib/config.h rename : modules/libtheora/lib/cpu.c => media/libtheora/lib/cpu.c rename : modules/libtheora/lib/cpu.h => media/libtheora/lib/cpu.h rename : modules/libtheora/lib/dec/apiwrapper.c => media/libtheora/lib/dec/apiwrapper.c rename : modules/libtheora/lib/dec/apiwrapper.h => media/libtheora/lib/dec/apiwrapper.h rename : modules/libtheora/lib/dec/bitwise.c => media/libtheora/lib/dec/bitwise.c rename : modules/libtheora/lib/dec/bitwise.h => media/libtheora/lib/dec/bitwise.h rename : modules/libtheora/lib/dec/dct.h => media/libtheora/lib/dec/dct.h rename : modules/libtheora/lib/dec/decapiwrapper.c => media/libtheora/lib/dec/decapiwrapper.c rename : modules/libtheora/lib/dec/decinfo.c => media/libtheora/lib/dec/decinfo.c rename : modules/libtheora/lib/dec/decint.h => media/libtheora/lib/dec/decint.h rename : modules/libtheora/lib/dec/decode.c => media/libtheora/lib/dec/decode.c rename : modules/libtheora/lib/dec/dequant.c => media/libtheora/lib/dec/dequant.c rename : modules/libtheora/lib/dec/dequant.h => media/libtheora/lib/dec/dequant.h rename : modules/libtheora/lib/dec/enquant.h => media/libtheora/lib/dec/enquant.h rename : modules/libtheora/lib/dec/fragment.c => media/libtheora/lib/dec/fragment.c rename : modules/libtheora/lib/dec/huffdec.c => media/libtheora/lib/dec/huffdec.c rename : modules/libtheora/lib/dec/huffdec.h => media/libtheora/lib/dec/huffdec.h rename : modules/libtheora/lib/dec/huffman.h => media/libtheora/lib/dec/huffman.h rename : modules/libtheora/lib/dec/idct.c => media/libtheora/lib/dec/idct.c rename : modules/libtheora/lib/dec/idct.h => media/libtheora/lib/dec/idct.h rename : modules/libtheora/lib/dec/info.c => media/libtheora/lib/dec/info.c rename : modules/libtheora/lib/dec/internal.c => media/libtheora/lib/dec/internal.c rename : modules/libtheora/lib/dec/ocintrin.h => media/libtheora/lib/dec/ocintrin.h rename : modules/libtheora/lib/dec/quant.c => media/libtheora/lib/dec/quant.c rename : modules/libtheora/lib/dec/quant.h => media/libtheora/lib/dec/quant.h rename : modules/libtheora/lib/dec/state.c => media/libtheora/lib/dec/state.c rename : modules/libtheora/lib/dec/x86/mmxfrag.c => media/libtheora/lib/dec/x86/mmxfrag.c rename : modules/libtheora/lib/dec/x86/mmxidct.c => media/libtheora/lib/dec/x86/mmxidct.c rename : modules/libtheora/lib/dec/x86/mmxstate.c => media/libtheora/lib/dec/x86/mmxstate.c rename : modules/libtheora/lib/dec/x86/x86int.h => media/libtheora/lib/dec/x86/x86int.h rename : modules/libtheora/lib/dec/x86/x86state.c => media/libtheora/lib/dec/x86/x86state.c rename : modules/libtheora/lib/internal.h => media/libtheora/lib/internal.h rename : modules/libtheora/update.sh => media/libtheora/update.sh rename : modules/libvorbis/AUTHORS => media/libvorbis/AUTHORS rename : modules/libvorbis/COPYING => media/libvorbis/COPYING rename : modules/libvorbis/Makefile.in => media/libvorbis/Makefile.in rename : modules/libvorbis/README => media/libvorbis/README rename : modules/libvorbis/README_MOZILLA => media/libvorbis/README_MOZILLA rename : modules/libvorbis/include/Makefile.in => media/libvorbis/include/Makefile.in rename : modules/libvorbis/include/vorbis/Makefile.in => media/libvorbis/include/vorbis/Makefile.in rename : modules/libvorbis/include/vorbis/codec.h => media/libvorbis/include/vorbis/codec.h rename : modules/libvorbis/lib/Makefile.in => media/libvorbis/lib/Makefile.in rename : modules/libvorbis/lib/backends.h => media/libvorbis/lib/backends.h rename : modules/libvorbis/lib/bitrate.h => media/libvorbis/lib/bitrate.h rename : modules/libvorbis/lib/codebook.h => media/libvorbis/lib/codebook.h rename : modules/libvorbis/lib/codec_internal.h => media/libvorbis/lib/codec_internal.h rename : modules/libvorbis/lib/envelope.h => media/libvorbis/lib/envelope.h rename : modules/libvorbis/lib/highlevel.h => media/libvorbis/lib/highlevel.h rename : modules/libvorbis/lib/lookup.h => media/libvorbis/lib/lookup.h rename : modules/libvorbis/lib/lookup_data.h => media/libvorbis/lib/lookup_data.h rename : modules/libvorbis/lib/lpc.h => media/libvorbis/lib/lpc.h rename : modules/libvorbis/lib/lsp.h => media/libvorbis/lib/lsp.h rename : modules/libvorbis/lib/masking.h => media/libvorbis/lib/masking.h rename : modules/libvorbis/lib/mdct.h => media/libvorbis/lib/mdct.h rename : modules/libvorbis/lib/misc.h => media/libvorbis/lib/misc.h rename : modules/libvorbis/lib/os.h => media/libvorbis/lib/os.h rename : modules/libvorbis/lib/psy.h => media/libvorbis/lib/psy.h rename : modules/libvorbis/lib/registry.h => media/libvorbis/lib/registry.h rename : modules/libvorbis/lib/scales.h => media/libvorbis/lib/scales.h rename : modules/libvorbis/lib/smallft.h => media/libvorbis/lib/smallft.h rename : modules/libvorbis/lib/vorbis_analysis.c => media/libvorbis/lib/vorbis_analysis.c rename : modules/libvorbis/lib/vorbis_bitrate.c => media/libvorbis/lib/vorbis_bitrate.c rename : modules/libvorbis/lib/vorbis_block.c => media/libvorbis/lib/vorbis_block.c rename : modules/libvorbis/lib/vorbis_codebook.c => media/libvorbis/lib/vorbis_codebook.c rename : modules/libvorbis/lib/vorbis_envelope.c => media/libvorbis/lib/vorbis_envelope.c rename : modules/libvorbis/lib/vorbis_floor0.c => media/libvorbis/lib/vorbis_floor0.c rename : modules/libvorbis/lib/vorbis_floor1.c => media/libvorbis/lib/vorbis_floor1.c rename : modules/libvorbis/lib/vorbis_info.c => media/libvorbis/lib/vorbis_info.c rename : modules/libvorbis/lib/vorbis_lookup.c => media/libvorbis/lib/vorbis_lookup.c rename : modules/libvorbis/lib/vorbis_lpc.c => media/libvorbis/lib/vorbis_lpc.c rename : modules/libvorbis/lib/vorbis_lsp.c => media/libvorbis/lib/vorbis_lsp.c rename : modules/libvorbis/lib/vorbis_mapping0.c => media/libvorbis/lib/vorbis_mapping0.c rename : modules/libvorbis/lib/vorbis_mdct.c => media/libvorbis/lib/vorbis_mdct.c rename : modules/libvorbis/lib/vorbis_psy.c => media/libvorbis/lib/vorbis_psy.c rename : modules/libvorbis/lib/vorbis_registry.c => media/libvorbis/lib/vorbis_registry.c rename : modules/libvorbis/lib/vorbis_res0.c => media/libvorbis/lib/vorbis_res0.c rename : modules/libvorbis/lib/vorbis_sharedbook.c => media/libvorbis/lib/vorbis_sharedbook.c rename : modules/libvorbis/lib/vorbis_smallft.c => media/libvorbis/lib/vorbis_smallft.c rename : modules/libvorbis/lib/vorbis_synthesis.c => media/libvorbis/lib/vorbis_synthesis.c rename : modules/libvorbis/lib/vorbis_window.c => media/libvorbis/lib/vorbis_window.c rename : modules/libvorbis/lib/window.h => media/libvorbis/lib/window.h rename : modules/libvorbis/todo.txt => media/libvorbis/todo.txt rename : modules/libvorbis/update.sh => media/libvorbis/update.sh
1256 lines
22 KiB
C
1256 lines
22 KiB
C
/********************************************************************
|
|
* *
|
|
* 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-2007 *
|
|
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
|
* *
|
|
********************************************************************
|
|
|
|
function: *unnormalized* fft transform
|
|
last mod: $Id: smallft.c 13293 2007-07-24 00:09:47Z xiphmont $
|
|
|
|
********************************************************************/
|
|
|
|
/* FFT implementation from OggSquish, minus cosine transforms,
|
|
* minus all but radix 2/4 case. In Vorbis we only need this
|
|
* cut-down version.
|
|
*
|
|
* To do more than just power-of-two sized vectors, see the full
|
|
* version I wrote for NetLib.
|
|
*
|
|
* Note that the packing is a little strange; rather than the FFT r/i
|
|
* packing following R_0, I_n, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1,
|
|
* it follows R_0, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1, I_n like the
|
|
* FORTRAN version
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <math.h>
|
|
#include "smallft.h"
|
|
#include "os.h"
|
|
#include "misc.h"
|
|
|
|
static void drfti1(int n, float *wa, int *ifac){
|
|
static int ntryh[4] = { 4,2,3,5 };
|
|
static float tpi = 6.28318530717958648f;
|
|
float arg,argh,argld,fi;
|
|
int ntry=0,i,j=-1;
|
|
int k1, l1, l2, ib;
|
|
int ld, ii, ip, is, nq, nr;
|
|
int ido, ipm, nfm1;
|
|
int nl=n;
|
|
int nf=0;
|
|
|
|
L101:
|
|
j++;
|
|
if (j < 4)
|
|
ntry=ntryh[j];
|
|
else
|
|
ntry+=2;
|
|
|
|
L104:
|
|
nq=nl/ntry;
|
|
nr=nl-ntry*nq;
|
|
if (nr!=0) goto L101;
|
|
|
|
nf++;
|
|
ifac[nf+1]=ntry;
|
|
nl=nq;
|
|
if(ntry!=2)goto L107;
|
|
if(nf==1)goto L107;
|
|
|
|
for (i=1;i<nf;i++){
|
|
ib=nf-i+1;
|
|
ifac[ib+1]=ifac[ib];
|
|
}
|
|
ifac[2] = 2;
|
|
|
|
L107:
|
|
if(nl!=1)goto L104;
|
|
ifac[0]=n;
|
|
ifac[1]=nf;
|
|
argh=tpi/n;
|
|
is=0;
|
|
nfm1=nf-1;
|
|
l1=1;
|
|
|
|
if(nfm1==0)return;
|
|
|
|
for (k1=0;k1<nfm1;k1++){
|
|
ip=ifac[k1+2];
|
|
ld=0;
|
|
l2=l1*ip;
|
|
ido=n/l2;
|
|
ipm=ip-1;
|
|
|
|
for (j=0;j<ipm;j++){
|
|
ld+=l1;
|
|
i=is;
|
|
argld=(float)ld*argh;
|
|
fi=0.f;
|
|
for (ii=2;ii<ido;ii+=2){
|
|
fi+=1.f;
|
|
arg=fi*argld;
|
|
wa[i++]=cos(arg);
|
|
wa[i++]=sin(arg);
|
|
}
|
|
is+=ido;
|
|
}
|
|
l1=l2;
|
|
}
|
|
}
|
|
|
|
static void fdrffti(int n, float *wsave, int *ifac){
|
|
|
|
if (n == 1) return;
|
|
drfti1(n, wsave+n, ifac);
|
|
}
|
|
|
|
static void dradf2(int ido,int l1,float *cc,float *ch,float *wa1){
|
|
int i,k;
|
|
float ti2,tr2;
|
|
int t0,t1,t2,t3,t4,t5,t6;
|
|
|
|
t1=0;
|
|
t0=(t2=l1*ido);
|
|
t3=ido<<1;
|
|
for(k=0;k<l1;k++){
|
|
ch[t1<<1]=cc[t1]+cc[t2];
|
|
ch[(t1<<1)+t3-1]=cc[t1]-cc[t2];
|
|
t1+=ido;
|
|
t2+=ido;
|
|
}
|
|
|
|
if(ido<2)return;
|
|
if(ido==2)goto L105;
|
|
|
|
t1=0;
|
|
t2=t0;
|
|
for(k=0;k<l1;k++){
|
|
t3=t2;
|
|
t4=(t1<<1)+(ido<<1);
|
|
t5=t1;
|
|
t6=t1+t1;
|
|
for(i=2;i<ido;i+=2){
|
|
t3+=2;
|
|
t4-=2;
|
|
t5+=2;
|
|
t6+=2;
|
|
tr2=wa1[i-2]*cc[t3-1]+wa1[i-1]*cc[t3];
|
|
ti2=wa1[i-2]*cc[t3]-wa1[i-1]*cc[t3-1];
|
|
ch[t6]=cc[t5]+ti2;
|
|
ch[t4]=ti2-cc[t5];
|
|
ch[t6-1]=cc[t5-1]+tr2;
|
|
ch[t4-1]=cc[t5-1]-tr2;
|
|
}
|
|
t1+=ido;
|
|
t2+=ido;
|
|
}
|
|
|
|
if(ido%2==1)return;
|
|
|
|
L105:
|
|
t3=(t2=(t1=ido)-1);
|
|
t2+=t0;
|
|
for(k=0;k<l1;k++){
|
|
ch[t1]=-cc[t2];
|
|
ch[t1-1]=cc[t3];
|
|
t1+=ido<<1;
|
|
t2+=ido;
|
|
t3+=ido;
|
|
}
|
|
}
|
|
|
|
static void dradf4(int ido,int l1,float *cc,float *ch,float *wa1,
|
|
float *wa2,float *wa3){
|
|
static float hsqt2 = .70710678118654752f;
|
|
int i,k,t0,t1,t2,t3,t4,t5,t6;
|
|
float ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4;
|
|
t0=l1*ido;
|
|
|
|
t1=t0;
|
|
t4=t1<<1;
|
|
t2=t1+(t1<<1);
|
|
t3=0;
|
|
|
|
for(k=0;k<l1;k++){
|
|
tr1=cc[t1]+cc[t2];
|
|
tr2=cc[t3]+cc[t4];
|
|
|
|
ch[t5=t3<<2]=tr1+tr2;
|
|
ch[(ido<<2)+t5-1]=tr2-tr1;
|
|
ch[(t5+=(ido<<1))-1]=cc[t3]-cc[t4];
|
|
ch[t5]=cc[t2]-cc[t1];
|
|
|
|
t1+=ido;
|
|
t2+=ido;
|
|
t3+=ido;
|
|
t4+=ido;
|
|
}
|
|
|
|
if(ido<2)return;
|
|
if(ido==2)goto L105;
|
|
|
|
|
|
t1=0;
|
|
for(k=0;k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c[t6-1]-tr1;
|
|
|
|
ch[t4]=ti1-cc[t1+t0];
|
|
ch[t4+t5]=ti1+cc[t1+t0];
|
|
|
|
t1+=ido;
|
|
t2+=ido;
|
|
t4+=t3;
|
|
t6+=ido;
|
|
}
|
|
}
|
|
|
|
static void dradfg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
|
|
float *c2,float *ch,float *ch2,float *wa){
|
|
|
|
static float tpi=6.283185307179586f;
|
|
int idij,ipph,i,j,k,l,ic,ik,is;
|
|
int t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
|
|
float dc2,ai1,ai2,ar1,ar2,ds2;
|
|
int nbd;
|
|
float dcp,arg,dsp,ar1h,ar2h;
|
|
int idp2,ipp2;
|
|
|
|
arg=tpi/(float)ip;
|
|
dcp=cos(arg);
|
|
dsp=sin(arg);
|
|
ipph=(ip+1)>>1;
|
|
ipp2=ip;
|
|
idp2=ido;
|
|
nbd=(ido-1)>>1;
|
|
t0=l1*ido;
|
|
t10=ip*ido;
|
|
|
|
if(ido==1)goto L119;
|
|
for(ik=0;ik<idl1;ik++)ch2[ik]=c2[ik];
|
|
|
|
t1=0;
|
|
for(j=1;j<ip;j++){
|
|
t1+=t0;
|
|
t2=t1;
|
|
for(k=0;k<l1;k++){
|
|
ch[t2]=c1[t2];
|
|
t2+=ido;
|
|
}
|
|
}
|
|
|
|
is=-ido;
|
|
t1=0;
|
|
if(nbd>l1){
|
|
for(j=1;j<ip;j++){
|
|
t1+=t0;
|
|
is+=ido;
|
|
t2= -ido+t1;
|
|
for(k=0;k<l1;k++){
|
|
idij=is-1;
|
|
t2+=ido;
|
|
t3=t2;
|
|
for(i=2;i<ido;i+=2){
|
|
idij+=2;
|
|
t3+=2;
|
|
ch[t3-1]=wa[idij-1]*c1[t3-1]+wa[idij]*c1[t3];
|
|
ch[t3]=wa[idij-1]*c1[t3]-wa[idij]*c1[t3-1];
|
|
}
|
|
}
|
|
}
|
|
}else{
|
|
|
|
for(j=1;j<ip;j++){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+=t2;
|
|
t4+=t0;
|
|
t5-=t0;
|
|
for(i=2;i<ido;i+=2){
|
|
t6=idp2+t1-i;
|
|
t7=i+t3;
|
|
t8=i+t4;
|
|
t9=i+t5;
|
|
for(k=0;k<l1;k++){
|
|
cc[t7-1]=ch[t8-1]+ch[t9-1];
|
|
cc[t6-1]=ch[t8-1]-ch[t9-1];
|
|
cc[t7]=ch[t8]+ch[t9];
|
|
cc[t6]=ch[t9]-ch[t8];
|
|
t6+=t10;
|
|
t7+=t10;
|
|
t8+=ido;
|
|
t9+=ido;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static void drftf1(int n,float *c,float *ch,float *wa,int *ifac){
|
|
int i,k1,l1,l2;
|
|
int na,kh,nf;
|
|
int ip,iw,ido,idl1,ix2,ix3;
|
|
|
|
nf=ifac[1];
|
|
na=1;
|
|
l2=n;
|
|
iw=n;
|
|
|
|
for(k1=0;k1<nf;k1++){
|
|
kh=nf-k1;
|
|
ip=ifac[kh+1];
|
|
l1=l2/ip;
|
|
ido=n/l2;
|
|
idl1=ido*l1;
|
|
iw-=(ip-1)*ido;
|
|
na=1-na;
|
|
|
|
if(ip!=4)goto L102;
|
|
|
|
ix2=iw+ido;
|
|
ix3=ix2+ido;
|
|
if(na!=0)
|
|
dradf4(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1);
|
|
else
|
|
dradf4(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1);
|
|
goto L110;
|
|
|
|
L102:
|
|
if(ip!=2)goto L104;
|
|
if(na!=0)goto L103;
|
|
|
|
dradf2(ido,l1,c,ch,wa+iw-1);
|
|
goto L110;
|
|
|
|
L103:
|
|
dradf2(ido,l1,ch,c,wa+iw-1);
|
|
goto L110;
|
|
|
|
L104:
|
|
if(ido==1)na=1-na;
|
|
if(na!=0)goto L109;
|
|
|
|
dradfg(ido,ip,l1,idl1,c,c,c,ch,ch,wa+iw-1);
|
|
na=1;
|
|
goto L110;
|
|
|
|
L109:
|
|
dradfg(ido,ip,l1,idl1,ch,ch,ch,c,c,wa+iw-1);
|
|
na=0;
|
|
|
|
L110:
|
|
l2=l1;
|
|
}
|
|
|
|
if(na==1)return;
|
|
|
|
for(i=0;i<n;i++)c[i]=ch[i];
|
|
}
|
|
|
|
static void dradb2(int ido,int l1,float *cc,float *ch,float *wa1){
|
|
int i,k,t0,t1,t2,t3,t4,t5,t6;
|
|
float ti2,tr2;
|
|
|
|
t0=l1*ido;
|
|
|
|
t1=0;
|
|
t2=0;
|
|
t3=(ido<<1)-1;
|
|
for(k=0;k<l1;k++){
|
|
ch[t1]=cc[t2]+cc[t3+t2];
|
|
ch[t1+t0]=cc[t2]-cc[t3+t2];
|
|
t2=(t1+=ido)<<1;
|
|
}
|
|
|
|
if(ido<2)return;
|
|
if(ido==2)goto L105;
|
|
|
|
t1=0;
|
|
t2=0;
|
|
for(k=0;k<l1;k++){
|
|
t3=t1;
|
|
t5=(t4=t2)+(ido<<1);
|
|
t6=t0+t1;
|
|
for(i=2;i<ido;i+=2){
|
|
t3+=2;
|
|
t4+=2;
|
|
t5-=2;
|
|
t6+=2;
|
|
ch[t3-1]=cc[t4-1]+cc[t5-1];
|
|
tr2=cc[t4-1]-cc[t5-1];
|
|
ch[t3]=cc[t4]-cc[t5];
|
|
ti2=cc[t4]+cc[t5];
|
|
ch[t6-1]=wa1[i-2]*tr2-wa1[i-1]*ti2;
|
|
ch[t6]=wa1[i-2]*ti2+wa1[i-1]*tr2;
|
|
}
|
|
t2=(t1+=ido)<<1;
|
|
}
|
|
|
|
if(ido%2==1)return;
|
|
|
|
L105:
|
|
t1=ido-1;
|
|
t2=ido-1;
|
|
for(k=0;k<l1;k++){
|
|
ch[t1]=cc[t2]+cc[t2];
|
|
ch[t1+t0]=-(cc[t2+1]+cc[t2+1]);
|
|
t1+=ido;
|
|
t2+=ido<<1;
|
|
}
|
|
}
|
|
|
|
static void dradb3(int ido,int l1,float *cc,float *ch,float *wa1,
|
|
float *wa2){
|
|
static float taur = -.5f;
|
|
static float taui = .8660254037844386f;
|
|
int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
|
|
float ci2,ci3,di2,di3,cr2,cr3,dr2,dr3,ti2,tr2;
|
|
t0=l1*ido;
|
|
|
|
t1=0;
|
|
t2=t0<<1;
|
|
t3=ido<<1;
|
|
t4=ido+(ido<<1);
|
|
t5=0;
|
|
for(k=0;k<l1;k++){
|
|
tr2=cc[t3-1]+cc[t3-1];
|
|
cr2=cc[t5]+(taur*tr2);
|
|
ch[t1]=cc[t5]+tr2;
|
|
ci3=taui*(cc[t3]+cc[t3]);
|
|
ch[t1+t0]=cr2-ci3;
|
|
ch[t1+t2]=cr2+ci3;
|
|
t1+=ido;
|
|
t3+=t4;
|
|
t5+=t4;
|
|
}
|
|
|
|
if(ido==1)return;
|
|
|
|
t1=0;
|
|
t3=ido<<1;
|
|
for(k=0;k<l1;k++){
|
|
t7=t1+(t1<<1);
|
|
t6=(t5=t7+t3);
|
|
t8=t1;
|
|
t10=(t9=t1+t0)+t0;
|
|
|
|
for(i=2;i<ido;i+=2){
|
|
t5+=2;
|
|
t6-=2;
|
|
t7+=2;
|
|
t8+=2;
|
|
t9+=2;
|
|
t10+=2;
|
|
tr2=cc[t5-1]+cc[t6-1];
|
|
cr2=cc[t7-1]+(taur*tr2);
|
|
ch[t8-1]=cc[t7-1]+tr2;
|
|
ti2=cc[t5]-cc[t6];
|
|
ci2=cc[t7]+(taur*ti2);
|
|
ch[t8]=cc[t7]+ti2;
|
|
cr3=taui*(cc[t5-1]-cc[t6-1]);
|
|
ci3=taui*(cc[t5]+cc[t6]);
|
|
dr2=cr2-ci3;
|
|
dr3=cr2+ci3;
|
|
di2=ci2+cr3;
|
|
di3=ci2-cr3;
|
|
ch[t9-1]=wa1[i-2]*dr2-wa1[i-1]*di2;
|
|
ch[t9]=wa1[i-2]*di2+wa1[i-1]*dr2;
|
|
ch[t10-1]=wa2[i-2]*dr3-wa2[i-1]*di3;
|
|
ch[t10]=wa2[i-2]*di3+wa2[i-1]*dr3;
|
|
}
|
|
t1+=ido;
|
|
}
|
|
}
|
|
|
|
static void dradb4(int ido,int l1,float *cc,float *ch,float *wa1,
|
|
float *wa2,float *wa3){
|
|
static float sqrt2=1.414213562373095f;
|
|
int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8;
|
|
float ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4;
|
|
t0=l1*ido;
|
|
|
|
t1=0;
|
|
t2=ido<<2;
|
|
t3=0;
|
|
t6=ido<<1;
|
|
for(k=0;k<l1;k++){
|
|
t4=t3+t6;
|
|
t5=t1;
|
|
tr3=cc[t4-1]+cc[t4-1];
|
|
tr4=cc[t4]+cc[t4];
|
|
tr1=cc[t3]-cc[(t4+=t6)-1];
|
|
tr2=cc[t3]+cc[t4-1];
|
|
ch[t5]=tr2+tr3;
|
|
ch[t5+=t0]=tr1-tr4;
|
|
ch[t5+=t0]=tr2-tr3;
|
|
ch[t5+=t0]=tr1+tr4;
|
|
t1+=ido;
|
|
t3+=t2;
|
|
}
|
|
|
|
if(ido<2)return;
|
|
if(ido==2)goto L105;
|
|
|
|
t1=0;
|
|
for(k=0;k<l1;k++){
|
|
t5=(t4=(t3=(t2=t1<<2)+t6))+t6;
|
|
t7=t1;
|
|
for(i=2;i<ido;i+=2){
|
|
t2+=2;
|
|
t3+=2;
|
|
t4-=2;
|
|
t5-=2;
|
|
t7+=2;
|
|
ti1=cc[t2]+cc[t5];
|
|
ti2=cc[t2]-cc[t5];
|
|
ti3=cc[t3]-cc[t4];
|
|
tr4=cc[t3]+cc[t4];
|
|
tr1=cc[t2-1]-cc[t5-1];
|
|
tr2=cc[t2-1]+cc[t5-1];
|
|
ti4=cc[t3-1]-cc[t4-1];
|
|
tr3=cc[t3-1]+cc[t4-1];
|
|
ch[t7-1]=tr2+tr3;
|
|
cr3=tr2-tr3;
|
|
ch[t7]=ti2+ti3;
|
|
ci3=ti2-ti3;
|
|
cr2=tr1-tr4;
|
|
cr4=tr1+tr4;
|
|
ci2=ti1+ti4;
|
|
ci4=ti1-ti4;
|
|
|
|
ch[(t8=t7+t0)-1]=wa1[i-2]*cr2-wa1[i-1]*ci2;
|
|
ch[t8]=wa1[i-2]*ci2+wa1[i-1]*cr2;
|
|
ch[(t8+=t0)-1]=wa2[i-2]*cr3-wa2[i-1]*ci3;
|
|
ch[t8]=wa2[i-2]*ci3+wa2[i-1]*cr3;
|
|
ch[(t8+=t0)-1]=wa3[i-2]*cr4-wa3[i-1]*ci4;
|
|
ch[t8]=wa3[i-2]*ci4+wa3[i-1]*cr4;
|
|
}
|
|
t1+=ido;
|
|
}
|
|
|
|
if(ido%2 == 1)return;
|
|
|
|
L105:
|
|
|
|
t1=ido;
|
|
t2=ido<<2;
|
|
t3=ido-1;
|
|
t4=ido+(ido<<1);
|
|
for(k=0;k<l1;k++){
|
|
t5=t3;
|
|
ti1=cc[t1]+cc[t4];
|
|
ti2=cc[t4]-cc[t1];
|
|
tr1=cc[t1-1]-cc[t4-1];
|
|
tr2=cc[t1-1]+cc[t4-1];
|
|
ch[t5]=tr2+tr2;
|
|
ch[t5+=t0]=sqrt2*(tr1-ti1);
|
|
ch[t5+=t0]=ti2+ti2;
|
|
ch[t5+=t0]=-sqrt2*(tr1+ti1);
|
|
|
|
t3+=ido;
|
|
t1+=t2;
|
|
t4+=t2;
|
|
}
|
|
}
|
|
|
|
static void dradbg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
|
|
float *c2,float *ch,float *ch2,float *wa){
|
|
static float tpi=6.283185307179586f;
|
|
int idij,ipph,i,j,k,l,ik,is,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,
|
|
t11,t12;
|
|
float dc2,ai1,ai2,ar1,ar2,ds2;
|
|
int nbd;
|
|
float dcp,arg,dsp,ar1h,ar2h;
|
|
int ipp2;
|
|
|
|
t10=ip*ido;
|
|
t0=l1*ido;
|
|
arg=tpi/(float)ip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=t1;
|
|
t4=t2;
|
|
for(i=2;i<ido;i+=2){
|
|
t3+=2;
|
|
t4+=2;
|
|
t5=t3;
|
|
t6=t4;
|
|
for(k=0;k<l1;k++){
|
|
ch[t5-1]=c1[t5-1]-c1[t6];
|
|
ch[t6-1]=c1[t5-1]+c1[t6];
|
|
ch[t5]=c1[t5]+c1[t6-1];
|
|
ch[t6]=c1[t5]-c1[t6-1];
|
|
t5+=ido;
|
|
t6+=ido;
|
|
}
|
|
}
|
|
}
|
|
|
|
L132:
|
|
if(ido==1)return;
|
|
|
|
for(ik=0;ik<idl1;ik++)c2[ik]=ch2[ik];
|
|
|
|
t1=0;
|
|
for(j=1;j<ip;j++){
|
|
t2=(t1+=t0);
|
|
for(k=0;k<l1;k++){
|
|
c1[t2]=ch[t2];
|
|
t2+=ido;
|
|
}
|
|
}
|
|
|
|
if(nbd>l1)goto L139;
|
|
|
|
is= -ido-1;
|
|
t1=0;
|
|
for(j=1;j<ip;j++){
|
|
is+=ido;
|
|
t1+=t0;
|
|
idij=is;
|
|
t2=t1;
|
|
for(i=2;i<ido;i+=2){
|
|
t2+=2;
|
|
idij+=2;
|
|
t3=t2;
|
|
for(k=0;k<l1;k++){
|
|
c1[t3-1]=wa[idij-1]*ch[t3-1]-wa[idij]*ch[t3];
|
|
c1[t3]=wa[idij-1]*ch[t3]+wa[idij]*ch[t3-1];
|
|
t3+=ido;
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
|
|
L139:
|
|
is= -ido-1;
|
|
t1=0;
|
|
for(j=1;j<ip;j++){
|
|
is+=ido;
|
|
t1+=t0;
|
|
t2=t1;
|
|
for(k=0;k<l1;k++){
|
|
idij=is;
|
|
t3=t2;
|
|
for(i=2;i<ido;i+=2){
|
|
idij+=2;
|
|
t3+=2;
|
|
c1[t3-1]=wa[idij-1]*ch[t3-1]-wa[idij]*ch[t3];
|
|
c1[t3]=wa[idij-1]*ch[t3]+wa[idij]*ch[t3-1];
|
|
}
|
|
t2+=ido;
|
|
}
|
|
}
|
|
}
|
|
|
|
static void drftb1(int n, float *c, float *ch, float *wa, int *ifac){
|
|
int i,k1,l1,l2;
|
|
int na;
|
|
int nf,ip,iw,ix2,ix3,ido,idl1;
|
|
|
|
nf=ifac[1];
|
|
na=0;
|
|
l1=1;
|
|
iw=1;
|
|
|
|
for(k1=0;k1<nf;k1++){
|
|
ip=ifac[k1 + 2];
|
|
l2=ip*l1;
|
|
ido=n/l2;
|
|
idl1=ido*l1;
|
|
if(ip!=4)goto L103;
|
|
ix2=iw+ido;
|
|
ix3=ix2+ido;
|
|
|
|
if(na!=0)
|
|
dradb4(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1);
|
|
else
|
|
dradb4(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1);
|
|
na=1-na;
|
|
goto L115;
|
|
|
|
L103:
|
|
if(ip!=2)goto L106;
|
|
|
|
if(na!=0)
|
|
dradb2(ido,l1,ch,c,wa+iw-1);
|
|
else
|
|
dradb2(ido,l1,c,ch,wa+iw-1);
|
|
na=1-na;
|
|
goto L115;
|
|
|
|
L106:
|
|
if(ip!=3)goto L109;
|
|
|
|
ix2=iw+ido;
|
|
if(na!=0)
|
|
dradb3(ido,l1,ch,c,wa+iw-1,wa+ix2-1);
|
|
else
|
|
dradb3(ido,l1,c,ch,wa+iw-1,wa+ix2-1);
|
|
na=1-na;
|
|
goto L115;
|
|
|
|
L109:
|
|
/* The radix five case can be translated later..... */
|
|
/* if(ip!=5)goto L112;
|
|
|
|
ix2=iw+ido;
|
|
ix3=ix2+ido;
|
|
ix4=ix3+ido;
|
|
if(na!=0)
|
|
dradb5(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1,wa+ix4-1);
|
|
else
|
|
dradb5(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1,wa+ix4-1);
|
|
na=1-na;
|
|
goto L115;
|
|
|
|
L112:*/
|
|
if(na!=0)
|
|
dradbg(ido,ip,l1,idl1,ch,ch,ch,c,c,wa+iw-1);
|
|
else
|
|
dradbg(ido,ip,l1,idl1,c,c,c,ch,ch,wa+iw-1);
|
|
if(ido==1)na=1-na;
|
|
|
|
L115:
|
|
l1=l2;
|
|
iw+=(ip-1)*ido;
|
|
}
|
|
|
|
if(na==0)return;
|
|
|
|
for(i=0;i<n;i++)c[i]=ch[i];
|
|
}
|
|
|
|
void drft_forward(drft_lookup *l,float *data){
|
|
if(l->n==1)return;
|
|
drftf1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache);
|
|
}
|
|
|
|
void drft_backward(drft_lookup *l,float *data){
|
|
if (l->n==1)return;
|
|
drftb1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache);
|
|
}
|
|
|
|
void drft_init(drft_lookup *l,int n){
|
|
l->n=n;
|
|
l->trigcache=_ogg_calloc(3*n,sizeof(*l->trigcache));
|
|
l->splitcache=_ogg_calloc(32,sizeof(*l->splitcache));
|
|
fdrffti(n, l->trigcache, l->splitcache);
|
|
}
|
|
|
|
void drft_clear(drft_lookup *l){
|
|
if(l){
|
|
if(l->trigcache)_ogg_free(l->trigcache);
|
|
if(l->splitcache)_ogg_free(l->splitcache);
|
|
memset(l,0,sizeof(*l));
|
|
}
|
|
}
|