diff --git a/src/audio/Kconfig b/src/audio/Kconfig index 118a740a5906..aa12aba11542 100644 --- a/src/audio/Kconfig +++ b/src/audio/Kconfig @@ -180,6 +180,16 @@ config FORMAT_U8 help Support unsigned 8 bit processing data format +config FORMAT_A_LAW + bool "Support A-law" + help + Support 8 bit A-law processing data format. + +config FORMAT_MU_LAW + bool "Support mu-law" + help + Support 8 bit mu-law processing data format. + config FORMAT_S16LE bool "Support S16LE" default y @@ -228,6 +238,18 @@ config PCM_CONVERTER_FORMAT_U8 help Support 8 bit processing data format without sign +config PCM_CONVERTER_FORMAT_A_LAW + bool "Support A-law" + select MATH_A_LAW_CODEC + help + Support 8 bit A-law data format. + +config PCM_CONVERTER_FORMAT_MU_LAW + bool "Support mu-law" + select MATH_MU_LAW_CODEC + help + Support 8 bit mu-law data format. + config PCM_CONVERTER_FORMAT_S16LE bool "Support S16LE" default y diff --git a/src/audio/copier/copier_host.c b/src/audio/copier/copier_host.c index 323ecab4837d..f430803084a0 100644 --- a/src/audio/copier/copier_host.c +++ b/src/audio/copier/copier_host.c @@ -149,15 +149,28 @@ __cold int copier_host_create(struct comp_dev *dev, struct copier_data *cd, config->type = SOF_COMP_HOST; cd->gtw_type = ipc4_gtw_host; - audio_stream_fmt_conversion(copier_cfg->base.audio_fmt.depth, - copier_cfg->base.audio_fmt.valid_bit_depth, - &in_frame_fmt, &in_valid_fmt, - copier_cfg->base.audio_fmt.s_type); - - audio_stream_fmt_conversion(copier_cfg->out_fmt.depth, - copier_cfg->out_fmt.valid_bit_depth, - &out_frame_fmt, &out_valid_fmt, - copier_cfg->out_fmt.s_type); + ret = audio_stream_fmt_conversion(copier_cfg->base.audio_fmt.depth, + copier_cfg->base.audio_fmt.valid_bit_depth, + &in_frame_fmt, &in_valid_fmt, + copier_cfg->base.audio_fmt.s_type); + if (ret) { + comp_err(dev, "failed with input format: depth %d, valid %d, type %d", + copier_cfg->base.audio_fmt.depth, + copier_cfg->base.audio_fmt.valid_bit_depth, + copier_cfg->base.audio_fmt.s_type); + return ret; + } + + ret = audio_stream_fmt_conversion(copier_cfg->out_fmt.depth, + copier_cfg->out_fmt.valid_bit_depth, + &out_frame_fmt, &out_valid_fmt, + copier_cfg->out_fmt.s_type); + if (ret) { + comp_err(dev, "failed with output format: depth %d, valid %d, type %d", + copier_cfg->out_fmt.depth, copier_cfg->out_fmt.valid_bit_depth, + copier_cfg->out_fmt.s_type); + return ret; + } memset(&ipc_host, 0, sizeof(ipc_host)); ipc_host.direction = dir; diff --git a/src/audio/pcm_converter/pcm_converter_generic.c b/src/audio/pcm_converter/pcm_converter_generic.c index 3d4110c57165..f6beea3c977f 100644 --- a/src/audio/pcm_converter/pcm_converter_generic.c +++ b/src/audio/pcm_converter/pcm_converter_generic.c @@ -21,6 +21,8 @@ #include #include +#include +#include #include #include #include @@ -93,6 +95,126 @@ static int pcm_convert_s32_to_u8(const struct audio_stream *source, } #endif /* CONFIG_PCM_CONVERTER_FORMAT_U8 && CONFIG_PCM_CONVERTER_FORMAT_S32LE */ +#if CONFIG_PCM_CONVERTER_FORMAT_A_LAW && CONFIG_PCM_CONVERTER_FORMAT_S32LE +static int pcm_convert_alaw_to_s32(const struct audio_stream *source, + uint32_t ioffset, struct audio_stream *sink, + uint32_t ooffset, uint32_t samples, uint32_t chmap) +{ + const uint8_t *src = audio_stream_get_rptr(source); + int32_t *dst = audio_stream_get_wptr(sink); + uint32_t processed; + uint32_t nmax, i, n; + + src += ioffset; + dst += ooffset; + for (processed = 0; processed < samples; processed += n) { + src = audio_stream_wrap(source, (void *)src); + dst = audio_stream_wrap(sink, dst); + n = samples - processed; + nmax = audio_stream_bytes_without_wrap(source, src) >> BYTES_TO_U8_SAMPLES; + n = MIN(n, nmax); + nmax = audio_stream_bytes_without_wrap(sink, dst) >> BYTES_TO_S32_SAMPLES; + n = MIN(n, nmax); + for (i = 0; i < n; i++) { + *dst = sofm_a_law_decode(*src) << 16; + src++; + dst++; + } + } + + return samples; +} + +static int pcm_convert_s32_to_alaw(const struct audio_stream *source, + uint32_t ioffset, struct audio_stream *sink, + uint32_t ooffset, uint32_t samples, uint32_t chmap) +{ + const int32_t *src = audio_stream_get_rptr(source); + uint8_t *dst = audio_stream_get_wptr(sink); + uint32_t processed; + uint32_t nmax, i, n; + + src += ioffset; + dst += ooffset; + for (processed = 0; processed < samples; processed += n) { + src = audio_stream_wrap(source, (void *)src); + dst = audio_stream_wrap(sink, dst); + n = samples - processed; + nmax = audio_stream_bytes_without_wrap(source, src) >> BYTES_TO_S32_SAMPLES; + n = MIN(n, nmax); + nmax = audio_stream_bytes_without_wrap(sink, dst) >> BYTES_TO_U8_SAMPLES; + n = MIN(n, nmax); + for (i = 0; i < n; i++) { + *dst = sofm_a_law_encode(*src >> 16); + src++; + dst++; + } + } + + return samples; +} +#endif /* CONFIG_PCM_CONVERTER_FORMAT_A_LAW && CONFIG_PCM_CONVERTER_FORMAT_S32LE */ + +#if CONFIG_PCM_CONVERTER_FORMAT_MU_LAW && CONFIG_PCM_CONVERTER_FORMAT_S32LE +static int pcm_convert_mulaw_to_s32(const struct audio_stream *source, + uint32_t ioffset, struct audio_stream *sink, + uint32_t ooffset, uint32_t samples, uint32_t chmap) +{ + const uint8_t *src = audio_stream_get_rptr(source); + int32_t *dst = audio_stream_get_wptr(sink); + uint32_t processed; + uint32_t nmax, i, n; + + src += ioffset; + dst += ooffset; + for (processed = 0; processed < samples; processed += n) { + src = audio_stream_wrap(source, (void *)src); + dst = audio_stream_wrap(sink, dst); + n = samples - processed; + nmax = audio_stream_bytes_without_wrap(source, src) >> BYTES_TO_U8_SAMPLES; + n = MIN(n, nmax); + nmax = audio_stream_bytes_without_wrap(sink, dst) >> BYTES_TO_S32_SAMPLES; + n = MIN(n, nmax); + for (i = 0; i < n; i++) { + *dst = sofm_mu_law_decode(*src) << 16; + src++; + dst++; + } + } + + return samples; +} + +static int pcm_convert_s32_to_mulaw(const struct audio_stream *source, + uint32_t ioffset, struct audio_stream *sink, + uint32_t ooffset, uint32_t samples, uint32_t chmap) +{ + const int32_t *src = audio_stream_get_rptr(source); + uint8_t *dst = audio_stream_get_wptr(sink); + uint32_t processed; + uint32_t nmax, i, n; + + src += ioffset; + dst += ooffset; + for (processed = 0; processed < samples; processed += n) { + src = audio_stream_wrap(source, (void *)src); + dst = audio_stream_wrap(sink, dst); + n = samples - processed; + nmax = audio_stream_bytes_without_wrap(source, src) >> BYTES_TO_S32_SAMPLES; + n = MIN(n, nmax); + nmax = audio_stream_bytes_without_wrap(sink, dst) >> BYTES_TO_U8_SAMPLES; + n = MIN(n, nmax); + for (i = 0; i < n; i++) { + *dst = sofm_mu_law_encode(*src >> 16); + src++; + dst++; + } + } + + return samples; +} +#endif /* CONFIG_PCM_CONVERTER_FORMAT_MU_LAW && CONFIG_PCM_CONVERTER_FORMAT_S32LE */ + #if CONFIG_PCM_CONVERTER_FORMAT_S16LE && CONFIG_PCM_CONVERTER_FORMAT_S24LE static int pcm_convert_s16_to_s24(const struct audio_stream *source, @@ -555,6 +677,20 @@ const struct pcm_func_map pcm_func_map[] = { { SOF_IPC_FRAME_U8, SOF_IPC_FRAME_S32_LE, pcm_convert_u8_to_s32 }, { SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_U8, pcm_convert_s32_to_u8 }, #endif /* CONFIG_PCM_CONVERTER_FORMAT_U8 && CONFIG_PCM_CONVERTER_FORMAT_S32LE */ +#if CONFIG_PCM_CONVERTER_FORMAT_A_LAW + { SOF_IPC_FRAME_A_LAW, SOF_IPC_FRAME_A_LAW, just_copy }, +#endif /* CONFIG_PCM_CONVERTER_FORMAT_A_LAW */ +#if CONFIG_PCM_CONVERTER_FORMAT_A_LAW && CONFIG_PCM_CONVERTER_FORMAT_S32LE + { SOF_IPC_FRAME_A_LAW, SOF_IPC_FRAME_S32_LE, pcm_convert_alaw_to_s32 }, + { SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_A_LAW, pcm_convert_s32_to_alaw }, +#endif /* CONFIG_PCM_CONVERTER_FORMAT_A_LAW && CONFIG_PCM_CONVERTER_FORMAT_S32LE */ +#if CONFIG_PCM_CONVERTER_FORMAT_MU_LAW + { SOF_IPC_FRAME_MU_LAW, SOF_IPC_FRAME_MU_LAW, just_copy }, +#endif /* CONFIG_PCM_CONVERTER_FORMAT_MU_LAW */ +#if CONFIG_PCM_CONVERTER_FORMAT_MU_LAW && CONFIG_PCM_CONVERTER_FORMAT_S32LE + { SOF_IPC_FRAME_MU_LAW, SOF_IPC_FRAME_S32_LE, pcm_convert_mulaw_to_s32 }, + { SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_MU_LAW, pcm_convert_s32_to_mulaw }, +#endif /* CONFIG_PCM_CONVERTER_FORMAT_A_LAW && CONFIG_PCM_CONVERTER_FORMAT_S32LE */ #if CONFIG_PCM_CONVERTER_FORMAT_S16LE { SOF_IPC_FRAME_S16_LE, SOF_IPC_FRAME_S16_LE, just_copy }, #endif /* CONFIG_PCM_CONVERTER_FORMAT_S16LE */ diff --git a/src/include/module/audio/format.h b/src/include/module/audio/format.h index df6e58b4a9d5..7fccef12f49e 100644 --- a/src/include/module/audio/format.h +++ b/src/include/module/audio/format.h @@ -22,6 +22,8 @@ static inline uint32_t get_sample_bytes(enum sof_ipc_frame fmt) case SOF_IPC_FRAME_S24_3LE: return 3; case SOF_IPC_FRAME_U8: + case SOF_IPC_FRAME_A_LAW: + case SOF_IPC_FRAME_MU_LAW: return 1; default: return 4; @@ -37,6 +39,8 @@ static inline uint32_t get_sample_bitdepth(enum sof_ipc_frame fmt) case SOF_IPC_FRAME_S24_3LE: return 24; case SOF_IPC_FRAME_U8: + case SOF_IPC_FRAME_A_LAW: + case SOF_IPC_FRAME_MU_LAW: return 8; default: return 32; diff --git a/src/include/module/ipc/stream.h b/src/include/module/ipc/stream.h index 4fbbb801689e..6e49d9f75cf2 100644 --- a/src/include/module/ipc/stream.h +++ b/src/include/module/ipc/stream.h @@ -22,7 +22,10 @@ enum sof_ipc_frame { SOF_IPC_FRAME_S24_3LE, SOF_IPC_FRAME_S24_4LE_MSB, SOF_IPC_FRAME_U8, - SOF_IPC_FRAME_S16_4LE /* 16-bit in 32-bit container */ + SOF_IPC_FRAME_S16_4LE, /* 16-bit in 32-bit container */ + SOF_IPC_FRAME_A_LAW, + SOF_IPC_FRAME_MU_LAW, + SOF_IPC_FRAME_INVALID, /* keep last */ }; #endif /* __MODULE_IPC_STREAM_H__ */ diff --git a/src/include/module/ipc4/base-config.h b/src/include/module/ipc4/base-config.h index 0a535dd60be3..e5a5b49effd5 100644 --- a/src/include/module/ipc4/base-config.h +++ b/src/include/module/ipc4/base-config.h @@ -97,7 +97,9 @@ enum ipc4_sample_type { IPC4_TYPE_LSB_INTEGER = 1, /**< integer with Least Significant Byte first */ IPC4_TYPE_SIGNED_INTEGER = 2, IPC4_TYPE_UNSIGNED_INTEGER = 3, - IPC4_TYPE_FLOAT = 4 + IPC4_TYPE_FLOAT = 4, + IPC4_TYPE_A_LAW = 5, + IPC4_TYPE_MU_LAW = 6, }; enum ipc4_stream_type { diff --git a/src/include/sof/audio/audio_stream.h b/src/include/sof/audio/audio_stream.h index d400b823e0c1..9703ec9cadea 100644 --- a/src/include/sof/audio/audio_stream.h +++ b/src/include/sof/audio/audio_stream.h @@ -1007,40 +1007,74 @@ static inline void cir_buf_set_zero(void *ptr, void *buf_addr, void *buf_end, ui memset(buf_addr, 0, tail_size); } -static inline void audio_stream_fmt_conversion(enum ipc4_bit_depth depth, - enum ipc4_bit_depth valid, - enum sof_ipc_frame *frame_fmt, - enum sof_ipc_frame *valid_fmt, - enum ipc4_sample_type type) +static inline int audio_stream_fmt_conversion(enum ipc4_bit_depth depth, + enum ipc4_bit_depth valid, + enum sof_ipc_frame *frame_fmt, + enum sof_ipc_frame *valid_fmt, + enum ipc4_sample_type type) { - /* IPC4_DEPTH_16BIT (16) <---> SOF_IPC_FRAME_S16_LE (0) - * IPC4_DEPTH_24BIT (24) <---> SOF_IPC_FRAME_S24_4LE (1) - * IPC4_DEPTH_32BIT (32) <---> SOF_IPC_FRAME_S32_LE (2) - */ - *frame_fmt = (enum sof_ipc_frame)((depth >> 3) - 2); - *valid_fmt = (enum sof_ipc_frame)((valid >> 3) - 2); - -#ifdef CONFIG_FORMAT_U8 - if (depth == 8) - *frame_fmt = SOF_IPC_FRAME_U8; - - if (valid == 8) - *valid_fmt = SOF_IPC_FRAME_U8; -#endif /* CONFIG_FORMAT_U8 */ - - if (valid == 24) { + int ret = -EINVAL; + *frame_fmt = SOF_IPC_FRAME_INVALID; + *valid_fmt = SOF_IPC_FRAME_INVALID; + + switch (type) { + case IPC4_TYPE_FLOAT: +#ifdef CONFIG_FORMAT_FLOAT + if (depth == 32 && valid == 32) { + *frame_fmt = SOF_IPC_FRAME_FLOAT; + *valid_fmt = SOF_IPC_FRAME_FLOAT; + ret = 0; + } +#endif + break; + case IPC4_TYPE_MSB_INTEGER: + case IPC4_TYPE_LSB_INTEGER: + case IPC4_TYPE_SIGNED_INTEGER: + if (depth == 24 && valid == 24) { #ifdef CONFIG_FORMAT_S24_3LE - if (depth == 24) { *frame_fmt = SOF_IPC_FRAME_S24_3LE; *valid_fmt = SOF_IPC_FRAME_S24_3LE; + ret = 0; +#endif + } else { + /* IPC4_DEPTH_16BIT (16) <---> SOF_IPC_FRAME_S16_LE (0) + * IPC4_DEPTH_24BIT (24) <---> SOF_IPC_FRAME_S24_4LE (1) + * IPC4_DEPTH_32BIT (32) <---> SOF_IPC_FRAME_S32_LE (2) + */ + *frame_fmt = (enum sof_ipc_frame)((depth >> 3) - 2); + *valid_fmt = (enum sof_ipc_frame)((valid >> 3) - 2); + ret = 0; + } + break; + case IPC4_TYPE_UNSIGNED_INTEGER: +#ifdef CONFIG_FORMAT_U8 + if (depth == 8 && valid == 8) { + *frame_fmt = SOF_IPC_FRAME_U8; + *valid_fmt = SOF_IPC_FRAME_U8; + ret = 0; + } +#endif /* CONFIG_FORMAT_U8 */ + break; + case IPC4_TYPE_A_LAW: +#ifdef CONFIG_FORMAT_A_LAW + if (depth == 8 && valid == 8) { + *frame_fmt = SOF_IPC_FRAME_A_LAW; + *valid_fmt = SOF_IPC_FRAME_A_LAW; + ret = 0; } #endif + break; + case IPC4_TYPE_MU_LAW: +#ifdef CONFIG_FORMAT_MU_LAW + if (depth == 8 && valid == 8) { + *frame_fmt = SOF_IPC_FRAME_MU_LAW; + *valid_fmt = SOF_IPC_FRAME_MU_LAW; + ret = 0; + } +#endif + break; } - - if (type == IPC4_TYPE_FLOAT && depth == 32) { - *frame_fmt = SOF_IPC_FRAME_FLOAT; - *valid_fmt = SOF_IPC_FRAME_FLOAT; - } + return ret; } /** @}*/ diff --git a/src/include/sof/math/a_law.h b/src/include/sof/math/a_law.h new file mode 100644 index 000000000000..1b7cac744438 --- /dev/null +++ b/src/include/sof/math/a_law.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2025 Intel Corporation. + */ + +#ifndef __SOF_MATH_A_LAW_H__ +#define __SOF_MATH_A_LAW_H__ + +#include + +/** + * sofm_a_law_encode() - Encode sample with A-law coding + * @param sample: A s16 sample value + * + * The A-law codec is defined in ITU-T G.711 standard and has been used + * in telecommunications in e.g. Europe. The A-law coding compresses 13 bit + * samples to 8 bit data stream. In SOF the high 13 bits of s16 format are + * used for compatibility with normal audios. + * + * @return: Compressed 8 bit code value + */ +uint8_t sofm_a_law_encode(int16_t sample); + +/** + * sofm_a_law_decode() - Decode A-law encoded code word + * @param byte: Encoded code word + * + * The A-law decoder expands a 8 bit code word into a 13 bit sample value. + * In the SOF the high 13 bits are aligned to the most significant bits + * to be compatible with normal s16 Q1.15 samples. + * + * @return: Sample value in s16 format + */ +int16_t sofm_a_law_decode(int8_t byte); + +#endif /* __SOF_MATH_A_LAW_H__ */ diff --git a/src/include/sof/math/mu_law.h b/src/include/sof/math/mu_law.h new file mode 100644 index 000000000000..b8aaec5b5e3b --- /dev/null +++ b/src/include/sof/math/mu_law.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2025 Intel Corporation. + */ + +#ifndef __SOF_MATH_MU_LAW_H__ +#define __SOF_MATH_MU_LAW_H__ + +#include + +/** + * sofm_mu_law_encode() - Encode sample with mu-law coding + * @param sample: A s16 sample value + * + * The mu-law codec is defined in ITU-T G.711 standard and has been used + * in telecommunications in USA and Japan. The mu-law coding compresses + * 14 bit samples to 8 bit data stream. In SOF the high 14 bits of s16 + * format are used for compatibility with normal audios. + * + * @return: Compressed 8 bit code value + */ +uint8_t sofm_mu_law_encode(int16_t sample); + +/** + * sofm_mu_law_decode() - Decode mu-law encoded code word + * @param byte: Encoded code word + * + * The mu-law decoder expands a 8 bit code word into a 14 bit sample value. + * In the SOF the high 14 bits are aligned to the most significant bits + * to be compatible with normal s16 Q1.15 samples. + * + * @return: Sample value in s16 format + */ +int16_t sofm_mu_law_decode(int8_t byte); + +#endif /* __SOF_MATH_MU_LAW_H__ */ diff --git a/src/math/CMakeLists.txt b/src/math/CMakeLists.txt index 3af17bb9d990..047c4c2d510b 100644 --- a/src/math/CMakeLists.txt +++ b/src/math/CMakeLists.txt @@ -83,6 +83,14 @@ if(CONFIG_MATH_DCT) list(APPEND base_files dct.c) endif() +if(CONFIG_MATH_A_LAW_CODEC) + list(APPEND base_files a_law.c) +endif() + +if(CONFIG_MATH_MU_LAW_CODEC) + list(APPEND base_files mu_law.c) +endif() + is_zephyr(it_is) if(it_is) ### Zephyr ### diff --git a/src/math/Kconfig b/src/math/Kconfig index 191ae7906b7a..ebab5dd076de 100644 --- a/src/math/Kconfig +++ b/src/math/Kconfig @@ -269,4 +269,24 @@ config MATH_DCT transform for data is done as matrix multiply with the returned DCT matrix. +config MATH_A_LAW_CODEC + bool "A-law encoder and decoder" + help + This option enables functions sofm_a_law_encode() and + sofm_a_law_decode(). The A-law codec is defined in + ITU-T G.711 standard and has been used in telecommunications + in e.g. Europe. The A-law coding compresses 13 bit samples + to 8 bit coded data. A-law codec can be used in VoIP and + 8-bit wav formats. + +config MATH_MU_LAW_CODEC + bool "mu-law encoder and decoder" + help + This option enables functions sofm_mu_law_encode() and + sofm_mu_law_decode(). The mu-law codec is defined in + ITU-T G.711 standard and has been used in telecommunications + in USA and Japan. The mu-law coding compresses 14 bit samples + to 8 bit coded data. Mu-law codec can be used in VoIP and + 8-bit wav formats. + endmenu diff --git a/src/math/a_law.c b/src/math/a_law.c new file mode 100644 index 000000000000..7a0b906ec255 --- /dev/null +++ b/src/math/a_law.c @@ -0,0 +1,146 @@ +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright(c) 2025 Intel Corporation. +// +// Author: Seppo Ingalsuo + +#include +#include +#include + +#define SOFM_ALAW_SIGN_BIT 0x80 +#define SOFM_ALAW_MAX 4095 +#define SOFM_ALAW_TOGGLE_EVEN_BITS 0x55 +#define SOFM_ALAW_MANTISSA_MASK 0x0f +#define SOFM_ALAW_MANTISSA_BITS 4 +#define SOFM_ALAW_SHIFT_MASK 0x07 +#define SOFM_ALAW_DEC_ONES_MASK 0x21 /* 0b100001 for "1abcd1", see below */ + +/* + * A-law encode table (sign bit is b12) + * + * Input values 11:0 Output values 6:0 + * + * 0 0 0 0 0 0 0 a b c d x 0 0 0 a b c d + * 0 0 0 0 0 0 1 a b c d x 0 0 1 a b c d + * 0 0 0 0 0 1 a b c d x x 0 1 0 a b c d + * 0 0 0 0 1 a b c d x x x 0 1 1 a b c d + * 0 0 0 1 a b c d x x x x 1 0 0 a b c d + * 0 0 1 a b c d x x x x x 1 0 1 a b c d + * 0 1 a b c d x x x x x x 1 1 0 a b c d + * 1 a b c d x x x x x x x 1 1 1 a b c d + * + * + * A-law decode table (sign bit is b7) + * + * Input values 6:0 Output values 11:0 + * + * 0 0 0 a b c d 0 0 0 0 0 0 0 a b c d 1 + * 0 0 1 a b c d 0 0 0 0 0 0 1 a b c d 1 + * 0 1 0 a b c d 0 0 0 0 0 1 a b c d 1 0 + * 0 1 1 a b c d 0 0 0 0 1 a b c d 1 0 0 + * 1 0 0 a b c d 0 0 0 1 a b c d 1 0 0 0 + * 1 0 1 a b c d 0 0 1 a b c d 1 0 0 0 0 + * 1 1 0 a b c d 0 1 a b c d 1 0 0 0 0 0 + * 1 1 1 a b c d 1 a b c d 1 0 0 0 0 0 0 + * + */ + +/* Shift values lookup table for above table for 7 + * highest sample value bits. + */ +static uint8_t alaw_encode_shifts[128] = { + 1, 1, 2, 2, 3, 3, 3, 3, + 4, 4, 4, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, +}; + +/** + * sofm_a_law_encode() - Encode sample with A-law coding + * @param sample: A s16 sample value + * + * The A-law codec is defined in ITU-T G.711 standard and has been used + * in telecommunications in e.g. Europe. The A-law coding compresses 13 bit + * samples to 8 bit data stream. In SOF the high 13 bits of s16 format are + * used for compatibility with normal audios. + * + * @return: Compressed 8 bit code value + */ + +uint8_t sofm_a_law_encode(int16_t sample) +{ + int sign = SOFM_ALAW_SIGN_BIT; + int shift = 0; + int low_bits; + uint8_t byte; + + /* Convert to 13 bits with shift */ + sample >>= 3; + + /* Negative samples are 1's complement with zero sign bit */ + if (sample < 0) { + sign = 0; + sample = -sample - 1; + } + + if (sample > SOFM_ALAW_MAX) + sample = SOFM_ALAW_MAX; + + if (sample > 31) { + shift = alaw_encode_shifts[sample >> 5]; + low_bits = (sample >> shift) & SOFM_ALAW_MANTISSA_MASK; + } else { + low_bits = (sample >> 1) & SOFM_ALAW_MANTISSA_MASK; + } + + byte = (shift << SOFM_ALAW_MANTISSA_BITS) | low_bits; + byte = (byte | sign) ^ SOFM_ALAW_TOGGLE_EVEN_BITS; + return byte; +} + +/** + * sofm_a_law_decode() - Decode A-law encoded code word + * @param byte: Encoded code word + * + * The A-law decoder expands a 8 bit code word into a 13 bit sample value. + * In the SOF the high 13 bits are aligned to the most significant bits + * to be compatible with normal s16 Q1.15 samples. + * + * @return: Sample value in s16 format + */ +int16_t sofm_a_law_decode(int8_t byte) +{ + int low_bits; + int shift; + int sign; + int16_t value; + + byte ^= SOFM_ALAW_TOGGLE_EVEN_BITS; + low_bits = byte & SOFM_ALAW_MANTISSA_MASK; + shift = (byte >> SOFM_ALAW_MANTISSA_BITS) & SOFM_ALAW_SHIFT_MASK; + sign = byte & SOFM_ALAW_SIGN_BIT; + + if (shift > 0) + value = (low_bits << shift) | (SOFM_ALAW_DEC_ONES_MASK << (shift - 1)); + else + value = (low_bits << 1) | 1; + + if (!sign) + value = -value; + + /* Shift 13 bit Q1.12 to 16 bit Q1.15 */ + return value << 3; +} diff --git a/src/math/mu_law.c b/src/math/mu_law.c new file mode 100644 index 000000000000..32d50dad9b75 --- /dev/null +++ b/src/math/mu_law.c @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright(c) 2025 Intel Corporation. +// +// Author: Seppo Ingalsuo + +#include +#include +#include + +#define SOFM_MULAW_BIAS 33 +#define SOFM_MULAW_MAX 8191 +#define SOFM_MULAW_TOGGLE_BITS 0x7f +#define SOFM_MULAW_SIGN_BIT 0x80 +#define SOFM_MULAW_MANTISSA_MASK 0x0f +#define SOFM_MULAW_MANTISSA_BITS 4 +#define SOFM_MULAW_SHIFT_MASK 0x07 +#define SOFM_MULAW_DEC_ONES_MASK 0x21 /* 0b100001 for "1abcd1", see below */ + +/* + * mu-law encode table (sign bit is b12) + * + * Input values 12:0 Output values 6:0 + * + * 0 0 0 0 0 0 0 1 a b c d x 0 0 0 a b c d + * 0 0 0 0 0 0 1 a b c d x x 0 0 1 a b c d + * 0 0 0 0 0 1 a b c d x x x 0 1 0 a b c d + * 0 0 0 0 1 a b c d x x x x 0 1 1 a b c d + * 0 0 0 1 a b c d x x x x x 1 0 0 a b c d + * 0 0 1 a b c d x x x x x x 1 0 1 a b c d + * 0 1 a b c d x x x x x x x 1 1 0 a b c d + * 1 a b c d x x x x x x x x 1 1 1 a b c d + * + * mu-law decode table (sign bit is b7) + * + * Input values 6:0 Output values 12:0 + * + * 0 0 0 a b c d 0 0 0 0 0 0 0 1 a b c d 1 + * 0 0 1 a b c d 0 0 0 0 0 0 1 a b c d 1 0 + * 0 1 0 a b c d 0 0 0 0 0 1 a b c d 1 0 0 + * 0 1 1 a b c d 0 0 0 0 1 a b c d 1 0 0 0 + * 1 0 0 a b c d 0 0 0 1 a b c d 1 0 0 0 0 + * 1 0 1 a b c d 0 0 1 a b c d 1 0 0 0 0 0 + * 1 1 0 a b c d 0 1 a b c d 1 0 0 0 0 0 0 + * 1 1 1 a b c d 1 a b c d 1 0 0 0 0 0 0 0 + */ + +/* Shift values lookup table for above table for 7 + * highest sample value bits. + */ +static uint8_t mulaw_encode_shifts[128] = { + 0, 1, 2, 2, 3, 3, 3, 3, + 4, 4, 4, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, +}; + +/** + * sofm_mu_law_encode() - Encode sample with mu-law coding + * @param sample: A s16 sample value + * + * The mu-law codec is defined in ITU-T G.711 standard and has been used + * in telecommunications in USA and Japan. The mu-law coding compresses + * 14 bit samples to 8 bit data stream. In SOF the high 14 bits of s16 + * format are used for compatibility with normal audios. + * + * @return: Compressed 8 bit code value + */ + +uint8_t sofm_mu_law_encode(int16_t sample) +{ + int sign = SOFM_MULAW_SIGN_BIT; + int shift = 0; + int low_bits; + uint8_t byte; + + /* Convert to 14 bits with shift */ + sample >>= 2; + + /* Negative samples are 1's complement with zero sign bit */ + if (sample < 0) { + sign = 0; + sample = -sample - 1; + } + + sample += SOFM_MULAW_BIAS; + if (sample > SOFM_MULAW_MAX) + sample = SOFM_MULAW_MAX; + + shift = mulaw_encode_shifts[sample >> 6]; + low_bits = (sample >> (shift + 1)) & SOFM_MULAW_MANTISSA_MASK; + + byte = (shift << SOFM_MULAW_MANTISSA_BITS) | low_bits | sign; + byte ^= SOFM_MULAW_TOGGLE_BITS; + return byte; +} + +/** + * sofm_mu_law_decode() - Decode mu-law encoded code word + * @param byte: Encoded code word + * + * The mu-law decoder expands a 8 bit code word into a 14 bit sample value. + * In the SOF the high 14 bits are aligned to the most significant bits + * to be compatible with normal s16 Q1.15 samples. + * + * @return: Sampple value in s16 format + */ +int16_t sofm_mu_law_decode(int8_t byte) +{ + int low_bits; + int shift; + int sign; + int16_t value; + + sign = byte & SOFM_MULAW_SIGN_BIT; + byte ^= SOFM_MULAW_TOGGLE_BITS; + low_bits = byte & SOFM_MULAW_MANTISSA_MASK; + shift = (byte >> SOFM_MULAW_MANTISSA_BITS) & SOFM_MULAW_SHIFT_MASK; + value = (low_bits << (shift + 1)) | (SOFM_MULAW_DEC_ONES_MASK << shift); + value -= SOFM_MULAW_BIAS; + if (!sign) + value = -value; + + /* Shift 14 bit Q1.13 to 16 bit Q1.15 */ + return value << 2; +} diff --git a/test/cmocka/m/export_headerfile_open.m b/test/cmocka/m/export_headerfile_open.m index 058da8d9bc7c..5b83e202d8a7 100644 --- a/test/cmocka/m/export_headerfile_open.m +++ b/test/cmocka/m/export_headerfile_open.m @@ -9,7 +9,7 @@ % SPDX-License-Identifier: BSD-3-Clause % -% Copyright(c) 2022 Intel Corporation. All rights reserved. +% Copyright(c) 2022-2025 Intel Corporation. function fh = export_headerfile_open(headerfn, corp) @@ -23,7 +23,7 @@ end fprintf(fh, '/* SPDX-License-Identifier: BSD-3-Clause\n'); fprintf(fh, ' *\n'); - fprintf(fh, ' * Copyright(c) %s %s. All rights reserved.\n', ... + fprintf(fh, ' * Copyright(c) %s %s.\n', ... datestr(now, 'yyyy'), corp); fprintf(fh, ' */\n\n'); end diff --git a/test/cmocka/src/math/arithmetic/CMakeLists.txt b/test/cmocka/src/math/arithmetic/CMakeLists.txt index 0e6ab3619227..721c50020ba5 100644 --- a/test/cmocka/src/math/arithmetic/CMakeLists.txt +++ b/test/cmocka/src/math/arithmetic/CMakeLists.txt @@ -31,3 +31,13 @@ cmocka_test(base_e_logarithm ${PROJECT_SOURCE_DIR}/src/math/log_e.c ${PROJECT_SOURCE_DIR}/src/math/base2log.c ) + +cmocka_test(a_law_codec + a_law_codec.c + ${PROJECT_SOURCE_DIR}/src/math/a_law.c +) + +cmocka_test(mu_law_codec + mu_law_codec.c + ${PROJECT_SOURCE_DIR}/src/math/mu_law.c +) diff --git a/test/cmocka/src/math/arithmetic/a_law_codec.c b/test/cmocka/src/math/arithmetic/a_law_codec.c new file mode 100644 index 000000000000..a0bc4f7aef41 --- /dev/null +++ b/test/cmocka/src/math/arithmetic/a_law_codec.c @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright(c) 2025 Intel Corporation. + +#include +#include +#include +#include +#include +#include + +#include "ref_chirp_mono_8k_s16.h" +#include "a_law_codec.h" + +static void test_a_law_encode(void **state) +{ + (void)state; + + uint8_t a_law_sample, a_law_ref; + int i; + + for (i = 0; i < REF_DATA_SAMPLE_COUNT; i++) { + a_law_sample = sofm_a_law_encode(chirp_mono_8k_s16[i]); + a_law_ref = ref_alaw_enc_data[i]; + + if (a_law_sample != a_law_ref) { + printf("%s: difference found at %d, encoded %d, ref %d, lin %d\n", + __func__, i, a_law_sample, a_law_ref, chirp_mono_8k_s16[i]); + assert_true(false); + } + } +} + +static void test_a_law_decode(void **state) +{ + (void)state; + + int16_t s16_sample, s16_ref; + int i; + + for (i = 0; i < REF_DATA_SAMPLE_COUNT; i++) { + s16_sample = sofm_a_law_decode(ref_alaw_enc_data[i]); + s16_ref = ref_alaw_dec_data[i]; + if (s16_sample != s16_ref) { + printf("%s: difference found at %d, decoded %d, ref %d\n", + __func__, i, s16_sample, s16_ref); + assert_true(false); + } + } +} + +int main(void) +{ + const struct CMUnitTest tests[] = { + cmocka_unit_test(test_a_law_encode), + cmocka_unit_test(test_a_law_decode), + }; + + cmocka_set_message_output(CM_OUTPUT_TAP); + + return cmocka_run_group_tests(tests, NULL, NULL); +} diff --git a/test/cmocka/src/math/arithmetic/a_law_codec.h b/test/cmocka/src/math/arithmetic/a_law_codec.h new file mode 100644 index 000000000000..403b368f074f --- /dev/null +++ b/test/cmocka/src/math/arithmetic/a_law_codec.h @@ -0,0 +1,814 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2025 Intel Corporation. + */ + +/* Created 13-May-2025 18:29:28 with script a_law_mu_law_test_vectors.m */ + +#include + +static const uint8_t ref_alaw_enc_data[4000] = { + 168, 169, 174, 172, 173, 163, 161, 167, 165, 185, + 178, 182, 137, 135, 148, 79, 18, 0, 10, 49, + 60, 59, 36, 38, 32, 34, 45, 47, 46, 41, + 40, 43, 42, 42, 42, 42, 42, 42, 43, 40, + 41, 46, 47, 45, 35, 33, 39, 37, 57, 50, + 55, 14, 4, 111, 251, 153, 141, 180, 179, 190, + 165, 167, 161, 163, 173, 172, 174, 169, 168, 171, + 170, 170, 170, 170, 170, 170, 171, 168, 169, 174, + 172, 173, 163, 161, 167, 186, 190, 179, 181, 130, + 157, 205, 23, 1, 11, 49, 60, 59, 36, 38, + 32, 34, 44, 46, 41, 40, 43, 42, 42, 42, + 42, 42, 42, 43, 40, 41, 47, 44, 34, 32, + 38, 36, 56, 61, 54, 14, 5, 102, 236, 132, + 137, 182, 188, 187, 164, 166, 160, 162, 172, 174, + 169, 168, 171, 170, 170, 170, 170, 170, 171, 171, + 168, 174, 175, 173, 163, 161, 164, 186, 188, 177, + 136, 135, 238, 103, 5, 14, 54, 61, 59, 36, + 38, 35, 45, 44, 46, 41, 43, 43, 42, 42, + 42, 42, 42, 43, 40, 41, 47, 44, 34, 32, + 39, 37, 62, 48, 10, 1, 21, 248, 154, 142, + 182, 188, 187, 164, 161, 163, 173, 175, 174, 168, + 171, 170, 170, 170, 170, 170, 171, 171, 169, 174, + 172, 162, 160, 166, 165, 185, 179, 181, 128, 150, + 112, 24, 14, 54, 60, 59, 39, 33, 35, 45, + 47, 41, 40, 43, 42, 42, 42, 42, 42, 43, + 40, 41, 47, 45, 35, 33, 36, 59, 61, 55, + 13, 18, 216, 158, 143, 182, 188, 187, 167, 161, + 162, 172, 175, 169, 168, 171, 170, 170, 170, 170, + 170, 171, 168, 174, 172, 162, 160, 167, 165, 191, + 177, 137, 155, 246, 16, 2, 55, 61, 59, 36, + 33, 35, 44, 46, 41, 40, 43, 42, 42, 42, + 42, 43, 40, 41, 47, 45, 35, 33, 36, 56, + 50, 52, 0, 106, 224, 135, 138, 179, 185, 164, + 166, 163, 173, 175, 169, 168, 171, 170, 170, 170, + 170, 171, 168, 169, 175, 173, 163, 166, 165, 190, + 176, 139, 133, 243, 16, 13, 55, 60, 58, 39, + 32, 34, 47, 46, 40, 43, 42, 42, 42, 42, + 42, 40, 41, 47, 45, 35, 38, 37, 62, 48, + 9, 24, 89, 159, 142, 177, 190, 165, 166, 163, + 173, 175, 169, 168, 170, 170, 170, 170, 170, 171, + 168, 174, 172, 162, 161, 164, 184, 179, 138, 132, + 240, 18, 15, 49, 63, 37, 38, 35, 45, 47, + 41, 43, 42, 42, 42, 42, 42, 43, 41, 47, + 45, 35, 38, 37, 63, 54, 2, 23, 227, 129, + 180, 189, 186, 167, 160, 173, 175, 169, 168, 170, + 170, 170, 170, 170, 171, 169, 175, 173, 163, 166, + 186, 188, 183, 128, 236, 20, 2, 54, 63, 37, + 38, 35, 44, 46, 40, 43, 42, 42, 42, 42, + 43, 40, 46, 44, 35, 33, 37, 63, 54, 13, + 20, 239, 131, 183, 188, 165, 166, 163, 172, 174, + 168, 171, 170, 170, 170, 170, 171, 169, 174, 173, + 163, 166, 186, 189, 181, 135, 247, 30, 8, 51, + 56, 39, 32, 45, 47, 41, 43, 42, 42, 42, + 42, 43, 40, 46, 44, 35, 38, 37, 61, 52, + 7, 118, 158, 136, 179, 187, 167, 160, 173, 175, + 169, 171, 170, 170, 170, 170, 171, 169, 175, 173, + 160, 164, 185, 176, 143, 145, 108, 3, 54, 62, + 36, 33, 34, 47, 41, 43, 42, 42, 42, 42, + 43, 41, 47, 45, 32, 39, 57, 48, 15, 23, + 235, 141, 177, 185, 164, 160, 173, 175, 169, 171, + 170, 170, 170, 170, 168, 169, 172, 162, 166, 165, + 188, 180, 132, 86, 4, 52, 60, 37, 33, 34, + 47, 41, 43, 42, 42, 42, 42, 43, 41, 47, + 34, 33, 37, 60, 52, 5, 219, 135, 180, 191, + 164, 161, 162, 175, 169, 171, 170, 170, 170, 170, + 168, 174, 172, 163, 167, 184, 176, 143, 149, 22, + 14, 51, 59, 38, 35, 44, 41, 40, 42, 42, + 42, 42, 43, 41, 44, 35, 38, 59, 51, 14, + 23, 148, 142, 179, 187, 166, 163, 172, 169, 171, + 170, 170, 170, 170, 168, 174, 172, 160, 167, 185, + 182, 128, 243, 26, 52, 63, 36, 33, 45, 46, + 40, 43, 42, 42, 42, 43, 41, 47, 35, 38, + 59, 51, 15, 105, 146, 139, 189, 165, 161, 162, + 175, 168, 171, 170, 170, 170, 171, 169, 172, 163, + 166, 187, 176, 130, 229, 27, 52, 63, 36, 32, + 45, 46, 40, 42, 42, 42, 42, 40, 46, 45, + 32, 36, 60, 53, 31, 239, 143, 179, 186, 166, + 162, 175, 168, 171, 170, 170, 170, 171, 174, 172, + 160, 164, 191, 180, 155, 102, 13, 51, 58, 38, + 34, 47, 40, 43, 42, 42, 42, 40, 46, 45, + 32, 36, 61, 11, 17, 145, 139, 188, 164, 160, + 173, 174, 168, 170, 170, 170, 171, 169, 175, 163, + 167, 184, 182, 135, 116, 3, 48, 58, 38, 34, + 47, 40, 42, 42, 42, 43, 40, 47, 34, 38, + 59, 49, 1, 222, 128, 176, 187, 166, 162, 174, + 168, 170, 170, 170, 171, 169, 175, 163, 167, 185, + 183, 155, 109, 14, 61, 37, 32, 45, 46, 43, + 42, 42, 42, 43, 46, 45, 33, 37, 50, 12, + 121, 135, 182, 187, 166, 162, 174, 168, 170, 170, + 170, 171, 169, 172, 160, 164, 188, 137, 238, 27, + 55, 56, 38, 34, 47, 40, 42, 42, 42, 43, + 41, 44, 32, 36, 50, 15, 123, 135, 177, 187, + 161, 173, 174, 171, 170, 170, 170, 168, 174, 173, + 166, 187, 182, 132, 98, 9, 60, 36, 35, 47, + 41, 43, 42, 42, 43, 41, 44, 32, 37, 50, + 13, 65, 131, 179, 165, 160, 172, 169, 171, 170, + 170, 171, 169, 172, 163, 164, 189, 140, 246, 0, + 51, 37, 32, 44, 41, 43, 42, 42, 43, 41, + 44, 32, 37, 51, 0, 241, 143, 189, 164, 163, + 175, 168, 170, 170, 170, 171, 174, 162, 166, 185, + 180, 144, 30, 55, 59, 33, 45, 41, 43, 42, + 42, 43, 41, 44, 32, 37, 48, 7, 236, 139, + 190, 167, 162, 174, 171, 170, 170, 170, 168, 172, + 160, 165, 179, 129, 103, 8, 63, 39, 34, 46, + 43, 42, 42, 42, 41, 44, 32, 37, 49, 5, + 148, 181, 185, 166, 173, 169, 171, 170, 170, 171, + 169, 173, 166, 185, 181, 235, 7, 48, 37, 32, + 47, 40, 42, 42, 42, 40, 47, 35, 37, 48, + 7, 234, 181, 184, 161, 173, 169, 171, 170, 170, + 171, 174, 162, 167, 189, 130, 118, 9, 62, 38, + 45, 46, 43, 42, 42, 43, 46, 34, 39, 60, + 13, 241, 136, 190, 166, 173, 169, 171, 170, 170, + 171, 174, 163, 164, 179, 134, 106, 52, 59, 33, + 44, 41, 42, 42, 42, 40, 44, 32, 59, 55, + 20, 135, 179, 164, 163, 174, 171, 170, 170, 171, + 174, 162, 167, 178, 129, 105, 52, 59, 33, 44, + 40, 42, 42, 42, 41, 45, 38, 62, 14, 208, + 137, 190, 166, 173, 169, 170, 170, 170, 169, 172, + 161, 185, 136, 194, 14, 62, 38, 45, 41, 42, + 42, 42, 41, 45, 38, 62, 14, 206, 139, 185, + 161, 172, 168, 170, 170, 171, 169, 162, 167, 178, + 134, 22, 54, 37, 35, 47, 43, 42, 42, 40, + 47, 32, 58, 52, 108, 130, 188, 166, 173, 169, + 170, 170, 170, 169, 173, 167, 178, 135, 18, 49, + 36, 35, 46, 43, 42, 42, 40, 44, 33, 62, + 12, 231, 180, 186, 160, 175, 171, 170, 170, 168, + 172, 161, 185, 137, 116, 53, 59, 32, 47, 43, + 42, 42, 40, 44, 33, 57, 15, 228, 180, 186, + 163, 174, 171, 170, 170, 168, 172, 166, 188, 129, + 19, 48, 36, 34, 41, 42, 42, 43, 41, 34, + 36, 49, 23, 131, 191, 161, 172, 168, 170, 170, + 168, 175, 161, 190, 140, 110, 54, 37, 34, 41, + 43, 42, 43, 46, 34, 37, 55, 102, 142, 184, + 160, 175, 171, 170, 170, 169, 173, 167, 179, 156, + 1, 63, 33, 44, 40, 42, 42, 40, 44, 38, + 61, 26, 132, 189, 166, 172, 168, 170, 170, 168, + 172, 166, 178, 155, 7, 60, 38, 44, 40, 42, + 42, 40, 45, 39, 48, 22, 141, 185, 160, 175, + 171, 170, 170, 169, 162, 165, 180, 208, 53, 37, + 34, 41, 42, 42, 43, 47, 33, 62, 0, 158, + 178, 166, 172, 168, 170, 170, 169, 173, 164, 183, + 252, 10, 37, 35, 41, 42, 42, 43, 47, 33, + 60, 5, 134, 191, 161, 175, 171, 170, 171, 174, + 160, 184, 140, 16, 51, 38, 44, 40, 42, 42, + 41, 34, 58, 11, 227, 177, 167, 173, 168, 170, + 170, 169, 162, 165, 138, 103, 49, 39, 45, 40, + 42, 42, 41, 34, 58, 8, 235, 176, 166, 172, + 171, 170, 170, 174, 163, 184, 131, 25, 60, 33, + 47, 43, 42, 43, 47, 33, 61, 29, 140, 187, + 163, 169, 170, 170, 168, 173, 164, 180, 116, 54, + 39, 44, 40, 42, 42, 46, 32, 62, 4, 129, + 185, 163, 174, 170, 170, 168, 173, 164, 181, 102, + 48, 38, 44, 43, 42, 43, 47, 38, 51, 107, + 138, 165, 173, 168, 170, 170, 174, 160, 190, 133, + 3, 56, 35, 41, 42, 42, 41, 35, 56, 3, + 132, 190, 163, 169, 170, 170, 169, 162, 187, 141, + 26, 62, 32, 41, 42, 42, 41, 34, 59, 3, + 132, 185, 163, 169, 170, 170, 169, 163, 185, 132, + 2, 59, 34, 40, 42, 42, 46, 33, 61, 20, + 181, 164, 172, 171, 170, 171, 172, 167, 183, 121, + 51, 33, 46, 42, 42, 40, 34, 59, 3, 134, + 184, 162, 168, 170, 170, 174, 161, 179, 240, 54, + 38, 47, 43, 42, 40, 34, 58, 3, 129, 187, + 162, 168, 170, 171, 175, 166, 183, 103, 50, 33, + 46, 42, 42, 41, 32, 60, 21, 180, 167, 175, + 171, 170, 168, 162, 184, 135, 12, 37, 45, 43, + 42, 43, 45, 37, 13, 134, 187, 162, 168, 170, + 171, 172, 164, 137, 5, 56, 34, 40, 42, 43, + 44, 36, 9, 133, 184, 162, 168, 170, 171, 172, + 165, 140, 6, 58, 45, 40, 42, 43, 45, 58, + 6, 143, 164, 172, 171, 170, 168, 163, 191, 150, + 52, 38, 47, 42, 42, 46, 33, 48, 253, 189, + 160, 169, 170, 171, 172, 164, 142, 6, 58, 45, + 43, 42, 40, 35, 63, 21, 182, 166, 174, 170, + 170, 175, 167, 181, 25, 56, 45, 43, 42, 40, + 34, 63, 107, 182, 161, 174, 170, 170, 175, 164, + 143, 0, 37, 44, 43, 42, 41, 33, 48, 224, + 191, 163, 168, 170, 168, 162, 190, 234, 49, 33, + 41, 42, 43, 44, 37, 7, 139, 167, 174, 170, + 170, 175, 164, 140, 2, 36, 47, 42, 42, 46, + 39, 11, 135, 165, 172, 171, 170, 174, 166, 181, + 4, 37, 44, 43, 42, 46, 38, 10, 135, 165, + 172, 170, 170, 174, 167, 137, 3, 36, 47, 42, + 42, 47, 36, 0, 136, 167, 174, 170, 171, 172, + 187, 157, 54, 33, 41, 42, 43, 34, 60, 213, + 188, 162, 171, 170, 169, 161, 183, 27, 37, 44, + 42, 42, 47, 37, 7, 181, 161, 169, 170, 171, + 162, 189, 117, 63, 34, 43, 42, 46, 39, 14, + 140, 167, 174, 170, 171, 162, 191, 223, 60, 34, + 43, 42, 46, 39, 13, 137, 166, 169, 170, 171, + 163, 178, 104, 56, 44, 42, 42, 47, 58, 18, + 176, 163, 168, 170, 169, 166, 137, 15, 38, 41, + 42, 40, 35, 48, 157, 165, 175, 170, 171, 173, + 191, 80, 62, 45, 43, 42, 47, 58, 20, 178, + 162, 171, 170, 174, 164, 154, 49, 35, 40, 42, + 46, 39, 1, 183, 160, 168, 170, 169, 167, 131, + 52, 32, 40, 42, 41, 39, 0, 180, 160, 168, + 170, 174, 167, 135, 54, 35, 43, 42, 46, 37, + 31, 179, 162, 171, 170, 175, 187, 230, 63, 45, + 42, 42, 45, 60, 226, 186, 175, 170, 171, 163, + 182, 7, 39, 41, 42, 41, 38, 13, 180, 160, + 168, 170, 175, 165, 238, 60, 45, 42, 43, 34, + 51, 158, 164, 174, 170, 168, 166, 130, 55, 35, + 43, 42, 44, 57, 202, 187, 175, 170, 168, 160, + 138, 8, 32, 40, 42, 47, 59, 89, 184, 175, + 170, 168, 160, 136, 53, 32, 43, 42, 44, 62, + 226, 165, 174, 170, 169, 166, 135, 48, 34, 42, + 43, 34, 49, 128, 166, 168, 170, 175, 184, 66, + 58, 46, 42, 41, 39, 5, 178, 173, 170, 171, + 163, 181, 10, 32, 43, 42, 45, 50, 132, 166, + 168, 170, 175, 185, 98, 37, 41, 42, 46, 37, + 123, 184, 175, 170, 169, 167, 147, 63, 44, 42, + 40, 38, 5, 189, 172, 170, 168, 161, 129, 51, + 45, 42, 40, 33, 0, 179, 173, 170, 168, 161, + 129, 51, 45, 42, 40, 38, 4, 189, 172, 170, + 168, 167, 157, 62, 47, 42, 41, 36, 103, 187, + 174, 170, 174, 187, 102, 36, 41, 42, 47, 60, + 133, 166, 168, 170, 162, 182, 11, 35, 42, 43, + 32, 3, 178, 172, 170, 169, 164, 231, 58, 46, + 42, 47, 63, 154, 166, 171, 170, 162, 181, 55, + 45, 42, 40, 39, 21, 187, 174, 170, 175, 188, + 7, 33, 43, 43, 32, 13, 178, 172, 170, 169, + 186, 110, 39, 40, 42, 34, 53, 182, 173, 170, + 169, 165, 112, 36, 40, 42, 34, 53, 182, 173, + 170, 169, 165, 108, 39, 40, 42, 35, 12, 178, + 175, 170, 174, 190, 7, 32, 43, 43, 38, 17, + 187, 169, 170, 173, 183, 55, 45, 42, 41, 59, + 156, 161, 171, 171, 166, 145, 58, 41, 42, 34, + 10, 176, 172, 170, 175, 188, 13, 35, 42, 40, + 37, 233, 166, 171, 171, 166, 151, 37, 40, 42, + 35, 2, 191, 174, 170, 173, 180, 49, 44, 42, + 47, 51, 138, 173, 170, 174, 190, 3, 35, 42, + 41, 59, 155, 160, 170, 168, 165, 17, 33, 42, + 40, 36, 239, 161, 171, 168, 164, 102, 38, 43, + 43, 36, 230, 166, 171, 168, 164, 111, 33, 43, + 40, 37, 145, 161, 170, 168, 186, 26, 35, 42, + 41, 57, 131, 162, 170, 174, 189, 10, 45, 42, + 47, 54, 177, 175, 170, 173, 142, 63, 41, 42, + 32, 31, 165, 168, 171, 167, 113, 38, 42, 40, + 59, 129, 162, 170, 174, 176, 54, 47, 42, 34, + 3, 184, 168, 170, 166, 84, 38, 42, 40, 56, + 141, 173, 170, 172, 181, 60, 41, 42, 32, 96, + 167, 171, 168, 184, 13, 45, 42, 44, 8, 190, + 169, 170, 166, 101, 33, 42, 46, 50, 182, 175, + 170, 163, 145, 39, 43, 40, 57, 137, 172, 170, + 162, 135, 37, 43, 40, 58, 141, 173, 170, 173, + 129, 37, 43, 40, 59, 140, 172, 170, 162, 154, + 36, 43, 40, 62, 181, 175, 170, 160, 231, 38, + 42, 46, 49, 178, 169, 170, 167, 28, 34, 42, + 45, 0, 165, 171, 168, 191, 55, 46, 42, 33, + 227, 163, 170, 172, 141, 37, 43, 40, 63, 182, + 174, 170, 166, 18, 34, 42, 34, 25, 167, 170, + 174, 182, 63, 40, 43, 56, 181, 175, 170, 166, + 16, 34, 42, 34, 22, 166, 170, 175, 137, 37, + 43, 41, 51, 189, 168, 171, 187, 53, 46, 42, + 39, 134, 172, 170, 161, 108, 34, 42, 34, 99, + 160, 170, 173, 154, 38, 42, 47, 13, 164, 170, + 174, 181, 58, 43, 41, 54, 184, 171, 169, 176, + 62, 40, 40, 50, 188, 168, 168, 178, 61, 40, + 40, 61, 189, 168, 168, 178, 60, 40, 40, 51, + 191, 171, 169, 177, 57, 43, 41, 55, 187, 171, + 174, 139, 37, 42, 47, 3, 167, 170, 172, 159, + 33, 42, 34, 116, 163, 170, 160, 17, 45, 42, + 39, 141, 174, 170, 186, 54, 41, 40, 50, 190, + 171, 174, 136, 36, 42, 44, 16, 160, 170, 160, + 17, 44, 42, 36, 181, 169, 171, 189, 62, 43, + 46, 13, 166, 170, 162, 118, 45, 42, 39, 139, + 169, 171, 178, 56, 43, 47, 5, 160, 170, 160, + 26, 47, 43, 57, 189, 171, 174, 130, 38, 42, + 35, 156, 175, 170, 185, 61, 43, 46, 6, 161, + 170, 161, 0, 46, 43, 50, 187, 170, 172, 254, + 34, 42, 37, 177, 168, 174, 130, 33, 42, 33, + 141, 169, 168, 183, 36, 42, 35, 157, 175, 171, + 178, 58, 42, 45, 225, 172, 171, 191, 56, 42, + 45, 243, 172, 170, 191, 56, 42, 45, 224, 172, + 171, 189, 58, 42, 34, 159, 174, 171, 182, 39, + 42, 33, 140, 169, 169, 141, 32, 42, 36, 176, + 171, 175, 228, 45, 42, 60, 186, 170, 163, 1, + 41, 41, 13, 160, 170, 165, 61, 42, 45, 149, + 175, 168, 181, 33, 42, 36, 179, 171, 173, 111, + 47, 40, 10, 161, 170, 165, 60, 42, 34, 155, + 169, 169, 134, 35, 42, 63, 165, 170, 161, 52, + 43, 44, 252, 175, 168, 142, 32, 42, 57, 186, + 170, 161, 55, 43, 44, 151, 174, 169, 132, 34, + 43, 48, 166, 170, 165, 62, 42, 32, 181, 171, + 172, 18, 41, 41, 22, 172, 171, 136, 35, 42, + 61, 167, 170, 165, 56, 42, 38, 176, 170, 163, + 15, 43, 44, 157, 169, 174, 201, 47, 41, 24, + 172, 171, 143, 34, 43, 55, 160, 170, 178, 38, + 42, 62, 164, 170, 187, 37, 42, 37, 184, 170, + 164, 62, 42, 39, 188, 170, 166, 61, 42, 38, + 178, 170, 161, 51, 42, 33, 179, 170, 161, 50, + 42, 38, 189, 170, 166, 60, 42, 39, 190, 170, + 164, 59, 42, 58, 165, 170, 185, 39, 42, 61, + 166, 170, 177, 32, 43, 11, 162, 171, 134, 44, + 41, 108, 174, 174, 107, 40, 44, 131, 171, 163, + 54, 42, 38, 190, 170, 186, 36, 42, 51, 160, + 171, 143, 45, 40, 97, 174, 175, 4, 43, 35, + 177, 170, 167, 58, 42, 61, 160, 171, 141, 44, + 41, 254, 168, 173, 53, 42, 38, 187, 170, 189, + 32, 43, 7, 175, 174, 25, 43, 32, 178, 170, + 184, 38, 42, 12, 172, 174, 29, 43, 32, 189, + 170, 190, 33, 43, 5, 174, 175, 12, 42, 39, + 165, 170, 180, 45, 41, 148, 171, 160, 63, 42, + 50, 163, 168, 95, 40, 35, 189, 170, 189, 35, + 40, 219, 168, 163, 60, 42, 48, 162, 169, 22, + 43, 33, 186, 170, 139, 47, 47, 142, 170, 165, + 33, 43, 104, 168, 163, 63, 42, 54, 172, 174, + 13, 42, 58, 161, 171, 204, 40, 33, 186, 170, + 130, 46, 45, 176, 170, 176, 45, 46, 142, 170, + 185, 35, 41, 153, 170, 165, 33, 40, 231, 171, + 167, 39, 43, 78, 171, 166, 39, 43, 100, 171, + 166, 36, 43, 120, 171, 166, 39, 43, 217, 171, + 167, 38, 40, 148, 170, 165, 32, 41, 129, 170, + 191, 45, 47, 180, 170, 183, 47, 45, 191, 170, + 132, 40, 33, 167, 171, 110, 42, 59, 162, 174, + 52, 42, 53, 174, 163, 58, 43, 89, 171, 186, + 35, 46, 180, 170, 137, 41, 32, 164, 171, 31, + 42, 61, 172, 173, 57, 42, 119, 171, 187, 34, + 47, 178, 170, 145, 43, 37, 162, 175, 51, 42, + 16, 171, 165, 34, 47, 189, 170, 251, 42, 62, + 172, 173, 59, 43, 144, 170, 177, 46, 32, 166, + 169, 53, 42, 5, 171, 186, 45, 45, 187, 171, + 27, 42, 10, 168, 167, 35, 47, 191, 171, 16, + 42, 53, 168, 167, 34, 44, 184, 171, 7, 42, + 3, 171, 187, 44, 34, 167, 169, 54, 42, 194, + 170, 180, 40, 36, 173, 173, 36, 41, 183, 170, + 123, 42, 8, 168, 187, 44, 32, 161, 175, 62, + 43, 140, 170, 228, 42, 53, 168, 187, 47, 33, + 160, 172, 37, 40, 177, 170, 27, 42, 22, 170, + 180, 40, 57, 174, 166, 34, 34, 166, 175, 59, + 40, 177, 171, 0, 42, 246, 170, 133, 42, 52, + 171, 188, 41, 37, 175, 166, 34, 35, 160, 172, + 39, 46, 187, 169, 61, 43, 183, 171, 15, 42, + 155, 170, 97, 42, 103, 170, 159, 42, 0, 170, + 136, 43, 52, 171, 177, 43, 50, 168, 188, 40, + 62, 169, 185, 41, 59, 169, 187, 46, 58, 174, + 186, 46, 58, 174, 186, 41, 59, 169, 184, 41, + 57, 169, 191, 40, 61, 168, 176, 43, 55, 171, + 138, 42, 13, 170, 133, 42, 104, 170, 119, 42, + 156, 170, 2, 42, 180, 171, 50, 40, 184, 174, + 36, 44, 161, 162, 34, 33, 175, 165, 41, 60, + 171, 180, 42, 5, 170, 126, 42, 130, 171, 48, + 40, 186, 175, 33, 35, 173, 164, 41, 60, 171, + 143, 42, 83, 170, 15, 43, 191, 174, 38, 34, + 173, 164, 41, 48, 170, 158, 42, 135, 171, 61, + 46, 166, 163, 44, 58, 168, 136, 42, 226, 170, + 49, 41, 167, 163, 44, 59, 171, 130, 42, 132, + 171, 57, 47, 163, 167, 41, 55, 170, 104, 42, + 188, 175, 35, 39, 169, 181, 42, 158, 171, 56, + 45, 173, 186, 43, 24, 170, 52, 41, 161, 161, + 41, 53, 170, 1, 40, 164, 163, 46, 49, 170, + 24, 43, 164, 163, 46, 49, 170, 7, 40, 167, + 161, 41, 8, 170, 53, 41, 160, 164, 43, 21, + 170, 62, 45, 175, 176, 42, 130, 169, 32, 36, + 171, 225, 42, 186, 163, 41, 9, 170, 48, 44, + 172, 179, 42, 142, 174, 34, 57, 170, 4, 41, + 160, 165, 42, 146, 168, 32, 37, 170, 18, 40, + 160, 186, 42, 132, 169, 35, 62, 170, 14, 46, + 173, 176, 42, 176, 173, 46, 2, 170, 58, 33, + 171, 91, 40, 160, 184, 42, 139, 175, 47, 9, + 170, 37, 38, 171, 16, 41, 173, 176, 42, 191, + 160, 43, 230, 168, 34, 48, 170, 57, 33, 171, + 28, 46, 172, 139, 42, 164, 164, 42, 180, 173, + 41, 113, 168, 34, 55, 170, 36, 36, 170, 54, + 34, 168, 23, 46, 175, 135, 43, 163, 179, 42, + 164, 165, 42, 189, 160, 42, 137, 173, 40, 150, + 174, 46, 105, 168, 44, 0, 171, 34, 53, 170, + 32, 48, 170, 38, 60, 170, 39, 57, 170, 36, + 59, 170, 37, 59, 170, 37, 59, 170, 37, 56, + 170, 36, 62, 170, 39, 61, 170, 33, 49, 170, + 35, 8, 171, 45, 5, 168, 47, 66, 174, 41, + 133, 173, 43, 180, 161, 42, 185, 165, 42, 166, + 176, 43, 173, 154, 41, 169, 30, 45, 171, 51, + 39, 170, 39, 48, 171, 44, 109, 175, 40, 181, + 161, 42, 164, 179, 43, 172, 196, 44, 171, 51, + 36, 170, 32, 3, 169, 40, 137, 161, 42, 166, + 138, 40, 169, 12, 33, 170, 38, 9, 169, 40, + 181, 167, 42, 163, 156, 47, 171, 63, 63, 171, + 47, 154, 160, 42, 161, 134, 46, 171, 62, 61, + 171, 46, 137, 167, 42, 173, 103, 35, 170, 33, + 27, 172, 42, 164, 139, 46, 171, 56, 49, 169, + 40, 188, 178, 40, 168, 50, 60, 168, 40, 189, + 189, 40, 168, 63, 48, 169, 43, 187, 181, 46, + 170, 39, 6, 172, 42, 160, 217, 32, 170, 44, + 131, 165, 43, 169, 61, 48, 174, 42, 166, 150, + 35, 170, 44, 142, 187, 40, 171, 37, 6, 173, + 42, 172, 14, 56, 168, 43, 167, 232, 32, 170, + 46, 189, 180, 44, 170, 45, 142, 190, 41, 170, + 32, 156, 165, 40, 171, 38, 231, 164, 43, 171, + 38, 251, 164, 40, 171, 33, 150, 165, 40, 170, + 35, 130, 191, 46, 170, 44, 176, 138, 34, 170, + 40, 164, 244, 36, 168, 42, 162, 52, 55, 173, + 42, 168, 39, 235, 187, 46, 170, 46, 184, 148, + 39, 168, 42, 172, 60, 25, 167, 40, 170, 47, + 190, 148, 36, 169, 42, 174, 37, 238, 190, 44, + 170, 43, 160, 53, 14, 161, 40, 170, 46, 165, + 18, 50, 162, 43, 170, 44, 184, 103, 60, 173, + 43, 170, 47, 165, 28, 49, 163, 40, 170, 41, + 161, 52, 4, 165, 47, 170, 42, 175, 36, 130, +}; + +static const int16_t ref_alaw_dec_data[4000] = { + 30208, 29184, 28160, 26112, 25088, 23040, 20992, 18944, 16896, 14592, + 12032, 9984, 7296, 4736, 2240, -424, -3008, -5504, -8064, -10496, + -13056, -15616, -17920, -19968, -22016, -24064, -25088, -27136, -28160, -29184, + -30208, -31232, -32256, -32256, -32256, -32256, -32256, -32256, -31232, -30208, + -29184, -28160, -27136, -25088, -23040, -20992, -18944, -16896, -14592, -12032, + -9472, -7040, -4480, -1696, 976, 3648, 6272, 8960, 11520, 14080, + 16896, 18944, 20992, 23040, 25088, 26112, 28160, 29184, 30208, 31232, + 32256, 32256, 32256, 32256, 32256, 32256, 31232, 30208, 29184, 28160, + 26112, 25088, 23040, 20992, 18944, 16128, 14080, 11520, 8448, 6016, + 3136, 392, -2368, -5248, -7808, -10496, -13056, -15616, -17920, -19968, + -22016, -24064, -26112, -28160, -29184, -30208, -31232, -32256, -32256, -32256, + -32256, -32256, -32256, -31232, -30208, -29184, -27136, -26112, -24064, -22016, + -19968, -17920, -15104, -12544, -9984, -7040, -4224, -1248, 1632, 4480, + 7296, 9984, 13056, 15616, 17920, 19968, 22016, 24064, 26112, 28160, + 29184, 30208, 31232, 32256, 32256, 32256, 32256, 32256, 31232, 31232, + 30208, 28160, 27136, 25088, 23040, 20992, 17920, 16128, 13056, 10496, + 7552, 4736, 1760, -1184, -4224, -7040, -9984, -12544, -15616, -17920, + -19968, -23040, -25088, -26112, -28160, -29184, -31232, -31232, -32256, -32256, + -32256, -32256, -32256, -31232, -30208, -29184, -27136, -26112, -24064, -22016, + -18944, -16896, -14080, -11008, -8064, -5248, -2112, 944, 4032, 7040, + 9984, 13056, 15616, 17920, 20992, 23040, 25088, 27136, 28160, 30208, + 31232, 32256, 32256, 32256, 32256, 32256, 31232, 31232, 29184, 28160, + 26112, 24064, 22016, 19968, 16896, 14592, 11520, 8448, 5504, 2496, + -688, -3776, -7040, -9984, -13056, -15616, -18944, -20992, -23040, -25088, + -27136, -29184, -30208, -31232, -32256, -32256, -32256, -32256, -32256, -31232, + -30208, -29184, -27136, -25088, -23040, -20992, -17920, -15616, -12544, -9472, + -6272, -3008, 216, 3520, 6784, 9984, 13056, 15616, 18944, 20992, + 24064, 26112, 27136, 29184, 30208, 31232, 32256, 32256, 32256, 32256, + 32256, 31232, 30208, 28160, 26112, 24064, 22016, 18944, 16896, 13568, + 10496, 7296, 3904, 624, -2752, -6016, -9472, -12544, -15616, -17920, + -20992, -23040, -26112, -28160, -29184, -30208, -31232, -32256, -32256, -32256, + -32256, -31232, -30208, -29184, -27136, -25088, -23040, -20992, -17920, -15104, + -12032, -8960, -5504, -2016, 1376, 4736, 8064, 11520, 14592, 17920, + 19968, 23040, 25088, 27136, 29184, 30208, 31232, 32256, 32256, 32256, + 32256, 31232, 30208, 29184, 27136, 25088, 23040, 19968, 16896, 14080, + 11008, 7808, 4224, 720, -2752, -6272, -9472, -13056, -16128, -18944, + -22016, -24064, -27136, -28160, -30208, -31232, -32256, -32256, -32256, -32256, + -32256, -30208, -29184, -27136, -25088, -23040, -19968, -16896, -14080, -11008, + -7296, -3776, -200, 3392, 7040, 10496, 14080, 16896, 19968, 23040, + 25088, 27136, 29184, 30208, 32256, 32256, 32256, 32256, 32256, 31232, + 30208, 28160, 26112, 24064, 20992, 17920, 15104, 11520, 8064, 4480, + 688, -3008, -6784, -10496, -13568, -16896, -19968, -23040, -25088, -27136, + -29184, -31232, -32256, -32256, -32256, -32256, -32256, -31232, -29184, -27136, + -25088, -23040, -19968, -16896, -13568, -9984, -6016, -2368, 1440, 5248, + 8960, 12544, 16128, 18944, 22016, 25088, 27136, 29184, 30208, 32256, + 32256, 32256, 32256, 32256, 31232, 29184, 27136, 25088, 23040, 19968, + 16128, 13056, 9472, 5504, 1632, -2240, -6016, -9984, -13568, -16896, + -19968, -23040, -26112, -28160, -30208, -31232, -32256, -32256, -32256, -32256, + -31232, -30208, -28160, -26112, -23040, -20992, -16896, -13568, -9984, -6272, + -2240, 1696, 5760, 9472, 13056, 16896, 19968, 23040, 26112, 28160, + 30208, 31232, 32256, 32256, 32256, 32256, 31232, 29184, 28160, 25088, + 23040, 19968, 16128, 12544, 8448, 4736, 592, -3520, -7552, -11520, + -15104, -18944, -22016, -25088, -27136, -29184, -31232, -32256, -32256, -32256, + -32256, -31232, -30208, -28160, -26112, -23040, -19968, -16896, -12544, -8960, + -4736, -624, 3520, 7552, 11520, 15616, 18944, 22016, 25088, 27136, + 29184, 31232, 32256, 32256, 32256, 32256, 31232, 29184, 27136, 25088, + 22016, 17920, 14592, 11008, 6784, 2624, -1632, -5760, -9984, -14080, + -17920, -20992, -24064, -27136, -29184, -31232, -32256, -32256, -32256, -32256, + -31232, -29184, -27136, -25088, -22016, -18944, -14592, -11008, -6784, -2368, + 1952, 6272, 10496, 14592, 17920, 22016, 25088, 27136, 29184, 31232, + 32256, 32256, 32256, 32256, 30208, 29184, 26112, 24064, 19968, 16896, + 13056, 8960, 4480, -56, -4480, -8960, -13056, -16896, -20992, -24064, + -27136, -29184, -31232, -32256, -32256, -32256, -32256, -31232, -29184, -27136, + -24064, -20992, -16896, -13056, -8960, -4224, 232, 4736, 8960, 13568, + 17920, 20992, 24064, 27136, 29184, 31232, 32256, 32256, 32256, 32256, + 30208, 28160, 26112, 23040, 18944, 15104, 11008, 6784, 2112, -2496, + -7040, -11520, -15616, -19968, -23040, -26112, -29184, -30208, -32256, -32256, + -32256, -32256, -31232, -29184, -26112, -23040, -19968, -15616, -11520, -7040, + -2368, 2240, 7040, 11520, 15616, 19968, 23040, 26112, 29184, 31232, + 32256, 32256, 32256, 32256, 30208, 28160, 26112, 22016, 18944, 14592, + 9984, 5504, 720, -4032, -8960, -13568, -17920, -20992, -25088, -28160, + -30208, -31232, -32256, -32256, -32256, -31232, -29184, -27136, -23040, -19968, + -15616, -11520, -6784, -1824, 3008, 7808, 12544, 16896, 20992, 24064, + 27136, 30208, 31232, 32256, 32256, 32256, 31232, 29184, 26112, 23040, + 19968, 15616, 11008, 6016, 1056, -3904, -8960, -13568, -17920, -22016, + -25088, -28160, -30208, -32256, -32256, -32256, -32256, -30208, -28160, -25088, + -22016, -17920, -13056, -8448, -3392, 1696, 6784, 11520, 16128, 19968, + 24064, 27136, 30208, 31232, 32256, 32256, 32256, 31232, 28160, 26112, + 22016, 17920, 13568, 8960, 3904, -1248, -6272, -11520, -16128, -19968, + -24064, -27136, -30208, -31232, -32256, -32256, -32256, -30208, -28160, -25088, + -22016, -17920, -12544, -7808, -2624, 2624, 7808, 13056, 17920, 22016, + 25088, 28160, 30208, 32256, 32256, 32256, 31232, 29184, 27136, 23040, + 18944, 15104, 9984, 4736, -560, -5760, -11008, -16128, -19968, -24064, + -27136, -30208, -32256, -32256, -32256, -31232, -30208, -27136, -24064, -19968, + -15616, -10496, -5248, 184, 5504, 11008, 15616, 19968, 24064, 28160, + 30208, 32256, 32256, 32256, 31232, 29184, 27136, 23040, 18944, 14592, + 9472, 3904, -1568, -7040, -12544, -16896, -22016, -25088, -28160, -31232, + -32256, -32256, -32256, -31232, -28160, -25088, -20992, -16896, -12032, -6528, + -912, 4736, 9984, 15616, 19968, 24064, 28160, 30208, 32256, 32256, + 32256, 31232, 29184, 26112, 22016, 17920, 13056, 7296, 1760, -3904, + -9472, -15104, -19968, -24064, -27136, -30208, -32256, -32256, -32256, -31232, + -29184, -26112, -22016, -17920, -12032, -6784, -976, 4736, 10496, 15616, + 20992, 25088, 28160, 31232, 32256, 32256, 32256, 30208, 28160, 25088, + 19968, 15616, 9984, 4480, -1504, -7296, -13056, -17920, -23040, -27136, + -29184, -31232, -32256, -32256, -31232, -29184, -26112, -22016, -16896, -12032, + -6272, -328, 5760, 11520, 16896, 22016, 26112, 29184, 31232, 32256, + 32256, 31232, 29184, 26112, 23040, 17920, 12544, 6528, 624, -5504, + -11520, -16896, -22016, -26112, -29184, -31232, -32256, -32256, -31232, -29184, + -26112, -22016, -16896, -11520, -5504, 656, 6784, 12544, 17920, 23040, + 27136, 30208, 32256, 32256, 32256, 31232, 28160, 24064, 19968, 14592, + 8960, 2752, -3520, -9472, -15616, -20992, -25088, -29184, -31232, -32256, + -32256, -31232, -29184, -26112, -22016, -16896, -11008, -4736, 1632, 7808, + 14080, 18944, 24064, 28160, 31232, 32256, 32256, 32256, 30208, 26112, + 22016, 16896, 11520, 5248, -1184, -7552, -13568, -18944, -24064, -28160, + -31232, -32256, -32256, -32256, -29184, -26112, -22016, -16896, -10496, -4224, + 2240, 8448, 14592, 19968, 25088, 29184, 31232, 32256, 32256, 31232, + 29184, 25088, 19968, 14592, 8448, 1952, -4736, -11008, -16896, -22016, + -27136, -30208, -32256, -32256, -32256, -30208, -27136, -23040, -16896, -11008, + -4736, 2016, 8448, 15104, 20992, 25088, 29184, 31232, 32256, 32256, + 31232, 28160, 24064, 18944, 12544, 6016, -624, -7296, -14080, -19968, + -25088, -28160, -31232, -32256, -32256, -31232, -28160, -24064, -18944, -13056, + -6272, 656, 7552, 14080, 19968, 25088, 29184, 31232, 32256, 32256, + 31232, 28160, 23040, 17920, 11520, 4992, -2016, -8960, -15616, -20992, + -26112, -29184, -32256, -32256, -32256, -30208, -26112, -22016, -15616, -9472, + -2240, 4736, 11520, 17920, 23040, 28160, 31232, 32256, 32256, 31232, + 28160, 24064, 18944, 12032, 5248, -1824, -8960, -15616, -20992, -26112, + -30208, -32256, -32256, -32256, -29184, -25088, -19968, -14080, -7040, 88, + 7296, 14080, 19968, 25088, 29184, 32256, 32256, 32256, 29184, 26112, + 20992, 14592, 7552, 376, -7040, -14080, -19968, -25088, -29184, -32256, + -32256, -32256, -29184, -25088, -19968, -14080, -7040, 440, 7808, 14592, + 20992, 26112, 30208, 32256, 32256, 31232, 29184, 24064, 18944, 12032, + 4992, -2496, -9984, -16896, -23040, -27136, -31232, -32256, -32256, -30208, + -27136, -22016, -16128, -8960, -1632, 6016, 13056, 19968, 25088, 29184, + 32256, 32256, 32256, 29184, 25088, 18944, 12032, 4736, -3008, -10496, + -17920, -23040, -28160, -31232, -32256, -32256, -30208, -26112, -20992, -14080, + -6528, 1184, 8960, 16128, 22016, 27136, 31232, 32256, 32256, 30208, + 26112, 20992, 14592, 7296, -560, -8448, -15616, -22016, -27136, -31232, + -32256, -32256, -30208, -26112, -20992, -14592, -6784, 1120, 8960, 16128, + 23040, 28160, 31232, 32256, 32256, 30208, 26112, 19968, 13056, 5248, + -2880, -11008, -17920, -24064, -29184, -32256, -32256, -31232, -29184, -24064, + -17920, -10496, -2368, 5760, 13568, 20992, 26112, 30208, 32256, 32256, + 30208, 27136, 20992, 14080, 6528, -1760, -9984, -16896, -24064, -29184, + -31232, -32256, -31232, -28160, -24064, -16896, -9472, -1248, 7040, 15104, + 22016, 27136, 31232, 32256, 32256, 29184, 25088, 18944, 11520, 3264, + -5248, -13568, -20992, -26112, -30208, -32256, -32256, -30208, -26112, -19968, + -12544, -4032, 4480, 12544, 19968, 26112, 30208, 32256, 32256, 30208, + 26112, 19968, 12032, 3904, -4736, -13056, -19968, -26112, -30208, -32256, + -32256, -30208, -25088, -18944, -11008, -2496, 6272, 14592, 22016, 27136, + 31232, 32256, 32256, 29184, 24064, 16896, 8960, 88, -8448, -16896, + -24064, -29184, -32256, -32256, -31232, -27136, -20992, -14080, -5504, 3520, + 12032, 19968, 26112, 30208, 32256, 32256, 29184, 25088, 17920, 9472, + 816, -8064, -16896, -23040, -29184, -32256, -32256, -31232, -27136, -20992, + -13056, -4224, 4992, 13568, 20992, 27136, 31232, 32256, 31232, 28160, + 22016, 15104, 6528, -2752, -11520, -19968, -26112, -30208, -32256, -32256, + -29184, -24064, -16128, -7808, 1440, 10496, 18944, 25088, 30208, 32256, + 32256, 29184, 24064, 16896, 8064, -1184, -10496, -18944, -25088, -30208, + -32256, -32256, -29184, -24064, -16128, -7552, 1952, 11008, 19968, 26112, + 31232, 32256, 32256, 28160, 23040, 15104, 5760, -3648, -13056, -20992, + -27136, -31232, -32256, -31232, -27136, -20992, -12544, -3136, 6528, 15616, + 23040, 29184, 32256, 32256, 30208, 25088, 17920, 8960, -560, -9984, + -18944, -26112, -30208, -32256, -32256, -28160, -22016, -14080, -4480, 5248, + 14592, 23040, 28160, 32256, 32256, 30208, 25088, 17920, 8448, -1248, + -11008, -19968, -26112, -31232, -32256, -31232, -27136, -19968, -11520, -1952, + 8064, 16896, 25088, 30208, 32256, 32256, 28160, 22016, 14080, 4224, + -5760, -15104, -23040, -29184, -32256, -32256, -29184, -23040, -15104, -5760, + 4480, 14080, 23040, 29184, 32256, 32256, 29184, 24064, 15616, 6272, + -4032, -14080, -22016, -29184, -32256, -32256, -29184, -24064, -15616, -5760, + 4480, 14592, 23040, 29184, 32256, 32256, 29184, 23040, 14592, 4480, + -6016, -15616, -24064, -30208, -32256, -32256, -28160, -20992, -12544, -2240, + 8448, 17920, 26112, 31232, 32256, 31232, 26112, 18944, 9472, -912, + -11520, -20992, -28160, -32256, -32256, -30208, -24064, -15616, -5760, 4992, + 15104, 24064, 30208, 32256, 32256, 28160, 20992, 11520, 688, -9984, + -19968, -27136, -31232, -32256, -30208, -24064, -16128, -5760, 5248, 15616, + 24064, 30208, 32256, 31232, 27136, 19968, 9472, -1184, -12032, -20992, + -28160, -32256, -32256, -29184, -22016, -13056, -2112, 8960, 18944, 27136, + 31232, 32256, 30208, 24064, 15104, 4736, -6528, -16896, -25088, -31232, + -32256, -31232, -25088, -16896, -6272, 4992, 15616, 24064, 30208, 32256, + 31232, 26112, 17920, 7296, -4224, -15104, -24064, -30208, -32256, -31232, + -26112, -17920, -7296, 4224, 15104, 24064, 30208, 32256, 31232, 26112, + 16896, 6528, -4992, -16128, -25088, -30208, -32256, -31232, -25088, -16128, + -4992, 6784, 17920, 26112, 31232, 32256, 30208, 23040, 13568, 2496, + -8960, -19968, -27136, -32256, -32256, -28160, -20992, -11008, 784, 12544, + 22016, 29184, 32256, 31232, 26112, 17920, 7040, -4992, -16128, -25088, + -31232, -32256, -30208, -23040, -13568, -2112, 9984, 19968, 28160, 32256, + 32256, 27136, 18944, 8448, -3648, -15104, -25088, -31232, -32256, -30208, + -24064, -13568, -1952, 9984, 20992, 28160, 32256, 32256, 27136, 17920, + 6784, -5504, -16896, -26112, -31232, -32256, -29184, -20992, -11008, 1376, + 13568, 23040, 30208, 32256, 30208, 24064, 14080, 2016, -10496, -20992, + -29184, -32256, -31232, -26112, -16896, -4736, 7808, 18944, 28160, 32256, + 32256, 27136, 17920, 6528, -6016, -17920, -27136, -32256, -32256, -28160, + -18944, -7808, 4736, 16896, 26112, 31232, 32256, 28160, 19968, 8448, + -4480, -16896, -26112, -31232, -32256, -28160, -19968, -8064, 4736, 16896, + 26112, 32256, 32256, 28160, 18944, 7296, -5760, -17920, -27136, -32256, + -32256, -27136, -17920, -5504, 7552, 18944, 28160, 32256, 31232, 26112, + 15616, 3136, -9984, -20992, -29184, -32256, -31232, -24064, -13056, 8, + 13056, 24064, 31232, 32256, 29184, 20992, 9472, -3904, -16896, -26112, + -32256, -32256, -27136, -16896, -4736, 8448, 20992, 29184, 32256, 31232, + 24064, 12544, -528, -13568, -24064, -31232, -32256, -28160, -18944, -7040, + 6528, 18944, 28160, 32256, 31232, 24064, 13568, 168, -13056, -24064, + -31232, -32256, -28160, -18944, -6272, 7296, 19968, 29184, 32256, 31232, + 23040, 12032, -1888, -15104, -26112, -32256, -32256, -27136, -16128, -3008, + 11008, 23040, 30208, 32256, 29184, 19968, 7296, -6784, -19968, -29184, + -32256, -30208, -23040, -11008, 3136, 16896, 27136, 32256, 31232, 25088, + 13568, -88, -14080, -25088, -31232, -32256, -27136, -16128, -2240, 12032, + 24064, 31232, 32256, 28160, 17920, 4032, -10496, -23040, -30208, -32256, + -28160, -18944, -5248, 9472, 22016, 30208, 32256, 29184, 18944, 5760, + -8960, -22016, -30208, -32256, -29184, -18944, -5504, 8960, 22016, 30208, + 32256, 28160, 18944, 4736, -9984, -23040, -31232, -32256, -28160, -16896, + -3392, 11520, 24064, 31232, 32256, 27136, 15616, 1248, -13568, -25088, + -32256, -32256, -25088, -13056, 1504, 16128, 27136, 32256, 31232, 23040, + 9984, -4736, -18944, -29184, -32256, -29184, -19968, -6272, 8960, 22016, + 30208, 32256, 27136, 16896, 1760, -13056, -25088, -32256, -31232, -24064, + -11520, 3520, 17920, 28160, 32256, 30208, 19968, 6016, -9472, -23040, + -31232, -32256, -26112, -14592, 504, 15616, 27136, 32256, 30208, 22016, + 8064, -7552, -22016, -30208, -32256, -27136, -15616, -200, 15104, 27136, + 32256, 30208, 22016, 7552, -8448, -22016, -31232, -32256, -26112, -14080, + 1504, 16896, 28160, 32256, 29184, 19968, 4736, -11008, -24064, -32256, + -31232, -24064, -10496, 5504, 19968, 30208, 32256, 27136, 15104, -376, + -16128, -28160, -32256, -29184, -18944, -4224, 12032, 25088, 32256, 31232, + 23040, 8448, -8064, -22016, -31232, -32256, -25088, -12032, 4480, 19968, + 30208, 32256, 27136, 14592, -1504, -16896, -29184, -32256, -28160, -16896, + -976, 15104, 27136, 32256, 29184, 18944, 2880, -13568, -26112, -32256, + -30208, -19968, -4224, 12544, 26112, 32256, 30208, 20992, 5248, -11520, + -25088, -32256, -30208, -20992, -5504, 11520, 25088, 32256, 30208, 20992, + 5248, -11520, -25088, -32256, -30208, -19968, -4480, 12544, 26112, 32256, + 30208, 18944, 3136, -14080, -27136, -32256, -29184, -17920, -1184, 15616, + 28160, 32256, 28160, 15616, -1248, -17920, -29184, -32256, -27136, -13056, + 4224, 19968, 30208, 32256, 24064, 9984, -7808, -23040, -32256, -31232, + -22016, -5760, 12032, 26112, 32256, 29184, 17920, 1184, -16128, -28160, + -32256, -27136, -13568, 4032, 19968, 31232, 32256, 24064, 8448, -9472, + -25088, -32256, -30208, -18944, -2112, 15616, 28160, 32256, 27136, 13056, + -4736, -20992, -31232, -31232, -22016, -6272, 12032, 26112, 32256, 29184, + 16128, -1760, -18944, -30208, -32256, -24064, -8448, 9984, 25088, 32256, + 29184, 16896, -688, -17920, -30208, -32256, -24064, -8448, 9984, 25088, + 32256, 29184, 16896, -1632, -18944, -30208, -32256, -23040, -6528, 12032, + 27136, 32256, 28160, 14080, -4736, -22016, -31232, -31232, -19968, -2624, + 15616, 29184, 32256, 25088, 9472, -9472, -25088, -32256, -29184, -15616, + 3264, 20992, 31232, 31232, 19968, 2624, -16128, -29184, -32256, -24064, + -8064, 11008, 26112, 32256, 27136, 13056, -6272, -23040, -32256, -30208, + -16896, 1824, 19968, 31232, 31232, 19968, 2368, -16896, -30208, -32256, + -23040, -6016, 13568, 28160, 32256, 25088, 8960, -10496, -26112, -32256, + -27136, -11520, 8064, 25088, 32256, 28160, 14080, -5760, -23040, -32256, + -29184, -15616, 3904, 22016, 32256, 30208, 16896, -2624, -20992, -32256, + -30208, -17920, 1696, 20992, 31232, 30208, 17920, -1248, -19968, -31232, + -31232, -17920, 1248, 19968, 31232, 30208, 17920, -1696, -20992, -31232, + -30208, -16896, 2624, 20992, 32256, 30208, 16128, -4032, -23040, -32256, + -29184, -14592, 5760, 24064, 32256, 28160, 12544, -8064, -25088, -32256, + -27136, -9984, 10496, 27136, 32256, 25088, 7040, -13568, -29184, -32256, + -22016, -3392, 16896, 30208, 31232, 18944, -656, -19968, -32256, -30208, + -15616, 5248, 24064, 32256, 28160, 11008, -9984, -27136, -32256, -24064, + -5760, 15104, 30208, 32256, 19968, -24, -19968, -32256, -30208, -15104, + 6272, 25088, 32256, 26112, 8448, -13056, -29184, -32256, -22016, -1376, + 18944, 31232, 30208, 15104, -6272, -25088, -32256, -26112, -7552, 14080, + 29184, 32256, 19968, -1056, -20992, -32256, -28160, -12032, 9984, 27136, + 32256, 23040, 2624, -18944, -31232, -30208, -14592, 7296, 26112, 32256, + 24064, 4736, -16896, -31232, -30208, -16128, 6272, 25088, 32256, 25088, + 5248, -16896, -31232, -30208, -15616, 6528, 26112, 32256, 24064, 4032, + -17920, -31232, -30208, -14080, 8448, 27136, 32256, 22016, 1184, -19968, + -32256, -28160, -10496, 12032, 29184, 32256, 18944, -3264, -24064, -32256, + -25088, -5504, 16896, 31232, 30208, 13568, -9472, -28160, -32256, -20992, + 1440, 23040, 32256, 26112, 6272, -16896, -31232, -30208, -13568, 9984, + 28160, 32256, 19968, -3008, -24064, -32256, -24064, -3648, 18944, 32256, + 28160, 9984, -13568, -30208, -31232, -15104, 8448, 27136, 32256, 19968, + -2752, -24064, -32256, -24064, -2496, 19968, 32256, 27136, 7296, -16896, + -31232, -29184, -11520, 12544, 30208, 31232, 15616, -8448, -28160, -32256, + -18944, 4992, 26112, 32256, 20992, -1632, -24064, -32256, -24064, -1440, + 22016, 32256, 25088, 4032, -19968, -32256, -27136, -6272, 17920, 32256, + 28160, 8448, -16128, -31232, -29184, -9984, 15104, 31232, 29184, 11008, + -14080, -30208, -30208, -12032, 13056, 30208, 30208, 12032, -12544, -30208, + -30208, -12544, 12544, 30208, 30208, 12032, -13056, -30208, -30208, -11520, + 13568, 31232, 29184, 10496, -14592, -31232, -29184, -9472, 15616, 31232, + 28160, 7808, -16896, -32256, -27136, -5760, 18944, 32256, 26112, 3392, + -20992, -32256, -24064, -560, 23040, 32256, 22016, -2624, -25088, -32256, + -18944, 6272, 28160, 32256, 16128, -9984, -29184, -30208, -12032, 14080, + 31232, 28160, 7552, -17920, -32256, -26112, -2752, 22016, 32256, 22016, + -2624, -26112, -32256, -17920, 8448, 29184, 31232, 12544, -14080, -31232, + -28160, -6272, 19968, 32256, 24064, -624, -25088, -32256, -18944, 7808, + 29184, 31232, 12032, -15104, -31232, -27136, -4224, 22016, 32256, 22016, + -4032, -27136, -31232, -14592, 12544, 31232, 28160, 6016, -19968, -32256, + -23040, 3264, 27136, 32256, 14592, -12544, -31232, -28160, -4992, 20992, + 32256, 20992, -5504, -28160, -31232, -12032, 15616, 32256, 26112, 880, + -24064, -32256, -16896, 10496, 30208, 28160, 6016, -20992, -32256, -20992, + 6272, 29184, 30208, 9472, -17920, -32256, -23040, 3136, 27136, 31232, + 12032, -16128, -32256, -25088, 1312, 26112, 31232, 13568, -15104, -32256, + -25088, 720, 26112, 32256, 13568, -15104, -32256, -25088, 1376, 26112, + 31232, 12544, -16128, -32256, -24064, 3392, 28160, 31232, 9984, -18944, + -32256, -20992, 6528, 29184, 29184, 6272, -22016, -32256, -17920, 11008, + 31232, 27136, 1120, -25088, -32256, -13056, 16128, 32256, 23040, -5248, + -29184, -29184, -6272, 22016, 32256, 16896, -12544, -32256, -25088, 2112, + 27136, 30208, 8448, -20992, -32256, -17920, 11520, 31232, 25088, -1696, + -27136, -30208, -8064, 20992, 32256, 16896, -13056, -32256, -24064, 3904, + 29184, 29184, 4992, -23040, -32256, -13568, 16896, 32256, 20992, -8960, + -31232, -26112, 816, 27136, 30208, 7040, -22016, -32256, -14592, 16128, + 32256, 20992, -9472, -31232, -26112, 2368, 28160, 29184, 4480, -24064, + -31232, -11008, 19968, 32256, 16896, -14080, -32256, -22016, 8448, 31232, + 26112, -3008, -29184, -29184, -2496, 26112, 31232, 7552, -23040, -32256, + -12544, 18944, 32256, 16896, -15104, -32256, -19968, 11008, 32256, 23040, + -6784, -31232, -26112, 3136, 29184, 28160, 456, -27136, -29184, -3776, + 26112, 31232, 6784, -24064, -31232, -9472, 22016, 32256, 12032, -19968, + -32256, -14080, 17920, 32256, 15616, -16896, -32256, -16896, 15104, 32256, + 17920, -14080, -32256, -18944, 13056, 32256, 19968, -12544, -32256, -19968, + 12032, 32256, 20992, -11520, -32256, -20992, 11520, 32256, 20992, -12032, + -32256, -19968, 12544, 32256, 19968, -13056, -32256, -18944, 14080, 32256, + 17920, -15616, -32256, -16128, 16896, 32256, 14592, -18944, -32256, -12544, + 19968, 32256, 10496, -22016, -31232, -7808, 24064, 31232, 4992, -26112, + -29184, -1632, 28160, 28160, -1952, -30208, -26112, 5760, 31232, 23040, + -9984, -32256, -19968, 14080, 32256, 16128, -17920, -32256, -11520, 22016, + 31232, 6784, -25088, -30208, -1312, 28160, 27136, -4480, -31232, -23040, + 10496, 32256, 18944, -16128, -32256, -12544, 22016, 31232, 6272, -26112, + -29184, 880, 30208, 25088, -8448, -32256, -19968, 15616, 32256, 12544, + -22016, -31232, -4736, 27136, 28160, -3648, -31232, -22016, 12032, 32256, + 15104, -19968, -32256, -6528, 26112, 28160, -3136, -31232, -22016, 12544, + 32256, 14080, -20992, -31232, -4224, 28160, 27136, -6528, -32256, -18944, + 16896, 32256, 8960, -25088, -29184, 2240, 31232, 22016, -13568, -32256, + -12032, 23040, 30208, -168, -30208, -23040, 12544, 32256, 12544, -23040, + -30208, 232, 30208, 23040, -13056, -32256, -11008, 24064, 29184, -2496, + -31232, -20992, 16128, 32256, 7808, -27136, -27136, 7040, 32256, 16896, + -20992, -31232, -1888, 30208, 23040, -13568, -32256, -9984, 26112, 28160, + -6272, -32256, -16128, 20992, 31232, 408, -30208, -20992, 16128, 32256, + 6016, -28160, -25088, 11008, 32256, 11008, -25088, -28160, 7040, 32256, + 14592, -23040, -29184, 3648, 32256, 16896, -20992, -30208, 1184, 31232, + 18944, -18944, -31232, -440, 31232, 19968, -18944, -31232, -1120, 31232, + 19968, -17920, -31232, -944, 31232, 19968, -18944, -31232, 200, 31232, + 18944, -19968, -30208, 2240, 32256, 16896, -22016, -29184, 5248, 32256, + 13568, -25088, -27136, 8960, 32256, 9472, -27136, -25088, 13568, 32256, + 4480, -30208, -20992, 18944, 31232, -1760, -32256, -15616, 24064, 28160, + -8960, -32256, -8448, 28160, 23040, -16128, -31232, -200, 31232, 16128, + -23040, -28160, 8960, 32256, 7296, -29184, -22016, 17920, 31232, -3392, + -32256, -12544, 26112, 25088, -14592, -32256, -592, 31232, 15616, -24064, + -27136, 12032, 32256, 2624, -31232, -16896, 24064, 27136, -11520, -32256, + -2752, 31232, 16896, -24064, -27136, 12544, 32256, 976, -32256, -14080, + 26112, 25088, -15616, -31232, 2752, 32256, 10496, -28160, -22016, 19968, + 29184, -8448, -32256, -4224, 31232, 16128, -25088, -25088, 15616, 31232, + -3904, -32256, -8064, 30208, 18944, -23040, -27136, 13568, 31232, -2752, + -32256, -8448, 30208, 18944, -24064, -26112, 15104, 31232, -4736, -32256, + -5760, 31232, 15616, -26112, -24064, 18944, 29184, -9984, -32256, 376, + 32256, 8960, -30208, -17920, 25088, 25088, -17920, -29184, 9472, 32256, + -976, -32256, -7552, 30208, 15616, -26112, -22016, 20992, 27136, -14080, + -31232, 6528, 32256, 1120, -32256, -8448, 30208, 15616, -27136, -20992, + 22016, 26112, -16896, -30208, 10496, 32256, -3904, -32256, -2496, 32256, + 8960, -30208, -14592, 28160, 19968, -24064, -24064, 19968, 27136, -15616, + -30208, 10496, 31232, -5504, -32256, 624, 32256, 4224, -32256, -8960, + 31232, 13056, -29184, -16896, 27136, 19968, -24064, -23040, 22016, 26112, + -18944, -28160, 15616, 29184, -12544, -31232, 9472, 31232, -6784, -32256, + 3904, 32256, -1312, -32256, -1184, 32256, 3392, -32256, -5504, 32256, + 7552, -31232, -8960, 31232, 10496, -31232, -12032, 30208, 13056, -30208, + -14080, 29184, 14592, -29184, -15616, 29184, 15616, -28160, -16128, 28160, + 16128, -28160, -16128, 28160, 16128, -29184, -15616, 29184, 15104, -29184, + -14592, 29184, 13568, -30208, -12544, 30208, 11008, -31232, -9472, 31232, + 8064, -32256, -6272, 32256, 4224, -32256, -1888, 32256, -592, -32256, + 3264, 32256, -6016, -32256, 8960, 31232, -12032, -30208, 15104, 28160, + -17920, -26112, 20992, 24064, -24064, -20992, 27136, 16896, -29184, -13056, + 31232, 8960, -32256, -4224, 32256, -880, -32256, 6016, 31232, -11008, + -30208, 16128, 27136, -20992, -23040, 25088, 17920, -29184, -13056, 31232, + 6784, -32256, -104, 32256, -6784, -31232, 13568, 28160, -19968, -24064, + 25088, 17920, -29184, -11008, 32256, 3520, -32256, 4736, 31232, -12544, + -28160, 19968, 23040, -26112, -16128, 30208, 7552, -32256, 1504, 32256, + -10496, -29184, 18944, 23040, -26112, -15616, 31232, 6016, -32256, 4480, + 31232, -14592, -27136, 23040, 18944, -29184, -9472, 32256, -1888, -32256, + 13056, 27136, -23040, -18944, 29184, 8448, -32256, 3520, 31232, -15104, + -25088, 25088, 16128, -31232, -3776, 32256, -8960, -29184, 20992, 20992, + -29184, -8448, 32256, -5248, -30208, 17920, 23040, -28160, -10496, 32256, + -3776, -31232, 17920, 23040, -28160, -10496, 32256, -4736, -30208, 18944, + 20992, -29184, -7552, 32256, -8448, -29184, 22016, 17920, -31232, -2112, + 32256, -14080, -25088, 27136, 11008, -32256, 6016, 29184, -22016, -17920, + 31232, 1312, -32256, 16128, 23040, -29184, -7296, 32256, -11008, -26112, + 26112, 11520, -32256, 7040, 28160, -24064, -14592, 32256, -4480, -29184, + 22016, 16896, -32256, 3008, 30208, -22016, -16896, 32256, -3008, -30208, + 22016, 16128, -32256, 4480, 29184, -23040, -14080, 32256, -7040, -28160, + 25088, 11008, -32256, 11008, 25088, -28160, -6016, 32256, -16128, -20992, + 31232, -232, -30208, 22016, 15104, -32256, 7808, 27136, -27136, -7296, + 32256, -16896, -19968, 31232, -2752, -29184, 25088, 11008, -32256, 13568, + 22016, -31232, 1248, 30208, -24064, -11008, 32256, -14592, -20992, 31232, + -3264, -28160, 26112, 7808, -32256, 17920, 17920, -32256, 8960, 25088, + -29184, -656, 30208, -24064, -9472, 32256, -17920, -17920, 32256, -9984, + -24064, 30208, -2368, -28160, 27136, 4736, -31232, 23040, 11520, -32256, + 17920, 16896, -32256, 12544, 22016, -32256, 7296, 25088, -30208, 2496, + 28160, -28160, -1824, 30208, -26112, -5504, 31232, -24064, -8448, 32256, + -22016, -11008, 32256, -19968, -13056, 32256, -18944, -14592, 32256, -17920, + -15616, 32256, -16896, -15616, 32256, -16896, -15616, 32256, -16896, -15104, + 32256, -17920, -14080, 32256, -18944, -12544, 32256, -20992, -10496, 32256, + -23040, -7552, 31232, -25088, -4224, 30208, -27136, -376, 28160, -29184, + 4224, 25088, -31232, 8960, 20992, -32256, 14592, 16896, -32256, 19968, + 11008, -31232, 25088, 4032, -29184, 29184, -3520, -25088, 31232, -11520, + -18944, 32256, -18944, -11008, 31232, -26112, -1568, 27136, -30208, 8448, + 20992, -32256, 17920, 11520, -31232, 26112, 280, -26112, 31232, -11520, + -17920, 32256, -22016, -5760, 29184, -30208, 7296, 20992, -32256, 19968, + 8064, -30208, 29184, -6528, -20992, 32256, -19968, -7296, 29184, -30208, + 8448, 18944, -32256, 23040, 3264, -27136, 31232, -13568, -13568, 31232, + -27136, 4032, 22016, -32256, 20992, 4992, -28160, 31232, -14080, -12544, + 31232, -28160, 7296, 18944, -32256, 25088, -1184, -23040, 32256, -20992, + -3904, 26112, -32256, 17920, 7808, -28160, 31232, -15104, -10496, 29184, + -30208, 13056, 12032, -30208, 30208, -12032, -13056, 30208, -30208, 12544, + 12544, -30208, 30208, -13568, -11008, 29184, -31232, 15616, 8448, -28160, + 32256, -18944, -4992, 26112, -32256, 22016, 200, -22016, 32256, -26112, + 5760, 16896, -31232, 29184, -12544, -11008, 28160, -32256, 19968, 2496, + -23040, 32256, -26112, 7040, 15616, -30208, 31232, -16896, -4992, 25088, + -32256, 26112, -7040, -15104, 30208, -31232, 18944, 1888, -22016, 32256, + -28160, 12544, 8960, -26112, 32256, -25088, 7040, 14080, -29184, 32256, + -22016, 3264, 16896, -30208, 31232, -19968, 1184, 17920, -31232, 31232, + -19968, 976, 17920, -30208, 31232, -20992, 2496, 16896, -30208, 32256, + -23040, 6016, 13568, -28160, 32256, -26112, 11008, 8064, -24064, 32256, + -30208, 17920, 560, -17920, 30208, -32256, 24064, -8960, -9472, 25088, + -32256, 30208, -18944, 1952, 15616, -28160, 32256, -28160, 15104, 2240, + -18944, 30208, -32256, 26112, -13056, -3648, 18944, -30208, 32256, -27136, + 14080, 2240, -17920, 29184, -32256, 28160, -16896, 1760, 14080, -26112, + 32256, -31232, 22016, -8448, -7040, 20992, -30208, 32256, -28160, 16896, + -3008, -12032, 24064, -31232, 32256, -26112, 15104, -1184, -13056, 25088, + -31232, 32256, -27136, 16896, -3264, -10496, 23040, -30208, 32256, -29184, + 20992, -8960, -4480, 16896, -27136, 32256, -32256, 27136, -17920, 6016, +}; diff --git a/test/cmocka/src/math/arithmetic/a_law_mu_law_test_vectors.m b/test/cmocka/src/math/arithmetic/a_law_mu_law_test_vectors.m new file mode 100644 index 000000000000..b9f5b6b6a8e5 --- /dev/null +++ b/test/cmocka/src/math/arithmetic/a_law_mu_law_test_vectors.m @@ -0,0 +1,229 @@ +% a_law_mu_law_test_vectors() - Create A-law and mu-law test vectors +% +% Running this script creates header files ref_chirp_mono_8k_s16.h, +% a_law_codec.h, and mu_law_codec.h. The chirp waveform for test +% input is created with sox, and then ended and decoded as +% A-law and mu-law. + +% SPDX-License-Identifier: BSD-3-Clause +% +% Copyright(c) 2025 Intel Corporation. + +function a_law_mu_law_test_vectors() + + sox = 0; + alaw = 1; + mulaw = 1; + bits = 16; + ts = 0.5; + fs = 8e3; + t = (0:round(ts*fs - 1))/fs; + x = round(2^(bits - 1) * chirp(t, 100, ts, 3.5e3, 'logarithmic')); + xmax = 2^(bits - 1) - 1; + xmin = -2^(bits - 1); + x = max(min(x, xmax), xmin); + ref_s16_data = int16(x); + + ref_s16_header_fn = 'ref_chirp_mono_8k_s16.h'; + ref_alaw_header_fn = 'a_law_codec.h'; + ref_mulaw_header_fn = 'mu_law_codec.h'; + + close all; + path(path(), '../../../m'); + + if sox + ref_s16 = '/tmp/chirp_mono_8k_s16.raw'; + ref_alaw_enc = '/tmp/ref_alaw_enc.raw'; + ref_alaw_dec = '/tmp/ref_alaw_dec.raw'; + ref_mulaw_enc = '/tmp/ref_mulaw_enc.raw'; + ref_mulaw_dec = '/tmp/ref_mulaw_dec.raw'; + sox_s16_chirp_gen = sprintf('sox -c 1 -r 8000 -b 16 --encoding signed-integer -n %s synth 0.5 sine 100-3500', ref_s16); + sox_alaw_enc = sprintf('sox -c 1 -r 8000 -b 16 --encoding signed-integer %s --encoding a-law %s', ref_s16, ref_alaw_enc); + sox_alaw_dec = sprintf('sox -c 1 -r 8000 --encoding a-law %s -b 16 --encoding signed-integer %s', ref_alaw_enc, ref_alaw_dec); + sox_mulaw_enc = sprintf('sox -c 1 -r 8000 -b 16 --encoding signed-integer %s --encoding a-law %s', ref_s16, ref_mulaw_enc); + sox_mulaw_dec = sprintf('sox -c 1 -r 8000 --encoding a-law %s -b 16 --encoding signed-integer %s', ref_mulaw_enc, ref_mulaw_dec); + system(sox_s16_chirp_gen); + system(sox_alaw_enc); + system(sox_alaw_dec); + system(sox_mulaw_enc); + system(sox_mulaw_dec); + ref_s16_data = readbin(ref_s16, 'int16'); figure; + ref_alaw_enc_data = readbin(ref_alaw_enc, 'uint8'); + ref_alaw_dec_data = readbin(ref_alaw_dec, 'int16'); + ref_mulaw_enc_data = readbin(ref_mulaw_enc, 'uint8'); + ref_mulaw_dec_data = readbin(ref_mulaw_dec, 'int16'); + else + if alaw + ref_alaw_enc_data = alaw_enc(ref_s16_data); + ref_alaw_dec_data = alaw_dec(ref_alaw_enc_data); + end + if mulaw + ref_mulaw_enc_data = mulaw_enc(ref_s16_data); + ref_mulaw_dec_data = mulaw_dec(ref_mulaw_enc_data); + end + end + + if alaw + plot(ref_s16_data); grid on; title('Input s16'); + figure; plot(ref_alaw_enc_data); grid on; title('A-law data'); + figure; plot(ref_alaw_dec_data); grid on; title('A-law decode s16'); + end + + if mulaw + figure; plot(ref_mulaw_enc_data); grid on; title('mu-law data'); + figure; plot(ref_mulaw_dec_data); grid on; title('mu-law decode s16'); + end + + fh = export_headerfile_open(ref_s16_header_fn); + comment = sprintf('Created %s with script a_law_mu_law_test_vectors.m %s', ... + datestr(now, 0), export_get_git_describe()); + export_comment(fh, comment); + fprintf(fh, '#include \n'); + export_ndefine(fh, 'REF_DATA_SAMPLE_COUNT', length(ref_s16_data)); + export_vector(fh, 16, 'chirp_mono_8k_s16', ref_s16_data); + fclose(fh); + + if alaw + fh = export_headerfile_open(ref_alaw_header_fn); + comment = sprintf('Created %s with script a_law_mu_law_test_vectors.m %s', ... + datestr(now, 0), export_get_git_describe()); + export_comment(fh, comment); + fprintf(fh, '#include \n'); + export_vector(fh, 8, 'ref_alaw_enc_data', ref_alaw_enc_data); + export_vector(fh, 16, 'ref_alaw_dec_data', ref_alaw_dec_data); + fclose(fh); + end + + if mulaw + fh = export_headerfile_open(ref_mulaw_header_fn); + comment = sprintf('Created %s with script a_law_mu_law_test_vectors.m %s', ... + datestr(now, 0), export_get_git_describe()); + export_comment(fh, comment); + fprintf(fh, '#include \n'); + export_vector(fh, 8, 'ref_mulaw_enc_data', ref_mulaw_enc_data); + export_vector(fh, 16, 'ref_mulaw_dec_data', ref_mulaw_dec_data); + fclose(fh); + end + +end + +function x = readbin(fn, itype) + fh = fopen(fn, 'r'); + if fh == -1 + fprintf(1, 'Could not open file %s.\n', fn); + error("Failed."); + end + x = fread(fh, inf, itype); + fclose(fh); +end + +% See G.711 alaw compress from +% https://www.itu.int/rec/T-REC-G.191/ +function encoded = alaw_enc(input_samples) + num_samples = length(input_samples); + in16 = int16(input_samples); + encoded_samples = uint8(zeros(num_samples, 1)); + for n = 1:num_samples + if in16(n) < 0 + ix = bitshift(-in16(n) -1, -4); % 1's complement + else + ix = bitshift(in16(n), -4); + end + + if ix > 15 + iexp = 1; + while (ix > 16 + 15) + ix = bitshift(ix, -1); + iexp = iexp + 1; + end + + ix = ix - 16; + ix = ix + bitshift(iexp, 4); + end + + if in16(n) >= 0 + ix = bitor(ix, 128); + end + + encoded(n) = bitxor(ix, 85); + end +end + +% See G.711 alaw expand from +% https://www.itu.int/rec/T-REC-G.191/ +function samples_s16 = alaw_dec(input_bytes) + num_samples = length(input_bytes); + samples_s16 = int16(zeros(num_samples, 1)); + for n = 1:num_samples + ix = bitxor(int16(input_bytes(n)), 85); + ix = bitand(ix, 127); + iexp = bitshift(ix, -4); + mant = bitand(ix, 15); + if iexp > 0 + mant = mant + 16; + end + + mant = bitshift(mant, 4) + 8; + if iexp > 1 + mant = bitshift(mant, iexp - 1); + end + + if input_bytes(n) > 127 + samples_s16(n) = mant; + else + samples_s16(n) = -mant; + end + end +end + +% See G.711 ulaw compress from +% https://www.itu.int/rec/T-REC-G.191/ +function encoded = mulaw_enc(input_samples) + num_samples = length(input_samples); + in16 = int16(input_samples); + encoded_samples = uint8(zeros(num_samples, 1)); + for n = 1:num_samples + if in16(n) < 0 + absno = bitshift(-in16(n) -1, -2) + 33; % 1's complement + else + absno = bitshift(in16(n), -2) + 33; + end + + absno = min(absno, 8191); + i = bitshift(absno, -6); + segno = 1; + while i > 0 + segno = segno + 1; + i = bitshift(i, -1); + end + + high_nibble = 8 - segno; + low_nibble = bitand(bitshift(absno, -segno), 15); + low_nibble = 15 - low_nibble; + encoded(n) = bitor(bitshift(high_nibble, 4), low_nibble); + if in16(n) >= 0 + encoded(n) = bitor(encoded(n), 128); + end + end +end + +% See G.711 alaw expand from +% https://www.itu.int/rec/T-REC-G.191/ +function samples_s16 = mulaw_dec(input_bytes) + num_samples = length(input_bytes); + samples_s16 = int16(zeros(num_samples, 1)); + for n = 1:num_samples + if input_bytes(n) < 128 + sign = -1; + else + sign = 1; + end + + mantissa = -int16(input_bytes(n)) - 1; % 1's complement + exponent = bitand(bitshift(mantissa, -4), 7); + segment = exponent + 1; + mantissa = bitand(mantissa, 15); + step = bitshift(4, segment); + samples_s16(n) = sign * (bitshift(128, exponent) + step * mantissa + step / 2 - 4 * 33); + end +end diff --git a/test/cmocka/src/math/arithmetic/mu_law_codec.c b/test/cmocka/src/math/arithmetic/mu_law_codec.c new file mode 100644 index 000000000000..cee690e9e947 --- /dev/null +++ b/test/cmocka/src/math/arithmetic/mu_law_codec.c @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright(c) 2025 Intel Corporation. + +#include +#include +#include +#include +#include +#include + +#include "ref_chirp_mono_8k_s16.h" +#include "mu_law_codec.h" + +static void test_mu_law_encode(void **state) +{ + (void)state; + + uint8_t mu_law_sample, mu_law_ref; + int i; + + for (i = 0; i < REF_DATA_SAMPLE_COUNT; i++) { + mu_law_sample = sofm_mu_law_encode(chirp_mono_8k_s16[i]); + mu_law_ref = ref_mulaw_enc_data[i]; + + if (mu_law_sample != mu_law_ref) { + printf("%s: difference found at %d, encoded %d, ref %d, lin %d\n", + __func__, i, mu_law_sample, mu_law_ref, chirp_mono_8k_s16[i]); + assert_true(false); + } + } +} + +static void test_mu_law_decode(void **state) +{ + (void)state; + + int16_t s16_sample, s16_ref; + int i; + + for (i = 0; i < REF_DATA_SAMPLE_COUNT; i++) { + s16_sample = sofm_mu_law_decode(ref_mulaw_enc_data[i]); + s16_ref = ref_mulaw_dec_data[i]; + if (s16_sample != s16_ref) { + printf("%s: difference found at %d, byte %d, decoded %d, ref %d\n", + __func__, i, ref_mulaw_enc_data[i], s16_sample, s16_ref); + assert_true(false); + } + } +} + +int main(void) +{ + const struct CMUnitTest tests[] = { + cmocka_unit_test(test_mu_law_encode), + cmocka_unit_test(test_mu_law_decode), + }; + + cmocka_set_message_output(CM_OUTPUT_TAP); + + return cmocka_run_group_tests(tests, NULL, NULL); +} diff --git a/test/cmocka/src/math/arithmetic/mu_law_codec.h b/test/cmocka/src/math/arithmetic/mu_law_codec.h new file mode 100644 index 000000000000..802b2c4fd235 --- /dev/null +++ b/test/cmocka/src/math/arithmetic/mu_law_codec.h @@ -0,0 +1,814 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2025 Intel Corporation. + */ + +/* Created 13-May-2025 18:29:28 with script a_law_mu_law_test_vectors.m */ + +#include + +static const uint8_t ref_mulaw_enc_data[4000] = { + 130, 131, 132, 134, 135, 137, 139, 141, 143, 147, + 151, 156, 162, 172, 189, 94, 55, 41, 31, 26, + 22, 17, 14, 12, 10, 8, 6, 5, 4, 2, + 1, 1, 0, 0, 0, 0, 0, 0, 1, 2, + 3, 4, 5, 7, 9, 11, 13, 15, 19, 23, + 28, 35, 46, 67, 206, 178, 166, 158, 153, 148, + 143, 141, 139, 137, 135, 134, 132, 131, 130, 129, + 128, 128, 128, 128, 128, 128, 129, 130, 131, 132, + 133, 135, 137, 139, 141, 143, 148, 153, 158, 168, + 182, 223, 60, 43, 32, 27, 21, 17, 14, 11, + 9, 7, 6, 4, 3, 2, 1, 0, 0, 0, + 0, 0, 0, 1, 2, 3, 4, 6, 8, 10, + 12, 14, 18, 23, 28, 36, 47, 74, 196, 173, + 162, 155, 150, 145, 142, 140, 137, 135, 134, 132, + 131, 130, 129, 128, 128, 128, 128, 128, 128, 129, + 130, 132, 133, 135, 137, 139, 141, 144, 149, 155, + 161, 173, 194, 75, 47, 35, 28, 22, 17, 14, + 11, 9, 7, 5, 4, 2, 1, 0, 0, 0, + 0, 0, 0, 1, 2, 3, 5, 6, 8, 10, + 13, 15, 20, 26, 31, 43, 62, 207, 175, 164, + 156, 150, 145, 142, 139, 137, 135, 133, 131, 130, + 129, 128, 128, 128, 128, 128, 128, 129, 130, 132, + 134, 135, 138, 140, 142, 147, 152, 158, 169, 187, + 86, 49, 36, 28, 22, 16, 13, 11, 9, 6, + 5, 3, 2, 1, 0, 0, 0, 0, 0, 1, + 2, 3, 5, 7, 9, 11, 14, 17, 23, 29, + 39, 55, 234, 179, 165, 156, 150, 144, 141, 139, + 136, 134, 132, 131, 130, 129, 128, 128, 128, 128, + 128, 129, 130, 132, 134, 136, 138, 141, 143, 149, + 155, 163, 176, 216, 57, 39, 29, 23, 17, 13, + 11, 8, 6, 4, 3, 1, 0, 0, 0, 0, + 0, 0, 1, 3, 4, 6, 9, 11, 14, 18, + 24, 30, 42, 63, 200, 172, 159, 153, 147, 142, + 139, 137, 135, 133, 131, 130, 128, 128, 128, 128, + 128, 128, 130, 131, 133, 135, 137, 140, 142, 147, + 154, 161, 174, 213, 57, 38, 28, 22, 16, 13, + 10, 8, 5, 3, 2, 1, 0, 0, 0, 0, + 0, 1, 3, 5, 7, 9, 12, 14, 20, 26, + 34, 49, 107, 180, 164, 155, 148, 143, 140, 137, + 135, 133, 131, 129, 128, 128, 128, 128, 128, 129, + 130, 132, 134, 136, 139, 142, 146, 153, 160, 174, + 214, 55, 37, 27, 20, 15, 12, 9, 7, 4, + 3, 1, 0, 0, 0, 0, 0, 1, 3, 5, + 7, 9, 12, 15, 21, 28, 39, 60, 199, 171, + 158, 151, 144, 141, 138, 135, 133, 131, 129, 128, + 128, 128, 128, 128, 129, 131, 133, 135, 137, 140, + 143, 150, 157, 170, 196, 61, 39, 28, 21, 15, + 12, 9, 6, 4, 2, 1, 0, 0, 0, 0, + 1, 2, 4, 6, 8, 11, 15, 20, 28, 39, + 61, 195, 169, 157, 149, 143, 140, 137, 134, 132, + 130, 129, 128, 128, 128, 128, 129, 130, 132, 135, + 137, 140, 144, 151, 158, 173, 216, 51, 34, 25, + 18, 13, 10, 7, 5, 3, 1, 0, 0, 0, + 0, 1, 2, 4, 6, 9, 12, 15, 22, 30, + 44, 88, 179, 161, 153, 145, 141, 138, 135, 132, + 130, 129, 128, 128, 128, 128, 129, 131, 133, 135, + 138, 141, 146, 154, 164, 186, 68, 40, 28, 20, + 14, 11, 8, 5, 3, 1, 0, 0, 0, 0, + 1, 2, 4, 7, 10, 13, 18, 26, 37, 60, + 191, 166, 155, 147, 142, 138, 135, 133, 130, 129, + 128, 128, 128, 128, 129, 131, 133, 136, 139, 143, + 150, 158, 174, 121, 45, 30, 22, 15, 11, 8, + 5, 3, 1, 0, 0, 0, 0, 1, 3, 5, + 8, 11, 15, 22, 30, 46, 233, 172, 157, 149, + 142, 139, 136, 133, 131, 129, 128, 128, 128, 128, + 130, 132, 134, 137, 141, 145, 154, 165, 190, 59, + 35, 25, 16, 12, 9, 6, 3, 1, 0, 0, + 0, 0, 1, 3, 6, 9, 12, 16, 25, 35, + 60, 189, 164, 153, 144, 140, 137, 134, 131, 129, + 128, 128, 128, 128, 130, 132, 134, 137, 141, 147, + 155, 170, 213, 47, 30, 21, 14, 10, 7, 4, + 2, 1, 0, 0, 0, 1, 3, 5, 8, 12, + 16, 25, 37, 65, 183, 160, 151, 143, 139, 135, + 133, 130, 129, 128, 128, 128, 129, 131, 133, 137, + 140, 145, 154, 168, 205, 48, 30, 21, 14, 10, + 7, 4, 2, 0, 0, 0, 0, 2, 4, 7, + 10, 14, 22, 31, 52, 195, 165, 153, 144, 139, + 136, 133, 130, 129, 128, 128, 128, 129, 131, 134, + 138, 142, 148, 158, 176, 74, 38, 25, 16, 11, + 8, 5, 2, 0, 0, 0, 0, 2, 4, 7, + 10, 14, 22, 33, 58, 186, 160, 150, 142, 138, + 135, 132, 129, 128, 128, 128, 129, 131, 133, 136, + 140, 146, 156, 172, 90, 40, 26, 16, 11, 8, + 4, 2, 0, 0, 0, 0, 2, 5, 8, 12, + 17, 27, 43, 236, 169, 154, 144, 139, 136, 132, + 130, 128, 128, 128, 129, 130, 133, 137, 141, 147, + 157, 176, 69, 35, 23, 14, 10, 6, 3, 1, + 0, 0, 0, 1, 4, 7, 10, 15, 24, 38, + 79, 173, 155, 145, 140, 136, 132, 130, 128, 128, + 128, 129, 131, 134, 138, 142, 150, 162, 194, 48, + 29, 18, 12, 8, 5, 2, 0, 0, 0, 1, + 3, 6, 10, 14, 23, 37, 78, 172, 155, 144, + 139, 135, 132, 129, 128, 128, 128, 129, 132, 135, + 139, 145, 155, 174, 70, 34, 22, 14, 9, 5, + 2, 0, 0, 0, 1, 3, 6, 10, 14, 24, + 38, 99, 169, 153, 143, 138, 134, 131, 129, 128, + 128, 128, 130, 133, 137, 142, 151, 165, 216, 42, + 25, 15, 10, 6, 3, 1, 0, 0, 1, 3, + 6, 10, 15, 25, 42, 215, 164, 150, 142, 137, + 133, 130, 128, 128, 128, 129, 132, 135, 140, 146, + 158, 185, 51, 28, 17, 11, 7, 3, 1, 0, + 0, 0, 3, 6, 10, 15, 26, 45, 196, 160, + 148, 140, 136, 132, 129, 128, 128, 128, 130, 133, + 138, 143, 153, 170, 75, 33, 21, 13, 8, 4, + 1, 0, 0, 0, 2, 6, 10, 15, 26, 46, + 189, 158, 146, 140, 135, 131, 129, 128, 128, 129, + 131, 135, 140, 147, 159, 191, 45, 26, 15, 10, + 5, 2, 0, 0, 0, 2, 5, 9, 15, 25, + 45, 191, 158, 146, 139, 135, 131, 129, 128, 128, + 129, 132, 136, 141, 151, 167, 87, 34, 20, 12, + 7, 3, 1, 0, 0, 1, 4, 8, 13, 22, + 39, 215, 162, 148, 140, 135, 131, 129, 128, 128, + 129, 132, 137, 142, 152, 172, 63, 30, 17, 11, + 6, 2, 0, 0, 0, 2, 6, 10, 16, 29, + 61, 172, 152, 142, 136, 132, 129, 128, 128, 129, + 132, 136, 141, 151, 170, 65, 30, 17, 10, 6, + 2, 0, 0, 0, 3, 7, 12, 20, 35, 244, + 162, 148, 140, 134, 131, 128, 128, 128, 130, 134, + 139, 147, 161, 224, 36, 20, 12, 7, 3, 0, + 0, 0, 3, 6, 12, 20, 36, 222, 160, 146, + 139, 134, 130, 128, 128, 129, 131, 135, 141, 151, + 172, 59, 28, 15, 9, 4, 1, 0, 0, 1, + 5, 10, 16, 29, 68, 168, 149, 140, 135, 131, + 128, 128, 128, 131, 135, 141, 152, 173, 55, 27, + 14, 8, 4, 1, 0, 0, 2, 6, 11, 20, + 37, 203, 158, 144, 137, 133, 129, 128, 128, 130, + 133, 139, 147, 163, 90, 31, 17, 10, 5, 1, + 0, 0, 2, 5, 11, 19, 36, 204, 158, 143, + 137, 132, 129, 128, 128, 130, 134, 140, 150, 171, + 56, 26, 14, 8, 3, 0, 0, 0, 3, 8, + 14, 27, 60, 168, 149, 139, 134, 130, 128, 128, + 129, 133, 139, 147, 166, 66, 28, 14, 8, 3, + 0, 0, 0, 3, 8, 15, 29, 74, 163, 146, + 138, 133, 129, 128, 128, 130, 135, 141, 153, 181, + 43, 21, 11, 6, 2, 0, 0, 2, 6, 12, + 23, 47, 174, 150, 140, 134, 130, 128, 128, 130, + 134, 140, 151, 176, 44, 22, 11, 6, 2, 0, + 0, 2, 7, 13, 26, 59, 167, 147, 138, 133, + 129, 128, 128, 131, 136, 143, 158, 244, 30, 15, + 8, 3, 0, 0, 1, 5, 11, 20, 42, 179, + 152, 140, 134, 130, 128, 128, 131, 135, 142, 156, + 210, 31, 15, 8, 3, 0, 0, 1, 5, 11, + 22, 47, 172, 149, 139, 133, 129, 128, 128, 132, + 137, 146, 166, 57, 24, 12, 6, 1, 0, 0, + 3, 8, 15, 33, 199, 155, 141, 134, 130, 128, + 128, 131, 136, 143, 159, 75, 27, 13, 6, 2, + 0, 0, 3, 8, 16, 34, 191, 153, 140, 134, + 129, 128, 128, 132, 137, 146, 168, 50, 22, 11, + 5, 1, 0, 1, 5, 11, 23, 54, 166, 145, + 137, 131, 128, 128, 130, 135, 142, 158, 90, 27, + 13, 6, 1, 0, 0, 4, 10, 20, 45, 170, + 147, 137, 131, 128, 128, 130, 135, 142, 158, 74, + 26, 12, 5, 1, 0, 1, 5, 11, 24, 63, + 160, 143, 135, 130, 128, 128, 132, 138, 148, 174, + 40, 17, 9, 3, 0, 0, 3, 8, 17, 41, + 174, 148, 137, 131, 128, 128, 130, 136, 144, 167, + 47, 20, 9, 3, 0, 0, 2, 8, 17, 40, + 173, 147, 137, 131, 128, 128, 131, 137, 147, 173, + 40, 16, 8, 2, 0, 0, 4, 10, 23, 61, + 159, 142, 134, 129, 128, 129, 133, 141, 156, 79, + 25, 11, 4, 0, 0, 2, 8, 16, 41, 171, + 146, 136, 130, 128, 128, 132, 139, 153, 213, 28, + 12, 5, 0, 0, 2, 8, 16, 41, 171, 145, + 136, 130, 128, 128, 133, 140, 156, 75, 24, 11, + 4, 0, 0, 3, 10, 22, 62, 158, 141, 133, + 129, 128, 130, 136, 145, 173, 38, 15, 7, 1, + 0, 1, 7, 15, 38, 172, 145, 136, 130, 128, + 129, 134, 142, 163, 47, 18, 8, 2, 0, 1, + 6, 14, 35, 175, 146, 136, 130, 128, 129, 134, + 143, 166, 43, 16, 7, 1, 0, 1, 7, 16, + 44, 165, 142, 134, 129, 128, 130, 137, 148, 187, + 29, 12, 4, 0, 0, 3, 11, 26, 211, 151, + 138, 131, 128, 128, 133, 142, 164, 44, 16, 7, + 1, 0, 2, 8, 20, 62, 156, 140, 132, 128, + 128, 132, 141, 159, 50, 18, 7, 1, 0, 2, + 8, 20, 63, 156, 139, 131, 128, 128, 133, 142, + 164, 42, 15, 6, 1, 0, 3, 10, 26, 200, + 149, 136, 130, 128, 130, 136, 148, 191, 27, 11, + 3, 0, 1, 6, 15, 45, 161, 141, 132, 128, + 128, 133, 142, 165, 40, 14, 5, 0, 0, 4, + 12, 32, 172, 143, 134, 128, 128, 132, 140, 159, + 46, 15, 6, 0, 0, 4, 12, 31, 173, 143, + 134, 128, 128, 132, 141, 163, 41, 14, 5, 0, + 0, 5, 14, 41, 162, 140, 132, 128, 128, 134, + 145, 182, 28, 10, 3, 0, 1, 8, 22, 253, + 150, 136, 129, 128, 131, 139, 157, 48, 15, 6, + 0, 0, 5, 14, 44, 159, 139, 131, 128, 129, + 136, 150, 91, 20, 7, 1, 0, 4, 13, 36, + 165, 141, 132, 128, 129, 135, 149, 237, 21, 8, + 1, 0, 4, 13, 38, 162, 140, 131, 128, 129, + 137, 152, 64, 17, 6, 0, 0, 5, 15, 55, + 154, 137, 130, 128, 131, 140, 162, 37, 12, 3, + 0, 1, 9, 26, 182, 143, 133, 128, 128, 135, + 148, 116, 20, 7, 0, 0, 5, 16, 60, 152, + 136, 129, 128, 132, 142, 175, 27, 9, 1, 0, + 4, 13, 43, 157, 138, 130, 128, 131, 141, 169, + 30, 10, 2, 0, 3, 13, 41, 157, 138, 130, + 128, 132, 141, 172, 28, 9, 1, 0, 4, 14, + 52, 153, 136, 129, 128, 133, 145, 202, 21, 7, + 0, 0, 7, 21, 198, 144, 133, 128, 129, 137, + 155, 44, 13, 3, 0, 2, 12, 38, 158, 138, + 129, 128, 133, 143, 194, 21, 7, 0, 0, 8, + 24, 179, 142, 132, 128, 130, 140, 167, 29, 9, + 1, 0, 5, 19, 220, 145, 133, 128, 129, 138, + 160, 33, 10, 2, 0, 5, 17, 107, 146, 133, + 128, 129, 138, 161, 31, 10, 1, 0, 6, 20, + 198, 143, 132, 128, 130, 140, 172, 26, 8, 0, + 0, 8, 27, 169, 140, 130, 128, 133, 145, 95, + 16, 4, 0, 2, 12, 46, 152, 135, 128, 129, + 137, 159, 32, 10, 1, 0, 7, 24, 173, 140, + 130, 128, 133, 147, 70, 14, 3, 0, 4, 15, + 78, 146, 133, 128, 131, 141, 184, 21, 5, 0, + 2, 12, 46, 151, 134, 128, 130, 139, 171, 24, + 7, 0, 1, 11, 42, 153, 135, 128, 129, 139, + 171, 24, 6, 0, 2, 12, 46, 151, 134, 128, + 130, 141, 182, 20, 5, 0, 3, 14, 75, 145, + 132, 128, 132, 145, 74, 14, 3, 0, 5, 22, + 174, 139, 129, 128, 135, 156, 32, 9, 0, 1, + 10, 40, 152, 134, 128, 130, 142, 203, 16, 3, + 0, 5, 21, 175, 139, 129, 128, 136, 159, 28, + 7, 0, 2, 13, 62, 145, 132, 128, 133, 150, + 44, 11, 1, 0, 10, 39, 152, 134, 128, 131, + 144, 66, 13, 2, 0, 8, 31, 155, 135, 128, + 131, 143, 85, 13, 2, 0, 8, 31, 155, 135, + 128, 131, 143, 67, 13, 1, 0, 9, 37, 152, + 133, 128, 132, 148, 45, 10, 0, 1, 12, 58, + 144, 131, 128, 135, 157, 29, 7, 0, 3, 17, + 181, 139, 129, 129, 139, 186, 16, 3, 0, 7, + 31, 153, 133, 128, 132, 150, 38, 9, 0, 2, + 15, 193, 140, 129, 129, 139, 188, 15, 2, 0, + 9, 40, 149, 132, 128, 134, 157, 27, 6, 0, + 5, 24, 160, 135, 128, 132, 148, 41, 9, 0, + 3, 17, 176, 138, 128, 130, 143, 58, 11, 0, + 2, 14, 195, 139, 129, 129, 142, 74, 12, 1, + 1, 14, 202, 140, 129, 129, 142, 67, 11, 0, + 2, 15, 186, 138, 128, 130, 144, 47, 9, 0, + 3, 19, 168, 136, 128, 132, 151, 31, 6, 0, + 5, 28, 154, 133, 128, 135, 164, 20, 3, 0, + 9, 51, 143, 130, 129, 140, 87, 11, 0, 2, + 17, 171, 136, 128, 132, 154, 27, 5, 0, 7, + 40, 146, 130, 128, 140, 124, 12, 0, 2, 18, + 166, 135, 128, 134, 159, 22, 3, 0, 10, 72, + 140, 128, 130, 146, 38, 7, 0, 6, 34, 148, + 130, 128, 140, 77, 10, 0, 3, 24, 156, 132, + 128, 137, 186, 13, 1, 2, 19, 162, 134, 128, + 136, 172, 15, 1, 2, 16, 167, 135, 128, 135, + 171, 15, 1, 2, 17, 165, 134, 128, 136, 175, + 14, 1, 2, 20, 158, 133, 128, 138, 203, 11, + 0, 4, 26, 151, 131, 128, 141, 52, 8, 0, + 7, 41, 143, 129, 130, 149, 29, 4, 0, 11, + 199, 137, 128, 134, 166, 15, 1, 2, 21, 156, + 132, 128, 140, 55, 8, 0, 7, 50, 141, 128, + 132, 156, 20, 2, 1, 17, 159, 133, 128, 140, + 57, 8, 0, 8, 59, 139, 128, 133, 163, 15, + 1, 3, 25, 151, 130, 129, 145, 30, 4, 0, + 13, 172, 134, 128, 138, 68, 8, 0, 8, 71, + 138, 128, 134, 175, 12, 0, 5, 38, 142, 128, + 132, 159, 16, 1, 3, 28, 146, 129, 131, 154, + 20, 1, 2, 24, 150, 130, 130, 151, 22, 2, + 2, 23, 150, 130, 130, 151, 22, 2, 2, 25, + 149, 129, 130, 154, 19, 1, 3, 29, 144, 129, + 132, 160, 14, 0, 5, 40, 141, 128, 134, 180, + 11, 0, 8, 90, 137, 128, 138, 58, 6, 0, + 13, 167, 132, 128, 144, 28, 2, 2, 24, 148, + 129, 132, 161, 14, 0, 6, 57, 138, 128, 138, + 57, 6, 0, 14, 159, 131, 129, 151, 20, 1, + 4, 39, 140, 128, 136, 88, 7, 0, 13, 161, + 131, 129, 152, 18, 0, 5, 46, 138, 128, 138, + 47, 5, 0, 19, 151, 129, 132, 167, 12, 0, + 9, 181, 133, 128, 147, 22, 1, 4, 43, 139, + 128, 139, 42, 4, 1, 24, 145, 128, 134, 207, + 7, 0, 15, 155, 130, 131, 168, 11, 0, 11, + 166, 131, 130, 156, 14, 0, 9, 181, 133, 129, + 151, 16, 0, 7, 201, 134, 128, 149, 18, 0, + 7, 213, 134, 128, 149, 18, 0, 7, 199, 133, + 129, 151, 15, 0, 8, 180, 132, 129, 156, 13, + 0, 10, 165, 131, 131, 167, 10, 0, 14, 154, + 129, 133, 204, 7, 0, 22, 143, 128, 137, 42, + 3, 3, 39, 138, 128, 143, 22, 0, 7, 190, + 132, 130, 159, 11, 0, 14, 153, 129, 134, 67, + 5, 2, 31, 139, 128, 143, 22, 0, 8, 176, + 131, 131, 171, 8, 0, 21, 143, 128, 139, 30, + 1, 6, 210, 133, 130, 163, 10, 0, 19, 144, + 128, 139, 29, 1, 6, 188, 132, 131, 174, 7, + 0, 26, 140, 128, 143, 19, 0, 10, 158, 129, + 134, 55, 3, 3, 59, 134, 129, 161, 9, 0, + 23, 141, 128, 143, 18, 0, 12, 154, 128, 137, + 36, 1, 6, 182, 131, 132, 221, 4, 2, 49, + 134, 129, 165, 8, 0, 29, 138, 128, 152, 12, + 0, 20, 142, 128, 145, 15, 0, 15, 146, 128, + 142, 20, 0, 13, 150, 128, 140, 23, 0, 11, + 152, 128, 139, 25, 0, 11, 153, 128, 139, 24, + 0, 12, 151, 128, 140, 21, 0, 13, 147, 128, + 142, 17, 0, 15, 143, 128, 147, 13, 0, 22, + 139, 128, 155, 10, 0, 32, 136, 129, 172, 6, + 2, 68, 132, 132, 63, 2, 6, 168, 129, 137, + 28, 0, 12, 148, 128, 144, 14, 0, 24, 138, + 128, 165, 6, 2, 73, 131, 133, 46, 1, 9, + 155, 128, 141, 16, 0, 22, 138, 128, 167, 6, + 3, 208, 130, 135, 31, 0, 12, 145, 128, 151, + 10, 1, 44, 133, 132, 50, 1, 9, 151, 128, + 146, 12, 0, 38, 133, 132, 54, 1, 10, 150, + 128, 148, 11, 1, 47, 132, 133, 38, 0, 13, + 143, 128, 157, 7, 3, 189, 129, 138, 21, 0, + 24, 136, 130, 109, 2, 9, 151, 128, 151, 9, + 2, 232, 130, 137, 21, 0, 25, 136, 131, 59, + 1, 11, 144, 128, 161, 5, 5, 164, 128, 143, + 11, 1, 64, 130, 137, 21, 0, 28, 134, 132, + 39, 0, 15, 139, 129, 223, 1, 10, 144, 128, + 167, 4, 7, 153, 128, 154, 6, 4, 163, 128, + 147, 9, 2, 178, 128, 143, 11, 1, 203, 129, + 141, 12, 1, 93, 129, 140, 13, 1, 76, 129, + 140, 13, 1, 79, 129, 140, 13, 1, 235, 129, + 141, 12, 2, 189, 128, 143, 10, 3, 171, 128, + 149, 7, 4, 158, 128, 157, 5, 7, 149, 128, + 174, 2, 11, 141, 129, 66, 0, 17, 136, 132, + 30, 0, 31, 132, 137, 16, 0, 106, 128, 143, + 9, 4, 158, 128, 162, 3, 10, 141, 129, 52, + 0, 23, 134, 135, 19, 0, 89, 128, 145, 7, + 5, 152, 128, 186, 1, 15, 136, 133, 25, 0, + 57, 129, 143, 8, 5, 150, 128, 206, 0, 19, + 134, 135, 17, 1, 185, 128, 155, 4, 10, 140, + 131, 31, 0, 46, 129, 144, 7, 6, 145, 129, + 48, 0, 32, 130, 141, 9, 5, 148, 128, 57, + 0, 31, 130, 141, 8, 6, 146, 129, 44, 0, + 41, 129, 145, 6, 8, 141, 131, 28, 0, 224, + 128, 157, 2, 14, 135, 135, 14, 2, 156, 128, + 78, 0, 33, 129, 145, 5, 10, 139, 132, 20, + 1, 165, 128, 204, 0, 30, 130, 145, 5, 10, + 138, 134, 15, 2, 155, 128, 48, 0, 58, 128, + 158, 1, 19, 132, 140, 8, 8, 140, 133, 17, + 2, 154, 128, 41, 0, 216, 128, 174, 0, 30, + 129, 150, 3, 15, 133, 140, 8, 9, 138, 134, + 13, 4, 145, 131, 23, 1, 156, 128, 37, 0, + 176, 128, 73, 0, 75, 128, 179, 0, 41, 128, + 162, 0, 29, 129, 154, 1, 24, 130, 150, 2, + 20, 131, 146, 3, 17, 131, 144, 3, 16, 132, + 144, 4, 16, 131, 144, 3, 17, 131, 146, 3, + 19, 130, 149, 2, 23, 130, 153, 1, 28, 129, + 160, 0, 39, 128, 175, 0, 64, 128, 89, 0, + 181, 128, 39, 0, 158, 129, 24, 2, 146, 132, + 14, 6, 139, 136, 8, 11, 133, 143, 3, 21, + 129, 158, 0, 47, 128, 80, 0, 167, 129, 25, + 2, 143, 133, 11, 9, 135, 141, 3, 22, 129, + 165, 0, 114, 128, 37, 1, 149, 132, 12, 8, + 135, 142, 3, 25, 128, 179, 0, 173, 129, 23, + 4, 140, 137, 6, 16, 130, 161, 0, 198, 128, + 26, 3, 141, 137, 6, 17, 129, 168, 0, 174, + 129, 19, 5, 137, 141, 3, 29, 128, 64, 0, + 150, 133, 9, 13, 131, 159, 0, 179, 129, 17, + 6, 135, 144, 1, 49, 128, 29, 3, 139, 139, + 3, 31, 128, 43, 2, 142, 137, 4, 27, 128, + 49, 1, 142, 137, 4, 27, 128, 44, 2, 141, + 138, 3, 34, 128, 31, 3, 138, 142, 1, 62, + 128, 20, 7, 133, 154, 0, 168, 131, 10, 14, + 129, 201, 0, 144, 137, 3, 35, 128, 26, 5, + 134, 152, 0, 163, 131, 8, 19, 128, 46, 2, + 138, 143, 0, 183, 130, 10, 15, 128, 55, 2, + 138, 144, 0, 174, 131, 9, 19, 128, 35, 4, + 134, 154, 0, 154, 135, 4, 39, 128, 16, 11, + 129, 104, 1, 138, 145, 0, 160, 133, 5, 35, + 128, 15, 11, 129, 57, 3, 135, 154, 0, 148, + 138, 1, 202, 130, 8, 26, 128, 19, 11, 129, + 53, 3, 134, 161, 0, 142, 142, 0, 158, 135, + 3, 87, 130, 8, 28, 128, 14, 14, 128, 28, + 8, 130, 60, 4, 133, 172, 1, 137, 153, 0, + 142, 143, 0, 151, 138, 0, 163, 135, 2, 187, + 132, 4, 65, 130, 6, 41, 129, 8, 30, 128, + 10, 25, 128, 12, 22, 128, 13, 19, 128, 14, + 17, 128, 15, 16, 128, 15, 16, 128, 14, 18, + 128, 14, 20, 128, 12, 23, 128, 11, 27, 128, + 9, 33, 129, 7, 46, 130, 5, 96, 132, 2, + 175, 135, 1, 157, 139, 0, 147, 143, 0, 140, + 154, 0, 135, 175, 3, 131, 51, 7, 128, 25, + 13, 128, 13, 26, 129, 6, 68, 133, 2, 159, + 139, 0, 142, 153, 1, 134, 230, 6, 129, 25, + 14, 128, 10, 40, 131, 2, 162, 139, 0, 140, + 159, 2, 131, 38, 11, 128, 12, 35, 131, 2, + 158, 141, 0, 137, 181, 5, 129, 20, 20, 129, + 5, 175, 138, 0, 139, 171, 4, 129, 20, 22, + 129, 3, 163, 141, 0, 135, 75, 9, 128, 11, + 48, 134, 0, 142, 161, 4, 129, 18, 27, 130, + 1, 149, 151, 2, 130, 23, 22, 130, 2, 151, + 151, 2, 130, 21, 26, 131, 1, 145, 158, 4, + 128, 13, 43, 134, 0, 138, 235, 10, 128, 6, + 169, 142, 1, 131, 23, 26, 131, 0, 140, 187, + 9, 128, 6, 164, 145, 2, 129, 15, 43, 135, + 0, 134, 36, 18, 130, 1, 141, 192, 10, 128, + 3, 151, 158, 6, 128, 7, 163, 148, 3, 128, + 10, 181, 143, 2, 128, 11, 203, 141, 1, 129, + 12, 206, 141, 1, 128, 11, 187, 143, 2, 128, + 9, 168, 149, 4, 128, 6, 154, 160, 8, 128, + 2, 142, 218, 13, 130, 0, 136, 30, 29, 135, + 0, 130, 13, 191, 145, 4, 128, 4, 146, 189, + 13, 130, 0, 133, 21, 50, 140, 2, 128, 5, + 148, 189, 14, 131, 0, 132, 15, 193, 148, 6, + 128, 1, 138, 31, 35, 139, 2, 128, 4, 142, + 55, 24, 136, 1, 128, 6, 145, 75, 22, 135, + 1, 128, 5, 143, 53, 26, 137, 2, 128, 3, + 139, 30, 46, 143, 5, 128, 0, 133, 14, 168, +}; + +static const int16_t ref_mulaw_dec_data[4000] = { + 30076, 29052, 28028, 25980, 24956, 22908, 20860, 18812, 16764, 14460, + 12412, 9852, 7420, 4860, 2236, -428, -3004, -5628, -8316, -10876, + -12924, -15484, -17788, -19836, -21884, -23932, -25980, -27004, -28028, -30076, + -31100, -31100, -32124, -32124, -32124, -32124, -32124, -32124, -31100, -30076, + -29052, -28028, -27004, -24956, -22908, -20860, -18812, -16764, -14460, -12412, + -9852, -7164, -4348, -1692, 988, 3644, 6396, 8828, 11388, 13948, + 16764, 18812, 20860, 22908, 24956, 25980, 28028, 29052, 30076, 31100, + 32124, 32124, 32124, 32124, 32124, 32124, 31100, 30076, 29052, 28028, + 27004, 24956, 22908, 20860, 18812, 16764, 13948, 11388, 8828, 5884, + 3132, 396, -2364, -5116, -7932, -10364, -13436, -15484, -17788, -20860, + -22908, -24956, -25980, -28028, -29052, -30076, -31100, -32124, -32124, -32124, + -32124, -32124, -32124, -31100, -30076, -29052, -28028, -25980, -23932, -21884, + -19836, -17788, -14972, -12412, -9852, -6908, -4092, -1244, 1628, 4604, + 7420, 10364, 12924, 15484, 17788, 19836, 22908, 24956, 25980, 28028, + 29052, 30076, 31100, 32124, 32124, 32124, 32124, 32124, 32124, 31100, + 30076, 28028, 27004, 24956, 22908, 20860, 18812, 15996, 13436, 10364, + 7676, 4604, 1756, -1180, -4092, -7164, -9852, -12924, -15484, -17788, + -20860, -22908, -24956, -27004, -28028, -30076, -31100, -32124, -32124, -32124, + -32124, -32124, -32124, -31100, -30076, -29052, -27004, -25980, -23932, -21884, + -18812, -16764, -13948, -10876, -8316, -5116, -2108, 924, 4092, 6908, + 9852, 12924, 15484, 17788, 20860, 22908, 24956, 27004, 29052, 30076, + 31100, 32124, 32124, 32124, 32124, 32124, 32124, 31100, 30076, 28028, + 25980, 24956, 21884, 19836, 17788, 14460, 11900, 8828, 5628, 2492, + -684, -3772, -6908, -9852, -12924, -15996, -18812, -20860, -22908, -25980, + -27004, -29052, -30076, -31100, -32124, -32124, -32124, -32124, -32124, -31100, + -30076, -29052, -27004, -24956, -22908, -20860, -17788, -15484, -12412, -9340, + -6140, -3004, 212, 3516, 6652, 9852, 12924, 15996, 18812, 20860, + 23932, 25980, 28028, 29052, 30076, 31100, 32124, 32124, 32124, 32124, + 32124, 31100, 30076, 28028, 25980, 23932, 21884, 18812, 16764, 13436, + 10364, 7164, 3900, 620, -2748, -6140, -9340, -12412, -15484, -18812, + -20860, -23932, -25980, -28028, -29052, -31100, -32124, -32124, -32124, -32124, + -32124, -32124, -31100, -29052, -28028, -25980, -22908, -20860, -17788, -14972, + -11900, -8828, -5372, -1980, 1372, 4860, 8316, 11388, 14460, 17788, + 20860, 22908, 24956, 27004, 29052, 30076, 32124, 32124, 32124, 32124, + 32124, 32124, 30076, 29052, 27004, 24956, 22908, 19836, 17788, 14460, + 10876, 7676, 4348, 716, -2748, -6396, -9852, -12924, -15996, -18812, + -21884, -23932, -27004, -29052, -30076, -31100, -32124, -32124, -32124, -32124, + -32124, -31100, -29052, -27004, -24956, -22908, -19836, -17788, -13948, -10876, + -7420, -3772, -196, 3388, 6908, 10364, 13948, 16764, 19836, 22908, + 24956, 27004, 29052, 31100, 32124, 32124, 32124, 32124, 32124, 31100, + 30076, 28028, 25980, 23932, 20860, 17788, 14972, 11388, 7932, 4348, + 684, -3004, -6652, -10364, -13948, -16764, -19836, -22908, -24956, -28028, + -29052, -31100, -32124, -32124, -32124, -32124, -32124, -31100, -29052, -27004, + -24956, -22908, -19836, -16764, -13436, -9852, -6140, -2364, 1436, 5116, + 8828, 12412, 15996, 18812, 21884, 24956, 27004, 29052, 31100, 32124, + 32124, 32124, 32124, 32124, 31100, 29052, 27004, 24956, 22908, 19836, + 16764, 12924, 9340, 5372, 1628, -2236, -6140, -9852, -13436, -16764, + -19836, -22908, -25980, -28028, -30076, -31100, -32124, -32124, -32124, -32124, + -31100, -30076, -28028, -25980, -23932, -20860, -16764, -13948, -9852, -6140, + -2236, 1692, 5628, 9340, 13436, 16764, 19836, 22908, 25980, 28028, + 30076, 31100, 32124, 32124, 32124, 32124, 31100, 30076, 28028, 24956, + 22908, 19836, 15996, 12412, 8828, 4604, 620, -3516, -7420, -11388, + -14972, -18812, -21884, -24956, -27004, -29052, -31100, -32124, -32124, -32124, + -32124, -31100, -30076, -28028, -25980, -22908, -19836, -16764, -12924, -8828, + -4860, -620, 3516, 7676, 11388, 15484, 18812, 21884, 24956, 28028, + 30076, 31100, 32124, 32124, 32124, 32124, 31100, 29052, 27004, 24956, + 21884, 18812, 14972, 10876, 6908, 2620, -1628, -5884, -9852, -13948, + -17788, -20860, -23932, -27004, -29052, -31100, -32124, -32124, -32124, -32124, + -31100, -30076, -28028, -24956, -21884, -18812, -14972, -10876, -6652, -2364, + 1980, 6396, 10364, 14460, 17788, 21884, 24956, 27004, 30076, 31100, + 32124, 32124, 32124, 32124, 31100, 29052, 27004, 23932, 20860, 16764, + 12924, 8828, 4348, -48, -4604, -8828, -12924, -16764, -20860, -23932, + -27004, -29052, -31100, -32124, -32124, -32124, -32124, -31100, -29052, -27004, + -23932, -20860, -16764, -12924, -8828, -4348, 228, 4860, 9340, 13436, + 17788, 20860, 23932, 27004, 29052, 31100, 32124, 32124, 32124, 32124, + 30076, 28028, 25980, 22908, 18812, 15484, 10876, 6652, 2108, -2492, + -7164, -11388, -15996, -19836, -22908, -25980, -29052, -31100, -32124, -32124, + -32124, -32124, -31100, -29052, -25980, -22908, -19836, -15996, -11388, -7164, + -2364, 2236, 6908, 11388, 15996, 19836, 22908, 25980, 29052, 31100, + 32124, 32124, 32124, 32124, 30076, 28028, 25980, 22908, 18812, 14460, + 10364, 5372, 716, -4092, -8828, -13436, -17788, -21884, -24956, -28028, + -30076, -31100, -32124, -32124, -32124, -31100, -29052, -27004, -23932, -19836, + -15996, -11388, -6652, -1820, 3004, 7932, 12412, 16764, 20860, 24956, + 27004, 30076, 31100, 32124, 32124, 32124, 31100, 29052, 27004, 22908, + 19836, 15484, 10876, 5884, 1052, -3900, -8828, -13436, -17788, -21884, + -24956, -28028, -30076, -32124, -32124, -32124, -32124, -30076, -28028, -24956, + -21884, -17788, -12924, -8316, -3388, 1692, 6652, 11388, 15996, 20860, + 23932, 27004, 30076, 31100, 32124, 32124, 32124, 31100, 29052, 25980, + 21884, 17788, 13948, 8828, 3900, -1244, -6396, -11388, -15996, -20860, + -23932, -27004, -30076, -32124, -32124, -32124, -32124, -30076, -28028, -24956, + -21884, -17788, -12924, -7676, -2620, 2620, 7932, 12924, 17788, 21884, + 24956, 28028, 31100, 32124, 32124, 32124, 31100, 29052, 27004, 23932, + 19836, 14972, 9852, 4860, -556, -5884, -10876, -15996, -20860, -23932, + -28028, -30076, -32124, -32124, -32124, -32124, -30076, -27004, -23932, -19836, + -15484, -10364, -5116, 180, 5628, 10876, 15996, 20860, 23932, 28028, + 30076, 32124, 32124, 32124, 31100, 30076, 27004, 22908, 18812, 14460, + 9340, 3900, -1564, -7164, -12412, -17788, -21884, -25980, -29052, -31100, + -32124, -32124, -32124, -31100, -28028, -24956, -21884, -16764, -11900, -6396, + -924, 4604, 10364, 15484, 19836, 23932, 28028, 30076, 32124, 32124, + 32124, 31100, 29052, 25980, 21884, 17788, 12924, 7420, 1756, -3900, + -9340, -14972, -19836, -23932, -27004, -30076, -32124, -32124, -32124, -31100, + -29052, -25980, -21884, -17788, -12412, -6652, -988, 4860, 10364, 15996, + 20860, 24956, 28028, 31100, 32124, 32124, 32124, 31100, 28028, 24956, + 20860, 15484, 10364, 4348, -1500, -7420, -12924, -17788, -22908, -27004, + -30076, -32124, -32124, -32124, -31100, -29052, -25980, -21884, -17788, -11900, + -6396, -324, 5628, 11388, 16764, 21884, 25980, 29052, 31100, 32124, + 32124, 32124, 30076, 27004, 22908, 17788, 12412, 6652, 620, -5372, + -11388, -16764, -21884, -25980, -29052, -31100, -32124, -32124, -31100, -29052, + -25980, -21884, -16764, -11388, -5372, 652, 6908, 12924, 17788, 22908, + 27004, 30076, 32124, 32124, 32124, 31100, 28028, 24956, 19836, 14972, + 8828, 2748, -3516, -9852, -15484, -20860, -24956, -29052, -31100, -32124, + -32124, -32124, -29052, -25980, -21884, -16764, -10876, -4604, 1628, 7932, + 13948, 19836, 23932, 28028, 31100, 32124, 32124, 32124, 30076, 27004, + 21884, 16764, 11388, 5372, -1180, -7676, -13436, -18812, -23932, -28028, + -31100, -32124, -32124, -32124, -30076, -25980, -21884, -16764, -10876, -4348, + 2236, 8828, 14972, 19836, 24956, 29052, 31100, 32124, 32124, 31100, + 29052, 24956, 19836, 14460, 8316, 1980, -4604, -10876, -16764, -21884, + -27004, -30076, -32124, -32124, -32124, -30076, -27004, -22908, -16764, -11388, + -4604, 1980, 8828, 14972, 20860, 24956, 29052, 31100, 32124, 32124, + 31100, 28028, 23932, 18812, 12412, 6140, -652, -7420, -13948, -19836, + -24956, -29052, -31100, -32124, -32124, -31100, -28028, -23932, -18812, -12924, + -6140, 652, 7420, 13948, 19836, 24956, 29052, 31100, 32124, 32124, + 31100, 28028, 22908, 17788, 11900, 4860, -1980, -8828, -15484, -20860, + -25980, -30076, -32124, -32124, -32124, -30076, -25980, -21884, -15996, -9340, + -2236, 4860, 11900, 17788, 23932, 28028, 31100, 32124, 32124, 31100, + 28028, 23932, 18812, 12412, 5372, -1820, -8828, -15484, -21884, -25980, + -30076, -32124, -32124, -32124, -29052, -24956, -19836, -13948, -7164, 88, + 7420, 13948, 19836, 25980, 29052, 32124, 32124, 32124, 30076, 25980, + 20860, 14460, 7676, 372, -6908, -13948, -19836, -24956, -29052, -32124, + -32124, -32124, -29052, -25980, -19836, -13948, -6908, 428, 7932, 14972, + 20860, 25980, 30076, 32124, 32124, 31100, 29052, 24956, 18812, 12412, + 4860, -2492, -9852, -16764, -22908, -28028, -31100, -32124, -32124, -31100, + -27004, -21884, -15996, -9340, -1628, 5884, 13436, 19836, 24956, 29052, + 32124, 32124, 32124, 29052, 24956, 18812, 11900, 4604, -3004, -10364, + -17788, -23932, -28028, -31100, -32124, -32124, -30076, -25980, -20860, -13948, + -6652, 1180, 8828, 15996, 22908, 27004, 31100, 32124, 32124, 30076, + 27004, 20860, 14460, 7164, -556, -8316, -15484, -21884, -27004, -31100, + -32124, -32124, -30076, -27004, -20860, -14460, -6908, 1116, 8828, 16764, + 22908, 28028, 31100, 32124, 32124, 30076, 25980, 19836, 12924, 5116, + -2876, -10876, -17788, -23932, -29052, -32124, -32124, -32124, -29052, -23932, + -17788, -10364, -2364, 5884, 13436, 20860, 25980, 30076, 32124, 32124, + 31100, 27004, 20860, 14460, 6396, -1756, -9852, -17788, -23932, -29052, + -32124, -32124, -32124, -29052, -23932, -16764, -9340, -1244, 7164, 14972, + 21884, 27004, 31100, 32124, 32124, 30076, 24956, 18812, 11388, 3260, + -5116, -13436, -20860, -25980, -30076, -32124, -32124, -30076, -25980, -19836, + -12412, -4092, 4348, 12924, 19836, 25980, 30076, 32124, 32124, 30076, + 25980, 19836, 12412, 3900, -4860, -12924, -20860, -25980, -30076, -32124, + -32124, -30076, -24956, -18812, -10876, -2492, 6140, 14460, 21884, 27004, + 31100, 32124, 32124, 29052, 23932, 16764, 8828, 88, -8828, -16764, + -23932, -29052, -32124, -32124, -31100, -27004, -20860, -13948, -5372, 3516, + 11900, 19836, 25980, 30076, 32124, 32124, 29052, 24956, 17788, 9852, + 812, -8316, -16764, -23932, -29052, -32124, -32124, -31100, -27004, -20860, + -12924, -4092, 4860, 13436, 20860, 27004, 31100, 32124, 32124, 28028, + 22908, 14972, 6396, -2748, -11900, -19836, -25980, -31100, -32124, -32124, + -29052, -23932, -16764, -7676, 1436, 10364, 18812, 25980, 30076, 32124, + 32124, 29052, 23932, 16764, 8316, -1180, -10364, -18812, -25980, -30076, + -32124, -32124, -29052, -23932, -15996, -7420, 1980, 11388, 19836, 25980, + 31100, 32124, 32124, 28028, 22908, 14972, 5884, -3644, -12924, -20860, + -27004, -31100, -32124, -31100, -27004, -20860, -12412, -3132, 6396, 15484, + 22908, 29052, 32124, 32124, 30076, 24956, 17788, 8828, -556, -10364, + -18812, -25980, -31100, -32124, -32124, -28028, -21884, -13948, -4604, 5372, + 14460, 22908, 29052, 32124, 32124, 30076, 24956, 17788, 8828, -1244, + -10876, -19836, -27004, -31100, -32124, -31100, -27004, -20860, -11900, -1980, + 7932, 16764, 24956, 30076, 32124, 32124, 28028, 21884, 13948, 4348, + -5884, -15484, -22908, -29052, -32124, -32124, -29052, -23932, -15484, -5628, + 4348, 13948, 22908, 29052, 32124, 32124, 30076, 23932, 15996, 6140, + -4092, -13948, -22908, -29052, -32124, -32124, -30076, -23932, -15484, -5884, + 4604, 14460, 22908, 29052, 32124, 32124, 29052, 22908, 14460, 4604, + -5884, -15996, -23932, -30076, -32124, -32124, -28028, -21884, -12412, -2236, + 8316, 17788, 25980, 31100, 32124, 31100, 27004, 18812, 9852, -924, + -11388, -20860, -28028, -32124, -32124, -30076, -23932, -15996, -5628, 5116, + 14972, 23932, 30076, 32124, 32124, 28028, 20860, 11388, 716, -9852, + -19836, -27004, -32124, -32124, -30076, -23932, -15996, -5628, 5116, 15484, + 23932, 30076, 32124, 32124, 27004, 19836, 9852, -1180, -11900, -20860, + -28028, -32124, -32124, -29052, -21884, -12924, -2108, 8828, 18812, 27004, + 31100, 32124, 30076, 23932, 15484, 4604, -6396, -16764, -24956, -31100, + -32124, -31100, -24956, -16764, -6396, 4860, 15484, 23932, 30076, 32124, + 31100, 25980, 17788, 7164, -4092, -14972, -23932, -30076, -32124, -31100, + -25980, -17788, -7164, 4092, 14972, 23932, 30076, 32124, 31100, 25980, + 16764, 6396, -5116, -15996, -24956, -31100, -32124, -31100, -24956, -15996, + -4860, 6652, 17788, 25980, 31100, 32124, 30076, 22908, 13948, 2492, + -9340, -19836, -28028, -32124, -32124, -29052, -20860, -10876, 780, 12412, + 21884, 29052, 32124, 32124, 27004, 17788, 6908, -4860, -15996, -24956, + -31100, -32124, -30076, -23932, -13948, -2108, 9852, 19836, 28028, 32124, + 32124, 28028, 18812, 8316, -3644, -14972, -24956, -31100, -32124, -30076, + -23932, -13948, -1980, 9852, 20860, 29052, 32124, 32124, 27004, 17788, + 6908, -5372, -16764, -25980, -31100, -32124, -29052, -21884, -10876, 1372, + 13436, 23932, 30076, 32124, 30076, 23932, 13948, 1980, -10364, -20860, + -29052, -32124, -31100, -25980, -16764, -4604, 7676, 18812, 28028, 32124, + 32124, 27004, 17788, 6652, -5884, -17788, -27004, -32124, -32124, -28028, + -19836, -7932, 4860, 16764, 25980, 32124, 32124, 28028, 19836, 8316, + -4348, -16764, -25980, -32124, -32124, -28028, -19836, -8316, 4604, 16764, + 25980, 32124, 32124, 28028, 18812, 7164, -5628, -17788, -27004, -32124, + -32124, -27004, -17788, -5628, 7420, 19836, 28028, 32124, 32124, 25980, + 15484, 3132, -9852, -21884, -29052, -32124, -31100, -23932, -12924, 16, + 12924, 23932, 31100, 32124, 29052, 20860, 9340, -3900, -16764, -25980, + -32124, -32124, -27004, -17788, -4860, 8316, 20860, 29052, 32124, 31100, + 23932, 12924, -524, -13948, -24956, -31100, -32124, -28028, -18812, -6908, + 6652, 18812, 28028, 32124, 31100, 24956, 13436, 164, -13436, -23932, + -31100, -32124, -28028, -18812, -6396, 7420, 19836, 29052, 32124, 31100, + 22908, 11900, -1884, -15484, -25980, -32124, -32124, -27004, -16764, -3004, + 10876, 22908, 30076, 32124, 29052, 19836, 7420, -6652, -19836, -29052, + -32124, -31100, -22908, -10876, 3132, 16764, 27004, 32124, 32124, 24956, + 13948, -88, -13948, -24956, -32124, -32124, -27004, -15996, -2364, 11900, + 23932, 31100, 32124, 28028, 17788, 4092, -10364, -22908, -31100, -32124, + -28028, -18812, -5116, 9340, 21884, 30076, 32124, 29052, 18812, 5628, + -8828, -21884, -30076, -32124, -29052, -18812, -5628, 9340, 21884, 30076, + 32124, 28028, 18812, 4860, -9852, -22908, -31100, -32124, -28028, -17788, + -3388, 11388, 23932, 31100, 32124, 27004, 15484, 1244, -13436, -24956, + -32124, -32124, -24956, -13436, 1500, 15996, 27004, 32124, 31100, 22908, + 10364, -4860, -18812, -29052, -32124, -30076, -19836, -6396, 8828, 21884, + 31100, 32124, 27004, 16764, 1756, -13436, -24956, -32124, -32124, -23932, + -11900, 3516, 17788, 28028, 32124, 30076, 19836, 6140, -9340, -22908, + -31100, -32124, -27004, -14460, 492, 15484, 27004, 32124, 31100, 21884, + 7932, -7676, -21884, -30076, -32124, -27004, -15484, -196, 14972, 27004, + 32124, 31100, 21884, 7676, -8316, -21884, -31100, -32124, -25980, -13948, + 1500, 16764, 28028, 32124, 30076, 19836, 4860, -10876, -23932, -32124, + -32124, -23932, -10364, 5628, 19836, 30076, 32124, 27004, 15484, -396, + -15996, -28028, -32124, -30076, -19836, -4348, 11900, 24956, 32124, 31100, + 22908, 8316, -7932, -21884, -31100, -32124, -24956, -11900, 4604, 19836, + 30076, 32124, 27004, 14460, -1500, -17788, -29052, -32124, -28028, -16764, + -988, 14972, 27004, 32124, 29052, 18812, 2876, -13436, -27004, -32124, + -30076, -19836, -4348, 12412, 25980, 32124, 30076, 20860, 5116, -11900, + -24956, -32124, -31100, -20860, -5372, 11388, 24956, 32124, 31100, 20860, + 5116, -11900, -25980, -32124, -30076, -19836, -4348, 12412, 25980, 32124, + 30076, 18812, 3132, -13948, -27004, -32124, -29052, -17788, -1180, 15484, + 28028, 32124, 28028, 15484, -1244, -17788, -29052, -32124, -27004, -12924, + 4348, 20860, 31100, 32124, 24956, 9852, -7932, -22908, -32124, -31100, + -21884, -5884, 11900, 25980, 32124, 30076, 17788, 1180, -15996, -29052, + -32124, -27004, -13436, 4092, 20860, 31100, 32124, 23932, 8316, -9852, + -24956, -32124, -30076, -18812, -2108, 15484, 28028, 32124, 27004, 12924, + -4860, -20860, -31100, -32124, -21884, -6140, 11900, 25980, 32124, 29052, + 15996, -1756, -18812, -30076, -32124, -23932, -8316, 10364, 24956, 32124, + 29052, 16764, -716, -18812, -30076, -32124, -23932, -8316, 10364, 24956, + 32124, 29052, 16764, -1692, -18812, -31100, -32124, -22908, -6652, 11900, + 27004, 32124, 28028, 13948, -4604, -21884, -32124, -31100, -19836, -2620, + 15996, 29052, 32124, 24956, 9340, -9340, -24956, -32124, -29052, -15484, + 3260, 20860, 31100, 31100, 20860, 2620, -15996, -29052, -32124, -24956, + -8316, 11388, 27004, 32124, 28028, 12924, -6396, -22908, -32124, -30076, + -16764, 1820, 19836, 31100, 31100, 20860, 2364, -16764, -30076, -32124, + -22908, -5884, 13436, 28028, 32124, 25980, 9340, -10364, -25980, -32124, + -27004, -11900, 7932, 24956, 32124, 28028, 13948, -5628, -22908, -32124, + -29052, -15484, 3900, 21884, 32124, 30076, 16764, -2620, -20860, -32124, + -30076, -17788, 1692, 20860, 31100, 31100, 17788, -1244, -19836, -31100, + -31100, -17788, 1244, 19836, 31100, 31100, 17788, -1692, -20860, -32124, + -30076, -16764, 2620, 21884, 32124, 30076, 15996, -4092, -22908, -32124, + -29052, -14460, 5884, 23932, 32124, 28028, 12412, -8316, -25980, -32124, + -27004, -9852, 10876, 27004, 32124, 24956, 6908, -13948, -29052, -32124, + -22908, -3516, 16764, 30076, 31100, 19836, -652, -20860, -32124, -30076, + -15484, 5116, 23932, 32124, 28028, 10876, -10364, -27004, -32124, -24956, + -5884, 14972, 30076, 32124, 19836, -24, -19836, -32124, -30076, -14972, + 6396, 24956, 32124, 25980, 8316, -12924, -29052, -32124, -21884, -1372, + 19836, 32124, 30076, 14972, -6396, -24956, -32124, -25980, -7420, 13948, + 30076, 32124, 19836, -1052, -21884, -32124, -29052, -11900, 9852, 28028, + 32124, 22908, 2620, -18812, -31100, -30076, -14460, 7420, 25980, 32124, + 23932, 4860, -16764, -31100, -30076, -15996, 6140, 24956, 32124, 24956, + 5116, -16764, -31100, -30076, -15484, 6652, 25980, 32124, 23932, 4092, + -17788, -31100, -30076, -13948, 8828, 27004, 32124, 21884, 1180, -20860, + -32124, -28028, -10876, 12412, 29052, 32124, 18812, -3388, -23932, -32124, + -24956, -5628, 16764, 31100, 30076, 13436, -9340, -28028, -32124, -20860, + 1436, 22908, 32124, 25980, 6396, -16764, -31100, -30076, -13436, 9852, + 28028, 32124, 19836, -3004, -23932, -32124, -24956, -3644, 18812, 32124, + 28028, 9852, -13948, -30076, -31100, -15484, 8316, 27004, 32124, 19836, + -2748, -23932, -32124, -23932, -2492, 20860, 32124, 27004, 7164, -16764, + -31100, -29052, -11388, 12412, 30076, 31100, 15484, -8828, -28028, -32124, + -18812, 4860, 25980, 32124, 21884, -1628, -23932, -32124, -23932, -1436, + 21884, 32124, 25980, 4092, -19836, -32124, -27004, -6396, 17788, 32124, + 28028, 8316, -15996, -31100, -29052, -9852, 14972, 31100, 29052, 10876, + -13948, -31100, -30076, -11900, 12924, 30076, 30076, 12412, -12924, -30076, + -30076, -12412, 12924, 30076, 30076, 12412, -12924, -30076, -30076, -11388, + 13436, 31100, 30076, 10876, -14460, -31100, -29052, -9340, 15996, 31100, + 28028, 7932, -17788, -32124, -27004, -5884, 18812, 32124, 25980, 3388, + -20860, -32124, -23932, -556, 22908, 32124, 21884, -2620, -25980, -32124, + -18812, 6140, 28028, 32124, 15996, -9852, -30076, -30076, -11900, 13948, + 31100, 28028, 7676, -17788, -32124, -25980, -2748, 21884, 32124, 21884, + -2748, -25980, -32124, -17788, 8316, 29052, 31100, 12412, -13948, -31100, + -28028, -6140, 19836, 32124, 23932, -620, -24956, -32124, -18812, 7676, + 29052, 31100, 11900, -14972, -32124, -27004, -4348, 21884, 32124, 21884, + -4092, -27004, -32124, -14460, 12412, 31100, 28028, 6140, -19836, -32124, + -22908, 3260, 27004, 32124, 14460, -12924, -31100, -28028, -5116, 20860, + 32124, 20860, -5372, -28028, -31100, -11900, 15484, 32124, 25980, 924, + -24956, -32124, -16764, 10364, 30076, 29052, 5884, -20860, -32124, -20860, + 6396, 29052, 30076, 9852, -17788, -32124, -22908, 3260, 27004, 31100, + 12412, -15996, -32124, -24956, 1308, 25980, 32124, 13436, -14972, -32124, + -24956, 716, 25980, 32124, 13436, -14972, -32124, -24956, 1436, 27004, + 31100, 12412, -16764, -32124, -23932, 3388, 28028, 31100, 9852, -18812, + -32124, -21884, 6652, 29052, 29052, 6140, -21884, -32124, -17788, 10876, + 31100, 27004, 1116, -24956, -32124, -12924, 16764, 32124, 22908, -5372, + -29052, -29052, -6140, 21884, 32124, 16764, -12924, -32124, -24956, 2108, + 28028, 30076, 8316, -20860, -32124, -17788, 11388, 31100, 25980, -1692, + -27004, -30076, -8316, 20860, 32124, 16764, -12924, -32124, -23932, 3900, + 29052, 29052, 5116, -23932, -32124, -13436, 16764, 32124, 20860, -8828, + -31100, -25980, 812, 27004, 30076, 7164, -21884, -32124, -14460, 15996, + 32124, 20860, -9340, -31100, -25980, 2364, 28028, 29052, 4348, -24956, + -32124, -10876, 19836, 32124, 16764, -14460, -32124, -21884, 8828, 31100, + 25980, -3004, -29052, -29052, -2492, 25980, 31100, 7676, -22908, -32124, + -12412, 18812, 32124, 16764, -14972, -32124, -19836, 10876, 32124, 22908, + -6908, -31100, -25980, 3132, 29052, 28028, 460, -28028, -30076, -3772, + 25980, 31100, 6652, -23932, -32124, -9340, 21884, 32124, 11900, -19836, + -32124, -13948, 17788, 32124, 15484, -16764, -32124, -16764, 14972, 32124, + 17788, -13948, -32124, -18812, 12924, 32124, 19836, -12412, -32124, -20860, + 11900, 32124, 20860, -11388, -32124, -20860, 11388, 32124, 20860, -11900, + -32124, -19836, 12412, 32124, 19836, -13436, -32124, -18812, 14460, 32124, + 17788, -15484, -32124, -16764, 16764, 32124, 14460, -18812, -32124, -12924, + 20860, 32124, 10364, -21884, -32124, -7932, 23932, 31100, 4860, -25980, + -30076, -1628, 28028, 28028, -1980, -30076, -25980, 5884, 31100, 22908, + -9852, -32124, -19836, 13948, 32124, 15996, -17788, -32124, -11900, 21884, + 32124, 6652, -25980, -30076, -1308, 29052, 27004, -4348, -31100, -22908, + 10364, 32124, 18812, -15996, -32124, -12924, 21884, 32124, 6140, -25980, + -29052, 876, 30076, 24956, -8316, -32124, -19836, 15484, 32124, 12412, + -21884, -31100, -4860, 27004, 28028, -3644, -31100, -22908, 12412, 32124, + 14972, -19836, -32124, -6396, 27004, 28028, -3132, -31100, -21884, 12924, + 32124, 13948, -20860, -31100, -4092, 28028, 27004, -6396, -32124, -18812, + 16764, 32124, 9340, -24956, -29052, 2236, 31100, 21884, -13436, -32124, + -11900, 23932, 30076, -164, -30076, -22908, 12412, 32124, 12412, -22908, + -30076, 244, 30076, 22908, -13436, -32124, -11388, 23932, 29052, -2492, + -31100, -20860, 15996, 32124, 7676, -27004, -27004, 6908, 32124, 16764, + -20860, -31100, -1884, 30076, 22908, -13436, -32124, -9852, 25980, 28028, + -6140, -32124, -16764, 20860, 31100, 396, -31100, -21884, 15996, 32124, + 6140, -28028, -24956, 11388, 32124, 10876, -25980, -28028, 7164, 32124, + 14460, -22908, -30076, 3644, 32124, 16764, -20860, -31100, 1180, 31100, + 18812, -19836, -31100, -460, 31100, 19836, -18812, -31100, -1116, 31100, + 19836, -18812, -31100, -924, 31100, 19836, -18812, -31100, 196, 31100, + 18812, -19836, -30076, 2236, 32124, 16764, -21884, -29052, 5116, 32124, + 13436, -24956, -28028, 8828, 32124, 9340, -27004, -24956, 13436, 32124, + 4348, -30076, -20860, 18812, 31100, -1756, -32124, -15484, 23932, 28028, + -8828, -32124, -8316, 28028, 22908, -15996, -32124, -212, 32124, 16764, + -22908, -28028, 8828, 32124, 7420, -29052, -21884, 18812, 31100, -3388, + -32124, -12412, 25980, 24956, -14460, -32124, -588, 32124, 15484, -24956, + -27004, 11900, 32124, 2620, -31100, -16764, 23932, 27004, -11388, -32124, + -2748, 31100, 16764, -23932, -27004, 12924, 32124, 988, -32124, -14460, + 25980, 24956, -15484, -31100, 2748, 32124, 10364, -28028, -21884, 19836, + 29052, -8316, -32124, -4348, 31100, 15996, -24956, -25980, 15484, 31100, + -3900, -32124, -7932, 30076, 18812, -22908, -27004, 13948, 32124, -2748, + -32124, -8316, 30076, 18812, -23932, -25980, 14972, 31100, -4860, -32124, + -5628, 31100, 15484, -25980, -23932, 18812, 29052, -9852, -32124, 372, + 32124, 9340, -30076, -17788, 24956, 24956, -17788, -30076, 9852, 32124, + -988, -32124, -7676, 31100, 15484, -27004, -21884, 20860, 28028, -13948, + -31100, 6652, 32124, 1116, -32124, -8828, 30076, 15484, -27004, -21884, + 21884, 25980, -16764, -30076, 10364, 32124, -3900, -32124, -2620, 32124, + 8828, -31100, -14460, 28028, 19836, -23932, -23932, 19836, 27004, -15484, + -30076, 10876, 32124, -5628, -32124, 620, 32124, 4348, -32124, -8828, + 31100, 12924, -29052, -16764, 27004, 19836, -23932, -22908, 21884, 25980, + -18812, -28028, 15484, 29052, -12412, -31100, 9852, 32124, -6652, -32124, + 3900, 32124, -1308, -32124, -1180, 32124, 3516, -32124, -5628, 32124, + 7420, -32124, -9340, 31100, 10876, -31100, -11900, 30076, 12924, -30076, + -13948, 29052, 14972, -29052, -15484, 29052, 15996, -29052, -15996, 28028, + 15996, -28028, -15996, 29052, 15996, -29052, -15484, 29052, 14972, -29052, + -14460, 30076, 13436, -30076, -12412, 30076, 11388, -31100, -9852, 31100, + 7932, -32124, -6140, 32124, 4092, -32124, -1884, 32124, -588, -32124, + 3260, 32124, -6140, -32124, 8828, 31100, -11900, -30076, 14972, 28028, + -17788, -25980, 20860, 23932, -23932, -20860, 27004, 16764, -29052, -13436, + 31100, 8828, -32124, -4092, 32124, -876, -32124, 6140, 31100, -11388, + -30076, 16764, 27004, -20860, -22908, 24956, 18812, -29052, -12924, 31100, + 6652, -32124, -104, 32124, -6652, -31100, 13436, 28028, -19836, -23932, + 24956, 17788, -29052, -11388, 32124, 3516, -32124, 4604, 31100, -12412, + -28028, 19836, 22908, -25980, -15996, 30076, 7676, -32124, 1500, 32124, + -10876, -29052, 18812, 22908, -25980, -15484, 31100, 5884, -32124, 4348, + 31100, -14460, -27004, 22908, 18812, -29052, -9340, 32124, -1884, -32124, + 12924, 27004, -22908, -18812, 29052, 8316, -32124, 3516, 31100, -15484, + -25980, 24956, 15996, -31100, -3772, 32124, -9340, -29052, 20860, 20860, + -29052, -8316, 32124, -5116, -30076, 17788, 22908, -28028, -10364, 32124, + -3772, -31100, 17788, 22908, -28028, -10364, 32124, -4860, -30076, 18812, + 21884, -29052, -7420, 32124, -8316, -29052, 21884, 17788, -31100, -2108, + 32124, -13948, -24956, 27004, 10876, -32124, 5884, 29052, -21884, -17788, + 31100, 1308, -32124, 15996, 22908, -29052, -7164, 32124, -10876, -27004, + 25980, 11900, -32124, 7164, 29052, -23932, -14460, 32124, -4348, -30076, + 21884, 16764, -32124, 3004, 30076, -21884, -16764, 32124, -3004, -30076, + 21884, 15996, -32124, 4348, 29052, -22908, -14460, 32124, -7164, -28028, + 25980, 10876, -32124, 10876, 24956, -28028, -6140, 32124, -15996, -20860, + 31100, -244, -31100, 21884, 15484, -32124, 7932, 27004, -27004, -7164, + 32124, -16764, -20860, 31100, -2748, -29052, 24956, 10876, -32124, 13948, + 21884, -31100, 1244, 30076, -23932, -10876, 32124, -14460, -20860, 31100, + -3260, -29052, 25980, 7676, -32124, 17788, 17788, -32124, 8828, 24956, + -29052, -652, 30076, -23932, -9852, 32124, -17788, -17788, 32124, -9852, + -23932, 30076, -2364, -28028, 27004, 4860, -31100, 22908, 11388, -32124, + 17788, 16764, -32124, 12412, 21884, -32124, 7164, 24956, -30076, 2492, + 28028, -28028, -1820, 30076, -25980, -5628, 31100, -23932, -8828, 32124, + -21884, -11388, 32124, -19836, -12924, 32124, -18812, -14460, 32124, -17788, + -15484, 32124, -16764, -15996, 32124, -16764, -15996, 32124, -17788, -14972, + 32124, -17788, -13948, 32124, -19836, -12412, 32124, -20860, -10364, 32124, + -22908, -7676, 31100, -24956, -4348, 30076, -27004, -372, 28028, -30076, + 4092, 24956, -31100, 9340, 20860, -32124, 14460, 16764, -32124, 19836, + 10876, -32124, 24956, 4092, -29052, 29052, -3516, -24956, 32124, -11388, + -18812, 32124, -18812, -10876, 31100, -25980, -1628, 27004, -30076, 8316, + 20860, -32124, 17788, 11388, -31100, 25980, 276, -25980, 31100, -11388, + -17788, 32124, -21884, -5884, 29052, -30076, 7420, 20860, -32124, 19836, + 8316, -30076, 29052, -6396, -20860, 32124, -19836, -7164, 29052, -30076, + 8828, 18812, -32124, 22908, 3260, -27004, 31100, -13948, -13948, 31100, + -27004, 4092, 21884, -32124, 20860, 5116, -28028, 31100, -13948, -12924, + 31100, -29052, 7164, 18812, -32124, 24956, -1180, -22908, 32124, -20860, + -3900, 25980, -32124, 17788, 7676, -28028, 31100, -14972, -10364, 30076, + -31100, 13436, 12412, -30076, 30076, -12412, -12924, 30076, -30076, 12412, + 12412, -30076, 30076, -13436, -10876, 29052, -31100, 15484, 8828, -28028, + 32124, -18812, -5116, 25980, -32124, 21884, 196, -21884, 32124, -25980, + 5628, 17788, -31100, 29052, -12412, -10876, 29052, -32124, 19836, 2492, + -22908, 32124, -25980, 6908, 15484, -30076, 31100, -16764, -5116, 24956, + -32124, 25980, -6908, -14972, 30076, -31100, 18812, 1884, -21884, 32124, + -29052, 12412, 8828, -25980, 32124, -24956, 7164, 13948, -29052, 32124, + -21884, 3260, 16764, -30076, 32124, -20860, 1180, 18812, -31100, 31100, + -19836, 988, 18812, -31100, 32124, -20860, 2492, 16764, -30076, 32124, + -22908, 5884, 13436, -28028, 32124, -25980, 10876, 7932, -23932, 32124, + -30076, 17788, 556, -18812, 30076, -32124, 23932, -8828, -9340, 24956, + -32124, 30076, -18812, 1980, 15484, -28028, 32124, -28028, 14972, 2236, + -18812, 30076, -32124, 27004, -13436, -3644, 19836, -30076, 32124, -27004, + 13948, 2236, -17788, 29052, -32124, 28028, -16764, 1820, 13948, -25980, + 32124, -31100, 21884, -8316, -7164, 20860, -30076, 32124, -28028, 17788, + -3004, -11900, 23932, -31100, 32124, -25980, 15484, -1180, -12924, 24956, + -31100, 32124, -27004, 16764, -3260, -10876, 22908, -30076, 32124, -29052, + 20860, -8828, -4348, 16764, -27004, 32124, -32124, 27004, -17788, 5884, +}; diff --git a/test/cmocka/src/math/arithmetic/ref_chirp_mono_8k_s16.h b/test/cmocka/src/math/arithmetic/ref_chirp_mono_8k_s16.h new file mode 100644 index 000000000000..29c4493969a5 --- /dev/null +++ b/test/cmocka/src/math/arithmetic/ref_chirp_mono_8k_s16.h @@ -0,0 +1,412 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2025 Intel Corporation. + */ + +/* Created 13-May-2025 18:29:28 with script a_law_mu_law_test_vectors.m */ + +#include +#define REF_DATA_SAMPLE_COUNT 4000 + +static const int16_t chirp_mono_8k_s16[4000] = { + 30209, 29119, 27848, 26404, 24795, 23030, 21121, 19078, 16914, 14643, + 12277, 9833, 7324, 4767, 2178, -427, -3032, -5620, -8175, -10680, + -13119, -15476, -17736, -19885, -21907, -23791, -25522, -27091, -28485, -29696, + -30715, -31535, -32151, -32557, -32751, -32730, -32494, -32044, -31383, -30515, + -29443, -28176, -26721, -25087, -23284, -21325, -19221, -16987, -14637, -12186, + -9651, -7049, -4398, -1714, 984, 3678, 6349, 8979, 11551, 14045, + 16446, 18736, 20899, 22920, 24784, 26480, 27993, 29313, 30431, 31339, + 32028, 32495, 32734, 32744, 32524, 32076, 31400, 30503, 29389, 28066, + 26542, 24829, 22937, 20879, 18671, 16327, 13863, 11298, 8650, 5936, + 3178, 393, -2396, -5171, -7910, -10594, -13203, -15718, -18120, -20391, + -22515, -24474, -26254, -27842, -29225, -30392, -31334, -32044, -32516, -32745, + -32729, -32467, -31962, -31215, -30233, -29021, -27588, -25946, -24104, -22078, + -19882, -17532, -15046, -12442, -9740, -6962, -4127, -1258, 1624, 4495, + 7334, 10119, 12827, 15438, 17930, 20285, 22482, 24505, 26336, 27962, + 29369, 30544, 31478, 32164, 32594, 32765, 32674, 32323, 31712, 30846, + 29731, 28376, 26791, 24989, 22982, 20787, 18421, 15903, 13254, 10493, + 7645, 4731, 1776, -1196, -4161, -7095, -9972, -12769, -15463, -18031, + -20451, -22702, -24766, -26624, -28260, -29660, -30812, -31705, -32332, -32685, + -32761, -32559, -32080, -31327, -30306, -29025, -27494, -25726, -23735, -21538, + -19153, -16600, -13901, -11079, -8159, -5165, -2123, 940, 3998, 7023, + 9989, 12870, 15640, 18275, 20750, 23043, 25134, 27003, 28634, 30010, + 31119, 31950, 32495, 32749, 32708, 32372, 31743, 30826, 29628, 28161, + 26436, 24468, 22275, 19876, 17293, 14549, 11669, 8678, 5605, 2477, + -676, -3826, -6944, -9999, -12964, -15810, -18511, -21040, -23374, -25490, + -27368, -28988, -30336, -31397, -32161, -32620, -32768, -32603, -32127, -31342, + -30255, -28877, -27219, -25297, -23129, -20734, -18137, -15361, -12433, -9381, + -6234, -3024, 219, 3462, 6674, 9824, 12879, 15809, 18585, 21179, + 23565, 25718, 27616, 29240, 30572, 31599, 32309, 32694, 32750, 32474, + 31870, 30942, 29698, 28151, 26316, 24210, 21855, 19274, 16492, 13538, + 10442, 7235, 3951, 623, -2715, -6027, -9279, -12438, -15469, -18341, + -21023, -23486, -25705, -27654, -29313, -30663, -31689, -32379, -32725, -32723, + -32371, -31673, -30635, -29267, -27582, -25600, -23339, -20823, -18080, -15138, + -12030, -8787, -5446, -2042, 1388, 4805, 8172, 11452, 14609, 17608, + 20414, 22996, 25325, 27375, 29121, 30544, 31627, 32356, 32722, 32721, + 32352, 31617, 30524, 29084, 27313, 25230, 22859, 20224, 17356, 14287, + 11051, 7685, 4228, 719, -2801, -6292, -9713, -13024, -16187, -19164, + -21920, -24422, -26641, -28548, -30122, -31343, -32195, -32667, -32753, -32451, + -31762, -30696, -29262, -27477, -25362, -22942, -20243, -17299, -14144, -10815, + -7353, -3798, -194, 3415, 6987, 10476, 13840, 17037, 20029, 22777, + 25247, 27407, 29232, 30696, 31781, 32472, 32759, 32639, 32111, 31181, + 29859, 28162, 26108, 23725, 21039, 18085, 14900, 11523, 7996, 4364, + 674, -3029, -6696, -10280, -13736, -17017, -20083, -22891, -25406, -27594, + -29426, -30876, -31926, -32559, -32768, -32547, -31900, -30832, -29357, -27494, + -25266, -22701, -19833, -16699, -13339, -9799, -6125, -2366, 1428, 5207, + 8919, 12514, 15943, 19159, 22119, 24781, 27109, 29069, 30635, 31783, + 32497, 32766, 32585, 31955, 30883, 29384, 27478, 25188, 22547, 19589, + 16356, 12891, 9244, 5463, 1602, -2284, -6142, -9916, -13554, -17003, + -20214, -23140, -25740, -27974, -29811, -31222, -32187, -32691, -32725, -32286, + -31381, -30022, -28225, -26018, -23430, -20498, -17265, -13776, -10082, -6237, + -2297, 1680, 5636, 9512, 13251, 16797, 20096, 23099, 25760, 28039, + 29900, 31315, 32260, 32721, 32689, 32164, 31152, 29666, 27730, 25369, + 22621, 19524, 16127, 12479, 8637, 4659, 605, -3462, -7478, -11383, + -15114, -18614, -21827, -24703, -27196, -29265, -30878, -32007, -32634, -32748, + -32344, -31429, -30015, -28124, -25783, -23031, -19908, -16464, -12754, -8836, + -4773, -629, 3529, 7633, 11618, 15417, 18970, 22217, 25105, 27586, + 29618, 31166, 32204, 32714, 32685, 32117, 31018, 29404, 27301, 24742, + 21769, 18431, 14781, 10881, 6796, 2592, -1659, -5886, -10017, -13982, + -17714, -21148, -24226, -26894, -29105, -30821, -32010, -32651, -32732, -32249, + -31209, -29629, -27535, -24962, -21952, -18558, -14838, -10855, -6678, -2381, + 1962, 6274, 10479, 14503, 18275, 21726, 24794, 27424, 29568, 31187, + 32250, 32736, 32636, 31949, 30686, 28869, 26529, 23707, 20452, 16824, + 12886, 8709, 4370, -52, -4478, -8826, -13015, -16968, -20611, -23877, + -26703, -29036, -30832, -32056, -32683, -32699, -32104, -30907, -29127, -26798, + -23962, -20671, -16986, -12976, -8716, -4286, 229, 4744, 9172, 13428, + 17430, 21101, 24369, 27170, 29448, 31158, 32265, 32747, 32592, 31801, + 30388, 28380, 25813, 22738, 19212, 15305, 11092, 6656, 2085, -2532, + -7103, -11536, -15743, -19640, -23146, -26191, -28713, -30659, -31988, -32673, + -32696, -32058, -30767, -28849, -26342, -23295, -19768, -15834, -11571, -7066, + -2412, 2296, 6961, 11486, 15777, 19743, 23302, 26378, 28906, 30830, + 32111, 32717, 32636, 31867, 30425, 28337, 25647, 22410, 18694, 14576, + 10144, 5490, 715, -4079, -8790, -13316, -17559, -21426, -24833, -27704, + -29976, -31597, -32531, -32755, -32263, -31063, -29181, -26654, -23538, -19900, + -15818, -11382, -6690, -1845, 3045, 7872, 12527, 16906, 20909, 24446, + 27436, 29810, 31513, 32504, 32759, 32270, 31047, 29115, 26516, 23309, + 19565, 15369, 10815, 6008, 1059, -3920, -8812, -13504, -17886, -21856, + -25319, -28194, -30412, -31918, -32676, -32666, -31886, -30352, -28099, -25178, + -21657, -17617, -13154, -8374, -3389, 1682, 6717, 11595, 16198, 20414, + 24141, 27286, 29773, 31538, 32538, 32745, 32152, 30773, 28637, 25797, + 22320, 18290, 13804, 8974, 3916, -1242, -6375, -11353, -16053, -20355, + -24152, -27346, -29855, -31616, -32581, -32723, -32038, -30540, -28265, -25269, + -21626, -17428, -12780, -7801, -2617, 2638, 7830, 12825, 17493, 21712, + 25371, 28374, 30641, 32111, 32743, 32519, 31442, 29538, 26856, 23463, + 19447, 14914, 9981, 4779, -555, -5879, -11050, -15931, -20389, -24304, + -27569, -30095, -31811, -32669, -32644, -31733, -29959, -27369, -24030, -20032, + -15482, -10504, -5233, 187, 5606, 10875, 15848, 20387, 24363, 27666, + 30202, 31896, 32701, 32592, 31567, 29655, 26907, 23398, 19224, 14503, + 9366, 3959, -1565, -7050, -12338, -17278, -21727, -25557, -28655, -30931, + -32316, -32768, -32271, -30838, -28508, -25346, -21441, -16907, -11874, -6488, + -908, 4705, 10184, 15367, 20100, 24241, 27667, 30272, 31979, 32732, + 32507, 31309, 29170, 26153, 22345, 17861, 12832, 7411, 1760, -3949, + -9543, -14852, -19711, -23971, -27501, -30189, -31951, -32730, -32500, -31264, + -29059, -25951, -22032, -17425, -12269, -6726, -967, 4827, 10475, 15798, + 20627, 24809, 28210, 30720, 32256, 32767, 32236, 30674, 28130, 24682, + 20440, 15536, 10128, 4388, -1499, -7342, -12952, -18147, -22755, -26625, + -29629, -31666, -32667, -32595, -31451, -29270, -26120, -22103, -17351, -12018, + -6281, -330, 5638, 11422, 16829, 21676, 25798, 29056, 31337, 32561, + 32684, 31698, 29636, 26563, 22581, 17826, 12456, 6654, 619, -5442, + -11321, -16815, -21733, -25901, -29175, -31438, -32608, -32641, -31534, -29322, + -26080, -21918, -16982, -11443, -5494, 654, 6784, 12679, 18128, 22935, + 26929, 29963, 31926, 32745, 32388, 30864, 28225, 24564, 20010, 14727, + 8904, 2751, -3507, -9643, -15431, -20658, -25132, -28684, -31183, -32533, + -32681, -31618, -29381, -26049, -21744, -16624, -10879, -4720, 1620, 7906, + 13899, 19374, 24121, 27959, 30741, 32358, 32745, 31885, 29806, 26585, + 22343, 17239, 11468, 5251, -1175, -7562, -13661, -19235, -24066, -27965, + -30777, -32388, -32734, -31796, -29608, -26253, -21860, -16601, -10680, -4330, + 2197, 8642, 14749, 20272, 24990, 28711, 31283, 32600, 32605, 31295, + 28720, 24979, 20223, 14640, 8457, 1924, -4694, -11126, -17107, -22391, + -26758, -30027, -32059, -32768, -32119, -30137, -26901, -22541, -17238, -11209, + -4705, 2001, 8630, 14900, 20549, 25334, 29051, 31540, 32692, 32454, + 30833, 27894, 23760, 18604, 12645, 6138, -640, -7396, -13839, -19687, + -24687, -28619, -31308, -32634, -32536, -31014, -28131, -24010, -18828, -12813, + -6227, 641, 7486, 14005, 19907, 24927, 28840, 31466, 32686, 32440, + 30737, 27648, 23309, 17914, 11703, 4956, -2023, -8915, -15407, -21201, + -26030, -29671, -31952, -32767, -32072, -29897, -26338, -21556, -15769, -9244, + -2284, 4790, 11645, 17962, 23442, 27825, 30903, 32527, 32616, 31162, + 28230, 23955, 18537, 12231, 5336, -1820, -8896, -15551, -21464, -26348, + -29966, -32139, -32758, -31789, -29275, -25333, -20154, -13985, -7126, 87, + 7303, 14166, 20337, 25509, 29424, 31886, 32767, 32019, 29677, 25852, + 20732, 14569, 7670, 379, -6936, -13909, -20185, -25445, -29420, -31904, + -32768, -31962, -29524, -25574, -20310, -14000, -6964, 437, 7822, 14809, + 21035, 26176, 29960, 32189, 32741, 31583, 28771, 24449, 18838, 12232, + 4975, -2550, -9948, -16825, -22814, -27596, -30913, -32582, -32511, -30700, + -27239, -22312, -16180, -9169, -1657, 5951, 13243, 19823, 25329, 29460, + 31986, 32764, 31748, 28988, 24631, 18914, 12149, 4705, -3005, -10556, + -17526, -23527, -28221, -31342, -32711, -32248, -29972, -26009, -20575, -13975, + -6579, 1196, 8911, 16125, 22427, 27455, 30917, 32612, 32436, 30397, + 26605, 21276, 14712, 7291, -559, -8384, -15727, -22160, -27305, -30856, + -32603, -32436, -30362, -26497, -21065, -14382, -6842, 1110, 9004, 16369, + 22763, 27803, 31182, 32695, 32245, 29853, 25660, 19914, 12957, 5210, + -2861, -10765, -18020, -24181, -28869, -31793, -32768, -31729, -28736, -23968, + -17714, -10358, -2353, 5805, 13609, 20571, 26254, 30300, 32450, 32564, + 30629, 26763, 21205, 14300, 6484, -1751, -9882, -17390, -23795, -28686, + -31743, -32768, -31688, -28567, -23602, -17108, -9501, -1272, 7048, 14915, + 21818, 27302, 31006, 32681, 32213, 29627, 25087, 18888, 11436, 3219, + -5218, -13316, -20534, -26390, -30487, -32548, -32429, -30132, -25806, -19737, + -12330, -4083, 4448, 12684, 20066, 26087, 30333, 32509, 32462, 30188, + 25837, 19704, 12207, 3860, -4762, -13060, -20459, -26441, -30585, -32598, + -32332, -29801, -25176, -18776, -11049, -2535, 6166, 14437, 21691, 27411, + 31183, 32736, 31951, 28879, 23733, 16879, 8804, 88, -8642, -16755, + -23661, -28855, -31955, -32731, -31119, -27230, -21344, -13888, -5404, 3485, + 12125, 19876, 26163, 30516, 32606, 32272, 29532, 24585, 17794, 9665, + 802, -8128, -16454, -23545, -28862, -31999, -32710, -30937, -26806, -20628, + -12868, -4116, 4958, 13660, 21318, 27340, 31255, 32757, 31722, 28223, + 22526, 15070, 6431, -2718, -11662, -19698, -26194, -30633, -32660, -32109, + -29015, -23618, -16341, -7757, 1453, 10554, 18820, 25584, 30300, 32584, + 32245, 29304, 23991, 16730, 8106, -1185, -10387, -18749, -25587, -30337, + -32604, -32194, -29135, -23672, -16249, -7476, 1924, 11173, 19500, 26210, + 30739, 32702, 31928, 28474, 22625, 14865, 5845, -3676, -12895, -21028, + -27382, -31412, -32768, -31326, -27204, -20747, -12504, -3178, 6430, 15491, + 23221, 28946, 32165, 32591, 30181, 25135, 17890, 9072, -549, -10130, + -18828, -25874, -30641, -32701, -31866, -28202, -22026, -13883, -4493, 5306, + 14638, 22665, 28662, 32084, 32615, 30199, 25049, 17622, 8589, -1234, + -10952, -19679, -26614, -31115, -32764, -31402, -27146, -20381, -11726, -1977, + 7963, 17172, 24790, 30102, 32607, 32062, 28510, 22278, 13944, 4288, + -5780, -15311, -23399, -29273, -32368, -32383, -29307, -23427, -15298, -5695, + 4463, 14201, 22578, 28780, 32202, 32506, 29652, 23910, 15834, 6204, + -4041, -13898, -22400, -28707, -32191, -32502, -29600, -23764, -15566, -5814, + 4526, 14422, 22887, 29068, 32340, 32367, 29138, 22969, 14475, 4510, + -5920, -15758, -24003, -29810, -32580, -32022, -28184, -21452, -12510, -2272, + 8208, 17850, 25653, 30803, 32758, 31307, 26592, 19097, 9598, -915, + -11341, -20584, -27666, -31835, -32643, -29995, -24163, -15759, -5669, 5033, + 15207, 23762, 29777, 32600, 31918, 27796, 20669, 11301, 701, -9985, + -19594, -27077, -31613, -32697, -30202, -24392, -15897, -5646, 5238, 15552, + 24154, 30086, 32682, 31645, 27080, 19489, 9712, -1162, -11914, -21336, + -28364, -32197, -32395, -28926, -22173, -12895, -2141, 8866, 18870, 26723, + 31520, 32702, 30123, 24071, 15236, 4631, -6519, -16922, -25367, -30866, + -32768, -30843, -25305, -16795, -6305, 4936, 15605, 24440, 30391, 32745, + 31214, 25968, 17625, 7170, -4151, -14984, -24028, -30193, -32727, -31315, + -26119, -17756, -7233, 4177, 15089, 24171, 30309, 32744, 31169, 25766, + 17190, 6488, -5023, -15923, -24860, -30720, -32768, -30738, -24872, -15894, + -4918, 6683, 17454, 26039, 31349, 32705, 29926, 23352, 13808, 2500, + -9135, -19615, -27596, -32051, -32397, -28581, -21082, -10858, 778, 12322, + 22279, 29351, 32611, 31623, 26506, 17918, 6975, -4893, -16127, -25247, + -31044, -32742, -30106, -23475, -13720, -2129, 9755, 20346, 28224, 32325, + 32089, 27536, 19269, 8394, -3626, -15164, -24655, -30802, -32759, -30249, + -23603, -13721, -1948, 10103, 20773, 28589, 32462, 31848, 26819, 18063, + 6786, -5445, -16927, -26051, -31535, -32599, -29081, -21466, -10817, 1370, + 13373, 23491, 30279, 32765, 30583, 24031, 14037, 2022, -10293, -21138, + -28947, -32586, -31517, -25883, -16489, -4691, 7800, 19164, 27738, 32259, + 32055, 27144, 18234, 6630, -5963, -17685, -26796, -31938, -32336, -27918, + -19330, -7847, 4822, 16777, 26222, 31728, 32455, 28280, 19822, 8353, + -4395, -16485, -26073, -31689, -32464, -28267, -19729, -8151, 4692, 16822, + 26363, 31831, 32367, 27875, 19041, 7232, -5716, -17782, -27070, -32117, + -32117, -27057, -17723, -5579, 7459, 19325, 28129, 32462, 31621, 25728, + 15712, 3168, -9895, -21377, -29423, -32725, -30737, -23767, -12934, 12, + 12966, 23816, 30782, 32714, 29281, 21034, 9318, -3944, -16566, -26457, + -31972, -32181, -27038, -17385, -4822, 8558, 20516, 29041, 32691, 30839, + 23784, 12703, -537, -13698, -24542, -31219, -32580, -28378, -19317, -6939, + 6641, 19090, 28261, 32562, 31238, 24502, 13510, 161, -13227, -24320, + -31173, -32576, -28269, -18994, -6369, 7389, 19853, 28817, 32683, 30752, + 23351, 11785, -1893, -15244, -25877, -31878, -32156, -26647, -16329, -3053, + 10787, 22683, 30470, 32722, 29013, 20006, 7334, -6693, -19503, -28739, + -32691, -30617, -22883, -10908, 3100, 16543, 26920, 32288, 31631, 25057, + 13782, -88, -13954, -25203, -31706, -32221, -26635, -15992, -2302, 11838, + 23732, 31103, 32529, 27720, 17584, 4058, -10262, -22612, -30601, -32668, + -28398, -18604, -5180, 9266, 21914, 30282, 32719, 28731, 19086, 5671, + -8876, -21678, -30196, -32726, -28751, -19045, -5531, 9100, 21921, 30355, + 32697, 28458, 18477, 4756, -9939, -22632, -30739, -32600, -27819, -17356, + -3335, 11381, 23774, 31290, 32368, 26771, 15636, 1256, -13396, -25278, + -31910, -31895, -25220, -13263, 1482, 15929, 27038, 32460, 31037, 23052, + 10179, -4864, -18886, -28899, -32758, -29623, -20146, -6343, 8834, 22123, + 30655, 32577, 27457, 16384, 1747, -13282, -25431, -32042, -31658, -24343, + -11684, 3551, 18018, 28525, 32742, 29719, 20109, 6028, -9406, -22757, + -31041, -32394, -26494, -14646, 502, 15550, 27103, 32545, 30626, 21764, + 7953, -7678, -21573, -30555, -32558, -27105, -15429, -197, 15093, 26915, + 32527, 30615, 21603, 7566, -8242, -22143, -30885, -32410, -26343, -14088, + 1489, 16728, 28033, 32722, 29667, 19574, 4822, -11090, -24371, -31842, + -31701, -23962, -10465, 5561, 20259, 30081, 32638, 27293, 15322, -382, + -16006, -27739, -32705, -29672, -19362, -4289, 11851, 25084, 32136, 31246, + 22615, 8366, -7975, -22344, -31150, -32180, -25155, -11816, 4501, 19699, + 29944, 32636, 27075, 14649, -1505, -17290, -28683, -32767, -28480, -16896, + -970, 15219, 27503, 32707, 29467, 18600, 2904, -13559, -26508, -32562, + -30123, -19806, -4294, 12358, 25775, 32417, 30515, 20551, 5140, -11647, + -25353, -32327, -30691, -20861, -5445, 11443, 25273, 32321, 30671, 20747, + 5208, -11753, -25540, -32402, -30452, -20201, -4425, 12573, 26140, 32544, + 30005, 19199, 3088, -13889, -27035, -32693, -29273, -17703, -1189, 15671, + 28161, 32767, 28180, 15664, -1275, -17868, -29423, -32655, -26627, -13027, + 4291, 20400, 30695, 32215, 24502, 9748, -7822, -23152, -31812, -31281, + -21690, -5797, 11792, 25963, 32573, 29672, 18084, 1186, -16074, -28619, + -32740, -27200, -13611, 4020, 20473, 30852, 32054, 23694, 8248, -9679, + -24718, -32345, -30246, -19028, -2057, 15550, 28460, 32742, 27074, 13155, + -4788, -21282, -31274, -31683, -22359, -6147, 11972, 26409, 32688, 28843, + 16042, -1757, -19024, -30368, -32229, -24001, -8238, 10125, 25316, 32538, + 29489, 17108, -704, -18307, -30102, -32317, -24220, -8375, 10165, 25458, + 32584, 29226, 16442, -1662, -19244, -30601, -32033, -23046, -6545, 12106, + 26814, 32751, 27949, 13958, -4638, -21720, -31641, -31099, -20248, -2665, + 15818, 29045, 32588, 25237, 9428, -9556, -25344, -32612, -28887, -15400, + 3309, 20911, 31426, 31258, 20439, 2634, -16085, -29309, -32487, -24501, + -8073, 11152, 26539, 32754, 27617, 12886, -6340, -23371, -32257, -29870, + -17018, 1816, 20027, 31199, 31376, 20467, 2306, -16688, -29769, -32269, + -23272, -5959, 13498, 28135, 32687, 25493, 9113, -10567, -26443, -32761, + -27205, -11764, 7969, 24813, 32612, 28490, 13928, -5756, -23340, -32342, + -29422, -15627, 3962, 22098, 32040, 30069, 16890, -2605, -21141, -31771, + -30486, -17740, 1696, 20507, 31584, 30715, 18199, -1239, -20220, -31510, + -30778, -18275, 1238, 20292, 31559, 30683, 17970, -1696, -20720, -31726, + -30418, -17274, 2612, 21493, 31984, 29953, 16166, -3986, -22584, -32288, + -29242, -14619, 5811, 23948, 32572, 28222, 12601, -8070, -25525, -32750, + -26817, -10081, 10733, 27227, 32714, 24942, 7034, -13748, -28944, -32336, + -22508, -3453, 17034, 30534, 31474, 19433, -646, -20472, -31827, -29973, + -15650, 5206, 23904, 32621, 27682, 11125, -10120, -27121, -32697, -24465, + -5873, 15222, 29869, 31823, 20219, -23, -20271, -31852, -29778, -14905, + 6395, 24954, 32748, 26378, 8571, -12971, -28888, -32231, -21511, -1380, + 19371, 31641, 30016, 15179, -6362, -25109, -32762, -25901, -7537, 14192, + 29616, 31836, 19828, -1066, -21498, -32287, -28554, -11945, 10070, 27546, + 32554, 22789, 2656, -18702, -31544, -29979, -14690, 7348, 26026, 32743, + 24373, 4744, -17094, -31029, -30574, -15906, 6180, 25399, 32765, 24801, + 5203, -16853, -30997, -30544, -15672, 6621, 25794, 32743, 24135, 4030, + -18012, -31465, -29872, -13958, 8670, 27144, 32554, 22256, 1192, -20466, + -32211, -28313, -10631, 12248, 29161, 31820, 18887, -3327, -23922, -32748, + -25422, -5526, 17120, 31293, 29930, 13672, -9413, -27815, -32317, -20632, + 1417, 22769, 32671, 26099, 6335, -16650, -31210, -29930, -13422, 9938, + 28242, 32117, 19545, -3064, -24115, -32766, -24526, -3610, 19189, 32058, + 28292, 9809, -13798, -30221, -30858, -15338, 8239, 27504, 32307, 20082, + -2757, -24154, -32768, -23995, -2458, 20403, 32396, 27086, 7272, -16455, + -31360, -29404, -11600, 12479, 29828, 31031, 15399, -8615, -27955, -32064, + -18659, 4965, 25884, 32607, 21401, -1603, -23739, -32768, -23659, -1421, + 21622, 32648, 25481, 4080, -19619, -32342, -26922, -6362, 17795, 31930, + 28034, 8266, -16201, -31485, -28868, -9799, 14877, 31064, 29471, 10968, + -13850, -30714, -29878, -11785, 13140, 30467, 30119, 12257, -12757, -30345, + -30210, -12389, 12710, 30361, 30159, 12182, -13000, -30511, -29960, -11631, + 13624, 30786, 29599, 10729, -14574, -31159, -29047, -9464, 15834, 31594, + 28268, 7823, -17381, -32042, -27215, -5795, 19179, 32439, 25835, 3371, + -21180, -32706, -24068, -554, 23319, 32753, 21855, -2643, -25512, -32475, + -19141, 6187, 27652, 31758, 15881, -10019, -29610, -30485, -12047, 14050, + 31232, 28539, 7640, -18154, -32347, -25814, -2700, 22166, 32767, 22230, + -2686, -25879, -32303, -17743, 8373, 29049, 30770, 12367, -14151, -31400, + -28020, -6187, 19741, 32644, 23953, -622, -24801, -32500, -18553, 7784, + 28936, 30727, 11911, -14919, -31728, -27162, -4254, 21547, 32767, 21761, + -4044, -27113, -31707, -14644, 12450, 31029, 28317, 6131, -20294, -32733, + -22558, 3241, 26809, 31771, 14632, -12717, -31205, -27886, -5033, 21366, + 32767, 21111, -5439, -28165, -30980, -11844, 15711, 32114, 25657, 893, + -24525, -32407, -17060, 10547, 30586, 28600, 5972, -20988, -32768, -20789, + 6302, 28823, 30349, 9717, -18036, -32593, -23244, 3196, 27300, 31287, + 12165, -15970, -32287, -24646, 1327, 26328, 31703, 13389, -14958, -32108, + -25155, 726, 26077, 31762, 13438, -15074, -32169, -24834, 1406, 26591, + 31488, 12305, -16317, -32435, -23633, 3370, 27791, 30761, 9931, -18608, + -32720, -21398, 6597, 29463, 29320, 6227, -21763, -32679, -17896, 10997, + 31228, 26786, 1130, -25437, -31813, -12877, 16334, 32523, 22713, -5297, + -29074, -29500, -6179, 22139, 32593, 16687, -12751, -31857, -25076, 2130, + 27615, 30554, 8491, -20545, -32731, -18006, 11561, 31606, 25543, -1670, + -27514, -30522, -8140, 21038, 32675, 17001, -12918, -32021, -24232, 3953, + 28823, 29373, 5083, -23528, -32193, -13504, 16691, 32673, 20760, -8919, + -30973, -26458, 805, 27391, 30369, 7113, -22311, -32415, -14384, 16166, + 32653, 20664, -9390, -31242, -25718, 2394, 28416, 29419, 4461, -24454, + -31737, -10880, 19653, 32719, 16635, -14306, -32475, -21572, 8686, 31158, + 25604, -3032, -28947, -28700, -2456, 26031, 30879, 7623, -22596, -32198, + -12355, 18819, 32741, 16577, -14858, -32610, -20252, 10850, 31915, 23369, + -6907, -30768, -25946, 3119, 29281, 28015, 448, -27556, -29622, -3745, + 25685, 30823, 6744, -23751, -31675, -9431, 21824, 32240, 11800, -19965, + -32574, -13858, 18220, 32733, 15616, -16629, -32767, -17088, 15224, 32719, + 18290, -14026, -32626, -19238, 13055, 32521, 19948, -12322, -32427, -20431, + 11837, 32363, 20696, -11605, -32338, -20747, 11629, 32356, 20585, -11909, + -32416, -20206, 12444, 32507, 19602, -13229, -32612, -18761, 14254, 32709, + 17668, -15508, -32765, -16306, 16972, 32742, 14656, -18622, -32595, -12701, + 20425, 32272, 10425, -22338, -31716, -7819, 24308, 30863, 4880, -26269, + -29649, -1619, 28143, 28009, -1942, -29838, -25882, 5761, 31248, 23216, + -9772, -32257, -19973, 13888, 32743, 16133, -17992, -32579, -11707, 21940, + 31643, 6739, -25561, -29828, -1314, 28661, 27049, -4435, -31029, -23260, + 10322, 32449, 18466, -16113, -32715, -12734, 21522, 31646, 6210, -26228, + -29112, 876, 29888, 25057, -8206, -32159, -19521, 15377, 32734, 12664, + -21921, -31374, -4780, 27328, 27950, -3697, -31083, -22482, 12203, 32726, + 15176, -20071, -31903, -6439, 26578, 28436, -3111, -31012, -22378, 12674, + 32759, 14064, -21319, -31394, -4125, 28072, 26781, -6523, -32033, -19143, + 16743, 32505, 9113, -25286, -29141, 2277, 30948, 22052, -13667, -32754, + -11889, 23513, 30154, -164, -30294, -23187, 12479, 32767, 12584, -23179, + -30232, 237, 30425, 22743, -13305, -32750, -11234, 24366, 29404, -2513, + -31280, -20622, 16081, 32461, 7729, -26819, -27304, 6960, 32366, 16464, + -20496, -31224, -1908, 29871, 23231, -13347, -32714, -9802, 25810, 27969, + -6193, -32314, -16350, 20953, 30890, 403, -30625, -21459, 15927, 32352, + 6112, -28213, -25224, 11191, 32767, 10797, -25556, -27848, 7048, 32531, + 14447, -23026, -29573, 3676, 31983, 17126, -20891, -30634, 1165, 31394, + 18926, -19333, -31224, -446, 30954, 19931, -18462, -31481, -1148, 30780, + 20198, -18334, -31473, -937, 30913, 19739, -18961, -31197, 193, 31324, + 18523, -20307, -30575, 2243, 31907, 16476, -22287, -29461, 5201, 32478, + 13500, -24744, -27646, 9013, 32767, 9495, -27435, -24876, 13554, 32423, + 4402, -30005, -20892, 18580, 31027, -1742, -31979, -15476, 23690, 28132, + -8738, -32768, -8538, 28296, 23334, -16157, -31716, -205, 31620, 16382, + -23286, -28194, 9061, 32756, 7323, -29119, -21760, 18391, 30799, -3339, + -32433, -12368, 26481, 25075, -14517, -31980, -600, 31707, 15446, -24519, + -26818, 12155, 32404, 2639, -31214, -16749, 23691, 27352, -11525, -32462, + -2766, 31259, 16385, -24167, -26805, 12684, 32219, 970, -31818, -14308, + 25863, 25031, -15555, -31410, 2765, 32537, 10333, -28410, -21637, 19861, + 29448, -8363, -32702, -4252, 31080, 16095, -24993, -25501, 15468, 31251, + -3941, -32703, -7965, 29830, 18682, -23170, -26897, 13709, 31695, -2713, + -32636, -8453, 29772, 18495, -23586, -26337, 14904, 31222, -4762, -32764, + -5721, 30954, 15474, -26124, -23577, 18877, 29341, -10003, -32348, 378, + 32466, 9122, -29826, -17701, 24785, 24707, -17871, -29671, 9714, 32323, + -991, -32594, -7643, 30594, 15593, -26588, -22368, 20951, 27601, -14135, + -31062, 6621, 32652, 1111, -32397, -8618, 30427, 15513, -26956, -21484, + 22259, 26301, -16642, -29817, 10428, 31968, -3931, -32761, -2559, 32265, + 8782, -30598, -14525, 27914, 19619, -24390, -23943, 20213, 27421, -15573, + -30019, 10651, 31742, -5614, -32621, 608, 32716, 4238, -32103, -8824, + 30869, 13070, -29109, -16919, 26920, 20335, -24398, -23300, 21632, 25814, + -18705, -27888, 15693, 29543, -12661, -30811, 9665, 31727, -6752, -32330, + 3958, 32663, -1312, -32768, -1164, 32685, 3455, -32454, -5553, 32111, + 7453, -31692, -9155, 31226, 10661, -30743, -11973, 30266, 13099, -29815, + -14043, 29410, 14812, -29065, -15410, 28791, 15843, -28597, -16114, 28489, + 16225, -28472, -16177, 28544, 15969, -28705, -15599, 28949, 15063, -29270, + -14357, 29656, 13474, -30094, -12409, 30567, 11154, -31056, -9703, 31535, + 8051, -31979, -6194, 32355, 4132, -32628, -1865, 32761, -597, -32713, + 3243, 32440, -6052, -31896, 8997, 31037, -12040, -29819, 15136, 28202, + -18226, -26149, 21242, 23634, -24103, -20642, 26722, 17170, -28999, -13234, + 30830, 8870, -32107, -4139, 32726, -873, -32586, 6054, 31602, -11262, + -29708, 16332, 26868, -21075, -23082, 25283, 18391, -28744, -12890, 31243, + 6727, -32585, -108, 32602, -6707, -31175, 13407, 28248, -19644, -23846, + 25050, 18085, -29256, -11184, 31921, 3466, -32763, 4650, 31591, -12664, + -28334, 20019, 23070, -26144, -16041, 30497, 7660, -32618, 1498, 32185, + -10726, -29070, 19235, 23374, -26215, -15455, 30921, 5931, -32758, 4355, + 31369, -14394, -26711, 23101, 19100, -29440, -9225, 32553, -1889, -31894, + 12970, 27339, -22632, -19260, 29553, 8533, -32667, 3519, 31348, -15274, + -25563, 25014, 15944, -31181, -3766, 32653, -9184, -28972, 20850, 20502, + -29226, -8454, 32725, -5235, -30509, 18180, 22726, -27960, -10592, 32577, + -3742, -30907, 17529, 23021, -27936, -10289, 32643, -4786, -30406, 19013, + 21438, -29171, -7506, 32766, -8341, -28693, 22392, 17643, -31135, -2092, + 32173, -14173, -24950, 26936, 11069, -32659, 5958, 29520, -21528, -18083, + 31171, 1337, -31878, 15983, 23130, -28688, -7261, 32711, -11030, -26493, + 26004, 11695, -32678, 7098, 28558, -23694, -14697, 32318, -4403, -29685, + 22127, 16387, -32005, 3038, 30135, -21510, -16864, 31944, -3033, -30028, + 21918, 16156, -32170, 4395, 29331, -23308, -14208, 32548, -7103, -27857, + 25510, 10900, -32768, 11077, 25285, -28186, -6100, 32337, -16103, -21210, + 30790, -237, -30604, 21738, 15243, -32530, 7935, 26832, -27212, -7173, + 32394, -16423, -20359, 31369, -2802, -29271, 24587, 10870, -32731, 13816, + 22246, -30723, 1232, 29756, -24146, -11062, 32718, -14459, -21372, 31251, + -3315, -28600, 26075, 7741, -32265, 18257, 17474, -32432, 8981, 25056, + -29562, -649, 30075, -24357, -9722, 32482, -17607, -17590, 32500, -10076, + -23868, 30528, -2421, -28411, 27049, 4849, -31260, 22560, 11383, -32592, + 17514, 16983, -32661, 12297, 21573, -31755, 7208, 25174, -30164, 2462, + 27874, -28156, -1801, 29801, -25961, -5503, 31098, -23773, -8615, 31914, + -21741, -11138, 32382, -19980, -13092, 32621, -18572, -14507, 32722, -17575, + -15409, 32756, -17023, -15820, 32762, -16936, -15749, 32756, -17317, -15192, + 32724, -18157, -14135, 32625, -19427, -12550, 32390, -21081, -10406, 31924, + -23046, -7672, 31105, -25218, -4328, 29791, -27456, -379, 27830, -29576, + 4132, 25066, -31346, 9106, 21361, -32496, 14369, 16622, -32719, 19661, + 10824, -31701, 24626, 4054, -29151, 28815, -3465, -24849, 31711, -11338, + -18706, 32767, -18989, -10833, 31485, -25676, -1599, 27503, -30544, 8325, + 20720, -32722, 17961, 11402, -31475, 26091, 282, -26390, 31389, -11417, + -17568, 32649, -22050, -5792, 29076, -29749, 7416, 20594, -32764, 19887, + 8101, -29906, 29112, -6444, -21010, 32763, -20185, -7289, 29354, -29874, + 8596, 18893, -32667, 22887, 3292, -27076, 31567, -13701, -13792, 31558, + -27243, 3983, 21995, -32761, 21019, 5066, -27658, 31478, -14069, -12751, + 31003, -28603, 7272, 18812, -32508, 24955, -1199, -23287, 32735, -21190, + -3847, 26394, -32224, 17784, 7755, -28415, 31426, -15051, -10527, 29626, + -30683, 13183, 12214, -30246, 30221, -12282, -12865, 30409, -30160, 12391, + 12502, -30153, 30516, -13510, -11109, 29417, -31202, 15591, 8631, -28038, + 32019, -18518, -5005, 25773, -32652, 22076, 203, -22324, 32663, -25909, + 5707, 17398, -31506, 29478, -12473, -10794, 28581, -32043, 19577, 2530, + -23339, 32699, -26160, 7010, 15455, -30491, 31027, -16934, -5059, 24638, + -32757, 25776, -7021, -14878, 29993, -31595, 19086, 1858, -21925, 32330, + -28627, 12545, 8886, -26461, 32751, -25207, 7118, 13884, -29080, 32279, + -22285, 3279, 16992, -30401, 31679, -20438, 1211, 18430, -30877, 31414, + -19954, 963, 18333, -30712, 31646, -20906, 2545, 16683, -29827, 32236, + -23165, 5940, 13313, -27866, 32739, -26362, 11028, 7983, -24250, 32386, + -29790, 17431, 559, -18305, 30122, -32315, 24302, -8708, -9536, 24774, + -32381, 30137, -18832, 1947, 15451, -28246, 32765, -27801, 14892, 2199, + -18604, 29748, -32607, 26498, -13198, -3613, 19389, -29956, 32602, -26737, + 13987, 2293, -17922, 28978, -32763, 28438, -17172, 1789, 13956, -26311, + 32406, -30905, 22258, -8549, -7039, 20974, -30175, 32681, -28041, 17361, + -3016, -11900, 24250, -31505, 32250, -26431, 15320, -1211, -13067, 24724, + -31549, 32316, -26972, 16615, -3240, -10657, 22555, -30355, 32746, -29397, + 20984, -9030, -4385, 16993, -26725, 32041, -32162, 27156, -17905, 5921, +}; diff --git a/tools/topology/topology2/include/common/common_definitions.conf b/tools/topology/topology2/include/common/common_definitions.conf index 9da9fcb78f34..2c5d5d0825d0 100644 --- a/tools/topology/topology2/include/common/common_definitions.conf +++ b/tools/topology/topology2/include/common/common_definitions.conf @@ -34,6 +34,8 @@ Define { SAMPLE_TYPE_SIGNED_INTEGER 2 # Signed Integer SAMPLE_TYPE_UNSIGNED_INTEGER 3 # Unsigned Integer SAMPLE_TYPE_FLOAT 4 # Float + SAMPLE_TYPE_A_LAW 5 # A-law + SAMPLE_TYPE_MU_LAW 6 # mu-law # Copier type HDA_HOST_OUTPUT_CLASS 0 # HD/A host output (-> DSP) diff --git a/tools/topology/topology2/include/common/input_audio_format.conf b/tools/topology/topology2/include/common/input_audio_format.conf index 795f3cdb46b0..7c220516ed48 100644 --- a/tools/topology/topology2/include/common/input_audio_format.conf +++ b/tools/topology/topology2/include/common/input_audio_format.conf @@ -98,6 +98,8 @@ Class.Base."input_audio_format" { $SAMPLE_TYPE_SIGNED_INTEGER $SAMPLE_TYPE_UNSIGNED_INTEGER $SAMPLE_TYPE_FLOAT + $SAMPLE_TYPE_A_LAW + $SAMPLE_TYPE_MU_LAW ] } } diff --git a/tools/topology/topology2/include/common/output_audio_format.conf b/tools/topology/topology2/include/common/output_audio_format.conf index 915edc000820..7930402a26f2 100644 --- a/tools/topology/topology2/include/common/output_audio_format.conf +++ b/tools/topology/topology2/include/common/output_audio_format.conf @@ -103,6 +103,8 @@ Class.Base."output_audio_format" { $SAMPLE_TYPE_SIGNED_INTEGER $SAMPLE_TYPE_UNSIGNED_INTEGER $SAMPLE_TYPE_FLOAT + $SAMPLE_TYPE_A_LAW + $SAMPLE_TYPE_MU_LAW ] } }