From df57231ecf84aef1ce9208bc2f45799763d49fe9 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Aug 2021 18:13:39 +0900 Subject: [PATCH] tests: lib: cmsis_dsp: filtering: Add MISC F16 tests for 1.9.0 This commit adds the filtering MISC F16 test patterns and implementations for the CMSIS-DSP 1.9.0. Signed-off-by: Stephanos Ioannidis --- tests/lib/cmsis_dsp/filtering/CMakeLists.txt | 20 +- tests/lib/cmsis_dsp/filtering/src/main.c | 4 + tests/lib/cmsis_dsp/filtering/src/misc_f16.c | 315 +++++++++++ .../lib/cmsis_dsp/filtering/src/misc_f16.pat | 503 ++++++++++++++++++ 4 files changed, 834 insertions(+), 8 deletions(-) create mode 100644 tests/lib/cmsis_dsp/filtering/src/misc_f16.c create mode 100644 tests/lib/cmsis_dsp/filtering/src/misc_f16.pat diff --git a/tests/lib/cmsis_dsp/filtering/CMakeLists.txt b/tests/lib/cmsis_dsp/filtering/CMakeLists.txt index 98fc398e285..2f71ed92583 100644 --- a/tests/lib/cmsis_dsp/filtering/CMakeLists.txt +++ b/tests/lib/cmsis_dsp/filtering/CMakeLists.txt @@ -32,11 +32,15 @@ if(CONFIG_CMSIS_DSP_TEST_FILTERING_FIR) ) endif() -target_sources_ifdef( - CONFIG_CMSIS_DSP_TEST_FILTERING_MISC - app PRIVATE - src/misc_q7.c - src/misc_q15.c - src/misc_q31.c - src/misc_f32.c - ) +if(CONFIG_CMSIS_DSP_TEST_FILTERING_MISC) + target_sources(app PRIVATE + src/misc_q7.c + src/misc_q15.c + src/misc_q31.c + src/misc_f32.c + ) + + target_sources_ifdef(CONFIG_CMSIS_DSP_FLOAT16 app PRIVATE + src/misc_f16.c + ) +endif() diff --git a/tests/lib/cmsis_dsp/filtering/src/main.c b/tests/lib/cmsis_dsp/filtering/src/main.c index 54a79c1deb2..d4b0e592f37 100644 --- a/tests/lib/cmsis_dsp/filtering/src/main.c +++ b/tests/lib/cmsis_dsp/filtering/src/main.c @@ -22,6 +22,7 @@ extern void test_filtering_fir_f32(void); extern void test_filtering_misc_q7(void); extern void test_filtering_misc_q15(void); extern void test_filtering_misc_q31(void); +extern void test_filtering_misc_f16(void); extern void test_filtering_misc_f32(void); void test_main(void) @@ -50,6 +51,9 @@ void test_main(void) test_filtering_misc_q7(); test_filtering_misc_q15(); test_filtering_misc_q31(); +#ifdef CONFIG_CMSIS_DSP_FLOAT16 + test_filtering_misc_f16(); +#endif test_filtering_misc_f32(); #endif } diff --git a/tests/lib/cmsis_dsp/filtering/src/misc_f16.c b/tests/lib/cmsis_dsp/filtering/src/misc_f16.c new file mode 100644 index 00000000000..dd116569f55 --- /dev/null +++ b/tests/lib/cmsis_dsp/filtering/src/misc_f16.c @@ -0,0 +1,315 @@ +/* + * Copyright (c) 2021 Stephanos Ioannidis + * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include +#include "../../common/test_common.h" + +#include "misc_f16.pat" + +#define SNR_ERROR_THRESH ((float32_t)60) +#define REL_ERROR_THRESH (1.0e-4) +#define ABS_ERROR_THRESH (1.0e-3) +#define SNR_ERROR_THRESH_LD ((float32_t)52) +#define REL_ERROR_THRESH_LD (1.0e-3) +#define ABS_ERROR_THRESH_LD (1.0e-3) + +static void test_arm_correlate_f16( + size_t in1_length, size_t in2_length, const uint16_t *ref, + size_t ref_length) +{ + float16_t *output; + + /* Allocate output buffer */ + output = calloc(ref_length, sizeof(float16_t)); + + /* Run test function */ + arm_correlate_f16( + (float16_t *)in_com1, in1_length, + (float16_t *)in_com2, in2_length, output); + + /* Validate output */ + zassert_true( + test_snr_error_f16(ref_length, (float16_t *)ref, output, + SNR_ERROR_THRESH), + ASSERT_MSG_SNR_LIMIT_EXCEED); + + zassert_true( + test_close_error_f16(ref_length, (float16_t *)ref, output, + ABS_ERROR_THRESH, REL_ERROR_THRESH), + ASSERT_MSG_ERROR_LIMIT_EXCEED); + + /* Free output buffer */ + free(output); +} + +#define DEFINE_CORRELATE_TEST(a, b) \ + DEFINE_TEST_VARIANT4( \ + arm_correlate_f16, a##_##b, a, b, \ + ref_correlate_##a##_##b, ARRAY_SIZE(ref_correlate_##a##_##b)) + +DEFINE_CORRELATE_TEST(4, 1); +DEFINE_CORRELATE_TEST(4, 2); +DEFINE_CORRELATE_TEST(4, 3); +DEFINE_CORRELATE_TEST(4, 8); +DEFINE_CORRELATE_TEST(4, 11); +DEFINE_CORRELATE_TEST(5, 1); +DEFINE_CORRELATE_TEST(5, 2); +DEFINE_CORRELATE_TEST(5, 3); +DEFINE_CORRELATE_TEST(5, 8); +DEFINE_CORRELATE_TEST(5, 11); +DEFINE_CORRELATE_TEST(6, 1); +DEFINE_CORRELATE_TEST(6, 2); +DEFINE_CORRELATE_TEST(6, 3); +DEFINE_CORRELATE_TEST(6, 8); +DEFINE_CORRELATE_TEST(6, 11); +DEFINE_CORRELATE_TEST(9, 1); +DEFINE_CORRELATE_TEST(9, 2); +DEFINE_CORRELATE_TEST(9, 3); +DEFINE_CORRELATE_TEST(9, 8); +DEFINE_CORRELATE_TEST(9, 11); +DEFINE_CORRELATE_TEST(10, 1); +DEFINE_CORRELATE_TEST(10, 2); +DEFINE_CORRELATE_TEST(10, 3); +DEFINE_CORRELATE_TEST(10, 8); +DEFINE_CORRELATE_TEST(10, 11); +DEFINE_CORRELATE_TEST(11, 1); +DEFINE_CORRELATE_TEST(11, 2); +DEFINE_CORRELATE_TEST(11, 3); +DEFINE_CORRELATE_TEST(11, 8); +DEFINE_CORRELATE_TEST(11, 11); +DEFINE_CORRELATE_TEST(12, 1); +DEFINE_CORRELATE_TEST(12, 2); +DEFINE_CORRELATE_TEST(12, 3); +DEFINE_CORRELATE_TEST(12, 8); +DEFINE_CORRELATE_TEST(12, 11); +DEFINE_CORRELATE_TEST(13, 1); +DEFINE_CORRELATE_TEST(13, 2); +DEFINE_CORRELATE_TEST(13, 3); +DEFINE_CORRELATE_TEST(13, 8); +DEFINE_CORRELATE_TEST(13, 11); + +#if 0 +/* + * NOTE: These tests must be enabled once the arm_conv_f16 implementation is + * added. + */ +static void test_arm_conv_f16( + size_t in1_length, size_t in2_length, const uint16_t *ref, + size_t ref_length) +{ + float16_t *output; + + /* Allocate output buffer */ + output = calloc(ref_length, sizeof(float16_t)); + + /* Run test function */ + arm_conv_f16( + (float16_t *)in_com1, in1_length, + (float16_t *)in_com2, in2_length, output); + + /* Validate output */ + zassert_true( + test_snr_error_f16(ref_length, (float16_t *)ref, output, + SNR_ERROR_THRESH), + ASSERT_MSG_SNR_LIMIT_EXCEED); + + zassert_true( + test_close_error_f16(ref_length, (float16_t *)ref, output, + ABS_ERROR_THRESH, REL_ERROR_THRESH), + ASSERT_MSG_ERROR_LIMIT_EXCEED); + + /* Free output buffer */ + free(output); +} + +#define DEFINE_CONV_TEST(a, b) \ + DEFINE_TEST_VARIANT4( \ + arm_conv_f16, a##_##b, a, b, \ + ref_conv_##a##_##b, ARRAY_SIZE(ref_conv_##a##_##b)) + +DEFINE_CONV_TEST(4, 1); +DEFINE_CONV_TEST(4, 2); +DEFINE_CONV_TEST(4, 3); +DEFINE_CONV_TEST(4, 8); +DEFINE_CONV_TEST(4, 11); +DEFINE_CONV_TEST(5, 1); +DEFINE_CONV_TEST(5, 2); +DEFINE_CONV_TEST(5, 3); +DEFINE_CONV_TEST(5, 8); +DEFINE_CONV_TEST(5, 11); +DEFINE_CONV_TEST(6, 1); +DEFINE_CONV_TEST(6, 2); +DEFINE_CONV_TEST(6, 3); +DEFINE_CONV_TEST(6, 8); +DEFINE_CONV_TEST(6, 11); +DEFINE_CONV_TEST(9, 1); +DEFINE_CONV_TEST(9, 2); +DEFINE_CONV_TEST(9, 3); +DEFINE_CONV_TEST(9, 8); +DEFINE_CONV_TEST(9, 11); +DEFINE_CONV_TEST(10, 1); +DEFINE_CONV_TEST(10, 2); +DEFINE_CONV_TEST(10, 3); +DEFINE_CONV_TEST(10, 8); +DEFINE_CONV_TEST(10, 11); +DEFINE_CONV_TEST(11, 1); +DEFINE_CONV_TEST(11, 2); +DEFINE_CONV_TEST(11, 3); +DEFINE_CONV_TEST(11, 8); +DEFINE_CONV_TEST(11, 11); +DEFINE_CONV_TEST(12, 1); +DEFINE_CONV_TEST(12, 2); +DEFINE_CONV_TEST(12, 3); +DEFINE_CONV_TEST(12, 8); +DEFINE_CONV_TEST(12, 11); +DEFINE_CONV_TEST(13, 1); +DEFINE_CONV_TEST(13, 2); +DEFINE_CONV_TEST(13, 3); +DEFINE_CONV_TEST(13, 8); +DEFINE_CONV_TEST(13, 11); +#endif + +static void test_arm_levinson_durbin_f16( + size_t in_length, size_t err_index, const uint16_t *in, + const uint16_t *ref, size_t ref_length) +{ + float16_t *output; + float16_t err; + + /* Allocate output buffer */ + output = calloc(ref_length, sizeof(float16_t)); + + /* Run test function */ + arm_levinson_durbin_f16((const float16_t *)in, output, &err, + in_length); + + /* Validate output */ + zassert_true( + test_snr_error_f16(ref_length, (const float16_t *)ref, output, + SNR_ERROR_THRESH_LD), + ASSERT_MSG_SNR_LIMIT_EXCEED); + + zassert_true( + test_close_error_f16(ref_length, (const float16_t *)ref, + output, ABS_ERROR_THRESH_LD, REL_ERROR_THRESH_LD), + ASSERT_MSG_ERROR_LIMIT_EXCEED); + + zassert_true( + test_close_error_f16(1, + (const float16_t *)&in_levinson_durbin_err[err_index], + &(err), ABS_ERROR_THRESH_LD, REL_ERROR_THRESH_LD), + ASSERT_MSG_ERROR_LIMIT_EXCEED); + + /* Free output buffer */ + free(output); +} + +#define DEFINE_LEVINSON_DURBIN_TEST(a, b) \ + DEFINE_TEST_VARIANT5( \ + arm_levinson_durbin_f16, a##_##b, a, b, \ + in_levinson_durbin_##a##_##b, \ + ref_levinson_durbin_##a##_##b, \ + ARRAY_SIZE(ref_levinson_durbin_##a##_##b)) + +DEFINE_LEVINSON_DURBIN_TEST(7, 0); +DEFINE_LEVINSON_DURBIN_TEST(16, 1); +DEFINE_LEVINSON_DURBIN_TEST(23, 2); + +void test_filtering_misc_f16(void) +{ + ztest_test_suite(filtering_misc_f16, + ztest_unit_test(test_arm_correlate_f16_4_1), + ztest_unit_test(test_arm_correlate_f16_4_2), + ztest_unit_test(test_arm_correlate_f16_4_3), + ztest_unit_test(test_arm_correlate_f16_4_8), + ztest_unit_test(test_arm_correlate_f16_4_11), + ztest_unit_test(test_arm_correlate_f16_5_1), + ztest_unit_test(test_arm_correlate_f16_5_2), + ztest_unit_test(test_arm_correlate_f16_5_3), + ztest_unit_test(test_arm_correlate_f16_5_8), + ztest_unit_test(test_arm_correlate_f16_5_11), + ztest_unit_test(test_arm_correlate_f16_6_1), + ztest_unit_test(test_arm_correlate_f16_6_2), + ztest_unit_test(test_arm_correlate_f16_6_3), + ztest_unit_test(test_arm_correlate_f16_6_8), + ztest_unit_test(test_arm_correlate_f16_6_11), + ztest_unit_test(test_arm_correlate_f16_9_1), + ztest_unit_test(test_arm_correlate_f16_9_2), + ztest_unit_test(test_arm_correlate_f16_9_3), + ztest_unit_test(test_arm_correlate_f16_9_8), + ztest_unit_test(test_arm_correlate_f16_9_11), + ztest_unit_test(test_arm_correlate_f16_10_1), + ztest_unit_test(test_arm_correlate_f16_10_2), + ztest_unit_test(test_arm_correlate_f16_10_3), + ztest_unit_test(test_arm_correlate_f16_10_8), + ztest_unit_test(test_arm_correlate_f16_10_11), + ztest_unit_test(test_arm_correlate_f16_11_1), + ztest_unit_test(test_arm_correlate_f16_11_2), + ztest_unit_test(test_arm_correlate_f16_11_3), + ztest_unit_test(test_arm_correlate_f16_11_8), + ztest_unit_test(test_arm_correlate_f16_11_11), + ztest_unit_test(test_arm_correlate_f16_12_1), + ztest_unit_test(test_arm_correlate_f16_12_2), + ztest_unit_test(test_arm_correlate_f16_12_3), + ztest_unit_test(test_arm_correlate_f16_12_8), + ztest_unit_test(test_arm_correlate_f16_12_11), + ztest_unit_test(test_arm_correlate_f16_13_1), + ztest_unit_test(test_arm_correlate_f16_13_2), + ztest_unit_test(test_arm_correlate_f16_13_3), + ztest_unit_test(test_arm_correlate_f16_13_8), + ztest_unit_test(test_arm_correlate_f16_13_11), + /* NOTE: arm_conv_f16 is not implemented for now */ + /* ztest_unit_test(test_arm_conv_f16_4_1), */ + /* ztest_unit_test(test_arm_conv_f16_4_2), */ + /* ztest_unit_test(test_arm_conv_f16_4_3), */ + /* ztest_unit_test(test_arm_conv_f16_4_8), */ + /* ztest_unit_test(test_arm_conv_f16_4_11), */ + /* ztest_unit_test(test_arm_conv_f16_5_1), */ + /* ztest_unit_test(test_arm_conv_f16_5_2), */ + /* ztest_unit_test(test_arm_conv_f16_5_3), */ + /* ztest_unit_test(test_arm_conv_f16_5_8), */ + /* ztest_unit_test(test_arm_conv_f16_5_11), */ + /* ztest_unit_test(test_arm_conv_f16_6_1), */ + /* ztest_unit_test(test_arm_conv_f16_6_2), */ + /* ztest_unit_test(test_arm_conv_f16_6_3), */ + /* ztest_unit_test(test_arm_conv_f16_6_8), */ + /* ztest_unit_test(test_arm_conv_f16_6_11), */ + /* ztest_unit_test(test_arm_conv_f16_9_1), */ + /* ztest_unit_test(test_arm_conv_f16_9_2), */ + /* ztest_unit_test(test_arm_conv_f16_9_3), */ + /* ztest_unit_test(test_arm_conv_f16_9_8), */ + /* ztest_unit_test(test_arm_conv_f16_9_11), */ + /* ztest_unit_test(test_arm_conv_f16_10_1), */ + /* ztest_unit_test(test_arm_conv_f16_10_2), */ + /* ztest_unit_test(test_arm_conv_f16_10_3), */ + /* ztest_unit_test(test_arm_conv_f16_10_8), */ + /* ztest_unit_test(test_arm_conv_f16_10_11), */ + /* ztest_unit_test(test_arm_conv_f16_11_1), */ + /* ztest_unit_test(test_arm_conv_f16_11_2), */ + /* ztest_unit_test(test_arm_conv_f16_11_3), */ + /* ztest_unit_test(test_arm_conv_f16_11_8), */ + /* ztest_unit_test(test_arm_conv_f16_11_11), */ + /* ztest_unit_test(test_arm_conv_f16_12_1), */ + /* ztest_unit_test(test_arm_conv_f16_12_2), */ + /* ztest_unit_test(test_arm_conv_f16_12_3), */ + /* ztest_unit_test(test_arm_conv_f16_12_8), */ + /* ztest_unit_test(test_arm_conv_f16_12_11), */ + /* ztest_unit_test(test_arm_conv_f16_13_1), */ + /* ztest_unit_test(test_arm_conv_f16_13_2), */ + /* ztest_unit_test(test_arm_conv_f16_13_3), */ + /* ztest_unit_test(test_arm_conv_f16_13_8), */ + /* ztest_unit_test(test_arm_conv_f16_13_11), */ + ztest_unit_test(test_arm_levinson_durbin_f16_7_0), + ztest_unit_test(test_arm_levinson_durbin_f16_16_1), + ztest_unit_test(test_arm_levinson_durbin_f16_23_2) + ); + + ztest_run_test_suite(filtering_misc_f16); +} diff --git a/tests/lib/cmsis_dsp/filtering/src/misc_f16.pat b/tests/lib/cmsis_dsp/filtering/src/misc_f16.pat new file mode 100644 index 00000000000..33bebbeb313 --- /dev/null +++ b/tests/lib/cmsis_dsp/filtering/src/misc_f16.pat @@ -0,0 +1,503 @@ +static const uint16_t in_com1[128] = { + 0x3573, 0xb347, 0xb820, 0x3b24, 0xb212, 0x3b86, 0x3961, 0xb72d, + 0xb4b9, 0xb027, 0x3949, 0xa086, 0x9f90, 0x3497, 0xb5f5, 0x38f8, + 0xaf6c, 0x3461, 0x36c8, 0x38d0, 0xabaa, 0xb6a1, 0x33bc, 0xb9b2, + 0x251b, 0xb14d, 0xaf8e, 0xb522, 0xaf61, 0xb6f6, 0xb1d7, 0xb03f, + 0xb216, 0x9f6b, 0xa909, 0x2798, 0x283b, 0x2c52, 0xb127, 0x2148, + 0xb832, 0x39cb, 0x2b98, 0x3a2e, 0x29a8, 0xb438, 0xb123, 0xaa85, + 0x32b8, 0xacff, 0x38d1, 0x254e, 0xb320, 0xa31d, 0x3534, 0xb40f, + 0xb8a7, 0xb48f, 0xaf99, 0x3965, 0x3644, 0x2433, 0x394d, 0xb008, + 0x366e, 0xb5a7, 0x395c, 0xb137, 0xb81d, 0xac69, 0x38d7, 0x2987, + 0xbc00, 0x35ac, 0x39a6, 0xb2ee, 0x3056, 0xb8b3, 0x32d4, 0xace4, + 0xb537, 0xb991, 0xa216, 0xb8a2, 0xb743, 0xba48, 0x331e, 0x381f, + 0xb324, 0x360b, 0x307f, 0xb617, 0xb3ea, 0xb585, 0x33aa, 0x3552, + 0xb4c7, 0xb4c1, 0x34f0, 0xa904, 0xaf43, 0xba6f, 0xb2b6, 0xb458, + 0x35de, 0xb89c, 0x3093, 0x386b, 0xb2d8, 0x34e7, 0x318f, 0xb67a, + 0x2858, 0x31dd, 0xb209, 0x2c9e, 0x34c5, 0x34ba, 0xb5fd, 0xf2a, + 0xb453, 0x3658, 0xada2, 0xb2bf, 0xb0e0, 0xb105, 0xb439, 0x367c + }; + +static const uint16_t in_com2[128] = { + 0xa7ef, 0xa5d3, 0xb685, 0xb113, 0x31bd, 0xcb6, 0xa8f0, 0x35e5, + 0x3209, 0x36cf, 0x3533, 0xb2e9, 0x38ca, 0xb1d4, 0x3883, 0x31a0, + 0x3449, 0x21d4, 0x31e5, 0x335b, 0xb48e, 0xae9c, 0xb7b3, 0xb5c0, + 0xb63c, 0x3736, 0x3704, 0xb3e8, 0x159a, 0xafef, 0x317c, 0x249e, + 0xaf1d, 0x38c5, 0xb3b5, 0x3432, 0xa92a, 0x2f91, 0x37aa, 0x34ad, + 0xadd3, 0x3c00, 0x370a, 0x3017, 0x341b, 0xb696, 0xb454, 0xae12, + 0xb470, 0x2d7e, 0xb8f6, 0x3542, 0x3bc9, 0xaddc, 0xacf5, 0xb6e6, + 0x2d20, 0xb3fc, 0x2df4, 0xb72a, 0x2cc3, 0xb518, 0x348c, 0xb2de, + 0xb5d1, 0x25ef, 0x3323, 0x16a7, 0xbb6c, 0xb650, 0x3416, 0x39cd, + 0x27ea, 0xb33f, 0xb961, 0xa910, 0x28c4, 0xa701, 0x2e52, 0x355b, + 0xafbc, 0xb222, 0xb00c, 0x30a2, 0xb7ba, 0xa9bf, 0xae21, 0xae04, + 0xabf9, 0xb6b6, 0x3473, 0x3172, 0x3449, 0xa4d7, 0x392d, 0x307c, + 0xb204, 0x3133, 0x1e0f, 0x3302, 0x2dea, 0x2864, 0x2eb1, 0xb485, + 0xb6df, 0xb564, 0xb2f3, 0xb9f8, 0xac68, 0xb1d5, 0x2bdf, 0xabbb, + 0x3515, 0x25a3, 0xa985, 0xb464, 0x390b, 0x3177, 0x341b, 0x34c3, + 0xb2ea, 0xb840, 0x345a, 0x35de, 0xb63f, 0xac5c, 0x25e0, 0x3260 + }; + +static const uint16_t in_levinson_durbin_7_0[8] = { + 0x3c00, 0x2d65, 0x2fde, 0xaeab, 0xb18f, 0xb1ca, 0xa7f3, 0xa747 + }; + +static const uint16_t in_levinson_durbin_16_1[17] = { + 0x3c00, 0xac55, 0xabea, 0xb313, 0xb315, 0x33b8, 0xa886, 0x33d7, + 0xb279, 0x2c51, 0xa597, 0xae15, 0x311c, 0xaefe, 0xae8a, 0xaaf8, + 0x9725 + }; + +static const uint16_t in_levinson_durbin_23_2[24] = { + 0x3c00, 0x316f, 0x303b, 0x2931, 0x2ea4, 0x2d2f, 0x324a, 0x2c6d, + 0xa4e0, 0x347c, 0x2aea, 0x2e54, 0x28f3, 0xa249, 0xa9f2, 0xac8c, + 0xaf00, 0xafa3, 0x31dc, 0x2c69, 0x29b8, 0xaafe, 0x2643, 0xa8a6 + }; + +static const uint16_t in_levinson_durbin_err[3] = { + 0x3b55, 0x3940, 0x39fb + }; + +static const uint16_t ref_correlate_4_1[7] = { + 0x0, 0x0, 0x0, 0xa168, 0x1f38, 0x2417, 0xa715 + }; + +static const uint16_t ref_correlate_4_2[7] = { + 0x0, 0x0, 0x9fef, 0x9d83, 0x24ce, 0x9c6f, 0xa715 + }; + +static const uint16_t ref_correlate_4_3[7] = { + 0x0, 0xb071, 0x2d6f, 0x328d, 0xb585, 0x9c6f, 0xa715 + }; + +static const uint16_t ref_correlate_4_8[15] = { + 0x3004, 0xae34, 0xb1cb, 0x368f, 0xb024, 0xb23d, 0x353a, 0x2c0a, + 0xb585, 0x9c6f, 0xa715, 0x0, 0x0, 0x0, 0x0 + }; + +static const uint16_t ref_correlate_4_11[21] = { + 0x2f15, 0x2c8c, 0xb266, 0x30e8, 0x31f1, 0xa286, 0x368f, 0xb024, + 0xb23d, 0x353a, 0x2c0a, 0xb585, 0x9c6f, 0xa715, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0 + }; + +static const uint16_t ref_correlate_5_1[9] = { + 0x0, 0x0, 0x0, 0x0, 0xa168, 0x1f38, 0x2417, 0xa715, + 0x1e05 + }; + +static const uint16_t ref_correlate_5_2[9] = { + 0x0, 0x0, 0x0, 0x9fef, 0x9d83, 0x24ce, 0x9c6f, 0xa5fa, + 0x1e05 + }; + +static const uint16_t ref_correlate_5_3[9] = { + 0x0, 0x0, 0xb071, 0x2d6f, 0x328d, 0xb585, 0x2cac, 0xa5fa, + 0x1e05 + }; + +static const uint16_t ref_correlate_5_8[15] = { + 0x3004, 0xae34, 0xb1cb, 0x368f, 0xb260, 0xb201, 0x353a, 0x2773, + 0xb50a, 0x2cac, 0xa5fa, 0x1e05, 0x0, 0x0, 0x0 + }; + +static const uint16_t ref_correlate_5_11[21] = { + 0x2f15, 0x2c8c, 0xb266, 0x30e8, 0x2ff0, 0xadfb, 0x35fc, 0xb260, + 0xb201, 0x353a, 0x2773, 0xb50a, 0x2cac, 0xa5fa, 0x1e05, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0 + }; + +static const uint16_t ref_correlate_6_1[11] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0xa168, 0x1f38, 0x2417, + 0xa715, 0x1e05, 0xa777 + }; + +static const uint16_t ref_correlate_6_2[11] = { + 0x0, 0x0, 0x0, 0x0, 0x9fef, 0x9d83, 0x24ce, 0x9c6f, + 0xa5fa, 0xa3f2, 0xa777 + }; + +static const uint16_t ref_correlate_6_3[11] = { + 0x0, 0x0, 0x0, 0xb071, 0x2d6f, 0x328d, 0xb585, 0x2cac, + 0xb682, 0xa3f2, 0xa777 + }; + +static const uint16_t ref_correlate_6_8[15] = { + 0x3004, 0xae34, 0xb1cb, 0x368f, 0xb260, 0x3117, 0x34a5, 0x2785, + 0xb0ae, 0xace0, 0xb682, 0xa3f2, 0xa777, 0x0, 0x0 + }; + +static const uint16_t ref_correlate_6_11[21] = { + 0x2f15, 0x2c8c, 0xb266, 0x30e8, 0x2ff0, 0x32ca, 0x3a32, 0xa59a, + 0x3117, 0x34a5, 0x2785, 0xb0ae, 0xace0, 0xb682, 0xa3f2, 0xa777, + 0x0, 0x0, 0x0, 0x0, 0x0 + }; + +static const uint16_t ref_correlate_9_1[17] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05, 0xa777, 0xa556, 0x231e, + 0x20af + }; + +static const uint16_t ref_correlate_9_2[17] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9fef, + 0x9d83, 0x24ce, 0x9c6f, 0xa5fa, 0xa3f2, 0xa9b0, 0xa172, 0x2547, + 0x20af + }; + +static const uint16_t ref_correlate_9_3[17] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb071, 0x2d6f, + 0x328d, 0xb585, 0x2cac, 0xb682, 0xb4a2, 0x306d, 0x2f04, 0x2547, + 0x20af + }; + +static const uint16_t ref_correlate_9_8[17] = { + 0x0, 0x3004, 0xae34, 0xb1cb, 0x368f, 0xb260, 0x3117, 0x384e, + 0xb12d, 0xb399, 0x2b1f, 0xb8c0, 0xb457, 0x31ec, 0x2f04, 0x2547, + 0x20af + }; + +static const uint16_t ref_correlate_9_11[21] = { + 0x2f15, 0x2c8c, 0xb266, 0x30e8, 0x2ff0, 0x32ca, 0x3bf1, 0x2f95, + 0x9362, 0x353f, 0xb2f5, 0xb399, 0x2b1f, 0xb8c0, 0xb457, 0x31ec, + 0x2f04, 0x2547, 0x20af, 0x0, 0x0 + }; + +static const uint16_t ref_correlate_10_1[19] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05, 0xa777, 0xa556, + 0x231e, 0x20af, 0x1c1e + }; + +static const uint16_t ref_correlate_10_2[19] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x9fef, 0x9d83, 0x24ce, 0x9c6f, 0xa5fa, 0xa3f2, 0xa9b0, 0xa172, + 0x2547, 0x2232, 0x1c1e + }; + +static const uint16_t ref_correlate_10_3[19] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb071, + 0x2d6f, 0x328d, 0xb585, 0x2cac, 0xb682, 0xb4a2, 0x306d, 0x2f04, + 0x2cb4, 0x2232, 0x1c1e + }; + +static const uint16_t ref_correlate_10_8[19] = { + 0x0, 0x0, 0x3004, 0xae34, 0xb1cb, 0x368f, 0xb260, 0x3117, + 0x384e, 0xb12d, 0xb399, 0x2002, 0xb8b6, 0xb457, 0x312d, 0x302b, + 0x2cb4, 0x2232, 0x1c1e + }; + +static const uint16_t ref_correlate_10_11[21] = { + 0x2f15, 0x2c8c, 0xb266, 0x30e8, 0x2ff0, 0x32ca, 0x3bf1, 0x2f95, + 0x9362, 0x3493, 0xb45d, 0xb431, 0x2002, 0xb8b6, 0xb457, 0x312d, + 0x302b, 0x2cb4, 0x2232, 0x1c1e, 0x0 + }; + +static const uint16_t ref_correlate_11_1[21] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05, 0xa777, + 0xa556, 0x231e, 0x20af, 0x1c1e, 0xa53e + }; + +static const uint16_t ref_correlate_11_2[21] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x9fef, 0x9d83, 0x24ce, 0x9c6f, 0xa5fa, 0xa3f2, 0xa9b0, + 0xa172, 0x2547, 0x2232, 0xa1a3, 0xa53e + }; + +static const uint16_t ref_correlate_11_3[21] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xb071, 0x2d6f, 0x328d, 0xb585, 0x2cac, 0xb682, 0xb4a2, 0x306d, + 0x2f04, 0x2cb4, 0xb41d, 0xa1a3, 0xa53e + }; + +static const uint16_t ref_correlate_11_8[21] = { + 0x0, 0x0, 0x0, 0x3004, 0xae34, 0xb1cb, 0x368f, 0xb260, + 0x3117, 0x384e, 0xb12d, 0xb399, 0x2002, 0xb586, 0xb4c0, 0x312f, + 0x33f5, 0xa800, 0xb41d, 0xa1a3, 0xa53e + }; + +static const uint16_t ref_correlate_11_11[21] = { + 0x2f15, 0x2c8c, 0xb266, 0x30e8, 0x2ff0, 0x32ca, 0x3bf1, 0x2f95, + 0x9362, 0x3493, 0xab6d, 0x24e9, 0x303d, 0xb586, 0xb4c0, 0x312f, + 0x33f5, 0xa800, 0xb41d, 0xa1a3, 0xa53e + }; + +static const uint16_t ref_correlate_12_1[23] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05, + 0xa777, 0xa556, 0x231e, 0x20af, 0x1c1e, 0xa53e, 0xc7c + }; + +static const uint16_t ref_correlate_12_2[23] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x9fef, 0x9d83, 0x24ce, 0x9c6f, 0xa5fa, 0xa3f2, + 0xa9b0, 0xa172, 0x2547, 0x2232, 0xa1a3, 0xa531, 0xc7c + }; + +static const uint16_t ref_correlate_12_3[23] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xb071, 0x2d6f, 0x328d, 0xb585, 0x2cac, 0xb682, 0xb4a2, + 0x306d, 0x2f04, 0x2cb4, 0xb41d, 0x9f96, 0xa531, 0xc7c + }; + +static const uint16_t ref_correlate_12_8[23] = { + 0x0, 0x0, 0x0, 0x0, 0x3004, 0xae34, 0xb1cb, 0x368f, + 0xb260, 0x3117, 0x384e, 0xb12d, 0xb399, 0x2002, 0xb586, 0xb4cd, + 0x3132, 0x33f5, 0xa834, 0xb417, 0x9f96, 0xa531, 0xc7c + }; + +static const uint16_t ref_correlate_12_11[23] = { + 0x0, 0x2f15, 0x2c8c, 0xb266, 0x30e8, 0x2ff0, 0x32ca, 0x3bf1, + 0x2f95, 0x9362, 0x3493, 0xab6d, 0x242d, 0x301e, 0xb58d, 0xb4cd, + 0x3132, 0x33f5, 0xa834, 0xb417, 0x9f96, 0xa531, 0xc7c + }; + +static const uint16_t ref_correlate_13_1[25] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xa168, 0x1f38, 0x2417, 0xa715, + 0x1e05, 0xa777, 0xa556, 0x231e, 0x20af, 0x1c1e, 0xa53e, 0xc7c, + 0xb80 + }; + +static const uint16_t ref_correlate_13_2[25] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x9fef, 0x9d83, 0x24ce, 0x9c6f, 0xa5fa, + 0xa3f2, 0xa9b0, 0xa172, 0x2547, 0x2232, 0xa1a3, 0xa531, 0xf3d, + 0xb80 + }; + +static const uint16_t ref_correlate_13_3[25] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xb071, 0x2d6f, 0x328d, 0xb585, 0x2cac, 0xb682, + 0xb4a2, 0x306d, 0x2f04, 0x2cb4, 0xb41d, 0x9f96, 0xa46c, 0xf3d, + 0xb80 + }; + +static const uint16_t ref_correlate_13_8[25] = { + 0x0, 0x0, 0x0, 0x0, 0x0, 0x3004, 0xae34, 0xb1cb, + 0x368f, 0xb260, 0x3117, 0x384e, 0xb12d, 0xb399, 0x2002, 0xb586, + 0xb4cd, 0x311b, 0x33f7, 0xa834, 0xb41d, 0x9e63, 0xa46c, 0xf3d, + 0xb80 + }; + +static const uint16_t ref_correlate_13_11[25] = { + 0x0, 0x0, 0x2f15, 0x2c8c, 0xb266, 0x30e8, 0x2ff0, 0x32ca, + 0x3bf1, 0x2f95, 0x9362, 0x3493, 0xab6d, 0x242d, 0x300a, 0xb59a, + 0xb4d3, 0x311b, 0x33f7, 0xa834, 0xb41d, 0x9e63, 0xa46c, 0xf3d, + 0xb80 + }; + +static const uint16_t ref_conv_4_1[4] = { + 0xa168, 0x1f38, 0x2417, 0xa715 + }; + +static const uint16_t ref_conv_4_2[5] = { + 0xa168, 0x91bd, 0x256a, 0xa415, 0xa533 + }; + +static const uint16_t ref_conv_4_3[6] = { + 0xa168, 0x91bd, 0xaf87, 0x2ce9, 0x3212, 0xb5d2 + }; + +static const uint16_t ref_conv_4_8[11] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x3497, 0xb52a, 0xb3e9, 0x34b5, + 0xac13, 0xb32e, 0x3543 + }; + +static const uint16_t ref_conv_4_11[14] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x3497, 0xb52a, 0xb3e9, 0x34b5, + 0x10b1, 0xafd4, 0x33dc, 0xaffe, 0x32cc, 0x34a4 + }; + +static const uint16_t ref_conv_5_1[5] = { + 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05 + }; + +static const uint16_t ref_conv_5_2[6] = { + 0xa168, 0x91bd, 0x256a, 0xa415, 0xa363, 0x1c6b + }; + +static const uint16_t ref_conv_5_3[7] = { + 0xa168, 0x91bd, 0xaf87, 0x2ce9, 0x3242, 0xb5c0, 0x2cf3 + }; + +static const uint16_t ref_conv_5_8[12] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb518, 0xb170, 0x3530, + 0xae40, 0xb32e, 0x3561, 0xac79 + }; + +static const uint16_t ref_conv_5_11[15] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb518, 0xb170, 0x3530, + 0xa848, 0xafd5, 0x340c, 0xb23c, 0x31a7, 0x32b3, 0xabe4 + }; + +static const uint16_t ref_conv_6_1[6] = { + 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05, 0xa777 + }; + +static const uint16_t ref_conv_6_2[7] = { + 0xa168, 0x91bd, 0x256a, 0xa415, 0xa363, 0xa65c, 0xa57a + }; + +static const uint16_t ref_conv_6_3[8] = { + 0xa168, 0x91bd, 0xaf87, 0x2ce9, 0x3242, 0xb638, 0x2b28, 0xb622 + }; + +static const uint16_t ref_conv_6_8[13] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb21f, 0xab8d, + 0xb3e6, 0xab23, 0x3562, 0xaecc, 0x358c + }; + +static const uint16_t ref_conv_6_11[16] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb21f, 0xab8d, + 0xb1d8, 0x29ed, 0x340d, 0xb365, 0x382f, 0x3630, 0x356b, 0x34e4 + }; + +static const uint16_t ref_conv_9_1[9] = { + 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05, 0xa777, 0xa556, 0x231e, + 0x20af + }; + +static const uint16_t ref_conv_9_2[10] = { + 0xa168, 0x91bd, 0x256a, 0xa415, 0xa363, 0xa65c, 0xa968, 0x95b8, + 0x24f4, 0x1ee0 + }; + +static const uint16_t ref_conv_9_3[11] = { + 0xa168, 0x91bd, 0xaf87, 0x2ce9, 0x3242, 0xb638, 0x287d, 0xb628, + 0xb413, 0x3210, 0x2fb2 + }; + +static const uint16_t ref_conv_9_8[16] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb2ca, 0xabba, + 0xb803, 0x26ef, 0x3930, 0xb078, 0x3448, 0x343d, 0xb0ec, 0xaef6 + }; + +static const uint16_t ref_conv_9_11[19] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb2ca, 0xabba, + 0xb6ff, 0x3022, 0x3885, 0xb43b, 0x371b, 0x3937, 0x34fc, 0x3660, + 0xa72d, 0xb457, 0xae23 + }; + +static const uint16_t ref_conv_10_1[10] = { + 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05, 0xa777, 0xa556, 0x231e, + 0x20af, 0x1c1e + }; + +static const uint16_t ref_conv_10_2[11] = { + 0xa168, 0x91bd, 0x256a, 0xa415, 0xa363, 0xa65c, 0xa968, 0x95b8, + 0x24f4, 0x217f, 0x1a0c + }; + +static const uint16_t ref_conv_10_3[12] = { + 0xa168, 0x91bd, 0xaf87, 0x2ce9, 0x3242, 0xb638, 0x287d, 0xb628, + 0xb413, 0x3231, 0x2fe3, 0x2ac5 + }; + +static const uint16_t ref_conv_10_8[17] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb2ca, 0xabba, + 0xb803, 0x27f7, 0x3936, 0xad8d, 0x349c, 0x33bc, 0xb0ed, 0xaea4, + 0xaa1f + }; + +static const uint16_t ref_conv_10_11[20] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb2ca, 0xabba, + 0xb6ff, 0x3043, 0x388b, 0xb2c5, 0x3770, 0x3907, 0x34fc, 0x3674, + 0xacdb, 0xb4bb, 0xb0d6, 0xa966 + }; + +static const uint16_t ref_conv_11_1[11] = { + 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05, 0xa777, 0xa556, 0x231e, + 0x20af, 0x1c1e, 0xa53e + }; + +static const uint16_t ref_conv_11_2[12] = { + 0xa168, 0x91bd, 0x256a, 0xa415, 0xa363, 0xa65c, 0xa968, 0x95b8, + 0x24f4, 0x217f, 0xa47c, 0xa3b2 + }; + +static const uint16_t ref_conv_11_3[13] = { + 0xa168, 0x91bd, 0xaf87, 0x2ce9, 0x3242, 0xb638, 0x287d, 0xb628, + 0xb413, 0x3231, 0x2e93, 0x28d8, 0xb44f + }; + +static const uint16_t ref_conv_11_8[18] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb2ca, 0xabba, + 0xb803, 0x27f7, 0x390c, 0xae83, 0x24dd, 0x3062, 0xa888, 0xaea1, + 0xacb1, 0x33ca + }; + +static const uint16_t ref_conv_11_11[21] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb2ca, 0xabba, + 0xb6ff, 0x3043, 0x3862, 0xb341, 0x3242, 0x3830, 0x36e1, 0x3675, + 0xae7c, 0xaab1, 0xa6ca, 0x33a6, 0x32de + }; + +static const uint16_t ref_conv_12_1[12] = { + 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05, 0xa777, 0xa556, 0x231e, + 0x20af, 0x1c1e, 0xa53e, 0xc7c + }; + +static const uint16_t ref_conv_12_2[13] = { + 0xa168, 0x91bd, 0x256a, 0xa415, 0xa363, 0xa65c, 0xa968, 0x95b8, + 0x24f4, 0x217f, 0xa47c, 0xa38e, 0xa96 + }; + +static const uint16_t ref_conv_12_3[14] = { + 0xa168, 0x91bd, 0xaf87, 0x2ce9, 0x3242, 0xb638, 0x287d, 0xb628, + 0xb413, 0x3231, 0x2e93, 0x28e1, 0xb44e, 0x1b5f + }; + +static const uint16_t ref_conv_12_8[19] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb2ca, 0xabba, + 0xb803, 0x27f7, 0x390c, 0xae7f, 0x24ea, 0x307f, 0xa85b, 0xaebb, + 0xacb1, 0x33cd, 0x9aab + }; + +static const uint16_t ref_conv_12_11[22] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb2ca, 0xabba, + 0xb6ff, 0x3043, 0x3862, 0xb33e, 0x3244, 0x3838, 0x36e7, 0x366e, + 0xae7c, 0xaaa6, 0xa79f, 0x3398, 0x32c0, 0x99e1 + }; + +static const uint16_t ref_conv_13_1[13] = { + 0xa168, 0x1f38, 0x2417, 0xa715, 0x1e05, 0xa777, 0xa556, 0x231e, + 0x20af, 0x1c1e, 0xa53e, 0xc7c, 0xb80 + }; + +static const uint16_t ref_conv_13_2[14] = { + 0xa168, 0x91bd, 0x256a, 0xa415, 0xa363, 0xa65c, 0xa968, 0x95b8, + 0x24f4, 0x217f, 0xa47c, 0xa38e, 0xf0b, 0x982 + }; + +static const uint16_t ref_conv_13_3[15] = { + 0xa168, 0x91bd, 0xaf87, 0x2ce9, 0x3242, 0xb638, 0x287d, 0xb628, + 0xb413, 0x3231, 0x2e93, 0x28e1, 0xb44d, 0x1bb7, 0x1a2a + }; + +static const uint16_t ref_conv_13_8[20] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb2ca, 0xabba, + 0xb803, 0x27f7, 0x390c, 0xae7f, 0x24f9, 0x3081, 0xa7f0, 0xaea8, + 0xacc7, 0x33cd, 0x9a15, 0x9993 + }; + +static const uint16_t ref_conv_13_11[23] = { + 0xa168, 0x91bd, 0xaf87, 0x25d1, 0x34af, 0xb58f, 0xb2ca, 0xabba, + 0xb6ff, 0x3043, 0x3862, 0xb33e, 0x3246, 0x3838, 0x36f3, 0x3673, + 0xae92, 0xaaa6, 0xa78d, 0x3382, 0x32b4, 0x9e28, 0x98ea + }; + +static const uint16_t ref_levinson_durbin_7_0[7] = { + 0x2a0c, 0x304d, 0xade0, 0xb180, 0xb03c, 0x2682, 0xa5ba + }; + +static const uint16_t ref_levinson_durbin_16_1[16] = { + 0x2994, 0xb2bb, 0xb0d2, 0xb4ad, 0x344c, 0xb18f, 0x34b4, 0xb3e6, + 0x350d, 0xb15c, 0x1cba, 0xac20, 0x2641, 0xb567, 0x2c57, 0xb0be + }; + +static const uint16_t ref_levinson_durbin_23_2[23] = { + 0x3098, 0x2d4f, 0xa91b, 0x2e5f, 0x2443, 0x3381, 0x23df, 0xaeca, + 0x34a8, 0xaa9f, 0x2b43, 0x9d5e, 0xafe0, 0x1ee5, 0xb125, 0xb020, + 0xad0b, 0x3090, 0x2e9a, 0xa05b, 0xa5de, 0x2eaa, 0xa544 + }; +