mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-05 00:36:57 +00:00
COMMON: Move cosine/sine tables out of header files
Access is now restricted to using the getSineTable()/getCosineTable() helper functions.
This commit is contained in:
parent
54f25aa843
commit
6334ec413f
8274
common/cosinetables.cpp
Normal file
8274
common/cosinetables.cpp
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -26,6 +26,7 @@
|
||||
// Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
|
||||
// Copyright (c) 2010 Vitor Sessak
|
||||
|
||||
#include "common/cosinetables.h"
|
||||
#include "common/dct.h"
|
||||
|
||||
namespace Common {
|
||||
|
@ -1,44 +0,0 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
// Based on eos' math code
|
||||
|
||||
#include "common/math.h"
|
||||
|
||||
#include "common/sinetables.h"
|
||||
#include "common/cosinetables.h"
|
||||
|
||||
namespace Common {
|
||||
|
||||
const float *getSineTable(int bits) {
|
||||
assert((bits >= 4) && (bits <= 16));
|
||||
|
||||
return sinTables[bits];
|
||||
}
|
||||
|
||||
const float *getCosineTable(int bits) {
|
||||
assert((bits >= 4) && (bits <= 16));
|
||||
|
||||
return cosTables[bits];
|
||||
}
|
||||
|
||||
} // End of namespace Common
|
@ -50,9 +50,6 @@ struct Complex {
|
||||
float re, im;
|
||||
};
|
||||
|
||||
const float *getSineTable(int bits);
|
||||
const float *getCosineTable(int bits);
|
||||
|
||||
// See http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup
|
||||
static const char LogTable256[256] = {
|
||||
#define LT(n) n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n
|
||||
|
@ -38,11 +38,12 @@ MODULE_OBJS := \
|
||||
ifdef USE_BINK
|
||||
MODULE_OBJS += \
|
||||
bitstream.o \
|
||||
cosinetables.o \
|
||||
dct.o \
|
||||
fft.o \
|
||||
huffman.o \
|
||||
math.o \
|
||||
rdft.o
|
||||
rdft.o \
|
||||
sinetables.o
|
||||
endif
|
||||
|
||||
# Include common rules
|
||||
|
@ -25,6 +25,8 @@
|
||||
// Copyright (c) 2009 Alex Converse <alex dot converse at gmail dot com>
|
||||
|
||||
#include "common/rdft.h"
|
||||
#include "common/cosinetables.h"
|
||||
#include "common/sinetables.h"
|
||||
|
||||
namespace Common {
|
||||
|
||||
|
8274
common/sinetables.cpp
Normal file
8274
common/sinetables.cpp
Normal file
File diff suppressed because it is too large
Load Diff
8245
common/sinetables.h
8245
common/sinetables.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user