mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
Call DCT by function pointer. Needed for any future ASM implementation and
allows further cleanup. Originally committed as revision 22617 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
89d7df7c74
commit
e30ab38e94
@ -105,7 +105,7 @@ static void ff_dct_calc_c(DCTContext *ctx, FFTSample *data)
|
|||||||
|
|
||||||
void ff_dct_calc(DCTContext *s, FFTSample *data)
|
void ff_dct_calc(DCTContext *s, FFTSample *data)
|
||||||
{
|
{
|
||||||
ff_dct_calc_c(s, data);
|
s->dct_calc(s, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
av_cold int ff_dct_init(DCTContext *s, int nbits, int inverse)
|
av_cold int ff_dct_init(DCTContext *s, int nbits, int inverse)
|
||||||
@ -130,6 +130,8 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, int inverse)
|
|||||||
for (i = 0; i < n/2; i++)
|
for (i = 0; i < n/2; i++)
|
||||||
s->csc2[i] = 0.5 / sin((M_PI / (2*n) * (2*i + 1)));
|
s->csc2[i] = 0.5 / sin((M_PI / (2*n) * (2*i + 1)));
|
||||||
|
|
||||||
|
s->dct_calc = ff_dct_calc_c;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,6 +220,7 @@ struct DCTContext {
|
|||||||
RDFTContext rdft;
|
RDFTContext rdft;
|
||||||
const float *costab;
|
const float *costab;
|
||||||
FFTSample *csc2;
|
FFTSample *csc2;
|
||||||
|
void (*dct_calc)(struct DCTContext *s, FFTSample *data);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user