Go to the documentation of this file.
26 #define randomize_int32(buf, len) \
28 for (int i = 0; i < len; i++) { \
29 int32_t f = ((int)(UINT32_MAX >> 17)) - ((int)(rnd() >> 16)); \
49 for (
int i = 0;
i <
len;
i++) {
51 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
52 i, dst0[
i], dst1[
i], dst0[
i] - dst1[
i]);
77 for (
int i = 0;
i < 5000 + 2;
i++) {
84 for (
size_t i = 0;
i <= lag;
i++) {
86 fprintf(stderr,
"%zu: %- .12f - %- .12f = % .12g\n",
87 i, dst0[
i], dst1[
i], dst0[
i] - dst1[
i]);
99 int len = 2000 +
rnd() % 3000;
100 static const int lags[] = { 8, 12, };
104 if (
check_func(
ctx.lpc_apply_welch_window,
"apply_welch_window_even")) {
107 report(
"apply_welch_window_even");
109 if (
check_func(
ctx.lpc_apply_welch_window,
"apply_welch_window_odd")) {
112 report(
"apply_welch_window_odd");
117 if (
check_func(
ctx.lpc_compute_autocorr,
"autocorr_%d_even", lags[
i]))
120 if (
check_func(
ctx.lpc_compute_autocorr,
"autocorr_%d_odd", lags[
i]))
125 report(
"compute_autocorr");
void checkasm_check_lpc(void)
#define randomize_int32(buf, len)
av_cold int ff_lpc_init(LPCContext *s, int blocksize, int max_order, enum FFLPCType lpc_type)
Initialize LPCContext.
static void test_window(int len)
#define check_func(func,...)
int double_near_abs_eps(double a, double b, double eps)
@ FF_LPC_TYPE_DEFAULT
use the codec default LPC type
#define FF_ARRAY_ELEMS(a)
#define LOCAL_ALIGNED(a, t, v,...)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
av_cold void ff_lpc_end(LPCContext *s)
Uninitialize LPCContext.
#define i(width, name, range_min, range_max)
#define declare_func(ret,...)
static void test_compute_autocorr(ptrdiff_t len, int lag)