You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Make tables that fit in one byte (u)int8_t
Originally committed as revision 13375 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -120,11 +120,12 @@ static int irms(const short *data, int factor)
|
|||||||
|
|
||||||
/* multiply/add wavetable */
|
/* multiply/add wavetable */
|
||||||
static void add_wav(int n, int f, int m1, int m2, int m3, const short *s1,
|
static void add_wav(int n, int f, int m1, int m2, int m3, const short *s1,
|
||||||
const short *s2, const short *s3, short *dest)
|
const int8_t *s2, const int8_t *s3, short *dest)
|
||||||
{
|
{
|
||||||
int a = 0;
|
int a = 0;
|
||||||
int b, c, i;
|
int b, c, i;
|
||||||
const short *ptr, *ptr2;
|
const short *ptr;
|
||||||
|
const uint8_t *ptr2;
|
||||||
|
|
||||||
ptr = wavtable1[n];
|
ptr = wavtable1[n];
|
||||||
ptr2 = wavtable2[n];
|
ptr2 = wavtable2[n];
|
||||||
|
@@ -282,7 +282,7 @@ static const signed short wavtable1[256][9] = {
|
|||||||
{ 814, 744, 543, -592, -865, -790, -648, -541, -577}
|
{ 814, 744, 543, -592, -865, -790, -648, -541, -577}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned short wavtable2[256][9] = {
|
static const uint8_t wavtable2[256][9] = {
|
||||||
{14, 14, 14, 20, 20, 19, 21, 20, 20},
|
{14, 14, 14, 20, 20, 19, 21, 20, 20},
|
||||||
{14, 14, 14, 20, 20, 20, 20, 21, 21},
|
{14, 14, 14, 20, 20, 20, 20, 21, 21},
|
||||||
{14, 13, 14, 18, 20, 19, 21, 18, 21},
|
{14, 13, 14, 18, 20, 19, 21, 18, 21},
|
||||||
@@ -541,7 +541,7 @@ static const unsigned short wavtable2[256][9] = {
|
|||||||
{ 8, 11, 10, 10, 10, 13, 8, 14, 13}
|
{ 8, 11, 10, 10, 10, 13, 8, 14, 13}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const signed short etable1[128][40]={
|
static const int8_t etable1[128][40]={
|
||||||
{
|
{
|
||||||
38, -4, 15, -4, 14, -13, 12, -11, -2, -6,
|
38, -4, 15, -4, 14, -13, 12, -11, -2, -6,
|
||||||
-6, -11, -45, -16, -11, -13, -7, 6, -12, 4,
|
-6, -11, -45, -16, -11, -13, -7, 6, -12, 4,
|
||||||
@@ -1185,7 +1185,7 @@ static const signed short etable1[128][40]={
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const signed short etable2[128][40]={
|
static const int8_t etable2[128][40]={
|
||||||
{
|
{
|
||||||
73, -32, -60, -15, -26, 59, 2, -33, 30, -10,
|
73, -32, -60, -15, -26, 59, 2, -33, 30, -10,
|
||||||
-3, -17, 8, 30, -1, -26, -4, -22, 10, 16,
|
-3, -17, 8, 30, -1, -26, -4, -22, 10, 16,
|
||||||
|
Reference in New Issue
Block a user